Online commodity recommendation method and apparatus, device and storage medium

By identifying user query intent and generating target product keywords during online shopping, the problem of chatbots being unable to recommend products has been solved, achieving accurate recommendations and improved user experience.

WO2026237236A1PCT designated stage Publication Date: 2026-11-19RAJAX NETWORK &TECHNOLOGY (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/122278
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2025-05-14
Filing Date
2025-09-18
Publication Date
2026-11-19

AI Technical Summary

Technical Problem

In existing online shopping scenarios, chatbots, due to their limited understanding and communication capabilities, are unable to recommend products to users when the purchase intention is not obvious in the conversation, resulting in a degraded user experience.

Method used

By responding to the user's input target query text through electronic devices, keywords and query intent are determined, target product keywords are generated, prompt text is constructed using a first query model or a second query model, product recommendation information is generated, and user profile information and historical data are combined to accurately capture user purchase interests and recommend products.

Benefits of technology

Even if users do not explicitly express their purchase intention, electronic devices can accurately capture and recommend relevant products, saving users' filtering time, increasing user stickiness and purchase probability, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025122278_19112026_PF_FP_ABST
    Figure CN2025122278_19112026_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides an online commodity recommendation method and apparatus, a device and a storage medium, the method being applied to the technical field of artificial intelligence. The method comprises: in response to target query text input by a user, on the basis of the target query text, determining a keyword and a query intent corresponding to the target query text; when the query intent is an intent other than a purchase intent, on the basis of the keyword corresponding to the target query text, generating a target commodity keyword; on the basis of the target commodity keyword, obtaining at least one piece of first commodity recommendation information; and displaying said at least one piece of first commodity recommendation information. By means of the method, during an online shopping process of a user, even if the user does not explicitly express a purchase intent, purchase interests of the user can be accurately captured and mined, and commodities are recommended to the user, thereby saving the time for users to screen commodities, and improving the stickiness and purchase probability of users.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus, device, and storage medium for online product recommendation.

[0001] This application claims priority to Chinese Patent Application No. 2025106252911, filed on May 14, 2025, entitled "A Method, Apparatus, Device and Storage Medium for Online Product Recommendation", the entire contents of which are incorporated herein by reference. Technical Field

[0002] This application relates to the field of artificial intelligence technology, and more particularly to a method, apparatus, device, and storage medium for online product recommendation in the field of artificial intelligence technology. Background Technology

[0003] Currently, with the continuous development of intelligent technology and the e-commerce industry, in addition to traditional offline shopping, merchants have begun to launch online shopping services to provide users with a faster and more convenient shopping experience, allowing users to purchase goods without leaving home.

[0004] For example, in the scenario of ordering food online, the online shopping (ordering) method involves the user interacting with a chatbot, which then pushes suitable products and reasonable shopping suggestions to the user based on the content of the conversation.

[0005] However, in current online shopping scenarios, due to the limited understanding and communication capabilities of chatbots, when the purchase intention in the conversation between the user and the chatbot is not obvious, the chatbot cannot recommend products to the user, thus reducing the user's conversation experience. Summary of the Invention

[0006] This application provides a method, apparatus, device, and storage medium for online product recommendation. The method enables electronic devices to accurately capture and analyze a user's purchasing interests during online shopping, even if the user does not explicitly express a purchase intention, and then recommend products to the user. This product recommendation method saves users time in filtering products and increases user engagement and purchase probability.

[0007] In a first aspect, this application provides a method for recommending products online, the method comprising: responding to a target query text input by a user, determining keywords and query intent corresponding to the target query text based on the target query text; when the query intent is an intent other than a purchase intent, generating target product keywords based on the keywords corresponding to the target query text; obtaining at least one first product recommendation information based on the target product keywords; and displaying the at least one first product recommendation information.

[0008] In the above technical solution, this application proposes a method for online product recommendation. During a dialogue between a user and a virtual shopping guide, the electronic device responds to the user's input target query text and can determine the keywords and query intent corresponding to the target query text. When the electronic device recognizes that the user's query intent is not a purchase intent, it can generate target product keywords based on the keywords corresponding to the target query text. In this process, the electronic device can capture the user's needs, mine and generate relevant product keywords even when the user has no purchase intention, making product recommendation scenarios more flexible and extensive. It also saves the user's query time and improves the efficiency of the dialogue between the user and the virtual shopping guide. Finally, the electronic device can obtain at least one first product recommendation based on the target product keywords. This process ensures that the products ultimately recommended by the electronic device are closely related to the user's query text, avoiding blind recommendations. Therefore, the beneficial effect of this application is that during the user's online shopping process, even if the user does not explicitly express a purchase intent, the electronic device can accurately capture and mine the user's purchase interests and recommend products to the user, saving the user's time in filtering products and increasing user stickiness and purchase probability.

[0009] In one possible implementation, generating target product keywords based on the keywords corresponding to the target query text includes: if the query intent is a knowledge query intent, constructing a first prompt word text based on the keywords corresponding to the target query text; inputting the first prompt word text into a first query model to generate the target product keywords.

[0010] In the above technical solution, when the query intent is a knowledge query intent, the electronic device constructs a first prompt word text and uses it as input to the first query model, which makes the process of the first query model processing the target query text more standardized and helps to improve the generation efficiency of target product keywords.

[0011] In one possible implementation, constructing the first prompt word text based on the keywords corresponding to the target query text includes: determining the first prompt word template based on the knowledge query intent; constructing the first prompt word text based on the keywords corresponding to the target query text and the first prompt word template; or, obtaining the user's profile information; and constructing the first prompt word text based on the keywords corresponding to the target query text, the profile information, and the first prompt word template.

[0012] In the above technical solution, during the process of constructing the first prompt text, since different users have different ordering preferences, the above-mentioned construction of the first prompt text by combining user profile information can realize a personalized keyword generation experience, so that the target product keywords obtained by the first query model can match the user's preferences, thereby achieving a more satisfactory effect for the user.

[0013] In one possible implementation, generating target product keywords based on the keywords corresponding to the target query text includes: if the query intent is a dialogue intent, constructing a second prompt text based on the keywords corresponding to the target query text; inputting the second prompt text into a second query model to generate a response text; and generating the target product keywords based on the response text.

[0014] In the above technical solution, when the query intent is a dialogue query intent, the electronic device constructs a first prompt word text and uses it as input to the second query model, which makes the process of the second query model processing the target query text more standardized and helps to improve the generation efficiency of target product keywords.

[0015] In one possible implementation, constructing the second prompt text based on the keywords corresponding to the target query text includes: determining a second prompt template based on the dialogue intent; constructing the second prompt text based on the keywords corresponding to the target query text and the second prompt template; or, obtaining the user's profile information; and constructing the second prompt text based on the keywords corresponding to the target query text, the profile information, and the second prompt template.

[0016] In the above technical solution, during the process of constructing the second prompt text, since different users have different order preferences, the above-mentioned construction of the second prompt text by combining user profile information can realize a personalized keyword generation experience, so that the reply text obtained by the second query model can match the user's preferences, thereby achieving a more satisfactory effect for the user.

[0017] In one possible implementation, generating the target product keyword based on the reply text includes: determining a first purchase probability based on the reply text; if the first purchase probability is greater than a first probability threshold, generating the target product keyword based on the reply text and a first query model.

[0018] In the above technical solution, when a user's query intent is a conversational intent, after receiving the response text, the electronic device determines the user's first probability of purchasing under that conversational intent based on the response text and historical purchase information. During this process, the electronic device can accurately identify the current user's likelihood of making a purchase. Only when the user's probability of purchasing is high are product keywords generated for recommended products. This ensures that product recommendations are only targeted at users with high purchase intent, making the product recommendation process closely aligned with user needs. It avoids user complaints and aversion caused by directly recommending products, thus improving the user experience and satisfaction during the recommendation process.

[0019] In one possible implementation, the method further includes: displaying the reply text if the first purchase probability is less than or equal to the first probability threshold.

[0020] In the above technical solution, when the query intent is a dialogue intent, if the current user's first purchase probability is less than or equal to the first probability threshold, the electronic device only displays the response text obtained by the second query model to the user, thereby reducing the risk of blindly promoting to the user when the user's purchase probability is low, and reducing the user's resentment caused by excessive sales pitches.

[0021] In one possible implementation, the method further includes: obtaining the user's historical information during the historical query process; the historical information includes historical purchase information and historical dialogue information; and generating the target product keywords based on the reply text and the first query model, including: inputting the historical information and the reply text into the first query model to generate the target product keywords.

[0022] In the above technical solution, when the query intent is a dialogue intent, the electronic device can input the user's historical information and reply text into the first query model, enabling the first query model to generate target product keywords based on multi-dimensional user data. This ensures that the generated target product keywords can more accurately match the products that the user is truly interested in, thereby improving the quality of target product keyword generation.

[0023] In one possible implementation, determining the first purchase probability based on the response text includes: determining whether there is a knowledge tag corresponding to the knowledge query intent in the response text; if the knowledge tag exists, obtaining the first purchase probability based on the knowledge tag and the historical purchase information.

[0024] In the above technical solution, when determining the first purchase probability based on the reply text, the electronic device first determines whether the reply text contains a knowledge tag corresponding to the knowledge query intent. Knowledge tags are a necessary condition for generating target product keywords. Therefore, the aforementioned pre-determination of whether the reply text contains knowledge tags improves the efficiency of determining the first purchase probability. When the reply text contains knowledge tags, the electronic device determines the first purchase probability through the knowledge tags and historical purchase information. That is, by analyzing the user's historical order history, the probability of the user placing an order is analyzed, allowing the first purchase probability to take into account the user's past ordering habits and ensuring the accuracy of the first purchase probability determination.

[0025] In one possible implementation, obtaining at least one first product recommendation information based on the target product keywords includes: determining a second purchase probability based on the target product keywords; if the second purchase probability is greater than a second probability threshold, obtaining first product tag text based on the target product keywords and product tag generation model; and obtaining the at least one first product recommendation information based on the first product tag text.

[0026] In the above technical solution, after obtaining the target product keywords, the electronic device determines the user's second purchase probability under the knowledge query intent by using the target product keywords and historical purchase information, which can accurately identify the current user's purchase likelihood. The electronic device only generates product tag text for the recommended product when the user's purchase probability is high. This ensures that product recommendations are only targeted at users with high purchase intent, making the product recommendation process aligned with user needs. It avoids user complaints and aversion caused by directly recommending products to users, thus improving the user experience and satisfaction during the recommendation process.

[0027] In one possible implementation, the method further includes: if the second purchase probability is less than or equal to the second probability threshold, displaying the target product keyword.

[0028] In the above technical solution, when the query intent is a knowledge query intent, if the current user's second purchase probability is less than or equal to the second probability threshold, the electronic device only displays the target product keywords obtained by the first query model to the user, thereby reducing the risk of blindly promoting to the user when the user's purchase probability is low, and reducing the user's resentment caused by excessive sales pitches.

[0029] In one possible implementation, the method further includes: obtaining the user's historical information during the historical query process; the historical information includes historical purchase information and historical dialogue information; and determining the second purchase probability based on the target product keyword includes: obtaining the product features corresponding to the target product keyword; extracting features from the historical purchase information to obtain purchase behavior features; and obtaining the second purchase probability based on the product features and the purchase behavior features.

[0030] In the aforementioned technical solution, the electronic device determines the probability of a second purchase by acquiring product features corresponding to the target product keywords and combining this with purchase behavior features extracted from historical purchase information. This allows for a more accurate prediction of the user's likelihood of purchasing the target product. This data feature analysis-based approach can more deeply explore the correlation between user behavior and product attributes, thus providing a more reliable basis for subsequently recommending products to the user.

[0031] In one possible implementation, the at least one first product recommendation information includes target store information of at least one store where the first product is located, and recommendation reason text for the at least one first product store. Obtaining the at least one first product recommendation information based on the first product tag text includes: determining multiple first candidate stores and store information of the multiple first candidate stores based on the first product tag text; inputting the store information of the multiple first candidate stores into a product recommendation model to obtain the store where the at least one first product is located; and inputting the target store information of the at least one first product store into a recommendation reason generation model to generate recommendation reason text for the at least one first product store.

[0032] In the above technical solution, when the electronic device generates at least one first product recommendation information, it can not only display the store information of the store where the first product is located, but also display the recommendation reasons of the store where the first product is located. This process of displaying recommendation reasons makes the recommendation process of this application more transparent, enhancing the credibility and persuasiveness of the recommendation.

[0033] In one possible implementation, the method further includes: when the query intent is the purchase intent, constructing a third prompt word text based on the keywords corresponding to the target query text; obtaining a second product tag text based on the third prompt word text and the product tag generation model; and obtaining at least one second product recommendation information based on the second product tag text.

[0034] In the above technical solution, when the query intent is a purchase intent, the electronic device constructs a third prompt word text and uses it as input to the product tag generation model. This makes the process of the product tag generation model processing the target query text more standardized, which is conducive to improving the generation efficiency of product recommendation information.

[0035] In one possible implementation, the at least one second product recommendation information includes target store information for at least one store containing the second product, and recommendation reason text for the at least one second product store. Obtaining the at least one second product recommendation information based on the second product tag text includes: determining multiple second candidate stores and store information for the multiple second candidate stores based on the second product tag text; inputting the store information of the multiple second candidate stores into a product recommendation model to obtain the store containing the at least one second product; and inputting the target store information for the at least one second product store into a recommendation reason generation model to generate recommendation reason text for the at least one second product store.

[0036] In the above technical solution, when the electronic device generates at least one second product recommendation information, it can not only display the store information of the store where the second product is located, but also display the reasons for recommending the store. This process of displaying the reasons for recommendation makes the recommendation process of this application more transparent, enhancing the credibility and persuasiveness of the recommendation.

[0037] Secondly, this application provides an online product recommendation apparatus, comprising: a text processing module, configured to, in response to a target query text input by a user, determine keywords and query intent corresponding to the target query text based on the target query text; a keyword generation module, configured to, when the query intent is an intent other than a purchase intent, generate target product keywords based on the keywords corresponding to the target query text; a first information generation module, configured to obtain at least one first product recommendation information based on the target product keywords; and a first information display module, configured to display the at least one first product recommendation information.

[0038] In one possible implementation, the keyword generation module is specifically used to: if the query intent is a knowledge query intent, construct a first prompt word text based on the keywords corresponding to the target query text; input the first prompt word text into the first query model to generate the target product keyword.

[0039] In one possible implementation, the keyword generation module is further configured to: determine a first prompt word template based on the knowledge query intent; construct the first prompt word text based on the keywords corresponding to the target query text and the first prompt word template; or, obtain the user's profile information; and construct the first prompt word text based on the keywords corresponding to the target query text, the profile information, and the first prompt word template.

[0040] In one possible implementation, the keyword generation module is further configured to: if the query intent is a dialogue intent, construct a second prompt text based on the keywords corresponding to the target query text; input the second prompt text into the second query model to generate a response text; and generate the target product keyword based on the response text.

[0041] In one possible implementation, the keyword generation module is further configured to: determine a second prompt word template based on the dialogue intent; construct the second prompt word text based on the keywords corresponding to the target query text and the second prompt word template; or, obtain the user's profile information; and construct the second prompt word text based on the keywords corresponding to the target query text, the profile information, and the second prompt word template.

[0042] In one possible implementation, the keyword generation module is further used to: determine a first purchase probability based on the reply text; if the first purchase probability is greater than a first probability threshold, generate the target product keyword based on the reply text and the first query model.

[0043] In one possible implementation, the device further includes a second information display module, used to display the reply text if the first purchase probability is less than or equal to the first probability threshold.

[0044] In one possible implementation, the keyword generation module is further used to: obtain the user's historical information during the historical query process; the historical information includes historical purchase information and historical dialogue information; and input the historical information and the reply text into the first query model to generate the target product keyword.

[0045] In one possible implementation, the keyword generation module is further used to: determine whether there is a knowledge tag corresponding to the knowledge query intent in the response text; if the knowledge tag exists, obtain the first purchase probability based on the knowledge tag and the historical purchase information.

[0046] In one possible implementation, the first information generation module is specifically used to: determine a second purchase probability based on the target product keywords; if the second purchase probability is greater than a second probability threshold, obtain a first product tag text based on the target product keywords and product tag generation model; and obtain at least one first product recommendation information based on the first product tag text.

[0047] In one possible implementation, the device further includes a third information display module, used to display the target product keyword if the second purchase probability is less than or equal to the second probability threshold.

[0048] In one possible implementation, the keyword generation module is further configured to: obtain the user's historical information during the historical query process; the historical information includes historical purchase information and historical dialogue information; and obtain the product features corresponding to the target product keyword; extract features from the historical purchase information to obtain purchase behavior features; and obtain the second purchase probability based on the product features and the purchase behavior features.

[0049] In one possible implementation, the at least one first product recommendation information includes target store information of at least one store where the first product is located, and recommendation reason text of the at least one store where the first product is located. The first information generation module is further configured to: determine multiple first candidate stores and store information of the multiple first candidate stores based on the first product tag text; input the store information of the multiple first candidate stores into the product recommendation model to obtain the store where the at least one first product is located; and input the target store information of the at least one store where the first product is located into the recommendation reason generation model to generate recommendation reason text of the at least one store where the first product is located.

[0050] In one possible implementation, the device further includes: a second information generation module, configured to, when the query intent is the purchase intent, construct a third prompt word text based on the keywords corresponding to the target query text; obtain a second product tag text based on the third prompt word text and the product tag generation model; and obtain at least one second product recommendation information based on the second product tag text.

[0051] In one possible implementation, the at least one second product recommendation information includes target store information of at least one store containing the second product, and recommendation reason text for the at least one second product store. The second information generation module is specifically used to: determine multiple second candidate stores and store information of the multiple second candidate stores based on the second product tag text; input the store information of the multiple second candidate stores into the product recommendation model to obtain the store containing the at least one second product; and input the target store information of the at least one second product store into the recommendation reason generation model to generate recommendation reason text for the at least one second product store.

[0052] Thirdly, this application provides an electronic device including a memory and a processor. The memory is used to store executable program code, and the processor is used to call and run the executable program code from the memory, causing the electronic device to perform the methods described in the first aspect or any possible implementation thereof.

[0053] Fourthly, this application provides a computer program product comprising: computer program code, which, when run on a computer, causes the computer to perform the method described in the first aspect or any possible implementation thereof.

[0054] Fifthly, this application provides a computer-readable storage medium storing computer program code that, when executed on a computer, causes the computer to perform the methods described in the first aspect or any possible implementation thereof. Attached Figure Description

[0055] Figure 1 is a graphical user interface diagram of an online product recommendation system provided in an embodiment of this application;

[0056] Figure 2 is a graphical user interface diagram of another online product recommendation method provided in an embodiment of this application;

[0057] Figure 3 is a schematic flowchart of an online product recommendation method provided in an embodiment of this application;

[0058] Figure 4 is a schematic diagram of a scenario of intent change provided by an embodiment of this application;

[0059] Figure 5 is a schematic flowchart of another method for recommending products online provided in an embodiment of this application;

[0060] Figure 6 is a flowchart of an online product recommendation process provided in an embodiment of this application;

[0061] Figure 7 is a flowchart of another online product recommendation process provided in an embodiment of this application;

[0062] Figure 8 is a flowchart of another online product recommendation process provided in an embodiment of this application;

[0063] Figure 9 is a schematic diagram of the structure of an online product recommendation device provided in an embodiment of this application;

[0064] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0065] The technical solutions in this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B. "And / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0066] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature.

