Pension institution recommendation method, device and equipment based on large language model

By combining a large language model with Monte Carlo tree search and the BERT model, we can dynamically analyze the conversations of the elderly and build logically reasonable user portraits. This solves the problem that traditional nursing home recommendation systems are unable to capture implicit needs, and achieves personalized and accurate nursing home recommendations.

CN120611088APending Publication Date: 2025-09-09民政部信息中心
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510490552.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

Traditional nursing home recommendation systems are unable to dynamically capture the implicit needs of the elderly, leading to recommendation biases. In addition, traditional NLP models have low semantic parsing accuracy for fragmented and implicit conversations and lack a contradiction detection mechanism.

Method used

A large language model combined with Monte Carlo tree search and bidirectional encoder representation transformer is used to extract fine-grained preference features through conversation data, build logically reasonable long-term and short-term user profiles, and perform feature matching recommendations.

Benefits of technology

It achieves high accuracy and timeliness in personalized recommendations for elderly care institutions, avoids unreasonable recommendations, and provides more scientific services that meet the needs of the elderly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120611088A_ABST
    Figure CN120611088A_ABST
Patent Text Reader

Abstract

The invention relates to the field of natural language processing, and provides a pension institution recommendation method, device and equipment based on a large language model.The method comprises the steps that a dialogue is received based on a short-term portrait extraction large language model, and a short-term portrait of a user is constructed according to the dialogue; constructing a long-term portrait of the user according to the basic attributes of the user; determining a reasonable user portrait according to the short-term portrait and the long-term portrait; performing feature extraction on the reasonable user portrait to generate a user embedding vector; obtaining an institution embedding vector according to the attribute information of the pension institution; and performing similarity matching on the user embedded vector and the mechanism embedded vector, and determining a personalized recommendation result of the pension mechanism according to a matching result. According to the method, the problem of recommendation deviation caused by the fact that a static portrait cannot dynamically capture implicit demands of the old people in the prior art is solved, and personalized old-age care institution recommendation is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of natural language processing technology, and in particular to a method, device and equipment for recommending nursing homes based on a large language model. Background Art

[0002] As the global aging population accelerates, seniors' needs for care are becoming increasingly diverse and personalized. Traditional elderly care institution recommendation systems primarily rely on static user profiles (e.g., basic attributes like age and health status), making it difficult to dynamically capture the fragmented and implicit needs expressed by seniors in conversations (e.g., short-term social preferences, dietary restrictions, etc.). This is particularly true in elderly-friendly conversations, where differences in cognition and expression habits often conceal the true needs of seniors in unstructured conversations, making it difficult for traditional recommendation systems to achieve accurate matching.

[0003] Currently, the industry mainly adopts two types of technical solutions: 1. Relying on predefined rules or collaborative filtering algorithms, they can only process structured data (such as user ratings and historical choices) and cannot interpret implicit needs in conversations. For example, generating static profiles from user-filled questionnaires can lag in data updates and fail to capture short-term changes in preferences.

[0004] 2. Some studies have attempted to extract user features from conversations using traditional machine learning models (such as SVM and LSTM). However, due to data sparsity and contextual understanding limitations, the extracted features are coarse-grained and lack logical validation. For example, they might mistakenly interpret "occasional mentions of outdoor activities" as "frequent exercise needs," leading to biased recommendations.

[0005] The core defects of existing technologies include: 1. Static portraits cannot reflect the immediate needs of the elderly as their environment and health status change (such as the temporary need for barrier-free facilities during the rainy season).

[0006] 2. Traditional NLP models have low semantic parsing accuracy for fragmented and implicit conversations and lack a contradiction detection mechanism (for example, the contradictory combination of "mobility issues" and "daily running").

[0007] 3. Real conversation data of the elderly is scarce, and the synthetic data generation method lacks diversity and logical rationality, which affects the model training effect. Summary of the Invention

[0008] The present invention provides a method, device and equipment for recommending nursing homes based on a large language model, which solves the problem of recommendation bias in the prior art caused by the inability of static portraits to dynamically capture the implicit needs of the elderly, and realizes personalized nursing home recommendations.

[0009] The present invention provides a method for recommending nursing homes based on a large language model, comprising the following steps: Extracting a large language model based on a short-term profile to receive a conversation and construct a short-term profile of the user based on the conversation; Build a long-term profile of users based on their basic attributes; Determine a reasonable user profile based on the short-term profile and the long-term profile; Extract features from the reasonable user portrait to generate a user embedding vector; Obtain the institution embedding vector based on the attribute information of the nursing home; The user embedding vector and the institution embedding vector are similarly matched, and a personalized recommendation result of a nursing home is determined according to the matching result.

[0010] According to a method for recommending nursing homes based on a large language model provided by the present invention, before training the large language model for extracting short-term portraits, the method includes: extracting preference features from historical conversation data between the user and the selected nursing home; constructing a short-term portrait of the user based on the preference features; constructing a long-term portrait of the user based on the basic attributes of the user; determining a reasonable user portrait based on the short-term portrait and the long-term portrait; generating synthetic conversation data based on the reasonable user portrait; and training the large language model for extracting short-term portraits based on the synthetic conversation data.

