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

By integrating the knowledge graph and the Transformer model, the explicit and implicit characteristics of physicians and patients are integrated, the problem of insufficient recommendations in brain disease scenarios of existing recommendation systems is solved, and the accuracy of physicians and patients is achieved is achieved, and the accuracy and personalized service capabilities of the recommendation system are improved.

CN120280101AActive Publication Date: 2025-07-08CHINESE PEOPLES LIBERATION ARMY GENERAL HOSPITAL HAINAN HOSPITAL
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510335350.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-20
Publication Date
2025-07-08
Estimated Expiration
2045-03-20

AI Technical Summary

Technical Problem

The existing recommendation system cannot effectively integrate the relationship between the patient's brain imaging characteristics and the functional relationship of the doctor's brain area in the brain disease scenarios, resulting in insufficient recommendation accuracy and lack of time sequence data modeling capabilities, which makes it impossible to capture the empirical differences of doctors in EEG signal analysis.

Method used

Fusion of knowledge graphs and Transformer models, calculate the multiple similarities between physicians and patients, and obtain high-quality feature representations using knowledge graph embedding technology, and accurately predict them with Transformer models to generate a list of physician recommendations.

Benefits of technology

It realizes accurate prediction of the matching degree between doctors and patients, improves the accuracy and personalized service capabilities of the recommendation system, and meets the needs of smart medical care.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120280101A_ABST
    Figure CN120280101A_ABST
Patent Text Reader

Abstract

The invention discloses a personalized physician recommendation method, system and device fusing a knowledge graph and a Transform, and a storage medium. The method comprises the following steps: calculating physician similarity and constructing an integrated physician similarity matrix; calculating patient similarity and constructing an integrated patient similarity matrix; a Transform model is constructed, and training is carried out; and utilizing the trained Transform model to predict the matching degree of the physicians and the patients, generating a prediction score matrix, recommending a most matched physician list for the patients according to the prediction score matrix, and supporting sorting and screening. According to the method, dominant and recessive feature information of doctors and patients can be fully mined, a knowledge graph embedding technology and a Transform model are fused, the accuracy of feature representation and model prediction is improved, and accurate prediction of the matching degree of the doctors and the patients is realized. The method can meet the personalized recommendation requirements of the online medical platform, improves the doctor-seeing experience of the patient and the utilization efficiency of medical resources, and has important practical significance and application value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of digital medical technology, and in particular to a personalized physician recommendation method, system, device and storage medium integrating knowledge graph and 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 put forward higher requirements for doctor recommendation systems. Such diseases involve complex human brain structure and functional characteristics. For example, the relationship between abnormal discharge of the amygdala and epileptic seizures requires matching with physicians who have experience in the diagnosis and treatment of specific brain diseases, are familiar with EEG signal analysis, and have mastered neuromodulation technology. However, existing recommendation systems face the following key problems in brain disease scenarios:

[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 patients' brain imaging features, such as amygdala volume changes, EEG time series data, genetic testing reports and other high-dimensional heterogeneous information, resulting in insufficient accuracy in recommendations for diseases such as epilepsy.

[0004] Lack of implicit relationship mining: The diagnosis and treatment effects of brain diseases are strongly correlated with the depth of physician's 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 physician's true ability 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] The knowledge graph can represent brain anatomical entities, disease classification and treatment plans in a structured manner, providing semantic support for brain disease recommendations; and the Transformer model, with its ability to capture long-term dependencies, can effectively process dynamic data such as EEG signals and image sequences, tap into the hidden advantages of doctors in the diagnosis and treatment of brain diseases, and break through the data sparsity limitations of traditional collaborative filtering.

[0007] In recent years, knowledge graphs, as a semantic network that can express entities and their relationships, have been widely used in the medical field. By constructing a medical knowledge graph, entities such as doctors, patients, diseases, symptoms, and their relationships can be structured. However, how to combine the rich relationship information in the knowledge graph with the recommendation algorithm to fully explore the implicit relationship between doctors and patients and achieve accurate recommendations is still a problem that needs to be solved. 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 a knowledge graph and Transformer. By calculating various similarities between physicians and patients, integrating explicit and implicit feature information, using knowledge graph embedding technology to obtain high-quality feature representations, and combining with the Transformer model, the matching degree between physicians and patients is accurately predicted, thereby realizing personalized physician recommendation and solving the problems mentioned in the above background technology.