[0067] Before introducing the solutions of the embodiments of this application, the technical terms that may be involved in the embodiments of this application will be explained first.

[0068] Large Language Model (LLM): A type of deep learning-based artificial intelligence system. It is trained on large-scale text datasets to generate and understand natural language.

[0069] Chatbot: A chatbot is an automated program that interacts with users via text or voice. It is typically designed to perform specific tasks, such as answering common questions, providing information retrieval, or handling simple transactions.

[0070] Instant retail: a new retail model that relies on online platforms and offline physical stores to meet consumers' immediate needs for goods through instant delivery services.

[0071] Natural Language Understanding (NLU): The collective term for all methods, models, or tasks that support machines in understanding text content. It is a key part of Natural Language Processing (NLP) and aims to enable computers to understand the meaning of human language.

[0072] The application scenarios of the embodiments of this application will be introduced below.

[0073] Currently, with the continuous development of intelligent technology and the e-commerce industry, in addition to traditional offline shopping, merchants have begun to launch instant retail services to provide users with a faster and more convenient shopping experience. Instant retail services are online shopping services that rely on the cooperation between online platforms and offline physical stores, allowing users to purchase goods without leaving home. Currently, the application areas of online shopping services include, but are not limited to, e-commerce, catering, and education.

[0074] Taking food delivery as an example in the catering industry, there are currently various platforms on the market that provide food delivery services and other lifestyle services (hereinafter referred to as "food delivery platforms"), such as Ele.me, Meituan, and Dianping. These food delivery platforms can provide users with online ordering and delivery services. Each food delivery platform corresponds to an application (App) or a mini-program.

[0075] When users have online ordering needs, they can place an order through the following two methods on the App or Mini Program:

[0076] Method (1): When a user opens the App or mini-program on an electronic device, the device displays the main page of the food delivery platform, which includes a search box. The user enters the product name or store name in the search box, and the electronic device displays a list of stores corresponding to the product name or store name searched by the user. The store list includes information about multiple stores, such as monthly sales, store rating, distance between the store location and the user's current location, minimum order price, and delivery fee. The user can view the store information of different stores by swiping through the store list, or click to enter the store's details page and select the product to order. In response to the user's order, the merchant can prepare and deliver the food according to the product information ordered by the user.

[0077] Method (2): When a user opens the App or mini-program on an electronic device, the device can display the main page of the food delivery platform, which includes an entry point for virtual shopping guides (i.e., chatbots) to recommend products. Users can interact with the virtual shopping guide through this entry point, telling them which products they want to order. The virtual shopping guide will then push suitable products to the user based on the conversation and display a list of recommended stores. Similarly, users can swipe through the store list to view information about different stores, or click to enter the store's details page and select the products they want to order. In response to the user's order, the merchant can prepare and deliver the food according to the ordered product information.

[0078] Regarding the above method (2), when the user and the virtual shopping guide have a conversation, if the conversation does not include food-related content but is just a casual chat, the virtual shopping guide cannot be as sensitive as a human to capture the user's intentions. It simply answers the user's questions in a routine manner, which means that the virtual shopping guide cannot recommend products to the user when the user has no obvious intention to buy products. This rigid way of conversation cannot achieve the effect of attracting users well.

[0079] To address the aforementioned issues, this application proposes an online product recommendation method. This method enables electronic devices to accurately capture and analyze a user's purchasing interests during online shopping, even if the user does not explicitly express a purchase intention, and then recommend products accordingly. This product recommendation approach saves users time in filtering products and increases user engagement and purchase probability.

[0080] After introducing the application scenarios of the embodiments of this application, the following embodiments of this application will use the online shopping scenario as an example of the "food delivery scenario" and, in conjunction with the accompanying drawings of the embodiments of this application, provide a detailed description of the technical solutions of the embodiments of this application.

[0081] It should be understood that the online product recommendation method provided in this application is applied to electronic devices. The types of electronic devices include, but are not limited to, smartphones, tablets, laptops, and wearable devices. This application does not limit the type of electronic device; however, in the following description, a smartphone is used as an example to illustrate the technical solution of this application.

[0082] Figure 1 is a schematic diagram of a graphical user interface (GUI) for online product recommendation provided in an embodiment of this application.

[0083] For example, Figure 1(a) shows an interface 101 displayed on a smartphone in unlocked mode. As shown in Figure 1(a), this interface 101 displays a weather clock component and multiple applications. These applications include a phone, messaging, settings, and food ordering app (hereinafter referred to as "Application A"). It should be understood that this interface 101 may also include other applications, and this embodiment of the application does not limit this.

[0084] As shown in Figure 1(a), after the user clicks the icon of application A in interface 101, in response to the user's click operation, the smartphone displays the main interface 102 of application A as shown in Figure 1(b), or this interface 102 can also be called the "home page of application A". The interface 102 of application A can display multiple category menus, operable controls or buttons, pictures and other interface content for the user to meet the user's usage needs.

[0085] For example, as shown in Figure 1(b), the main interface 102 of application A displays the current delivery address (e.g., "xx district xx street"), a search box, and different category menus such as food delivery, supermarket, fruit, medicine, dessert, hamburger, lobster, and barbecue, as well as a food recommendation area and a store list. This embodiment of the application does not limit the displayed content or the size of the display area on the main interface 102 of application A.

[0086] On the main interface 102 of application A, the store list can display one or more stores for the user. The user can view more store information by swiping up and down. Optionally, each store display area can display one or more of the following: user rating, monthly sales volume, delivery time, delivery distance, minimum order price, delivery fee, and promotional information. For example, as shown in Figure 1(b), the hamburger (xxx store) display area shows a user rating of 4.9 stars, monthly sales of 443, delivery time of 23 minutes, delivery distance from the current smartphone of 1.2km, minimum order price of 20 yuan, delivery fee of 6 yuan, and promotional information such as 8 yuan with no minimum order.

