Product recommendation method and system, electronic equipment and storage medium

By identifying user intent and utilizing model context protocols and retrieval enhancement generation techniques, combined with vector databases and product databases, the problem of low recommendation quality caused by sparse user behavior data in existing technologies is solved, and personalized and real-time product recommendation services are realized.

CN121836845APending Publication Date: 2026-04-10MICRO INSURANCE AGENCY LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-23
Publication Date
2026-04-10

AI Technical Summary

Technical Problem

Existing collaborative filtering-based recommendation algorithms suffer from poor recommendation service quality when user behavior data is sparse, failing to meet personalized needs. Furthermore, the scattered storage of product information, user profiles, and knowledge bases leads to data silos, making it difficult to provide accurate and real-time product recommendations.

Method used

By acquiring the user's original input information, identifying the user's intent, and utilizing model context protocols and retrieval enhancement generation techniques, combined with vector databases and product databases, product recommendation reasons are generated. This includes intent identification, query request construction, candidate product list determination, and recommendation reason generation.

Benefits of technology

It has improved the quality of recommendation services, providing personalized, accurate, and real-time product recommendations, solving the data silo problem, and enhancing user interaction experience and information accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121836845A_ABST
    Figure CN121836845A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of product recommendation, and discloses a product recommendation method, electronic equipment and a storage medium, and the product recommendation method comprises the steps: obtaining original statement information input by a user, recognizing the intention of the user, querying a product database based on a model context protocol, and determining a candidate product list; and further searching the vector database by using a retrieval enhancement generation technology, determining a query result, and generating a product recommendation reason based on the query result, so that the recommendation precision of product recommendation can be improved by combining an MCP protocol and an RAG technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of Internet technology, and in particular to a product recommendation method, system, electronic device, and storage medium. Background Technology

[0002] Product sales and recommendation systems select and recommend products based on user input. For example, collaborative filtering-based recommendation algorithms recommend items by leveraging the similarity between users (or items) without analyzing the content information of the items themselves. The core idea of ​​collaborative filtering-based recommendation algorithms is that "users who like similar items may have similar preferences" or "users may like other items similar to those they have liked before."

[0003] However, this approach relies on a large amount of user behavior data. If the user behavior data is sparse, the service quality of the recommendation service will be low. Summary of the Invention

[0004] This application provides a product recommendation method, electronic device, and storage medium to improve the service quality of recommendation services.

[0005] On one hand, embodiments of this application provide a product recommendation method, including: Obtain the original statement information input by the user; Identify user intent based on the original statement information; Based on the user's intent, construct the first query request; Based on the first query request, the product database is queried according to the model context protocol to determine the candidate product list; Based on the original query information and the candidate product list, generate a second query request; Based on the second query request, the vector database is searched using retrieval enhancement generation technology to determine the query results; Based on the query results, generate reasons for product recommendations.

[0006] In some embodiments, Based on the original statement information, identify the user's intent, including: Feature extraction is performed on the original sentence information to obtain keyword features, entity features, and semantic features; Based on keyword features, entity features, and semantic features, calculate keyword matching score, semantic similarity score, and contextual continuity score; Based on the pre-set weights corresponding to keyword matching scores, semantic similarity scores, and contextual continuity scores, the initial confidence score for each intent type is calculated. Based on historical dialogue information, the initial confidence score corresponding to each intent type is adjusted to obtain the comprehensive confidence score corresponding to each intent type. The intent type with the highest comprehensive confidence score is taken as the user intent. The types of intent include: product recommendation intent, terms and conditions interpretation intent, product comparison intent, profit calculation intent, risk assessment intent, and purchase guidance intent.

[0007] In some embodiments, The method also includes: Based on each intent type, generate dialogue information, including: If the intent type is product recommendation intent, then based on the model context protocol, the product database is queried to generate product recommendation information; If the intent type is the intent to interpret the clauses, then the clause knowledge base is searched based on the retrieval enhancement generation technology to generate clause knowledge information; If the intent type is product comparison intent, then multiple product details are called in parallel to obtain product comparison information; If the intent type is revenue calculation intent, then the calculation engine is invoked to calculate product revenue in combination with product parameters, and product revenue information is obtained. If the intent type is risk assessment intent, then risk assessment is performed by combining user profile and product characteristics to obtain risk assessment information; If the intent type is purchase guidance intent, then the process knowledge base will be retrieved to obtain purchase guidance information.

[0008] In some embodiments, Based on the user's intent, construct the first query request, including: Based on the original statement information, tag information is extracted using natural language understanding technology. The tag information includes user tags, custom tags, age range, income range, risk preference, and the number of results limited. Based on the tag information and user intent, a structured query request object is constructed to build the first query request, wherein the first query request includes the structured query request object.

[0009] In some embodiments, Based on the first query request, and using the model context protocol, a query is performed on the product database to determine a list of candidate products, including: Based on the first query request, the first query request is encapsulated through the model context protocol to construct a model context protocol request object; Based on the model context protocol request object, execute a remote procedure call query to perform a product query on the product database and obtain the product query results; Based on the product search results, determine the list of candidate products.

[0010] In some embodiments, The method also includes: Based on the recommendation constraint algorithm, the candidate product list is pre-filtered to obtain the filtered candidate product list, including: Based on the constraint rules in the recommendation restriction algorithm, the candidate product list is pre-filtered to obtain the filtered candidate product list. The constraint rules include at least one of the following: user profile constraint rules, business constraint rules, compliance and regulatory constraint rules, and risk control constraint rules.

[0011] In some embodiments, Based on the original query information and the candidate product list, a second query request is generated, including: Obtain user profiles; Generate query text based on user profile, original query information, and candidate product list; Generate a second query request based on the query text.

[0012] In some embodiments, Based on the second query request, and using retrieval enhancement generation technology, the vector database is searched to determine the query results, including: Based on the query text, a retrieval enhancement generation engine is used to convert the query text into a high-dimensional semantic vector; Based on high-dimensional semantic vectors, a retrieval-enhanced generation engine searches the vector database to obtain knowledge fragments. The query results are determined based on the knowledge fragments, where the query results include the knowledge fragments.

[0013] In some embodiments, Based on the query results, generate product recommendation reasons, including: Generate contextual information based on knowledge fragments; Build intelligent suggestion words; Contextual information and intelligent prompts are input into a large language model to generate product recommendation reasons.

[0014] On the other hand, embodiments of this application provide a product recommendation system, including: Vector databases are used to store knowledge fragments; A product database is used to store product data; The dialogue manager is used to obtain the original statement information input by the user; The intent recognition module is used to identify the user's intent based on the original statement information; The MCP server is used to obtain the first query request, and based on the first query request, query the product database according to the model context protocol to determine the candidate product list; The RAG engine is used to obtain the second query request, and based on the second query request, it searches the vector database using retrieval enhancement generation technology to determine the query results; A large language model is used to generate product recommendation reasons based on query results.

[0015] On the other hand, embodiments of this application provide an electronic device, including: At least one processor; At least one memory for storing at least one program; When at least one program is executed by at least one processor, the at least one processor implements the product recommendation method described above.

[0016] On the other hand, embodiments of this application provide a non-volatile computer-readable storage medium storing a processor-executable program, which, when executed by a processor, is used to perform the aforementioned product recommendation method.

