A personalized physician recommendation method, system, device, and storage medium integrating knowledge graph and Transformer
By fusing knowledge graphs with Transformer models and integrating explicit and implicit features of physicians and patients, the information integration and time series modeling problems of existing recommendation systems in brain disease scenarios are solved, and accurate prediction of personalized physician recommendations is achieved.
Patent Information
- Application Number
- CN202510335350.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2045-03-20
AI Technical Summary
Existing recommendation systems are unable to effectively integrate high-dimensional heterogeneous information in brain disease scenarios, are unable to quantify physicians' true capabilities in the sub-fields of brain diseases, and lack time series modeling capabilities, resulting in insufficient accuracy in physician recommendations.
By integrating knowledge graphs with Transformer models, we calculate multiple similarities between doctors and patients, use knowledge graph embedding technology to obtain high-quality feature representations, and combine them with Transformer models for accurate predictions.
It achieves accurate prediction of the matching degree between doctors and patients, improving the accuracy of recommendations and personalized service capabilities.
Smart Images

Figure CN120280101B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital medical technology, and specifically to a personalized physician recommendation method, system, device, and storage medium that integrates a knowledge graph and a Transformer. Background Art
[0002] With the deepening of brain science research, the precise diagnosis and treatment of brain diseases such as epilepsy and brain tumors have placed higher demands on doctor recommendation systems. These diseases involve complex human brain structure and functional characteristics. For example, the association between abnormal discharges in the amygdala and epileptic seizures requires matching with physicians who have experience in diagnosing and treating specific brain diseases, are familiar with EEG signal analysis, and have mastered neuromodulation technology. However, existing recommendation systems face the following key issues in the context of brain diseases:
[0003] Insufficient data modeling of brain diseases: Traditional methods rely on explicit labels such as physician departments, such as neurosurgery and professional titles, but fail to integrate high-dimensional heterogeneous information such as patient brain imaging features, such as changes in amygdala volume, EEG time series data, and genetic testing reports, resulting in insufficiently accurate recommendations for diseases such as epilepsy.
[0004] Lack of implicit relationship mining: The effectiveness of diagnosis and treatment of brain diseases is strongly correlated with the depth of physicians' pathological cognition of specific brain regions, such as hippocampal sclerosis and thalamic nucleus function. However, existing methods cannot model the multidimensional semantic relationship between physicians and brain disease entities through knowledge graphs, making it difficult to quantify the true capabilities of physicians in the sub-fields of brain diseases.
[0005] Limitations of time series data processing: Time series data such as EEG signals and dynamic images contain key pathological features, such as EEG spikes during epileptic seizures. Traditional recommendation algorithms lack time series modeling capabilities and are unable to capture the differences in physicians' experience in EEG signal analysis, resulting in matching bias.
[0006] Knowledge graphs can represent brain anatomical entities, disease classifications, and treatment plans in a structured manner, providing semantic support for brain disease recommendations. The Transformer model, with its ability to capture long-term dependencies, can effectively process dynamic data such as EEG signals and image sequences, tapping into the hidden advantages of physicians in the diagnosis and treatment of brain diseases and breaking through the data sparsity limitations of traditional collaborative filtering.
[0007] In recent years, knowledge graphs, as semantic networks capable of representing entities and their relationships, have been widely used in the medical field. By constructing medical knowledge graphs, entities such as physicians, patients, diseases, and symptoms, as well as their relationships, can be structured. However, combining the rich relationship information in knowledge graphs with recommendation algorithms to fully exploit the implicit connections between physicians and patients and achieve accurate recommendations remains an urgent challenge. Summary of the Invention
[0008] To solve the problems existing in the prior art, the present invention provides a personalized physician recommendation method, system, device and storage medium that integrates knowledge graphs and Transformers. By calculating multiple similarities between physicians and patients, integrating explicit and implicit feature information, and using knowledge graph embedding technology to obtain high-quality feature representations, combined with the Transformer model, the matching degree between physicians and patients can be accurately predicted, thereby achieving personalized physician recommendations and solving the problems mentioned in the above background technology.
[0009] To achieve the above objectives, the present invention provides the following technical solution: a personalized physician recommendation method that integrates knowledge graphs and Transformers. This method fully utilizes the multi-dimensional features and relational data in the medical field and applies advanced deep learning models to achieve efficient and accurate physician recommendations, providing strong technical support for the development of smart healthcare. The method includes the following steps:
[0010] S1. Calculate physician similarity and construct an integrated physician similarity matrix;
[0011] S2, calculate patient similarity and construct an integrated patient similarity matrix;
[0012] S3, build Transformer model and train;
[0013] S4. Prediction and recommendation: Use the trained Transformer model to predict the matching degree between doctors and patients, generate a prediction score matrix, and recommend the most matching doctors to patients based on the prediction score matrix, supporting sorting and filtering.
[0014] Preferably, in step S1, the step of calculating the physician similarity and constructing the integrated physician similarity matrix specifically includes:
[0015] S11. Calculation of Physician Explicit Feature Similarity: Obtain the explicit features of each physician, including professional field, title, affiliated hospital, education, and clinical experience, then construct feature vectors and use cosine similarity to calculate the explicit feature similarity matrix between physicians.
[0016] S12. Physician implicit feature similarity calculation: Construct a medical knowledge graph containing entities such as physicians, diseases, and symptoms and their relationships, and use the knowledge graph embedding method to obtain the physician's embedding vector And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between doctors
[0017] S13. Integrated physician similarity matrix: Take the arithmetic average of the physician explicit feature similarity matrix and the physician implicit feature similarity matrix to obtain the integrated physician similarity matrix Sd .
[0018] Preferably, in step S2, calculating patient similarity and constructing an integrated patient similarity matrix specifically includes:
[0019] S21. Calculation of similarity of dominant features of patients: Obtain the dominant features of each patient, including age, gender, main symptoms, medical history, and examination results, construct feature vectors, and use cosine similarity to calculate the dominant feature similarity matrix between patients.
[0020] S22. Calculation of Patient Hidden Feature Similarity: Using the Medical Knowledge Graph to Obtain the Patient’s Embedding Vector And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between patients
[0021] S23, integrated physician similarity matrix: perform arithmetic averaging on the similarity matrix of patients’ explicit features and the similarity matrix of patients’ implicit features to obtain the integrated patient similarity matrix S p .
[0022] Preferably, the Transformer model includes a Transformer encoder and a multi-layer perceptron; the Transformer encoder is composed of L stacked encoder layers, each encoder layer includes a multi-head self-attention sublayer and a feedforward neural network sublayer, and adopts residual connection and layer normalization; the Transformer encoder adopts a multi-head self-attention mechanism to capture global information by calculating the correlation of different positions in the input sequence.
[0023] Preferably, in the training of the Transformer model, a binary cross entropy loss function is adopted, a similarity-based negative sampling strategy is used, and an adaptive optimization algorithm is used to train the model parameters;
[0024] The binary cross entropy loss function is expressed as follows:
[0025]
[0026] Where D represents the training data set, y ij represents the true label, Indicates physician d i With patient p j The matching prediction score, when the physician d i With patient p j If there is a medical record, ij =1, otherwise y ij =0; N represents the total number of training samples;
[0027] The negative sampling strategy based on similarity measurement means that for each positive sample (d i ,p j ), according to the integrated similarity matrix S d and S p , select and d i Physician with low similarity i′ , and with p j Patient pj with low similarity ′ , construct negative samples (d i′ ,p j′ );
[0028] The adaptive optimization algorithm is specifically an adaptive moment estimation Adam optimization algorithm, which optimizes the model parameters and sets the learning rate to: η=0.001.
[0029] Preferably, in step S4, the use of the trained Transformer model to predict the matching degree between the physician and the patient specifically includes:
[0030] S41, merge the embedding vectors, similarity matrix and medical history records of doctors and patients to construct a joint feature vector z ij , the expression is as follows:
[0031]
[0032] in Indicates physician d i The embedding vector of Indicates patient p j The embedding vector, S d (i,:) represents physician d i Similarity vector with all physicians, S p (:,j) represents patient p j Similarity vector with all patients, A i,j Indicates physician d i With patient p j The number of historical visits is 0 if there is no record. ‖ represents the concatenation operation of the vector;
[0033] S42, the joint eigenvector z ij Input Transformer encoder, through the multi-head self-attention mechanism and the stacking of encoder layers, extract high-level feature representation h ij ;
[0034] S43, the output h of the Transformer encoder ij Input into the multi-layer perceptron to generate the predicted score of physician and patient matching The expression is as follows:
[0035]
[0036] Where W1, W2 represent weight matrices, b1, b2 represent bias vectors; ReLU(·) represents the activation function, ReLU(x) = max(0, x); σ(·) represents the Sigmoid activation function;
[0037] S44. After making predictions for all combinations of physicians and patients, a prediction score matrix is obtained.
[0038] On the other hand, to achieve the above-mentioned purpose, the present invention also provides the following technical solution: a personalized physician recommendation system integrating knowledge graph and Transformer, comprising the following modules:
[0039] A data collection module is used to collect and obtain the explicit characteristic data of each physician, the explicit characteristic data of each patient, and the historical medical records of the physicians and patients;
[0040] An integrated physician similarity matrix construction module is used to calculate physician similarity and construct an integrated physician similarity matrix;
[0041] An integrated patient similarity matrix construction module is used to calculate patient similarity and construct an integrated patient similarity matrix;
[0042] Transformer model building module, used to build and train Transformer models;
[0043] The prediction and recommendation module uses the trained Transformer model to predict the matching degree between doctors and patients, generate a prediction score matrix, and recommend the most matching doctors to patients based on the prediction score matrix, supporting sorting and filtering.
[0044] On the other hand, to achieve the above-mentioned object, the present invention further provides the following technical solution: an electronic device, comprising: a processor; and a memory for storing one or more programs;
[0045] When the one or more programs are executed by the processor, the processor executes the personalized physician recommendation method that integrates the knowledge graph and Transformer.
[0046] On the other hand, to achieve the above-mentioned purpose, the present invention also provides the following technical solution: a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the personalized physician recommendation method that integrates the knowledge graph and Transformer.
[0047] The beneficial effects of the present invention are:
[0048] 1) Fusion of multi-source heterogeneous data: Utilizing the explicit and implicit characteristics of physicians and patients, as well as the similarity information between them, to comprehensively capture the factors that affect doctor-patient matching;
[0049] 2) Introducing knowledge graph embedding technology: Through knowledge graph embedding methods, we can mine rich semantic and high-order relational information in the medical field and improve the quality of feature representation;
[0050] 3) Applying the Transformer model: The Transformer model has powerful feature extraction and representation capabilities. Through the multi-head self-attention mechanism, it can effectively capture global information and complex relationships.
[0051] 4) Optimized negative sampling strategy: A similarity-based negative sampling method is used to improve the model’s ability to discriminate against negative samples and enhance the model’s generalization performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Figure 1 This is a flowchart of the steps of a personalized physician recommendation method that integrates knowledge graph and Transformer in an embodiment of the present invention;
[0053] Figure 2 This is a schematic diagram of a personalized physician recommendation system module that integrates knowledge graph and Transformer in an embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of the structure of an electronic device in an embodiment of the present invention;
[0055] In the figure, 110 is a data collection module; 120 is a physician similarity matrix integration module; 130 is a patient similarity matrix integration module; 140 is a Transformer model construction module; 150 is a prediction and recommendation module; 210 is a processor; and 220 is a storage device. DETAILED DESCRIPTION
[0056] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making creative efforts are within the scope of protection of the present invention.
[0057] As a cutting-edge technology in deep learning, the Transformer model is widely used in fields such as natural language processing and recommendation systems due to its powerful feature representation capabilities and flexible processing of sequence data. Its multi-head self-attention mechanism effectively captures long-range dependencies between elements in a sequence. In the doctor recommendation scenario, the Transformer model can better explore the complex associations between physician and patient characteristics.
[0058] Therefore, the present invention proposes a personalized doctor recommendation method that integrates knowledge graph embedding and Transformer model, which can make full use of the explicit and implicit characteristics of doctors and patients and the complex relationships between them, realize accurate prediction of the matching degree between doctors and patients, and meet the needs of personalized medical services.
[0059] See also Figure 1 ,The present invention provides a technical solution: a personalized physician recommendation method that integrates knowledge graph and Transformer, by integrating multiple similarity information between physicians and patients, combining knowledge graph embedding (KGE) technology and Transformer model, to achieve accurate prediction of the matching degree between physicians and patients, such as Figure 1 As shown, the following steps are included:
[0060] S1. Calculate physician similarity and construct an integrated physician similarity matrix.
[0061] The calculating of physician similarity and constructing of an integrated physician similarity matrix specifically includes:
[0062] S11. Calculation of Physician Explicit Feature Similarity: Obtain the explicit features of each physician, including professional field, title, affiliated hospital, education, and clinical experience, then construct feature vectors and use cosine similarity to calculate the explicit feature similarity matrix between physicians.
[0063] Specifically, the dominant characteristic information of each physician is collected and numerically constructed into a feature vector where i=1,2,...,n d , n d Represents the number of doctors. Explicit features include but are not limited to the doctor's professional field, title, hospital, education, and clinical experience. Then, cosine similarity is used to calculate the similarity of explicit features between any two doctors.
[0064]
[0065] S12. Physician implicit feature similarity calculation: Construct a medical knowledge graph containing entities such as physicians, diseases, and symptoms and their relationships, and use the knowledge graph embedding method to obtain the physician's embedding vector And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between doctors
[0066] Specifically, a knowledge graph G = (E, R, F) in the medical field is constructed, where E is an entity set, including doctors, diseases, symptoms, treatment methods, etc.; R is a relationship set, representing the semantic relationship between entities (such as "diagnosis and treatment", "association", "expertise", etc.); F is a fact set, consisting of triples (h, r, t), h, t∈E, r∈R.
[0067] Use knowledge graph embedding methods (such as TransE, TransH, ConvE, etc.) to learn the representation of the knowledge graph and obtain the embedding vector of each entity (physician) These embedding vectors can capture the implicit characteristics and high-order semantic relationships of physicians.
[0068] In order to reduce computational complexity, the embedding vector is subjected to dimensionality reduction (e.g., PCA is used to reduce the dimension from d to d').
[0069] Use cosine similarity to calculate the implicit feature similarity between any two doctors
[0070]
[0071] S13, integrated physician similarity matrix: perform arithmetic averaging on the physician explicit feature similarity matrix and the physician implicit feature similarity matrix to obtain the integrated physician similarity matrix S d .
[0072] The arithmetic mean method is used to fuse the explicit feature similarity and the implicit feature similarity to obtain the integrated physician similarity matrix S d :
[0073]
[0074] Among them S d For size n d ×n d The value of each element in the matrix ranges from [0,1].
[0075] S2. Calculate patient similarity and construct an integrated patient similarity matrix.
[0076] The calculating of patient similarity and constructing of an integrated patient similarity matrix specifically includes:
[0077] S21. Calculation of similarity of dominant features of patients: Obtain the dominant features of each patient, including age, gender, main symptoms, medical history, and examination results, construct feature vectors, and use cosine similarity to calculate the dominant feature similarity matrix between patients.
[0078] Specifically, the dominant characteristic information of each patient is collected to construct a feature vector where j = 1, 2, ..., n p , n p is the number of patients. Explicit characteristics include but are not limited to the patient's age, gender, symptoms, medical history, and examination results.
[0079] Use cosine similarity to calculate the similarity of dominant features between any two patients
[0080]
[0081] S22. Calculation of patient implicit feature similarity: Using the medical knowledge graph, obtain the patient's embedding vector e pj And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between patients
[0082] Specifically, we use the patient-related knowledge graph information to obtain the embedding vector of each patient These embedding vectors can capture high-level information such as the patient's latent characteristics and disease associations. Similarly, the embedding vectors are subjected to dimensionality reduction.
[0083] Use cosine similarity to calculate the similarity of latent features between any two patients
[0084]
[0085] S23, integrated physician similarity matrix: perform arithmetic averaging on the similarity matrix of patients’ explicit features and the similarity matrix of patients’ implicit features to obtain the integrated patient similarity matrix S p .
[0086] The arithmetic mean method is used to fuse the explicit feature similarity and the implicit feature similarity to obtain the integrated patient similarity matrix S p :
[0087]
[0088] Among them S p For size n p ×n p The value of each element in the matrix ranges from [0,1].
[0089] S3. Build the Transformer model and train it.
[0090] The Transformer model includes a Transformer encoder and a multi-layer perceptron; the Transformer encoder is composed of L stacked encoder layers, each of which includes a multi-head self-attention sublayer and a feedforward neural network sublayer, using residual connections and layer normalization; the Transformer encoder uses a multi-head self-attention mechanism to capture global information by calculating the correlation between different positions in the input sequence.
[0091] In the input layer, to capture the position information, position encoding PE is added to the joint feature vector:
[0092] z ij =z ij +PE
[0093] The calculation formula of position encoding PE is:
[0094]
[0095] Where pos is the position index, i is the dimension index, d model is the model dimension.
[0096] Multi-head self-attention mechanism,The Transformer encoder adopts a multi-head self-attention mechanism to capture global information by calculating the correlation between different positions in the input sequence. The attention calculation formula is:
[0097]
[0098] Among them, Q (query), K (key), and V (value) are obtained by linear transformation of the input vector, d k is the dimension of the key vector.
[0099] Encoder layer stacking: The Transformer encoder is composed of L encoder layers stacked together. Each encoder layer includes a multi-head self-attention sublayer and a feedforward neural network sublayer, using residual connections and layer normalization:
[0100]
[0101] in, FFN is a feed-forward neural network.
[0102] In the training of the Transformer model, a binary cross entropy loss function is adopted, a similarity-based negative sampling strategy is used, and an adaptive optimization algorithm is used to train the model parameters;
[0103] The binary cross entropy loss function is expressed as follows:
[0104]
[0105] Where D represents the training data set, y ij represents the true label, Indicates physician d i With patient p j The matching prediction score, when the physician d i With patient p j If there is a medical record, ij =1, otherwise y ij =0; N represents the total number of training samples;
[0106] In order to balance the positive and negative samples, a negative sampling strategy based on similarity measurement is adopted. The negative sampling strategy based on similarity measurement means that for each positive sample (d i ,p j ), according to the integrated similarity matrix S d and S p , select and d i Physician with low similarity d i′ , and with p j Patients with lower similarity p j′ , construct negative samples (d i′ ,p j′ );
[0107] The adaptive optimization algorithm is specifically an adaptive moment estimation Adam optimization algorithm, which optimizes the model parameters and sets the learning rate to: η=0.001.
[0108] The parameters can be optimized through grid search. The default settings are: knowledge graph embedding dimension d = 128, embedding dimension d' after dimensionality reduction = 64, number of Transformer encoder layers L = 4, number of multi-head attention heads H = 8, activation functions: ReLU and Sigmoid, training batch size: 256, number of training rounds (epochs): 100; negative sampling ratio: positive and negative sample ratio is 1:3.
[0109] S4. Prediction and recommendation: Use the trained Transformer model to predict the matching degree between doctors and patients, generate a prediction score matrix, and recommend the most matching doctors to patients based on the prediction score matrix, supporting sorting and filtering. The steps include:
[0110] S41, merge the embedding vectors, similarity matrix and medical history records of doctors and patients to construct a joint feature vector z ij , the expression is as follows:
[0111]
[0112] in Indicates physician d i The embedding vector of Indicates patient p j The embedding vector, S d (i,:) represents physician d i Similarity vector with all physicians (row vector), S p (:,j) represents patient p j Similarity vector with all patients (column vector), A i,j Indicates physician d i With patient p j The number of historical visits is 0 if there is no record. ‖ represents the concatenation operation of the vector;
[0113] S42, the joint eigenvector z ij Input Transformer encoder, through the multi-head self-attention mechanism and the stacking of encoder layers, extract high-level feature representation h ij ;
[0114] S43, the output h of the Transformer encoder ij After flattening, the data is input into a multi-layer perceptron (MLP) for association prediction to generate a prediction score for matching physicians and patients. The expression is as follows:
[0115]
[0116] Where W1, W2 represent weight matrices, b1, b2 represent bias vectors; ReLU(·) represents the activation function, ReLU(x) = max(0, x); σ(·) represents the Sigmoid activation function,
[0117] S44. After predicting all combinations of physicians and patients, the prediction score matrix is obtained.
[0118] in Indicates physician d i With patient p j The matching score of , the matrix size is the same as the medical history matrix A.
[0119] The method proposed in this paper can provide accurate physician recommendation services for online medical platforms, improving patients' experience and the efficient use of medical resources. Experimental validation using a large amount of real-world data has shown significant improvements in recommendation accuracy, recall, and F1 value, demonstrating promising application prospects.
[0120] Based on the same inventive concept as the above method embodiment, the present application embodiment also provides a personalized physician recommendation system that integrates knowledge graph and Transformer. The system can implement the functions provided by the above method embodiment, such as Figure 2 As shown, the system includes the following modules:
[0121] The data collection module 110 is used to collect and obtain the dominant characteristic data of each physician, the dominant characteristic data of each patient, and the historical medical records of the physicians and patients;
[0122] An integrated physician similarity matrix construction module 120 is used to calculate physician similarity and construct an integrated physician similarity matrix;
[0123] An integrated patient similarity matrix construction module 130 is used to calculate patient similarities and construct an integrated patient similarity matrix;
[0124] Transformer model construction module 140, used for constructing and training the Transformer model;
[0125] The prediction and recommendation module 150 is used to use the trained Transformer model to predict the matching degree between doctors and patients, generate a prediction score matrix, and recommend a list of the most matching doctors to the patient based on the prediction score matrix, supporting sorting and filtering.
[0126] The Transformer model includes:
[0127] Transformer encoder: An encoder layer that includes a multi-head self-attention mechanism and a feed-forward neural network to extract high-level feature representations.
[0128] Multi-layer perceptron (MLP): used to perform association prediction on the encoder output and generate matching scores.
[0129] Model training: Use binary cross entropy loss and similarity-based negative sampling strategy to train model parameters.
[0130] Based on the same inventive concept as the above method embodiment, the embodiment of the present application further provides an electronic device, such as Figure 3 As shown, the device includes: a processor 210; and a memory 220 for storing one or more programs;
[0131] When the one or more programs are executed by the processor 210, the processor executes the personalized physician recommendation method that integrates the knowledge graph and the Transformer.
[0132] The personalized physician recommendation method that integrates knowledge graph and Transformer includes the following:
[0133] Calculate physician similarity and construct an integrated physician similarity matrix;
[0134] Calculate patient similarity and construct an integrated patient similarity matrix;
[0135] Build Transformer model and train it;
[0136] Prediction and recommendation: Use the trained Transformer model to predict the match between doctors and patients, generate a prediction score matrix, and recommend the most suitable doctors to patients based on the prediction score matrix, supporting sorting and filtering.
[0137] Based on the same inventive concept as the above-mentioned method embodiment, the embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by the processor 210, it implements the personalized physician recommendation method that integrates the knowledge graph and the Transformer.
[0138] The personalized physician recommendation method that integrates knowledge graph and Transformer includes the following:
[0139] Calculate physician similarity and construct an integrated physician similarity matrix;
[0140] Calculate patient similarity and construct an integrated patient similarity matrix;
[0141] Build Transformer model and train it;
[0142] Prediction and recommendation: Use the trained Transformer model to predict the match between doctors and patients, generate a prediction score matrix, and recommend the most suitable doctors to patients based on the prediction score matrix, supporting sorting and filtering.
[0143] Through the above-mentioned method and system, the present invention can fully explore the explicit and implicit characteristics of doctors and patients, integrate knowledge graph embedding technology and Transformer models, improve the accuracy of feature representation and model prediction, and achieve accurate prediction of doctor-patient matching. This method can meet the personalized recommendation needs of online medical platforms, improve patients' treatment experience and the efficiency of medical resource utilization, and has important practical significance and application value.
[0144] In the several embodiments provided in the embodiments of the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architectures, functions, and operations of the devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or part of the code, which contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, as well as the combination of boxes in the block diagram and / or flowchart, can be implemented using a dedicated hardware-based system that performs the specified functions or actions, or can be implemented using a combination of dedicated hardware and computer instructions.
[0145] In addition, the functional modules in the various embodiments of the present invention may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
[0146] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, electronic device, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk. It should be noted that, in this article, the terms "include", "comprising" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device that includes a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such a process, method, article or device. Without further constraints, an element defined by the phrase "comprises a..." does not preclude the existence of additional identical elements in the process, method, article or apparatus that includes the element.
[0147] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The singular forms "a", "an", "the" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0148] It should be understood that the term "and / or" as used herein is merely a description of the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can represent: A exists alone, A and B exist simultaneously, or B exists alone. Furthermore, the character " / " in this document generally indicates that the associated objects are in an "or" relationship.
[0149] The word "if," as used herein, may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to the determination" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)," depending on the context.
[0150] The references to "first" and "second" in the embodiments merely distinguish similar objects and do not represent a specific ordering of the objects. It is understood that the specific order or precedence of "first" and "second" can be interchanged where appropriate. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate, so that the embodiments described herein can be implemented in an order other than that illustrated or described herein.
[0151] Although the present invention has been described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions described in the aforementioned embodiments, or to make equivalent substitutions for some of the technical features therein. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A personalized physician recommendation method integrating knowledge graph and Transformer, characterized by: The steps include: S1. Calculate physician similarity and construct an integrated physician similarity matrix; specifically, S11. Calculation of Physician Explicit Feature Similarity: Obtain the explicit features of each physician, including professional field, title, affiliated hospital, education, and clinical experience, then construct feature vectors and use cosine similarity to calculate the explicit feature similarity matrix between physicians. S12. Physician implicit feature similarity calculation: Construct a medical knowledge graph containing entities such as physicians, diseases, and symptoms and their relationships, and use the knowledge graph embedding method to obtain the physician's embedding vector And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between doctors S13. Integrated physician similarity matrix: Take the arithmetic average of the physician explicit feature similarity matrix and the physician implicit feature similarity matrix to obtain the integrated physician similarity matrix S d ; S2. Calculate patient similarity and construct an integrated patient similarity matrix; specifically, S21. Calculation of similarity of dominant features of patients: Obtain the dominant features of each patient, including age, gender, main symptoms, medical history, and examination results, construct feature vectors, and use cosine similarity to calculate the dominant feature similarity matrix between patients. S22. Calculation of Patient Hidden Feature Similarity: Using the Medical Knowledge Graph to Obtain the Patient’s Embedding Vector And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between patients S23, integrated physician similarity matrix: perform arithmetic averaging on the similarity matrix of patients’ explicit features and the similarity matrix of patients’ implicit features to obtain the integrated patient similarity matrix S p ; S3, build Transformer model and train; S4. Prediction and recommendation: Use the trained Transformer model to predict the match between doctors and patients and generate a prediction score matrix, which includes: S41, merge the embedding vectors, similarity matrix and medical history records of doctors and patients to construct a joint feature vector z ij , the expression is as follows: in Indicates physician d i The embedding vector of Indicates patient p j The embedding vector, S d (i,:) represents physician d i Similarity vector with all physicians, S p (:,j) represents patient p j Similarity vector with all patients, A i,j Indicates physician d i With patient p j The number of historical visits is 0 if there is no record. ‖ represents the concatenation operation of the vector; S42, the joint eigenvector z ij Input Transformer encoder, through the multi-head self-attention mechanism and the stacking of encoder layers, extract high-level feature representation h ij ; S43, the output h of the Transformer encoder ij Input into the multi-layer perceptron to generate the predicted score of physician and patient matching The expression is as follows: Where W1, W2 represent weight matrices, b1, b2 represent bias vectors; ReLU(·) represents the activation function, ReLU(x) = max(0, x); σ(·) represents the Sigmoid activation function; S44. After making predictions for all combinations of physicians and patients, a prediction score matrix is obtained; Recommend the most suitable physician list for the patient based on the prediction score matrix, supporting sorting and filtering.
2. The personalized physician recommendation method integrating knowledge graph and Transformer according to claim 1, characterized in that: The Transformer model includes a Transformer encoder and a multi-layer perceptron; the Transformer encoder is composed of L stacked encoder layers, each encoder layer includes a multi-head self-attention sublayer and a feedforward neural network sublayer, and adopts residual connection and layer normalization; the Transformer encoder adopts a multi-head self-attention mechanism to capture global information by calculating the correlation between different positions in the input sequence.
3. The personalized physician recommendation method integrating knowledge graph and Transformer according to claim 1 is characterized by: In the training of the Transformer model, a binary cross entropy loss function is adopted, a similarity-based negative sampling strategy is used, and an adaptive optimization algorithm is used to train the model parameters; The binary cross entropy loss function is expressed as follows: in, represents the training data set, y ij represents the true label, Indicates physician d i With patient p j The matching prediction score, when the physician d i With patient p j If there is a medical record, ij =1, otherwise y ij =0; N represents the total number of training samples; The negative sampling strategy based on similarity measurement means that for each positive sample (d i ,p j ), according to the integrated similarity matrix S d and S p , select and d i Physician with low similarity d i′ , and with p j Patients with low similarity p j′ , construct negative samples (d i′ ,p j′ ).
4. A system for personalized physician recommendation based on the method of integrating knowledge graph and Transformer according to any one of claims 1 to 3, characterized in that: Includes the following modules: A data collection module (110) is used to collect and obtain the dominant characteristic data of each physician, the dominant characteristic data of each patient, and the historical medical records of the physicians and patients; An integrated physician similarity matrix construction module (120) is used to calculate physician similarity and construct an integrated physician similarity matrix; An integrated patient similarity matrix construction module (130) is used to calculate patient similarity and construct an integrated patient similarity matrix; Transformer model construction module (140), used for constructing and training the Transformer model; The prediction and recommendation module (150) is used to use the trained Transformer model to predict the matching degree between doctors and patients, generate a prediction score matrix, and recommend the most matching doctor list to the patient based on the prediction score matrix, supporting sorting and filtering.
5. An electronic device, characterized in that: The electronic device includes: a processor (210); and a memory (220) for storing one or more programs; When the one or more programs are executed by the processor (210), the processor executes the personalized physician recommendation method integrating knowledge graph and Transformer as described in any one of claims 1 to 3.
6. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by the processor (210), the method for personalized physician recommendation by integrating knowledge graph and Transformer as described in any one of claims 1 to 3 is implemented.
Citation Information
Patent Citations
Intelligent triage method and device, storage medium and electronic equipment
CN115803821A
Doctor recommendation method
CN118658596A