[0087] In one possible implementation, if the user does not enter any keywords in the search box of the main interface 102 of application A, the search box may display the default term "Artificial Intelligence (AI) Food Delivery Assistant". In response to the user clicking the search button on the right side of the search box, the smartphone displays the online ordering interface 103 as shown in Figure 1(c).

[0088] In another possible implementation, even if the user does not enter any keywords in the search box of the main interface 102 of application A, the search box can display recommended words generated based on the user's recently searched keywords, and several hot words such as "AI takeaway smart assistant," "crayfish," and "hot pot barbecue" can be displayed below the search box. When the user clicks on "AI takeaway smart assistant," the smartphone can automatically fill the search box with the hot word "AI takeaway smart assistant" in response to the click operation. After the user clicks the search button on the right side of the search box, the smartphone displays the online ordering interface 103 as shown in Figure 1(c).

[0089] The above are two illustrative ways to enter the online ordering interface 103 as listed in the embodiments of this application. Other ways to enter the online ordering interface 103 are also applicable to the embodiments of this application, and will not be described one by one here.

[0090] The online ordering interface 103 displays the name of the AI ​​food delivery assistant (i.e., virtual shopping guide), a dialogue display area between the AI ​​food delivery assistant and the user, and a dialogue input box. When the user does not enter any query text in the dialogue input box, the dialogue display area displays the default welcome message when the user enters the online ordering interface 103, and the dialogue input box displays input prompts.

[0091] For example, as shown in Figure 1(c), in the online ordering interface 103, the AI ​​food delivery assistant is named "Xiao e Helps You Order". The default welcome message displayed in the dialogue display area is: Welcome to "Xiao e Helps You Order". Please enter the question you want to ask in the dialog box below, and I will help you answer it! The input prompt in the dialogue input box is "Please enter your question here".

[0092] Users can activate the dialog input box by clicking any area of ​​the dialog input box, changing its editability from non-editable to editable, allowing users to input data. After the user enters the query text in the dialog input box, in response to the input, the smartphone displays the query results loading interface 104 as shown in Figure 1(d). The query results loading interface 104 displays a query waiting message from the AI ​​food delivery assistant and a dynamic loading icon for the query results.

[0093] For example, as shown in Figure 1(d), after the user clicks the right area of ​​the dialog input box, the smartphone activates the dialog input box in response to the click operation. After the user enters the query text "Please recommend some snacks of various types nearby" in the dialog input box, the smartphone displays the query results loading interface 104. The query results loading interface 104 displays a dynamic loading icon and the query waiting message "Okay, please wait, querying...".

[0094] After the query results are loaded, the interface displayed on the smartphone can be described as shown in Figure 2 below.

[0095] Figure 2 is a GUI diagram of another online product recommendation provided in an embodiment of this application.

[0096] For example, as shown in Figure 2(a), in conjunction with Figure 1, after the query results are loaded, the smartphone displays the query result display interface 105 shown in Figure 2(a). The query result display interface 105 can also be called the "product recommendation interface 105" or "store recommendation interface 105". The query result display interface 105 includes query result prompts and a list of recommended stores. Optionally, each store recommendation area includes store information, or store information and reasons for store recommendation. This embodiment of the application uses the example of a store recommendation area including store information and reasons for store recommendation.

[0097] For example, as shown in Figure 2(a), the query result display interface 105 displays the query result prompt "The following are the results found for you by Xiao e". The store recommendation area 1051 displays the store information and the store recommendation reason for the first store - Burger (xxx store). The store information includes user rating of 4.9 stars, monthly sales of 4000+, delivery time of 23 minutes, delivery distance from smartphones of 1km, minimum order price of 20 yuan, free delivery, and promotional information such as 8 yuan no minimum order. The store recommendation reason is: This store focuses on handcrafted premium beef burgers, using top-quality beef, every bite is a surprising taste experience, with a very high repurchase rate and short delivery distance and delivery time.

[0098] The recommended store section 1052 displays information for a second store—XX Milk Tea (XXX Store)—along with its recommendation reasons. The store information includes a 5-star user rating, monthly sales of 3000+, delivery time of 32 minutes, a delivery distance of 2.5km from your smartphone, a minimum order of 25 yuan, free delivery, 15% off a single cup, and a second cup at half price. The recommendation reason is: This milk tea store is a chain store with high average monthly sales in the milk tea category, it's close to your current location, and it's currently running a promotion, making it a great deal to order now.

[0099] On the query results display page 105, users can scroll up and down to view the store information and recommendation reasons for all the stores included in the store list.

[0100] When a user clicks on any location within any of the recommended store areas, the smartphone displays a store display page 106 as shown in Figure 2(b). The store display page 106 shows store information and the store's product categories.

[0101] For example, as shown in Figure 2(a), after a user clicks on any part of the store information for xx Milk Tea (xxx store), the smartphone displays the store display page 106 shown in Figure 2(b). The store display page 106 displays the store information for xx Milk Tea (xxx store) and the store's product categories, including special set meals, new product tastings, regional exclusives, heartwarming hot drinks, fresh milk tea, refreshing fruit tea, and snacks to cleanse the palate.

[0102] Users can select the type of milk tea they wish to order on the store's display page (106), and then choose their preferred cup size, temperature, and sweetness level. After configuring this information, users can proceed to payment at the bottom, thus completing the seamless online process from search to product recommendation to order placement.

[0103] In the aforementioned online product recommendation process, the user's query text is "Please recommend some snacks of various types nearby," and the query text does not include any specific product. In other words, the online product recommendation method of this application embodiment can accurately recommend suitable products or shops to the user even if the user does not have a clear purchase need or intention at the start of the conversation.

[0104] The method implementation process of this application embodiment will be described below with reference to Figure 3.

[0105] Figure 3 is a schematic flowchart of an online product recommendation method provided in an embodiment of this application. It should be understood that this method can be applied to electronic devices with data processing capabilities or cloud servers; this application embodiment does not limit the form of the device executing the method. An example electronic device is the smartphone shown in Figure 1.

[0106] For example, as shown in FIG3, the method 300 includes the following steps 301-304.

[0107] 301, responding to the target query text entered by the user, determines the keywords and query intent corresponding to the target query text based on the target query text.

[0108] Referring to Figure 1, after a user clicks on application A installed on an electronic device, the device displays the main page of application A in response to the click. On the main page of application A, the user can control the electronic device to display the online ordering interface as shown in Figure 1. In the dialog input box of the online ordering interface, the user can enter the target query text for the current inquiry.

[0109] Optionally, the user can input the target query text by clicking, using voice commands, or scanning a QR code. This application embodiment does not limit this method.

[0110] For example, as shown in Figure 1, after the online ordering interface 103 is displayed on the electronic device, the user can enter the target query text in the dialog input box. In response to the user's input, the electronic device can obtain the target query text.

[0111] After obtaining the target query text, the electronic device can first determine whether the current user has the intention to purchase. Specifically, the electronic device can determine the keywords and query intent corresponding to the target query text to judge whether the query intent is a purchase intent, thereby locking in the user's query intent.

[0112] In one possible implementation, the electronic device can use an NLU model to determine the keywords and query intent corresponding to the target query text.

[0113] The NLU model is based on word segmentation methods, which break down the user-input target query text into individual words or phrases according to certain rules, and remove words that do not contribute much to expressing the core meaning. Optionally, word segmentation methods include any one of Jieba segmentation, SnowNLP segmentation, Tsinghua University Lexical Analyzer for Chinese (THUAC), HanLP, etc.

[0114] The NLU model uses part-of-speech tagging tools to label each preprocessed word with its part of speech, such as noun, verb, adjective, etc. It then performs Named Entity Recognition (NER) on the resulting multiple words to identify specific entities within them, such as names of people, places, organizations, and products. Statistical algorithms such as Term Frequency-Inverse Document Frequency (TF-IDF) are used to calculate the importance of each word. Words with higher TF-IDF values ​​are more likely to be considered keywords.

[0115] NLU models use word embedding methods to convert words in text into low-dimensional vectors, and then combine these word vectors into sentence vectors to represent the semantic features of the entire text. Optionally, word embedding methods include Word-to-Vector (Word2Vec) methods, Global Vectors for Word Representation (GloVe) methods, and Bidirectional Encoder Representations from Transformers (BERT) methods. Models suitable for combining word vectors into sentence vectors include Recurrent Neural Networks (RNNs) and Transformers.

[0116] Finally, the NLU model can input the sentence vectors obtained above, which represent the semantics of the target query text, into the trained intent classification model to output the query intent of the target query text.

[0117] The training process of the intent classification model will be introduced below.

[0118] The training process for an intent classification model can be as follows: A large amount of query text labeled with query intent is pre-collected as a training set. The model is then trained using methods such as Support Vector Machines (SVM), decision trees, and neural networks, enabling it to learn the mapping relationship between text features and query intent. During multiple rounds of training iterations, the model's parameters are continuously adjusted, and the loss function is calculated. Training ends when the loss function reaches a certain value.

[0119] After the intent classification model is successfully trained, the electronic device can obtain the keywords and query intent corresponding to the target query text by using the NLU model and the intent classification model after obtaining the keywords corresponding to the target query text.

[0120] 302. When the query intent is other than the purchase intent, generate target product keywords based on the keywords corresponding to the target query text.

[0121] After obtaining the keywords and query intent of the target query text, electronic devices can determine whether the user has a clear intention to purchase based on the query intent.

[0122] It should be understood that the query intents provided in this application embodiment include four types: function query intent, dialogue intent, knowledge query intent, and purchase intent. The definitions and differences of the above four query intents are as follows:

[0123] A function query intent refers to the intention to search for content related to a specific function. Specific functions include things like weather, horoscopes, or the stock market. For example, the query text corresponding to a function query intent could be: What's the weather like today? What are today's stock trends? What are the personality traits of a Capricorn?

[0124] Conversational intent refers to the user's intention to interact with the virtual shopping guide. For example, the query text corresponding to conversational intent could be: Which movies do you like best? Which celebrities do you like best? Which cities do you like best? etc.

[0125] Knowledge query intent refers to the intention to obtain knowledge content related to a specific topic, region, or event. For example, the query text corresponding to a knowledge query intent could be: What are some special snacks for the Dragon Boat Festival? What are some special delicacies in xx city?

[0126] Purchase intent refers to the intention to search for or purchase a specific product. For example, the query text corresponding to purchase intent could be: What milk tea shops are near location A? Or, I want to eat rice noodles, please recommend some good rice noodle shops.

[0127] The four query intentions are ranked from strongest to weakest according to purchase intention, and the results are: purchase intention > knowledge query intention > dialogue intention > function query intention.

[0128] As can be seen above, only the query text corresponding to a purchase intent includes a specific product, such as milk tea or rice noodles. The query texts corresponding to the other three types of query intents do not include a specific product. In other words, when the user's target query text corresponds to a knowledge query intent, a conversational intent, or a function query intent, the electronic device, based on the target query text, cannot accurately capture the product the user wants to buy or be recommended, indicating that the user does not have a clear purchase intention. When the target query text corresponds to a purchase intent, it indicates that the user has a clear purchase intention.

[0129] As described above, the core of this application's embodiments lies in the fact that even when a user does not have a clear intention to purchase, the electronic device can still provide suitable products to the user through the application interface. Therefore, when the electronic device determines that the query intent is something other than a purchase intent, it can infer and generate target product keywords that match the user's preferences based on the keywords corresponding to the target query text, so that the electronic device can search for products and make recommendations to the user.

[0130] Depending on the intent other than purchase intent, the generation scenarios for target product keywords also differ, and can be categorized into the following situations.

[0131] I. Intents other than purchase intent are knowledge search intents.

[0132] One possible implementation involves generating target product keywords based on the keywords corresponding to the target query text, including:

[0133] If the query intent is a knowledge query intent, construct the first suggestion word text based on the keywords corresponding to the target query text;

[0134] Input the first prompt text into the first query model to generate the target product keywords.

[0135] Optionally, the first query model is the first LLM model. When the query intent is a knowledge query intent, the role of the first LLM model is to take the target query text (or the keywords corresponding to the target query text) as model input and generate target product keywords corresponding to the target query text for the user. In other words, the first LLM model is an LLM model used to generate product keywords.

[0136] The training process of the first LLM model will be introduced below.

[0137] In this embodiment, when training the first LLM model, a large amount of query text of knowledge query intent types and corresponding product keywords can be collected based on an existing general LLM model. Based on the correspondence between query text and product keywords, a knowledge graph containing relationships between entities (e.g., festivals) and entities (e.g., Dragon Boat Festival - specialty snacks - zongzi) is constructed. The knowledge graph can annotate the collected query text and product keywords. The annotated query text is input into the existing LLM model. The LLM model performs semantic understanding and analysis of the query text according to the current model parameters, and generates product keywords by referring to the entity relationships and prior knowledge provided in the knowledge graph. These product keywords are then compared with the annotated product keywords, and the difference between the two is calculated to obtain the model's loss function. The parameters of the LLM model are continuously fine-tuned during multiple rounds of training to obtain the first LLM model.