[0017] On the other hand, embodiments of this application provide a computer program product, which includes one or more lines of program code stored in a non-volatile computer-readable storage medium. The processor of an electronic device reads the program code from the non-volatile computer-readable storage medium and executes the program code to complete the steps of the product recommendation method described above.

[0018] The beneficial effects of the embodiments of this application are as follows: Unlike existing technologies, the embodiments of this application provide a product recommendation method, including: obtaining original statement information input by a user; identifying user intent based on the original statement information; constructing a first query request based on the user intent; querying a product database based on a model context protocol based on the first query request to determine a candidate product list; generating a second query request based on the original statement information and the candidate product list; searching a vector database based on retrieval enhancement generation technology based on the second query request to determine query results; and generating product recommendation reasons based on the query results.

[0019] By acquiring the user's original input information and identifying the user's intent, the product database is queried based on the model context protocol to determine a list of candidate products. Further, retrieval enhancement generation technology is used to search the vector database to determine the query results. Based on the query results, product recommendation reasons are generated. This approach can combine the MCP protocol and RAG technology to improve the service quality of recommendation services. Attached Figure Description

[0020] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0021] Figure 1 This is a schematic diagram of the structure of a product recommendation system provided in an embodiment of this application; Figure 2 This is a flowchart illustrating a product recommendation method provided in an embodiment of this application; Figure 3 yes Figure 2 A detailed flowchart of step S202 in the process; Figure 4 yes Figure 2 A detailed flowchart of step S203 in the process; Figure 5A yes Figure 2 A detailed flowchart of step S204 in the process; Figure 5B This is a schematic diagram illustrating a product query using the MCP protocol, provided in an embodiment of this application. Figure 6 yes Figure 2 A detailed flowchart of step S205 in the process; Figure 7 yes Figure 2 A detailed flowchart of step S206 in the process; Figure 8 yes Figure 2 A detailed flowchart of step S207 in the process; Figure 9 This is an interactive schematic diagram of dialogue management provided in an embodiment of this application; Figure 10 This is a schematic diagram of the overall process of a product recommendation method provided in an embodiment of this application; Figure 11 This is a schematic diagram of the structure of a product recommendation system provided in an embodiment of this application; Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0022] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.

[0023] It should be noted that, unless there is a conflict, the various features in the embodiments of this application can be combined with each other, all of which are within the protection scope of this application. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Moreover, the terms "first," "second," and "third" used in this application do not limit the data or execution order, but only distinguish identical or similar items with essentially the same function and effect.

[0024] Before providing a detailed description of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows: (1) Model Context Protocol (MCP) is an open standard protocol for managing and sharing model context information. It aims to enable large language models (LLMs) to connect to and call external tools, data sources and services in a standardized, secure and efficient manner, like using a universal plug.

[0025] (2) Retrieval-Augmented Generation (RAG) is an AI framework that deeply integrates information retrieval and text generation. By connecting the Large Language Model (LLM) with an external knowledge base, the model can dynamically acquire the latest and most accurate information when generating answers, rather than relying solely on static knowledge during pre-training.

[0026] Currently, recommendation systems mainly employ the following technical solutions: collaborative filtering-based recommendation algorithms, simple rule engine matching, traditional customer service robots, and static product comparison tools. However, these solutions have significant shortcomings in handling complex business logic, providing personalized services, and ensuring information accuracy. For example, users struggle to understand complex insurance terms and product features, leading to severe information asymmetry; simple rule-based recommendation systems cannot meet personalized needs, resulting in insufficient recommendation accuracy; traditional customer service robots have slow response times and lack professionalism, leading to a poor user experience; product information, user profiles, and knowledge bases are stored in a scattered manner, making unified access difficult and resulting in data silos; and static product comparison tools cannot adjust recommendation strategies in real time according to market changes and product updates, resulting in poor real-time performance.

[0027] To address the aforementioned issues, this application proposes a product recommendation method to improve the service quality of recommendation services.

[0028] Please see Figure 1 , Figure 1 This is a schematic diagram of the structure of a product recommendation system provided in an embodiment of this application.

[0029] like Figure 1 As shown, the product recommendation system includes a front-end layer, a gateway layer, an application service layer, an AI engine layer, a data storage layer, and external services.

[0030] The front-end layer includes web clients, mobile clients, and mini-program clients; the gateway layer includes API gateways, load balancers, and authentication services; the application service layer includes shopping guide services, product management services, and user profiling services; the AI ​​engine layer includes the Dify orchestration platform, RAG engine, Deepseek V3 model, and MCP connector; the data storage layer includes a knowledge base, vector database, product database, and user database; and external services include regulatory data sources and insurance company APIs.

[0031] It should be noted that the products in the embodiments of this application can be different types of products, for example: (1) Tangible products refer to concrete items that can be sensed, touched, and used. For example: everyday consumer goods: such as food, beverages, and clothing. Durable consumer goods: such as home appliances, automobiles, and furniture. Industrial products: products that serve production or operation, such as machinery, equipment, raw materials, and tools.

[0032] (2) Intangible products refer to services or concepts that cannot be directly touched or perceived, but can satisfy a user's certain needs. For example: Services: such as education, medical care, tourism, transportation, and financial services. Software: such as applications, operating systems, and online tools. Knowledge or information products: such as e-books, training courses, and consulting services.

[0033] The following explanation uses an insurance product as an example: Please see Figure 2 , Figure 2 This is a flowchart illustrating a product recommendation method provided in an embodiment of this application.

[0034] like Figure 2 As shown, the recommended method for this product includes the following steps S201-S207: Step S201: Obtain the original statement information input by the user; Specifically, the system obtains raw statement information input by the user. This raw statement information includes unstructured natural language, and the way the user inputs the raw statement information is not specifically limited. For example, a functional control is set up on the page, which includes a user input box and preset labels. The user inputs the raw statement information by entering it in the input box or by selecting the raw statement information through the preset labels. Specifically, the raw statement information includes structured label selections, such as checking "education fund" or "long-term savings".

[0035] Step S202: Identify the user intent based on the original statement information; Specifically, user intent includes different types of intent, such as product recommendation intent, terms and conditions explanation intent, product comparison intent, benefit calculation intent, risk assessment intent, and purchase guidance intent.

[0036] Please refer to the following: Figure 3 , Figure 3 yes Figure 2 A detailed flowchart of step S202 in the process.

[0037] like Figure 3 As shown, step S202 includes the following steps S221-S223: Step S221: Extract features from the original sentence information to obtain keyword features, entity features, and semantic features; Specifically, a three-layer parallel extraction mechanism is used to extract keyword features, entity features, and semantic features from the original sentence information, for example: 1. Extract keyword features, including the following steps (1)-(3): (1) Perform text preprocessing on the original sentence information, including: word segmentation, stop word filtering, and part-of-speech tagging; (2) Perform domain dictionary matching on the original statement information, including: matching the insurance domain keyword library (product type, protection type, benefit type, target group, scenario, etc.). (3) Calculate the weight of keywords, including: use the TF-IDF algorithm to calculate the term frequency-inverse document frequency, position weighting (first sentence × 1.2) to output keywords, for example: ["child" (0.8), "education fund" (0.9), "insurance" (0.6)].