[0011] According to a method for recommending nursing homes based on a large language model provided by the present invention, the method extracts preference features from historical conversation data obtained between a user and a selected nursing home, specifically comprising: obtaining historical conversation data between the user and the selected nursing home; analyzing the user's motivation for selecting the nursing home based on the historical conversation data; simulating different viewpoint reasoning paths through a Monte Carlo tree search algorithm to select an optimal combination of preference features; and organizing and storing the optimal combination of preference features in a user conversation preference feature library.

[0012] According to a method for recommending nursing homes based on a large language model provided by the present invention, determining a reasonable user portrait based on the short-term portrait and the long-term portrait specifically includes: determining an original user portrait based on the short-term portrait and the long-term portrait; and performing a logical rationality check on the original user portrait to obtain a reasonable user portrait.

[0013] According to a method for recommending nursing homes based on a large language model provided by the present invention, generating synthetic conversation data based on the reasonable user portrait specifically includes: obtaining user attribute features based on the user's basic attributes, using the user attribute features as seed features, and combining them with the conversation preference information in the short-term portrait to construct a conversation context; inputting prompt words determined according to the conversation context and the user's reasonable user portrait information into the conversation generation large model to generate synthetic conversation data.

[0014] According to a method for recommending nursing homes based on a large language model provided by the present invention, the logical rationality check of the original user portrait specifically includes: extracting pairwise related feature pairs from a user portrait library; converting the feature pairs into natural language descriptions and inputting them into a bidirectional encoder representation transformer model, and determining the contradiction probability of the natural language description according to predefined logical conflict rules; if the contradiction probability exceeds a preset threshold, determining that the feature pair is an unreasonable combination; and deleting the unreasonable combination.

[0015] The present invention also provides a device for recommending nursing homes based on a large language model, comprising the following modules: A short-term profile building module, configured to extract a large language model based on the short-term profile to receive a conversation and build a short-term profile of the user based on the conversation; Long-term portrait construction module, used to build a long-term portrait of the user based on the user's basic attributes; A reasonable user profile building module, configured to determine a reasonable user profile based on the short-term profile and the long-term profile; A user embedding vector generation module is used to extract features from the reasonable user portrait and generate a user embedding vector; An institution embedding vector generation module is used to obtain the institution embedding vector based on the attribute information of the nursing home; The institution recommendation module is used to perform similarity matching between the user embedding vector and the institution embedding vector, and determine personalized recommendation results of nursing homes based on the matching results.

[0016] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method for recommending a nursing home based on a large language model as described above is implemented.

[0017] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for recommending a nursing home based on a large language model as described above is implemented.

[0018] The present invention also provides a computer program product, including a computer program, which, when executed by a processor, implements any of the above-mentioned methods for recommending nursing homes based on a large language model.

[0019] The present invention provides a method, device and equipment for recommending nursing homes based on a large language model, which include the following beneficial effects: dynamically analyzing the conversation content of the elderly through the large language model, accurately constructing a short-term portrait that reflects their immediate needs, and fusing and verifying it with the long-term portrait based on basic attributes to generate a logically reasonable user portrait; further generating embedding vectors of users and nursing homes through feature extraction, and realizing personalized recommendations based on similarity matching, thereby effectively solving the recommendation deviation problem caused by the traditional method due to the lag in static portrait updates and the inability to capture implicit needs, significantly improving the accuracy, timeliness and personalization of nursing home recommendations, and avoiding unreasonable recommendations through logical verification, providing a more scientific and more suitable nursing selection plan for the elderly. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions in the present invention or the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0021] Figure 1 This is a flow chart of the nursing home recommendation method based on a large language model provided by the present invention.

[0022] Figure 2 This is a structural principle diagram of the elderly care institution recommendation system provided by the present invention.

[0023] Figure 3 This is a flow chart of generating conversation preference content provided by the present invention.

[0024] Figure 4 This is an example diagram of generating conversation preference features provided by the present invention.

[0025] Figure 5 This is a flow chart for generating long-term and short-term portraits of the elderly provided by the present invention.

[0026] Figure 6 This is a flow chart of conversation content generation provided by the present invention.

[0027] Figure 7 This is a schematic diagram of a model training for generating short-term portraits of the elderly based on conversation content, as provided by the present invention.

[0028] Figure 8 This is the architecture diagram of the system for extracting short-term portraits of the elderly and recommending nursing homes provided by the present invention.

[0029] Figure 9 It is a structural diagram of the nursing home recommendation device based on a large language model provided by the present invention.

[0030] Figure 10 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0031] To make the objectives, technical solutions, and advantages of the present invention more clear, the technical solutions of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the embodiments described are only some of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.

[0032] The terms involved in the present invention are explained below.