[0138] After the LLM model is successfully trained, to ensure standardized input, the LLM model's input includes prompt word templates. When the user's target query text corresponds to a knowledge query intent, the electronic device can first construct the input of the first LLM model, i.e., the first prompt word text, based on the keywords corresponding to the target query text.

[0139] One possible implementation involves constructing a first suggestion text based on the keywords corresponding to the target query text, including:

[0140] Based on the knowledge search intent, determine the first prompt word template;

[0141] Construct the first suggestion text based on the keywords corresponding to the target query text and the first suggestion word template.

[0142] It should be understood that this application embodiment sets up a prompt center for different query intents, and the prompt center corresponds to prompt word templates for different query intents. After obtaining the query intent corresponding to the target query text, the electronic device can call the corresponding prompt word template from the prompt center.

[0143] For example, the first prompt template corresponding to the knowledge query intent can be: "For question {input question}, please provide the relevant products involved and list them with commas as separators."

[0144] Once the first prompt word template is obtained, the electronic device can fill the keywords corresponding to the target query text into the corresponding positions of the first prompt word template according to the requirements of the first prompt word template, thereby obtaining the first prompt word text.

[0145] The electronic device takes the first prompt text as input to the first LLM model. Based on the mapping relationship obtained through training, the first LLM model generates the target product keywords corresponding to the target query text.

[0146] Preferably, since the purpose of generating product keywords is to recommend suitable products to users and stimulate their desire to purchase, electronic devices, when generating target product keywords, can consider not only the target query text but also the user's interests and preferences during historical queries, as well as the user's age and gender. This ensures that the final generated target product keywords are closely linked to the user's purchasing tastes and age / gender.

[0147] Therefore, in this approach, the input to the first LLM model includes not only the target query text but also user profile information.

[0148] Optionally, user profile information includes, but is not limited to, age, gender, historical purchase information, and historical conversation information during historical queries.

[0149] Another possible implementation involves constructing a first suggestion text based on the keywords corresponding to the target query text, including:

[0150] Obtain user profile information; construct the first prompt text based on the keywords, profile information, and first prompt word template corresponding to the target query text.

[0151] In this approach, the training process of the first LLM model can be adjusted as follows: Collect a large amount of query text of knowledge query intent types and corresponding product keywords, as well as a large amount of user profile information. Combine the user profile information and query text into input text, and use the corresponding correct product keywords as output text. Use the user profile information and query text as input to the LLM model, enabling the LLM model to learn the correspondence between profile information, query text, and correct product keywords, and attempt to output product keywords. After multiple rounds of training, the parameters of the LLM model are fine-tuned to obtain the first LLM model.

[0152] For example, the first prompt template corresponding to the knowledge query intent can be: "For question {input question}, please combine the user profile information {profile information} and provide the relevant products involved, and list them with commas as separators."

[0153] For example, electronic devices can obtain a user's gender and age through their account on an app or mini-program. Each time a user successfully places an order, the electronic device records the product category and flavor of that order. Using the current moment as the endpoint, the electronic device can retrieve multiple historical purchase records of the user within a period preceding the current moment, and select the product category and flavor with the highest purchase frequency from these records.

[0154] For example, regarding historical conversation information, during a conversation between a user and a virtual shopping guide, the electronic device can vectorize and cache each conversation text, so that the electronic device can read it directly.

[0155] After obtaining the first prompt word template, the electronic device can fill in the corresponding keywords and user profile information corresponding to the target query text into the corresponding positions of the template according to the requirements of the first prompt word template, and obtain the first prompt word text.

[0156] In the above technical solution, when the query intent is a knowledge query intent, the electronic device constructs a first prompt word text and uses it as input to the first query model, which makes the process of the first query model processing the target query text more standardized and helps to improve the generation efficiency of target product keywords.

[0157] In the process of constructing the first prompt text, since different users have different ordering preferences, electronic devices can combine user profile information to construct the first prompt text, which can realize a personalized keyword generation experience. This allows the target product keywords obtained by the first query model to match the user's preferences, thereby achieving a more satisfactory result for the user.

[0158] The electronic device takes the first prompt text as input to the first LLM model. Based on the mapping relationship obtained through training, the first LLM model generates the target product keywords corresponding to the target query text.

[0159] Therefore, the above process is the process by which an electronic device generates target product keywords when the query intent is a knowledge query intent.

[0160] II. Intentions other than the intention to purchase are dialogical intentions.

[0161] One possible implementation involves generating target product keywords based on the keywords corresponding to the target query text, including:

[0162] If the query intent is a conversational intent, construct the second prompt text based on the keywords corresponding to the target query text;

[0163] Input the second prompt text into the second query model to generate the response text;

[0164] Generate target product keywords based on the response text.

[0165] Optionally, the second query model is a second LLM model. When the query intent is a dialogue intent, the role of the second LLM model is to take the target query text as input to the model and output the response text corresponding to the target query text.

[0166] As described above, the purchase intention corresponding to dialogue intent is weaker than that corresponding to knowledge query intent. The processing model for query text corresponding to knowledge query intent is the first LLM model. The first LLM model is used to generate target product keywords, which are a prerequisite for recommending products to users. In other words, when the query intent corresponding to the target query text is dialogue intent, if the electronic device wants to recommend products to the user, after obtaining the response text corresponding to the current target query text through the second LLM model, it still needs to further call the first LLM model based on the response text to obtain the target product keywords.

[0167] The training process of the second LLM model will be introduced below.

[0168] In this embodiment, when training the second LLM model, a large amount of casual conversation data can be collected based on an existing general LLM model. This data could include publicly available conversation datasets, conversation records on social media, and discussion topics in online forums. This casual conversation data is then labeled to distinguish between questions and answers, as well as the topic category (e.g., movies, cities, hobbies). The conversation data is then input into the existing LLM model, allowing it to continuously learn language patterns and semantic relationships within the conversation, generating response text. The response text obtained by the LLM model is then compared with the labeled response text to calculate the loss function of the LLM model. Through multiple training iterations, the parameters of the LLM model are fine-tuned to obtain the second LLM model.

[0169] When the query intent corresponding to the target query text entered by the user is a dialogue intent, the electronic device can first construct the input of the second LLM model, namely the second prompt text, based on the keywords corresponding to the target query text.

[0170] One possible implementation involves constructing a second suggestion text based on the keywords corresponding to the target query text, including:

[0171] Determine the second cue word template based on the dialogue intent;

[0172] Construct the first suggestion text based on the keywords and second suggestion word templates corresponding to the target query text.

[0173] The process of constructing the second cue word text is similar to that of constructing the first cue word text. Electronic devices can obtain the second cue word template corresponding to the dialogue intent from the cue center.

[0174] For example, the second prompt template corresponding to the dialogue intent could be: "For the question {input question}, please generate a response text for the user based on the topic of the question." For example, if the user's input question is: "Which movies do you like? You can answer: Interstellar, Spirited Away, Avatar."

[0175] Once the second prompt word template is obtained, the electronic device can fill the keywords corresponding to the target query text into the corresponding positions of the second prompt word template according to the requirements of the second prompt word template, and obtain the second prompt word text.

[0176] The electronic device takes the second prompt text as input to the second LLM model, which generates the response text corresponding to the target query text based on the language patterns and semantic relationships in different dialogues obtained through training.

[0177] Preferably, when generating response text, electronic devices can consider user profile data in addition to the target query text, making the response text more closely match the user profile data. For example, when the target query text is: "Which movie do you like?", considering user profile data, if the user is female, 25 years old, and their most frequently ordered item is cake with a sweet flavor, then the LLM model would generate some romance or comedy movies.

[0178] Therefore, in this approach, the input to the second LLM model can include not only the target query text but also user profile information.

[0179] Another possible implementation involves constructing a first suggestion text based on the keywords corresponding to the target query text, including:

[0180] Obtain user profile information; construct the second prompt text based on the keywords, profile information, and second prompt word template corresponding to the target query text.

[0181] The user profile information is described above and will not be repeated here.

[0182] In this approach, the training process of the second LLM model can be adjusted as follows: Collect a large amount of casual conversation data and corresponding user profile information. Label this data, associate the user profile information with the corresponding conversation data to form a structured dataset, and input it into the existing LLM model. This allows the LLM model to continuously learn language patterns and semantic relationships in the conversation, obtain response text, and compare the response text obtained by the LLM model with the labeled response text. Calculate the loss function of the LLM model, and through multiple training iterations, fine-tune the parameters of the LLM model to obtain the second LLM model.

[0183] After obtaining the second prompt word template, the electronic device can fill in the keywords and profile information corresponding to the target query text into the corresponding positions of the template according to the requirements of the second prompt word template, and obtain the second prompt word text.

[0184] In the above technical solution, when the query intent is a dialogue query intent, the electronic device constructs a first prompt word text and uses it as input to the second query model, which makes the process of the second query model processing the target query text more standardized and helps to improve the generation efficiency of target product keywords.

[0185] In the process of constructing the second prompt text, since different users have different order preferences, electronic devices can combine user profile information to construct the second prompt text, which can realize a personalized keyword generation experience. This allows the response text obtained by the second query model to match the user's preferences, thereby achieving a more satisfactory result for the user.

[0186] The electronic device takes the second prompt text as input to the second LLM model, which generates the response text corresponding to the target query text based on the language patterns and semantic relationships obtained during training.

[0187] It should be understood that if an electronic device directly generates target keywords based on the response text after receiving it, a situation may arise where, if the user currently has no intention to purchase, directly recommending products to the user may not effectively meet their needs and could even cause user resentment. Therefore, to avoid this problem, in this embodiment, after receiving the response text, it is first necessary to determine whether the user's purchase intention is strong.

[0188] One possible implementation involves generating target product keywords based on the response text, including:

[0189] Determine the probability of making the first purchase based on the response text;

[0190] If the first purchase probability is greater than the first probability threshold, target product keywords are generated based on the response text and the first query model.

[0191] Optionally, the first probability threshold is 0.8.

[0192] Specifically, after receiving the reply text, the electronic device can determine the user's first purchase probability based on the reply text, and compare the first purchase probability with a first probability threshold of 0.8. Only when the first purchase probability is greater than the first probability threshold is it allowed to recommend products to the user.

[0193] In the above technical solution, when a user's query intent is a conversational intent, after receiving the response text, the electronic device determines the user's first probability of purchasing under that conversational intent by using the response text and historical purchase information, thus accurately identifying the likelihood of the current user making a purchase. The electronic device only generates product keywords for recommended products when the user's purchase probability is high. This ensures that product recommendations are only targeted at users with high purchase intent, making the product recommendation process closely aligned with user needs. It avoids user complaints and aversion caused by directly recommending products, thereby improving the user experience and satisfaction during the recommendation process.

[0194] It should be understood that a user's past purchasing behavior also influences the probability of making the first purchase. Specifically, a user's past purchasing behavior reflects their consumption preferences, habits, and degree of demand for the product. For example, if a user has frequently purchased product A in the past, and their response text contains knowledge tags related to product A, it indicates that the user has a high inclination to purchase product A. Therefore, when generating the probability of making the first purchase, the input data for the first probability determination model includes not only knowledge tags but also historical purchasing information.

[0195] Therefore, electronic devices can obtain the user's historical information before determining the initial purchase probability.

[0196] One possible implementation method also includes:

[0197] Obtain the user's historical information during the historical query process; historical information includes historical purchase information and historical conversation information.

[0198] The process of obtaining historical purchase information and historical conversation information has been described above and will not be repeated here.

[0199] After obtaining historical information, the process for determining the probability of the first purchase is as follows.

[0200] One possible implementation involves determining the first purchase probability based on the response text, including:

[0201] Determine whether the response text contains knowledge tags corresponding to the knowledge query intent;

[0202] If a knowledge tag exists, the first purchase probability is obtained based on the knowledge tag and historical purchase information.

[0203] Specifically, electronic devices can obtain a first purchase probability through a knowledge tag recognition model and a first probability determination model. The knowledge tag recognition model is used to identify whether the response text contains knowledge tags; the first probability determination model is used to generate a first purchase probability when the response text contains knowledge tags.

[0204] The training process of the knowledge label recognition model will be explained below. Optionally, the knowledge label recognition model can be a BERT model based on NER.