[0038] 2. Extract entity features, including the following steps (1)-(3): (1) Named entity recognition (NER) is performed on the original statement information, including: identifying 7 types of entities (product type, demographics, demand scenario, geographical location, risk preference, amount range, time period).

[0039] (2) Enhance the original statement information by template matching, including: extracting structured information such as age, amount, and term using regular expressions.

[0040] (3) Inferring entity relationships, including: supplementing implicit entities by combining user profiles (e.g., "for children" → inferring target: "children") to output entity features, for example: {product_types:["education fund"], target_audience:["children"], scenario:["education"]}.

[0041] 3. Extract semantic features, including the following steps (1)-(3): (1) Call the Embedding Service to extract the semantic features of the original statement information, including: using pre-trained models such as BERT / BGE-M3 to extract semantic features.

[0042] (2) Vectorize the original sentence information, including converting the whole sentence into a high-dimensional semantic vector (768-dimensional or 1536-dimensional).

[0043] (3) Deep semantic capture of the original statement information, including: understanding synonyms, implicit intentions, and sentiments, in order to output semantic features, such as: [0.234, -0.156, 0.892, ..., 0.445] (1536-dimensional floating-point array).

[0044] Step S222: Calculate the keyword matching score, semantic similarity score, and contextual continuity score based on keyword features, entity features, and semantic features; Specifically, for each candidate intent, a keyword matching score, a semantic similarity score, and a contextual continuity score are calculated, where... 1. Calculate keyword matching score, including: Traverse user keyword features. If a keyword exists in the "trigger keyword library" of the target intent, calculate "user keyword weight × intent keyword base weight" and sum them up to obtain the "total hit weight". The keyword matching score is Σ(hit keyword weight) / Σ(weight of all keywords for the intent).

[0045] 2. Calculate the semantic similarity score, including: Calculate the cosine similarity between the user input vector and the standard intent vector, and use the cosine similarity as the semantic similarity score. The cosine similarity is calculated as: cosine(user vector, intent vector) = (A·B) / (||A||×||B||), where A is the user semantic vector; B is the standard intent semantic vector; and A... B is the vector dot product; ||A|| and ||B|| are the L2 norm (length) of the vectors.

[0046] 3. Calculate the context continuity score, including: Based on historical dialogue information, a dialogue history feature cache is maintained. This cache records the three types of features and output intent for each round of dialogue. Features and intents from the most recent N rounds (e.g., N=3, to avoid interference from excessively long history) are extracted from the dialogue history feature cache. The rule base is traversed from high to low according to rule priority, and only the first rule that meets the conditions is matched (to avoid score distortion caused by multiple rules overlapping). The score corresponding to the rule is recorded. If a rule is matched, the context continuity score is determined to be equal to the score of that rule; if no rule is matched (or there is no historical dialogue), the context continuity score is determined to be zero.

[0047] Step S223: Calculate the initial confidence score for each intent type based on the pre-set weights corresponding to the keyword matching score, semantic similarity score, and contextual continuity score. Specifically, each of the keyword matching score, semantic similarity score, and contextual continuity score corresponds to a weight. For example, if the weights of the keyword matching score, semantic similarity score, and contextual continuity score are 0.3, 0.4, and 0.3 respectively, then the initial confidence score = keyword matching score * 0.3 + semantic similarity score * 0.4 + contextual continuity score * 0.3.

[0048] Step S224: Based on historical dialogue information, adjust the initial confidence score corresponding to each intent type to obtain the comprehensive confidence score corresponding to each intent type, and take the intent type with the highest comprehensive confidence score as the user intent; Specifically, obtaining historical conversation information includes: Real-time capture of historical dialogue information, such as calling the UpdateContext function for each interaction to capture user input, identify intent, system response, and related products. This historical dialogue information is stored in a structured manner; for example, dialogue rounds are added to the dialogHistory array in chronological order. This dialogHistory array maintains the most recent 50 dialogue rounds, automatically removing any that exceed this limit.

[0049] In this embodiment of the application, a user intent time series is also constructed using historical dialogue information to analyze the evolution trend of user intent. The user intent time series includes key information such as: previous round intent: the most recent round of DetectedIntent; products involved: a list of products discussed in the most recent N rounds; inquiry frequency: statistics on the number of times a topic appears in history; and demand changes: comparison of differences in user input between the previous and subsequent rounds (such as budget adjustments).

[0050] Specifically, historical dialogue information is obtained through the Context Manager, and the initial confidence score for each intent type is dynamically adjusted based on this information, including: (1) Adjust based on the previous intention. For example, if the previous intention is product recommendation and the current inquiry is about details, it means that the user inquires about product details after receiving the recommendation. Therefore, the priority of the intention to explain the terms is increased. The adjustment method is: the initial confidence score of the intention to explain the terms is increased by 0.2; the initial confidence score of the intention to recommend the product is decreased by 0.1.

[0051] (2) Adjust based on product attention. For example, if a user asks about the same product repeatedly (appearing ≥2 times in the last 3 rounds), it indicates that the user is paying close attention and has a high purchase intention. Therefore, increase the priority of related intents, for example, increase the score of intents related to the product by 0.15.

[0052] (3) Adjustments based on intent conversion patterns, for example: by identifying specific intent conversion sequences to conform to the user decision-making process, such as: common patterns are: recommendation → comparison → detailed explanation: initial confidence score of the intent of the clause explanation +0.3, clause explanation → follow-up question (continuous): initial confidence score of the intent of the clause explanation +0.2.

[0053] (4) Adjustments based on user behavior patterns, for example: If a certain type of clause is frequently asked, the corresponding intent score will increase by +0.25, and the retrieval weight will increase by 1.5. If a change in demand is detected (such as a budget adjustment), the initial confidence score of the product recommendation intent is increased by 0.3, and the user is proactively asked whether to re-recommend the product.

[0054] If a question is repeatedly identified (similarity > 0.9), then: reduce all intents by 0.5 and suggest past answers.

[0055] For example: The scenario is as follows: Round 1 recommends products → Round 2 compares products → Round 3 inquires about "What are the claim conditions for Product A?" Initial score: CLAUSE_EXPLANATION = 0.66 Adjustment process: Rule 1: Front wheel PRODUCT_COMPARISON → +0.2 = 0.86 Rule 2: Product A is mentioned twice consecutively → +0.15 = 1.01 (truncated to 1.0) Final result: CLAUSE_EXPLANATION = 1.0 (Explicit Intent), routed to the RAG engine to retrieve clause knowledge.

[0056] For example: if the previous dialogue information involved recommending a product and the current inquiry is for details: the initial confidence score corresponding to the intent to explain the terms is increased by 0.2, and the initial confidence score corresponding to the intent to recommend the product is decreased by 0.1; or, based on historical dialogue information, for example: if the same product is inquired about 3 times in a row, the initial confidence score corresponding to the intent to recommend the product is increased by 0.15, thus obtaining the comprehensive confidence score corresponding to each intent type, and determining the intent type with the highest comprehensive confidence score as the user intent.

[0057] In this embodiment, a context manager is used to maintain the structured dialogue history, recording the user input, intent, response, and products involved in each round. Based on four types of rules—previous round intent, product attention, intent conversion pattern, and user behavior preferences—the intent confidence level is dynamically adjusted (typically ±0.1~0.3) to ensure the coherence and accuracy of multi-round dialogues.