[0033] 1. Large Language Model (LLM) Large Language Models (LLMs) are a deep learning technology in the field of natural language processing (NLP). Based on the Transformer architecture, they are pre-trained on large amounts of text data to understand and generate natural language. LLMs' core capability is to understand and generate semantically sound text within context. Their strength lies in their ability to process complex language patterns and perform tasks such as text generation, translation, and sentiment analysis. By pre-training on a large corpus of data, LLMs can capture linguistic nuances, predict vocabulary relevance, and generate contextually appropriate natural language. In practical applications, LLMs are widely used in tasks such as dialogue systems, machine translation, question-answering systems, and sentiment analysis. Through fine-tuning, LLMs can be customized for specific domain tasks, such as understanding and applying specialized terminology in industries like healthcare, law, and finance. Furthermore, LLMs possess strong reasoning capabilities, enabling them to perform contextual analysis and inference to generate responses or recommendations tailored to user needs.

[0034] (2) Monte Carlo Tree Search (MCTS) Monte Carlo Tree Search (MCTS) is a decision tree search algorithm [4] that simulates randomly selected decision paths, evaluates the quality of the paths, and optimizes based on them. The core advantage of MCTS is that it does not require a complete traversal of the entire decision tree, but rather gradually optimizes the decision process through simulation. Its most widely used field is game AI, especially in chess games (such as Go). MCTS can effectively evaluate different moves and select the optimal decision path. The basic steps of MCTS include: selection, expansion, simulation, and backpropagation. Through repeated simulation and backpropagation, the algorithm gradually approaches the optimal solution. In practical applications, MCTS can control the accuracy and efficiency of the search by adjusting the simulation depth and selection strategy, and adapt to complex decision problems. In addition to game AI, MCTS has also been applied to other fields, such as path planning, resource allocation, and robot decision-making, helping the system to make decisions quickly when faced with complex problems.

[0035] (3) BERT Model and Reasonableness Judgment BERT (Bidirectional Encoder Representations from Transformers) is a pre-trained language model based on the Transformer. Its key innovation lies in its bidirectional encoding mechanism, which allows the model to consider both the preceding and following context of a word, rather than relying solely on a one-way reading of information like traditional models. This mechanism enables BERT to excel in text understanding tasks. BERT's pre-training consists of two tasks: Masked Language Model (MLM) and Next Sentence Prediction (NSP). The MLM task randomly masks some words in a sentence and trains the model to predict these masked words, thereby learning contextual relationships between words. The NSP task learns relationships between sentences. Through this large-scale pre-training, BERT generates high-quality text representations that are widely used in tasks such as text classification, named entity recognition, text generation, and machine translation. Reasonableness assessment is a key application of BERT. When generating and processing text data, BERT can determine the logical validity of information by analyzing the context. For example, in multi-turn conversations, BERT can identify logical conflicts or inconsistencies, ensuring that the generated content conforms to real-world logic. This capability is particularly important in scenarios that require precise reasoning and data consistency, such as generated user profiles, recommendation systems, and automatically generated storylines. In practical applications, BERT's rationality judgment helps identify contradictions or unreasonable combinations in text and optimize the quality of text output.

[0036] With the advent of an aging society, the needs of the elderly for care are increasing. Traditional nursing home recommendation methods rely primarily on static user profiles, which fail to reflect the personalized and dynamically changing needs of seniors. Furthermore, the preferences expressed by seniors in conversations with nursing homes are often implicit and fragmented, making it difficult for traditional profile generation methods to effectively extract the elderly's true needs from these conversations. Therefore, how to combine conversation data, user attributes, and changes in conversation preferences to construct personalized senior profiles and, based on this, provide accurate nursing home recommendation services has become a pressing challenge. This paper, based on the Large Language Model (LLM) and multi-model collaborative optimization technology, proposes an innovative method to automate conversation content generation. The training model extracts user attributes and conversation preferences from the conversation content. Combined with Monte Carlo Tree Search (MCTS) and the logical rationality judgment of the BERT model, it improves the accuracy of identifying seniors' needs and generating profiles, thereby providing accurate and personalized nursing home recommendation services for seniors.

[0037] This invention relates to a technology for extracting conversational profiles of the elderly and recommending nursing homes based on automatic data augmentation and multi-model collaborative optimization. This method combines Monte Carlo Tree Search (MCTS) with bidirectional encoder representation transformer (BERT) rationality assessment to enhance the diversity and logical rationality of synthesized conversational data. This method ultimately improves the accuracy of dynamic feature extraction of short-term elderly portraits by the Large Language Model (LLM), enabling highly accurate analysis of elderly care needs and recommendations for nursing homes. This method first uses MCTS to enable the LLM to extract fine-grained features of elderly conversational preferences from conversations. Feature combinations are then selected to construct an initial set of elderly portraits. BERT is used to filter logical inconsistencies in these portraits, building a user profile library that integrates long-term and short-term profiles. Based on this, conversational content is then automatically generated based on user attribute features and conversational preference combinations. A training model is then trained to extract these features from the synthesized conversational content. The trained model can then be used in a downstream personalized nursing home recommendation system based on cosine similarity matching between user and institution feature vectors. This invention solves the problem of portrait extraction bias caused by the fragmentation of elderly people's conversations and the strong implicitness of short-term needs in traditional methods. It belongs to the field of natural language processing and intelligent recommendation technology, and can be applied to elderly health monitoring, aging-friendly dialogue systems and personalized service recommendation scenarios.