[0205] When training a knowledge tag recognition model, a large amount of response text data can be collected. This response text data may or may not contain knowledge tags. Each word in the response text is then labeled with a tag category, and this response text is used as input to the knowledge tag recognition model. The model outputs the tag category (e.g., knowledge tag or non-knowledge tag) for each word in the response text. The tag categories predicted by the knowledge tag recognition model for each word in the response text are compared with the correct tag categories corresponding to each word in the response text, and the loss function of the knowledge tag recognition model is calculated until the model training is complete. For example, assuming the response text is "My favorite city is city A", the corresponding knowledge tag could be "city A"; similarly, assuming the response text is "The figure related to the Dragon Boat Festival is Qu Yuan, and the activities of the Dragon Boat Festival are dragon boat racing and hanging mugwort", the corresponding knowledge tag could be "Dragon Boat Festival".

[0206] After receiving the response text from this round of dialogue, the electronic device can input the response text into the knowledge tag recognition model to obtain the tag category of each word in the response text, in order to determine whether the response text contains knowledge tags.

[0207] When it is determined that the response text includes knowledge tags, the electronic device can use the knowledge tags and historical purchase information as input to the first probability determination model to obtain the first purchase probability.

[0208] The training process of the first probability determination model is described below. Optionally, the first probability determination model can be a Naive Bayes model or a logistic regression model.

[0209] During training, the first probability determination model (FPDM) ​​pre-collects a large amount of knowledge tags and users' historical purchase information. It combines these knowledge tags and historical purchase information to obtain multiple sets of data, and then labels each set with a purchase probability based on actual purchasing behavior. The labeled data is then input into the FPDM model, and the model is trained by minimizing a loss function, enabling it to learn the potential relationship between knowledge tags, historical purchase information, and purchase probabilities. During training, the model is continuously adjusted to ensure that the learned output probability is as close as possible to the labeled true purchase probability, at which point training concludes.

[0210] Once the first probability determination model has been trained, the electronic device can input the knowledge tags obtained this time and the current user's historical purchase information into the first probability determination model to predict the user's first purchase probability for the product corresponding to the knowledge tag.

[0211] In the above technical solution, when determining the first purchase probability based on the response text, the electronic device first determines whether the response text contains a knowledge tag corresponding to the knowledge query intent. Knowledge tags are a necessary condition for generating target product keywords. Pre-determining whether the response text contains knowledge tags improves the efficiency of determining the first purchase probability. When the response text contains knowledge tags, the electronic device determines the first purchase probability by combining the knowledge tags with historical purchase information. That is, by analyzing the user's historical order history, the device analyzes the likelihood of the user placing an order now, ensuring that the first purchase probability can be comprehensively considered based on the user's past ordering habits, thus guaranteeing the accuracy of the first purchase probability determination.

[0212] When the first purchase probability is greater than the first probability threshold, it means that the current user is more likely to purchase the product corresponding to the knowledge tag. The electronic device can obtain the target product keywords based on the reply text and the first LLM model.

[0213] In one possible implementation, target product keywords are generated based on the response text and the first query model, including:

[0214] Input historical information and response text into the first query model to generate target product keywords.

[0215] If the response text contains knowledge tags, it indicates a higher probability of the current user making a purchase. When recommending products to users, electronic devices can input historical purchase information, response text, and historical dialogue information into a first LLM model to generate target product keywords, ensuring that the recommended products match the user's needs and preferences.

[0216] Specifically, once the first LLM model has been successfully trained, when historical purchase information, historical dialogue information, and reply text are input into the first LLM model, the first LLM model can output target product keywords based on the correspondence between the knowledge learned during training and product keywords.

[0217] In the above technical solution, when the query intent is a dialogue intent, the electronic device can input the user's historical information and reply text into the first query model, enabling the first query model to generate target product keywords based on multi-dimensional user data. This ensures that the generated target product keywords can more accurately match the products that the user is truly interested in, thereby improving the quality of target product keyword generation.

[0218] In another scenario, if the probability of the first purchase is less than or equal to a first probability threshold, it indicates that the user is unlikely to purchase the product. To avoid user annoyance, electronic devices will no longer automatically recommend products to the user.

[0219] In one possible implementation, the method further includes:

[0220] If the first purchase probability is less than or equal to the first probability threshold, display the reply text.

[0221] Specifically, when the probability of the first purchase is less than or equal to 0.8, the electronic device can directly display the response text output by the second LLM model on the interface for the user to view.

[0222] In the above technical solution, when the query intent is a dialogue intent, if the current user's first purchase probability is less than or equal to the first probability threshold, the electronic device only displays the response text obtained by the second query model to the user, thereby reducing the risk of blindly promoting to the user when the user's purchase probability is low, and reducing the user's resentment caused by excessive sales pitches.

[0223] Preferably, to ensure richness of display, an image center can be pre-set in this embodiment. The image center stores various types of images. The electronic device can load a suitable image from the image center according to the reply text to be displayed and perform quality checks to determine whether the image matches the current text.

[0224] When images and text match, electronic devices can display both the image and the reply text on the interface for the user to view.

[0225] Therefore, the above process is the process by which an electronic device generates target product keywords when the query intent is a dialog intent.

[0226] Third, the intent other than the purchase intent is the function query intent.

[0227] It should be understood that for another type of query intent besides purchase intent—functional query intent—the purchase intention corresponding to this type of query intent is the weakest. Therefore, under this query intent, electronic devices will not predict the user's purchase probability and will directly output the functional answer requested by the user.

[0228] One possible implementation method also includes:

[0229] If the query intent is a function query intent, construct the fourth suggestion word text based on the keywords corresponding to the target query text;

[0230] Input the fourth prompt text into the third query model to generate the function query text.

[0231] Optionally, the third query model is a third LLM model. When the query intent is a functional query intent, the role of the third LLM model is to take the target query text as model input and output the functional query text corresponding to the target query text.

[0232] Specifically, in this embodiment, the query text corresponding to the function query intent is mostly query text related to third-party function information, such as "query text asking about the weather, query text asking about stock market trends, query text asking about horoscope information". For query text corresponding to such query intents, the third LLM model can call the third-party application programming interface (API) corresponding to the function to retrieve the function response text.

[0233] The training process of the third LLM model will be introduced below.

[0234] In this embodiment, when training the third LLM model, a large amount of query text containing various user function query intentions, as well as corresponding function query texts, can be collected based on an existing general LLM model. For each query text, the corresponding API or tool is labeled. The collected and labeled query text is used as input to the LLM model, and the corresponding API or tool name is used as the output label, enabling the LLM model to map the query text to the corresponding API or tool during training. The model parameters are continuously updated and optimized during training. After training, the third LLM model is obtained.

[0235] To enable the third-party LLM model to call APIs or tools, it can be integrated with the actual APIs or tools. By writing code, the connection between the model and various APIs or tools can be achieved. This allows the LLM model to automatically call the corresponding interface or tool to perform the query after receiving the API or tool query from the user, and obtain the function query text.

[0236] When the user's input target query text corresponds to a functional query intent, the electronic device can first construct the input of the third LLM model, namely the fourth prompt word text, based on the keywords corresponding to the target query text.

[0237] One possible implementation involves constructing a fourth suggestion text based on the keywords corresponding to the target query text, including:

[0238] Based on the query intent, determine the template for the fourth prompt word;

[0239] Construct the fourth suggestion text based on the keywords corresponding to the target query text and the fourth suggestion word template.

[0240] The process of constructing the fourth prompt text is similar to that of constructing the first or second prompt text. Electronic devices can obtain the fourth prompt text template corresponding to the function query intent from the prompt center.

[0241] For example, the fourth prompt template corresponding to the function query intent can be: "The question the current user wants to query is {input question}. Please call the corresponding API to query and output the query results." For example, if the user's input question is: "How is the weather today?", you can answer: "Today's weather is sunny, with a light breeze, and the temperature is 6°C to 25°C."

[0242] Once the fourth prompt word template is obtained, the electronic device can fill the keywords corresponding to the target query text into the corresponding positions of the fourth prompt word template according to the requirements of the fourth prompt word template, and obtain the fourth prompt word text.

[0243] The electronic device takes the fourth prompt text as input to the third LLM model. Based on the mapping relationship between the query text and the API or tool obtained through training, the third LLM model determines the API name or tool name corresponding to the current target query text, and calls the corresponding interface or tool to perform the query according to the determined name, thus obtaining the function query text. Furthermore, the electronic device can display the function query text on the interface for the user to view.

[0244] Therefore, the above process is the process by which an electronic device generates function query text when the query intent is a function query intent.

[0245] 303. Based on the target product keywords, obtain at least one first product recommendation information.

[0246] In step 302, when the query intent is a knowledge query intent or a dialogue intent, the electronic device can process the query using different LLM models to obtain target product keywords. After obtaining the target product keywords, the electronic device can recommend corresponding product information to the user based on these keywords.

[0247] It should be understood that the query intent corresponding to the target product keywords is not the same as the purchase intent, and the corresponding query text does not contain text about a specific product. Furthermore, the primary function of the first LLM model that generates the target product keywords is knowledge-based querying, meaning that the target product keywords are not necessarily specific to any particular product. Therefore, the fact that an electronic device obtains target product keywords does not necessarily indicate that the user has a purchase need. For example, if the target query text is "What are some special snacks for the Dragon Boat Festival?", the target product keywords would be a category of products related to the Dragon Boat Festival, such as zongzi (sticky rice dumplings), mung bean cakes, and glutinous rice cakes, rather than a specific product.

[0248] Therefore, after obtaining the target product keywords, electronic devices also need to combine the target product keywords to determine the likelihood of the user making a purchase, and then decide whether to recommend products to the user.

[0249] In one possible implementation, at least one first product recommendation information is obtained based on the target product keywords, including:

[0250] Determine the probability of a second purchase based on the target product keywords;

[0251] If the second purchase probability is greater than the second probability threshold, the first product tag text is obtained based on the target product keywords and product tag generation model;

[0252] Based on the first product label text, at least one first product recommendation information is obtained.

[0253] It should be understood that, similar to determining the first purchase probability based on the response text, electronic devices can determine the second purchase probability based on target product keywords. Specifically, a user's historical purchasing behavior also influences the second purchase probability. In particular, a user's historical purchasing behavior reflects their consumption preferences, habits, and degree of demand for the product. For example, if a user has frequently purchased product A in the past, the presence of product A in the target product keywords indicates a high purchase inclination towards product A. Therefore, the first probability determination model also needs to consider the user's historical purchasing information when generating the first purchase probability.

[0254] One possible implementation method also includes:

[0255] Obtain historical information from the user's historical search process; historical information includes historical purchase information and historical conversation information.

[0256] And, based on the target product keywords, determine the probability of a second purchase, including:

[0257] Obtain the product characteristics corresponding to the target product keywords;

[0258] Feature extraction is performed on historical purchase information to obtain purchase behavior characteristics;

[0259] Based on the characteristics of the product and the characteristics of the purchasing behavior, the second purchase probability is obtained.

[0260] The process of obtaining historical information is the same as the process described above, and will not be repeated here.

[0261] The process of determining the probability of a second purchase can be roughly divided into two steps: the first step is feature extraction, and the second step is probability determination.

[0262] Specifically, the feature extraction process includes product feature extraction and user purchase behavior feature extraction. After obtaining the target product keywords, the electronic device can determine the product features corresponding to those keywords based on the platform's database.

[0263] Optional features of a product include, but are not limited to, the product brand and the product price.

[0264] It should be understood that a single product keyword may correspond to multiple product features. For example, when the product keyword is "zongzi" (sticky rice dumpling), each brand and its associated price constitutes one of the product features of the keyword "zongzi." Therefore, an electronic device can obtain at least one product feature corresponding to the keyword "zongzi."

[0265] Regarding purchase behavior characteristics, after obtaining the user's historical purchase information, electronic devices can extract the user's purchase behavior characteristics based on each target product keyword.

[0266] Optional purchase behavior characteristics include purchase frequency and purchase price.

[0267] It should be understood that the purchase behavior characteristics here correspond one-to-one with the product characteristics. Specifically, when the product keyword is "zongzi" (sticky rice dumpling), if one of the product characteristics is: Zongzi brand A, price X yuan, and another product characteristic is: Zongzi brand B, price Y yuan, the electronic device will extract the user's purchase behavior characteristics for Zongzi brand A, priced X yuan, and the user's purchase behavior characteristics for Zongzi brand B, priced Y yuan, based on the user's historical purchase information.

[0268] After obtaining at least one product feature corresponding to the target product keyword, and at least one purchase behavior feature corresponding to the at least one product feature, the electronic device can determine the second purchase probability through the second probability determination model.

[0269] The training process of the second probability deterministic model will be introduced below.

[0270] In training the second probability determination model, a large amount of data on product features and corresponding user purchase behavior features for each product feature is first collected. The product features are used as input to the second probability determination model, and the corresponding purchase behavior features are used as the true labels. During model training, the model learns the correspondence between different product features and purchase behavior features, thereby outputting the probability that a user might purchase a particular product feature. The model parameters are then fine-tuned through continuous training until training is complete.