[0009] To achieve the above object, the present invention provides the following technical solutions: A personalized physician recommendation method that integrates a knowledge graph and Transformer, which makes full use of multi-dimensional feature and relationship data in the medical field and applies advanced deep learning models to achieve efficient and accurate doctor recommendation, providing strong technical support for the development of intelligent medicine, including the following steps:

[0010] S1. Calculate the physician similarity and construct an integrated physician similarity matrix;

[0011] S2. Calculate the patient similarity and construct an integrated patient similarity matrix;

[0012] S3. Construct a Transformer model and train it;

[0013] S4. Prediction and recommendation: Use the trained Transformer model to predict the matching degree between physicians and patients, generate a prediction score matrix, and recommend the most matching physician list for patients according to the prediction score matrix, supporting sorting and filtering.

[0014] Preferably, in step S1, the calculation of the physician similarity and the construction of the integrated physician similarity matrix specifically include:

[0015] S11. Calculation of physician explicit feature similarity: Obtain the explicit features of each physician, including professional field, title, affiliated hospital, education background, and clinical experience, then construct a feature vector, and use cosine similarity to calculate the explicit feature similarity matrix between physicians

[0016] S12. Calculation of physician implicit feature similarity: 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 embedding vectors of physicians And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between physicians

[0017] S13. Integrate the physician similarity matrix: Arithmetically average 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, the calculation of the patient similarity and the construction of the integrated patient similarity matrix specifically include:

[0019] S21. Calculation of patient explicit feature similarity: Obtain the explicit features of each patient, including age, gender, main symptoms, past medical history, and examination results, construct a feature vector, and use cosine similarity to calculate the explicit feature similarity matrix between patients

[0020] S22. Calculation of patient implicit feature similarity: Use the medical knowledge graph to obtain the embedding vectors of patients and perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between patients

[0021] S23. Integration of physician similarity matrix: Arithmetically average the patient explicit feature similarity matrix and the patient implicit feature similarity matrix 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 stacked by L encoder layers, each encoder layer includes a multi-head self-attention sub-layer and a feed-forward neural network sub-layer, and uses 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.

[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, represents physician d i and patient p j 's matching prediction score. When physician d i has a medical record with patient p j , y 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 physicians d i with low similarity to d i′ , and patients pj j with low similarity to p ′ , and construct negative samples (d i′ , p j′ );

[0028] The specific adaptive optimization algorithm is the Adaptive Moment Estimation Adam optimization algorithm, which optimizes the model parameters, and the learning rate is set to: η = 0.001.

[0029] Preferably, in step S4, the use of the trained Transformer model to predict the matching degree between physicians and patients specifically includes:

[0030] S41. Integrate the embedding vectors of physicians and patients, the similarity matrix, and the medical history records to construct a joint feature vector z ij , and the expression is as follows:

[0031]

[0032] where represents the embedding vector of physician d i , represents the embedding vector of patient p j , S d (i, :) represents the similarity vector between physician d i and all physicians, S p (:, j) represents the similarity vector between patient p j and all patients, A i,j represents the historical medical visit times of physician d i and patient p j , and if there is no record, it is 0, and ‖ represents the concatenation operation of vectors;

[0033] S42. Input the joint feature vector z ij into the Transformer encoder, and through the stacking of the multi-head self-attention mechanism and the encoder layer, extract the high-level feature representation h ij ;

[0034] S43. Input the output h ij of the Transformer encoder into a multi-layer perceptron to generate the prediction score of the matching between physicians and patients , and the expression is as follows:

[0035]

[0036] Among them, W1 and W2 represent weight matrices, b1 and b2 represent bias vectors; ReLU(·) represents an activation function, and ReLU(x) = max(0, x); σ(·) represents the Sigmoid activation function;

[0037] S44. After predicting all combinations of physicians and patients, a prediction score matrix is obtained.

[0038] On the other hand, to achieve the above object, the present invention also provides the following technical solution: A personalized physician recommendation system integrating a knowledge graph and a Transformer, including the following modules:

[0039] A data collection module, configured to collect and obtain the explicit feature data of each physician, the explicit feature data of each patient, and the historical medical record data of physicians and patients;

[0040] An integrated physician similarity matrix construction module, configured to calculate physician similarity and construct an integrated physician similarity matrix;

[0041] An integrated patient similarity matrix construction module, configured to calculate patient similarity and construct an integrated patient similarity matrix;

[0042] A Transformer model construction module, configured to construct and train a Transformer model;

[0043] A prediction and recommendation module, configured to use the trained Transformer model to predict the matching degree between physicians and patients, generate a prediction score matrix, and recommend the most matching physician list for patients according to the prediction score matrix, supporting sorting and filtering.

[0044] On the other hand, to achieve the above object, the present invention also provides the following technical solution: An electronic device, the electronic device includes: 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 is caused to execute the personalized physician recommendation method integrating a knowledge graph and a Transformer.

[0046] On the other hand, to achieve the above object, the present invention also provides the following technical solution: A computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the personalized physician recommendation method integrating a knowledge graph and a Transformer is implemented.

[0047] The beneficial effects of the present invention are:

[0048] 1) Integrate multi-source heterogeneous data: Utilize the explicit and implicit features of physicians and patients, as well as the similarity information between them, to comprehensively capture the factors affecting doctor-patient matching;