[0038] The following combination Figures 1-10 The embodiments of the present invention are described in detail.

[0039] Figure 1 This is one of the flow charts of the nursing home recommendation method based on the large language model provided by the present invention. Figure 1 As shown, the method includes the following steps: S110: Extracting a large language model based on the short-term portrait to receive the conversation, and constructing a short-term portrait of the user based on the conversation.

[0040] S120. Build a long-term profile of the user based on the user's basic attributes.

[0041] S130. Determine a reasonable user profile based on the short-term profile and the long-term profile.

[0042] S140: Extract features from reasonable user portraits and generate user embedding vectors.

[0043] S150: Obtain an institution embedding vector based on the attribute information of the elderly care institution.

[0044] S160: Perform similarity matching between the user embedding vector and the institution embedding vector, and determine personalized recommendation results for nursing homes based on the matching results.

[0045] Specifically, Figure 2This paper demonstrates the complete architecture of a senior care facility recommendation system based on the Bert model, covering the construction of user profiles, dynamic preference updates, application of the Bert model, recall of senior care facilities, and recommendation ranking based on Cosine similarity. The core goal is to leverage conversation data between seniors and senior care facilities, along with a fine-tuned LLM trained in previous modules to extract short-term user profiles from these conversations. Combined with the seniors' basic attribute information, this system accurately characterizes their individual needs and provides the most appropriate senior care facility recommendations through intelligent matching, ensuring accurate and personalized recommendations.

[0046] First, the construction of user profiles is the foundation of the elderly care facility recommendation system. User profiles are primarily generated based on historical conversation data between elderly individuals and elderly care facilities. This data is combined with basic user attributes (such as age, health status, self-care ability, cognitive ability, and interests) to generate short-term and long-term profiles. The short-term profiles, extracted using a fine-tuned Large Language Model (LLM) for short-term profile extraction, are primarily used to identify elderly individuals' recent interests and needs, such as changes in preferences for activities, climate, or diet over a short period of time. The long-term user profile captures the elderly's stable behavioral patterns, living preferences, and long-term living needs, ensuring the system captures their core characteristics. Furthermore, the system utilizes the Bert model to perform logical validation checks on user profiles to avoid inconsistencies or unrealistic features, such as a user with limited mobility preferring extreme outdoor sports. This ensures the final user profile is reasonable and effective.

[0047] During the dynamic update process, the system continuously tracks the user's preferences and records them multiple times. For needs mentioned multiple times by the same user in a conversation, such as a preference for a garden environment or an interest in social activities, the system will repeatedly input this feature, increasing its importance in the user profile.

[0048] The core role of the BERT model in the system lies in three key areas. First, BERT is used to optimize user profiles. After generating a reasonable user profile, the system feeds it into BERT for feature extraction, generating a user embedding vector. This allows the preferences and attributes of the elderly to be represented in a high-dimensional vector space. Second, BERT also encodes the attributes of nursing homes (such as location, infrastructure, service types, and medical resources) to generate corresponding embedding vectors for the institutions. This allows the system to calculate the similarity between users and institutions in the same semantic space, improving the accuracy of recommendations. BERT is also used to identify behavioral inconsistencies. By extracting conflicting preference pairs from conflicting points in a user's basic attributes, the system fine-tunes downstream tasks of the BERT model. This allows the system to analyze whether a user's behavior is reasonable. For example, if an elderly person has limited mobility but their conversation history indicates that they run daily, this inconsistency will be identified and the recommendation strategy will be adjusted to avoid incorrect recommendations.

[0049] The recall of nursing homes is based on the synergistic signals of user and institution portraits, and is also combined with the user's active selection on the interactive interface. The system analyzes how many elderly people similar to the target user are already in a nursing home. If the proportion of users similar to the user's profile in a certain institution's existing user base is in the top 20% of all institutions, the institution will be recalled. In addition, the system will also take into account the user's financial affordability. For example, if a user expresses concern about the cost of a nursing home during a conversation, the system will extract their requirements for institutional fees and screen institutions based on the price range they selected, further improving the accuracy of the recall and ensuring that the nursing home recommended by the user meets their actual needs.

[0050] Finally, during the ranking and recommendation phase, the system calculates the degree of match between the user's vector and the nursing home vector based on Cosine similarity, and ranks the nursing homes accordingly. Cosine similarity is a commonly used vector similarity calculation method that measures the similarity between the user's profile and the nursing home profile, placing the most closely matched nursing home at the top of the recommendation list. Ultimately, the system recommends the nursing home that best meets the user's needs, ensuring personalized, accurate, and efficient recommendations.

[0051] The entire process relies on BERT for semantic understanding. A fine-tuned LLM model is used to dynamically extract preferences during conversations with the elderly and dynamically update those preferences. Repeated preferences mentioned by the elderly are input into BERT based on the number of repetitions to enhance the model's emphasis on the semantics. Finally, based on the similarity calculation of the embedding vectors, the most suitable nursing home recommendation service is provided to the elderly.