[0271] After the model is successfully trained, the electronic device can input each acquired product feature and its corresponding purchase behavior feature into the second probability determination model, so that the second probability determination model outputs the probability that the user may purchase the product corresponding to the current product feature.

[0272] It should be understood that there are multiple keywords for the target product, and each product may have more than one corresponding product feature. The second purchase probability is the highest probability among the multiple probabilities output by the second probability determination model.

[0273] In the above technical solution, after obtaining the target product keywords, the electronic device determines the user's second purchase probability under the knowledge query intent by using the target product keywords and historical purchase information, and can accurately identify the current user's purchase likelihood. The electronic device only generates product tag text for the recommended product when the user's purchase likelihood is high. This ensures that product recommendations are only targeted at users with high purchase intent, making the product recommendation process aligned with user needs. It avoids user complaints and aversion caused by directly recommending products to users, thus improving the user experience and satisfaction during the recommendation process.

[0274] Electronic devices can more accurately predict a user's likelihood of purchasing a target product by acquiring product features corresponding to the target product's keywords and combining this with purchase behavior features extracted from historical purchase information to determine the probability of a second purchase. This data feature analysis method can more deeply explore the correlation between user behavior and product attributes, providing a more reliable basis for subsequently recommending products to users.

[0275] After obtaining the second purchase probability, the electronic device compares the second purchase probability with a second probability threshold. Optionally, the second probability threshold may be the same as or different from the first probability threshold. This application embodiment does not limit this.

[0276] When the second purchase probability is less than or equal to the second probability threshold, it indicates that the user is unlikely to make a purchase, and the electronic device can directly display the target product keywords.

[0277] One possible implementation method also includes:

[0278] If the second purchase probability is less than or equal to the second probability threshold, display the target product keywords.

[0279] Specifically, when the second purchase probability is less than or equal to the second probability threshold, the electronic device can directly display the target product keywords output by the first LLM model on the interface for the user to view.

[0280] In the above technical solution, when the query intent is a knowledge query intent, if the current user's second purchase probability is less than or equal to the second probability threshold, the electronic device only displays the target product keywords obtained by the first query model to the user, thereby reducing the risk of blindly promoting to the user when the user's purchase probability is low, and reducing the user's resentment caused by excessive sales pitches.

[0281] Preferably, to ensure richness of display, an image center can be pre-set in this embodiment. The image center stores various types of images. The electronic device can load suitable images from the image center according to the target product keywords to be displayed and perform quality checks to determine whether the images match the current text.

[0282] When images and text are matched, electronic devices can display the image along with the target product keywords on the interface for the user to view.

[0283] When the second purchase probability is greater than the second probability threshold, it indicates that there are products among the target product keywords that the user is more likely to purchase. The electronic device can generate a first product tag text that matches the user's purchase needs based on the target product keywords and product tag generation model, and then recommend at least one corresponding product based on the first product tag text.

[0284] The product tag generation model is the fourth LLM model. The fourth LLM model is also the model for processing target query text when the query intent is a purchase intent. The function of the fourth LLM model is to capture user preferences based on target product keywords and obtain product tag text that matches the user's purchasing preferences.

[0285] When an electronic device generates the first product tag text based on the target product keywords and the product tag generation model, the first product tag text needs to match the user's purchasing preferences. Therefore, the electronic device also needs to consider historical information.

[0286] Specifically, electronic devices can input historical information and target product keywords into the product label generation model to obtain the first product label text.

[0287] The training process of the product label generation model will be introduced below.

[0288] When training the product tag generation model, it is also possible to collect users' historical purchase information, as well as the historical dialogue content between users and real and virtual shopping guides, and multiple product keywords that need to be tagged, based on the existing general LLM model. Based on the historical dialogue information and historical purchase information, the user's long-term purchase preferences can be extracted, and the user's historical needs can be captured through the historical dialogue information. This information is then combined with the product keywords to write product tag text related to the product keywords.

[0289] During model training, historical dialogue content, historical purchase information, and product keywords are used as inputs to the LLM model, and the product tag text corresponding to the product keywords is used as the label of the LLM model. The LLM model attempts to output the product tag text corresponding to the product keywords, and the LLM model is continuously optimized through the loss function of the LLM model until the training ends.

[0290] Based on the trained product tag generation model, the electronic device can input the target product keywords and historical information (including historical dialogue information and historical purchase information) into the fourth LLM model, and output the first product tag text related to the target product keywords and the user's historical purchase preferences.

[0291] Furthermore, the electronic device can make precise recommendations to the user based on the first product label text, and obtain at least one first product recommendation information.

[0292] Optionally, at least one first product recommendation information includes at least one target store information of the store where the first product is located, and at least one recommendation reason text of the store where the first product is located; or, at least one product recommendation information includes at least one target store information of the store where the first product is located.

[0293] When at least one first product recommendation information includes at least one target store information of the store where the first product is located and at least one recommendation reason text of the store where the first product is located, it means that when recommending products to users, this application embodiment not only displays a list of stores to users, but also displays the recommendation reason of the store, so that users can better understand the origin of the current recommendation information.

[0294] The following is the process for determining at least one first product recommendation.

[0295] In one possible implementation, at least one first product recommendation information is obtained based on the first product label text, including:

[0296] Based on the first product label text, identify multiple first candidate stores and store information for multiple first candidate stores;

[0297] Input the store information of multiple first candidate stores into the product recommendation model to obtain at least one store where the first product is located;

[0298] Input the target store information of at least one store where the first product is located into the recommendation reason generation model to generate recommendation reason text for at least one store where the first product is located.

[0299] Specifically, after obtaining the first product label text, the electronic device can vectorize the first product label text to facilitate processing, thereby obtaining the first product label text vector.

[0300] Optionally, the vectorization of the first product label text may include, but is not limited to, TF-IDF, word embedding, or the use of deep learning models (e.g., convolutional neural networks (CNN) or recurrent neural networks (RNN)). This application embodiment does not limit this.

[0301] In this embodiment, technicians can pre-create corresponding product tag text vectors for all products on the application or mini-program, establish a mapping relationship between the product tag text vectors and the corresponding store information, and store them in the vector engine.

[0302] Optionally, the store information corresponding to the product includes, but is not limited to, the store name, sales volume, rating information, delivery distance, delivery fee, minimum order price, and promotional information.

[0303] After obtaining the first product label text vector, the electronic device can call the vector engine to search for multiple first candidate product label text vectors that are close to the first product label text vector from a large number of product label text vectors.

[0304] Specifically, when the electronic device calls the vector engine to find multiple first candidate product label text vectors based on the first product label text vector, it can calculate multiple similarities between the first product label text vector and each product label text vector through vector similarity calculation. Based on the multiple similarities, it selects multiple first candidate product label text vectors with higher similarity to the first product label text vector from the multiple product label text vectors.

[0305] After obtaining multiple first candidate product label text vectors, the electronic device can continue to call the vector engine to determine multiple first candidate stores corresponding to the multiple first candidate product label text vectors, as well as the store information of the multiple first candidate stores, based on the preset mapping relationship.

[0306] Electronic devices can input the store information of multiple candidate stores into a product recommendation model, enabling the product recommendation model to make decision-making inferences and select at least one store containing the first product to be recommended to the user. Furthermore, the target store information of at least one store containing the first product is input into a recommendation reason generation model, enabling the recommendation reason generation model to generate recommendation reason text for at least one store containing the first product.

[0307] Optionally, the above-mentioned product recommendation model and recommendation reason generation model can be completed by a single LLM model. In other words, the above-mentioned product recommendation model and recommendation reason generation model can be regarded as different functional modules of the same LLM model.

[0308] The training process of the product recommendation model and the recommendation reason generation model will be introduced below.

[0309] For the training process of the product recommendation model, this application embodiment can collect a large amount of store information and user interaction data (e.g., user browsing history, purchase history, collection history) in advance based on the food delivery platform or related database. Based on the store information and user interaction data, technicians can score and rank the stores according to human standards and experience to obtain the store ranking results.

[0310] After obtaining the store ranking results, the store information is input into the product recommendation model, and the store ranking is used as the target output (or label) of the product recommendation model. During training, the model learns the mapping relationship between store information and store ranking, thereby attempting to output a predicted store ranking. The predicted store ranking is compared with the target output store ranking, the loss function is calculated, and the model parameters are continuously adjusted during training until the model's predicted ranking is close to the target output store ranking, at which point model training ends.

[0311] During the use of the product recommendation model, electronic devices can input the store information of multiple first-choice stores into the product recommendation model, so that the product recommendation model can output the store ranking of multiple first-choice stores based on the mapping relationship learned during training.

[0312] After obtaining the store rankings of multiple first candidate stores, the number of stores N can be preset in this embodiment. The electronic device can select the top N stores from the multiple first candidate stores based on the number N, that is, at least one store where the first product is located.

[0313] After obtaining information on at least one store containing a first-choice product, the electronic device can select the target store information from multiple candidate stores. This target store is the one the electronic device will recommend to the user.

[0314] Therefore, electronic devices can input the target store information of at least one store where the first product is located into the recommendation reason generation model, and output the recommendation reason text of at least one store where the first product is located.

[0315] The following describes the training process of the recommendation reason generation model.

[0316] During the training of the recommendation reason generation model, a large amount of store information and corresponding real recommendation reason texts are collected in advance. The recommendation reason texts can be obtained from user reviews and recommended articles on various platforms. Store information is used as input to the recommendation reason generation model, and the corresponding real recommendation reason texts are used as the target output. During model training, the model outputs the generated recommendation reason texts. By comparing the generated recommendation reason texts with the target output of real recommendation reason texts, the loss function of the recommendation reason generation model is calculated. By minimizing the loss function, the recommendation reason texts generated by the model are made closer to the real recommendation reason texts.

[0317] After the recommendation reason generation model is successfully trained, the electronic device can input the target store information of at least one store where the first product is located into the recommendation reason generation model, thereby obtaining the recommendation reason text of at least one store where the first product is located.

[0318] In the above technical solution, when generating at least one first product recommendation information, the electronic device can not only display the store information of the store where the first product is located to the user, but also display the recommendation reasons of the store where the first product is located. This process of displaying recommendation reasons makes the recommendation process of this application more transparent, enhancing the credibility and persuasiveness of the recommendation.

[0319] In another scenario, when the first product recommendation information only includes the store information of the store where the first product is located, there is no need for a recommendation reason generation model. Instead, the electronic device directly selects the store information of the store where the first product is located from the store information of multiple candidate stores to obtain the first product recommendation information.

[0320] Thus, through the above process, when the user's query intent is something other than a purchase intent, the electronic device recommends products to the user and obtains at least one first product recommendation information.

[0321] Error 304 indicates that at least one first product recommendation message has been displayed.

[0322] After obtaining at least one first product recommendation, the electronic device can display at least one first product recommendation to the user on the query interface.

[0323] Preferably, after obtaining at least one product recommendation information, before displaying it, in order to ensure the reliability and accuracy of the recommendation reason text output by the model, the electronic device can refine the recommendation reason text through the model refinement before displaying it.

[0324] Optionally, the polishing model can be an RNN model, a Long Short-Term Memory (LSTM) network model, or a Transformer model; this application does not limit this.

[0325] The training process of the polishing model will be introduced below.

[0326] In training the polishing model, this embodiment can collect a rich variety of store introduction information from major e-commerce platforms as store summary description text. The electronic device can establish a store summary description text database based on the store's identifier and the store summary description text. Furthermore, the electronic device can also obtain the store's recommendation reason text corresponding to the store summary description text. For each pair of store summary description text and recommendation reason text, high-quality polished reference recommendation reason text is collected or manually written as the training target. Multiple pairs of store summary description texts and their corresponding recommendation reason texts are used as input to the polishing model, and the corresponding reference recommendation reason texts are used as the target output. During training, the polishing model continuously learns the mapping relationship between the input text and the reference recommendation reason text, and generates polished recommendation reason text. The loss function of the polishing model is calculated using the polished recommendation text and the reference recommendation reason text. By minimizing the loss function, the polished recommendation reason text generated by the polishing model is made closer to the reference recommendation reason text.

[0327] In the application phase, after obtaining the recommendation reason text of at least one store where a product is located, the electronic device can determine the store summary description text of at least one store where a product is located from the store summary description text database based on the identifier of at least one store where a product is located, and input the store summary description text of at least one store where a product is located and the recommendation reason text into the polishing model to obtain the polished recommendation reason text of at least one store where a product is located.

[0328] Furthermore, the electronic device can display the polished recommendation text of at least one of the products' stores.

[0329] For example, as shown in Figure 2(a), in the query results display interface 105, each store display area displays the store information and the corresponding recommendation reason text.

[0330] In another scenario, when the query intent corresponding to the target query text is a purchase intent, the electronic device can generate a model based on the keywords and product tags corresponding to the target query text to recommend products to the user.