[0058] Furthermore, if the overall confidence score is less than the first score threshold, for example, 0.7, then the intent type with the highest overall confidence score is determined as the user intent; if there are at least two overall confidence scores greater than the second score threshold, for example, 0.8, then the user intent is determined as a composite intent, and the intent types with at least two overall confidence scores greater than the second score threshold are determined as composite intents, for example, a composite intent is a product recommendation intent + a terms explanation intent.

[0059] It is understandable that different intent types correspond to different triggering conditions and processing strategies. Table 1 below illustrates the different intent types and their corresponding triggering conditions and processing strategies.

[0060]

[0061] Table 1 After determining the user's intent, dialogue information is generated based on each intent type, including: If the intent type is product recommendation intent, then based on the model context protocol, the product database is queried to generate product recommendation information; If the intent type is the intent to interpret the clauses, then the clause knowledge base is searched based on the retrieval enhancement generation technology to generate clause knowledge information; If the intent type is product comparison intent, then multiple product details are called in parallel to obtain product comparison information; If the intent type is revenue calculation intent, then the calculation engine is invoked to calculate product revenue in combination with product parameters, and product revenue information is obtained. If the intent type is risk assessment intent, then risk assessment is performed by combining user profile and product characteristics to obtain risk assessment information; If the intent type is purchase guidance intent, then the process knowledge base will be retrieved to obtain purchase guidance information.

[0062] For example, if the intent type is product comparison intent (PRODUCT_COMPARISON), it refers to the user's interactive need to understand the differences, advantages and disadvantages between two or more insurance products. The trigger condition is that the user wants to compare the differences, advantages and disadvantages of multiple products. For example, the trigger scenario is: "Which is better, product A or product B?", "Help me compare these education savings insurance policies", "What are the differences in the coverage of these two products?" and other information.

[0063] By acquiring product information from at least two products in parallel, and determining comparison dimensions based on user questions and product characteristics, such as "premium", "coverage", "rate of return", "underwriting conditions", and "claims conditions", a comparison table is generated to obtain product comparison information.

[0064] Alternatively, if the intent type is CLAUSE_EXPLANATION, it refers to the user's need to understand the specific terms and conditions of the insurance product, exclusions, claims rules, and other professional information. The triggering condition is when the user inquires about the insurance terms, scope of liability, and claims rules. For example, the triggering scenario is: "What are the exclusions of this product?", "What diseases are included in critical illness?", "What materials are needed for claims?", etc.

[0065] The policy terms are identified through keyword matching, such as "exclusions," "claims," ​​"coverage," "payment," and "surrender." The RAG engine is used to perform multi-source policy knowledge retrieval, and the retrieved terms are analyzed in a structured manner. The depth of explanation is adjusted based on the user profile. For example, if the user is a novice in insurance, basic concept explanations are added, more analogies and examples are provided, and important precautions are highlighted; if the user is a professional, detailed legal citations are provided, exceptions are emphasized, and industry practice cases are supplemented.

[0066] By weighted and fused from three dimensions—keyword matching, semantic similarity, and contextual continuity—a comprehensive score is calculated for each candidate intent. The intent with the highest score is selected and routed to the corresponding processing strategy, which can better match user needs and provide targeted product recommendation solutions or services.

[0067] Step S203: Construct a first query request based on the user's intent; For details, please refer to [link / reference]. Figure 4 , Figure 4 yes Figure 2 A detailed flowchart of step S203 is shown.

[0068] like Figure 4As shown, step S203 includes the following steps S231-S232: Step S231: Extract label information based on the original sentence information and natural language understanding technology.

[0069] Specifically, Natural Language Understanding (NLU) technology is used to extract tags from the original sentence information to obtain tag information. The tag information includes user tags, custom tags, age range, income range, risk preference, and result limit. For example, if the original sentence information is "I want to prepare education funds for my child", NLU technology can be used to extract "education funds" as the product tag.

[0070] Step S232: Based on the tag information and user intent, construct a structured query request object to construct a first query request, wherein the first query request includes the structured query request object.

[0071] Specifically, based on the identified user intent and combined with tag information, a structured query request object is constructed, including: (1) According to the preset mapping rules, the extracted entities are filled into the basic fields of the query request object (ProductQuery). The preset mapping rules include: pre-defining the one-to-one correspondence between the extracted entity types and the ProductQuery fields.

[0072] (2) Integrate user profiles into missing fields, for example: supplement missing fields from UserProfile, including: user age → infer age_range; user city → supplement custom_tags; user income → fill income_range.

[0073] (3) By calling the Large Language Model (LLM), the implicit needs of users that are not explicitly expressed (such as risk preferences, product duration, expected number of results, etc.) are inferred by combining the three types of information: “user input + extracted entities + user profile” and populated into the advanced fields of ProductQuery.

[0074] (4) By applying the business rules of the industry / enterprise, the field values ​​of ProductQuery are validated, adjusted and filtered to ensure that the query conditions comply with the business specifications (such as product restrictions, user qualification requirements, etc.) and to avoid invalid queries or illegal results.

[0075] For example, if the user intent is product recommendation, and the tag information includes user tags, age range, risk preference, and a limit on the number of results, then the generated query request object would be: JSON { "user_tags": ["educational funds", "family security"], "custom_tags": ["First-tier cities"], "age_range": { "min": 30, "max": 35}, "preferences": { "risk_level": "medium"}, "limit": 15 } Subsequently, based on the query request object, a first query request is generated, wherein the first query request includes a structured query request object.

[0076] Step S204: Based on the first query request and the model context protocol, query the product database to determine the candidate product list; For details, please refer to [link / reference]. Figure 5A , Figure 5A yes Figure 2 A detailed flowchart of step S204 is shown.

[0077] like Figure 5A As shown, step S204 includes the following steps S241-S243: Step S241: Based on the first query request, encapsulate the first query request through the model context protocol to construct a model context protocol request object; Specifically, the first query request is a product query request. It connects to the product database through the Model Context Protocol (MCP protocol), and uses the Model Context Protocol to encapsulate the first query request in order to construct a Model Context Protocol request object.

[0078] Step S242: Request the object according to the model context protocol, execute a remote procedure call query to query the product database and obtain the product query results; Please refer to the following: Figure 5B , Figure 5B This is a schematic diagram illustrating a product query using the MCP protocol, as provided in an embodiment of this application.

[0079] like Figure 5BAs shown, the AI ​​model initiates a product query request to the MCP client. The MCP client encapsulates the product query request through the MCP protocol and sends the encapsulated product query request to the MCP server, so that the MCP server executes a remote procedure call query (gRPC query) to the product factory service. The product factory service returns the raw data, and the MCP server performs data formatting processing on the raw data to obtain formatted data. The MCP server then returns the formatted data to the MCP client through the MCP protocol. The MCP client parses the formatted data and returns structured data, i.e., the product query result, to the AI ​​model.

[0080] Specifically, after receiving a product query request, the MCP server converts the product query request into an actual query instruction (such as SQL) to the Product Database.

[0081] Step S243: Determine the candidate product list based on the product query results.

[0082] Specifically, the obtained product query results are added to the candidate product list to determine the candidate product list, which includes the product query results.