[0052] According to the present invention, a method for recommending nursing homes based on a large language model is provided. Before training the large language model for extracting short-term portraits, the method includes: extracting preference features from historical conversation data between the user and the selected nursing home; constructing a short-term portrait of the user based on the preference features; constructing a long-term portrait of the user based on the basic attributes of the user; determining a reasonable user portrait based on the short-term portrait and the long-term portrait; generating synthetic conversation data based on the reasonable user portrait; and training the large language model for extracting short-term portraits based on the synthetic conversation data.

[0053] According to a large language model-based nursing home recommendation method provided by the present invention, preference features are extracted from historical conversation data between users and selected nursing homes. The method specifically includes: obtaining historical conversation data between users and selected nursing homes; analyzing the user's motivation for selecting a nursing home based on the historical conversation data; simulating different viewpoint reasoning paths through a Monte Carlo tree search algorithm to select the optimal preference feature combination; and organizing and storing the optimal preference feature combination in a user conversation preference feature library.

[0054] Specifically, if Figure 3 As shown, conversation preference feature generation is used to infer how seniors choose nursing homes. Monte Carlo Tree Search (MCTS) is used to derive these conversation preference features. The core goal is to analyze the seniors' basic attributes and needs, infer their interests in certain types of nursing homes, and ultimately build a personalized conversation preference feature library. The system input is the seniors' preferred nursing homes, which contain their basic information and relevant attributes. Next, the system uses prompts to guide the system, gradually inferring the seniors' motivations and analyzing their interest in certain nursing home features. The corresponding conversation preference features are then extracted. This reasoning process is performed step by step, with each step generating a preference feature with a reasonable theoretical justification.

[0055] During the inference process, the system uses MCTS (Monte Carlo Tree Search) to optimize decisions. MCTS simulates different inference paths and selects the optimal combination of preference features, ensuring the system generates the most accurate personalized features. The system then organizes and summarizes the inferred conversation preference features and performs deduplication to prevent redundant information from affecting data quality. Finally, the organized features are stored in the user conversation preference feature library.

[0056] For example, consider Mr. Zhang, a 68-year-old senior citizen who is in good health but has mild hypertension. He is extroverted, enjoys social activities, and has high standards for a healthy diet. He is looking for a suitable nursing home that can meet his health needs, allow him to make new friends, and ensure that his daily diet meets his health standards. Mr. Zhang ultimately chooses a nursing home that offers a rich social program, focuses on healthy diets for seniors, and is equipped with basic medical facilities.

[0057] (1) Reasoning based on Prompt: After receiving Mr. Zhang's basic information and the characteristics of the nursing home, LLM uses Prompt to perform step-by-step reasoning to analyze his needs and corresponding conversational preferences: - Why did Mr. Zhang choose this nursing home? - What characteristics are he interested in? - What characteristics of conversational preferences can be inferred from his choices? (2) Step-by-step reasoning process: The system uses MCTS (Monte Carlo Tree Search) to optimize the reasoning path to ensure that the most reasonable preference features are found. The following is an example of one of the reasoning paths: Step 1: Health needs → Preference feature 1 - Reasoning: Mr. Zhang has high blood pressure, and the nursing home he chose provides healthy diet and basic medical facilities.

[0058] - Conversation preference characteristics: He may be more concerned about "whether the nursing home provides a low-salt and low-fat diet" and "whether there are regular checkups by professional doctors."

[0059] Step 2: Social Needs → Preference Feature 2 - Reasoning: Mr. Zhang is an extrovert and enjoys social activities, so the institution he chooses provides a variety of social activities.

[0060] - Conversation preference characteristics: He may pay more attention to "whether there are rich interest groups or social activities" in the conversation, such as chess, calligraphy, choir, etc.

[0061] Step 3: Personalized dietary requirements → Preference feature 3 - Reasoning: Mr. Zhang has requirements for healthy diet, so he will choose a nursing home with better food services.

[0062] - Conversation preference characteristics: He may care about "whether the restaurant can provide personalized menus" and "whether the ingredients are fresh and organic."

[0063] During the step-by-step reasoning process, MCTS (Monte Carlo Tree Search) optimizes the reasoning path through four main steps: selection, expansion, simulation, and backpropagation, ensuring that the derived preference features best reflect the actual needs of seniors. Taking the above reasoning path as an example, in Step 1: Health Needs, the system first selects at the root node of the tree. The system analyzes Mr. Zhang's hypertension and selects a healthy diet as the reasoning direction. During the expansion phase, the system adds two possible feature subnodes: "Low-salt, low-fat diet" and "Regular health checkups." Subsequently, during the simulation phase, the system evaluates historical data, for example, whether seniors with similar health conditions are more likely to prioritize healthy diets. During the backpropagation phase, the system adjusts the weights based on the simulation results, increasing the score of the path that best matches Mr. Zhang's needs, ultimately selecting the "Low-salt, low-fat diet" preference feature. This optimization process is repeated for subsequent reasoning paths, such as social needs and dietary requirements, ultimately ensuring that all generated preference features are optimally selected and fully and accurately capture Mr. Zhang's senior care needs.