[0331] One possible implementation method also includes:

[0332] When the query intent is to purchase, construct third-party suggestion text based on the keywords corresponding to the target query text;

[0333] Based on the third prompt text and the product label generation model, the second product label text is obtained;

[0334] Based on the text of the second product label, at least one second product recommendation message is obtained.

[0335] The product tag generation model is the fourth LLM model. The function of the fourth LLM model is to capture user preferences based on target product keywords and obtain product tag text that matches the user's purchasing preferences. Specifically, in this embodiment, the query text corresponding to the purchase intent is mostly query text related to specific products, such as "What are some good rice noodle shops around here?"

[0336] The training process for the product label generation model has been described above and will not be repeated here.

[0337] When the query intent is to purchase, electronic devices can directly construct third-party prompt text based on the keywords corresponding to the target query text, and use it as input for the product tag generation model.

[0338] The process of constructing the third prompt text is similar to the process of constructing the first, second, or fourth prompt text. Electronic devices can obtain the third prompt text template corresponding to the function query intent from the prompt center.

[0339] It should be noted that when the query intent is to purchase, in order to accurately recommend products to users, it is necessary to consider the user's historical information. Therefore, the third prompt word template corresponding to the purchase intent is a prompt word template that includes the user's historical information.

[0340] For example, the template for the third prompt word corresponding to the purchase intent can be: "The current user wants to query the question related to a specific product as {input question}, and the user's historical information is {historical information}. Please generate product tag text that recommends products related to a specific product and meets the user's purchase preferences."

[0341] Once the third prompt word template is obtained, the electronic device can fill the keywords and historical information corresponding to the target query text into the corresponding positions of the third prompt word template according to the requirements of the third prompt word template, thereby obtaining the third prompt word text.

[0342] Based on the trained product tag generation model, the electronic device can input the third prompt text into the fourth LLM model and output the second product tag text related to the target product keywords and the user's historical purchase preferences.

[0343] The step of generating at least one second product recommendation information based on the second product label text is the same as the aforementioned step of generating at least one first product recommendation information based on the first product label text. Specifically, it includes:

[0344] In one possible implementation, at least one second product recommendation information includes target store information for at least one store where the second product is located, and recommendation reason text for at least one store where the second product is located. Based on the second product tag text, at least one second product recommendation information is obtained, including:

[0345] Based on the second product label text, identify multiple second candidate stores and their store information;

[0346] Input the store information of multiple second candidate stores into the product recommendation model to obtain at least one store containing the second product;

[0347] Input the target store information of at least one store where the second product is located into the recommendation reason generation model to generate recommendation reason text for at least one store where the second product is located.

[0348] The process of generating at least one second product recommendation information has the same inventive concept as the process of generating at least one first product recommendation information in step 302, and will not be described again here.

[0349] Once at least one second product recommendation is obtained, the electronic device can display at least one second product recommendation on the display interface to the user.

[0350] To facilitate understanding of the solutions in the embodiments of this application, the process of intent locking in the embodiments of this application will be described below with reference to Figure 4.

[0351] Figure 4 is a schematic diagram of a scenario of changing intent provided in an embodiment of this application.

[0352] For example, as shown in Figure 4, the size of the ellipse in the figure represents the strength of the purchase intention. The larger the ellipse, the weaker the purchase intention, and the smaller the ellipse, the stronger the purchase intention.

[0353] As shown in Figure 4, as the ellipse gradually decreases in size, the user's purchase intent corresponding to the query text becomes increasingly apparent. When the query text includes specific products (e.g., milk tea), the electronic device can combine the user's historical information to generate product tag text that matches the user's purchasing preferences, such as taro milk tea, 70% sweetness, and warm in Figure 4. Based on the product tag text, the electronic device can recommend suitable stores for the user to view and place an order.

[0354] To facilitate understanding of the overall implementation process of the embodiments of this application, the overall implementation process of the embodiments of this application will be described below with reference to Figure 5.

[0355] Figure 5 is a schematic flowchart of another method for recommending products online provided in an embodiment of this application.

[0356] For example, as shown in FIG5, the method 500 includes the following steps 501-519.

[0357] 501, responding to the target query text entered by the user, determines the keywords and query intent corresponding to the target query text based on the target query text.

[0358] 502, determine whether the query intent is a purchase intent.

[0359] When the query intent is not a purchase intent, there are three specific scenarios depending on the query intent:

[0360] If the query intent is a function query intent, proceed to step 503;

[0361] If the query intent is a dialogue intent, proceed to step 505;

[0362] If the query intent is a knowledge query intent, proceed to steps 510-511;

[0363] If the query intent is a purchase intent, proceed to step 515.

[0364] 503. If the query intent is a function query intent, construct the fourth prompt text based on the keywords corresponding to the target query text.

[0365] 504. Input the fourth prompt text into the first-order LLM model to obtain the function query text.

[0366] The first-order LLM model is the aforementioned third query model or third LLM model.

[0367] 505. If the query intent is a dialogue intent, construct the second prompt text based on the keywords corresponding to the target query text.

[0368] 506. Input the second prompt text into the second-order LLM model to obtain the response text.

[0369] The second-order LLM model is the second query model or the second LLM model mentioned above.

[0370] 507, retrieves historical information from the user's historical query process.

[0371] 508. Based on historical information and reply text, determine the probability of the first purchase.

[0372] 509. Determine whether the first purchase probability is greater than the first probability threshold.

[0373] When the first purchase probability is greater than the first probability threshold, proceed to step 512;

[0374] When the probability of purchasing is less than or equal to the first probability threshold, a reply text will be displayed.

[0375] 510. If the query intent is a knowledge query intent, construct the first prompt word text based on the keywords corresponding to the target query text;

[0376] 511, retrieve historical information from the user's historical query process.

[0377] 512. Input the first prompt text into the third-order LLM model to obtain the target product keywords; or, input the historical information and reply text into the third-order LLM model to obtain the target product keywords.

[0378] The third-order LLM model is the first query model or the first LLM model mentioned above.

[0379] 513. Determine the second purchase probability based on the target product keywords and historical information.

[0380] 514, determine whether the second purchase probability is greater than the second probability threshold.

[0381] When the second purchase probability is greater than the second probability threshold, proceed to step 516;

[0382] When the second purchase probability is less than or equal to the second probability threshold, display the target product keywords.

[0383] 515. If the query intent is to purchase, construct the third suggestion text based on the keywords corresponding to the target query text.

[0384] 516. Input the third prompt text into the fourth-order LLM model to obtain the second product label text, or input the target product keywords and historical information into the fourth-order LLM model to obtain the first product label text.

[0385] The fourth-order LLM model is the aforementioned fourth LLM model, namely the product label generation model.

[0386] 517. Based on the first product label text, determine multiple first candidate stores and their store information; or, based on the second product label text, determine multiple second candidate stores and their store information.

[0387] 518. Based on the store information of multiple first candidate stores, obtain at least one first product recommendation information, or based on the store information of multiple second candidate stores, obtain at least one second product recommendation information.

[0388] 519, Display at least one first product recommendation message, or display at least one second product recommendation message.

[0389] Steps 501-519 in method 500 have the same inventive concept as steps 301-304 in method 300. For details, please refer to steps 301-304, which will not be repeated here.

[0390] The overall implementation process of online product recommendation in this application embodiment will be further described below with reference to Figures 6-8.

[0391] Figure 6 is a flowchart of an online product recommendation process provided in an embodiment of this application.

[0392] For example, as shown in Figure 6, combined with Figure 5, the overall implementation process of online product recommendation is as follows: First, the electronic device receives the target query text input by the user, and determines the keywords and query intent corresponding to the target query text through the preceding NLU model.

[0393] For different query intents, the embodiments of this application use different LLM models.

[0394] The processing model corresponding to the functional query intent is a first-order LLM model. The first-order LLM model is the same LLM model as the first-order LLM model in Figure 5, corresponding to the third query model or the third LLM model mentioned above.

[0395] The processing model corresponding to the dialogue intent is a second-order LLM model. The second-order LLM model is the same LLM model as the second-order LLM model in Figure 5, corresponding to the second query model or the second LLM model introduced above.

[0396] The processing model corresponding to the knowledge query intent is a third-order LLM model. The third-order LLM model is the same LLM model as the third-order LLM model in Figure 5, corresponding to the first query model or the first LLM model introduced above.

[0397] The processing model corresponding to the purchase intent is a fourth-order LLM model. The fourth-order LLM model is the same LLM model as the fourth-order LLM model in Figure 5, corresponding to the product label generation model or the fourth LLM model introduced above.

[0398] After determining the keywords and query intent corresponding to the target query text, the electronic device can select the appropriate LLM model for processing based on the different query intents. The suggestion center stores suggestion word templates for different query intents.

[0399] Depending on the query intent, the processing of the target query text can be divided into the following four cases:

[0400] (1) When the query intent is a function query intent, the electronic device can call the prompt word template corresponding to the function query intent from the prompt center, and construct the input prompt word text of the first-order LLM model based on the prompt word template and the keywords corresponding to the target query text. The first-order LLM model determines the API name or tool name corresponding to the target query text according to the target query text, and calls the corresponding API or tool to query the target query text, obtain the function query text and display it.

[0401] (2) When the query intent is a dialogue intent, the electronic device can retrieve the prompt word template corresponding to the dialogue intent from the prompt center, and construct the input prompt word text for the second-order LLM model based on the prompt word template and the keywords corresponding to the target query text. The second-order LLM model determines the response text corresponding to the target query text based on the target query text.

[0402] Furthermore, the electronic device inputs the reply text and the user's historical information into the first probability determination model, and outputs the user's first purchase probability under the dialogue intent.

[0403] When the first purchase probability is less than or equal to the first probability threshold, the electronic device displays a reply text.

[0404] When the probability of the first purchase is greater than the first probability threshold, the electronic device can call a higher-order third-order LLM model, thereby using the reply text and historical information as input to the third-order LLM model, so that the third-order LLM model outputs the target product keywords.

[0405] (3) When the query intent is a knowledge query intent, the electronic device can retrieve the prompt word template corresponding to the knowledge query intent from the prompt center, and construct the input prompt word text for the third-order LLM model based on the prompt word template and the keywords corresponding to the target query text. The third-order LLM model determines the target product keywords corresponding to the target query text based on the target query text.

[0406] Furthermore, the electronic device inputs the target product keywords and the user's historical information into the second probability determination model, and outputs the user's second purchase probability under the knowledge query intent.

[0407] When the second purchase probability is less than or equal to the second probability threshold, the electronic device displays the target product keywords.

[0408] When the second purchase probability is greater than the second probability threshold, the electronic device can call the highest-order fourth-order LLM model, thereby taking the target product keywords and historical information as input to the fourth-order LLM model, and making the fourth-order LLM model output the product tag text corresponding to the target product keywords.

[0409] (4) When the query intent is a purchase intent, the electronic device can retrieve the prompt word template corresponding to the purchase intent from the prompt center, and construct the input prompt word text for the fourth-order LLM model based on the prompt word template and the keywords corresponding to the target query text. The fourth-order LLM model determines the product label text corresponding to the target query text based on the target query text.

[0410] After obtaining the product label text through the methods described above, the electronic device can vectorize the product label text to obtain product label text vectors. It then calls a vector engine to determine multiple candidate product label text vectors that are close to the original product label text vectors from a pool of preset vectors. The electronic device can also determine the stores of multiple candidate stores based on the multiple first product label text vectors and obtain the store information for these candidate stores.

[0411] Furthermore, electronic devices can input store information from multiple candidate stores into the decision reasoning LLM model, enabling the model to output recommendation information for at least one product.

[0412] The decision reasoning LLM model comprises two sub-models: a product recommendation model and a recommendation reason generation model. The product recommendation model identifies at least one store containing a product from a pool of potential first-choice stores. The recommendation reason generation model generates recommendation reason text for at least one store containing a product, based on the target store information.

[0413] To enrich the content of the recommendation reason text, after obtaining the recommendation reason text of at least one store where the product is located, the electronic device can further call the summary engine to search for the store summary description text of at least one store where the product is located, and input the recommendation reason text of at least one store where the product is located and the store summary description text of at least one store where the product is located into the polishing LLM model, outputting and displaying the polished recommendation reason text of at least one store where the product is located.

[0414] Furthermore, when the electronic device ultimately displays function query text, reply text, or target product keywords, an image center can be pre-set in this embodiment to enrich the displayed content. The image center stores various types of images. The electronic device can load suitable images from the image center based on the displayed content and perform quality checks to determine whether the image matches the current text.

[0415] When images and text are matched, electronic devices can display both images and text on the interface for users to view.

[0416] Figure 7 is a flowchart of another online product recommendation process provided in an embodiment of this application.