[0049] 2) Introduce knowledge graph embedding technology: Through knowledge graph embedding methods, mine the rich semantic and high-order relationship information in the medical field to improve the quality of feature representation;

[0050] 3) Apply 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: Adopt a similarity-based negative sampling method to improve the model's ability to distinguish negative samples and enhance the model's generalization performance. Brief Description of the Drawings

[0052] Figure 1 It is a schematic flowchart of the steps of the personalized doctor recommendation method integrating the knowledge graph and Transformer in the embodiment of the present invention;

[0053] Figure 2 It is a schematic diagram of the modules of the personalized doctor recommendation system integrating the knowledge graph and Transformer in the embodiment of the present invention;

[0054] Figure 3 It is a schematic diagram of the structure of the electronic device in the embodiment of the present invention;

[0055] In the figure, 110 - Data collection module; 120 - Integrated doctor similarity matrix construction module; 130 - Integrated patient similarity matrix construction module; 140 - Transformer model construction module; 150 - Prediction and recommendation module; 210 - Processor; 220 - Storage. Detailed Embodiment

[0056] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0057] As a cutting-edge technology in the field of deep learning, the Transformer model is widely used in natural language processing, recommendation systems and other fields due to its powerful feature representation ability and flexible processing of sequential data. Its multi-head self-attention mechanism can effectively capture the long-range dependence relationships between elements in the sequence. In the doctor recommendation scenario, the Transformer model can be used to better explore the complex associations between doctor and patient features.

[0058] Therefore, the present invention proposes a personalized doctor recommendation method that combines knowledge graph embedding and the Transformer model, which can make full use of the explicit and implicit features of doctors and patients and the complex associations between them, realize accurate prediction of the matching degree between doctors and patients, and meet the needs of personalized medical services.

[0059] Please refer to Figure 1 , the present invention provides a technical solution: a personalized doctor recommendation method that combines a knowledge graph and a Transformer. By integrating various similarity information of doctors and patients, combining knowledge graph embedding (KGE) technology and the Transformer model, accurate prediction of the matching degree between doctors and patients is realized, as Figure 1 shown, including the following steps:

[0060] S1. Calculate the doctor similarity and construct an integrated doctor similarity matrix.

[0061] The calculation of the doctor similarity and the construction of the integrated doctor similarity matrix specifically include:

[0062] S11. Calculate the doctor explicit feature similarity: Obtain the explicit features of each doctor, including professional field, title, affiliated hospital, education background, and clinical experience, then construct a feature vector, and use cosine similarity to calculate the explicit feature similarity matrix between doctors

[0063] Specifically, collect the explicit feature information of each doctor and numerically construct a feature vector where i = 1, 2,..., n d , n d represents the number of doctors. The explicit features include but are not limited to the professional field, title, hospital where the doctor is located, education background, and clinical experience of the doctor. Then use cosine similarity to calculate the explicit feature similarity between any two doctors

[0064]

