A doctor search and recommendation method based on multi-behavior time series modeling
Through multi-behavior timing modeling and encryption technology, combined with hyperplanar projection indexing and memory enhancement sorting, the insufficient data modeling and security problems in doctor recommendations are solved, efficient and personalized doctor recommendations are achieved, and patients' search experience is improved.
Patent Information
- Application Number
- CN202510842709.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-23
- Publication Date
- 2025-08-26
- Estimated Expiration
- 2045-06-23
AI Technical Summary
When processing multi-behavior data, existing doctor recommendation methods have problems such as insufficient modeling of behavioral data, inability to balance query optimization and data security, personalized sorting and data sparseness, insufficient recommendation interpretation, and lack of dynamic optimization and feedback mechanisms. Especially in the case of sparse data, it is difficult to dynamically adjust doctor rankings.
Multi-behavior timing modeling is adopted, optimized query vectors are generated through Transformer-TCN hybrid architecture and graph neural network, and data security and efficiency are balanced by combining partial homomorphic encryption and hyperplanar projection indexes. Memory enhanced sorting and cross-patient recommendation strategies are used for personalized sorting, and natural language explanations are generated.
It improves the accuracy and safety of doctor searches, improves the patient's search experience, and provides efficient and intelligent doctor recommendation methods.
Smart Images

