Online doctor recommendation method and system based on heterogeneous graph attention network

By applying heterogeneous graph attention network on online medical platforms, building multi-dimensional relationship representations and performing feature convolution learning, the problem that traditional platforms are difficult to accurately recommend doctors is solved, and a more accurate and comprehensive one-time doctor recommendation is achieved.

CN118919088BActive Publication Date: 2025-02-11THE 989TH HOSPITAL OF THE CHINESE PEOPLES LIBERATION ARMY JOINT LOGISTICS SUPPORT FORCE
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411368026.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-29
Publication Date
2025-02-11
Estimated Expiration
2044-09-29

AI Technical Summary

Technical Problem

Traditional online medical platforms are difficult to accurately recommend suitable doctors and medical resources through keyword query, especially when dealing with complex brain diseases, the results returned are not comprehensive or deviate from patient expectations.

Method used

Using an online doctor recommendation method based on heterogeneous graph attention network, a multi-dimensional relationship representation between patients and doctors is constructed, and feature convolution learning and dynamic graph attention mechanisms are used to deeply explore potential relationships and achieve more accurate doctor recommendations.

Benefits of technology

It improves the accuracy and comprehensiveness of doctor recommendations and can better meet the actual needs of patients, especially in the diagnosis and treatment of complex brain diseases, providing more accurate doctor resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118919088B_ABST
    Figure CN118919088B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of smart medical care, and specifically discloses an online doctor recommendation system and method based on a heterogeneous graph attention network. The method constructs a feature vector by acquiring patient and doctor information, calculates the similarity matrix between the patient and the doctor, constructs a patient-doctor association matrix, and generates a complete similarity matrix using a Gaussian kernel interaction spectrum. Based on these matrices, a heterogeneous graph network is constructed, and a dynamic graph attention mechanism is applied to update node features. The association score between the patient and the doctor is predicted through a multi-layer perceptron model, thereby achieving accurate doctor recommendations. The system includes input, output, algorithm, storage and interaction modules, which can comprehensively represent and analyze the multidimensional relationship between doctors and patients, deeply explore potential associations, and improve the accuracy of recommendations. When dealing with diseases involving complex brain structures, the present invention can provide more comprehensive and accurate doctor resources, effectively meet patient needs, and improve medical service efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart medical care, and in particular to an online doctor recommendation method and system based on a heterogeneous graph attention network. Background Art

[0002] With the rapid development of science and technology, artificial intelligence has penetrated into various fields, among which the application in the medical field is particularly eye-catching. The combination of artificial intelligence and medical care not only optimizes the traditional medical model, but also becomes the cornerstone of innovative new medical service models. In the diagnosis and treatment of brain diseases, the introduction of artificial intelligence provides strong support for the diagnosis and treatment of complex neurological diseases such as epilepsy.

[0003] However, although online medical platforms have been widely promoted and applied in recent years, traditional platforms still have certain problems. Patients usually search for doctors and medical resources on the platform through keyword queries, but with the surge in information, this method has gradually exposed its limitations. Especially when dealing with diseases involving complex brain structures such as the human brain and amygdala, traditional query methods often return results that are incomplete or deviate from patients' expectations, making it difficult to accurately recommend suitable doctors and medical resources based on patients' specific needs. Summary of the invention

[0004] In order to overcome the shortcomings of the prior art, the present invention provides an online doctor recommendation system based on a heterogeneous graph attention network. By introducing the heterogeneous graph attention network, it can more comprehensively represent and analyze the multidimensional relationship between doctors and patients, thereby achieving more accurate doctor recommendations. Through feature convolutional learning, it deeply explores the potential relationship between doctors and patients, which not only improves the accuracy of recommendations, but also helps to discover the possible implicit connections between patients and doctors, providing more comprehensive and accurate doctor resources.

[0005] According to the design scheme provided by the present invention, on the one hand, an online doctor recommendation method based on a heterogeneous graph attention network is provided, comprising the following steps:

[0006] S1. Obtain patient information and doctor information, and construct a patient feature vector and a doctor feature vector based on the acquired information;

[0007] S2. Calculate the cosine similarity between patient feature vectors and the cosine similarity between doctor feature vectors respectively, and generate an inter-patient similarity matrix and an inter-doctor similarity matrix;

[0008] S3. Based on the patient's historical medical information, a patient-doctor association matrix is ​​constructed, where the matrix elements indicate whether the doctor has provided treatment to the patient;

[0009] S4. Based on the correlation matrix, the Gaussian kernel interaction spectra between patients and the Gaussian kernel interaction spectra between doctors are calculated respectively, and the Gaussian kernel interaction spectra are used to characterize the potential similarity of the corresponding similarity matrices, so as to generate the complete similarity matrix of patients and the complete similarity matrix of doctors;

[0010] S5. Construct a heterogeneous graph network based on the complete similarity matrix of patients, the complete similarity matrix of doctors and the association matrix, and define an initial node feature matrix; the nodes of the heterogeneous graph network include all patients and doctors, the edges represent the known or potential associations between patients and doctors, and the initial node feature matrix contains the feature vectors of patients and doctors of all nodes;

[0011] S6. Apply the dynamic graph attention mechanism on the heterogeneous graph network, assign attention weights to the neighbors of each node in the heterogeneous graph network, and aggregate the features of the neighboring nodes based on the attention weights to obtain the high-order feature representation of the node. The feature representation of each node is updated through the high-order feature representation to generate a high-order complete feature information matrix;

[0012] S7. Interact the high-order feature representations of patients and doctors by pairwise element-wise product operations, learn the interaction between the high-order feature representations of patients and doctors through a multi-layer perceptron model, and predict the association score between patients and doctors;

[0013] S8. Sort the predicted correlation scores between the patients to be treated and all doctors from high to low, select the doctor with the highest score as the recommendation result, and recommend it to the patients to be treated.

[0014] As an online doctor recommendation method based on heterogeneous graph attention network of the present invention, further, the patient information includes the patient's age, gender, and consultation text data, and the doctor information includes the doctor's historical diagnosis and treatment data and the doctor's gender, age, title, consultation price and praise rate.

[0015] As the online doctor recommendation method based on heterogeneous graph attention network of the present invention, further, the construction of the patient feature vector includes:

[0016] Segment the medical consultation text and generate text feature vectors through the document vector model;

[0017] The patient's age and gender information is normalized and expanded to the same dimension as the text feature vector to obtain an age feature vector and a gender feature vector;

[0018] The text feature vector, age feature vector, and gender feature vector are summed by linear weighting.

[0019] The construction of the doctor feature vector includes:

[0020] Construct the doctor's diagnosis and treatment feature vector: select the patient feature vectors of the doctor's recent diagnosis and treatment and take the average value; process the doctor's field of expertise text data through the document vector model to obtain a vector with the same dimension as the patient's consultation text feature vector; add the average value of the patient feature vector to the feature vector of the field of expertise to obtain the doctor's diagnosis and treatment feature vector;

[0021] Constructing the doctor's personal feature vector: normalize the doctor's age and gender information; convert the professional title into a digital variable, and bin and normalize the consultation price; combine the professional title, price, gender, age, and praise rate to generate a personal feature vector;

[0022] Combine the doctor's diagnosis and treatment feature vector and the personal feature vector, and take the average to get the doctor's feature vector.

[0023] As an online doctor recommendation method based on heterogeneous graph attention network of the present invention, further, constructing the association matrix between patients and doctors also includes: using the neighbor information of patients and doctors to weighted update the matrix elements that have no treatment relationship.

[0024] As the online doctor recommendation method based on heterogeneous graph attention network of the present invention, further, in S4, in S4, the potential similarity of the corresponding similarity matrix is ​​characterized including:

[0025] For the elements with a value of 0 in the similarity matrix, fill them with the element value corresponding to the Gaussian kernel interaction spectrum;

[0026] For non-zero elements, the average of the elements of the spectrum interacting with the Gaussian kernel is taken to reflect their direct and potential similarities.

[0027] As the online doctor recommendation method based on heterogeneous graph attention network of the present invention, further, in S6, the step of constructing the heterogeneous graph network includes:

[0028] A patient adjacency matrix is ​​constructed based on the similarity between patients and a given threshold; a doctor adjacency matrix is ​​constructed based on the similarity between doctors and the same threshold; the association matrix between patients and doctors is combined to form a unified heterogeneous graph adjacency matrix; the initial feature matrix of the heterogeneous graph node is defined based on the patient feature matrix and the doctor feature matrix; an initial node feature matrix composed of the patient feature matrix and the doctor feature matrix is ​​defined to implement the heterogeneous graph in the deep graph library.

[0029] As an online doctor recommendation method based on a heterogeneous graph attention network of the present invention, further, the step of generating the high-order complete feature information matrix includes: assigning weights to different neighbors of a node in the heterogeneous graph network, and calculating the attention score of the node to its neighbors by defining a score function; normalizing the attention score using a softmax function; using the normalized attention score to aggregate the features of adjacent nodes to generate a new feature representation of the node; and using a multi-head attention mechanism to perform feature aggregation, and combining a feature convolution learning function to extract high-order features, thereby obtaining a high-order complete feature information matrix of the nodes in the heterogeneous graph.

[0030] As the online doctor recommendation method based on heterogeneous graph attention network of the present invention, further, in S7, predicting the association score between the patient and the doctor includes:

[0031] Based on the high-order complete feature information matrix, the high-order feature representations of patients and doctors are interacted through pairwise element-by-element product operations in generalized matrix decomposition. The interaction between the high-order feature representations between patients and doctors is learned using a multilayer perceptron, and the predicted association score is output. The model is trained by minimizing the binary cross entropy loss with L2 regularization, in which the loss function calculation takes into account the difference between the actual association and the predicted association score between patients and doctors, as well as the influence of the regularization parameter.

[0032] In another aspect, the present invention provides an online doctor recommendation system based on a heterogeneous graph attention network, comprising:

[0033] The input module is used to collect and pre-process the information of patients and doctors through the online medical platform, including the patient's age, gender, consultation text data, and the doctor's historical diagnosis and treatment records, basic information, etc., and convert the collected information into feature vectors;

[0034] The output module is used to display the recommendation results and provide the patient with a list of doctor recommendations;

[0035] The algorithm module, as the core of the system, uses heterogeneous graph attention networks to perform node feature aggregation and feature convolution learning to calculate the association score between patients and doctors;

[0036] Storage module, used to store patient and doctor feature data, similarity matrix, and model parameters, and ensure data security and efficient access;

[0037] The interactive module provides a friendly user interface that enables patients to input information, view recommendation results, and interact with the system.

[0038] Beneficial effects of the present invention:

[0039] The online doctor recommendation method and system based on heterogeneous graph attention network proposed in the present invention can more comprehensively represent and analyze the multidimensional relationship between doctors and patients by introducing heterogeneous graph attention network. Not only the basic information of the patient such as age, gender, and consultation text is considered, but also the key factors such as the doctor's historical medical records and professional background are integrated, so as to achieve more accurate doctor recommendations. Compared with the traditional keyword query method, the present invention can provide more comprehensive and accurate doctor resources when dealing with diseases involving complex brain structures, effectively meeting the actual needs of patients.

