A product recommendation method, device, electronic device and storage medium
By using the large model as the central controller of the recommendation process, it generates user analysis content and calls the tool interface to generate a set of candidate products. This solves the problem of illusion and insufficient recommendation performance of the large model in the recommendation system, and achieves a more efficient recommendation effect.
Patent Information
- Application Number
- CN202410458141.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-17
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2044-04-17
AI Technical Summary
Large models are susceptible to hallucinations in recommendation systems. Traditional recommendation models cannot effectively improve recommendation performance, and the user participation control process is complex and difficult to extend to a wide range of recommendation tasks.
A large model is used as the central controller of the recommendation process. By generating user analysis content, calling the corresponding tool interface to generate a set of candidate products, and conducting multiple rounds of exploration to match user interests, the sequence recommendation model and recall tools are used for pre-training and fine-tuning, reducing Illusion affects and improves recommendation accuracy.
It improves the recommendation effect, reduces the generation of large model illusions, improves the accuracy and stability of recommendations, and is suitable for a wide range of recommendation tasks.
Smart Images

Figure CN118071464B
Abstract
Description
Technical Field
[0001] The present application relates to the field of natural language processing technology, and in particular to a product recommendation method, device, electronic device and storage medium. Background Art
[0002] In recent years, large models (LLMs) have shown great advantages in many research and application fields, but they still face certain limitations in the field of recommendation systems. These limitations are mainly reflected in the fact that large models are easily disturbed by hallucinations when processing recommendation tasks; and the cost of fine-tuning specific recommendation scenarios is high. On the one hand, the large model tool learning method can use the intermediate results obtained by the tool to support the generation of large models; on the other hand, the reasoning ability of large models can regulate the use of tools, and has a wide range of applications in the field of natural language learning.
[0003] Generally, large model tool learning is divided into two steps: one is to build a corresponding tool set for a specific scenario; the other is to give tasks and goals to the large model, and guide the large model to call tools for specific scenarios and solve problems. In the recommendation scenario, complex user intentions make general tool sets unable to meet recommendation requirements. The construction of the tool set for recommendation tasks and the corresponding tool calling module play an important role in the final recommendation performance.
[0004] The current large-model recommendation technology can be roughly divided into three types: First, the traditional recommendation model is still used as the provider of recommended content, and the large model provides auxiliary information. This method is essentially still in the category of traditional recommendation, and is susceptible to the problem of alignment between two different modalities: recommendation and semantics; second, the large model is directly used for recommendation. This method usually uses zero samples or few samples, or uses small-scale recommendation field sample data for fine-tuning, which is easily affected by the illusion of large models; third, the large model is used to control the recommendation process. The existing control schemes are often too simple in strategy and cannot effectively improve the recommendation performance, or require users to participate in the control process and cannot be expanded to a wider range of recommendation tasks. Therefore, the application of large models in the recommendation field is still very limited.
[0005] There is currently no effective solution to the problem of poor recommendation effects in related technologies. Summary of the invention
[0006] In this embodiment, a product recommendation method, an electronic device, and a storage medium are provided to solve the problem of poor recommendation effect existing in the related art.
[0007] In a first aspect, the present invention provides a product recommendation method, comprising:
[0008] Step 1: The big model generates user analysis content based on the current context;
[0009] Step 2: Based on the analysis content, the large model calls the corresponding tool interface to generate a set of candidate products;
[0010] Step 3: The large model determines whether the candidate product set or the current context meets the preset goal. If so, the large model recommends a target product set to the user based on the candidate product set; if not, repeat steps 1 and 2.
[0011] In some embodiments, the current context includes: the historical interaction content of the user corresponding to the current moment and each moment before the current moment, the analysis content of the user, and the candidate product set.
[0012] In some embodiments, the analysis content of the user includes attribute direction information; according to the analysis content, the big model calls a corresponding tool interface to generate a candidate product set, including:
[0013] According to the attribute direction information, the large model calls a sorting tool to return a set of candidate products sorted according to the attributes.
[0014] In some embodiments, the analysis content of the user includes attribute direction information; according to the analysis content, the large model calls a corresponding tool interface for processing to generate a candidate product set, including:
[0015] According to the attribute direction information, the large model calls a recall tool to generate a set of candidate products.
[0016] In some of the embodiments, according to the attribute direction information, the large model calls a recall tool to generate a candidate product set, including:
[0017] Pre-training the user's behavior interaction sequence through a sequence recommendation model to obtain the user's behavior representation;
[0018] Fine-tuning the attribute sequence of the user to obtain the attribute representation;
[0019] Obtaining a user representation of the user according to the user's behavior representation and the attribute representation;
[0020] Training the sequence recommendation model according to the user representation of the user;
[0021] The large model calls the trained sequence recommendation model to generate a set of candidate products.
[0022] In some of the embodiments, obtaining the user representation of the user according to the behavior representation of the user and the attribute representation includes:
[0023] The frozen behavior representation and the attribute representation of the user are encoded and input into a dense layer to obtain a user representation of the user.
[0024] In some embodiments, before the large model recommends a target product set to the user based on the candidate product set, the large model further includes:
[0025] Get the product dictionary;
[0026] Initializing the product dictionary;
[0027] Detect whether the products in the candidate product set are all in the initialized product dictionary. If the candidate product set contains products that do not exist in the product dictionary, generate corresponding instruction prompts; if the products in the candidate product set are all in the product dictionary, the large model stores the products in the candidate product set and the corresponding tool interfaces.
[0028] In a second aspect, the present invention provides a product recommendation device, which is characterized by comprising:
[0029] The candidate product set generation module is used to implement step 1: the big model generates the user's analysis content according to the current context; step 2: according to the analysis content, the big model calls the corresponding tool interface to generate a candidate product set;
[0030] The recommendation module is used to implement step three: the large model determines whether the candidate product set or the current context meets the preset goal. If it meets the preset goal, the large model recommends the target product set to the user based on the candidate product set; if it does not meet the preset goal, repeat steps one and two in the candidate product set generation module.
[0031] In a third aspect, the present invention provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the product recommendation method described in the first aspect when executing the computer program.
[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the product recommendation method described in the first aspect.
[0033] Compared with the related art, the present invention provides a product recommendation method, which is characterized by comprising: step one: the big model generates the analysis content of the user according to the current context; step two: according to the analysis content, the big model calls the corresponding tool interface to process and generate a set of candidate products; step three: the big model determines whether the set of candidate products or the current context meets the preset goal. If it meets the preset goal, the big model recommends the target product set to the user according to the set of candidate products; if it does not meet the preset goal, repeat the steps one and two. This application uses the big model as the central controller of the recommendation process, uses the reasoning ability of the big model, abstracts the user interest modeling into a multi-round exploration process of calling the corresponding tool interface to generate a set of candidate products according to the current context, performs user decision simulation, and improves the recommendation effect.
[0034] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0036] Figure 1 It is a block diagram of the terminal hardware structure for executing the commodity recommendation method provided in this application;
[0037] Figure 2 is a flow chart of the product recommendation method of the present application;
[0038] Figure 3 This is a test result of the model of this application, and the indicator is the number of trainable parameters;
[0039] Figure 4 This is the test result of the model of this application, and the indicator is the number of floating-point operations per second;
[0040] Figure 5 It is a structural block diagram of the product recommendation device of the present application. DETAILED DESCRIPTION
[0041] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.
[0042] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.
[0043] The method embodiments provided in the present invention may be executed in a terminal, a computer or a similar computing device. For example, when running on a terminal, Figure 1 is a block diagram of the terminal hardware structure for executing the commodity recommendation method provided in the present invention. Figure 1 As shown, the terminal may include one or more ( Figure 1 Only one is shown in the figure) processor 120 and memory 140 for storing data, wherein processor 120 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 160 and an input and output device 180 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.
[0044] The memory 140 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the commodity recommendation method in the present invention. The processor 120 executes various functional applications and data processing by running the computer program stored in the memory 140, that is, to implement the above method. The memory 140 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 140 may further include a memory remotely arranged relative to the processor 120, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0045] The transmission device 160 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 160 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 160 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.
[0046] The present invention provides a commodity recommendation method. Figure 2 is a flow chart of the commodity recommendation method of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0047] Step 1: The big model generates user analysis content based on the current context;
[0048] Step 2: Based on the analysis content, the big model calls the corresponding tool interface to generate a set of candidate products;
[0049] Step 3: The big model determines whether the candidate product set or the current context meets the preset goal. If so, the big model recommends the target product set to the user based on the candidate product set. If not, repeat steps 1 and 2.
[0050] This application uses the big model as the central controller of the recommendation process, and uses the reasoning ability of the big model to abstract user interest modeling into a multi-round exploration process of calling the corresponding tool interface to generate a set of candidate products based on user analysis according to the current context, perform user decision simulation, and improve recommendation results.
[0051] In some embodiments, the current context includes: historical interaction content of the user corresponding to the current moment and moments before the current moment, analysis content of the user, and a set of candidate commodities.
[0052] Through the corresponding prompt template, the big model can generate user analysis content based on the current context.
[0053] According to the analysis content, the big model calls the corresponding tool interface to generate a set of candidate products. The big model output can be processed by a written function, and the tool name and parameters of the tool call can be obtained through regular matching and other methods. Then, the tool call function is entered, the tool output is returned, and a set of candidate products is generated.
[0054] The large model determines whether the candidate product set or the current context meets the preset goal. If it meets the preset goal, the large model recommends the target product set to the user based on the candidate product set; if it does not meet the preset goal, repeat the steps 1 and 2. Exemplarily, when there are no recommended action options or the large model judges whether the process is finished or not by imitating the example of in-context-learning judgment in the prompt. If it is not finished, the important information of the current round is stored to prepare for the next round of repeated execution.
[0055] In step In the large model, the current context , generate user analysis content And call the corresponding tool interface , get the candidate product set Among them, The current context of a step is represented by:
[0056]
[0057] Among them, the initial context Historical interactions by user , Tool Description And tool learning examples Composition. User analysis content Generated by the big model, when the big model determines that the current set of candidate products or the current context meets the preset goals, the big model will end the interaction round and return the target product set.
[0058] In some of the embodiments, the user's analysis content includes attribute direction information; according to the analysis content, the big model calls the corresponding tool interface for processing and generates a candidate product set, including:
[0059] Based on the attribute direction information, the big model calls the sorting tool and returns a set of candidate products sorted by the attributes.
[0060] In some of the embodiments, the user's analysis content includes attribute direction information; according to the analysis content, the big model calls the corresponding tool interface for processing and generates a candidate product set, including:
[0061] Based on the attribute direction information, the big model calls the recall tool to generate a set of candidate products.
[0062] For example, assuming that the “thinking” (the user’s analysis content) is “providing the user with 20 paid movies based on the movie genre”, then the movie genre is the attribute direction to be considered for this “thinking”.
[0063] Optionally, based on the attribute direction information, the large model calls a sorting tool and a recall tool to generate a set of candidate products.
[0064] By constructing two different types of tool sets, namely, sorting tools and recall tools, the generated candidate product set can be more targeted.
[0065] In some of the embodiments, based on the attribute direction information, the big model calls the recall tool to generate a candidate product set, including:
[0066] Pre-train the user's behavior interaction sequence through the sequence recommendation model to obtain the user's behavior representation;
[0067] Fine-tune the user's attribute sequence to obtain attribute representation;
[0068] Obtaining a user representation of the user according to the user's behavior representation and attribute representation;
[0069] Train a sequence recommendation model based on the user representation of the user;
[0070] The large model calls the trained sequence recommendation model to generate a set of candidate products.
[0071] The recommendation process is controlled by a large model, and the recommendation tool is called to provide domain knowledge, which reduces the illusion of a large model and improves the accuracy of recommendations. At the same time, the architecture of the recall tool in the pre-training stage and the attribute fine-tuning stage implements a lightweight attribute-oriented recommendation tool.
[0072] Specifically, for the attribute-oriented recall tool set, this application adopts a two-stage approach to control attribute-related recommendation recall model variants. In the pre-training stage, given a user behavior sequence , the traditional sequence recommendation model is used to pre-train the behavior interaction sequence. The behavior representation matrix of the layer can be expressed as ,in It is Layer Sequence Middle The representation of a behavior. Then at the final layer In the pre-trained behavior representation It can be expressed as:
[0073]
[0074] in, represents the sequence recommendation model, are the pre-trained parameters, and Tansformer represents the Tansformer architecture encoder. After the pre-training phase is completed, the attribute fine-tuning phase is carried out. In this phase, the pre-trained parameters are frozen. , fine-tuning the attribute-oriented encoder Similar to the pre-training phase, given a user attribute sequence , No. The layer attribute representation matrix is , then in the final layer In the above example, the fine-tuned attribute sequence representation can be expressed as:
[0075]
[0076] in, are trainable parameters in the fine-tuning phase.
[0077] In some of the embodiments, obtaining a user representation of the user according to the user's behavior representation and attribute representation includes:
[0078] Behavioral characterization of frozen users And attribute representation All are encoded and input into the dense layer , and obtain the user representation of the user.
[0079] Specifically, through dense layers, attribute representations are encoded simultaneously and freezing behavior , get the new user representation:
[0080]
[0081] in, are trainable parameters in the fine-tuning phase.
[0082] The sequence recommendation model is trained using the BPR loss function:
[0083]
[0084] in, and represent positive samples and negative samples respectively, is the sigmoid activation function. Depend on It means that after fine-tuning Ability to recall different products based on specific attributes while retaining personalized recommendation capabilities.
[0085] In some of the embodiments, before the large model recommends the target product set to the user based on the candidate product set, the method further includes:
[0086] Get the product dictionary;
[0087] Initialize the product dictionary;
[0088] Check whether the products in the candidate product set are all in the initialized product dictionary. If the candidate product set contains products that do not exist in the product dictionary, generate corresponding instruction prompts; if the products in the candidate product set are all in the product dictionary, the large model stores the products in the candidate product set and the corresponding tool interface.
[0089] The large model can use a memory strategy module to ensure the correctness of the recommendation output. In order to avoid the presence of incorrect products in the candidate product set due to the problem of large model hallucination, the memory strategy module is initialized through the product dictionary and verifies the existence of the product. If there are products in the candidate product set that do not exist in the product dictionary, a corresponding instruction prompt is generated; if all the products in the candidate product set are in the product dictionary, the memory strategy module stores the products in the candidate product set and the corresponding tool interface to provide support for subsequent tool calls.
[0090] The following is a comparison between the recommendation model of this application and the traditional recommendation model. First, it is proved through detailed experiments on different recommendation data sets. The following Table 1 is the data statistics of the data set used in the experiment:
[0091] Table 1 Experimental dataset
[0092]
[0093] In order to verify the performance of the model provided by this application compared with the traditional recommendation method in the recommendation scenario, the recommendation data set was sampled three times with 200 users, and the recommendation performance was tested on these three different groups of 200 users. The experimental results are shown in Table 2:
[0094] Table 2 Recommended performance indicators
[0095]
[0096] From the experimental results, we can see that the model ATL-Rec proposed in this application (with SASRec as the basic framework of the tool) performs better than the traditional recommenders SASRec and BERT4Rec. The test performance shows that the way of exploring user interests through attribute granularity can more effectively align with user intent and achieve recommendation results that align with user intent.
[0097] Compared with P5, which uses a large model as a recommendation system, ATL-Rec provides a more stable recommendation quality improvement for recommendation data with different sparsity. Compared with the recommendation method of using a large model to assist traditional recommendations, , , ATL-Rec and ATL-RecB (with Bert4Rec as the basic framework of the tool) have more obvious improvements in different recommendation data; and ATL-Rec's attribute-oriented recommendation process control has more obvious advantages than the simple control Chat-REC and LLMRank.
[0098] The following is a resource consumption test of the architecture of the two-stage recall tool proposed in this application, the pre-training stage and the attribute fine-tuning stage. The test indicators are the number of trainable parameters and the number of floating-point operations per second (FLOPs). The test results are as follows: Figure 3 , Figure 4 Compared with the original recommendation model, our two-stage recall tool is lighter and more efficient in terms of the number of parameters that require additional training. Compared with the full-training recommendation tool, our two-stage recommendation tool not only requires fewer training resources, but also consumes less computation during the inference process and is more efficient.
[0099] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0100] The present invention also provides a commodity recommendation device, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated hereafter. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0101] Figure 5 is a structural block diagram of the commodity recommendation device of the present invention, such as Figure 5 As shown, the device comprises:
[0102] The candidate product set generation module is used to implement step 1: the big model generates the user's analysis content according to the current context; step 2: according to the analysis content, the big model calls the corresponding tool interface to generate a candidate product set;
[0103] The recommendation module is used to implement step three: the big model determines whether the candidate product set or the current context meets the preset goal. If it meets the preset goal, the big model recommends the target product set to the user based on the candidate product set; if it does not meet the preset goal, repeat steps one and two in the candidate product set generation module.
[0104] In the above-mentioned device, this application uses the big model as the central controller of the recommendation process, and uses the reasoning ability of the big model to abstract the user interest modeling into a multi-round exploration process of calling the corresponding tool interface to generate a set of candidate products based on the current context of user analysis, perform user decision simulation, and improve the recommendation effect.
[0105] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.
[0106] The present invention also provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0107] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0108] Optionally, in one embodiment, the processor may be configured to perform the following steps through a computer program:
[0109] Step 1: The big model generates user analysis content based on the current context;
[0110] Step 2: Based on the analysis content, the big model calls the corresponding tool interface to generate a set of candidate products;
[0111] Step 3: The large model determines whether the candidate product set or the current context meets the preset goal. If so, the large model recommends the target product set to the user based on the candidate product set. If not, repeat steps 1 and 2.
[0112] It should be noted that the specific examples of the electronic device can refer to the examples described in the embodiments and optional implementations of the above method, and will not be repeated in this embodiment.
[0113] In addition, in combination with the commodity recommendation method provided in the present invention, a storage medium can also be provided in the present invention to implement the commodity recommendation method. The storage medium stores a computer program; when the computer program is executed by a processor, any one of the commodity recommendation methods in the above embodiments is implemented.
[0114] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.
[0115] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.
[0116] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various places in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.
Claims
1. A product recommendation method, characterized in that: include: Step 1: The big model generates user analysis content based on the current context; Step 2: Based on the analysis content, the large model calls the corresponding tool interface to generate a set of candidate products; Step 3: The large model determines whether the candidate product set or the current context meets the preset target. If the preset target is met, the large model recommends a target product set to the user based on the candidate product set. If the preset target is not met, repeat steps 1 and 2; The analysis content of the user includes attribute direction information; according to the analysis content, the big model calls the corresponding tool interface for processing to generate a candidate product set, including: according to the attribute direction information, the big model calls the recall tool to generate a candidate product set; According to the attribute direction information, the large model calls a recall tool to generate a candidate product set, including: pre-training the user's behavior interaction sequence through a sequence recommendation model to obtain the user's behavior representation; Fine-tuning the attribute sequence of the user to obtain the attribute representation; Obtaining a user representation of the user according to the user's behavior representation and the attribute representation; Training the sequence recommendation model according to the user representation of the user; The large model calls the trained sequence recommendation model to generate a set of candidate products; According to the attribute direction information, the large model calls the recall tool, including: for the attribute-oriented recall tool set, controlling the attribute-related recommended recall model variants; controlling the attribute-related recommended recall model variants, including: in the pre-training stage, given the user behavior sequence ,The traditional sequence recommendation model is used to pre-train the behavior interaction sequence; No. The behavior representation matrix of the layer is expressed as ,in It is Layer Sequence Middle The representation of a behavior; at the final level In the pre-trained behavior representation It is expressed as: in, represents the sequence recommendation model, are the pre-trained parameters; After the pre-training phase is completed, the attribute fine-tuning phase is performed. In the attribute fine-tuning phase, the pre-training parameters are frozen. , fine-tuning the attribute-oriented encoder ; Given a sequence of user attributes , No. The layer attribute representation matrix is , then in the final layer In , the fine-tuned attribute sequence representation is expressed as: in, are trainable parameters in the fine-tuning phase.
2. The recommendation method according to claim 1, characterized in that: The current context includes: the historical interaction content of the user corresponding to the current moment and each moment before the current moment, the analysis content of the user, and the candidate product set.
3. The recommendation method according to claim 2, characterized in that: The user's analysis content includes attribute direction information; according to the analysis content, the large model calls the corresponding tool interface for processing to generate a candidate product set, including: According to the attribute direction information, the large model calls a sorting tool to return a set of candidate products sorted according to the attributes.
4. The recommendation method according to claim 1, characterized in that: Obtaining a user representation of the user according to the user's behavior representation and the attribute representation includes: The frozen behavior representation and the attribute representation of the user are encoded and input into a dense layer to obtain a user representation of the user.
5. The recommendation method according to claim 1, characterized in that: Before the large model recommends a target product set to the user based on the candidate product set, the large model further includes: Get the product dictionary; Initializing the product dictionary; Detect whether the products in the candidate product set are all in the initialized product dictionary. If the candidate product set contains products that do not exist in the product dictionary, generate corresponding instruction prompts; if the products in the candidate product set are all in the product dictionary, the large model stores the products in the candidate product set and the corresponding tool interfaces.
6. A commodity recommendation device, characterized in that: include: The candidate product set generation module is used to implement step 1: the large model generates user analysis content based on the current context; Step 2: Based on the analysis content, the large model calls the corresponding tool interface to generate a set of candidate products; The recommendation module is used to implement step 3: the large model determines whether the candidate product set or the current context meets the preset target. If the preset target is met, the large model recommends a target product set to the user based on the candidate product set; If the preset target is not met, steps 1 and 2 in the candidate product set generation module are repeated; The analysis content of the user includes attribute direction information; According to the analysis content, the large model calls the corresponding tool interface for processing to generate a candidate product set, including: according to the attribute direction information, the large model calls the recall tool to generate a candidate product set; According to the attribute direction information, the large model calls a recall tool to generate a candidate product set, including: pre-training the user's behavior interaction sequence through a sequence recommendation model to obtain the user's behavior representation; Fine-tuning the attribute sequence of the user to obtain the attribute representation; Obtaining a user representation of the user according to the user's behavior representation and the attribute representation; Training the sequence recommendation model according to the user representation of the user; The large model calls the trained sequence recommendation model to generate a set of candidate products; According to the attribute direction information, the large model calls the recall tool, including: for the attribute-oriented recall tool set, controlling the attribute-related recommended recall model variants; controlling the attribute-related recommended recall model variants, including: in the pre-training stage, given the user behavior sequence ,The traditional sequence recommendation model is used to pre-train the behavior interaction sequence; No. The behavior representation matrix of the layer is expressed as ,in It is Layer Sequence Middle The representation of a behavior; at the final level In the pre-trained behavior representation It is expressed as: in, represents the sequence recommendation model, are the pre-trained parameters; After the pre-training phase is completed, the attribute fine-tuning phase is performed. In the attribute fine-tuning phase, the pre-training parameters are frozen. , fine-tuning the attribute-oriented encoder ; Given a sequence of user attributes , No. The layer attribute representation matrix is , then in the final layer In , the fine-tuned attribute sequence representation is expressed as: in, are trainable parameters in the fine-tuning phase.
7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the commodity recommendation method according to any one of claims 1 to 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the product recommendation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Method, device and equipment for recommending information and computer readable medium
CN114511382A