[0064] (3) Generating conversation preference features Finally, the system sorted out the following preference characteristics: like Figure 4 The following diagram shows an example of generating conversation preference features. These features can be deduplicated and stored in the "User Conversation Preference Feature Library" for subsequent use.

[0065] According to a nursing home recommendation method based on a large language model provided by the present invention, a reasonable user portrait is determined based on the short-term portrait and the long-term portrait, specifically including: determining the original user portrait based on the short-term portrait and the long-term portrait; performing a logical rationality check on the original user portrait to obtain a reasonable user portrait.

[0066] Specifically, if Figure 5 As shown, the generation of long-term and short-term profiles for seniors combines features to construct long-term and short-term profiles of users. These profiles are then logically analyzed using the Large Language Model (LLM) and stored in the user profile database. The core of this process is to combine features based on the likely basic attributes and conversational preferences of seniors. BERT is then used to perform a rationality check and remove illogical combinations.

[0067] In generating long-term profiles, the system primarily combines features based on the elderly individual's age, gender, health status, ability to care for themselves, cognitive function, special needs, medical history, family situation, and location. This information helps the system determine the elderly's basic care needs, such as whether they require medical support, whether they can live independently, and whether they require special care. This ultimately aids in recommending nursing homes or providing personalized health management. Short-term profile generation relies on combining individual elderly individuals' conversational preferences, including weather preferences, social needs, dietary needs, and living space requirements. Short-term profiles are characterized by greater personalization and immediacy, making them suitable for elderly care recommendation systems and AI interaction optimization.

[0068] According to a nursing home recommendation method based on a large language model provided by the present invention, a logical rationality check is performed on the original user profile, specifically including: extracting pairwise related feature pairs from the user portrait library; converting the feature pairs into natural language descriptions and inputting them into a bidirectional encoder representation transformer model, and determining the contradiction probability of the natural language description according to predefined logical conflict rules; if the contradiction probability exceeds a preset threshold, determining that the feature pair is an unreasonable combination; and deleting the unreasonable combination.

[0069] Specifically, to ensure the rationality of the generated profile data, the system utilizes LLM for logical analysis and the BERT model for logical verification of pairwise combinations of long-term and short-term profiles. Feature combinations identified as unreasonable are eliminated. This approach effectively avoids incorrect recommendations and improves the accuracy and credibility of recommendations. The filtered profile data is then stored in the user profile library.

[0070] The following is a specific example to illustrate how the module generates long-term and short-term portraits of the elderly: (1) Basic information of the elderly (long-term portrait) Assume that we combine the basic information of possible elderly people and fill in reasonable specific values ​​to form a virtual elderly person A. Her basic information is as follows: - Age: 65 - Gender: Female - Health status: Mild illness (high blood pressure, well controlled) - Ability to take care of oneself: Completely self-care - Cognitive function: normal - Special needs: None - Past medical history: None - Family status: Children visit, but the visiting hours are irregular - Geographical location: Prefer urban environment (2) Generating short-term profiles through conversation preference features The system further extracts preference features from the conversation preference feature library obtained in the previous step and combines them to simulate A's personalized preferences and generate the corresponding possible short-term profile: - Weather preference: Prefers warm weather and dislikes rainy days - Living space requirements: Accessible facilities are required - Social needs: No special requirements - Dietary requirements: No special requirements are currently specified (3) Using BERT for logical checking The long-term and short-term portraits of the elderly generated by combining features may contain logical irrationality and confusion, so the system uses BERT to perform logical judgment and check whether there are any contradictions in the portraits. For example: - A can take care of himself completely, but his living space requires barrier-free facilities, which creates a conflict and triggers logical filtering.

[0071] - A has no obvious special dietary requirements, but has high blood pressure, which requires the elderly's diet to be controlled. Therefore, the dietary needs are contradictory.

[0072] Finally, after LLM logical judgment, the portrait data of A obtained by reasonably combining features is stored in the user portrait library for subsequent use.

[0073] Based on LLM (Large Language Model) to generate dialogue content, specifically Figure 6 Taking the process shown above as an example, in the previous long-term and short-term profile generation modules, the system first organizes the elderly person's basic information, combining core attributes such as age, health status, self-care ability, and cognitive ability to form a long-term profile. Simultaneously, a short-term profile is constructed by combining information provided by the conversation preference feature generation module, including the elderly person's personalized needs regarding weather, social activities, dietary habits, and living environment. The long-term profile primarily describes the elderly person's stable characteristics, while the short-term profile captures recent dynamic changes in their environment and lifestyle. After combining these two parts of the profile information, the system uses the BERT model to perform a plausibility check on the profile, removing any logically contradictory feature combinations. The profile is then stored in the user profile library, providing high-quality, structured data support for subsequent conversation generation.

[0074] According to a large language model-based nursing home recommendation method provided by the present invention, synthetic conversation data is generated according to reasonable user portraits, specifically including: obtaining user attribute features based on the user's basic attributes, using the user attribute features as seed features, and combining the conversation preference information in the short-term portrait to construct a conversation context; inputting the prompt words determined according to the conversation context and the user's reasonable user portrait information into the large conversation generation model to generate synthetic conversation data.