Figure CN120355193B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of doctor recommendation, and in particular to a doctor search and recommendation method based on multi-behavior time series modeling. Background Art
[0002] Existing doctor recommendation methods often face challenges when processing multi-behavioral data, including insufficient behavioral data modeling, an inability to balance query optimization and data security, personalized ranking and data sparsity, insufficient interpretability of recommendations, and a lack of dynamic optimization and feedback mechanisms. Traditional recommendation systems typically treat patient behavioral data as independent features, ignoring the temporal dependencies between behaviors. The sensitivity of medical data requires that recommendation systems ensure data security during the query process, particularly when protecting the privacy of core medical data. However, traditional encryption methods often result in reduced query efficiency. Dynamically adjusting doctor rankings based on patients' historical behavioral data during the doctor recommendation process remains a challenge, especially in the context of data sparsity. Users (patients) of medical recommendation systems often place high demands on the interpretability of recommendation results. Traditional recommendation systems often provide only a simple list of doctors and lack detailed explanations of the recommendations. Furthermore, patient preferences and behavioral patterns may change over time, and traditional recommendation systems often lack effective feedback mechanisms to dynamically adjust recommendation strategies based on patients' real-time behavior. Summary of the Invention
[0003] Based on this, it is necessary to provide a doctor search and recommendation method based on multi-behavior time series modeling, including:
[0004] S1: Obtain the patient's historical behavior data, real-time behavior data, and doctor data, perform feature extraction on the real-time behavior data and its timestamp to obtain a behavior feature vector and a time feature vector; perform a weighted combination of the behavior feature vector and the time feature vector to obtain a behavior embedding representation; perform feature extraction on the doctor data to obtain a doctor feature vector;
[0005] S2: A Transformer-TCN hybrid architecture is used to model the behavior embedding representation to obtain a weighted behavior representation. The constructed doctor-patient relationship knowledge graph is passed through a graph neural network to obtain a path embedding. The weighted behavior representation and path embedding are input into a generative adversarial network to generate an optimized query vector.
[0006] S3: Use partially homomorphic encryption to encrypt the optimized query vector, and use hyperplane projection indexing to map the doctor feature vector and the encrypted optimized query vector to a low-dimensional space. Calculate the matching value between the mapped doctor feature vector and the optimized query vector, and sort the doctors based on the matching value to obtain a set of candidate recommended doctors.
[0007] S4: Analyze the patient's preferences from historical behavior data, and model the immediate needs based on the optimized query vector. Adjust the ranking of doctors in the candidate recommended doctor set based on preferences and immediate needs to obtain a doctor recommendation list.
[0008] Beneficial effects: This method aims to improve the accuracy and security of doctor retrieval while enhancing the patient's search experience, providing an efficient and intelligent doctor recommendation method for the intelligent guidance platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0010] Figure 1 This is a flowchart of the doctor search and recommendation method based on multi-behavior time series modeling in an embodiment of the present application. DETAILED DESCRIPTION
[0011] To make the above-mentioned objects, features, and advantages of the present application more clearly understood, the specific embodiments of the present application are described in detail below with reference to the accompanying drawings. The following description sets forth many specific details to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar improvements without violating the scope of the present application. Therefore, the present application is not limited to the specific embodiments disclosed below.
[0012] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of the technical features being referred to. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of such features. Throughout the description of this application, "plurality" means at least two, for example, two, three, etc., unless otherwise specifically defined.
[0013] like Figure 1 As shown, this embodiment provides a doctor search and recommendation method based on multi-behavior time series modeling, including:
[0014] S1: Obtain the patient's historical behavior data, real-time behavior data, and doctor data, perform feature extraction on the real-time behavior data and its timestamp respectively to obtain a behavior feature vector and a time feature vector; perform a weighted combination of the behavior feature vector and the time feature vector to obtain a behavior embedding representation; perform feature extraction on the doctor data to obtain a doctor feature vector.
[0015] Behavioral data and physician data were obtained from hospital information systems and online medical platforms. The behavioral data are shown in Table 1 below;
[0016] Table 1 Behavioral data example,
[0017] ;
[0018] Behavior types include but are not limited to: searching, consulting, booking, and evaluating;
[0019] Text content includes but is not limited to: search keywords, consultation content;
[0020] Values include, but are not limited to: appointment length, number of consultations.
[0021] Specifically, feature extraction of real-time behavior data includes:
[0022] Convert the behavior type in the real-time behavior data into a one-hot encoding to obtain the type feature representation;
[0023] Input the text content in the real-time behavioral data into the pre-trained BERT model to obtain text feature representation;
[0024] Normalize the values in the real-time behavior data to obtain numerical feature representation;
[0025] The type feature representation, text feature representation, and numerical feature representation at the same moment are concatenated to obtain the patient's behavioral feature vector.
[0026] Furthermore, feature extraction of timestamps includes:
[0027] Parse the timestamp to extract year, month, day, and hour;
[0028] Use numerical values to express years, months, and days;
[0029] The hour is periodically encoded using sine-cosine encoding, and the calculation formula is:
[0030] , ;
[0031] in, Sinusoidal code representing hours; Cosine code representing the hour; represents the sine function; represents the cosine function; hour Indicates hours;
[0032] Use values 0-6 to represent the day of the week;
[0033] The holiday code is represented by binary value, 0 is non-holiday, 1 is holiday;
[0034] The time interval between the current behavior data and the previous behavior data is expressed as a numerical value;
[0035] The numerically represented year, month, day, periodically coded hour, numerically represented week, holiday code, and numerically represented time interval are sequentially concatenated to obtain a time feature vector.
[0036] Furthermore, the behavior feature vector and the time feature vector are weightedly combined to obtain the behavior embedding representation, including:
[0037] Multiplying the temporal feature vector by the temporal weight matrix and adding the resulting product to the first bias vector to obtain a temporal position code;
[0038] The behavior feature vector is multiplied by the behavior weight matrix, and the resulting product is added to the temporal position encoding to obtain the behavior embedding representation.
[0039] In this example, doctor data includes but is not limited to professional field, professional title, years of professional experience, academic background, and rating. Professional field is represented using an embedding; professional title is encoded using a label, with 0-3 representing resident physician, attending physician, associate chief physician, and chief physician, respectively; years of professional experience is represented numerically; academic background is represented using an embedding; and ratings are represented numerically using the average rating of the corresponding doctors. The above feature extraction results are combined to generate a doctor feature vector.
[0040] S2: A Transformer-TCN hybrid architecture is used to model the behavior embedding representation to obtain a weighted behavior representation; the constructed doctor-patient relationship knowledge graph is passed through a graph neural network to obtain a path embedding; the weighted behavior representation and path embedding are input into a generative adversarial network together to generate an optimized query vector.
[0041] Specifically, the Transformer-TCN hybrid architecture is used to model the behavior embedding representation, including:
[0042] The TCN branch extracts the local temporal features of the behavior embedding representation through dilated causal convolution, which is calculated as:
[0043] ;
[0044] in, Indicates the t Local temporal features of time steps; m Indicates the convolution window size; Indicates the i The weight of the convolution kernel; Indicates the iThe bias of the convolution kernel; d represents the expansion factor; Represents the time between time steps t The behavior embedding representation of each time step.
[0045] The Transformer branch captures the global dependency features of the behavior embedding representation through a multi-head self-attention mechanism; among them, the query vector, key vector, and value vector are all obtained by linear transformation through the behavior embedding representation.
[0046] The local temporal features and global dependency features are passed through the gating mechanism to output the gated features. The calculation formula is:
[0047] ;
[0048] in, Indicates the t Gated features of time steps; Represents the sigmoid activation function; represents the gating weight matrix; Indicates the t The global dependency features of the time steps.
[0049] Multiply the gated feature and the local temporal feature element by element to obtain the first product;
[0050] Multiply the balance number of the gated feature about 1 by the global dependency feature to obtain the second product;
[0051] Add the first product and the second product to obtain the time series feature vector;
[0052] Multiply the temporal feature vector by the attention parameter matrix to obtain the third product;
[0053] Multiply the type feature representation and the attention parameter matrix by the balance number about 1 to obtain the fourth product;
[0054] Add the third product to the fourth product and pass the result through the LeakyReLU activation function to get the attention index;
[0055] Take the natural base as the base and the attention index as the exponent to perform power operation to get the attention component at any time step;
[0056] Divide the attention component of any time step by the sum of the attention components of all time steps to obtain the attention weight of the corresponding time step;
[0057] The product of the attention weight and the temporal feature vector in all time steps is summed to obtain the weighted behavior representation.
[0058] Furthermore, the constructed doctor-patient relationship knowledge graph is passed through the graph neural network to obtain path embedding including:
[0059] Construct a doctor-patient relationship knowledge graph consisting of an entity set, a relationship set, and a triple set. The entity set includes objects in the medical field, the relationship set includes the associations between entities, and the triple set includes multiple triplets, each of which represents the relationship between the head entity and the tail entity.
[0060] The entities and relationships in the doctor-patient relationship knowledge graph are passed through the graph neural network to obtain path embedding.
[0061] The weighted behavior representation and path embedding are input into the generative adversarial network to generate an optimized query vector. The discriminator is used to judge the generated query vector q Is it consistent with the real query vector q real Similarly, the discriminator loss function Expressed as:
[0062] ;
[0063] in, represents the probability of the discriminator's decision on the generated query vector, E represents the expectation, To generate a true query vector, semantic information is extracted from the patient's historical records (such as search keywords and consultation content), doctor's recommendations, or paths in the knowledge graph. This information is then converted into a vector representation using the BERT text embedding model or the GNN graph neural network. The resulting vector is then aggregated to represent the patient's true query intent. Adversarial training is used to optimize the generator and discriminator, ensuring that the generated query vector is as close to the true query vector as possible, laying the foundation for subsequent efficient retrieval.
[0064] S3: Use partially homomorphic encryption to encrypt the optimized query vector, and use hyperplane projection index to map the doctor feature vector and the encrypted optimized query vector to a low-dimensional space. Calculate the matching value between the mapped doctor feature vector and the optimized query vector, and sort the doctors according to the matching value to obtain a set of candidate recommended doctors.
[0065] Specifically, this step includes:
[0066] To balance data security and retrieval speed, this invention divides data into two tiers: core medical data and non-sensitive data. Partially homomorphic encryption (PHE) is used for core medical data (such as physician qualifications and patient consultation history) to ensure that the data remains encrypted during the calculation process, preventing information leakage. Lightweight encryption (such as hash indexes or fast decryption methods based on symmetric encryption) is used for non-sensitive data (such as physician consultation times and hospital addresses) to reduce computational overhead and improve query speed.
[0067] Assume that the doctor database D consists of N doctors. i The doctor feature vector of a doctor is expressed as: , Indicates the i The first doctor in the doctor's feature vector n elements; PHE encryption is performed on the highly sensitive information: ; Indicates PHE encryption;
[0068] Similarly, the optimized query vector is encrypted using a partially homomorphic encryption method to obtain an encrypted optimized query vector.
[0069] Although PHE ensures data security, its computational complexity is high. Especially when the doctor database is large, the query response time may be long. To solve this problem, the present invention introduces the hyperplane projection index (HPI), which maps the query from high dimension to low dimension through dimensionality reduction projection, making the computational complexity reduced from 100% to 100%. O ( N · M ) is reduced to O ( N / log N ), where N is the number of doctors in the doctor database and M is the feature dimension of each doctor.
[0070] The hyperplane projection index maps the doctor's feature vector and the encrypted optimized query vector to a low-dimensional space through the projection matrix. The calculation formula is:
[0071] , ;
[0072] in, Represents the low-dimensional i The doctor feature vector of the doctors; Represents a low-dimensional optimized query vector; W represents the projection matrix; T represents transpose; Indicates the i The doctor feature vector of the doctors; q Represents the optimized query vector.
[0073] Because different patients have different behavior patterns, some patients are more concerned about the doctor's appointment status, while others may be more concerned about the doctor's patient evaluation. In order to adapt to these different behavior patterns, this embodiment proposes to dynamically adjust the projection matrix W:
[0074] ;
[0075] ;
[0076] ;
[0077] in, represents the inter-class divergence across behavioral features, which is used to distinguish the features of different patient needs. is the mean of class k, is the overall mean, is the number of samples of category k. represents the intra-class divergence of the same patient's behavior (the closeness of similar behaviors); Indicates trace.
[0078] Transpose the mapped doctor feature vector and multiply it with the mapped optimized query vector to obtain the matching value;
[0079] Sort the doctors corresponding to the doctor feature vectors in descending order of matching values to obtain a set of candidate recommended doctors.
[0080] To balance data security and retrieval speed, data is divided into two tiers: core medical data and non-sensitive data, using partially homomorphic encryption and lightweight encryption, respectively. Hyperplane Projection Indexing (HPI) is used to map queries from high dimensions to low dimensions, reducing computational complexity. The projection matrix is dynamically adjusted based on patient behavior patterns to improve query efficiency.
[0081] S4: Analyze the patient's preferences from historical behavior data, and model the immediate needs based on the optimized query vector. Adjust the ranking of doctors in the candidate recommended doctor set based on preferences and immediate needs to obtain a doctor recommendation list.
[0082] This paper proposes a Memory-Augmented Ranking (MARS) algorithm that dynamically adjusts doctor rankings based on patient history and cross-patient recommendation strategies. This algorithm also leverages similar patient behaviors to optimize rankings when data is insufficient.
[0083] Memory-enhanced sorting is a sorting method that combines patients' long-term and short-term behaviors. Long-term memory refers to the patient's historical behavior patterns, reflecting their overall preferences; short-term memory refers to the patient's current search intentions, reflecting their immediate needs.
[0084] Specifically, this step includes:
[0085] Search the patient-doctor interaction records from historical behavioral data, including the doctors they interacted with and the time of interaction.
[0086] The preference is calculated based on the doctors that have interacted and the interaction time. The calculation formula is:
[0087] ;
[0088] in, Indicates patient p preferences; Indicates the first i Doctors you've interacted with; Indicates the i The interaction time of the doctors who have interacted with each other; Represents an interaction record; t Indicates the current time; represents the importance coefficient; Indicates the i The doctor feature vector of the doctors with whom the patient has interacted; such preferences are mainly determined by the interactions in the most recent period, while retaining certain historical information.
[0089] Calculate the immediate demand based on the optimized query vector and the most recent interaction records. The calculation formula is:
[0090] ;
[0091] in, Indicates patient p immediate needs; represents the fusion ratio; Indicates patient p The corresponding optimized query vector; Indicates patient p A collection of doctors you have recently interacted with; Indicates the j Physician feature vectors of the most recently interacted physicians; Indicates the j The weight of the doctor who has recently interacted; it can usually be calculated using the time decay of the recent interaction, by controlling the variable Controlling the time effects of short-term behavior:
[0092] ;
[0093] in, Indicates the j The interaction time of the doctors who have interacted with each other; Indicates the The interaction time of the doctors who have interacted.
[0094] Multiply the preference by the adaptive fusion weight, multiply the immediate demand by the equilibrium number of the adaptive fusion weight about 1, and add the two products to obtain the patient's doctor preference;
[0095] The adaptive fusion weights are adaptively adjusted by the number of historical behaviors of the patient:
[0096] ;
[0097] When the patient has more historical behaviors ,but , long-term preferences dominate; when patients have less historical behavior ,but , short-term preference dominates; is the threshold number of behaviors, Controls the switching rate.
[0098] Transposing the patient's doctor preference and the doctor weight matrix constructed by the weights of each doctor, and multiplying the transposed doctor preference and doctor weight matrix with the doctor's doctor feature vector to obtain a fifth product;
[0099] The sixth product is obtained by multiplying the tuning parameter by the memory enhancement term; the memory enhancement term is expressed as:
[0100] ;
[0101] in, Indicates patient To doctors preference memory; Indicates the h The weight of the doctor with whom the interaction took place; Indicates the h The doctor who has interacted with the first doctor in the candidate recommended doctor set i The cosine similarity between doctors who have interacted with each other;
[0102] Add the fifth product and the sixth product to obtain the final matching score;
[0103] The rankings of doctors in the candidate recommended doctor set are adjusted in descending order of the final matching scores to obtain a doctor recommendation list.
[0104] Leveraging historical patient behavior data, combined with long-term and short-term preferences, we dynamically adjust physician rankings through Memory-Augmented Sorting (MARS). When data is sparse, we introduce a cross-patient recommendation strategy that leverages data from similar patients to improve ranking and make recommendations more aligned with patient preferences.
[0105] In this embodiment, S4 also includes: when the interaction records are sparse, introducing a cross-patient recommendation strategy, calculating the similarity between the target patient and other patients, and using the doctor preferences of similar patients to update the target patient's doctor preferences, and calculating the second final matching score based on the updated doctor preferences; adjusting the ranking of doctors in the candidate recommended doctor set in descending order of the second final matching scores to obtain a doctor recommendation list. The formula for updating the doctor preferences of the target patient is:
[0106] ;
[0107] ;
[0108] in, Indicates the updated target patient p physician preferences; Indicates target patients p physician preferences; represents the weight, which determines the fusion ratio of the target patient and similar patients; Indicates target patients p Similar patient collections; Indicates target patients p With similar patients similarity between Indicates similar patients physician preferences; Represents a module; T Indicates transposition, using replace Sort doctors to make recommendation results more accurate.
[0109] In this embodiment, the method further includes:
[0110] After the ranked doctor recommendation list is created, it needs to be explainable to allow patients to more intuitively understand the reasons for the recommendation and increase their trust and acceptance of the recommendation results. Based on the doctor's structured information (matching score), text description (areas of expertise), and patient evaluations, a natural language recommendation explanation is generated. The generation of recommendation explanations can be viewed as a weighted fusion model:
[0111] ;
[0112] in, Indicates the u patients; Represents a natural language generation model; Indicates patient u With a doctor The final matching score.
[0113] The structured score includes the patient's preference weight for each dimension of the doctor's characteristics, including the doctor's field, geographical location, doctor's experience, etc. Use NLP to analyze the doctor's profile, Text information representing doctors (including areas of expertise, research directions, etc.) using BERT to extract core keywords:
[0114] ;
[0115] in, To obtain the contextual embedding of the doctor's text, Select the most important K keywords. Represents a patient review, using sentiment analysis to calculate sentiment scores:
[0116] ;
[0117] in, A doctor No. z The sentiment score of the review is calculated by LSTM and ranges from [-1, 1]. Z is the total number of reviews.
[0118] After the ranked doctor recommendation list, natural language recommendation explanations are generated based on the doctor's structured information, text descriptions and patient evaluations to improve the trust and acceptance of the recommendation results.
[0119] In this embodiment, the method further includes:
[0120] After receiving the doctor recommendation list, the patient will interact with the list. Interactions include clicking on the doctor's details page, making an appointment directly, browsing the list repeatedly without selecting a doctor, and exiting the page.
[0121] Based on the patient's interactive behavior with each doctor in the doctor recommendation list, the user feedback score is calculated as follows:
[0122] ;
[0123] in, Indicates the u Patient-to-doctor recommendation list C Middle d User feedback scores of doctors; Click on the doctor d Details page; Direct doctor appointment d ; Indicates repeated browsing but no doctor selection d ; Indicates jumping out of the doctor Pages; 、 、 、 Behavior 、 、 、 the importance of .
[0124] Based on patient behavioral feedback, the weights of doctor features are dynamically adjusted to make future search rankings more in line with patient preferences. If a feature has a greater impact on patient behavior, the weight of the corresponding doctor is updated based on the user feedback score. The update formula is:
[0125] ;
[0126] in, Indicates the updated a The weight of the doctor; Indicates the a The weight of the doctor; represents the learning rate; represents the number of patients; Indicates the u Patient-to-doctor recommendation list C Middle i User feedback scores of doctors; Indicates that in a given a The user feedback score is expected value.
[0127] Update the projection matrix based on the user feedback score. The update formula is:
[0128] ;
[0129] in, Represents the updated projection matrix; W represents the projection matrix; Indicates the update amplitude of the projection matrix; C Indicates a list of doctor recommendations; Indicates doctor recommendation list C Middle i The doctor feature vector of the doctors; T Indicates transpose.
[0130] Based on the patient's interactive behavior on the recommendation list, the weights and projection matrix of the doctor's features are dynamically adjusted to make future search rankings more in line with the patient's preferences and optimize the recommendation effect.
[0131] The doctor search and recommendation method based on multi-behavior time series modeling provided in this embodiment has the following beneficial effects: By analyzing a patient's behavioral sequences, such as search, consultation, and appointment booking, this method retrieves matching doctors from a doctor database, ultimately providing patients with personalized doctor recommendations. Specifically, it first uses a Generative Adversarial Network (GAN) and a doctor-patient relationship knowledge graph to generate an optimized query vector to clarify the patient's intent. Then, it uses hyperplane projection indexing (HPI) and partially homomorphic encryption (PHE) to map the high-dimensional optimized query vector into a low-dimensional space. The projected optimized query vector is then used to search the encrypted doctor database, screening for a set of candidate doctors that match the patient's intent and preferences. After screening the candidate doctors, the system uses memory-augmented ranking (MARS) combined with a cross-patient recommendation strategy to rank the candidate set. After returning the ranked recommendation results, a natural language explanation of the recommendations is generated based on the doctors' structured information, text descriptions, and patient reviews, enhancing the trust and acceptance of the recommendations. Finally, the doctor feature weights and projection matrix are adjusted based on patient behavioral feedback. This method aims to improve the accuracy and security of doctor retrieval while enhancing the patient's search experience, providing an efficient and intelligent doctor recommendation solution for the intelligent medical guidance platform.
[0132] The technical features of the above-mentioned embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above-mentioned embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0133] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present patent application shall be determined by the appended claims.
Claims
1. A doctor search and recommendation method based on multi-behavior time series modeling, characterized in that: include: S1: Obtain the patient's historical behavior data, real-time behavior data, and doctor data, perform feature extraction on the real-time behavior data and its timestamp to obtain a behavior feature vector and a time feature vector; perform a weighted combination of the behavior feature vector and the time feature vector to obtain a behavior embedding representation; perform feature extraction on the doctor data to obtain a doctor feature vector; S2: A Transformer-TCN hybrid architecture is used to model the behavior embedding representation to obtain a weighted behavior representation. The constructed doctor-patient relationship knowledge graph is passed through a graph neural network to obtain a path embedding. The weighted behavior representation and path embedding are input into a generative adversarial network to generate an optimized query vector. S3: Use partially homomorphic encryption to encrypt the optimized query vector, and use hyperplane projection indexing to map the doctor feature vector and the encrypted optimized query vector to a low-dimensional space. Calculate the matching value between the mapped doctor feature vector and the optimized query vector, and sort the doctors based on the matching value to obtain a set of candidate recommended doctors. S4: Analyze the patient's preferences from historical behavior data, and model the immediate needs based on the optimized query vector. Adjust the ranking of doctors in the candidate recommended doctor set based on preferences and immediate needs to obtain a doctor recommendation list, including: Search the patient-doctor interaction records from historical behavioral data, including the doctors they interacted with and the time of interaction. The preference is calculated based on the doctors that have interacted and the interaction time. The calculation formula is: ; in, Indicates patient p preferences; Indicates the first i Doctors you've interacted with; Indicates i The interaction time of the doctors who have interacted with each other; Represents an interaction record; t Indicates the current time; represents the importance coefficient; Indicates the i The doctor feature vector of the doctors with whom the patient has interacted; Calculate the immediate demand based on the optimized query vector and the most recent interaction records. The calculation formula is: ; in, Indicates patient p immediate needs; represents the fusion ratio; Indicates patient p The corresponding optimized query vector; Indicates patient p A collection of doctors you have recently interacted with; Indicates the j Physician feature vectors of the most recently interacted physicians; Indicates the j The weight of the most recently interacted doctor; Multiply the preference by the adaptive fusion weight, multiply the immediate demand by the equilibrium number of the adaptive fusion weight about 1, and add the two products to obtain the patient's doctor preference; Transposing the patient's doctor preference and the doctor weight matrix constructed by the weights of each doctor, and multiplying the transposed doctor preference and doctor weight matrix with the doctor's doctor feature vector to obtain a fifth product; The sixth product is obtained by multiplying the tuning parameter by the memory enhancement term; the memory enhancement term is expressed as: ; in, Indicates patient To doctors preference memory; Indicates the h The weight of the doctor with whom the interaction took place; Indicates the h The doctor who has interacted with the first doctor in the candidate recommended doctor set i The cosine similarity between doctors who have interacted with each other; Add the fifth product and the sixth product to obtain the final matching score; The rankings of doctors in the candidate recommended doctor set are adjusted in descending order of the final matching scores to obtain a doctor recommendation list.
2. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 1 is characterized in that: Feature extraction of real-time behavioral data includes: Convert the behavior type in the real-time behavior data into a one-hot encoding to obtain the type feature representation; Input the text content in the real-time behavioral data into the pre-trained BERT model to obtain text feature representation; Normalize the values in the real-time behavior data to obtain numerical feature representation; The type feature representation, text feature representation, and numerical feature representation at the same moment are concatenated to obtain the patient's behavioral feature vector.
3. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 1 is characterized in that: Feature extraction for timestamps includes: Parse the timestamp to extract year, month, day, and hour; Use numerical values to express years, months, and days; The hours are periodically encoded using sine-cosine coding; Use values 0-6 to represent the day of the week; The holiday code is represented by binary value, 0 is non-holiday, 1 is holiday; The time interval between the current behavior data and the previous behavior data is expressed as a numerical value; The numerically represented year, month, day, periodically coded hour, numerically represented week, holiday code, and numerically represented time interval are sequentially concatenated to obtain a time feature vector.
4. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 1 is characterized in that: The behavior embedding representation obtained by weighted combination of the behavior feature vector and the time feature vector includes: Multiplying the temporal feature vector by the temporal weight matrix and adding the resulting product to the first bias vector to obtain a temporal position code; The behavior feature vector is multiplied by the behavior weight matrix, and the resulting product is added to the temporal position encoding to obtain the behavior embedding representation.
5. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 2 is characterized in that: The Transformer-TCN hybrid architecture is used to model the behavior embedding representation, including: The TCN branch extracts local temporal features of behavior embedding representation through dilated causal convolution; The Transformer branch captures the global dependency features of the behavior embedding representation through a multi-head self-attention mechanism; The local temporal features and global dependency features are passed through a gating mechanism to output gated features; Multiply the gated feature and the local temporal feature element by element to obtain the first product; Multiply the balance number of the gated feature about 1 by the global dependency feature to obtain the second product; Add the first product and the second product to obtain the time series feature vector; Multiply the temporal feature vector by the attention parameter matrix to obtain the third product; Multiply the type feature representation and the attention parameter matrix by the balance number about 1 to obtain the fourth product; Add the third product to the fourth product and pass the result through the LeakyReLU activation function to get the attention index; Take the natural base as the base and the attention index as the exponent to perform power operation to get the attention component at any time step; Divide the attention component of any time step by the sum of the attention components of all time steps to obtain the attention weight of the corresponding time step; The product of the attention weight and the temporal feature vector in all time steps is summed to obtain the weighted behavior representation.
6. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 1 is characterized in that: The constructed doctor-patient relationship knowledge graph is passed through the graph neural network to obtain path embedding including: Construct a doctor-patient relationship knowledge graph consisting of an entity set, a relationship set, and a triple set. The entity set includes objects in the medical field, the relationship set includes the associations between entities, and the triple set includes multiple triplets, each of which represents the relationship between the head entity and the tail entity. The entities and relationships in the doctor-patient relationship knowledge graph are passed through the graph neural network to obtain path embedding.
7. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 1 is characterized in that: S3 includes: The optimized query vector is encrypted using a partially homomorphic encryption method to obtain an encrypted optimized query vector; The hyperplane projection index maps the doctor's feature vector and the encrypted optimized query vector to a low-dimensional space through the projection matrix; Transpose the mapped doctor feature vector and multiply it with the mapped optimized query vector to obtain the matching value; Sort the doctors corresponding to the doctor feature vectors in descending order of matching values to obtain a set of candidate recommended doctors.
8. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 1 is characterized in that: S4 also includes: when the interaction records are sparse, introducing a cross-patient recommendation strategy, calculating the similarity between the target patient and other patients, and using the doctor preferences of similar patients to update the target patient's doctor preferences, and calculating the second final matching score based on the updated doctor preferences; adjusting the ranking of doctors in the candidate recommended doctor set in descending order of the second final matching scores to obtain a doctor recommendation list.
9. The doctor search and recommendation method based on multi-behavior time series modeling according to claim 1, characterized in that: Also includes: After receiving the doctor's recommendation list, the patient will have interactive behavior; Interactions include clicking on the doctor's details page, directly making an appointment with the doctor, repeatedly browsing without selecting a doctor, and exiting the page; Calculate user feedback scores based on the patient's interaction with each doctor in the doctor recommendation list; Based on the user feedback score, the corresponding doctor's weight is updated. The update formula is: ; in, Indicates the updated a The weight of the doctor; Indicates the a The weight of the doctor; represents the learning rate; represents the number of patients; Indicates the u Patient-to-doctor recommendation list C Middle i User feedback scores of doctors; Indicates that in a given a The user feedback score is expected value; Update the projection matrix based on the user feedback score. The update formula is: ; in, Represents the updated projection matrix; W represents the projection matrix; Indicates the update amplitude of the projection matrix; C Indicates a list of doctor recommendations; Indicates a list of doctor recommendations C Middle i The doctor feature vector of the doctors; T Indicates transpose.
Citation Information
Patent Citations
Supply chain multidimensional data mining and intelligent recommendation decision-making method based on knowledge graph
CN119741038A
Method and device for search and recommendation
WO2015139457A1