[0040] Secondly, the present invention uses feature convolutional learning to deeply explore the potential relationship between doctors and patients, which not only improves the accuracy of recommendations, but also helps to discover the hidden relationship between patients and doctors. This is of particular significance for some complex cases where it is difficult to judge the appropriate doctor based on surface information. Through the recommendation system of the present invention, patients can find professional doctors suitable for them more quickly, thereby improving the overall efficiency of medical services. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 Schematic diagram of the process of an online doctor recommendation method based on a heterogeneous graph attention network in an embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solutions and advantages of the present invention clearer and more understandable, the present invention is further described in detail below in conjunction with the accompanying drawings and technical solutions.

[0043] Embodiments of the present invention, see Figure 1 , an online doctor recommendation method based on heterogeneous graph attention network is provided, comprising the following steps:

[0044] S1. Obtain patient information and doctor information, and construct a patient feature vector and a doctor feature vector based on the acquired information;

[0045] Specifically, the patient information includes the patient's age, gender and medical consultation text data. After the medical consultation text is segmented, the text can be represented as a vector with the same dimension f through the document vector model. Then, the patient's age, gender and other personal information are synthesized, and feature weights are set. The weight parameters are adjusted during training using an embedded feature selection method.

[0046] Among them, the patient's gender is represented by a dummy variable, 1 represents female, 0 represents male, and the patient's age is discretized and divided into 6 sections, 0 represents infants and young children aged 0-6, 1 represents teenagers aged 7-12, 2 represents adolescents aged 13-17, 3 represents young people aged 18-45, 4 represents middle-aged people aged 46-69, and 5 represents the elderly over 69 years old. In order to eliminate the impact of dimension, the gender and age characteristics are normalized. The normalization formula is:

[0047] ;

[0048] Since the dimensions of the high-dimensional text vector and the patient's personal information are quite different, in order to balance the effects of each feature, the patient's gender and age are expanded and copied into vectors of the same dimension as the text feature, that is, f-dimensional vectors. Usually, f is selected as 100, 200, or 300. Then, the three feature vectors are summed by linear weighting. The calculation formula is:

[0049] ,

[0050] in is the patient's gender feature vector, is the patient's age feature vector, The text feature vector of the patient's consultation. , , are the weights corresponding to the three types of features, which can be adjusted later through 5-fold cross-validation to select the weight combination with the highest area under the average receiver operating characteristic curve. , , The specific value of can be consulted by experts, or the default is that the three categories have the same weight, that is, , is the patient’s feature vector, ;

[0051] Specifically, the doctor information includes the doctor's historical diagnosis and treatment data and the doctor's basic information data, and the doctor characteristics constructed therefrom include the doctor's diagnosis and treatment characteristics and the doctor's personal characteristics;

[0052] Y1. Construct doctor diagnosis and treatment characteristics;

[0053] The doctor's historical diagnosis and treatment records and areas of expertise reflect the doctor's diagnosis and treatment characteristics. The data of the n patients recently treated by the doctor are selected to represent the doctor's diagnosis and treatment ability. The feature vectors corresponding to q patients are averaged. The text data of the doctor's expertise is processed by the document vector model to obtain vector data. The vector should have the same dimension f as the patient's consultation text feature vector. The calculation formula for the doctor's diagnosis and treatment characteristics is as follows:

[0054] ,

[0055] in represents the feature vector of the i-th patient, represents the feature vector of the doctor’s expertise. Indicates the doctor's diagnosis and treatment characteristics;

[0056] Y2, construct personal characteristics of doctors;

[0057] The doctor's gender, age, professional title, consultation price, praise rate, etc. will also affect the patient's medical decision. The doctor's gender and age variables are processed as described in S1 for the calculation method of patients. The doctor's professional title includes chief physician, deputy chief physician, attending physician, and resident physician. It is converted into a digital variable of 0-3 according to the professional title level from low to high. The consultation price is binned, and the doctors on the online platform are sampled and quartile statistics are performed. The consultation price is segmented according to the quartiles, with 0 representing the price in the range of 0-the first quartile, 1 representing the price in the range of the first quartile-the second quartile, 2 representing the price in the range of the second quartile-the third quartile, and 3 representing the price higher than the third quartile. Furthermore, in order to eliminate the impact of the dimension, the professional title variable and the consultation price variable are normalized as described in S1. The formula for the doctor's personal characteristics is as follows:

[0058] ,

[0059] in , , , , They represent the doctor's gender, age, professional title, consultation price, and praise rate. Indicates the personal characteristics of the doctor;

[0060] S2. Calculate the cosine similarity between patient feature vectors and the cosine similarity between doctor feature vectors respectively, and generate an inter-patient similarity matrix and an inter-doctor similarity matrix;

[0061] Specifically, the patient similarity matrix is ​​calculated;

[0062] The cosine similarity calculation formula is:

[0063] ,

[0064] in For patients With patients The similarity of yes dimensional matrix, and Patients and patients The eigenvector of

[0065] Doctor similarity matrix calculation; the formula for calculating doctor diagnosis and treatment similarity is:

[0066] ,

[0067] in For Doctors With doctor Similarity of diagnosis and treatment, and Doctors and doctors The diagnosis and treatment feature vector of

[0068] The formula for doctor diagnosis and treatment similarity is:

[0069] ,

[0070] in For Doctors With doctor Personal similarity, and Doctors and doctors 's personal feature vector;

[0071] Doctor similarity is a matrix and The mean of :

[0072] ,

[0073] in For Doctors With doctor d The similarity of yes Dimensional matrix;

[0074] S3. Based on the patient's historical medical information, a patient-doctor association matrix is ​​constructed, where the matrix elements indicate whether the doctor has provided treatment to the patient;

[0075] Specifically, we obtain the medical information of patients through the online medical platform. Based on the historical medical information of patients, we can obtain the known association between patients and doctors. We use variables np and nd to represent the number of patients and doctors respectively. Since the reasons for each visit to the doctor may be different, the visits of the same person at different times will be regarded as different patients with different characteristics. We build an adjacency matrix of the graph consisting of patients and doctors. If the doctor For patients treatment, then the value of the matrix element A(i, j) is 1, otherwise it is 0. The goal of the present invention is to predict the potential association score between patients and doctors through a calculation method;

[0076] Since A is highly sparse, if the value of element A(i, j) in A is 0, the weighted association value between the k nearest neighbors of patient pi and the k nearest neighbors of doctor dj is used. The specific value of k is determined by 5-fold cross validation. A(i, j) is updated to a value between 0 and 1. After all elements are updated, the updated patient-doctor association matrix A is obtained.

[0077] S4. Based on the correlation matrix, the Gaussian kernel interaction spectra between patients and the Gaussian kernel interaction spectra between doctors are calculated respectively, and the Gaussian kernel interaction spectra are used to characterize the potential similarity of the corresponding similarity matrices, so as to generate the complete similarity matrix of patients and the complete similarity matrix of doctors;

[0078] Specifically, we obtain the medical information of patients through the online medical platform. Based on the historical medical information of patients, we can obtain the known association between patients and doctors. We use variables np and nd to represent the number of patients and doctors respectively. Since the reasons for each visit to the doctor may be different, the visits of the same person at different times will be regarded as different patients with different characteristics. We build an adjacency matrix of the graph consisting of patients and doctors. If the doctor For patients treatment, then the value of the matrix element A(i, j) is 1, otherwise it is 0. The goal of the present invention is to predict the potential association score between patients and doctors through a calculation method;

[0079] Since A is highly sparse, if the value of element A(i, j) in A is 0, the weighted association value between the k nearest neighbors of patient pi and the k nearest neighbors of doctor dj is used. The specific value of k is determined by 5-fold cross validation. A(i, j) is updated to a value between 0 and 1. After all elements are updated, the updated patient-doctor association matrix A is obtained.

