Medical literature personalized recommendation method and system, terminal and medium
By improving the accuracy of medical literature recommendations through large language models and multimodal encoders, the problems of complex semantic associations and personalized recommendations in traditional solutions are solved, and dynamic capture of user interests and highly relevant recommendations are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-11
- Publication Date
- 2026-03-13
AI Technical Summary
Traditional medical literature recommendation schemes struggle to understand complex professional concepts and their deep semantic relationships. They are unable to make in-depth inferences and related recommendations based on the medical logical relationships between entities such as diseases, drugs, and genes, and they lack the ability to capture individual users' research interests and provide personalized recommendations.
We employ a large language model for semantic enhancement representation, generating optimized new titles and related entity sequences. We fuse text, entity, and category information through a multimodal encoder, construct user interest representations by combining an attention mechanism, generate a candidate document set based on user historical click sequences, and calculate recommendation relevance using cosine similarity.
It improves the accuracy and professionalism of medical literature recommendations, captures users' dynamic interests, balances the diversity and relevance of recommendations, and ensures that the recommendation results are highly relevant to users' interests.
Smart Images

Figure CN121658723A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of information recommendation, specifically to a method, system, terminal, and medium for personalized recommendation of medical literature. Background Technology
[0002] Researchers, clinicians, and other users often struggle to quickly and accurately find research findings highly relevant to their research interests within vast literature databases. Traditional literature recommendation schemes, typically based on keyword matching or simple text similarity, fail to grasp the complex professional concepts and deep semantic relationships within medical literature. Furthermore, existing collaborative filtering methods rely heavily on user group behavior patterns, making it difficult to capture the evolution of individual users' specific research interests. Additionally, they lack effective utilization of structured knowledge in the medical field, hindering deep reasoning and associative recommendations based on the logical relationships between entities such as diseases, drugs, and genes. Summary of the Invention
[0003] To address the aforementioned issues, this invention provides a method, system, terminal, and medium for personalized medical literature recommendation, which improves the accuracy and professionalism of medical literature recommendations, captures users' dynamic interests, and balances recommendation diversity and relevance.
[0004] In a first aspect, the technical solution of the present invention provides a method for personalized recommendation of medical literature, comprising the following steps: S1, Based on the target user's historical click sequence, a candidate document set is generated from the global medical literature database, wherein the historical click sequence consists of the document sequence that the user has interacted with; S2, for each candidate medical document in the candidate document set, and for each historical document that constitutes the user click sequence, semantic enhancement representation is performed through a large language model to generate an optimized new title and related entity sequence; S3, input the new title, entity sequence and subject category information of each document into a multimodal encoder to generate the final document representation vector of the document; the multimodal encoder fuses the text representation vector, entity representation vector and category embedding vector through an attention mechanism; S4. Construct a user interest representation based on all final document representation vectors corresponding to the historical click sequence; S5, calculate the correlation between the final document representation vector of each candidate medical document and the user interest representation, and map it to the probability of the target user's interest in the candidate medical document; S6: Sort all the documents in the candidate document set according to the probability of interest, and select the Top-N documents to recommend to the target user based on the topic category.
[0005] Secondly, the technical solution of the present invention provides a personalized medical literature recommendation system, comprising: The candidate document set generation module is used to retrieve and generate a candidate document set from the global medical literature database based on the target user's historical click sequence, wherein the historical click sequence consists of the document sequence that the user has interacted with; The new title and entity sequence optimization module is used to perform semantic enhancement on each candidate medical document in the candidate document set and each historical document that constitutes the user click sequence, respectively, through a large language model to generate an optimized new title and related entity sequence. The document representation vector generation module is used to input the new title, entity sequence, and subject category information of each document into a multimodal encoder to generate the final document representation vector of the document; the multimodal encoder fuses the text representation vector, entity representation vector, and category embedding vector through an attention mechanism; The user interest representation construction module is used to construct user interest representations based on all the final document representation vectors corresponding to the historical click sequence. The interest probability generation module is used to calculate the correlation between the final document representation vector of each candidate medical document and the user interest representation, and map it to the target user's interest probability of that candidate medical document. The recommended literature filtering module is used to sort all the literature in the candidate literature set according to the probability of interest, and select the top-N literatures to recommend to the target user based on the topic category.
[0006] Thirdly, the technical solution of the present invention provides a terminal, comprising: Memory, used to store personalized recommendation programs for medical literature; A processor is configured to implement the steps of the medical literature personalized recommendation method as described above when executing the medical literature personalized recommendation program.
[0007] Fourthly, the present invention provides a computer-readable storage medium storing a personalized medical literature recommendation program, wherein the personalized medical literature recommendation program, when executed by a processor, implements the steps of the personalized medical literature recommendation method as described in any of the above claims.
[0008] As can be seen from the above technical solutions, this application has the following advantages: First, it enhances the semantics of the original document through a large language model, generating a new title with richer information, improving the quality of document content representation, and extracting key medical entities to provide structured information, facilitating deep semantic analysis. It also employs a multimodal encoder to fuse text, entity, and category information, generating highly accurate document representation vectors. Furthermore, it constructs dynamic user interest representations based on sequence models and attention mechanisms to capture the evolution trend and focus of user interests. Additionally, it utilizes… (1) This application generates a candidate set based on the user’s historical click sequence. The historical click sequence consists of the documents that the user has interacted with, which are directly related to the user’s past research interests and focus. This ensures the initial association between the candidate documents and the user’s interests, avoids indiscriminate screening due to detachment from the user’s actual interaction behavior, and improves the screening accuracy. (2) This application uses a large language model to perform semantic enhancement representation on candidate documents and historical documents, generating optimized new titles and related entity sequences. Compared with the original document titles and content, the new titles can more accurately extract the core research direction of the documents, and the related entity sequences can clearly identify the key medical elements involved in the documents, solving the problem of ambiguous representation of medical professional information, and making the semantic information of the documents more in line with the user's cognitive logic of medical knowledge. (3) This application integrates the new title, entity sequence and topic category information of the document through a multimodal encoder, and dynamically adjusts the weight of information in different dimensions by means of attention mechanism, so as to improve the comprehensiveness and completeness of the final generated document representation vector; (4) This application constructs a user interest representation based on the final document representation vector corresponding to the user's historical click sequence, and combines it with the optimized document representation vector to improve the accuracy of personalized interest feature characterization. Attached Figure Description
[0009] To more clearly illustrate the technical solution of this application, the accompanying drawings used in the description will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0010] Figure 1 This is a schematic diagram of a personalized medical literature recommendation method provided in an embodiment of the present invention.
[0011] Figure 2 This is a schematic block diagram of a personalized medical literature recommendation system provided in an embodiment of the present invention.
[0012] Figure 3 This is a schematic diagram of the structure of a terminal provided in an embodiment of the present invention. Detailed Implementation
[0013] To make the purpose, features, and advantages of this application more apparent and understandable, specific embodiments and accompanying drawings will be used to clearly and completely describe the technical solution protected by this application. Obviously, the embodiments described below are only some embodiments of this application, and not all embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0014] Unless otherwise defined, all technical and scientific terms used in this application have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this application and in the specification of this invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0015] Figure 1 This is a schematic flowchart of a personalized medical literature recommendation method provided by an embodiment of the present invention. Figure 1 The executing entity can be a personalized medical literature recommendation system. The personalized medical literature recommendation method provided in this embodiment of the invention is executed by a computer device, and correspondingly, the personalized medical literature recommendation system runs on the computer device. Depending on different needs, the order of the steps in this flowchart can be changed, and some steps can be omitted.
[0016] like Figure 1 As shown, the method includes the following steps.
[0017] S1, Based on the target user's historical click sequence, a candidate document set is generated from the global medical literature database, wherein the historical click sequence consists of the document sequence that the user has interacted with.
[0018] This step generates a candidate document set based on the user's historical click information, and specifically includes the following steps.
[0019] S11: For each historical document in the user's historical click sequence, the first target medical entity contained in the document content is extracted through medical named entity recognition, and all extracted entities are deduplicated to generate an initial set of user interest entities.
[0020] For each historical document in the user's click history sequence, key medical entities are extracted from the document content using medical named entity recognition technology. Specifically, the title and abstract text of each historical document are used as input. For example, for a document about "metformin treatment of type 2 diabetes," the input text includes the title "Metformin in the Treatment of Type 2 Diabetes" and the abstract content. Then, a deep learning-based medical named entity recognition model is used for entity extraction. An optional implementation uses a pre-trained model based on the BERT architecture, specifically the BioBERT medical domain pre-trained model. This model segments and encodes the input text to generate a sequence of word vectors; obtains context-related word representations through a multi-layer Transformer encoder; and identifies entity boundaries and types using the BIO annotation scheme in the linear classification layer. The output entity types can include diseases, drugs, genes, proteins, anatomical locations, etc. Afterward, the entities extracted from all historical documents are deduplicated and normalized to generate an initial set of user interest entities.
[0021] The existing BioBERT model is used as the feature extractor. This model is obtained by domain-adaptive pre-training the original BERT model on large-scale biomedical texts such as PubMed summaries and PMC full-text articles. The specific process of domain-adaptive pre-training includes: Data collection: Acquiring large-scale biomedical text corpora, such as PubMed abstracts and PMC full-text articles; Preprocessing: The above biomedical text undergoes standardized preprocessing such as sentence segmentation and word segmentation; Pre-training task: The same pre-training objectives as the original BERT model are adopted, namely masked language model and next sentence prediction task, and continuous pre-training is performed on the collected biomedical corpus. Masked language model: Randomly mask some words in the input sequence, train the model to predict the masked words based on the context, and enable the model to learn the terminology and contextual semantics specific to the biomedical field; Next sentence prediction: The training model determines whether two sentences appear consecutively in the original text in order to learn the logical relationships between sentences in biomedical literature; Model output: After pre-training, the model has acquired the ability to represent the deep semantics of biomedical texts.
[0022] To accomplish specific medical entity recognition tasks, downstream task fine-tuning is required based on the pre-trained model. This includes adding a task-specific layer for sequence labeling on top of the BioBERT model output, performing end-to-end supervised training of the entire model using a labeled medical entity recognition dataset, and optimizing model parameters by maximizing the likelihood probability of correct entity label sequences.
[0023] The model obtained through the above process can be used to identify and extract the first target medical entity and the second target medical entity from the title and abstract of medical literature.
[0024] S12, starting with each entity in the initial set of user interest entities, traverse the pre-defined medical semantic relationship path along the pre-constructed medical knowledge graph in one or more hops to obtain extended entities that are directly or indirectly related to the user interest entities, and merge the extended entities with the user interest entities to generate a comprehensive entity set; the medical semantic relationship path includes one or more of the following: hierarchical relationship, treatment relationship, pathogenic relationship, positional relationship and gene association relationship.
[0025] This embodiment uses UMLS (Unified Medical Language System) or MeSH (Medical Subject Headings) as a foundation to construct a knowledge graph containing medical concepts and their relationships. Nodes in the graph represent medical entities, and edges represent semantic relationships between entities.
[0026] Predefined medical semantic relationship paths include: hyponymy / hypernymy, treatment, pathogenesis, location, and gene association.
[0027] For each entity in the user's interest entity set, perform a one-hop or multi-hop traversal on the knowledge graph. For example, starting with "type 2 diabetes": a one-hop traversal can obtain related entities such as "diabetes" and "insulin", and a two-hop traversal can further obtain indirectly related entities such as "hypoglycemia" through "insulin".
[0028] The expanded set of all entities is merged with the initial set of user interest entities, and duplicate entities are removed to generate a comprehensive entity set.
[0029] S13. Based on the pre-built entity-document association index, calculate the association strength score between documents in the global document library and the comprehensive entity set. Based on the association strength score, select a number of documents with scores exceeding a preset threshold or the highest ranking. Exclude documents that are the same as documents in the historical click sequence from these documents, and finally form a candidate document set. The entity-document inverted index records the mapping relationship between each medical entity and the document set that contains or is associated with that entity.
[0030] The entity-document inverted index records the mapping relationship between each medical entity and the collection of documents that contain or are associated with that entity. The index is constructed by extracting medical entities from the title, abstract, and keywords of each document in the global medical literature database, establishing a mapping from each entity to related documents, and recording the location and frequency information of the entity in the documents.
[0031] For each document in the global document database, calculate its association strength score with the comprehensive entity set. The calculation formula is as follows: The association strength score between the document and the comprehensive entity set = the sum of (the weight of each entity in the comprehensive entity set × the term frequency of the entity in the document - the inverse document frequency value × the inverse document frequency of the entity).
[0032] An optional implementation involves computing one or more graph-theoretic centrality metrics for each entity (node) in the knowledge graph to quantify its importance within the overall medical knowledge network. Optional metrics include: Degree centrality: The number of other entities that are directly connected to this entity; Betweenness centrality: measures the degree to which an entity acts as a "bridge" connecting other different groups of entities; Eigenvector centrality: measures whether an entity is connected to many other important entities.
[0033] The calculated centrality scores are normalized and mapped to a preset weight range to obtain the final weight for each entity.
[0034] Finally, the documents are sorted according to their relevance scores. The top M documents with scores exceeding a preset threshold or the highest ranking are selected, and documents already existing in the user's historical click sequence are excluded from these documents, thus forming a candidate document set.
[0035] This embodiment utilizes multi-hop association expansion of knowledge graphs to discover valuable literature that is indirectly related to user interests, thereby improving recall. Furthermore, based on medical logic-based association reasoning, it ensures that the search results have genuine medical relevance to user interests.
[0036] S2, for each candidate medical document in the candidate document set, and for each historical document constituting the user click sequence, performs semantic enhancement representation through a large language model to generate an optimized new title and related entity sequence.
[0037] This step involves semantic enhancement of candidate medical and historical documents to generate new titles and related entity sequences, specifically including the following steps.
[0038] S21, For each candidate medical article in the candidate literature set, perform the following steps.
[0039] S211: Input the original title and abstract text of the candidate medical literature as initial content into the large language model, and generate a preliminary abstract of the literature through the first prompt template instruction.
[0040] Select the original title and abstract text of the candidate medical literature as the initial input. The original title must fully retain the core research object, method or conclusion of the literature, and remove redundant non-core content such as acknowledgments and funding project annotations in the abstract.
[0041] We employ large language models that have been fine-tuned with medical corpora, such as the GPT-4 model fine-tuned based on the PubMedCentral literature corpus. The model has 175 billion parameters. The medical corpus used for fine-tuning covers 12 sub-disciplines, including internal medicine, surgery, and pharmacology, with a total corpus of no less than 5 million articles.
[0042] Use the first prompt template instruction. The template format is: "Based on the original title and abstract of the following medical literature, generate a preliminary abstract of no more than 300 words. Requirements: 1. Fully retain the research subjects, intervention measures (or research methods), core results, and key conclusions; 2. Use medical professional terminology and avoid colloquial expressions; 3. The logical order is 'research objective - research methods - research results - research conclusions'. Original title: [candidate literature original title]; Original abstract: [candidate literature original abstract]."
[0043] Substitute the prepared initial input into the first prompt template, and generate a preliminary summary through reasoning using a large language model.
[0044] S212, identify and extract the second target medical entity from the initial content of the candidate medical document through medical named entity recognition, and form the entity sequence of the document.
[0045] Referring to step S1 above, the candidate medical documents are processed using a pre-trained entity recognition model to generate the second target medical entity.
[0046] S213, combine the preliminary abstract of the document with the entity sequence and input them into the large language model, and generate its optimized new title through the second prompt template.
[0047] Use the preliminary summary generated in S211 and the entity sequence constructed in S212 as joint input, where the entity sequence must be labeled in the format of "entity type: entity text".
[0048] Using the same medical domain fine-tuning large language model as S211, the second prompt template instruction format is: "Please generate an optimized new title based on the preliminary abstract and entity sequence of the following medical literature. Requirements: 1. Include core entities (disease, intervention, key test indicators); 2. Clearly reflect the core conclusions or research type; 3. The title length should be controlled between 20-50 characters, conforming to the medical literature title specifications; 4. Avoid redundant modifiers. Preliminary abstract: [Preliminary abstract generated by S211]; Entity sequence: [Entity sequence constructed by S212 (including type annotation)]."
[0049] Substitute the combined input into the second prompt template, and generate a new title through large language model reasoning. For example, for the example literature above, the generated optimized new title is: "Study on the reduction of HbA1c and safety of metformin hydrochloride combined with SGLT2 inhibitor in the treatment of type 2 diabetes". Compared with the original title, this title adds the key test indicator "HbA1c" and the core research direction "safety".
[0050] S22, For each historical document that constitutes the user's click sequence, perform the following steps.
[0051] S221: Input the original title and abstract text of the historical document as the initial content into the large language model, and generate a preliminary abstract of the document through the first prompt template instruction.
[0052] This step is the same as S211, and will not be repeated here.
[0053] S222, the preliminary abstract of the document is combined with the entity sequence formed by the first target medical entity and input into the large language model, and the optimized new title is generated through the second prompt target.
[0054] The preliminary abstract generated in S221 and the "first target medical entity sequence" are used as joint inputs. The first target medical entity sequence is the entity sequence extracted and deduplicated from historical documents using the NER model in step S1. Using the same medical domain fine-tuning large language model and second prompt template as in S213, the joint input is substituted into the second prompt template to generate an optimized new title.
[0055] S3, input the new title, entity sequence and subject category information of each document into a multimodal encoder to generate the final document representation vector of the document; the multimodal encoder fuses the text representation vector, entity representation vector and category embedding vector through an attention mechanism.
[0056] This step is used to generate bibliographic representation vectors for candidate and historical documents, and specifically includes the following steps.
[0057] S31, the new title is treated as a sequence of several word elements. Each word element is mapped to a dense vector through a word embedding layer to obtain a word embedding vector sequence. The word embedding vector sequence is then input into a convolutional neural network to capture local contextual features and output a context-aware word representation sequence. At the same time, the word representation sequence is weighted and aggregated through an attention mechanism to obtain a text representation vector.
[0058] This step, for the optimized new title of the document, uses a three-level processing of "word embedding - local feature capture - attention weighted aggregation" to generate a text representation vector that reflects the semantic core of the text. The specific process is as follows.
[0059] S311, taking the newly optimized title of the document generated in step S2 as the processing object, the word segmentation tool specifically for the medical field is used for word segmentation.
[0060] S312: A pre-trained medical domain word embedding model is used to construct the word embedding layer. The word vector dimension of this model is set to 300 dimensions, covering the vocabulary of common medical diseases, drugs, and test indicators. The above effective word sequence is input into the word embedding layer, and each word is mapped to a 300-dimensional dense vector, forming a word embedding vector sequence.
[0061] S313 uses a convolutional neural network to capture local contextual features.
[0062] A CNN architecture with single convolutional and pooling layers is adopted. The convolutional layer has three different sizes of convolutional kernels, each with 128 kernels and 128 output channels. The activation function is ReLU. The pooling layer uses max pooling with a pooling window size of 2 and a stride of 1.
[0063] The word embedding vector sequence is input into the CNN convolutional layer. Three convolutional kernels of different sizes perform local sliding convolution on the word sequence: a convolutional kernel with a window size of 2 captures the local association between two adjacent words, a convolutional kernel with a window size of 3 captures the local association between three adjacent words, and a convolutional kernel with a window size of 4 captures the local association between four adjacent words. Each convolutional kernel outputs 128 feature maps. After max pooling, each convolutional kernel outputs a 128-dimensional local feature vector. The output vectors of the three convolutional kernels are concatenated to obtain a local context feature vector with a dimension of
[384] .
[0064] S314, attention mechanism weighted aggregation to generate text representation vector.
[0065] The self-attention mechanism is constructed by taking the local context feature vector output by the CNN as input, and calculating the attention weight for each local feature dimension using the following formula:
[0066] in, Let be the vector of the i-th local feature dimension. It is the mean vector of the local context feature vectors. The dot product similarity calculation function is denoted by n, which is the dimension of the local feature vector (384). After weight calculation, 384 weight coefficients are obtained, which represent the importance of the corresponding local feature dimension in the text semantics.
[0067] The local context feature vector is weighted and summed with the corresponding attention weight to obtain a text representation vector of dimension
[384] . This vector integrates the core semantic information of the new title with the local context association features.
[0068] S32 treats the entity sequence as a sequence of several entities, maps each entity to a dense vector through the entity embedding layer, and obtains the entity embedding vector sequence; then inputs the entity embedding vector sequence into the self-attention layer to model the intrinsic dependencies between entities, and obtains the enhanced entity representation sequence. The enhanced entity representation sequence is then weighted and aggregated through the attention mechanism to obtain the entity representation vector.
[0069] S321 adopts an entity embedding model based on a pre-trained medical knowledge graph. This model uses a pre-constructed medical knowledge graph as training data, and the entity embedding vector dimension is set to 256 dimensions to ensure that entities with the same semantics are close in distance in the vector space.
[0070] S322, the entity sequence extracted in step S2 is input into the entity embedding layer, and each entity is mapped to a 256-dimensional dense vector to form an entity embedding vector sequence.
[0071] S323 employs a single-head self-attention layer, with the input being a sequence of entity embedding vectors. The number of attention heads is set to 1, the hidden layer dimension is set to 256, and the activation function is the Softmax function. The self-attention layer models the dependencies between entities by calculating the similarity between entities.
[0072] S324 calculates the attention weights of each entity and all other entities through a self-attention layer, and updates the entity embedding vectors based on the weights to obtain an enhanced entity representation sequence that incorporates medical logical association information between entities.
[0073] S325, construct an entity-level attention mechanism. The input is the enhanced entity representation sequence [m, 256]. Calculate the weight coefficient of each entity: First, perform mean pooling on the representation vector of each entity to obtain the global mean vector of the entity sequence; then calculate the similarity between each entity vector and the global mean vector through dot product similarity, and obtain m weight coefficients after Softmax normalization.
[0074] S326, the enhanced entity representation sequence is weighted and summed with the corresponding weight coefficients to obtain an entity representation vector of dimension
[256] . This vector comprehensively reflects the core entity information and inter-entity association features of the entity sequence.
[0075] S33 maps the subject category information of the documents into a dense category embedding vector through a lookup table.
[0076] Based on the subject category information of the documents, category embedding vectors are generated by mapping through a lookup table, which includes the following steps.
[0077] S331, Construct a subject category system for medical literature based on the medical subject thesaurus.
[0078] First-level categories: covering 10 first-level disciplines including internal medicine, surgery, obstetrics and gynecology, oncology, and imaging medicine; Secondary categories: Each primary category is further subdivided into several secondary categories; Third-level categories: Each second-level category is further subdivided into specific research directions.
[0079] A unique category ID is assigned to each third-level topic category. A category embedding lookup table is constructed, with each row in the table corresponding to a category ID and storing the embedding vector of that category. The vector dimension is set to 128 dimensions. The initial value of the lookup table is generated through random initialization and is subsequently updated synchronously with the training process of the multimodal encoder to ensure that semantically similar categories are close in distance in the vector space.
[0080] S332, input the category ID corresponding to the subject category of the document to be processed into the category embedding lookup table. The lookup table outputs the corresponding 128-dimensional dense vector based on the category ID, which is the category embedding vector of the document.
[0081] S34. The text representation vector, entity representation vector and category embedding vector are concatenated to obtain a hybrid feature vector. The attention mechanism is used to weight and fuse the different modal components in the hybrid feature vector to obtain the final document representation vector.
[0082] S341, the text representation vector generated in step S31, the entity representation vector generated in step S32, and the category embedding vector generated in step S33 are concatenated in sequence to obtain the hybrid feature vector.
[0083] S342 constructs a multimodal attention mechanism. The input is a mixed feature vector, which is then split into three sub-vectors according to its source. Text sub-vectors: the first 384 dimensions of the mixed feature vector (text representation vector); Entity sub-vectors: corresponding to the 385-640 dimensions (256 dimensions, entity representation vector) of the mixed feature vectors; Category sub-vectors: corresponding to the 641-768 dimensions of the mixed feature vector (128 dimensions, category embedding vectors). Calculate the attention weights for each sub-vector: First, calculate the mean of each of the three sub-vectors to obtain the global vector for each modality; then, calculate the importance score of the global vector for each modality using a multilayer perceptron, and obtain the attention weights for the three modalities after Softmax normalization.
[0084] The sub-vectors of the three modalities are multiplied by their corresponding attention weights to obtain weighted sub-vectors; the weighted sub-vectors are summed again to obtain the final document representation vector with dimension
[768] ; this vector integrates three key information types of documents: textual semantics, core entities, and topic categories, and highlights the features that are more important to the document representation in each modality through the attention mechanism.
[0085] S4: Construct a user interest representation based on all final document representation vectors corresponding to the historical click sequence.
[0086] S41. Obtain the final document representation vectors corresponding to all documents in the user's historical click sequence, and arrange them in order of interaction time to form a sequence of user document representation vectors.
[0087] Extract the target user's historical click sequence from the user interaction log. This sequence consists of medical documents that the user has interacted with within a preset time window, arranged in chronological order of interaction time.
[0088] During preprocessing, invalid interaction records are removed, including: documents where the user stays for less than 3 seconds after clicking, and documents clicked due to accidental operation.
[0089] Retrieve the final document representation vector corresponding to each historical document generated in step S3, and establish a one-to-one mapping relationship between the two through the unique document identifier.
[0090] The final document representation vectors after matching are arranged sequentially according to the time sequence of historical clicks to form a sequence of user document representation vectors.
[0091] S42, the sequence of user document representation vectors is input into a pre-trained sequence model, which is a recurrent neural network. The network processes each document representation vector sequentially, and outputs a vector that comprehensively represents the user's dynamic interests by passing and accumulating historical information through its internal hidden states.
[0092] A recurrent neural network (RNN) is used to process the time-series vector sequence. The accumulated historical interest information is passed through the internal hidden state to generate a vector that comprehensively represents the user's dynamic interest.
[0093] A Long Short-Term Memory (LSTM) network is used as the sequence model. The model structure includes an input layer, an LSTM hidden layer, and an output layer. The specific parameter configuration is as follows: Input layer: Receives a single document representation vector from the historical click sequence, with an input dimension of 768; LSTM hidden layer: Set 1 hidden layer with 256 hidden units, use tanh as the activation function, and use sigmoid as the activation function for forget gate, input gate, and output gate. Set the dropout probability to 0.2. Output layer: Outputs the final hidden state vector of the LSTM hidden layer, with the same dimension as the number of hidden units, which is 256 dimensions.
[0094] The LSTM model needs to be pre-trained using a user interaction dataset in the medical field: the training dataset contains the historical click vector sequence of at least 100,000 users and the corresponding "next click document vector". The objective is to "predict the document vector of the user's next interaction". The mean squared error (MSE) is used as the loss function. The model is iteratively trained using the Adam optimizer until the loss function converges, and the trained model parameters are saved.
[0095] S43. An attention mechanism is used to process the sequence of user document representation vectors. A weight coefficient is calculated for each document representation vector in the sequence. The weight coefficient represents the importance of the corresponding historical document in constructing the current user interest representation. Based on the weight coefficient, all document representation vectors are weighted and summed to obtain the user interest summary representation vector.
[0096] An attention calculation module is constructed based on the "document vector - interest query vector". The importance of each historical document to the current user's interest is measured by similarity. A dynamic interest vector is defined as the query vector. For each final document representation vector in the historical click sequence, its dimension is first mapped from 768 dimensions to 256 dimensions through a linear transformation layer. Then, the similarity score between the 256-dimensional final document representation vector and the query vector is calculated using the dot product formula. The Softmax function is used to normalize all similarity scores to obtain the weight coefficient of each historical document.
[0097] For each final document representation vector in the historical click sequence, a weighted sum is performed based on the weight coefficients to obtain a user interest summary representation vector.
[0098] S44 concatenates the vector comprehensively representing the user's dynamic interests with the user interest summary representation vector, and then performs linear transformation and nonlinear activation through a fully connected layer to generate the final user interest representation vector.
[0099] The vector comprehensively representing the user's dynamic interests is concatenated with the user interest summary representation vector along the dimensional direction to obtain the hybrid interest vector. The fully connected layer performs linear transformation and nonlinear activation on the hybrid interest vector, and outputs a vector with a dimension of 256, which is the final user interest representation vector.
[0100] S5 calculates the correlation between the final document representation vector of each candidate medical document and the user interest representation, and maps it to the probability of the target user's interest in the candidate medical document.
[0101] S51, For each candidate medical document, the cosine similarity method is used to calculate the similarity between its final document representation vector and the user interest representation vector, and the similarity is used as the relevance score.
[0102] Retrieve the final document representation vector corresponding to the candidate medical documents generated in step S3. Each candidate medical document corresponds to a unique vector, and the vector dimension is consistent with the preset dimension in step S34, i.e., 768 dimensions; and the final interest representation vector of the target user generated in step S4. The dimension of this vector is consistent with the preset dimension in step S44, i.e., 256 dimensions.
[0103] Perform compliance checks on the two types of vectors: check if the vectors have problems such as missing dimensions or abnormal values. If the above problems exist, re-execute the corresponding step S3 or step S4 to generate a vector that meets the requirements.
[0104] Since the final document representation vector (768 dimensions) of the candidate medical documents has different dimensions from the user interest representation vector (256 dimensions), similarity cannot be calculated directly. Therefore, a linear transformation is needed to map the final document representation vector of the candidate medical documents to a dimension space consistent with the user interest representation vector.
[0105] Specifically, a linear transformation matrix is constructed with dimensions of 768 rows × 256 columns. The matrix parameters need to be trained in advance along with the multimodal encoder. The training process aims to minimize the matching error between the candidate document vector and the user interest vector. The matrix parameters are iteratively updated through the Adam optimizer until the training loss converges, ensuring that the transformation rules are adapted to the matching scenario between medical documents and user interests.
[0106] The final document representation vector of each candidate medical document is multiplied by the linear transformation matrix to obtain a candidate document vector with unified dimensions (256 dimensions). This vector is placed in the same vector space as the user interest representation vector, eliminating the interference of dimensional differences on similarity calculation.
[0107] The cosine similarity formula is used to calculate the similarity between the candidate document vector and the user interest representation vector after unifying the dimensions. This formula quantifies the consistency of the vector direction by measuring the cosine value of the angle between the two vectors. That is, the smaller the angle and the larger the cosine value, the higher the correlation between the candidate document and the user's interest; conversely, the larger the angle and the smaller the cosine value, the lower the correlation.
[0108] The relevance score ranges from -1 to 1. The closer the value is to 1, the higher the relevance between the candidate document and the user's interests; the closer the value is to -1, the lower the relevance; when the value is close to 0, it means that the candidate document is basically unrelated to the user's interests.
[0109] S52, the relevance score of the current candidate document is normalized with the relevance scores of all other candidate documents in the candidate document set using the Softmax function, so as to obtain the relative probability of interest of the candidate document relative to other candidate documents.
[0110] Traverse all candidate medical documents in the candidate document set, collect the relevance score of each candidate medical document calculated in step S51, and form a relevance score set containing M elements, where each element corresponds to the relevance score of a candidate medical document.
[0111] For each relevance score in the constructed relevance score set, the Softmax function is used to normalize it, converting it into a probability value in the range of 0 to 1. The sum of the probability values of all candidate medical documents is 1. This probability value is the relative probability of the target user's interest in the corresponding candidate medical document.
[0112] In the specific calculation, to avoid overflow of the exponential operation due to excessively large correlation scores, the maximum value in the correlation score set is first found, and the maximum value is subtracted from each correlation score in the set to obtain the adjusted correlation score. Then, the exponential operation is performed on each adjusted correlation score. Finally, each exponential operation result is divided by the sum of all exponential operation results to obtain the corresponding relative probability of interest.
[0113] S6: Sort all the documents in the candidate document set according to the probability of interest, and select the Top-N documents to recommend to the target user based on the topic category.
[0114] S61, sort all candidate medical literature in the candidate literature set in descending order according to their corresponding probability of interest values, and generate a recommended candidate list.
[0115] Retrieve the relative probability of interest for each candidate medical article generated in step S52, and establish a one-to-one correspondence between "candidate article - relative probability of interest" using the unique identifier of the article. Sort all candidate medical articles in descending order based on the value of the relative probability of interest, that is, the candidate article with the higher the value of the relative probability of interest, the higher the ranking in the list; the candidate article with the lower the value of the relative probability of interest, the lower the ranking.
[0116] S62, iterate through the recommended candidate list and count the frequency of each topic category.
[0117] First, extract the topic category information corresponding to each candidate medical article in the recommended candidate list. This information is consistent with the medical literature topic category system used in step S33, namely a three-level category system: the first-level category is the major discipline category, the second-level category is the sub-discipline of the discipline, and the third-level category is the specific research direction.
[0118] Subsequently, the extracted topic category information was standardized: literature with incomplete or incorrect category labeling was removed, incompletely labeled literature was re-executed in step S33 to supplement the labeling, and the category of incorrectly labeled literature was corrected.
[0119] Construct a frequency statistics table with columns for "Topic Category," "Number of Occurrences," and "Percentage in the List." Iterate through the recommended candidate list and count the number of occurrences for each topic category. Calculate the percentage of each topic category's occurrences relative to the total number of candidate documents: Percentage = Number of Occurrences in that Category / Total Number of Candidate Documents × 100%. Enter this percentage into the "Percentage in the List" column to complete the frequency statistics for all topic categories.
[0120] S63, identify the topic categories that appear more frequently than a preset threshold and mark them as excessive categories.
[0121] S64. For each excess category, retain the top K documents with the highest probability of interest in the ordered list.
[0122] S65 moves the unrepresentative documents that were not retained in each excess category from their original position in the ordered list to the end of the list.
[0123] A threshold for the frequency of topic categories is pre-defined. The frequency statistics table is iterated through, and topic categories appearing more frequently than the threshold are marked as excessive categories. For each excessive category, all candidate documents under that category are extracted from the initial recommendation candidate list, maintaining their relative order in the original list. The top K documents with the highest relative probability of interest are selected as representative documents for that category. The remaining documents not selected as representative documents are marked as non-representative documents and temporarily stored for later adjustment. The initial recommendation candidate list is then iterated through, and all non-representative documents under excessive categories are moved from their current position to the end of the list, maintaining their relative order during the movement. The positions of documents in other non-excessive categories and the representative documents of excessive categories remain unchanged, forming the adjusted recommendation candidate list.
[0124] S66: From the adjusted ordered list, select the top N articles to form the final personalized recommendation list.
[0125] The number of recommended documents N is preset, and the top N documents are selected from the adjusted list of recommended candidates in order of ranking to form the final personalized recommendation list.
[0126] The above text provides a detailed description of an embodiment of a personalized medical literature recommendation method. Based on the personalized medical literature recommendation method described in the above embodiment, this invention also provides a personalized medical literature recommendation system corresponding to the method.
[0127] Figure 2 This is a schematic block diagram of a personalized medical literature recommendation system provided in an embodiment of the present invention. In this embodiment, the personalized medical literature recommendation system 200 can be divided into multiple functional modules according to its functions, such as... Figure 2 As shown. The module referred to in this invention is a series of computer program segments that can be executed by at least one processor and perform a fixed function, and which are stored in memory.
[0128] The candidate document set generation module 210 is used to retrieve and generate a candidate document set from the global medical literature database based on the target user's historical click sequence, wherein the historical click sequence consists of the document sequence that the user has interacted with.
[0129] The new title and entity sequence optimization module 220 is used to perform semantic enhancement representation on each candidate medical document in the candidate document set and each historical document that constitutes the user click sequence through a large language model, and generate an optimized new title and related entity sequence.
[0130] The document representation vector generation module 230 is used to input the new title, entity sequence and subject category information of each document into a multimodal encoder to generate the final document representation vector of the document; the multimodal encoder fuses the text representation vector, entity representation vector and category embedding vector through an attention mechanism.
[0131] User interest representation construction module 240 is used to construct user interest representations based on all final document representation vectors corresponding to historical click sequences.
[0132] The interest probability generation module 250 is used to calculate the correlation between the final document representation vector of each candidate medical document and the user interest representation, and map it to the target user's interest probability of that candidate medical document.
[0133] The recommended literature filtering module 260 is used to sort all the literature in the candidate literature set according to the probability of interest, and select the top-N literatures to recommend to the target user based on the topic category.
[0134] The personalized medical literature recommendation system of this embodiment is used to implement the aforementioned personalized medical literature recommendation method. Therefore, the specific implementation of this system can be found in the embodiment section of the personalized medical literature recommendation method above. Thus, the specific implementation can be referred to the description of the corresponding embodiments, and will not be elaborated here.
[0135] Furthermore, since the personalized medical literature recommendation system in this embodiment is used to implement the aforementioned personalized medical literature recommendation method, its function corresponds to the function of the above method, and will not be repeated here.
[0136] Figure 3 This is a schematic diagram of a terminal 300 provided in an embodiment of the present invention, including: a processor 310, a memory 320, and a communication unit 330. The processor 310 is used to implement the process steps of the above-described embodiment of the personalized medical literature recommendation method when implementing the personalized medical literature recommendation program stored in the memory 320.
[0137] This invention also provides a computer storage medium, which may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc. The computer storage medium stores a personalized medical literature recommendation program, which, when executed by a processor, implements the process steps of the above-described embodiment of the personalized medical literature recommendation method.
[0138] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A personalized recommendation method for medical literature, characterized in that, Includes the following steps: S1, Based on the target user's historical click sequence, a candidate document set is generated from the global medical literature database, wherein the historical click sequence consists of the document sequence that the user has interacted with; S2, for each candidate medical document in the candidate document set, and for each historical document that constitutes the user click sequence, semantic enhancement representation is performed through a large language model to generate an optimized new title and related entity sequence; S3, input the new title, entity sequence and subject category information of each document into a multimodal encoder to generate the final document representation vector of the document; the multimodal encoder fuses the text representation vector, entity representation vector and category embedding vector through an attention mechanism; S4. Construct a user interest representation based on all final document representation vectors corresponding to the historical click sequence; S5, calculate the correlation between the final document representation vector of each candidate medical document and the user interest representation, and map it to the probability of the target user's interest in the candidate medical document; S6: Sort all the documents in the candidate document set according to the probability of interest, and select the Top-N documents to recommend to the target user based on the topic category.
2. The method according to claim 1, characterized in that, Step S1 involves retrieving a candidate literature set from the global medical literature database based on the target user's historical click sequence, specifically including: For each historical document in the user's historical click sequence, the first target medical entity contained in the document content is extracted by medical named entity recognition, and all extracted entities are deduplicated to generate an initial set of user interest entities; Starting with each entity in the initial set of user interest entities, the system performs one- or multiple-hop traversal along predefined medical semantic relationship paths on the pre-constructed medical knowledge graph to obtain extended entities that are directly or indirectly related to the user interest entities. The extended entities are then merged with the user interest entities to generate a comprehensive entity set. The medical semantic relationship paths include one or more of the following: hierarchical relationships, treatment relationships, pathogenic relationships, positional relationships, and gene association relationships. Based on the pre-built entity-document association index, the association strength score between documents in the global document library and the comprehensive entity set is calculated. According to the association strength score, several documents with scores exceeding a preset threshold or the highest ranking are selected. Documents that are the same as those in the historical click sequence are excluded from these documents, and finally a candidate document set is formed. The entity-document inverted index records the mapping relationship between each medical entity and the document set that contains or is associated with that entity.
3. The method according to claim 2, characterized in that, Step S2 specifically includes: S21, for each candidate medical article in the candidate literature set, perform the following steps: S211: Input the original title and abstract text of the candidate medical literature as the initial content into the large language model, and generate a preliminary abstract of the literature through the first prompt template instruction; S212, Identify and extract the second target medical entity from the initial content of the candidate medical document through medical named entity recognition, and form the entity sequence of the document; S213, combine the preliminary abstract of the document with the entity sequence and input them into the large language model, and generate its optimized new title through the second prompt template; S22, For each historical document that constitutes the user's click sequence, perform the following steps: S221: Input the original title and abstract text of the historical document as the initial content into the large language model, and generate a preliminary abstract of the document through the first prompt template instruction; S222, the preliminary abstract of the document is combined with the entity sequence formed by the first target medical entity and input into the large language model, and the optimized new title is generated through the second prompt target.
4. The method according to claim 3, characterized in that, Step S3 specifically includes the following steps: S31, the new title is treated as a sequence of several word elements. Each word element is mapped to a dense vector through a word embedding layer to obtain a word embedding vector sequence. The word embedding vector sequence is then input into a convolutional neural network to capture local context features and output a context-aware word representation sequence. At the same time, the word representation sequence is weighted and aggregated through an attention mechanism to obtain a text representation vector. S32 treats the entity sequence as a sequence of several entities, maps each entity to a dense vector through an entity embedding layer, and obtains an entity embedding vector sequence; then inputs the entity embedding vector sequence into a self-attention layer to model the intrinsic dependencies between entities, and obtains an enhanced entity representation sequence; finally, the enhanced entity representation sequence is weighted and aggregated through an attention mechanism to obtain an entity representation vector. S33 maps the subject category information of the documents into a dense category embedding vector through a lookup table; S34. The text representation vector, entity representation vector and category embedding vector are concatenated to obtain a hybrid feature vector. The attention mechanism is used to weight and fuse the different modal components in the hybrid feature vector to obtain the final document representation vector.
5. The method according to claim 4, characterized in that, Step S4 specifically includes: Obtain the final document representation vectors corresponding to all documents in the user's historical click sequence, and arrange them in order of interaction time to form a sequence of user document representation vectors; The user's document representation vector sequence is input into a pre-trained sequence model, which is a recurrent neural network. This network processes each document representation vector sequentially, passes and accumulates historical information through its internal hidden state, and outputs a vector that comprehensively represents the user's dynamic interests. An attention mechanism is used to process the sequence of user document representation vectors. A weight coefficient is calculated for each document representation vector in the sequence. This weight coefficient represents the importance of the corresponding historical document in constructing the current user interest representation. Based on the weight coefficient, all document representation vectors are weighted and summed to obtain the user interest summary representation vector. The vector comprehensively representing the user's dynamic interests is concatenated with the user interest summary representation vector, and then a linear transformation and nonlinear activation are performed through a fully connected layer to generate the final user interest representation vector.
6. The method according to claim 5, characterized in that, Step S5 specifically includes: For each candidate medical document, the cosine similarity method is used to calculate the similarity between its final document representation vector and the user interest representation vector, and this similarity is used as the relevance score. The relevance score of the current candidate document is normalized with the relevance scores of all other candidate documents in the candidate document set using the Softmax function, thus obtaining the relative probability of interest of the candidate document relative to other candidate documents.
7. The method according to claim 6, characterized in that, Step S6 specifically includes: All candidate medical articles in the candidate literature set are sorted in descending order according to their corresponding probability of interest values to generate a recommended candidate list; Iterate through the recommended candidate list and count the frequency of each topic category. Identify topic categories that appear more frequently than a preset threshold and mark them as excessive categories; For each excess category, retain the top K documents with the highest probability of interest in the ordered list; For each excess category, move the unrepresentative documents that were not retained from their original position in the ordered list to the end of the list; From the adjusted ordered list, select the top N articles to form the final personalized recommendation list.
8. A personalized medical literature recommendation system, characterized in that, include: The candidate document set generation module is used to retrieve and generate a candidate document set from the global medical literature database based on the target user's historical click sequence, wherein the historical click sequence consists of the document sequence that the user has interacted with; The new title and entity sequence optimization module is used to perform semantic enhancement on each candidate medical document in the candidate document set and each historical document that constitutes the user click sequence, respectively, through a large language model to generate an optimized new title and related entity sequence. The document representation vector generation module is used to input the new title, entity sequence, and subject category information of each document into a multimodal encoder to generate the final document representation vector of the document; the multimodal encoder fuses the text representation vector, entity representation vector, and category embedding vector through an attention mechanism; The user interest representation construction module is used to construct user interest representations based on all the final document representation vectors corresponding to the historical click sequence. The interest probability generation module is used to calculate the correlation between the final document representation vector of each candidate medical document and the user interest representation, and map it to the target user's interest probability of that candidate medical document. The recommended literature filtering module is used to sort all the literature in the candidate literature set according to the probability of interest, and select the top-N literatures to recommend to the target user based on the topic category.
9. A terminal, characterized in that, include: Memory, used to store personalized recommendation programs for medical literature; A processor, configured to implement the steps of the medical literature personalized recommendation method as described in any one of claims 1 to 7 when executing the medical literature personalized recommendation program.
10. A computer-readable storage medium, characterized in that, The readable storage medium stores a personalized medical literature recommendation program, which, when executed by a processor, implements the steps of the personalized medical literature recommendation method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Document recommendation method based on a word vector
CN109508421A
Medical literature sorting method and device, electronic equipment and storage medium
CN112307190A
Academic literature recommendation method fusing title and abstract semantic relation
CN114626369A
Scientific and technical literature recommendation method
CN115658862A