[0083] Furthermore, the method also includes: To obtain product details for products in the candidate product list, the process includes: constructing a detail query MCP request, sending an MCP protocol request to the MCP client, and having the MCP server execute a remote procedure call query to obtain detailed product information.

[0084] In this embodiment, connecting to the product database via the Model Context Protocol (MCP) enables efficient interaction between the AI ​​model and the data source. Furthermore, employing the MCP standard protocol ensures interoperability between systems, reduces system coupling, and improves maintainability and scalability.

[0085] Furthermore, after obtaining the list of candidate products, the method also includes: Based on the recommendation constraint algorithm, the candidate product list is pre-filtered to obtain the filtered candidate product list, including: Based on the constraint rules in the recommendation restriction algorithm, the candidate product list is pre-filtered to obtain the filtered candidate product list. The constraint rules in the Recommendation Constraint Engine include at least one of the following: user profile constraint rules, business constraint rules, compliance and regulatory constraint rules, and risk control constraint rules.

[0086] Specifically, the constraints of the User Profile Constraints are shown in Table 2 below:

[0087] Table 2 Specifically, the constraints of the Business Rule Constraints are shown in Table 3 below:

[0088] Table 3 Specifically, the content of compliance constraints is shown in Table 4 below:

[0089] Table 4 Specifically, the constraints of the risk control constraints are shown in Table 5 below:

[0090] Table 5 Furthermore, this application also updates the constraint rules in the recommendation constraint algorithm through dynamic constraint rule adjustment. Specifically, the dynamically adjusted content includes: (1) Optimize the rules for obtaining user feedback, such as: analyze user feedback data, for example: if the proportion of "excessive premium" in negative feedback is >30%, then reduce the income constraint threshold: 15% → 12%, and record the rule adjustment ("reduce the premium constraint threshold based on user feedback").

[0091] (2) Adjust rules based on market conditions. For example, if the interest rate level in the market data is less than the historical average * 0.8, increase the weight of fixed income products and decrease the weight of floating income products; or, if the regulatory policies in the market data change, update the compliance inspection rule base and recalibrate the risk level standards.

[0092] (3) Rule calibration based on performance data, such as adjusting product recommendation weights based on historical recommendation data. For example, if the conversion rate of a certain product type is less than the average conversion rate * 0.5, the recommendation weight of that type of product will be reduced, and the weight of alternative product types will be increased.

[0093] During the execution of the recommendation restriction algorithm, user profile constraint rules, business constraint rules, compliance and regulatory constraint rules, and risk control constraint rules can be applied at different stages. For example, user profile constraint rules can be used to hard exclude products that do not meet the underwriting conditions based on factors such as age, income, and health status; business constraint rules can be used to apply business logic such as sales policies, channel restrictions, and product combination rules; compliance and regulatory constraint rules can be used to check regulatory requirements such as information disclosure requirements, prohibited expressions, and sales qualifications; and risk control constraint rules can be used to assess risk indicators such as premium ratio, product concentration, and risk exposure to obtain the execution results. Then, the constraint rules can be dynamically adjusted based on the execution results to generate a constraint execution report.

[0094] In this embodiment, a recommendation restriction algorithm with multi-dimensional constraints is used as an auxiliary control mechanism for AI model decision-making to ensure that the recommendation results meet business expectations, regulatory requirements and actual user needs, and to avoid the model generating unrealistic or illegal recommendation content, thereby providing users with safe, compliant and personalized product recommendation services.

[0095] Furthermore, by covering four core dimensions—user profiling, business rules, compliance and supervision, and risk control—comprehensive recommendation quality assurance can be achieved. At the same time, by adjusting constraint parameters in real time based on user feedback and market changes, the adaptability and accuracy of the recommendation system can be improved.

[0096] Step S205: Generate a second query request based on the original statement information and the candidate product list; Please refer to the following: Figure 6 , Figure 6 yes Figure 2 A detailed flowchart of step S205 in the process.

[0097] like Figure 6 As shown, step S205 includes the following steps S251-S253: Step S251: Obtain user profile; Specifically, a user profile refers to a description of a user's characteristics, including various types of user data (attributes, behaviors, preferences, needs, etc.), such as age, income, family structure, and geographic location.

[0098] Step S252: Generate query text based on user profile, original statement information, and candidate product list; Specifically, based on user profiles, original statement information, and a list of candidate products, a query text is generated. This query text is a composite query text used for knowledge retrieval, such as: "Explain to a 30-year-old, married person with children, residing in Shenzhen why [Product A Name] and [Product B Name] are recommended as education fund reserves, and explain the core advantages and precautions of each of Product A and Product B."

[0099] Step S253: Generate a second query request based on the query text.

[0100] Specifically, the query text is used as a parameter to generate a second query request, which includes the query text.

[0101] Step S206: Based on the second query request, and using retrieval enhancement generation technology, search the vector database to determine the query results; Please refer to the following: Figure 7 , Figure 7 yes Figure 2 A detailed flowchart of step S206 is shown.

[0102] like Figure 7 As shown, step S206 includes the following steps S261-S263: Step S261: Based on the query text, the query text is converted into a high-dimensional semantic vector through the retrieval enhancement generation engine; Specifically, the Retrieval-Augmented Generation (RAG) engine, also known as the RAG engine, utilizes its Embedding Service to convert the query text into a high-dimensional semantic vector. For example, the Embedding model converts the query text into a 1536-dimensional semantic vector. In essence, a semantic vector (Embedding) is a high-dimensional numerical array that transforms text content through a deep learning model, used to mathematically represent the semantic meaning of the text.

[0103] In the embodiments of this application, each query text corresponds to a vector of fixed length. The vector dimension is usually 768 to 1536 dimensions. Furthermore, texts with similar meanings are closer in distance in high-dimensional space. For example, the vectors of "critical illness insurance" and "major illness insurance" have a small angle and high cosine similarity.

[0104] Step S262: Based on high-dimensional semantic vectors, the vector database is searched through a retrieval-enhanced generation engine to obtain knowledge fragments; Specifically, the RAG engine sends a retrieval request to the vector database, enabling the database to execute the query using context, calculate cosine similarity, and sort in descending order. This retrieval request sets a vector similarity threshold, and the vector database calculates cosine similarity using the HNSW algorithm. If the cosine similarity is greater than the threshold, a semantic similarity match is determined. Furthermore, the search scope is limited to documents associated with candidate product IDs. The retrieval request specifies the return of multiple key fields, such as document content, title, type (terms, FAQs, product descriptions, etc.), tags, and metadata. The number of results returned can be controlled via the topK parameter to obtain one or at least two relevant knowledge fragments.

[0105] By setting a vector similarity threshold, the semantic relevance of search results can be ensured; comprehensive multi-field retrieval, such as returning multiple fields like id, title, content, and type, provides complete document context information; equivalence filtering based on product ID enables precise location of product-specific knowledge; and controlling the number of returned results using the topK parameter balances search quality and computational efficiency. Through a hybrid retrieval method combining semantic vector similarity matching (soft matching) and precise product ID filtering (hard filtering), the Top K most relevant documents are accurately located from a massive vector database.

[0106] Step S263: Determine the query results based on the knowledge fragments, wherein the query results include the knowledge fragments.