[0080] S5. Construct a heterogeneous graph network based on the complete similarity matrix of patients, the complete similarity matrix of doctors and the association matrix, and define an initial node feature matrix; the nodes of the heterogeneous graph network include all patients and doctors, the edges represent the known or potential associations between patients and doctors, and the initial node feature matrix contains the feature vectors of patients and doctors of all nodes;

[0081] Specifically, the weighted K-neighbor distribution is used to establish the patient-doctor association probability matrix based on the known similarity information. The i-th row vector of the matrix A is , represents the associated eigenvector of patient pi, and the j-th column vector of matrix A , represents the associated feature vector of doctor dj;

[0082] For each patient pi, the new interaction feature vector of pi is calculated according to the patients corresponding to the K elements adjacent to pi in the complete similarity matrix PMS of the patient. The calculation formula is as follows:

[0083] ,

[0084] where p1 to pK are the top K patients ranked in descending order of similarity to patient pi, is the attenuation factor. When the patients pi and pj are more similar, the value is larger. α∈ [0 , 1] is the attenuation term, is the normalization term;

[0085] Similarly, for each doctor di, the new interaction feature vector of di is calculated according to the doctors corresponding to the K elements adjacent to di in the complete similarity matrix DMS of the doctor. The calculation formula is as follows:

[0086] ,

[0087] where d1 to dK are the top K doctors ranked in descending order according to their similarity to doctor di, is the attenuation factor. When doctors di and dj are more similar, its value is larger. α∈[0 , 1] is the attenuation term, is the normalization term;

[0088] The modified patient-doctor association probability matrix PM is calculated as follows:

[0089] ;

[0090] S6. Apply the dynamic graph attention mechanism on the heterogeneous graph network, assign attention weights to the neighbors of each node in the heterogeneous graph network, and aggregate the features of the neighboring nodes based on the attention weights to obtain the high-order feature representation of the node. The feature representation of each node is updated through the high-order feature representation to generate a high-order complete feature information matrix;

[0091] Specifically, MP is set to represent the graph adjacency matrix between patients, and the calculation formula is as follows:

[0092] ,

[0093] Where t is a given threshold, Indicates whether there is an edge between patient pi and patient pj,

[0094] Similarly, MD can be set to represent the graph adjacency matrix between doctors, and the calculation formula is as follows:

[0095] ,

[0096] The MP, MD and A are combined into an adjacency matrix H to represent the association of nodes in the heterogeneous graph.

[0097] ,

[0098] The number of nodes in H is , , a heterogeneous graph consisting of patients and doctors is realized through the deep graph library. The initial node feature matrix of the heterogeneous graph is defined as:

[0099] X ;

[0100] S7. Interact the high-order feature representations of patients and doctors by pairwise element-wise product operations, learn the interaction between the high-order feature representations of patients and doctors through a multi-layer perceptron model, and predict the association score between patients and doctors;

[0101] Specifically, Y1 assigns different weights to different neighbors of the node to learn the representation of the node on the graph, and defines a score function to calculate the attention score from node pi to its neighbor node dj. The calculation formula is as follows:

[0102] ,

[0103] in , The i-th and j-th rows of the feature matrix X represent the feature vectors of nodes pi and dj, respectively. It is a single-layer feedforward neural network, consisting of a weight vector Parameterization, W is a learnable weight matrix, Represents vector concatenation;

[0104] Y2. Use softmax to normalize the neighborhood attention score of node pi. The calculation formula is as follows:

[0105] ,

[0106] in is the neighbor set of node pi;

[0107] Y3. Use the attention score to aggregate the features of the neighboring nodes of node pi to generate a new feature representation of node pi. The calculation formula is as follows:

[0108] ,

[0109] in Represents the LeakyReLU nonlinear activation function;

[0110] Y4. Use multi-head attention mechanism for feature aggregation:

[0111] ,

[0112] Where K is the number of heads of the multi-head attention mechanism, represents the aggregated features of node pi under the Kth attention head, is the aggregated representation of the high-order feature information of node pi, f(·) is the feature convolution learning function used to extract high-order features. Thus, the feature expression matrix of the node in the heterogeneous graph is It can be further expressed as:

[0113] ,

[0114] Among them, X′[1:np] and X′[np+1:nt] represent the high-order complete feature information of patients and doctors in the heterogeneous graph respectively;

[0115] S8. Sort the predicted correlation scores between the patients to be treated and all doctors from high to low, select the doctor with the highest score as the recommendation result, and recommend it to the patients to be treated.

[0116] Furthermore, the online doctor recommendation system based on heterogeneous graph attention network implemented based on the above method includes:

[0117] The input module is used to collect and pre-process the information of patients and doctors through the online medical platform, including the patient's age, gender, consultation text data, and the doctor's historical diagnosis and treatment records, basic information, etc., and convert the collected information into feature vectors;

[0118] The output module is used to display the recommendation results and provide the patient with a list of doctor recommendations;

[0119] The algorithm module, as the core of the system, uses heterogeneous graph attention networks to perform node feature aggregation and feature convolution learning to calculate the association score between patients and doctors;

[0120] Storage module, used to store patient and doctor feature data, similarity matrix, and model parameters, and ensure data security and efficient access;

[0121] The interactive module provides a friendly user interface that enables patients to input information, view recommendation results, and interact with the system.

[0122] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the system disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.

[0123] Unless otherwise specifically stated, the relative steps, numerical expressions and numerical values ​​of the components and steps set forth in the above-described embodiments do not limit the scope of the present invention.

[0124] The units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. A person of ordinary skill in the art may use different methods to implement the described functions for each specific application, but such implementation is not considered to be beyond the scope of the present invention.

Claims