[0065] S12. Calculate the doctor implicit feature similarity: Construct a medical knowledge graph containing entities and their relationships of doctors, diseases, and symptoms, and use the knowledge graph embedding method to obtain the embedding vector of the doctor Perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between physicians

[0066] Specifically, construct a knowledge graph G=(E, R, F) in the medical field, where E is the entity set, including physicians, diseases, symptoms, treatment methods, etc.; R is the relationship set, representing the semantic relationships between entities (such as "diagnosis and treatment", "association", "good at", etc.); F is the fact set, composed of triples (h, r, t), h, t∈E, r∈R.

[0067] Use knowledge graph embedding methods (such as TransE, TransH, ConvE, etc.) to perform representation learning on the knowledge graph to obtain the embedding vectors of each entity (physician) These embedding vectors can capture the implicit features and high-order semantic relationships of physicians.

[0068] To reduce the computational complexity, perform dimensionality reduction processing on the embedding vectors (such as using PCA to reduce the dimension from d to d').

[0069] Use cosine similarity to calculate the implicit feature similarity between any two physicians

[0070]

[0071] S13. Integrate the physician similarity matrix: Arithmetically average the physician explicit feature similarity matrix and the physician implicit feature similarity matrix to obtain the integrated physician similarity matrix S d .

[0072] Adopt the method of arithmetic average to fuse the explicit feature similarity and the implicit feature similarity to obtain the integrated physician similarity matrix S d :[[]]

[0073]

[0074] where S d is a matrix of size n d ×n d and the value range of each element is between [0, 1].[[]]

[0075] S2. Calculate the patient similarity and construct the integrated patient similarity matrix.

[0076] The calculation of the patient similarity and the construction of the integrated patient similarity matrix specifically include:

[0077] S21. Calculation of patient explicit feature similarity: Obtain the explicit features of each patient, including age, gender, main symptoms, past medical history, and examination results, construct a feature vector, and use cosine similarity to calculate the explicit feature similarity matrix between patients.

[0078] Specifically, collect the explicit feature information of each patient and construct a feature vector. where j = 1, 2,..., n p , n p is the number of patients. Explicit features include but are not limited to the patient's age, gender, symptoms, past medical history, examination results, etc.

[0079] Use cosine similarity to calculate the explicit feature similarity between any two patients.

[0080]

[0081] S22. Calculation of patient implicit feature similarity: Use a medical knowledge graph to obtain the embedding vector e of the patient. pj And perform dimensionality reduction processing, then use cosine similarity to calculate the implicit feature similarity matrix between patients.

[0082] Specifically, use the knowledge graph information related to the patient to obtain the embedding vector of each patient. These embedding vectors can capture high-order information such as the patient's implicit features and disease associations. Similarly, perform dimensionality reduction processing on the embedding vectors.

[0083] Use cosine similarity to calculate the implicit feature similarity between any two patients.

[0084]

[0085] S23. Integrate the physician similarity matrix: Arithmetically average the patient explicit feature similarity matrix and the patient implicit feature similarity matrix to obtain the integrated patient similarity matrix S. p .

[0086] Adopt the method of arithmetic average to fuse the explicit feature similarity and the implicit feature similarity to obtain the integrated patient similarity matrix S. p :

[0087]

[0088] where S p is a matrix of size n p ×n p , and the value range of each element is between [0, 1].

[0089] S3. Construct the Transformer model and train it.

[0090] The Transformer model includes a Transformer encoder and a multi-layer perceptron; the Transformer encoder is stacked by L encoder layers, each encoder layer includes a multi-head self-attention sub-layer and a feed-forward neural network sub-layer, and residual connection and layer normalization are adopted; the Transformer encoder adopts a multi-head self-attention mechanism to capture global information by calculating the correlations of 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 the position encoding PE is:

[0094]

[0095] where pos is the position index, i is the dimension index, and d model is the model dimension.

[0096] The multi-head self-attention mechanism, the Transformer encoder adopts a multi-head self-attention mechanism to capture global information by calculating the correlations of different positions in the input sequence. The attention calculation formula is:

[0097]

[0098] where Q (query), K (key), and V (value) are obtained by linearly transforming the input vector, and d k is the dimension of the key vector.

[0099] Stacking of encoder layers: The Transformer encoder is stacked by L encoder layers. Each encoder layer includes a multi-head self-attention sub-layer and a feed-forward neural network sub-layer, and residual connection and layer normalization (LayerNormalization) are adopted:

[0100]

[0101] where, FFN is the feed-forward neural network.

[0102] In the training of the Transformer model, the binary cross-entropy loss function is adopted, the negative sampling strategy based on similarity is used, and the 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, represents the matching prediction score of doctor d i and patient p j . When there is a medical record of doctor d i and patient p j , y ij = 1, otherwise y ij = 0; N represents the total number of training samples;

[0106] To balance 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 doctors d i with lower similarity to d i′ , and patients p j with lower similarity to p j′ , and construct negative samples (d i′ , p j′ );

[0107] The specific adaptive optimization algorithm is the Adaptive Moment Estimation Adam optimization algorithm, which optimizes the model parameters, and the learning rate is set as: η = 0.001.

[0108] The parameters can be optimized through grid search. The default settings are: the knowledge graph embedding dimension d = 128, the embedding dimension d' after dimensionality reduction = 64, the number of Transformer encoder layers L = 4, the number of multi - head attention heads H = 8, activation functions: ReLU and Sigmoid, the training batch size: 256, the number of training epochs (Epochs): 100; the negative sampling ratio: the ratio of positive and negative samples 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 doctor list for patients according to the prediction score matrix, supporting sorting and filtering. The steps include:

[0110] S41. Integrate the embedding vectors of doctors and patients, the similarity matrix, and the medical history records to construct a joint feature vector z ij , and the expression is as follows:

[0111]

[0112] wherein represents the embedding vector of doctor d i , represents the embedding vector of patient p j , S d S(i, :) represents the similarity vector (row vector) of doctor d i with all doctors, S p S(:, j) represents the similarity vector (column vector) of patient p j with all patients, A i,j represents the historical visit times of doctor d i with patient p j , if there is no record, it is 0; ‖ represents the concatenation operation of vectors;

[0113] S42. Input the combined feature vector z ij into the Transformer encoder, and through the stacking of the multi-head self-attention mechanism and the encoder layers, extract the high-level feature representation h ij ;

[0114] S43. After flattening the output h ij of the Transformer encoder, input it into a multi-layer perceptron (MLP) for association prediction to generate the prediction score for the matching of doctors and patients The expression is as follows:

[0115]

[0116] where W1 and W2 represent weight matrices, b1 and 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 doctors and patients, obtain the prediction score matrix

[0118] wherein represents the matching score of doctor d i with patient p j , and the matrix size is the same as the visit history record matrix A

[0119] The method of the present invention can provide accurate doctor recommendation services for online medical platforms, improve the medical experience of patients and the utilization efficiency of medical resources. Through experimental verification with a large amount of real data, this method has significantly improved in indicators such as recommendation accuracy, recall rate, and F1 value, and has good application prospects.

[0120] Based on the same inventive concept as the above method embodiments, an embodiment of the present application further provides a personalized physician recommendation system that integrates a knowledge graph and a Transformer. This system can implement the functions provided by the above method embodiments, such as Figure 2 As shown, the system includes the following modules:

[0121] A data collection module 110, which is used to collect and obtain the explicit feature data of each physician, the explicit feature data of each patient, and the historical medical record data of physicians and patients;

[0122] An integrated physician similarity matrix construction module 120, which is used to calculate physician similarity and construct an integrated physician similarity matrix;

[0123] An integrated patient similarity matrix construction module 130, which is used to calculate patient similarity and construct an integrated patient similarity matrix;

[0124] A Transformer model construction module 140, which is used to construct and train a Transformer model;

[0125] A prediction and recommendation module 150, which is used to use the trained Transformer model to predict the matching degree between physicians and patients, generate a prediction score matrix, and recommend the most matching list of physicians for patients according to the prediction score matrix, supporting sorting and filtering.

[0126] The Transformer model includes:

[0127] A Transformer encoder: an encoder layer containing a multi-head self-attention mechanism and a feed-forward neural network, which is used to extract high-level feature representations.

[0128] A multi-layer perceptron MLP: which is used to perform correlation prediction on the output of the encoder and generate a matching score.

[0129] Model training: Use binary cross-entropy loss and a similarity-based negative sampling strategy to train the model parameters.

[0130] Based on the same inventive concept as the above method embodiments, an 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, which is used to store one or more programs;

[0131] When the one or more programs are executed by the processor 210, the processor is caused to execute the personalized physician recommendation method that integrates a knowledge graph and a Transformer.

[0132] The personalized physician recommendation method that integrates a knowledge graph and a Transformer includes the following:

[0133] Calculate the similarity of physicians and construct an integrated physician similarity matrix;

[0134] Calculate the similarity of patients and construct an integrated patient similarity matrix;

[0135] Construct a Transformer model and train it;

[0136] Prediction and recommendation: Use the trained Transformer model to predict the matching degree between physicians and patients, generate a prediction score matrix, and recommend the most matching list of physicians for patients according to the prediction score matrix, supporting sorting and filtering.

[0137] Based on the same inventive concept as the above method embodiments, an 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 a processor 210, the personalized physician recommendation method integrating a knowledge graph and Transformer is implemented.

[0138] The personalized physician recommendation method integrating a knowledge graph and Transformer includes the following:

[0139] Calculate the similarity of physicians and construct an integrated physician similarity matrix;

[0140] Calculate the similarity of patients and construct an integrated patient similarity matrix;

[0141] Construct a Transformer model and train it;

[0142] Prediction and recommendation: Use the trained Transformer model to predict the matching degree between physicians and patients, generate a prediction score matrix, and recommend the most matching list of physicians for patients according to the prediction score matrix, supporting sorting and filtering.

[0143] Through the above methods and systems, the present invention can fully mine the explicit and implicit feature information of physicians and patients, integrate the knowledge graph embedding technology and the Transformer model, improve the accuracy of feature representation and model prediction, and achieve accurate prediction of the matching degree between physicians and patients. This method can meet the personalized recommendation needs of online medical platforms, improve the medical experience of patients and the utilization efficiency of medical resources, and has important practical significance and application value.

[0144] In several embodiments provided by 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 devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the part of the module, program segment, or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0145] In addition, each functional module in various embodiments of the present invention may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.