[0075] When generating conversational content, the system uses the attributes of the elderly as seed features and combines them with conversational preference information from short-term profiles to construct an appropriate conversational context. Based on this, the system designs appropriate guiding phrases in the prompt module, such as requiring the AI ​​assistant to focus on key factors such as the elderly's health needs, social tendencies, and living environment preferences during the conversation. The system then feeds the designed prompts, along with the elderly's profile information, into the LLM, enabling it to simulate a real conversational interaction between an elderly person and the AI ​​assistant. To enhance the coherence and realism of the conversations, the system employs optimization techniques such as multiple rounds of self-reflection, enabling the LLM to continuously adjust its responses during the generation process, ensuring that the generated conversations are both logical and accurately reflect the elderly's individual needs.

[0076] Ultimately, the generated conversation data can be used to train a large language model that generates short-term portraits of the elderly based on the conversation content.

[0077] Figure 7 This paper demonstrates a large language model training process for generating short-term profiles of seniors based on their conversational content. The core goal is to leverage the conversational content, attribute characteristics, and conversational preferences of seniors to train a large language model (LLM) capable of predicting and generating personalized short-term profiles.

[0078] Throughout the entire process, the generated synthetic conversation content serves as the primary input data, representing the textual information used by seniors in their daily interactions. Simultaneously, user attributes (such as age, gender, and health status) and conversation preferences (including topic preferences, expression styles, and emotional tendencies) serve as long-term and short-term profiles, respectively, and together determine the label. This provides supervision signals for the model, helping the LLM learn how to map conversation content to personalized profiles.

[0079] During model training, the LLM receives conversation content as input and combines it with label information for learning, enabling it to automatically analyze conversation patterns and infer a user's short-term profile. As training progresses, the model more accurately understands the individual characteristics of older adults, supporting personalized services or interventions. Overall, the core of this process lies in training the LLM using conversation data and individual characteristics, enabling it to infer user characteristics from conversations, ultimately achieving more accurate and personalized short-term profiles of older adults.

[0080] Figure 8This is an architecture diagram of the system for extracting short-term portraits of the elderly and recommending nursing homes provided by the present invention; the nursing home data selected by the elderly is input into the dialogue preference feature generation module, and a dialogue preference feature library is output. This is input into the long-term and short-term portrait generation module in combination with the basic attributes of the elderly. The output long-term and short-term portraits are input into the dialogue content generation module. The output of the dialogue content generation module is used as training input into the short-term portrait extraction large language model, which is trained in combination with training labels to finally obtain a large language model for extracting user short-term portraits in the nursing home recommendation system; the nursing home outputs a list of recommended institutions based on the basic attributes of the actual elderly users.

[0081] The following describes the nursing home recommendation device based on a large language model provided by the present invention. The nursing home recommendation device based on a large language model described below and the nursing home recommendation method based on a large language model described above can refer to each other.

[0082] like Figure 9 The present invention provides a device for recommending nursing homes based on a large language model, comprising: A short-term profile building module 910 is configured to extract a large language model based on the short-term profile to receive a conversation and build a short-term profile of the user based on the conversation; Long-term portrait building module 920, used to build a long-term portrait of the user based on the user's basic attributes; Reasonable user profile construction module, used to determine reasonable user profiles based on short-term and long-term profiles; User embedding vector generation module 930, used to extract features from reasonable user portraits and generate user embedding vectors; An institution embedding vector generating module 940 is used to obtain an institution embedding vector based on the attribute information of the elderly care institution; The institution recommendation module 950 is used to perform similarity matching between the user embedding vector and the institution embedding vector, and determine personalized recommendation results of nursing homes based on the matching results.

[0083] Figure 10 An example of a physical structure diagram of an electronic device is shown below. Figure 10As shown, the electronic device may include: a processor 1010, a communications interface 1020, a memory 1030, and a communication bus 1040, wherein the processor 1010, the communications interface 1020, and the memory 1030 communicate with each other via the communication bus 1040. The processor 1010 may call logic instructions in the memory 1030 to execute a method for recommending nursing homes based on a large language model. The method includes: extracting a large language model based on a short-term profile to receive a conversation, constructing a short-term profile of the user based on the conversation; constructing a long-term profile of the user based on the basic attributes of the user; determining a reasonable user profile based on the short-term profile and the long-term profile; extracting features from the reasonable user profile to generate a user embedding vector; obtaining an institution embedding vector based on the attribute information of the nursing home; performing similarity matching between the user embedding vector and the institution embedding vector, and determining a personalized recommendation result for the nursing home based on the matching result.

[0084] Furthermore, the logic instructions in the aforementioned memory 1030 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the various embodiments of the method of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0085] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the nursing home recommendation method based on the large language model provided by the above methods. The method includes: extracting a large language model based on a short-term portrait to receive a conversation, and constructing a short-term portrait of the user based on the conversation; constructing a long-term portrait of the user based on the basic attributes of the user; determining a reasonable user portrait based on the short-term portrait and the long-term portrait; extracting features from the reasonable user portrait to generate a user embedding vector; obtaining an institution embedding vector based on the attribute information of the nursing home; performing similarity matching between the user embedding vector and the institution embedding vector, and determining a personalized recommendation result for the nursing home based on the matching result.