[0107] Specifically, the RAG engine parses and reconstructs one or more related knowledge fragments based on one or more related knowledge fragments to generate a JSON array containing multiple structured knowledge fragments, including: Perform operations such as extraction, transformation, deduplication, sorting, grouping, and formatting on one or more related knowledge fragments. For example, extract data from nested JSON, map it to a Document structure, deduplicate it based on ID and content hash, sort it based on similarity, type, and time, group it based on product, and format it according to context strings to generate a JSON array.

[0108] Step S207: Generate product recommendation reasons based on the query results.

[0109] Please refer to the following: Figure 8 , Figure 8 yes Figure 2 A detailed flowchart of step S207 is shown.

[0110] like Figure 8As shown, step S207 includes the following steps S271-S273: Step S271: Generate context information based on knowledge fragments; Specifically, contextual information is generated based on one or at least two related knowledge fragments. This contextual information is then combined with intelligent prompt words to be input into a large language model, such as the DeepSeek large language model.

[0111] Step S272: Construct intelligent suggestion words; Specifically, constructing intelligent suggestion words includes: (1) Define a professional prompt template, for example: Set the professional prompt template as: You are a professional insurance product consultant. Please answer the user's questions based on the following information: Product Information: Related knowledge: User issue: Please provide accurate, professional, and easy-to-understand answers, and ensure the accuracy of the information. If specific terms are involved, please cite the relevant terms.

[0112] (2) Format the product information; (3) Fill in the template parameters to generate smart prompt words.

[0113] Step S273: Input the context information and smart prompts into the large language model to generate product recommendation reasons.

[0114] Specifically, contextual information and intelligent prompts are input into the large language model, enabling the large language model to output specific product recommendation reasons based on the contextual information and intelligent prompts.

[0115] In this embodiment of the application, by combining the recommendation algorithm with the capabilities of a large language model, it is possible to integrate multi-dimensional features such as user profiles, product characteristics, and behavioral data. Furthermore, the recommendation weights can be adjusted in real time based on user feedback, and a detailed reasoning process can be provided for each recommendation, thereby enhancing interpretability.

[0116] The following example illustrates the implementation process of the product recommendation method in this application: Example: Savings Channel Product Recommendations User A, 30 years old, residing in Shenzhen, with an annual income of 500,000 yuan, married with children, selects "Family Security," "Education Fund," and "First-Tier City" through the preset tags in the function controls: (1) The system determines that users’ insurance needs are biased towards family responsibility protection through user profile analysis; (2) MCP connectors were searched in the product database and 15 related products were selected; (3) The recommendation algorithm calculates the matching degree and recommends the top 3 products after sorting; (4) The RAG system provides product feature descriptions and terms and conditions explanations; (5) When users inquire about product details, the system provides professional answers through dialogue management.

[0117] By intelligently recommending suitable products from a large-scale product database based on user characteristics and demand tags, and providing professional product answer services, we can achieve efficient, accurate and personalized product guidance.

[0118] It should be noted that during the product recommendation process, users often ask multiple questions and engage in dialogue with the system; therefore, real-time dialogue management is necessary.

[0119] Please see Figure 9 , Figure 9 This is an interactive schematic diagram of a dialogue management system provided in an embodiment of this application.

[0120] like Figure 9 As shown, the interaction of dialogue management includes the following steps (1)-(9): (1) The user sends a message to the conversation manager; The Dialog Manager is used to manage and control the dialogue flow.

[0121] (2) The context manager obtains the dialogue context; The Context Manager is used to manage the context information of dialogues and interactions.

[0122] (3) The context manager returns context information to the dialog manager; (4) Identify user intent through the intent recognition module; Specifically, the intent recognition module is used to perform intent recognition. It extracts features from the original statement information, calculates the initial confidence score for each intent type, adjusts the initial confidence score for each intent type based on historical dialogue information, and obtains the comprehensive confidence score for each intent type. The intent type with the highest comprehensive confidence score is taken as the user intent.

[0123] (5) The intent recognition module returns the intent type to the dialogue manager; (6) Return the corresponding information according to the type of intent. For example, for product consultation intent, i.e. product recommendation intent, return relevant information by searching product knowledge; for clause interpretation intent, return clause interpretation by searching clause information; for product comparison intent, i.e. product comparison intent, return comparison information by searching multiple products.

[0124] It should be noted that the choice between calling MCP product query or RAG knowledge retrieval depends on the intent type.

[0125] (7) Generate a reply using a reply generator to return the reply content; (8) Update the dialogue context through the context management module; Specifically, the context management module manages the dialogue state and maintains user preferences and historical interaction records. The context window is limited, and its size is maintained by removing the oldest dialogue record.

[0126] Furthermore, embodiments of this application also update preference weights based on user behavior, including: if a user frequently inquires about a certain type of clause, the retrieval weight of the corresponding knowledge type is increased; if a user shows interest in a certain product, the product is added to the list of preferred products.

[0127] Furthermore, embodiments of this application also verify the consistency between the current response and historical dialogues, including: if the user has previously asked the same question, reminding the user and providing supplementary information on the historical answers; if the user changes their needs (such as budget adjustments), proactively asking if a new product recommendation is needed.

[0128] (9) Return a reply to the user.

[0129] Specifically, select the corresponding reply template based on the type of intent, and adjust the reply language style based on the user profile. For example, if the user is under 30 years old, use a more lively and easy-to-understand expression; if the user is a high-income group, highlight the product's value-added services and high-end guarantees to achieve personalized content.

[0130] Furthermore, improving response quality by controlling response length (200-500 words recommended), adding structured displays (tables, lists), providing follow-up guidance questions, and including necessary risk warnings and disclaimers can achieve an intelligent, efficient, and personalized user interaction experience.

[0131] Please refer to the following: Figure 10 , Figure 10 This is a schematic diagram of the overall process of a product recommendation method provided in an embodiment of this application.

[0132] like Figure 10As shown, the overall process of this product recommendation method includes the following steps 1-32: Step 1: Users select tags or input their needs through the front-end interface; Step 2: The front-end interface sends the recommendation request to the API gateway; Step 3: The API gateway forwards the shopping guide service request; Step 4: The shopping guide service calls the AI ​​Agent to the Dify platform; Specifically, the shopping guide service receives the user's original input request, which may be unstructured natural language (such as "I want to prepare education funds for my child") or structured tag selection (such as checking "education funds" or "long-term savings"). The AI ​​Agent built into the Dify workflow first calls the Intent Recognition module to determine the user input as "product recommendation intent (PRODUCT_RECOMMENDATION)". At the same time, it extracts key entities and tags through Natural Language Understanding (NLU) technology. For example, it extracts "education funds" as a product tag from "I want to prepare education funds for my child" and combines it with the "have children" feature in the user profile.

[0133] It's worth noting that Dify is an open-source LLM application development platform designed for building, deploying, and managing generative AI applications. It integrates Backend-as-a-Service (BaaS) and LLMops (Large Language Model Operations) concepts, enabling both developers and non-technical personnel to quickly create production-ready AI applications through low-code / no-code methods.

[0134] Step 5: The Dify platform queries relevant products through the MCP connector; Dify's AI Agent dynamically constructs structured query request objects (ProductQuery) based on identified user intent and entities, for example: JSON { "user_tags": ["educational funds", "family security"], "custom_tags": ["First-tier cities"], "age_range": { "min": 30, "max": 35}, "preferences": { "risk_level": "medium"}, "limit": 15 } Furthermore, the Dify platform initiates a call through the MCP Connector, sending the aforementioned structured query request to the MCP server. The call method is products / query.