[0417] For example, as shown in Figure 7, the implementation process of online product recommendation shown in Figure 7 is similar to that shown in Figure 6. The difference is that the pre-NLU model in Figure 7 is removed and replaced by the highest-order fourth-order LLM model in Figure 6.

[0418] When the query intent is a functional query intent, a conversational query intent, or a knowledge query intent, the fourth-order LLM model in Figure 6 plays the same role as the NLU model in Figure 6. For a detailed explanation, please refer to the description in Figure 6; it will not be repeated here.

[0419] When the query intent is a purchase intent, the specific processing flow of the fourth-order LLM model can be represented by Figure 8 below.

[0420] Figure 8 is a flowchart of another online product recommendation process provided in an embodiment of this application.

[0421] For example, as shown in Figure 8, combined with Figure 7, when the fourth-order LLM model determines that the query intent corresponding to the target query text is a purchase intent, the electronic device can obtain the prompt word template corresponding to the purchase intent from the prompt center, and construct the prompt word text according to the keywords corresponding to the target query text, the user's historical information, and the prompt word template corresponding to the purchase intent, and input it into the fourth-order LLM model. The fourth-order LLM model outputs the product label text and vectorizes it to obtain the product label text vector, and obtains at least one product recommendation information based on the product label text vector.

[0422] In summary, this application proposes a method for online product recommendation. During a dialogue between a user and a virtual shopping guide, the electronic device responds to the user's input target query text and can determine the keywords and query intent corresponding to the target query text. When the electronic device recognizes that the user's query intent is not a purchase intent, it can generate target product keywords based on the keywords corresponding to the target query text. In this process, the electronic device can capture the user's needs, mine and generate relevant product keywords even when the user has no purchase intention, making product recommendation scenarios more flexible and broader. It also saves the user's query time and improves the efficiency of the dialogue between the user and the virtual shopping guide. Finally, the electronic device can obtain at least one first product recommendation based on the target product keywords. This process ensures that the final recommended products are closely related to the user's query text, avoiding blind recommendations. Therefore, the beneficial effects of this application are: during the user's online shopping process, even if the user does not explicitly express a purchase intent, the electronic device can accurately capture and mine the user's purchase interests and recommend products, saving the user's time in filtering products and increasing user stickiness and purchase probability.

[0423] Figure 9 is a schematic diagram of the structure of an online product recommendation device provided in an embodiment of this application.

[0424] For example, as shown in FIG9, the device 900 includes:

[0425] The text processing module 901 is used to respond to the target query text input by the user, and determine the keywords and query intent corresponding to the target query text based on the target query text;

[0426] The keyword generation module 902 is used to generate target product keywords based on the keywords corresponding to the target query text when the query intent is an intent other than a purchase intent.

[0427] The first information generation module 903 is used to obtain at least one first product recommendation information based on the target product keywords;

[0428] The first information display module 904 is used to display the first product recommendation information.

[0429] In one possible implementation, the keyword generation module 902 is specifically used to: if the query intent is a knowledge query intent, construct a first prompt word text based on the keywords corresponding to the target query text; input the first prompt word text into the first query model to generate the target product keyword.

[0430] In one possible implementation, the keyword generation module 902 is further configured to: determine a first prompt word template based on the knowledge query intent; construct the first prompt word text based on the keywords corresponding to the target query text and the first prompt word template; or, obtain the user's profile information; and construct the first prompt word text based on the keywords corresponding to the target query text, the profile information, and the first prompt word template.

[0431] In one possible implementation, the keyword generation module 902 is further configured to: if the query intent is a dialogue intent, construct a second prompt word text based on the keywords corresponding to the target query text; input the second prompt word text into the second query model to generate a response text; and generate the target product keyword based on the response text.

[0432] In one possible implementation, the keyword generation module 902 is further configured to: determine a second prompt word template based on the dialogue intent; construct the second prompt word text based on the keywords corresponding to the target query text and the second prompt word template; or, obtain the user's profile information; and construct the second prompt word text based on the keywords corresponding to the target query text, the profile information, and the second prompt word template.

[0433] In one possible implementation, the keyword generation module 902 is further configured to: determine a first purchase probability based on the reply text; if the first purchase probability is greater than a first probability threshold, generate the target product keyword based on the reply text and the first query model.

[0434] In one possible implementation, the device further includes a second information display module, used to display the reply text if the first purchase probability is less than or equal to the first probability threshold.

[0435] In one possible implementation, the keyword generation module 902 is further configured to: obtain the user's historical information during the historical query process; the historical information includes historical purchase information and historical dialogue information; and input the historical information and the reply text into the first query model to generate the target product keyword.

[0436] In one possible implementation, the keyword generation module 902 is further configured to: determine whether there is a knowledge tag corresponding to the knowledge query intent in the response text; if the knowledge tag exists, obtain the first purchase probability based on the knowledge tag and the historical purchase information.

[0437] In one possible implementation, the first information generation module 903 is specifically used to: determine a second purchase probability based on the target product keywords; if the second purchase probability is greater than a second probability threshold, obtain a first product tag text based on the target product keywords and product tag generation model; and obtain the at least one first product recommendation information based on the first product tag text.

[0438] In one possible implementation, the device further includes a third information display module, used to display the target product keyword if the second purchase probability is less than or equal to the second probability threshold.

[0439] In one possible implementation, the keyword generation module 902 is further configured to: obtain the user's historical information during the historical query process; the historical information includes historical purchase information and historical dialogue information; and obtain the product features corresponding to the target product keyword; extract features from the historical purchase information to obtain purchase behavior features; and obtain the second purchase probability based on the product features and the purchase behavior features.

[0440] In one possible implementation, the at least one first product recommendation information includes target store information of at least one store where the first product is located, and recommendation reason text of the at least one store where the first product is located. The first information generation module 903 is further configured to: determine multiple first candidate stores and store information of the multiple first candidate stores based on the first product tag text; input the store information of the multiple first candidate stores into the product recommendation model to obtain the store where the at least one first product is located; input the target store information of the at least one first product store into the recommendation reason generation model to generate recommendation reason text of the at least one first product store.

[0441] In one possible implementation, the device further includes: a second information generation module, configured to, when the query intent is the purchase intent, construct a third prompt word text based on the keywords corresponding to the target query text; obtain a second product tag text based on the third prompt word text and the product tag generation model; and obtain at least one second product recommendation information based on the second product tag text.

[0442] In one possible implementation, the at least one second product recommendation information includes target store information of at least one store containing the second product, and recommendation reason text for the at least one second product store. The second information generation module is specifically used to: determine multiple second candidate stores and store information of the multiple second candidate stores based on the second product tag text; input the store information of the multiple second candidate stores into the product recommendation model to obtain the store containing the at least one second product; and input the target store information of the at least one second product store into the recommendation reason generation model to generate recommendation reason text for the at least one second product store.

[0443] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.

[0444] For example, as shown in FIG10, the electronic device 1000 includes a memory 1001 and a processor 1002, wherein the memory 1001 stores executable program code 10011, and the processor 1002 is used to call and execute the executable program code 10011 to perform a method of recommending products online.

[0445] This embodiment can divide the electronic device into functional modules according to the above method example. For example, each module can correspond to a separate functional module, or two or more functions can be integrated into one processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and only represents one logical functional division. In actual implementation, there may be other division methods.

[0446] When each functional module is divided according to its corresponding function, the electronic device may include: a text processing module, a keyword generation module, a first information generation module, and a first information display module, etc. It should be noted that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.

[0447] The electronic device provided in this embodiment is used to execute the above-described method for recommending products online, and therefore can achieve the same effect as the above-described implementation method.

[0448] When using integrated units, the electronic device may include a processing module and a storage module. The processing module is used to control and manage the operation of the electronic device. The storage module is used to support the execution of relevant program code and data by the electronic device.

[0449] The processing module may be a processor or a controller, which can implement or execute various exemplary logic blocks, modules, and circuits shown in conjunction with the disclosure of this application. The processor may also be a combination of functions that implement computing capabilities, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, etc., and the storage module may be a memory.

[0450] This embodiment also provides a computer-readable storage medium storing computer program code. When the computer program code is run on a computer, the computer executes the aforementioned method steps to implement a method for recommending products online as described in the above embodiment.

[0451] This embodiment also provides a computer program product that, when run on a computer, causes the computer to perform the aforementioned steps to implement a method for recommending products online as described in the above embodiment.

[0452] In addition, the electronic device provided in the embodiments of this application may specifically be a chip, component or module. The electronic device may include a connected processor and a memory. The memory is used to store instructions. When the electronic device is running, the processor may call and execute the instructions to make the chip execute a method for recommending products online as described in the above embodiments.

[0453] In this embodiment, the electronic device, computer-readable storage medium, computer program product or chip are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can be referred to the beneficial effects of the corresponding methods provided above, and will not be repeated here.

[0454] Through the above description of the embodiments, those skilled in the art will understand that, for the sake of convenience and brevity, only the division of the above functional modules is used as an example. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

[0455] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0456] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

Claims

1. A method of recommending goods online, characterized by, The method includes: In response to the target query text entered by the user, the keywords and query intent corresponding to the target query text are determined based on the target query text; When the query intent is an intent other than a purchase intent, target product keywords are generated based on the keywords corresponding to the target query text; Based on the target product keywords, at least one first product recommendation information is obtained; Display the first or at least one first product recommendation information.

2. The method of claim 1, wherein, The step of generating target product keywords based on the keywords corresponding to the target query text includes: If the query intent is a knowledge query intent, construct the first prompt word text based on the keywords corresponding to the target query text; Input the first prompt text into the first query model to generate the target product keywords.

3. The method of claim 1, wherein, The step of generating target product keywords based on the keywords corresponding to the target query text includes: If the query intent is a dialogue intent, construct a second prompt text based on the keywords corresponding to the target query text; Input the second prompt text into the second query model to generate the response text; Generate the target product keywords based on the response text.

4. The method of claim 3, wherein, The step of generating the target product keywords based on the response text includes: Based on the response text, determine the first purchase probability; If the first purchase probability is greater than the first probability threshold, the target product keywords are generated based on the reply text and the first query model.

5. The method of claim 4, wherein, The method further includes: Obtain the user's historical information during the historical query process; the historical information includes historical purchase information and historical conversation information. And, generating the target product keywords based on the response text and the first query model includes: The historical information and the reply text are input into the first query model to generate the target product keywords.

6. The method of claim 5, wherein, The step of determining the first purchase probability based on the reply text includes: Determine whether the response text contains a knowledge tag corresponding to the knowledge query intent; If the knowledge tag exists, the first purchase probability is obtained based on the knowledge tag and the historical purchase information.

7. The method of claim 1, wherein, The step of obtaining at least one first product recommendation information based on the target product keywords includes: Determine the second purchase probability based on the target product keywords; If the second purchase probability is greater than the second probability threshold, the first product tag text is obtained according to the target product keyword and product tag generation model; Based on the first product label text, the at least one first product recommendation information is obtained.

8. The method of claim 7, wherein, The method further includes: Obtain the user's historical information during the historical query process; the historical information includes historical purchase information and historical conversation information. And, determining the second purchase probability based on the target product keywords includes: Obtain the product features corresponding to the target product keywords; Feature extraction is performed on the historical purchase information to obtain purchase behavior features; The second purchase probability is obtained based on the product characteristics and the purchase behavior characteristics.

9. The method of claim 7, wherein, The at least one first product recommendation information includes target store information of at least one store where the first product is located, and recommendation reason text of the at least one first product store. Obtaining the at least one first product recommendation information based on the first product tag text includes: Based on the first product label text, determine multiple first candidate stores and the store information of the multiple first candidate stores; The store information of the multiple first candidate stores is input into the product recommendation model to obtain the store where the at least one first product is located; Input the target store information of the store where the at least one first product is located into the recommendation reason generation model to generate recommendation reason text for the store where the at least one first product is located.

10. The method of claim 1, wherein, The method further includes: When the query intent is the purchase intent, a third prompt text is constructed based on the keywords corresponding to the target query text; Based on the third prompt text and the product label generation model, the second product label text is obtained; Based on the text of the second product label, at least one second product recommendation message is obtained.

11. An apparatus for recommending goods online, characterized by The device includes: The text processing module is used to respond to the target query text input by the user, and determine the keywords and query intent corresponding to the target query text based on the target query text; The keyword generation module is used to generate target product keywords based on the keywords corresponding to the target query text when the query intent is an intent other than a purchase intent; The first information generation module is used to obtain at least one first product recommendation information based on the target product keywords; The first information display module is used to display the at least one first product recommendation information.

12. An electronic device, comprising: The electronic device includes: Memory, used to store executable program code; A processor for calling and running the executable program code from the memory, causing the electronic device to perform the method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed, implements the method as described in any one of claims 1 to 10.