[0146] If the described functions are implemented in the form of software functional 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, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes. It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article, or device. Without more limitations, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article, or device including the said element.

[0147] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a", "the" and "said" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly dictates otherwise.

[0148] It should be understood that the term "and / or" used herein is merely a description of an association relationship between associated objects, indicating that three relationships may exist. For example, A and / or B may represent: the sole existence of A, the simultaneous existence of A and B, and the sole existence of B. Additionally, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0149] Depending on the context, the word "if" as used herein can be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detected (stated condition or event)" can be interpreted as "when determined" or "in response to determining" or "when detected (stated condition or event)" or "in response to detecting (stated condition or event)".

[0150] The "first / second" mentioned in the embodiments is only to distinguish similar objects and does not represent a specific order for the objects. It can be understood that the "first / second" can be interchanged in a specific order or sequence when permitted. It should be understood that the objects distinguished by the "first / second" can be interchanged appropriately so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0151] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A personalized physician recommendation method integrating a knowledge graph and Transformer, characterized in that, It includes the following steps: S1. Calculate the physician similarity and construct an integrated physician similarity matrix; S2. Calculate the patient similarity and construct an integrated patient similarity matrix; S3. Construct a Transformer model and train it; S4. Prediction and recommendation: Use the trained Transformer model to predict the matching degree between physicians and patients, generate a prediction score matrix, and recommend the most matching physician list for patients according to the prediction score matrix, supporting sorting and filtering.