[0135] Step 6: MCP connectors perform a product search through the product database; After receiving the request, the MCP server converts it into an actual query instruction (such as SQL) for the Product Database.

[0136] Step 7: The product database returns a product list to the MCP connector; Specifically, the Product Database returns raw product data that meets the criteria. The MCP service encapsulates this data into a standardized ProductResult structure, which includes a list of products, total count, and initial match score.

[0137] Step 8: The MCP connector returns product data to the Dify platform; The product data is structured and returned to the Dify platform via the MCP connector. This data includes not only basic product information (such as name, company, and type), but also key fields for subsequent recommendations and explanations, such as product features, target customers, and core benefits.

[0138] Step 9: The Dify platform requests relevant knowledge from the RAG engine; Specifically, the Dify platform (AI Agent) generates a composite query request for knowledge retrieval based on user profiles, the user's original question, and a list of candidate products. For example, the query request could be: "Explain to a 30-year-old, married user with children, residing in Shenzhen why [Product A Name] and [Product B Name] are recommended as education savings, and explain their respective core advantages and precautions."

[0139] Step 10: The RAG engine performs semantic retrieval from the knowledge base; Specifically, the Knowledge Base is used to store and manage system knowledge and information. This knowledge base includes vector databases, such as the Weaviate vector database, for storing and querying vector data. The Dify platform calls the RetrieveRelevantKnowledge function of the RAG Engine, passing the aforementioned query and associated product IDs as parameters. The Embedding Service in the RAG Engine first converts the input complex query text into a high-dimensional semantic vector. The RAG engine initiates a complex search request to the vector database (Weaviate), enabling the database to execute the query using context, calculate cosine similarity, and sort the results in descending order. This search request sets a vector similarity threshold, and the database calculates cosine similarity using the HNSW algorithm. If the cosine similarity is greater than the threshold, a semantic similarity match is determined. Furthermore, the search scope is limited to documents associated with candidate product IDs. The search request specifies the return of multiple key fields, such as document content, title, type (terms, FAQ, product description, etc.), tags, and metadata. The topK parameter controls the number of results returned, ensuring one or at least two relevant knowledge fragments are obtained.

[0140] Step 11: The knowledge base returns knowledge fragments to the RAG engine; Specifically, after executing a query, the vector database returns one or more of the most relevant raw data from knowledge documents. The RAG engine parses and reconstructs these results, encapsulating them into a structured array of Document objects.

[0141] Step 12: The RAG engine returns knowledge data to the Dify platform; Specifically, the RAG engine returns a JSON array containing multiple structured knowledge fragments to the Dify platform. For example, the generated JSON array is: JSON [ { "id": "doc-001", "title": "Core Benefits of Product A", "content": "Product A offers a dual-account value-added structure, flexible access to education funds, and waiver of critical illness benefits for the policyholder...", "type": "Product Description", "product_id": "product_A_id", Tags: ["Education Fund", "Dual Accounts"]}, { "id": "doc-002", "title": "Frequently Asked Questions about Early Collection", "content": "Q: If my child goes abroad to study, can I receive the visa in advance? A: Yes, Section 3.4 stipulates...", "type": "FAQ", "product_id": "product_A_id", "tags": ["receive", "study abroad"] }, { "id": "doc-003", "title": "Coverage Scope of Product B", "content": "In addition to providing university education funds, Product B also covers the costs of further education...", "type": "Terms", "product_id": "product_B_id", "tags": ["Scope of coverage", "Further education"] }

[0142] Step 13: The Dify platform requests the Deepseek model to generate recommendation reasons; Specifically, knowledge data is combined with prompt word templates and input into the Deepseek model, which then returns product recommendation results or reasons for the recommendation.

[0143] Step 14: The Deepseek model returns recommendation results to the Dify platform; Step 15: The Dify platform returns the AI ​​processing result to the shopping guide service; Step 16: The shopping guide service returns recommendations to the API gateway; Step 17: Display recommended products on the front-end interface; Step 18: The front-end interface displays the results to the user; Step 19: Users ask questions about product details through the front-end interface; Step 20: The front-end interface sends a problem to the API gateway; Step 21: API gateway forwarding issue with shopping guide service; Step 22: The Dify platform processes the questions and answers; Step 23: The Dify platform retrieves expertise from the RAG engine; Step 24: The RAG engine queries the knowledge base for interpretation of the terms; Step 25: The knowledge base returns accurate information to the RAG engine; Step 26: The RAG engine returns expertise to the Dify platform; Step 27: The Dify platform generates a professional solution using the Deepseek model; Step 28: The Deepseek model returns the solution to the Dify platform; Step 29: Dify platform's shopping guide service returns a solution; Step 30: The shopping guide service forwards the answer to the API gateway; Step 31: The API gateway returns the answer to the front-end interface; Step 32: The front-end interface displays professional answers to the user.

[0144] In this embodiment, by leveraging the MCP protocol and RAG technology, and through innovative technical architecture and algorithm design, the system effectively addresses issues such as information asymmetry, insufficient recommendation accuracy, and poor user experience in traditional insurance sales. The system features high accuracy, high efficiency, and high availability, providing crucial technical support for the digital transformation of the insurance technology industry.

[0145] Table 6 below compares the solutions provided in the embodiments of this application with traditional solutions:

[0146] Table 6 As can be seen, the solution in this application can improve recommendation accuracy, reduce response time, increase user satisfaction, increase conversion rate, and reduce operation and maintenance costs.

[0147] In this embodiment of the application, a product recommendation method is provided, comprising: obtaining original statement information input by a user; identifying user intent based on the original statement information; constructing a first query request based on the user intent; querying a product database based on a model context protocol according to the first query request to determine a candidate product list; generating a second query request based on the original statement information and the candidate product list; searching a vector database based on a retrieval enhancement generation technique according to the second query request to determine query results; and generating product recommendation reasons based on the query results.

[0148] By acquiring the user's original input information and identifying the user's intent, the product database is queried based on the model context protocol to determine a list of candidate products. Further, retrieval enhancement generation technology is used to search the vector database to determine the query results. Based on the query results, product recommendation reasons are generated. This approach can combine the MCP protocol and RAG technology to improve the service quality of recommendation services.

[0149] Please see Figure 11 , Figure 11 This is a schematic diagram of the structure of a product recommendation system provided in an embodiment of this application.

[0150] like Figure 11 As shown, the product recommendation system 110 includes: Vector database 111 is used to store knowledge fragments; Product database 112 is used to store product data; Dialogue manager 113 is used to obtain the original statement information input by the user; The intent recognition module 114 is used to recognize the user's intent based on the original statement information; MCP server 115 is used to obtain the first query request, and based on the first query request, query the product database to determine the candidate product list according to the model context protocol. RAG engine 116 is used to obtain the second query request, and based on the second query request, to search the vector database and determine the query results using retrieval enhancement generation technology. Large Language Model 117 is used to generate product recommendation reasons based on query results.

[0151] It should be noted that the specific content of the above-mentioned product recommendation system 110 can be found in the relevant content mentioned in the above embodiments, and will not be repeated here.

[0152] Please refer to the following: Figure 12 , Figure 12 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0153] like Figure 12 As shown, the electronic device 120 includes one or more processors 121 and a memory 122. Wherein, Figure 12 Take a processor 121 as an example.