1. An online doctor recommendation method based on heterogeneous graph attention network, characterized in that: The following steps are involved: S1. Obtain patient information and doctor information, and construct a patient feature vector and a doctor feature vector based on the acquired information; wherein: The patient information includes the patient's age, gender, and consultation text data; the doctor information includes the doctor's historical diagnosis and treatment data and the doctor's gender, age, professional title, consultation price, and favorable comment rate; The construction of the patient feature vector includes: segmenting the medical consultation text and generating a text feature vector through a document vector model; normalizing the patient's age and gender information and expanding them to the same dimension as the text feature vector to obtain an age feature vector and a gender feature vector; summing the text feature vector, the age feature vector and the gender feature vector through linear weighting; The construction of the doctor feature vector includes: selecting the patient feature vectors of the doctor's recent diagnosis and treatment and taking the average value; processing the doctor's field of expertise text data through the document vector model to obtain a vector with the same dimension as the patient consultation text feature vector; adding the average value of the patient feature vector to the field of expertise feature vector to obtain the doctor's diagnosis and treatment feature vector; normalizing the doctor's age and gender information; converting the professional title into a digital variable, and binning and normalizing the consultation price; combining the professional title, price, gender, age, and praise rate to generate a personal feature vector; merging the doctor's diagnosis and treatment feature vector and the personal feature vector, taking the average value to obtain the doctor's feature vector; S2. Calculate the cosine similarity between patient feature vectors and the cosine similarity between doctor feature vectors respectively, and generate an inter-patient similarity matrix and an inter-doctor similarity matrix; S3. Based on the patient's historical medical information, a patient-doctor association matrix is ​​constructed, where the matrix elements indicate whether the doctor has provided treatment to the patient; the construction of the patient-doctor association matrix includes: Different medical records of the same patient are regarded as independent samples, and the corresponding matrix element value of the medical record is 1, and the corresponding matrix element value of the medical record is 0, so as to obtain the initial association matrix; for the 0-value elements in the initial association matrix, the K nearest neighbor method is used to calculate their potential association degree, wherein the K value is determined by 5-fold cross validation, and the zero-value elements are updated to a value between 0 and 1, so as to obtain the association matrix between patients and doctors; S4. Based on the association matrix, the Gaussian kernel interaction spectra between patients and the Gaussian kernel interaction spectra between doctors are calculated respectively, and the Gaussian kernel interaction spectra are used to characterize the potential similarity of the corresponding similarity matrices, and the complete similarity matrix of patients and the complete similarity matrix of doctors are generated; wherein: For the elements with a value of 0 in the similarity matrix, fill them with the element value corresponding to the Gaussian kernel interaction spectrum; For non-zero elements, the average of the elements of the spectrum interacting with the Gaussian kernel is taken to reflect their direct and potential similarities; S5. Construct a heterogeneous graph network based on the complete similarity matrix of patients, the complete similarity matrix of doctors and the association matrix, and define an initial node feature matrix; the nodes of the heterogeneous graph network include all patients and doctors, the edges represent the known or potential associations between patients and doctors, and the initial node feature matrix contains the feature vectors of patients and doctors of all nodes; where: The steps of constructing a heterogeneous graph network include: constructing a patient adjacency matrix according to the similarity between patients and a given threshold; constructing a doctor adjacency matrix according to the similarity between doctors and the same threshold; combining the association matrix between patients and doctors to form a unified heterogeneous graph adjacency matrix; defining an initial feature matrix of a heterogeneous graph node according to a patient feature matrix and a doctor feature matrix; defining an initial node feature matrix composed of a combination of a patient feature matrix and a doctor feature matrix, for implementing the heterogeneous graph in a deep graph library; S6. Apply the dynamic graph attention mechanism on the heterogeneous graph network to construct a high-order complete feature information matrix; specifically including: Assign weights to different neighbors of nodes in heterogeneous graph networks, and calculate the attention score of nodes to their neighbors by defining a score function; use the softmax function to normalize the attention score; use the normalized attention score to aggregate the features of adjacent nodes to generate a new feature representation of the node; use the multi-head attention mechanism for feature aggregation, and combine the feature convolution learning function to extract high-order features to obtain a high-order complete feature information matrix of nodes in the heterogeneous graph; S7. Interact the high-order feature representations of patients and doctors through pairwise element-wise product operations, learn the interaction between the high-order feature representations of patients and doctors through a multi-layer perceptron model, and predict the association score between patients and doctors; specifically, including: Based on the high-order complete feature information matrix, the high-order feature representations of patients and doctors are interacted through the pairwise element-by-element product operation in generalized matrix decomposition; the interaction between the high-order feature representations between patients and doctors is learned using a multi-layer perceptron, and the predicted association score is output; and the model is trained by minimizing the binary cross entropy loss through L2 regularization, where the loss function calculation takes into account the difference between the actual association and the predicted association score between patients and doctors, as well as the influence of the regularization parameter; S8. Sort the predicted correlation scores between the patients to be treated and all doctors from high to low, select the doctor with the highest score as the recommendation result, and recommend it to the patients to be treated.

2. An online doctor recommendation system based on heterogeneous graph attention network, characterized in that: For implementing the recommendation method according to claim 1, the recommendation system comprises: The input module is used to collect and pre-process the information of patients and doctors through the online medical platform, including the patient's age, gender, consultation text data, and the doctor's historical diagnosis and treatment records and basic information, and convert the collected information into feature vectors; The output module is used to display the recommendation results and provide the patient with a list of doctor recommendations; The algorithm module, as the core of the system, uses a heterogeneous graph attention network to perform node feature aggregation and feature convolution learning according to the method described in claim 1 to calculate the association score between the patient and the doctor; Storage module, used to store patient and doctor feature data, similarity matrix, and model parameters, and ensure data security and efficient access; The interactive module provides a friendly user interface that enables patients to input information, view recommendation results, and interact with the system.

Citation Information

Patent Citations

  • Medical consultation dialogue system and method applying heterogeneous graph neural network

    CN112271001A

  • Disease-related circular RNA (Ribonucleic Acid) identification method based on graph attention

    CN114944192A