[0086] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the nursing home recommendation method based on the large language model provided by the above-mentioned methods, the method comprising: extracting a large language model based on a short-term portrait to receive a conversation, and constructing a short-term portrait of the user based on the conversation; constructing a long-term portrait of the user based on the basic attributes of the user; determining a reasonable user portrait based on the short-term portrait and the long-term portrait; performing feature extraction on the reasonable user portrait to generate a user embedding vector; obtaining an institution embedding vector based on the attribute information of the nursing home; performing similarity matching between the user embedding vector and the institution embedding vector, and determining a personalized recommendation result for the nursing home based on the matching result.

[0087] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units. That is, they may be located in one place or distributed across multiple network units. Some or all of the modules may be selected based on actual needs to achieve the objectives of the present embodiment. Persons of ordinary skill in the art will be able to understand and implement the present invention without inventive effort.

[0088] Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented using software plus a necessary general-purpose hardware platform, or of course, hardware. Based on this understanding, the essence of the above technical solution, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, or an optical disk, and includes a number of instructions for causing a computer device (such as a personal computer, server, or network device) to execute the methods of each embodiment or certain portions of the embodiments.

[0089] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A method for recommending nursing homes based on a large language model, characterized in that: include: Extracting a large language model based on a short-term profile to receive a conversation and construct a short-term profile of the user based on the conversation; Build a long-term profile of users based on their basic attributes; Determine a reasonable user profile based on the short-term profile and the long-term profile; Extract features from the reasonable user portrait to generate a user embedding vector; Obtain the institution embedding vector based on the attribute information of the nursing home; The user embedding vector and the institution embedding vector are similarly matched, and a personalized recommendation result of a nursing home is determined according to the matching result.

2. The method for recommending nursing homes based on a large language model according to claim 1, characterized in that: Before training the large language model for short-term image extraction, the following steps must be performed: Extract preference features from the historical conversation data between the user and the selected nursing home; Build a short-term profile of the user based on the preference characteristics; Build a long-term profile of users based on their basic attributes; Determine a reasonable user profile based on the short-term profile and the long-term profile; generating synthetic conversation data based on the reasonable user portrait; The short-term portrait extraction large language model is trained based on the synthetic dialogue data.

3. The method for recommending nursing homes based on a large language model according to claim 2, characterized in that: The step of extracting preference features from the historical conversation data between the user and the selected nursing home specifically includes: Obtain historical conversation data between the user and the selected nursing home; Analyzing the user's motivation for selecting a nursing home based on the historical conversation data; The Monte Carlo tree search algorithm is used to simulate the reasoning paths of different viewpoints and select the optimal combination of preference features; The optimal preference feature combination is organized and stored in a user conversation preference feature library.

4. The method for recommending nursing homes based on a large language model according to claim 1 or 2, characterized in that: Determining a reasonable user profile based on the short-term profile and the long-term profile specifically includes: Determine an original user profile based on the short-term profile and the long-term profile; Perform a logical rationality check on the original user portrait to obtain a reasonable user portrait.

5. The method for recommending nursing homes based on a large language model according to claim 2, characterized in that: Generating synthetic conversation data based on the reasonable user portrait specifically includes: Acquire user attribute features based on the user's basic attributes, use the user attribute features as seed features, and combine them with the conversation preference information in the short-term profile to construct a conversation context; The prompt words determined according to the dialogue context and the user's reasonable user portrait information are input into the dialogue generation model to generate synthetic dialogue data.

6. The method for recommending nursing homes based on a large language model according to claim 4, characterized in that: The logical rationality check of the original user portrait specifically includes: Extract pairwise related feature pairs from the user portrait database; Converting the feature pairs into natural language descriptions and inputting them into a bidirectional encoder representation transformer model, and determining the contradiction probability of the natural language descriptions according to predefined logical conflict rules; If the contradiction probability exceeds a preset threshold, the feature pair is determined to be an unreasonable combination; Delete the unreasonable combination.

7. A device for recommending nursing homes based on a large language model, characterized in that: include: A short-term profile building module, configured to extract a large language model based on the short-term profile to receive a conversation and build a short-term profile of the user based on the conversation; Long-term portrait construction module, used to build a long-term portrait of the user based on the user's basic attributes; A reasonable user profile building module, configured to determine a reasonable user profile based on the short-term profile and the long-term profile; A user embedding vector generation module is used to extract features from the reasonable user portrait and generate a user embedding vector; An institution embedding vector generation module is used to obtain the institution embedding vector based on the attribute information of the nursing home; The institution recommendation module is used to perform similarity matching between the user embedding vector and the institution embedding vector, and determine personalized recommendation results of nursing homes based on the matching results.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the method for recommending a nursing home based on a large language model as described in any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for recommending a nursing home based on a large language model as described in any one of claims 1 to 6 is implemented.

10. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the method for recommending a nursing home based on a large language model as described in any one of claims 1 to 6 is implemented.

Citation Information

Cited By

  • Credit service recommendation system, method, device, storage medium and program product

    CN121051307A