2. The personalized physician recommendation method integrating a knowledge graph and Transformer according to claim 1, wherein: In step S1, the calculating the physician similarity and constructing an integrated physician similarity matrix specifically includes: S11. Calculation of similarity of physicians' explicit features: Obtain the explicit features of each physician, including professional field, title, affiliated hospital, educational background, and clinical experience, then construct a feature vector, and use cosine similarity to calculate the explicit feature similarity matrix between physicians S12. Calculation of implicit feature similarity of physicians: 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 embedding vectors of physicians And perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between physicians S13. Integrate the physician similarity matrix: Perform an arithmetic mean on the physician explicit feature similarity matrix and the physician implicit feature similarity matrix to obtain the integrated physician similarity matrix S d .

3. The personalized physician recommendation method integrating a knowledge graph and a Transformer according to claim 1, characterized in that: In step S2, the calculating the patient similarity and constructing an integrated patient similarity matrix specifically includes: S21. Calculation of similarity of patients' dominant features: Obtain the dominant features of each patient, including age, gender, main symptoms, past medical history, and examination results, construct a feature vector, and use cosine similarity to calculate the similarity matrix of dominant features among patients. S22. Calculation of patient implicit feature similarity: Using the medical knowledge graph, obtain the embedding vectors of patients and perform dimensionality reduction processing, and then use cosine similarity to calculate the implicit feature similarity matrix between patients S23. Integrate the physician similarity matrix: Perform an arithmetic mean on the patient explicit feature similarity matrix and the patient implicit feature similarity matrix to obtain the integrated patient similarity matrix S p .