[0154] Processor 121 and memory 122 can be connected via a bus or other means. Figure 12 Taking the example of a connection between China and Israel via a bus.

[0155] The memory 122, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules, such as the program instructions / modules corresponding to the vehicle insurance data testing method in the embodiments of this application. The processor 121 executes various functional applications and data processing by running the non-volatile software programs, instructions, and modules stored in the memory 122, thereby realizing the functions of the product recommendation method provided in the above method embodiments and the various modules or units in the above device embodiments.

[0156] Memory 122 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 122 may optionally include memory remotely located relative to processor 121, and such remote memory may be connected to processor 121 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0157] The program instructions / modules are stored in memory 122 and, when executed by one or more processors 121, perform the product recommendation method in any of the above method embodiments.

[0158] The electronic device 120 in this application embodiment exists in various forms, and performs the above-described... Figure 2 When the various steps shown can be implemented, or when the functions of the various units can be realized, the above-mentioned electronic equipment 120 includes, but is not limited to: tower servers, rack servers, blade servers, cloud servers, computers, and other equipment.

[0159] This application also provides a non-volatile computer-readable storage medium storing computer-executable instructions that are executed by one or more processors, for example... Figure 12 One of the processors 121 can enable the one or more processors to execute the product recommendation method in any of the above method embodiments.

[0160] This application also provides a computer program product, which includes one or more lines of program code stored in a non-volatile computer-readable storage medium. The processor of an electronic device reads the program code from the non-volatile computer-readable storage medium and executes the program code to complete the steps of the product recommendation method described above.

[0161] The apparatus or device embodiments described above are merely illustrative. The unit modules described as separate components may or may not be physically separate, and the components shown as module units may or may not be physical units; that is, they may be located in one place or distributed across multiple network module units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0162] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus a general-purpose hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, 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, magnetic disk, optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods of various embodiments or some parts of embodiments.

[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and not to limit them; under the concept of this application, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of this application as described above. For the sake of brevity, they are not provided in detail; although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

Claims

1. A product recommendation method, characterized in that, include: Obtain the original statement information input by the user; Based on the original statement information, identify the user's intent; Based on the user's intent, construct a first query request; Based on the first query request, the product database is queried according to the model context protocol to determine the candidate product list; Based on the original statement information and the candidate product list, a second query request is generated; Based on the second query request, the vector database is searched using retrieval enhancement generation technology to determine the query results; Based on the query results, a product recommendation reason is generated.

2. The method according to claim 1, characterized in that, The step of identifying user intent based on the original statement information includes: Feature extraction is performed on the original statement information to obtain keyword features, entity features, and semantic features; Based on the keyword features, entity features, and semantic features, calculate the keyword matching score, semantic similarity score, and contextual continuity score; Based on the pre-set weights corresponding to keyword matching scores, semantic similarity scores, and contextual continuity scores, the initial confidence score for each intent type is calculated. Based on historical dialogue information, the initial confidence score corresponding to each intent type is adjusted to obtain a comprehensive confidence score corresponding to each intent type. The intent type with the highest comprehensive confidence score is taken as the user intent. The types of intent include: product recommendation intent, terms interpretation intent, product comparison intent, profit calculation intent, risk assessment intent, and purchase guidance intent.

3. The method according to claim 2, characterized in that, The method further includes: Based on each of the stated intent types, generate dialogue information, including: If the intent type is a product recommendation intent, then based on the model context protocol, the product database is queried to generate product recommendation information; If the intent type is the intent to interpret the clause, then the clause knowledge base is retrieved based on the retrieval enhancement generation technology to generate clause knowledge information; If the intent type is a product comparison intent, then multiple product details are called in parallel to obtain product comparison information; If the intent type is a revenue calculation intent, then the calculation engine is invoked to calculate the product revenue in combination with the product parameters, and the product revenue information is obtained. If the intent type is a risk assessment intent, then a risk assessment is performed by combining the user profile and product characteristics to obtain risk assessment information; If the intent type is a purchase guidance intent, then the process knowledge base is retrieved to obtain purchase guidance information.

4. The method according to claim 1, characterized in that, Constructing the first query request based on the user intent includes: Based on the original statement information, tag information is extracted using natural language understanding technology. The tag information includes, but is not limited to, user tags, custom tags, age range, income range, risk preference, and result limit. Based on the tag information and the user intent, a structured query request object is constructed to construct a first query request, wherein the first query request includes the structured query request object.

5. The method according to claim 1, characterized in that, The step of querying the product database based on the model context protocol according to the first query request to determine the candidate product list includes: Based on the first query request, the first query request is encapsulated through the model context protocol to construct a model context protocol request object; Based on the model context protocol request object, execute a remote procedure call query to query the product database and obtain the product query results; Based on the product query results, a list of candidate products is determined.

6. The method according to claim 5, characterized in that, The method further includes: Based on the recommendation restriction algorithm, the candidate product list is pre-filtered to obtain a filtered candidate product list, including: Based on the constraint rules in the recommendation restriction algorithm, the candidate product list is pre-filtered to obtain the filtered candidate product list; The constraint rules include at least one of the following: user profile constraint rules, business constraint rules, compliance and regulatory constraint rules, and risk control constraint rules.

7. The method according to claim 1, characterized in that, The step of generating a second query request based on the original statement information and the candidate product list includes: Obtain user profiles; Generate query text based on the user profile, the original statement information, and the candidate product list; A second query request is generated based on the query text.

8. The method according to claim 7, characterized in that, The step of searching the vector database based on the second query request and using retrieval enhancement generation technology to determine the query results includes: Based on the query text, the query text is converted into a high-dimensional semantic vector through a retrieval enhancement generation engine; Based on the high-dimensional semantic vectors, a retrieval-enhanced generation engine searches the vector database to obtain knowledge fragments. Based on the knowledge fragment, the query results are determined, wherein the query results include the knowledge fragment.

9. The method according to claim 8, characterized in that, The process of generating product recommendation reasons based on the query results includes: Generate context information based on the knowledge fragments; Build intelligent suggestion words; The context information and the intelligent prompts are input into a large language model to generate product recommendation reasons.

10. A product recommendation system, characterized in that, include: Vector databases are used to store knowledge fragments; A product database is used to store product data; The dialogue manager is used to obtain the original statement information input by the user; The intent recognition module is used to identify the user's intent based on the original statement information; The MCP server is used to obtain the first query request, and based on the first query request, query the product database according to the model context protocol to determine the candidate product list; The RAG engine is used to obtain a second query request, and based on the second query request, to search the vector database using retrieval enhancement generation technology to determine the query results; A large language model is used to generate product recommendation reasons based on query results.

11. An electronic device, characterized in that, include: At least one processor; At least one memory for storing at least one program; When at least one of the programs is executed by at least one of the processors, such that at least one of the processors implements claim 1 9. Any one of the methods described.

12. A non-volatile computer-readable storage medium storing a processor-executable program, characterized in that, The processor-executable program, when executed by the processor, is used to perform as claimed in claim 1.

9. Any one of the methods described.