Shopping guidance method and system based on large language model
Through a shopping guide system based on a large language model, natural language understands user needs and generates prompt words, solving the problems of long user decision-making time and inaccurate recommendation results in the existing shopping guide system, achieving a more efficient and appropriate shopping guide experience.
Patent Information
- Application Number
- PCT/CN2024/115996
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-05
- Filing Date
- 2024-08-30
- Publication Date
- 2025-06-12
AI Technical Summary
In the existing shopping guide system, users need to spend a lot of time browsing in search and recommendation lists, the decision-making time is long and costly, and the user's active input is limited, the recommendation results are inaccurate, and it is difficult to adapt to natural language expression.
The shopping guide method and system based on the large language model are adopted to understand the shopping guide needs entered by users through natural language, generate prompt words that describe the needs, and use the preset large language model for language processing to output the target shopping guide information.
Save user decision-making time, provide shopping guides that are more in line with natural language, and improve user experience and shopping guide efficiency.
Smart Images

Figure CN2024115996_12062025_PF_FP_ABST
Abstract
Description
Shopping guide method and system based on large language model Technical Field
[0001] The present application relates to the field of artificial intelligence technology, and more specifically, to a shopping guide method and system based on a large language model in the field of artificial intelligence technology. Background Art
[0002] In related technologies, the shopping guide ordering process typically involves multiple entry points, as well as portals for platform functions like customer service and orders. Users spend considerable time browsing search and recommendation lists, considering numerous factors in their decision-making process. In the case of shopping guide engagement, the decision-making process, from entry to order placement, is time-consuming and costly.
[0003] In most shopping guide scenarios, even when users actively enter search boxes, they typically only use short words. This results in inaccurate recommendations, and the user's active expression is limited and doesn't align with their daily natural language.
[0004] Summary of the Invention
[0005] The present application provides a shopping guide method and system based on a large language model, which can not only save users' decision-making time, but also provide users with targeted shopping guide needs that are more in line with the user's natural language.
[0006] In a first aspect, a shopping guide method based on a large language model is provided, the method comprising:
[0007] Acquire the shopping guide requirements input by the user and the content enhancement configuration carried by the shopping guide requirements;
[0008] Performing natural language understanding on the shopping guide requirements to obtain requirements understanding results;
[0009] Based on the demand understanding result and the content enhancement configuration, generating prompt words describing the shopping guide demand;
[0010] A preset large language model is used to perform language processing on the prompt words, and target shopping guide information corresponding to the shopping guide demand is generated and output to the user terminal.
[0011] In the above technical solution, for a shopping guide request input by a user, the content enhancement configuration of the system containing the shopping guide request is obtained, thereby obtaining the content enhancement configuration, such as the time the shopping guide request was input into the system, the user's ID, and the address of the user. Natural language understanding is then performed on the shopping guide request, enabling understanding of the shopping guide request in natural language, thereby more accurately obtaining a demand understanding result for the shopping guide request. Combining the demand understanding result with the content enhancement configuration enables more reasonable and accurate generation of prompt words describing the shopping guide request. The prompt words and the shopping guide request are then input into a preset large language model, enabling the preset large language model to accurately predict target shopping guide information that meets the shopping guide request and output it to the user. Thus, throughout the entire shopping guide process, once the user inputs the shopping guide request, the backend, using the large language model, outputs the target shopping guide information for the user. This eliminates the need for multiple user interactions to respond to the user's natural language input shopping guide request, saving the user's decision-making time and providing the user with a target shopping guide request that is more closely aligned with the user's natural language.
[0012] In conjunction with the first aspect, in some possible implementations, the using a preset large language model to perform language processing on the prompt word to generate and output target shopping guide information corresponding to the shopping guide demand to the user terminal includes:
[0013] Performing semantic analysis on the prompt word using the preset large language model to determine a plurality of application program interfaces required to respond to the shopping guide demand;
[0014] The return results of the multiple application program interfaces are filtered and summarized based on a preset database to obtain and output the target shopping guide information to the user terminal.
[0015] In the above scheme, by searching for historical related information matching the shopping guide needs in the preset database, the prompt words and the historical related information are used together as the input of the preset large language model, so that the target shopping guide information output by the preset large language model can be more in line with the user's intention.
[0016] In conjunction with the first aspect, in some possible implementations, the filtering and summarizing of the return results of the multiple application program interfaces based on a preset database to obtain and output the target shopping guide information to the user terminal includes:
[0017] Determining a calling sequence among the plurality of application program interfaces;
[0018] Sending the calling instructions to the multiple application program interfaces according to the calling order;
[0019] Based on the historical association information in the preset database that matches the shopping guide needs, the return results of the application interface are filtered and summarized, and the target shopping guide information is generated and output to the user end; wherein, the preset database is used to store the historical association information of historical shopping guide needs, and the historical association information includes: historical target shopping guide information of the historical shopping guide needs and interactive information corresponding to the historical target shopping guide information.
[0020] In the above scheme, multiple application programming interfaces are called separately in the order of calling multiple application programming interfaces to receive the return results of these application programming interfaces. Afterwards, the return results are optimized through historical association information so that the target shopping guide information will not have too high an overlap rate with the historical shopping guide information and can also meet the user's historical interests.
[0021] In conjunction with the first aspect, in some possible implementations, sending the call instructions to the multiple application programming interfaces in the calling order includes:
[0022] Obtaining the function of any one of the plurality of application programming interfaces and a return result of a previous application programming interface; wherein the previous application programming interface is an application programming interface that is arranged before and adjacent to the any one of the application programming interfaces in the calling sequence;
[0023] Generate calling parameters of any application program interface according to the function of any application program interface and the return result of the previous application program interface;
[0024] Sending a call instruction carrying the call parameters to any one of the application program interfaces.
[0025] In the above scheme, for any application program interface, the calling parameters of the application program interface can be accurately generated through the functions of the application program interface combined with the return results of the previous application program interface, thereby facilitating the large language model to accurately call the corresponding application program interface.
[0026] In conjunction with the first aspect, in certain possible implementations, the returned result includes: a plurality of initial shopping guide targets that respond to the shopping guide demand; and the filtering and summarizing of the returned result of the application program interface based on historical association information matching the shopping guide demand in the preset database, generating and outputting the target shopping guide information to the user terminal, includes:
[0027] If the type of the returned result is business type, the multiple initial shopping guide objects are screened according to the preset screening rules and the historical association information, and the target shopping guide information is generated and output to the user terminal.
[0028] In the above solution, the returned results of the object business class are filtered by preset screening rules and historical association information, which can not only reduce the redundancy of the target shopping guide information presented to the user, but also make the target shopping guide information more targeted.
[0029] In conjunction with the first aspect, in some possible implementations, if the type of the returned result is business type, screening the multiple initial shopping guide objects according to preset screening rules and the historical association information, generating and outputting the target shopping guide information to the user terminal, includes:
[0030] If the type of the returned result is the business class, screening a set of candidate shopping guide objects from the multiple initial shopping guide objects according to the preset screening rule;
[0031] Filtering and sorting the candidate shopping guide object set based on the historical association information and a preset number to obtain sorted shopping guide objects less than the preset number;
[0032] Based on the sorted shopping guide objects, the target shopping guide information is determined and output to the user terminal.
[0033] In the above scheme, for the return results of the business class, multiple initial shopping guide objects are first preliminarily screened through preset screening rules to screen out a smaller set of candidate shopping guide objects; then, shopping guide objects with a high degree of overlap are filtered out through historical correlation information, and the filtered shopping guide objects are sorted to output sorted shopping guide objects, so that the target shopping guide objects provided to the client are more concise and accurate, which can save users time in browsing the target shopping guide information, thereby improving the efficiency of users' decision-making.
[0034] In conjunction with the first aspect, in some possible implementations, the preset screening rule includes at least one of the following:
[0035] The favorable comments are ranked in the top n favorable comments of each of the multiple initial shopping guide objects; wherein n is a positive integer less than the number of the initial shopping guide objects;
[0036] The sales volume is ranked in the top n of the sales volume of the initial shopping guide objects;
[0037] The distance between the location and the location corresponding to the shopping guide demand is arranged in the last n of the initial shopping guide objects;
[0038] The selling prices are arranged after the n prices of the initial shopping guide objects.
[0039] In the above solution, by setting preset screening rules, multiple initial shopping guide objects can be quickly screened, thereby reducing the redundancy of the initial shopping guide objects in the returned results.
[0040] In conjunction with the first aspect, in some possible implementations, determining and outputting the target shopping guide information to the user terminal based on the sorted shopping guide objects includes:
[0041] Determining description information of the sorted shopping guide objects;
[0042] The description information is merged with the sorted shopping guide objects to obtain and output the target shopping guide information to the user terminal.
[0043] In the above solution, by outputting the description information and the sorted shopping guide objects simultaneously, the client can quickly understand the output target shopping guide information, thereby saving decision-making time.
[0044] In conjunction with the first aspect, in some possible implementations, the method further includes:
[0045] If the type of the returned result is content type, the content in the returned result is summarized and modified, and the target shopping guide information is generated and output to the user terminal.
[0046] In the above solution, by summarizing and modifying the returned results of the content class, the output target shopping guide information can be made more understandable and concise, thereby saving the user's understanding time.
[0047] In conjunction with the first aspect, in some possible implementations, performing natural language understanding on the shopping guide demand to obtain a demand understanding result includes:
[0048] Performing intent recognition on the shopping guide demand to obtain the intent type of the shopping guide demand;
[0049] The intention of the shopping guide demand is understood to obtain the intention content of the shopping guide demand; wherein the demand understanding result includes: the intention type and intention content.
[0050] In the above technical solution, by using NLU to perform natural language intent recognition on shopping guide needs, the intent type of the shopping guide needs can be accurately analyzed to facilitate the subsequent matching of prompt word templates that meet the intent type; and by understanding the natural language intent of the shopping guide needs, the specific intent content of the shopping guide needs input by the user end can be accurately obtained, which facilitates the combination of intent types to jointly generate prompt words for input into the large language model.
[0051] In conjunction with the first aspect, in some possible implementations, generating prompt words describing the shopping guide demand based on the demand understanding result and the content enhancement configuration includes:
[0052] Searching for a prompt word template that matches the intention type in a preset prompt word template library; wherein the preset prompt word template library is used to store multiple prompt word templates that match the preset intention types;
[0053] Modify and enhance the intended content based on the content enhancement configuration to generate prompt content;
[0054] The prompt content is embedded in the prompt word template to obtain the prompt word.
[0055] In the above scheme, by first determining the prompt word template according to the intent type, and then generating the prompt content according to the content enhancement configuration and the intent content, the prompt content can be made more accurate, so that the obtained prompt words are more in line with the intention of shopping needs.
[0056] In conjunction with the first aspect, in some possible implementations, the content enhancement configuration includes at least one of the following:
[0057] The time of inputting the shopping guide demand;
[0058] The user identifier corresponding to the shopping guide requirement;
[0059] location information corresponding to the shopping guide demand;
[0060] Enter the page type of the shopping guide requirement;
[0061] Enter the same time interval for the shopping guide requirement.
[0062] In the above solution, in the process of generating prompt words, by taking the content enhancement configuration into consideration, different prompt words can be generated through different content enhancement configurations, thereby making the prompt words input into the preset large language model more accurate and rich.
[0063] In conjunction with the first aspect, in certain possible implementations, after using a preset large language model to perform language processing on the prompt word to generate and output target shopping guide information corresponding to the shopping guide demand to the user terminal, the method further includes:
[0064] Performing quality inspection on the target shopping guide information to obtain a quality inspection result;
[0065] If the quality inspection result meets the preset quality inspection condition, determining whether there is any blocked information in the preset blocked information database in the target shopping guide information;
[0066] If the shielding information does not exist in the target shopping guide information, the target shopping guide information is output on the page for inputting the shopping guide requirements.
[0067] In the above solution, since the content generated by the preset large language model is uncontrollable, quality detection is performed on the target shopping guide information output by the preset large language model to improve the accuracy of the shopping guide information output to the client.
[0068] In conjunction with the first aspect, in some possible implementations, the method further includes:
[0069] If the quality inspection result does not meet the preset quality inspection condition or the blocked information exists in the target shopping guide information, obtaining preset shopping guide information;
[0070] On the page for inputting the shopping guide requirements, the preset shopping guide information is output.
[0071] In the above solution, after controlling the target shopping guide information layer by layer, reasonable and accurate target shopping guide information is output on the input page of shopping guide needs. In this way, the page for outputting the target shopping guide information and the page for inputting the shopping guide needs are the same page. Users do not need to switch pages back and forth, providing users with a sense of unity and eliminating the need for users to operate page jumps.
[0072] In conjunction with the first aspect, in some possible implementations, the using a preset large language model to perform language processing on the prompt word to generate and output target shopping guide information corresponding to the shopping guide demand to the user terminal includes:
[0073] If the shopping guide demand is a knowledge question and answer demand, the preset large language model is used to determine and output target shopping guide information matching the knowledge question and answer demand to the user terminal in the knowledge base of the preset large language model.
[0074] In the above solution, for knowledge question-and-answer needs, the preset large language model directly outputs content that can answer the shopping guide needs through its own knowledge reserves. This can not only save the computing power consumed by calling the application interface, but also quickly provide accurate answers to the user end.
[0075] In conjunction with the first aspect, in certain possible implementations, after using a preset large language model to perform language processing on the prompt word to generate and output target shopping guide information corresponding to the shopping guide demand to the user terminal, the method further includes:
[0076] Obtaining target interaction information of the user terminal for the target shopping guide information;
[0077] Binding the target interaction information and the target shopping guide information to the shopping guide requirements respectively to obtain a binding result;
[0078] The preset database is updated based on the binding result to obtain an updated preset database.
[0079] In the above solution, the target interaction information, target shopping guide information and shopping guide requirements are bound and stored in the preset database, which can enrich the updated preset database and facilitate the subsequent provision of reference historical related information for the latest shopping guide requirements input.
[0080] In a second aspect, a shopping guide system based on a large language model is provided, the system comprising:
[0081] The user side is used to obtain the input shopping guide requirements and input them into the natural language understanding module;
[0082] The natural language understanding module is used to perform natural language understanding on the shopping guide demand, obtain demand understanding results and output them to the prompt word generation module;
[0083] The prompt word generation module is used to obtain the content enhancement configuration carried by the shopping guide demand; and based on the demand understanding result and the content enhancement configuration, generate prompt words describing the shopping guide demand, and input the prompt words into the model processing module;
[0084] The model processing module is used to perform language processing on the prompt words, generate and output target shopping guide information corresponding to the shopping guide needs to the user terminal.
[0085] In a third aspect, a server is provided, comprising a memory and a processor. The memory is configured to store executable program code, and the processor is configured to call and execute the executable program code from the memory, so that the device executes the method of the first aspect or any possible implementation of the first aspect.
[0086] In a fourth aspect, a computer program product is provided, comprising: a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.
[0087] In a fifth aspect, a computer-readable storage medium is provided, which stores a computer program code. When the computer program code runs on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0088] FIG1 is a schematic diagram of an application scenario of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0089] FIG2 is a schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0090] FIG3 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0091] FIG4 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0092] FIG5 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0093] FIG6 is a schematic diagram of an implementation flow of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0094] FIG7 is a schematic diagram of another application scenario of the shopping guide method based on a large language model provided in an embodiment of the present application;
[0095] FIG8 is another schematic flow chart of a shopping guide method based on a large language model provided in an embodiment of the present application;
[0096] FIG9 is a schematic structural diagram of a shopping guide system based on a large language model provided in an embodiment of the present application;
[0097] FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0098] The following will clearly and thoroughly describe the technical solutions in this application in conjunction with the accompanying drawings. In the description of the embodiments of this application, unless otherwise specified, " / " means or, for example, A / B can mean A or B: "and / or" in the text is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of this application, "multiple" means two or more than two.
[0099] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features.
[0100] To facilitate understanding of the embodiments of the present application, the following explains the professional terms involved in the embodiments of the present application:
[0101] Large Language Model (LLM): A deep learning model trained on large amounts of text. It can generate natural language text or understand the meaning of language text, thereby handling a variety of natural language tasks, including conversational question-answering, information extraction, and text classification. Examples of such models include the Chat Generative Pre-trained Transformer 3.5 (ChatGPT3.5), the Chinese-English Bilingual Hundred Billion Dialogue Model (ChatGLM), and the Large Language Model Meta AI (LLaMA).
[0102] Prompt model: This refers to the input text paragraph or phrase, which is added before the task text to be solved and passed to the LLM to achieve the expected task. It has the meaning of instructions and prompts, usually in the form of questions, dialogues, descriptions, etc. The prompt input enables the LLM to adapt to various downstream applications.
[0103] For ease of understanding, the following will take the preset application installed on the mobile phone (for example, application A) as an example, and combine with the accompanying drawings to specifically explain the scenario in which the running interface of application A is displayed to the user in the preset application installed on the mobile phone (for example, application A).
[0104] Figure 1 shows a graphical user interface (GUI) launched by a user running Application A. For example, Figure 1(a) shows screen 101 displayed when a mobile phone is in unlocked mode. Screen 101 displays a weather clock component and multiple Application A programs (Apps). Application A programs may include Phone, Messages, Settings, and Application A.
[0105] It should be understood that the interface 101 may also include more other applications, and the embodiments of the present application do not impose any limitation on this.
[0106] For example, as shown in FIG1(a), a mobile phone detects a user clicking on the icon of application A. In response to the user's click, the mobile phone displays a main interface 102 of application A, as shown in FIG1(b). Main interface 102 may display multiple category menus, operable controls or buttons, images, and other interface content to meet the user's needs. Main interface 102 may also be referred to as "application A's homepage."
[0107] For example, as shown in (b) in FIG1 , on the main interface 102 of application A, there are displayed on the homepage a search box 11, a recommended food flow 12, a scene card 13, a trend engine, a channel page 14, an all-purpose supermarket and many other shopping guide entrances, as well as different classification menus such as gourmet takeout, supermarkets, fruits, buying medicine, desserts, hamburgers, lobsters and barbecues; on the recommended food flow 12, the stores of each merchant and a food introduction are displayed.
[0108] As shown in (b) of Figure 1 , the mobile phone detects that the user has clicked on the main interface 102, such as clicking on "My" on the main interface 102, and enters the "My" interface in response to the user's click. In this interface, the user can click on "My Orders", and in response to this click, the mobile phone displays an interface 103 as shown in (c) of Figure 1 , which is a display interface for historical orders; the user's historical orders are displayed in chronological order on interface 103; for example, the historical orders displayed in interface 103 include the store, food, and the quantity purchased (for example, ×× donkey meat fried cakes, price and quantity; ×× crayfish, price and quantity; ×× braised noodles - spicy soup, price and quantity). In the "My" interface, if the user clicks on "My Customer Service", in response to this click, the mobile phone displays an interface 104 as shown in (d) of Figure 1 , which displays the platform customer service, where the user can ask questions. Questions can be entered manually via voice or text input in the dialog box, or by selecting a shortcut menu; for example, by clicking "Order Questions," "Foodie Card," "Red Envelope Questions," "Cooperation Questions," or "Account Questions." Questions can also be entered by directly clicking on a question template, such as "How do I urge an order?", "What if my order has timed out?", "What if I clicked delivery prematurely?", "What if the wrong or missed food is delivered?", "What if there's no rider to accept the order?", "What if there's a problem with the food quality?", or "Why can't I use my red envelope?"
[0109] Application A may have hundreds of shopping guide portals like the one shown in Figure 1. Users spend over 40% of their time browsing search and recommendation lists. These linear, one-dimensional lists are inefficient in expressing content, resulting in lengthy and costly decision-making processes. Furthermore, in most shopping guide scenarios, the platform provides user input in a one-way manner, directly presenting a list of items or displaying labels for users to select. Even in search, active user input typically consists of short words. This results in inaccurate and unreliable recommendations, while also limiting active user expression and obscuring the user's natural language.
[0110] Based on this, an embodiment of the present application provides a shopping guide method, an end-to-end one-stop, user-side shopping guide process in the local life takeaway scenario, and implements the process with the LLM big model as the intelligent center.
[0111] The following describes the technical solution provided by the embodiment of the present application. The embodiment of the present application provides a shopping guide method. Referring to FIG2 , FIG2 is a schematic flow chart of a shopping guide method provided by the embodiment of the present application. The method includes the following steps:
[0112] S201, obtaining a shopping guide requirement input by a user and a content enhancement configuration carried by the shopping guide requirement.
[0113] The user terminal may be a client of an application installed on an electronic device, such as application A installed on a mobile phone. The shopping guide requirement may be a natural language text or voice input by the user terminal, for example, the user terminal inputs the shopping guide requirement in the form of voice, or the user terminal inputs the shopping guide requirement in the form of text.
[0114] For example, the shopping guide demand can be a question input in the form of a whole sentence, such as, "Which store has milk tea that is three-tenths sweet without pearls"; the shopping guide demand can be a declarative sentence input in the form of a whole sentence, such as, "I want to eat lamb without spiciness and cumin."
[0115] The content enhancement configuration corresponding to the shopping guide request includes the time information, location information of the system where the shopping guide request is located, and the page type of the shopping guide request input. The time information of the system where the shopping guide request is located is the time when the shopping guide request is input, the location information is the current location of the user terminal, and the page type of the shopping guide request input is used to indicate the functions that can be completed on the page.
[0116] S202: Perform natural language understanding on the shopping guide demand to obtain a demand understanding result.
[0117] The natural language understanding (NLU) model is used to understand the shopping guide requirements in natural language, and obtains the requirements understanding results. This requirements understanding result includes the intent type and intent content of the shopping guide requirements. The NLU model is pre-placed in the preset large language model to perform intent recognition and intent understanding on the input shopping guide requirements, thereby obtaining the requirements understanding results. In this way, the NLU can accurately identify the intent type and intent content of the shopping guide requirements in natural language format input by the user, thereby facilitating the generation of accurate prompt words for input into the preset large language model.
[0118] In some possible implementations, the above step 202 may be implemented by the following steps S221 and S222 (not shown):
[0119] 221 , perform intention recognition on the shopping guide demand to obtain the intention type of the shopping guide demand.
[0120] Here, the input shopping guide demand is first converted into an embedding vector through NLU, and then the intent recognition is performed on the vector, that is, the intent type of the shopping guide demand is classified to determine the intent type of the shopping guide demand.
[0121] Exemplarily, the intent types include: personal interest recommendation, finding a specific store, finding category products, asking about life knowledge, historical order operations, and asking about platform functions, etc.
[0122] For example, if a shopping guide request is "What should I do if the rider doesn't deliver?" or "How can I check my benefits red envelope?", then the intent type of the shopping guide request is determined to be inquiring about platform functions. If the shopping guide request is "I want another cup of yesterday's milk tea," then the intent type of the shopping guide request is determined to be historical order operation. If the shopping guide request is "I don't know what to eat for lunch today?", then the intent type of the shopping guide request is determined to be personal interest recommendation, etc.
[0123] 222. Understand the intention of the shopping guide demand to obtain the intention content of the shopping guide demand.
[0124] The demand understanding result includes the intent type and intent content. The intent content of the shopping guide request is obtained by semantically understanding the natural language in the shopping guide request. The intent content is the specific intention of the shopping guide request. For example, if the shopping guide request is "I don't know what to eat for lunch today?", it means that the user needs a lunch recommendation. Therefore, the intent content of the shopping guide request is that the user does not know what to eat for lunch and needs a lunch recommendation.
[0125] In some possible implementations, entity recognition and relationship extraction are performed on the shopping guide demand to extract coarse-grained and fine-grained information, thereby obtaining the intent content. For example, if the shopping guide demand is "I want seven-point sweet milk tea", by performing entity recognition on the shopping guide demand, "milk tea" is obtained, and relationship extraction is performed to obtain the modifier "seven-point sweet" of "milk tea", that is, "seven-point sweet" is before "milk tea". "Milk tea" is obtained through coarse-grained extraction, and "seven-point sweet milk tea" is obtained through fine-grained extraction, thereby obtaining the intent content of "seven-point sweet milk tea". In this way, by performing natural language intent recognition on the shopping guide demand through NLU, the intent type of the shopping guide demand can be accurately analyzed to facilitate the subsequent matching of the prompt word template that meets the intent type; and by performing natural language intent understanding on the shopping guide demand, the specific intent content of the shopping guide demand input by the user end can be accurately obtained, so as to facilitate the combination of the intent type to jointly generate the prompt word for input into the large language model.
[0126] S203: Generate prompt words describing the shopping guide demand based on the demand understanding result and the content enhancement configuration.
[0127] Here, the demand understanding results and content enhancement configuration are input into the prompt center to generate prompt words that describe the shopping guide needs. Prompt word templates are first matched from a preset prompt word template library based on the intent type. Then, the prompt words are filled in with the content enhancement configuration and intent content to generate the prompt words. This way, the prompt words fully consider the specific shopping guide needs entered by the user and the content enhancement configuration of the system where the shopping guide needs are located, resulting in more accurate prompt words.
[0128] In some possible implementations, during prompt word generation, different prompt words can be generated using different content enhancement configurations by taking content enhancement configurations into consideration, thereby making the prompt words input into the preset large language model more accurate and richer. Obtaining the content enhancement configuration includes at least one of the following:
[0129] Get the page type for inputting the shopping guide requirements.
[0130] Here, page types include: order page, order completed page, search page, etc. Different page types for entering shopping guide requests reflect different scenarios for entering such requests. For example, if a user enters a shopping guide request on the order page, it means that the user has already placed an order but has not yet paid, and is therefore entering a shopping guide request. If a user enters a shopping guide request on the order completed page, it means that the user's previous order did not meet the user's request. Therefore, the page type of the shopping guide request reflects the different user needs, and therefore the generated prompt words will also be different for different page types.
[0131] Obtaining the input time of the shopping guide demand;
[0132] Here, the input time of the shopping guide demand is different, which means that the time when the user needs the shopping guide is different. Obviously, the shopping guide items needed will also be different, so the generated prompt words will also be different.
[0133] Obtaining a user ID corresponding to the shopping guide requirement;
[0134] Here, the user's historical interests can be acquired through the user identification, and the prompt words are generated in combination with the historical interests.
[0135] Obtaining location information corresponding to the shopping guide requirement;
[0136] Here, if the location information corresponding to the shopping guide demand is different, the stores that can be selected will also be different, and the specialty foods of the location will also be different, so a prompt word can be generated in combination with the location information so that the prompt word can represent the specialty foods of the location.
[0137] Obtain the time interval for inputting the same shopping guide demand.
[0138] Here, the time interval can be used to determine the frequency of users submitting the same shopping guide request, thereby generating targeted prompts. For example, for shopping guide requests that appear for the first time or have been submitted for a long time, prompts can be generated based on the specific content of the shopping guide request. If the time interval is shorter, this information can be reflected in the prompt, making the targeted shopping guide information output by the large language model more closely aligned with the user's intent.
[0139] In some possible implementations, in order to make the generated prompt words more in line with the shopping guide needs of the user, the above step S203 can be implemented by the following steps S231 to S233 (not shown):
[0140] S231: Searching for a prompt word template that matches the intention type in a preset prompt word template library.
[0141] Here, the preset prompt word template library is used to store prompt word templates that match multiple preset intent types. These prompt word templates can be understood as text frameworks. Since the preset prompt word template library stores prompt word templates bound to preset intent types, after the NLU outputs the intent type of the shopping guide request, the preset prompt word template library is first searched for the preset intent type that matches the intent type, and the prompt word template bound to the preset intent type is used as the prompt word template for the shopping guide request. Different prompt word frameworks are set for different intent types.
[0142] For example, if the intent type is personal interest recommendation, the prompt word template can be: The user's historical interest is ××. Please recommend ×× to the user based on the shopping guide need ××. In this way, appropriate prompt word templates can be provided for different intent types, making it easier to quickly generate accurate prompt words.
[0143] S232: Modify and enhance the intended content based on the content enhancement configuration to generate prompt content.
[0144] Here, after outputting the intent content of the shopping guide demand through NLU, in order to generate prompt content more accurately, the content enhancement configuration is also taken into consideration.
[0145] In some possible implementations, the intended content is modified and enhanced through content enhancement configuration to generate prompt content.
[0146] For example, if the shopping guide demand is "I want a bowl of delicious chicken soup rice noodles", the intent type is to find a category of goods, and the intent content is that the user needs a bowl of delicious chicken soup rice noodles.
[0147] In the case where the content enhancement configuration is a user identifier, the historical interests of the user terminal can be obtained according to the user identifier, and the historical interests are combined with the intended content as the prompt content.
[0148] For the case where the content enhancement is configured as the input time for shopping guide needs, the input time can be used to determine whether it is breakfast, lunch or dinner, so that the meal corresponding to the input time is combined with the intended content as the prompt content.
[0149] In the case where the content enhancement is configured as location information corresponding to the shopping guide demand, the location information can be used to determine the specialty food in the area where the location is located. Then, the specialty food is combined with the intended content as the prompt content.
[0150] In the case where the content enhancement configuration is to input a time interval for the same shopping guide requirement, the time interval is combined with the intention content as the prompt content.
[0151] For pages configured for content enhancement to input shopping guide requests, if the page type for shopping guide requests in the content enhancement configuration is an order completion page, indicating that the user has already ordered a meal, to provide a better user experience, the prompt content is: "The user has just placed an order and is now adding to their order. Please continue to recommend more items related to rice noodles." Therefore, the large language model may not only recommend rice noodles to the user, but also recommend complementary foods, such as a fruit platter. Since the user is adding to their order, the large language model can ask questions such as "Is the rice noodles you just ordered not enough? Can I recommend a rice noodle set for two or three people?" This prompt wording constructs questions related to different types of shopping guide requests.
[0152] If the page type of the shopping guide requirement in the content enhancement configuration is a search page, it means that the user may be ordering rice noodles for the first time. In this case, prompt content can be generated according to the intent content, such as "Please recommend the user delicious chicken soup rice noodles".
[0153] S233: Embed the prompt content into the prompt word template to obtain the prompt word.
[0154] Here, the prompt content is used as filling content and filled into the prompt word template, thereby obtaining a prompt word that can be input into the preset large language model.
[0155] For example, if the shopping guide request input is "I want a bowl of fresh, fragrant, and low-salt chicken soup rice noodles," then the intent type is determined to be a search for a category of products. The prompt word template that matches this search for a category of products is: Please recommend ×× to the user based on the shopping guide request ××. The intent content is that the user wants a bowl of fresh, fragrant, and low-salt chicken soup rice noodles. If the content enhancement is configured with the input time of the shopping guide request and the location information corresponding to the shopping guide request, and the input time is breakfast time, then the breakfast specialty food in the area can be analyzed based on the location information (for example, the specialty food is soup dumplings); then the intent content can be enhanced based on this specialty food to obtain the prompt content. The intent content is then: Please recommend a bowl of fresh, fragrant, and low-salt chicken soup rice noodles to the user with soup dumplings. In this way, by embedding the intent content into the prompt word template, the prompt word can be obtained as: Please recommend a bowl of fresh, fragrant, and low-salt chicken soup rice noodles to the user with soup dumplings based on the user's shopping guide request: I want a bowl of fresh, fragrant, and low-salt chicken soup rice noodles.
[0156] Alternatively, if the shopping guide request is "I don't know what to eat?", the intent type for this shopping guide request is determined to be a personal interest recommendation type, and the intent content is: "The user needs food recommendations." A prompt word template matching the personal interest recommendation type might be: "The user's historical interest is X. Please recommend X for the shopping guide request X." If the content enhancement is configured based on the time and user ID of the shopping guide request, and the time is dinner time, the user's eating habits during dinner time are analyzed based on the user ID. The intent content is then enhanced based on these eating habits to produce prompt content. For example, if the user prefers light meals for dinner, the prompt content might be: "For dinner time, please recommend light meals." By populating the prompt word template with the prompt content, the resulting prompt becomes: "Please recommend light meals for the user's shopping guide request: I don't know what to eat. Since the user's historical interest is light meals for dinner, please recommend light meals for the user." In this way, by first determining the prompt word template according to the intent type, and then generating the prompt content according to the content enhancement configuration and the intent content, the prompt content can be made more accurate, so that the obtained prompt words are more in line with the intention of shopping needs.
[0157] S204: Perform language processing on the prompt word using a preset large language model to generate and output target shopping guide information corresponding to the shopping guide demand to the user terminal.
[0158] Among them, the target shopping guide information can be the output store or product that meets the shopping guide's needs, it can also be the payment interface of the product that meets the shopping guide's needs, or it can be inquiry information for the shopping guide's needs; for example, if the shopping guide demand is "I want a delicious chicken soup rice noodle", the page type for inputting the shopping guide demand is a retail page, and the supermarket convenience store of application A, then the preset large language model can obtain the products that the user is browsing in the supermarket through the retail page. In this scenario, the preset large language model can wake up the AI shopping guide. At this time, the large language model will not call the API for catering takeaway, but call the retail API, that is, the supermarket API. The target shopping guide information fed back to the user is the self-service hot pot-style rice noodles sold in the supermarket, rather than the takeaway rice noodles.
[0159] In some possible implementations, the prompt words and historical association information related to the shopping guide needs are input into a preset large language model. After the preset large language model performs semantic understanding on the input prompt words and historical association information, it can obtain the implementation steps for responding to the shopping guide needs, and then call the corresponding application programming interface for each implementation step. By optimizing the return results of the application programming interface (API), the target shopping guide information can be output to the user end.
[0160] In an embodiment of the present application, for a shopping guide request input by a user, the content enhancement configuration of the system where the shopping guide request resides is obtained, thereby obtaining the content enhancement configuration such as the time the shopping guide request was input into the system, the user identifier, and the address of the shopping guide request. Subsequently, natural language understanding is performed on the shopping guide request, enabling understanding of the shopping guide request in natural language form, thereby more accurately obtaining the demand understanding result of the shopping guide request. Combining the demand understanding result with the content enhancement configuration enables more reasonable and accurate generation of prompt words describing the shopping guide request. Thus, the prompt words and the shopping guide request are jointly input into a preset large language model, enabling the preset large language model to accurately predict target shopping guide information that meets the shopping guide request and output it to the user. Thus, throughout the entire shopping guide process, after the user inputs the shopping guide request, the backend outputs the target shopping guide information to the user through the large language model. This response to the shopping guide request in natural language form entered by the user can be achieved without requiring multiple interactions from the user, saving the user's decision-making time and providing the user with a target shopping guide request that is more closely aligned with the user's natural language.
[0161] In some embodiments, in order to enable the preset large language model to predict more accurate target shopping guide information that meets the user's intention, the above step S204 can be implemented by the steps shown in FIG3 :
[0162] S301 : Using the preset large language model to perform semantic analysis on the prompt word to determine a plurality of application programming interfaces required to respond to the shopping guide demand.
[0163] Here, a large language model is preset to understand the prompt words and, according to the results of the understanding, arrange the steps to implement the shopping guide requirements and the functions corresponding to each step; in this way, the application program interface that implements the function can be determined according to the function corresponding to each step, thereby obtaining multiple application program interfaces.
[0164] For example, the user's original question is: "I want to buy a ×× rice noodle set for two." The steps arranged by LLM to meet this shopping guide requirement are:
[0165] The first step is to call the [Store Search] API with the parameter "×× Rice Noodles" and select the one closest to you.
[0166] The second step is to call the [Store Search] API with the parameter [Step 1.Store ID], select the product "Rice Noodle Combo for Two", and keep the one with the highest order quantity.
[0167] Step 3: Call the [Red Envelope Benefits] API with the [Step 2. Product ID] as the parameter to calculate the final price (Price);
[0168] Step 4: Call the [Pay Order] API with the parameter [Step 3.Price].
[0169] S302: Filter and summarize the return results of the multiple application program interfaces based on a preset database to obtain and output the target shopping guide information to the user terminal.
[0170] Here, historical association information matching the shopping guide requirement is determined in a preset database. The preset database can be a vector database or a SQL (Structured Query Language) database. The preset database is used to store historical association information of historical shopping guide requirements, including historical target shopping guide information for the historical shopping guide requirements and interaction information corresponding to the historical target shopping guide information. During each round of interaction, the target shopping guide information output by the preset large language model is bound to the shopping guide requirement and stored in the preset database. For the target shopping guide information, interaction information is obtained by obtaining the interaction performed by the user. For example, if the target shopping guide information includes two stores, which of the two stores the user clicked on; or if the target shopping guide information includes an order confirmation page, whether the user confirmed the order. Storing the historical target shopping guide information of the historical shopping guide requirement and the interaction information corresponding to the historical target shopping guide information in the preset database facilitates the preset large language model to reference the historical association information provided by the user to provide target shopping guide information that better matches the user's intended shopping guide requirement for the current input.
[0171] In an embodiment of the present application, by searching for historical correlation information matching the shopping guide needs in a preset database, the prompt words and the historical correlation information are used together as the input of the preset large language model, so that the target shopping guide information output by the preset large language model can be more in line with the user's intention.
[0172] In some embodiments, the preset large language model analyzes multiple application programming interfaces (APIs) required to respond to shopping guide requirements and processes the return results of the APIs to generate and output target shopping guide information. That is, the above-mentioned step S302 can be implemented by the steps shown in FIG4 :
[0173] S401: Determine the calling order among the multiple application programming interfaces.
[0174] Here, the order in which multiple APIs are called is determined based on the implementation process of the shopping guide requirement. The implementation process of the shopping guide requirement is the steps arranged by the preset large language model to achieve the shopping guide requirement. The order in which the steps are executed is the order in which the multiple APIs are called.
[0175] S402: Send the calling instruction to the multiple application programming interfaces according to the calling order.
[0176] Here, the preset large language model calls the application program interface layer by layer in the order of calling multiple application program interfaces; that is, the preset large language model first calls the first application program interface in the calling order, and continues to call the second application program interface according to the return result of the first application program interface, and repeats this cycle until all the multiple application program interfaces are called to respond to the shopping guide needs.
[0177] S403, based on the historical association information matching the shopping guide demand in the preset database, filter and summarize the return results of the application program interface, generate and output the target shopping guide information to the user terminal.
[0178] In some possible implementations, candidate historical shopping guide demands with high similarity to the shopping guide demands are searched in a preset database; and the historical target shopping guide information and corresponding interaction information of the candidate historical shopping guide demands are determined as historical related information matching the shopping guide demands.
[0179] Here, the prompt word and historical association information are jointly input into a preset large language model. After the preset large language model calls different interfaces based on the prompt word, it then uses this historical association information to filter the returned results, thereby making the target shopping guide information more accurate. After receiving the return results from multiple application program interfaces, the preset large language model uses this historical association information to optimize the returned results to make the target shopping guide information more consistent with the user's intent. For example, it filters out return results that have a high degree of overlap with historical target shopping guide information in the historical association information, or selects return results that are highly similar to the shopping guide objects in the interactive information.
[0180] In some possible implementations, for any application program interface, the function of the application program interface is combined with the return result of the previous application program interface to accurately generate the calling parameters of the application program interface, thereby facilitating the large language model to accurately call the corresponding application program interface. That is, the above step S402 can be implemented by the following steps S421 to S423 (not shown):
[0181] S421, obtaining the function of any application program interface among the multiple application program interfaces and the return result of the previous application program interface.
[0182] The previous API is the API that precedes and is adjacent to any of the APIs in the order described. The function of any API is the function implemented by that API, such as store search, in-store search, red envelope benefits, or payment ordering. The return result of the previous API is the output result after the previous API executes its own function. For example, if the function of the previous API is store search, the return result is the nearest store.
[0183] S422: Generate calling parameters of any application program interface according to the function of any application program interface and the return result of the previous application program interface.
[0184] The calling parameters of any application program interface are parameters for calling the application program interface, and can uniquely indicate the application program interface that needs to be called.
[0185] For example, if the function of any application interface is in-store search, the return result of the previous application interface is the nearest store. Since any application interface needs to search within the nearest store, the calling parameter of any application interface is [the identity document (ID) of the nearest store].
[0186] S423: Send the calling instruction carrying the calling parameters to any one of the application programming interfaces.
[0187] Here, the pre-set large language model sends a call instruction carrying the call parameters to the corresponding application program interface (API), which can then call the API to execute the corresponding function and obtain a return result. Similarly, the pre-set large language model can call multiple APIs and obtain the return results of these multiple APIs, thereby responding to shopping guide needs.
[0188] In an embodiment of the present application, multiple application programming interfaces are called separately in the order of calling the multiple application programming interfaces to receive the return results of these application programming interfaces. Afterwards, the return results are optimized through historical association information so that the target shopping guide information will not have too high an overlap rate with the historical shopping guide information and can also meet the user's historical interests.
[0189] In some possible implementations, for different types of returned results, the preset large language model processes the returned results differently. That is, step 403 above can be implemented in the following two ways:
[0190] Method 1: If the type of the returned result is business type, the multiple initial shopping guide objects are screened according to preset screening rules and the historical association information, and the target shopping guide information is generated and output to the user terminal.
[0191] Here, the business category can be food delivery or product business; for example, store search, product search, in-store search, personalized recommendation, payment ordering, red envelope inquiry, etc. In this way, the returned results of the target business category are filtered using preset screening rules and historical association information, which can not only reduce the redundancy of the target shopping guide information presented to the user, but also make the target shopping guide information more targeted.
[0192] In some possible implementations, for the returned results of the business class, a plurality of initial shopping guide objects are first preliminarily screened using preset screening rules to select a smaller set of candidate shopping guide objects; then, shopping guide objects with a high degree of overlap are filtered out using historical association information, and the filtered shopping guide objects are sorted to output sorted shopping guide objects. This makes the target shopping guide objects provided to the client more concise and accurate, saving the user time in browsing the target shopping guide information, thereby improving the user's decision-making efficiency. That is, the above-mentioned method 1 can be implemented through the following process:
[0193] First, if the type of the returned result is the business class, a set of candidate shopping guide objects is screened out from the multiple initial shopping guide objects according to the preset screening rule.
[0194] Here, the preset screening rules include at least one of the following: ranking the initial shopping guide objects in the initial set of shopping guide objects by positive reviews in the top n positive reviews; ranking the initial shopping guide objects in the top n sales volumes; ranking the initial shopping guide objects in the last n distances between their locations and the location corresponding to the shopping guide requirement; and ranking the initial shopping guide objects in the last n prices. Where n is a positive integer less than the number of candidate shopping guide objects; illustratively, n can be less than or equal to 2.
[0195] These screening rules can be independent of each other or progressive; for example, the preset screening rule is that the praise degree is ranked in the top n of the praise degrees of each initial shopping guide object, and the distance between the location and the location corresponding to the shopping guide demand is ranked in the top n among multiple initial shopping guide objects, etc.
[0196] For example, taking n as 1, the initial shopping guide objects are screened to select the shopping guide object with the highest positive reviews, the shopping guide object with the highest sales volume, the shopping guide object closest to the location corresponding to the shopping guide requirement, and the shopping guide object with the lowest price. If the shopping guide requirement is "I want to buy a XX rice noodle combo for two," then the initial shopping guide objects are multiple stores. From these multiple stores, the store closest to the user, the store with the cheaper rice noodle combo, the store with the higher sales volume of the rice noodle combo despite the higher price, or the store with the rice noodle combo that contains ingredients that are beneficial to health, etc. are screened.
[0197] In other embodiments, for shopping guides targeting takeout or food, the preset screening rules may further include the healthiness of the food. This means that initial shopping guide objects with higher healthiness are selected from the initial shopping guide objects. By setting the preset screening rules, multiple initial shopping guide objects can be quickly screened, thereby reducing the redundancy of the initial shopping guide objects in the returned results.
[0198] Secondly, the candidate shopping guide object set is filtered and sorted based on the historical association information and a preset number to obtain sorted shopping guide objects less than the preset number.
[0199] Here, the preset number can be user-defined, for example, the preset number is set to a value less than or equal to 3. For example, the preset number is set to 3. In this way, if the initial shopping guide object is a store, the candidate shopping guide object set is filtered by the historical association information to obtain 3 stores, and these 3 stores are sorted according to the historical association information to obtain sorted shopping guide objects.
[0200] Since the historical association information includes the historical target shopping guide information and interaction information of the historical shopping guide needs, the historical target shopping guide information and interaction information can be used to determine the target stores that were once provided to the user, as well as the stores that the user ultimately selected and the stores that were ignored. Therefore, by referring to the stores that the user ignored, the similar stores in the candidate shopping guide object set that are more similar to the store can be filtered; or, according to the stores selected by the user, the stores that are more similar to these stores can be filtered from the candidate shopping guide object set. Afterwards, since the historical target shopping guide information and interaction information in the historical association information both carry timestamps, it can be seen that the user proposed a historical shopping guide request that is more similar to the shopping guide request. If the time is close to the current moment, the store that is the same as the store in the historical target shopping guide information can be arranged at the end, and the remaining two stores can be randomly sorted to obtain sorted shopping guide objects.
[0201] Finally, based on the sorted shopping guide objects, the target shopping guide information is determined and output to the user terminal.
[0202] Here, by giving a concise explanation to the sorted shopping guide objects, the explanation content and the sorted shopping guide objects are output together as target shopping guide objects.
[0203] In some possible implementations, the description information of the sorted shopping guide objects is first determined; the description information is then integrated with the sorted shopping guide objects to obtain and output target shopping guide information to the user terminal.
[0204] Among them, the descriptive information of the sorted shopping guide object is the concise content of the sorted shopping guide object. For example, if the sorted shopping guide object is a store, the descriptive information can be an introduction to the goods sold in the store, so as to output an explainable description of the store to the client, so that the user can quickly understand the store. By assigning the descriptive information to the sorted shopping guide object, for example, binding the descriptive information and the sorted shopping guide object, and outputting them as target shopping guide information in the same area of the display interface at the same time. In this way, by outputting the descriptive information and the sorted shopping guide object at the same time, the client can quickly understand the output target shopping guide information, thereby saving decision-making time.
[0205] Method 2: If the type of the returned result is content type, the content in the returned result is summarized and modified to generate the target shopping guide information.
[0206] Here, the content category is the question-answering category. If the shopping guide demand entered is a question-inquiry type demand, for example, asking about the platform function, or asking for the relevant introduction of a certain store, then the returned result is the answer to the question, and the type it belongs to is the content category.
[0207] In some possible implementations, if the content in the returned result is large and too detailed, the content in the returned result is summarized and modified, that is, the returned result is summarized.
[0208] For example, if the shopping guide's request is "What should I do if the rider delivers the wrong item?", the result returned by the customer service API is likely to be relatively detailed and lengthy, requiring the user to spend a longer time reading; therefore, the returned result should be summarized and the key points should be listed.
[0209] If the content in the returned results is poorly readable or difficult to understand, the content in the returned results can be polished and modified to make the target shopping guide information more readable and easier for users to understand. In this way, by summarizing and modifying the returned results of content-related categories, the output target shopping guide information can be made more understandable and concise, thus saving users time in understanding.
[0210] Because the original returned results may be relatively rough and unsuitable for display to users, they are polished and modified before output. For example, the text returned by the Graph Attention Network (GAT) model is encapsulated by adding images based on the text.
[0211] During the summary and modification process, the benefit information of the returned result is also encapsulated in the returned result to input the result with benefit information. For example, if the returned result is a food store with a discount of 3 yuan off for purchases over 15 yuan, the benefit information and the food store will be encapsulated and output.
[0212] Alternatively, information within the large language model may be encapsulated by online services, and some output from the large language model may not be directly displayed to the user. For example, if the prompt is "Please tell me which store is more suitable for this user," this text is not suitable for output to the user end. When output to the user end, the text representation needs to be modified, such as "The following two stores were found for you." This text conversion also encapsulates the information within the large language model.
[0213] In some embodiments, since the content generated by the preset large language model is uncontrollable, the target shopping guide information output by the preset large language model is quality-checked to improve the accuracy of the shopping guide information output to the client. That is, after the above step 204, the steps shown in FIG5 are also included:
[0214] S501: Perform quality inspection on the target shopping guide information to obtain a quality inspection result.
[0215] Here, a quality inspection model is used to perform a binary classification quality inspection on the target shopping guide information to determine the readability of the target shopping guide information, etc. Thus, the quality inspection result includes the confidence level of the target shopping guide information being readable and the confidence level of the target shopping guide information being unreadable, etc.
[0216] For example, a quality inspection model is used to detect whether the text in the target shopping guide information contains too many or too few words, resulting in incoherent sentences, and whether the image is unclear.
[0217] S502: If the quality inspection result satisfies a preset quality inspection condition, determine whether the target shopping guide information contains any shielded information in a preset shielded information database.
[0218] Here, the preset quality inspection condition is the confidence threshold of the test result. For example, the confidence threshold is set to 0.9. If the test result shows that the confidence of the readability of the target shopping guide information is greater than 0.9, then it is determined that the quality inspection result meets the preset quality inspection condition, indicating that the confidence of the target shopping guide is good in readability. For example, the target shopping guide information is "I found the following stores for you". The sentence is fluent and clear. In this way, the confidence of the readability of the target shopping guide information in the quality inspection result is high, indicating that the quality inspection result of the target shopping guide information meets the preset quality inspection condition. If the target shopping guide information is "I found the following stores for you", the text contains multiple words, resulting in an incoherent text. The confidence of the readability of the target shopping guide information in the quality inspection result is low, indicating that the quality inspection result of the target shopping guide information does not meet the preset quality inspection condition.
[0219] If the quality inspection results meet the preset quality inspection conditions, the target shopping guide information is further determined to determine whether it contains sensitive words or images that need to be masked. A preset masking information library is used to store words and images that need to be masked. The preset masking information library is searched for masking information that matches the text and images in the target shopping guide information.
[0220] S503: If the shielding information does not exist in the target shopping guide information, output the target shopping guide information on the page for inputting the shopping guide requirement.
[0221] Here, if the quality inspection result of the target shopping guide information satisfies the preset quality inspection conditions and there are no sensitive words and images in the target shopping guide information, then the target shopping guide information is directly output on the display page for inputting shopping guide requirements.
[0222] S504: If the quality inspection result does not meet the preset quality inspection condition or there is shielded information in the target shopping guide information, obtain preset shopping guide information.
[0223] Here, if the quality inspection result does not meet the preset quality inspection conditions or there is blocked information in the target shopping guide information, the target shopping guide information is blocked and the preset shopping guide information is obtained. The preset shopping guide information can be text or images with fixed content. For example, the preset shopping guide information is "Your needs cannot be met at this time."
[0224] S505: On the page for inputting the shopping guide requirement, output preset shopping guide information.
[0225] Here, the preset shopping guide information is output on the page for inputting shopping guide requirements, and the user can view the output preset shopping guide information without switching pages.
[0226] In the embodiment of the present application, after layer-by-layer control of the target shopping guide information, reasonable and accurate target shopping guide information is output on the input page of the shopping guide requirements. In this way, the page for outputting the target shopping guide information is the same page as the page for inputting the shopping guide requirements. The user does not need to switch pages back and forth, providing a sense of unity for the user, and does not need the user to operate page jumps. The user only needs to enter the shopping guide requirements on the input page to provide the user with target shopping guide information that fits the user's intention. The platform blocks hundreds of online API interfaces. These APIs are transparent to the user. The user only needs to communicate with the preset large language model, providing a one-stop shopping guide for the user.
[0227] In other embodiments, if there is shielded information in the target shopping guide information, the shielded information can be hidden in the target shopping guide information to obtain processed shopping guide information; if the readability of the processed shopping guide information is greater than or equal to the preset readability threshold, the processed shopping guide information is output on the page for inputting shopping guide requirements; if the readability of the processed shopping guide information is less than the preset readability threshold or the quality inspection result does not meet the preset quality inspection conditions, the preset shopping guide information that matches the shopping guide requirements is queried in the preset shopping guide information database.
[0228] In some embodiments, by binding the output target shopping guide information, target interaction information, and shopping guide requirements, and presetting the database, it can be achieved through the following process:
[0229] First, target interaction information of the user terminal for the target shopping guide information is obtained.
[0230] Here, the target interaction information is the selection operation of the user terminal for the target shopping guide information, for example, a selection operation performed by clicking on a shopping guide object of interest, or selecting a shopping guide object of interest through language.
[0231] For example, taking the target shopping guide information as three rice noodle restaurants as an example, the user's interactive operations on these two restaurants are obtained, such as which restaurant the user selected, which food the user browsed in the restaurant, and which food the user finally selected.
[0232] Secondly, the target interaction information and the target shopping guide information are respectively bound to the shopping guide requirements to obtain a binding result.
[0233] Here, the target interaction information and the target shopping guide information are respectively converted into vectors, and the converted vectors are bound to the vectors corresponding to the shopping guide requirements to obtain the binding result. In this way, the binding result is also in a vectorized form.
[0234] Finally, the preset database is updated based on the binding result to obtain an updated preset database.
[0235] Here, the binding result is stored in the preset database to obtain an updated preset database.
[0236] Exemplarily, the preset database can be a vector database. After the vectorized target interaction information and target shopping guide information are bound to the shopping guide requirements, they are stored in the vector database. The vector data in the vector database is then fed into a preset large language model, allowing the preset large language model to perform language understanding and language generation on the input vector data. In this way, binding the target interaction information, target shopping guide information, and shopping guide requirements and storing them in the preset database enriches the updated preset database, facilitating the provision of historical, relevant information for subsequent reference in response to the latest shopping guide requirements.
[0237] In some embodiments, for the shopping guide demand of knowledge question and answer type, the preset large language model can directly output the knowledge matching the shopping guide demand. In this way, the above step S204 can be implemented through the following process:
[0238] If the shopping guide demand is a knowledge question and answer demand, the preset large language model is used to determine and output target shopping guide information matching the knowledge question and answer demand to the user terminal in the knowledge base of the preset large language model.
[0239] Here, a knowledge question-and-answer request indicates that the shopping guide request does not require a recommendation, but rather requires an answer or general knowledge. For example, the shopping guide request might be "What are the special dishes in ×× city?" The preset large language model does not require calling an application programming interface (API) to implement this. Because the preset large language model has its own learning capabilities, it already contains some world knowledge stored in the knowledge base. Thus, after the preset large language model understands the prompt word of the shopping guide request, it searches the knowledge base based on the understanding to find the answer to the question posed by the prompt word, thereby obtaining the target shopping guide information.
[0240] For example, the shopping guide demand is "What special dishes are there in ×× city?", and the target shopping guide information is:
[0241] 1. Xiaolongbao: One of the traditional dim sum of ×× City, it is famous for its thin skin, fresh juice and fragrance. The xiaolongbao contains fresh meat filling and broth, which is very delicious.
[0242] 2. Crab Roe Wontons: Wontons are a traditional pastry of ×× City, and crab roe wontons are a specialty. These wontons are filled with fresh crab meat and seasoned with soy sauce and vinegar for a delicious taste.
[0243] 3. Shengjianbao: Shengjianbao is another traditional snack in XX City. It is crispy on the outside and juicy on the inside. It is usually filled with pork and mushrooms, with special seasonings and fried until golden brown.
[0244] 4. Braised Lion's Head: Lion's Head is a traditional ×× city dish, consisting of pork filling and large meat balls. Braised Lion's Head is made by stewing the lion's head in broth. The meat is tender and the soup is rich.
[0245] 5. Old Duck Vermicelli Soup: This is a traditional ×× city soup. It uses old mother duck to make a delicious soup base, and is paired with vermicelli, mushrooms and other ingredients. It tastes delicious and is rich in nutrition.
[0246] 6. ×× City Preserved Radish: This is a traditional snack made from fresh pork pickled in a pot. It has a tender and smooth texture and a delicious taste.
[0247] 7. Stir-fried rice cakes (rice cakes): A common breakfast or late-night snack, stir-fried rice cake slices are cooked with vegetables, meat, and other ingredients for a rich, flavorful dish. This is just a small sampling of the city's specialties; there are many other delights worth trying. Whether it's traditional dim sum or a full meal, the city offers a wealth of unique dishes to enjoy.
[0248] In an embodiment of the present application, in response to knowledge question-and-answer requirements, a preset large language model directly outputs content that can answer the shopping guide needs through its own knowledge reserves, which can not only save the computing power consumed by calling the application program interface, but also quickly provide accurate answers to the user end.
[0249] In the related art, searching for shopping guides includes: searching and recommending such links. In this way, the shopping guide for consumers on the user side is a recall relevance sort and finally displayed. It is a multi-link chain, and finally displayed in a list format, and then the user needs to slide and browse. The product display list is provided to the user in the form of a shelf-style shopping guide. It takes a lot of time for the user to slide and browse, and the decision-making time is relatively long. The embodiment of the present application is centered on a large language model, and shows you multiple stores that are not shelf-style. The user does not need to slide and browse, and directly outputs the target shopping guide information that meets the user's shopping guide needs to the user side.
[0250] In the shopping guide method provided in the embodiment of the present application, fine-grained decision-making can also be valuable. For example, the shopping guide demand is "I want a milk tea that is seven points sweet." In the search-based shopping guide in the related art, it is not possible to enter a fine-grained word such as "seven points sweet", and only a large-grained word such as coffee can be entered. Therefore, you can only search for coffee first, and then return a lot of milk teas that are not seven points sweet to the user end. The user end needs to select them one by one, open their details page, and then read the relevant introduction to know whether they are seven points sweet milk teas. In the embodiment of the present application, the user end can enter the fine-grained "I want a milk tea that is seven points sweet", and the large language model can quickly and accurately output to the user end the store of "seven points sweet milk tea" or the payment order of "seven points sweet milk tea". Moreover, in the embodiment of the present application, a large language model is used as the center, and then the large language model can determine the steps required to implement the prompt word by analyzing the input prompt word, and call the API to implement these steps, so that the page where the user inputs the shopping guide requirements outputs the target shopping guide information to the user end. The user is unaware of the entire process and does not need to switch pages back and forth, thereby providing the user with a one-stop shopping guide.
[0251] For example, a user orders food in App A, and asks, for example, "I want yesterday's order." The large language model can use the order query interface to display yesterday's order history to the user. The user can also enter, "Please re-order the same order I ordered previously." The large language model can then not only find the order but also re-place it. It then displays the payment page to the user, who can simply click to confirm payment.
[0252] In an embodiment of the present application, a shopping guide method is provided, as shown in FIG6 , which is a system implementation diagram of the shopping guide method provided in an embodiment of the present application. The following description is made in conjunction with FIG6 :
[0253] The user terminal 61 outputs the current question to the auxiliary natural language understanding (NLU) system 62. The prompt center 63 determines the prompt template that matches the intent type of the current question. The prompt template and the user-side intent understanding of the current question (e.g., the shopping guide requirement in the above embodiment) output by the auxiliary NLU 62 are input into the LLM 64. Simultaneously, the current question is stored in a vector database (DB), and a vector search 65 is performed on the vector DB to retrieve historical data related to the current question, which is then input into the LLM 64. The LLM 64 then calls the business application programming interface (API) 66 and the function API 67, receiving the return results from the business API 66 and the function API 67. The LLM 64 summarizes, modifies, and performs inference and selection on the returned results to obtain target shopping guide data. This target shopping guide data is then fed back to the user terminal and vectorized 69 and stored in the vector DB 68. If the current question input by the user is a general question, LLM can directly generate content without calling the API and feedback shopping guide data to the user.
[0254] In Figure 6, the returned results and the target information output by the LLM are stored in the vector DB. In addition, during multiple rounds of interaction, the longer context needs to be stored. The context here refers not only to the user's shopping guide needs, but also includes the return results of the API.
[0255] From the perspective of multiple user interactions, consider this scenario: if a user enters a shopping guide request for the first time, for example, "rice noodles with chicken soup and three fresh ingredients," they may also enter another shopping guide request for the second or third time. Since the user has just entered "rice noodles with chicken soup and three fresh ingredients" but has not yet placed an order, and is currently searching for hot pot, fresh food, or other similar items, the LLM needs to know the user's past context, namely, the user's relevant historical data, during this round of conversation. This relevant historical data is stored in the vector database.
[0256] The vector DB also stores user-side interaction information. For example, if the LLM outputs three stores to the user, and the user chooses a store that sells soup dumplings (xiaolongbao), the store's logo and the store selected by the user are stored in the vector DB to facilitate analysis of user preferences.
[0257] The vector DB also stores the target shopping guide information output by the LLM to the user end, so that in the subsequent shopping guide process, duplicates can be removed based on the stored target shopping guide information, and the same store will not be recommended to the user end repeatedly.
[0258] Interaction information and related historical data are converted into embedded vectors and stored in a vector database. The targeted shopping guide information output by the LLM can then be converted into embeddings and further compressed into the vector database. For example, if a user has previously ordered from a shop selling xiaolongbao (xiaolongbao), and the LLM output lists three shops, one of which is ranked third, this shop can be ranked higher based on the user's preference.
[0259] The vector database also stores the current question entered by the user, which is returned to the LLM through vector search. This means that the LLM prompts for input during the thinking process, not before the user receives the result. It can also retrieve relevant data from the vector database and send it to the LLM. For example, if the current question is "Chicken Soup Three Fresh Rice Noodles," the vector database can be searched for rice noodle shops and their extensions, such as "Guoqiao Rice Noodles" and "Yunnan Rice Noodles." These inputs can be combined to enrich the LLM's prompts, resulting in more accurate targeted shopping guide information.
[0260] In Figure 6, the auxiliary NLU 62 performs intent recognition and understanding on the user's input.
[0261] Intent recognition is used to identify the user's intention type, including: personal interest recommendations (such as not knowing what to eat today?); finding specific stores (such as Brand A fast food restaurant, etc.); finding category products (such as what milk teas are available near Kintetsu); asking about life knowledge (such as what special dishes are there in City B); past orders, next order (such as another serving of yesterday's fried pancakes); platform functions (such as what to do if the rider doesn't deliver? How to check the rights and benefits red envelope?), etc.
[0262] Identifying the type of user intent is crucial for targeted follow-up of subsequent links. After determining the intent type, you can search the prompt center for the corresponding prompt template.
[0263] Intent understanding is used to understand user input in multiple dimensions and slots. This includes entity recognition and relationship extraction, extracting both coarse-grained and fine-grained signals. These understanding results are used to populate prompts, directly feed into larger models as supplementary input, or serve as input to business APIs.
[0264] The prompt center 63 is used to determine the prompt template that matches the intent type.
[0265] The prompt template is the input to the large model (LLM). Different prompt templates are used for different intent types. The prompt template is combined with the user's intent understanding and fed into LLM 64.
[0266] The prompt is stored in a key-value pair format, where the key is the intent type and the value is the prompt content.
[0267] LLM 64 is capable of intelligent thinking (AI Thinking). First, LLM 64 performs calculation arrangement.
[0268] Here, the food delivery platform is a complex business system. A single user-side shopping guide transaction actually involves completing many stages. The one-stop shopping guide provided by this embodiment of the application uses the LLM as the "decision-making brain," compressing and merging many links together, making it seamless for the user. Therefore, the LLM needs to perform "planning," that is, it provides a multi-stage process for each input prompt.
[0269] In a specific example, the user's original question is: "I want to buy a Brand A hamburger meal for 2 people." The plan arrangement given by LLM is:
[0270] Step 1: Call the [Store Search] API with the parameter "Brand A" and select the nearest store;
[0271] Step 2: Call the [Store Search] API with the [Step 1.Store ID] as the parameter, select the "Hamburger Meal for 2" item, and keep the one with the highest order quantity;
[0272] Step 3: Call the [Red Envelope Benefit] API with the parameter [Step 2. Product ID] to calculate the final price (Price);
[0273] Step 4: Call the [Pay Order] API with the parameter [Step3.Price].
[0274] The entire process is finally completed. During the process, the page prompts and interacts with the user, such as asking the user before placing an order and prompting the user to confirm.
[0275] The LLM 64 can generate call parameters to select an appropriate API.
[0276] Whether it is a business API or a functional tool, parameters need to be input, such as:
[0277] Search API, requires keywords;
[0278] Recommended API, requires user ID and other location-based service signals (LBS).
[0279] Payment order API requires the Price parameter.
[0280] The input parameters here come from several sources:
[0281] 1. System signals already exist and are directly given to the API, such as the current time, user ID, etc.
[0282] 2. After pre-processing NLU, the result of intent understanding.
[0283] 3. LLM is needed to understand long and difficult sentences, multi-round dialogues, complex and multi-dimensional parameters, etc.
[0284] In Figure 6, the LLM calls business API 66 and function API 67. Business APIs include interfaces for food delivery services, such as store search, product search, in-store search, personalized recommendations, payment and order placement, and red envelope inquiry. Function APIs include platform-independent interfaces for modifying delivery addresses, leaving user comments, and checking the weather. These APIs are online interfaces within the food delivery system and do not require modification or new development.
[0285] Different APIs return different results, so LLM processes the output results of different APIs differently, including:
[0286] For the content-oriented results returned by the API, LLM needs to summarize and modify them before returning them to the user.
[0287] For business-oriented results returned by the API, such as storefronts, products, and other platform materials, the LLM performs inference and selection. As shown in Figure 7, the user enters the shopping guide requirement "hamburger" on page 71. The preset large language model describes the text and images of two hamburger restaurants and each hamburger restaurant to the user on page 71.
[0288] Among them, LLM summarizes and modifies the API return results in the following two categories:
[0289] 1) Summarize. For example, when a user asks, "What should I do if the driver delivers the wrong item?", the customer service API will likely return a lengthy and detailed response, which will be difficult for the user to read. Therefore, LLM needs to summarize and outline the key points for the user. For example, if a driver delivers the wrong item, consider the following steps:
[0290] First, contact the rider in time: If the rider delivers the wrong takeaway, contact the rider immediately, state the order number and takeaway content, and ask if he is willing to refund or re-deliver.
[0291] Second, request a refund: If the rider is willing to refund, you can request a refund and cancel the order. If the rider is unwilling to refund or re-deliver, you can request a refund and place a new order.
[0292] Third, keep evidence: Before contacting the driver, you can keep the evidence of the takeaway order, including the driver's contact information, takeaway content, order time, etc. This evidence will help you protect your rights and interests when similar problems occur.
[0293] Fourth, negotiate with the driver: If the driver delivers the wrong food, you can negotiate with the driver to resolve the issue. You can ask the driver to apologize and re-deliver the food, or you can choose to accept the order and ask the driver to refund the food.
[0294] If a driver delivers the wrong food, contacting them promptly and preserving evidence is key to protecting your rights. Negotiating with the driver is also one way to resolve the issue.
[0295] 2) Polishing and modification. For example, when the user asks "How is Brand A?", the store brand API returns an introduction to the store as follows: "Brand A is a world-renowned fast food chain, famous for its delicious burgers, fried chicken, and French fries. How good this store is depends on personal taste and preference. KFC has strict standards in hygiene, food quality, and service, and is committed to improving employee welfare and environmental protection. If you are interested in food hygiene and safety, then KFC may be a good choice."
[0296] The process of LLM reasoning and selecting the results returned by the API is as follows:
[0297] The platform materials output to the user end are usually stores and products, and there are multiple of them. If it is directly thrown to the user end, what the user end sees is another list of multiple results, which is no different from the search and recommendation list decision in the related technology, requiring users to waste decision costs. However, in the embodiment of the present application, LLM directly outputs less than three stores or products, and continues to provide some explainable understanding, such as a concise introduction to ×× store; in this way, users can quickly obtain the required products or stores, saving decision costs.
[0298] In some possible implementations, providing users with a one-stop shopping guide through LLM can be achieved through the steps shown in Figure 8:
[0299] S801, read the configuration information of the system where the shopping guide requirements are located.
[0300] S802: Acquire a constructed prompt word based on the configuration information.
[0301] S803: Initialize the cache of the vector database.
[0302] S804, start the loop process of calling API.
[0303] S805: Plan arrangement is performed based on the input prompt words and historical association information through LLM.
[0304] Here, LLM determines the steps to achieve the input shopping guide needs based on the input prompt words and historical association information.
[0305] S806: Generate a call command and call parameters through LLM.
[0306] S807: Call the corresponding API using the call command and call parameters.
[0307] S808: Cache the API return result.
[0308] Here, after executing step S808, the process returns to step S805 and repeats in sequence until all the steps planned in step S805 are completed, that is, the target shopping guide information is obtained and output.
[0309] Since LLM-generated content is uncontrollable, a separate risk control and filtering module is required to ensure compliance and user experience. This is broken down into the following steps:
[0310] First, it is based on the quality inspection model: a separate model is trained to check the quality of the returned results. This requires pre-labeling of samples and supervised training. The model can be a binary classification model. When used online, the quality of the results is judged based on the output score.
[0311] Secondly, sensitive word blocking: usually a blacklist, sensitive words, maintain a word list; if any sensitive words appear in the returned results, the results will be blocked.
[0312] Finally, call the risk control filtering service: this service is provided by the risk control department and is relatively professional, comprehensive, authoritative, and real-time; it judges the legitimacy of the LLM results.
[0313] If the return result is aborted, the preset shopping guide information will be returned to the user to avoid empty results.
[0314] Here, the preset shopping guide information can be a preset copy, or it can be generated by semantically understanding the shopping guide requirement and searching for multiple objects matching the requirement from the backend database and outputting them. For example, if the shopping guide requirement is "I need high-end black tea," then after semantically understanding the requirement, stores selling black tea can be output to the user.
[0315] In this application embodiment, the advantages of a large language model, including rich knowledge, decision-making reasoning, and task planning, are fully utilized. With the pre-set large language model at the core of the architecture, a one-stop shopping guide is provided to the user, resolving the pain points of food delivery shopping. Furthermore, this solution addresses the shopping pain points of food delivery platforms, providing users with a one-stop shopping guide. This not only improves the user experience, but also reduces the multi-stage decision-making costs of users, creating a closed-loop shopping process.
[0316] In the embodiment of the present application, not all shopping guide needs require calling the business API; the large model has acquired some world knowledge through pre-training and can directly return this content to the user, as shown in Figure 2 "Direct Content Generation".
[0317] The embodiment of the present application provides a shopping guide device. FIG9 is a structural diagram of a shopping guide system based on a large language model provided by the embodiment of the present application. For example, as shown in FIG9 , the shopping guide system based on a large language model includes:
[0318] The user terminal 901 is used to obtain the input shopping guide requirements and input them into the natural language understanding module 902;
[0319] The natural language understanding module 902 is used to perform natural language understanding on the shopping guide requirements, obtain the requirements understanding results and output them to the prompt word generation module 903;
[0320] The prompt word generation module 903 is used to obtain the content enhancement configuration carried by the shopping guide demand; and based on the demand understanding result and the content enhancement configuration, generate prompt words describing the shopping guide demand, and input the prompt words into the model processing module 904;
[0321] The model processing module 904 is used to perform language processing on the prompt words, generate and output target shopping guide information corresponding to the shopping guide demand to the user terminal 901.
[0322] In Figure 9, the user terminal 901 in the system can be an input interface corresponding to the user (buyer). For any user terminal 901, the user terminal 901 can be installed with a buyer version application corresponding to the online delivery platform, and the user's shopping guide needs can be entered on the display page of the application.
[0323] The user terminal 901 can be a mobile phone, tablet computer, desktop, laptop, notebook computer, ultra-mobile personal computer (UMPC), handheld computer, netbook, personal digital assistant (PDA), wearable electronic device, virtual reality device, etc.
[0324] In the shopping guide system based on the large language model, the user terminal 901, the natural language understanding module 902, the prompt word generation module 903 and the model processing module 904 can communicate with each other through the network. The network can include a medium that provides a communication link, or it can be the Internet including network equipment and transmission media, but is not limited to this.
[0325] Optionally, the transmission medium can be a wired link (such as but not limited to coaxial cable, optical fiber and digital subscriber line (DSL)) or a wireless link (such as but not limited to wireless Fidelity (WIFI), Bluetooth and mobile device network).
[0326] In some possible implementations, the model processing module 904 includes: a preset large language model, used to perform semantic analysis on the prompt word to determine multiple application programming interfaces required to respond to the shopping guide needs; the multiple application programming interfaces are used to send return results to the preset large language model; the preset large language model is used to filter and summarize the return results of the multiple application programming interfaces based on a preset database to obtain and output the target shopping guide information to the user end.
[0327] In some possible implementations, the system further includes: a preset database for storing historical correlation information of historical shopping guide needs, the historical correlation information including: historical target shopping guide information of the historical shopping guide needs and interaction information corresponding to the historical target shopping guide information; a retrieval module for determining the historical correlation information matching the shopping guide needs in the preset database and sending it to the preset large language model; the preset large language model is also used to determine the calling order between the multiple application interfaces; and send the calling instructions to the multiple application interfaces according to the calling order; the multiple application interfaces are also used to send the return results to the preset large language model in response to the calling instructions; the preset large language model is also used to screen and summarize the return results of the application interface based on the historical correlation information matching the shopping guide needs in the preset database, and generate and output the target shopping guide information to the user end.
[0328] In some possible implementations, the preset large language model is also used to obtain the function of any application program interface among the multiple application program interfaces and the return result of the previous application program interface; wherein the previous application program interface is an application program interface that is arranged before and adjacent to any application program interface in the calling order; according to the function of any application program interface and the return result of the previous application program interface, the calling parameters of any application program interface are generated; and the calling instruction carrying the calling parameters is sent to any application program interface.
[0329] In some possible implementations, the returned result includes: multiple initial shopping guide objects that respond to the shopping guide needs. The preset large language model is also used to filter the multiple initial shopping guide objects according to preset filtering rules and the historical association information if the type of the returned result is business type, and generate and output the target shopping guide information to the user end.
[0330] In some possible implementations, the preset large language model is also used to, if the type of the returned result is the business class, filter out a set of candidate shopping guide objects from the multiple initial shopping guide objects according to the preset screening rules; filter and sort the set of candidate shopping guide objects based on the historical association information and a preset number to obtain sorted shopping guide objects less than the preset number; and determine and output the target shopping guide information to the user terminal based on the sorted shopping guide objects.
[0331] In some possible implementations, the preset screening rules include at least one of the following: the praise degree is ranked in the top n among the multiple initial shopping guide objects; wherein n is a positive integer less than the number of the initial shopping guide objects; the sales volume is ranked in the top n among the sales volume of the initial shopping guide objects; the distance between the location and the location corresponding to the shopping guide demand is ranked in the last n among the initial shopping guide objects; and the selling price is ranked in the last n prices of the initial shopping guide objects.
[0332] In some possible implementations, the preset large language model is also used to determine the description information of the sorted shopping guide objects; and to fuse the description information with the sorted shopping guide objects to obtain and output the target shopping guide information to the user terminal.
[0333] In some possible implementations, the preset large language model is also used to summarize and modify the content in the returned result if the type of the returned result is content-based, and to generate and output the target shopping guide information to the user terminal.
[0334] In some possible implementations, the natural language understanding module 902 is also used to identify the intent of the shopping guide demand to obtain the intention type of the shopping guide demand; and to understand the intent of the shopping guide demand to obtain the intention content of the shopping guide demand; wherein the demand understanding result includes: the intention type and intention content.
[0335] In some possible implementations, the prompt word generation module 903 is further configured to search a preset prompt word template library for a prompt word template that matches the intent type; wherein the preset prompt word template library is configured to store multiple prompt word templates that match preset intent types; modify and enhance the intent content based on the content enhancement configuration to generate prompt content; and embed the prompt content into the prompt word template to obtain the prompt word, and input the prompt word into a preset large language model.
[0336] In some possible implementations, the content enhancement configuration includes at least one of the following: the input time of the shopping guide demand; the user identifier corresponding to the shopping guide demand; the location information corresponding to the shopping guide demand; the page type for inputting the shopping guide demand; and the time interval for inputting the same shopping guide demand.
[0337] In some possible implementations, the system further includes: a quality inspection module, configured to perform quality inspection on the target shopping guide information and obtain a quality inspection result; if the quality inspection result meets a preset quality inspection condition, determining whether the target shopping guide information contains shielded information in a preset shielded information library; if the shielded information does not exist in the target shopping guide information, outputting the target shopping guide information to the user-end input page.
[0338] In some possible implementations, the quality inspection module is further used to obtain preset shopping guide information if the quality inspection result does not meet the preset quality inspection conditions or the shielding information exists in the target shopping guide information; and output the preset shopping guide information to the user-end input page.
[0339] In some possible implementations, the preset large language model is also used to determine and output target shopping guide information matching the knowledge question and answer requirement to the user-end input page in the knowledge base of the preset large language model if the shopping guide requirement is a knowledge question and answer requirement.
[0340] In some possible implementations, the system also includes: a database optimization module, used to obtain target interaction information of the user end for the target shopping guide information; bind the target interaction information and the target shopping guide information with the shopping guide requirements respectively to obtain a binding result; and update the preset database based on the binding result to obtain an updated preset database.
[0341] It should be noted that the aforementioned embodiments of the shopping guide device are merely illustrative of the division of the aforementioned functional modules. In actual applications, the aforementioned functions can be assigned to different functional modules as needed, i.e., the internal structure of a computer device can be divided into different functional modules to perform all or part of the aforementioned functions. Furthermore, the aforementioned embodiments of the shopping guide device and the shopping guide method embodiments share the same concept. The detailed implementation process is described in the method embodiments and will not be further elaborated here.
[0342] An embodiment of the present application further provides an electronic device. FIG10 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
[0343] Exemplarily, as shown in FIG10 , the electronic device 1000 includes: a memory 1001 and a processor 1002 , wherein the memory 1001 stores an executable program code 10011 , and the processor 1002 is used to call and execute the executable program code 10011 to perform a shopping guide method.
[0344] In addition, an embodiment of the present application also protects a device, which may include a memory and a processor, wherein the memory stores executable program code, and the processor is used to call and execute the executable program code to execute a shopping guide method provided by an embodiment of the present application.
[0345] In this embodiment, the device can be divided into functional modules based on the above-described method examples. For example, each functional module can be mapped to a specific functional module, or two or more functions can be integrated into a single processing module. The integrated module can be implemented in hardware. It should be noted that the module division in this embodiment is illustrative and represents only a logical functional division. In actual implementation, other division methods may be used.
[0346] In the case of dividing each module into modules corresponding to each function, the device may further include a signal uploading module, a determination module, an adjustment module, etc. It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.
[0347] It should be understood that the device provided in this embodiment is used to execute the above-mentioned shopping guide method, and thus can achieve the same effect as the above-mentioned implementation method.
[0348] In the case of an integrated unit, the device may include a processing module and a storage module. When the device is applied to a device, the processing module may be used to control and manage the operation of the device. The storage module may be used to support the device in executing mutual program codes, etc.
[0349] The processing module may be a processor or controller that implements or executes various exemplary logic blocks, modules, and circuits disclosed herein. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a digital signal processor (DSP) and a microprocessor, and the storage module may be a memory.
[0350] In addition, the device provided in the embodiments of the present application can specifically be a chip, component or module, and the chip may include a connected processor and memory; wherein the memory is used to store instructions, and when the processor calls and executes the instructions, the chip can execute a shopping guide method provided in the above embodiment.
[0351] This embodiment also provides a computer-readable storage medium, which stores computer program code. When the computer program code runs on a computer, the computer executes the above-mentioned related method steps to implement a shopping guide method provided by the above embodiment.
[0352] This embodiment also provides a computer program product. When the computer program product is run on a computer, it enables the computer to execute the above-mentioned related steps to implement a shopping guide method provided by the above embodiment.
[0353] Among them, the device, computer-readable storage medium, computer program product or chip provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0354] Through the description of the above implementation methods, technical personnel in the relevant field can understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by 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.
[0355] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0356] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A shopping guide method based on a large language model, characterized in that: The method comprises: Acquire the shopping guide requirements input by the user and the content enhancement configuration carried by the shopping guide requirements; Performing natural language understanding on the shopping guide demand to obtain a demand understanding result; Based on the demand understanding result and the content enhancement configuration, generating prompt words describing the shopping guide demand; A preset large language model is used to perform language processing on the prompt words, and target shopping guide information corresponding to the shopping guide demand is generated and output to the user terminal.
2. The method according to claim 1, characterized in that The using a preset large language model to perform language processing on the prompt word, generating and outputting target shopping guide information corresponding to the shopping guide demand to the user terminal, includes: Using the preset large language model to perform semantic analysis on the prompt word to determine a plurality of application program interfaces required to respond to the shopping guide demand; The returned results of the plurality of application program interfaces are screened and summarized based on a preset database to obtain and output the target shopping guide information to the user terminal.
3. The method according to claim 2, characterized in that The method of screening and summarizing the returned results of the plurality of application program interfaces based on a preset database to obtain and output the target shopping guide information to the user terminal includes: Determining a calling sequence among the plurality of application program interfaces; Sending the calling instructions to the plurality of application program interfaces according to the calling sequence; Based on the historical association information in the preset database that matches the shopping guide demand, the return results of the application interface are screened and summarized, and the target shopping guide information is generated and output to the user end; wherein, the preset database is used to store the historical association information of historical shopping guide demands, and the historical association information includes: historical target shopping guide information of the historical shopping guide demands and interactive information corresponding to the historical target shopping guide information.
4. The method according to claim 3, characterized in that The step of sending the calling instructions to the plurality of application program interfaces in accordance with the calling sequence includes: Acquire the function of any one of the multiple application program interfaces and the return result of the previous application program interface; wherein the previous application program interface is an application program interface arranged before and adjacent to any one of the application program interfaces in the calling sequence; Generate calling parameters of any one of the application program interfaces according to the function of any one of the application program interfaces and the return result of the previous application program interface; Sending a calling instruction carrying the calling parameters to any one of the application program interfaces.
5. The method according to claim 3, characterized in that: The returned result includes: a plurality of initial shopping guide objects that respond to the shopping guide demand; based on the historical association information matching the shopping guide demand in the preset database, the returned result of the application program interface is screened and summarized, and the target shopping guide information is generated and output to the user end, including: If the type of the returned result is business type, the multiple initial shopping guide objects are screened according to preset screening rules and the historical association information, and the target shopping guide information is generated and output to the user terminal.
6. The method according to claim 5, characterized in that If the type of the returned result is a business type, screening the multiple initial shopping guide objects according to a preset screening rule and the historical association information, generating and outputting the target shopping guide information to the user terminal, includes: If the type of the returned result is the business class, screening out a set of candidate shopping guide objects from the multiple initial shopping guide objects according to the preset screening rule; Filtering and sorting the candidate shopping guide object set based on the historical association information and a preset number to obtain sorted shopping guide objects less than the preset number; Based on the sorted shopping guide objects, the target shopping guide information is determined and output to the user terminal.
7. The method according to claim 5 or 6, characterized in that: The preset screening rules include at least one of the following: The favorable comments are ranked in the top n favorable comments of each of the multiple initial shopping guide objects; wherein n is a positive integer less than the number of the initial shopping guide objects; The sales volume is ranked in the top n of the sales volume of the initial shopping guide objects; The distance between the location and the location corresponding to the shopping guide demand is arranged in the last n of the initial shopping guide objects; The selling prices are arranged in the last n positions of the prices of the initial shopping guide objects.
8. The method according to claim 6, characterized in that The determining and outputting the target shopping guide information to the user terminal based on the sorted shopping guide objects includes: Determine description information of the sorted shopping guide objects; The description information is merged with the sorted shopping guide objects to obtain and output the target shopping guide information to the user terminal.
9. The method according to claim 3, characterized in that: The method further comprises: If the type of the returned result is content type, the content in the returned result is summarized and modified, and the target shopping guide information is generated and output to the user terminal.
10. The method according to claim 1, characterized in that The performing natural language understanding on the shopping guide demand to obtain the demand understanding result includes: Performing intent recognition on the shopping guide demand to obtain the intent type of the shopping guide demand; The intention of the shopping guide demand is understood to obtain the intention content of the shopping guide demand; wherein the demand understanding result includes: the intention type and the intention content.
11. The method according to claim 10, characterized in that The generating of prompt words describing the shopping guide demand based on the demand understanding result and the content enhancement configuration includes: Searching for a prompt word template matching the intention type in a preset prompt word template library; wherein the preset prompt word template library is used to store a plurality of prompt word templates matching the preset intention types; Modify and enhance the intended content based on the content enhancement configuration to generate prompt content; The prompt content is embedded in the prompt word template to obtain the prompt word.
12. The method according to claim 10 or 11, characterized in that: The content enhancement configuration includes at least one of the following: The time of inputting the shopping guide demand; The user identifier corresponding to the shopping guide requirement; The location information corresponding to the shopping guide demand; Enter the page type of the shopping guide requirement; Enter the same time interval for the shopping guide requirement.
13. The method according to claim 1, characterized in that After the preset large language model is used to perform language processing on the prompt word, and target shopping guide information corresponding to the shopping guide demand is generated and output to the user terminal, the method further includes: Performing quality inspection on the target shopping guide information to obtain a quality inspection result; If the quality inspection result meets the preset quality inspection condition, determining whether there is shielded information in a preset shielded information database in the target shopping guide information; If the shielding information does not exist in the target shopping guide information, the target shopping guide information is output on the page for inputting the shopping guide requirement.
14. The method according to claim 13, characterized in that The method further comprises: If the quality inspection result does not meet the preset quality inspection condition or the shielded information exists in the target shopping guide information, obtaining preset shopping guide information; On the page for inputting the shopping guide requirements, the preset shopping guide information is output.
15. The method according to claim 1, characterized in that The using a preset large language model to perform language processing on the prompt word, generating and outputting target shopping guide information corresponding to the shopping guide demand to the user terminal, includes: If the shopping guide demand is a knowledge question and answer demand, the preset large language model is used to determine and output target shopping guide information matching the knowledge question and answer demand to the user terminal in the knowledge base of the preset large language model.
16. The method according to claim 1, characterized in that After the preset large language model is used to perform language processing on the prompt word, and target shopping guide information corresponding to the shopping guide demand is generated and output to the user terminal, the method further includes: Acquire target interaction information of the user terminal for the target shopping guide information; Binding the target interaction information and the target shopping guide information to the shopping guide requirements respectively to obtain a binding result; The preset database is updated based on the binding result to obtain an updated preset database.
17. A shopping guide system based on a large language model, characterized in that: The system comprises: The user end is used to obtain the input shopping guide requirements and input them into the natural language understanding module; The natural language understanding module is used to perform natural language understanding on the shopping guide demand, obtain the demand understanding result and output it to the prompt word generation module; The prompt word generation module is used to obtain the content enhancement configuration carried by the shopping guide demand; and based on the demand understanding result and the content enhancement configuration, generate prompt words describing the shopping guide demand, and input the prompt words into the model processing module; The model processing module is used to perform language processing on the prompt words, generate and output target shopping guide information corresponding to the shopping guide demand to the user terminal.
18. The system according to claim 17, characterized in that The model processing module comprises: A large language model is preset to perform semantic analysis on the prompt words to determine a plurality of application program interfaces required to respond to the shopping guide requirements; The multiple application programming interfaces are used to send return results to the preset large language model; The preset large language model is used to filter, summarize and process the return results of the multiple application program interfaces based on a preset database, and obtain and output the target shopping guide information to the user terminal.
19. The system according to claim 18, characterized in that The system further comprises: A preset database is used to store historical association information of historical shopping guide needs, wherein the historical association information includes: historical target shopping guide information of the historical shopping guide needs and interaction information corresponding to the historical target shopping guide information; A retrieval module, used to determine historical related information matching the shopping guide requirement in the preset database, and send the historical related information to the preset large language model; The preset large language model is also used to determine the calling sequence between the multiple application program interfaces; and send the calling instructions to the multiple application program interfaces according to the calling sequence; The multiple application program interfaces are further used to send the return result to the preset large language model in response to the calling instruction; The preset large language model is also used to filter and summarize the return results of the application program interface based on the historical association information in the preset database that matches the shopping guide needs, and generate and output the target shopping guide information to the user end.
20. The system according to claim 19, characterized in that The preset large language model is also used to obtain the function of any one of the multiple application interfaces and the return result of the previous application interface; wherein the previous application interface is an application interface that is arranged before and adjacent to any one of the application interfaces in the calling order; generate calling parameters of any one of the application interfaces according to the function of any one of the application interfaces and the return result of the previous application interface; and send a calling instruction carrying the calling parameters to any one of the application interfaces.
21. The system according to claim 19, characterized in that The returned result includes: multiple initial shopping guide objects that respond to the shopping guide needs. The preset large language model is also used to filter the multiple initial shopping guide objects according to preset filtering rules and the historical association information if the type of the returned result is business type, and generate and output the target shopping guide information to the user terminal.
22. The system according to claim 21, characterized in that The preset large language model is further used to filter out a set of candidate shopping guide objects from the multiple initial shopping guide objects according to the preset screening rule if the type of the returned result is the business class; The candidate shopping guide object set is filtered and sorted based on the historical association information and a preset number to obtain sorted shopping guide objects less than the preset number; and based on the sorted shopping guide objects, the target shopping guide information is determined and output to the user terminal.
23. The system according to claim 21 or 22, characterized in that The preset screening rules include at least one of the following: The favorable comments are ranked in the top n favorable comments of each of the multiple initial shopping guide objects; wherein n is a positive integer less than the number of the initial shopping guide objects; The sales volume is ranked in the top n of the sales volume of the initial shopping guide objects; The distance between the location and the location corresponding to the shopping guide demand is arranged in the last n of the initial shopping guide objects; The selling prices are arranged in the last n positions of the prices of the initial shopping guide objects.
24. The system according to claim 22, characterized in that The preset large language model is also used to determine the description information of the sorted shopping guide objects; and to merge the description information with the sorted shopping guide objects to obtain and output the target shopping guide information to the user terminal.
25. The system according to claim 19, characterized in that The preset large language model is also used to summarize and modify the content in the returned result if the type of the returned result is content type, and to generate and output the target shopping guide information to the user terminal.
26. The system according to claim 17, characterized in that The natural language understanding module is also used to identify the intent of the shopping guide demand to obtain the intent type of the shopping guide demand; and to understand the intent of the shopping guide demand to obtain the intent content of the shopping guide demand; wherein the demand understanding result includes: the intent type and the intent content.
27. The system according to claim 26, characterized in that The prompt word generation module is further used to search for a prompt word template matching the intention type in a preset prompt word template library; the preset prompt word template library is used to store a plurality of prompt word templates matching the preset intention type; Modify and enhance the intended content based on the content enhancement configuration to generate prompt content; And embed the prompt content into the prompt word template to obtain the prompt word, and input the prompt word into a preset large language model.
28. The system according to claim 26 or 27, characterized in that The content enhancement configuration includes at least one of the following: The time of inputting the shopping guide demand; The user identifier corresponding to the shopping guide requirement; The location information corresponding to the shopping guide demand; Enter the page type of the shopping guide requirement; Enter the same time interval for the shopping guide requirement.
29. The system according to claim 17, characterized in that The system further comprises: The quality inspection module is used to perform quality inspection on the target shopping guide information and obtain a quality inspection result; if the quality inspection result meets the preset quality inspection conditions, determine whether there is shielded information in the preset shielded information library in the target shopping guide information; if the shielded information does not exist in the target shopping guide information, output the target shopping guide information to the user-end input page.
30. The system according to claim 29, characterized in that The quality inspection module is also used to obtain preset shopping guide information if the quality inspection result does not meet the preset quality inspection condition or the shielding information exists in the target shopping guide information; and output the preset shopping guide information to the user terminal input page.
31. The system according to claim 17, characterized in that The preset large language model is also used to determine and output target shopping guide information matching the knowledge question and answer requirement to the user-side input page in the knowledge base of the preset large language model if the shopping guide requirement is a knowledge question and answer requirement.
32. The system according to claim 17, characterized in that The system further comprises: The database optimization module is used to obtain target interaction information of the user end for the target shopping guide information; bind the target interaction information and the target shopping guide information to the shopping guide requirements respectively to obtain a binding result; and update the preset database based on the binding result to obtain an updated preset database.
Citation Information
Patent Citations
Human-computer interaction method, device and system
CN116483980A
Prompt word determination method and device applied to large language model, equipment and medium
CN116955557A
Intelligent response method, electronic equipment, storage medium and program product
CN117009484A
Dialogue generation method and device based on knowledge base, electronic equipment and storage medium
CN117093698A
Shopping guide method and system based on large language model
CN117350825A