4. The personalized physician recommendation method integrating a knowledge graph and a Transformer according to claim 1, characterized in that: The Transformer model includes a Transformer encoder and a multi-layer perceptron; the Transformer encoder is stacked by L encoder layers, each encoder layer includes a multi-head self-attention sub-layer and a feed-forward neural network sub-layer, and uses 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.

5. The personalized physician recommendation method integrating a knowledge graph and Transformer according to claim 1, wherein: 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: Among them, D represents the training dataset, and y ij represents the true label, represents the matching prediction score of physician d i and patient p j . When there is a medical record of physician d i and patient p j , y 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 matrices S d and S p , select doctors d i with low similarity to d i′ , and patients p j with low similarity to p j′ to construct negative samples (d i′ , p j′ ).

6. The personalized physician recommendation method integrating a knowledge graph and Transformer according to claim 1, characterized in that: In step S4, the using the trained Transformer model to predict the matching degree between physicians and patients specifically includes: S41. Fuse the embedding vectors of the physician and the patient, the similarity matrix, and the medical history records to construct a joint feature vector z ij , and the expression is as follows: Among them represents the embedding vector of doctor d i . represents the embedding vector of patient p j . S d (i, :) represents the similarity vector of doctor d i with all doctors, S p (:, j) represents the similarity vector of patient p j with all patients, A i,j represents the historical visit times of doctor d i with patient p j . If there is no record, it is 0. ‖ represents the concatenation operation of vectors; S42. Input the joint feature vector z ij into the Transformer encoder, and extract the high-level feature representation h through the stacking of the multi-head self-attention mechanism and the encoder layers ij ; S43. Input the output \(h\) of the Transformer encoder ij into a multi-layer perceptron to generate a prediction score for the matching of physicians and patients The expression is as follows: Where W1 and W2 represent weight matrices, b1 and b2 represent bias vectors; ReLU(·) represents an activation function, ReLU(x) = max(0, x); σ(·) represents a Sigmoid activation function; S44. After predicting all combinations of physicians and patients, a prediction score matrix is obtained.

7. A system for a personalized physician recommendation method integrating a knowledge graph and Transformer according to any one of claims 1-6, characterized in that: It includes the following modules: A data collection module (110) for collecting and obtaining the explicit feature data of each physician, the explicit feature data of each patient, and the historical medical record data of physicians and patients; An integrated physician similarity matrix construction module (120) for calculating the physician similarity and constructing an integrated physician similarity matrix; An integrated patient similarity matrix construction module (130) for calculating the patient similarity and constructing an integrated patient similarity matrix; A Transformer model construction module (140) for constructing a Transformer model and training it; A prediction and recommendation module (150) for using the trained Transformer model to predict the matching degree between physicians and patients, generate a prediction score matrix, and recommend the most matching physician list for patients according to the prediction score matrix, supporting sorting and filtering.

8. 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 is caused to execute the personalized physician recommendation method integrating a knowledge graph and a Transformer as described in any one of claims 1-6.

9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor (210), it implements the personalized physician recommendation method that integrates a knowledge graph and a Transformer as described in any one of claims 1-6.

Citation Information

Patent Citations

  • Intelligent triage method and device, storage medium and electronic equipment

    CN115803821A

  • Medical instrument recommendation method and system based on artificial intelligence

    CN116894125A

  • Doctor recommendation method

    CN118658596A