Recommendation method and apparatus
By obtaining the set of user features and using the language model to generate a recall path and recommendation list, the problem of computing complexity and application scope of large language models in the recommendation system is solved, efficient personalized recommendation is achieved, and user experience and system efficiency are improved.
Patent Information
- Application Number
- PCT/CN2024/090721
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-30
- Filing Date
- 2024-04-30
- Publication Date
- 2025-01-02
AI Technical Summary
Due to the high computational complexity of the recommendation system, large language models are difficult to quickly perform large-scale inference, and cannot independently handle large-scale unknown item libraries, which limits their application scope and efficiency in recommendation systems.
By obtaining the set of user characteristics, using the language model to generate a recall path and recommendation list, personalized recommendations based on user interests are realized and user experience is improved.
It realizes efficient personalized recommendation in large-scale item library scenarios, improves the computing efficiency and user experience of the recommendation system, and enhances the application ability of large language models in the recommendation system.
Smart Images

Figure CN2024090721_02012025_PF_FP_ABST
Abstract
Description
A recommendation method and device
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 30, 2023, with application number 202310809705.7 and invention name “A Recommendation Method and Device”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of recommendation, and in particular to a recommendation method and device. Background Art
[0003] Recommendation systems are one of the core technologies of many current internet applications. For example, in an app store, a recommendation system recommends applications (apps) that users are interested in. In an advertising recommendation scenario, a recommendation system recommends advertisements that users may like.
[0004] In recommendation systems, language models are often used to filter, sort, and summarize recommendation results, generating a list of recommendations that is easy for users to browse. However, in some recommendation scenarios, language models, especially large ones, are difficult to reason about quickly and at scale due to their large size. Furthermore, for new or relocated item repositories, the recommendation system must be redesigned. Therefore, achieving more generalizable recommendation systems using language models has become a pressing issue.
[0005] Summary of the Invention
[0006] The present application provides a recommendation method and device for recalling, recommending, etc. based on a language model, thereby realizing automated recommendation using a language model with strong generalization capability.
[0007] In view of this, in a first aspect, the present application provides a recommendation method, comprising: first, obtaining a user feature set, which may include text or keywords describing a user portrait; generating a recall path based on the user feature set through a language model, the recall path representing a path for making recommendations to the user, wherein the language model is used to classify the input data and generate a corresponding weight for each category, and generate a recall path based on the corresponding weight generated for each category; subsequently, generating a recommendation list for the user based on the recall path through the language model.
[0008] This application provides a recommendation method based on a language model. The language model can identify, classify, sort or summarize the input text. This application can implement various processes in the recommendation system through the language model. Therefore, even for scenarios with large item libraries or for multiple recommendation scenarios, the method provided by this application can be used to implement recommendations for users, and the generalization ability is very strong.
[0009] In one possible implementation, the keywords included in the aforementioned user feature set can be divided into at least one category, which can be classified through a language model or classified through other rules; the aforementioned generation of a recall path based on the user feature set through a language model can include: taking the keywords of the first-level category in at least one category as the input of the language model, and determining the weight value corresponding to the keyword of each first-level category; according to the weight value corresponding to the keyword of each first-level category, determining at least one second-level category keyword in each first-level category, and obtaining a recall path, where the first-level category and the second-level category are any two adjacent categories in the category of the keyword of the user feature set.
[0010] In an embodiment of the present application, taking the first-level categories and the second-level categories as an example, a language model can be used to determine the weight corresponding to each first-level category, so as to select the first-level category to be recommended based on the weight of each first-level category. For example, one or more first-level categories with the highest weight can be selected, and one or more second-level categories under the one or more first-level categories with the highest weight can be determined, so as to generate a recall path and realize recommendations for users based on the language model.
[0011] In a possible implementation, the aforementioned method determines the keywords of at least one second-level category in each first-level category based on the weight values corresponding to the keywords of each first-level category to obtain a recall path, which may include: determining K first-level categories based on the weight values corresponding to the keywords of each first-level category; determining the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories through a language model, where K is a positive integer; determining Q second-level categories based on the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories, where Q is a positive integer; and determining the recall path based on the keywords included in the K first-level categories and the Q second-level categories.
[0012] In an embodiment of the present application, a language model can be used to determine the weight corresponding to the category to which the keyword in the user feature belongs, so as to use the language model to output the user's interest level in each category, thereby generating a recommended path that the user is more interested in, i.e., a recall path, thereby improving the user experience.
[0013] In one possible implementation, the aforementioned generation of a recommendation list for the user based on the recall path through a language model may include: obtaining recommendation data corresponding to the keywords of the last level category under the recall path; sorting the recommendation data through the language model to generate a recommendation list for the user.
[0014] In the implementation manner of the present application, after the recall path is determined, the data to be recommended can be extracted based on the recall path and sorted through a language model to generate a recommendation list for the user and make recommendations, thereby improving the user experience.
[0015] In one possible implementation, the aforementioned acquisition of a user feature set may include: obtaining user description information, the description information including multiple keywords describing the user; generating a user feature set based on the description information through a language model, wherein the language model is used to classify the user's keywords from the description information, and obtaining the user feature set based on the classification results.
[0016] In an embodiment of the present application, after obtaining the user's description information, such as user information or user's historical input data, a language model can be used to classify the user's keywords to determine the keywords of various categories that the user is interested in.
[0017] In one possible implementation, the aforementioned acquisition of user description information may include: obtaining the user's raw data, where the raw data includes one or more of text, voice, or images; and extracting keywords from the raw data to obtain description information. Therefore, in the implementation of this application, user information can be collected through multiple methods such as text, voice, or images, thereby obtaining richer user information.
[0018] In one possible implementation, the input to the aforementioned language model includes a pre-set format. Generally, a language model can be used to recognize and process input text, so the input format of the language model can be pre-set. Therefore, even in different scenarios, input can be performed according to the pre-set format, thereby having strong generalization capabilities.
[0019] In a second aspect, the present application provides a recommendation device, comprising:
[0020] An acquisition module is used to obtain a user feature set, which includes text describing the user profile;
[0021] a processing module, configured to generate a recall path based on a user feature set using a language model, wherein the recall path represents a path for making recommendations for the user, wherein the language model is configured to classify input data and generate a corresponding weight for each category, and generate a recall path based on the corresponding weight generated for each category;
[0022] The processing module is further configured to generate a recommendation list for the user based on the recall path using a language model.
[0023] The description of the second aspect and any optional implementation manner of the second aspect will not be repeated below.
[0024] In a possible implementation, the keywords included in the aforementioned user feature set are divided into at least one category, and the processing module is configured to:
[0025] Using keywords of a first-level category in at least one category as input to a language model, and determining a weight value corresponding to each keyword of the first-level category;
[0026] According to the weight value corresponding to each first-level category keyword, at least one second-level category keyword in each first-level category is determined to obtain a recall path, where the first-level category and the second-level category are any two adjacent categories in the category of the keyword of the user feature set.
[0027] In one possible implementation, the processing module is used to: determine K first-level categories based on the weight values corresponding to the keywords of each first-level category; determine the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories through a language model, where K is a positive integer; determine Q second-level categories based on the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories, where Q is a positive integer; and determine a recall path based on the keywords included in the K first-level categories and the Q second-level categories.
[0028] In a possible implementation, the processing module is configured to: obtain recommendation data corresponding to keywords of the last level category under the recall path; and sort the recommendation data to generate a recommendation list for the user.
[0029] In one possible implementation, the acquisition module is used to: obtain user description information, the description information including multiple keywords describing the user; generate a user feature set based on the description information through a language model, wherein the language model is used to classify the user's keywords from the description information and obtain the user feature set based on the classification results.
[0030] In a possible implementation, the acquisition module is configured to: acquire original data of the user, where the original data includes one or more of text, voice, or image; and extract keywords from the original data to obtain description information.
[0031] In one possible implementation, the input of the language model includes a preset format.
[0032] In a third aspect, embodiments of the present application provide a recommendation device comprising: a processor and a memory, wherein the processor and the memory are interconnected via a circuit, and the processor invokes program code in the memory to execute the processing-related functions of any of the recommendation methods described in the first aspect. Optionally, the recommendation device may be a chip.
[0033] In a fourth aspect, an embodiment of the present application provides a digital processing chip or chip, the chip including a processing unit and a communication interface, the processing unit obtains program instructions through the communication interface, the program instructions are executed by the processing unit, and the processing unit is used to perform processing-related functions in any optional implementation of the first or second aspect above.
[0034] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on a computer, enables the computer to execute the method in the above-mentioned first aspect or any optional embodiment of the first aspect.
[0035] In a sixth aspect, an embodiment of the present application provides a computer program product comprising a computer program / instructions, which, when executed by a processor, enables the processor to execute the method in the above-mentioned first aspect or any optional implementation of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] FIG1 is a schematic diagram of the system architecture provided by this application;
[0037] FIG2 is a schematic diagram of a system architecture provided by this application;
[0038] FIG3 is a schematic diagram of the structure of another system architecture provided by this application;
[0039] FIG4 is a schematic diagram of the structure of a recommendation system provided by this application;
[0040] FIG5 is a schematic diagram of the structure of another recommendation system provided by this application;
[0041] FIG6 is a flow chart of a recommended method provided by this application;
[0042] FIG7 is a flow chart of another recommended method provided by this application;
[0043] FIG8 is a schematic diagram of an application scenario provided by this application;
[0044] FIG9 is a schematic diagram of an application scenario provided by this application;
[0045] FIG10 is a schematic diagram of another application scenario provided by this application;
[0046] FIG11 is a schematic structural diagram of a recommended device provided by this application;
[0047] FIG12 is a schematic structural diagram of another recommended device provided by this application;
[0048] FIG13 is a schematic diagram of the structure of a chip provided in this application. DETAILED DESCRIPTION
[0049] The following will describe the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of this application.
[0050] The recommendation method provided in this application can be applied to artificial intelligence (AI) scenarios. AI is a theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new type of intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.
[0051] First, let's describe the overall workflow of an AI system. See Figure 1, which shows a schematic diagram of the AI framework. This framework will be explained from two perspectives: the "intelligent information chain" (horizontal axis) and the "IT value chain" (vertical axis). The "intelligent information chain" reflects the entire process from data acquisition to processing. For example, it could be the general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, and intelligent execution and output. Throughout this process, data undergoes a condensed journey from "data-information-knowledge-wisdom." The "IT value chain," spanning the underlying infrastructure of human intelligence, information (provided and processed by technology), and the system's industrial ecosystem, reflects the value that AI brings to the information technology industry.
[0052] (1) Infrastructure
[0053] Infrastructure provides computing power for AI systems, enabling communication with the outside world and supporting this through a foundational platform. External communication occurs through sensors; computing power is provided by intelligent chips (CPUs, NPUs, GPUs, ASICs, FPGAs, and other hardware accelerators). The foundational platform includes a distributed computing framework and network-related platform guarantees and support, including cloud storage and computing, and interconnected networks. For example, sensors communicate with the outside world to acquire data, which is then fed into the intelligent chips within the distributed computing system provided by the foundational platform for computation.
[0054] (2) Data
[0055] Data above the infrastructure layer represents data sources for AI. This data includes graphics, images, voice, and text, as well as IoT data from traditional devices. This includes business data from existing systems and sensor data such as force, displacement, liquid level, temperature, and humidity.
[0056] (3) Data processing
[0057] Data processing generally includes data training, machine learning, deep learning, search, reasoning, decision-making, etc.
[0058] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.
[0059] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.
[0060] Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, sorting, and prediction.
[0061] (4) General ability
[0062] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as algorithms or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.
[0063] (5) Smart products and industry applications
[0064] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart terminals, smart transportation, smart medical care, autonomous driving, smart cities, etc.
[0065] The embodiments of the present application involve related applications of neural networks and natural language processing (NLP). In order to better understand the solutions of the embodiments of the present application, the relevant terms and concepts of neural networks that may be involved in the embodiments of the present application are first introduced below.
[0066] (1) Convolutional Neural Network
[0067] A convolutional neural network (CNN) is a deep neural network with a convolutional architecture. It consists of a feature extractor consisting of convolutional layers and subsampling layers, which can be viewed as a filter. A convolutional layer is a layer of neurons that performs convolution processing on the input signal. In a convolutional layer of a CNN, a neuron can only connect to a subset of neurons in adjacent layers. A convolutional layer typically contains several feature planes, each of which is composed of a rectangular arrangement of neurons. Neurons in the same feature plane share weights, which are referred to as convolution kernels. Shared weights can be understood as position-independent feature extraction. Convolution kernels can be formalized as matrices of random size, and during CNN training, the kernels can be learned to acquire reasonable weights. Furthermore, shared weights have the direct benefit of reducing the number of connections between layers of the CNN, thereby reducing the risk of overfitting.
[0068] (2) Graph Convolutional Network (GCN)
[0069] Graph neural networks are a type of deep learning model that models and processes non-Euclidean spatial data, such as graph data. Their principle is to use pairwise message passing, allowing graph nodes to iteratively update their corresponding representations by exchanging information with their neighbors.
[0070] GCN is similar to CNN, but differs in that CNN typically takes two-dimensional structured data as input, while GCN typically takes graph-structured data as input. GCN cleverly designs a method for extracting features from graph data, allowing these features to be used for node classification, graph classification, link prediction, and graph embedding.
[0071] (3) Recurrent neural networks (RNN), also known as recurrent neural networks, are used to process sequence data. In traditional neural network models, the layers are fully connected from the input layer to the intermediate layer and then to the output layer, while the nodes within each layer are disconnected. Although this ordinary neural network solves many difficult problems, it is still powerless for many problems. For example, if you want to predict the next word in a sentence, you generally need to use the previous word because the previous and next words in a sentence are not independent. The reason why RNN is called a recurrent neural network is that the current output of a sequence is also related to the previous output. The specific manifestation is that the network will remember the previous information and apply it to the calculation of the current output, that is, the nodes between the intermediate layers are no longer disconnected but connected, and the input of the intermediate layer includes not only the output of the input layer but also the output of the intermediate layer at the previous moment. In theory, RNN can process sequence data of any length. The training of RNN is the same as the training of traditional CNN or DNN.
[0072] (4) Loss function
[0073] In the process of training a deep neural network, because we hope that the output of the deep neural network is as close as possible to the value we really want to predict, we can compare the predicted value of the current network with the target value we really want, and then update the weight vector of each layer of the neural network according to the difference between the two (of course, there is usually a process of optimization before the first update, that is, pre-configuring parameters for each layer in the deep neural network). For example, if the predicted value of the network is high, adjust the weight vector to make it predict lower, and continue to adjust until the deep neural network can predict the target value we really want or a value very close to the target value we really want. Therefore, it is necessary to pre-define "how to compare the difference between the predicted value and the target value", which is the loss function (loss function) or objective function (objective function). They are important equations used to measure the difference between the predicted value and the target value. Among them, taking the loss function as an example, the higher the output value (loss) of the loss function, the greater the difference, so the training of the deep neural network becomes a process of minimizing this loss as much as possible. The loss function can usually include loss functions such as mean square error, cross entropy, logarithm, exponential, etc. For example, the mean square error can be used as a loss function, defined as The specific loss function can be selected according to the actual application scenario.
[0074] (5) Backpropagation algorithm
[0075] An algorithm that calculates the gradient of model parameters based on a loss function and updates the model parameters. Neural networks can use the back propagation (BP) algorithm to correct the size of the parameters in the initial neural network model during training, reducing the reconstruction error loss of the neural network model. Specifically, forward propagation of the input signal to the output generates error loss. This error loss information is then backpropagated to update the parameters in the initial neural network model, thereby converging the error loss. The backpropagation algorithm is a backpropagation movement dominated by error loss, aiming to obtain the optimal parameters of the neural network model, such as the weight matrix.
[0076] In the implementation manner of the present application, in the training stage or the inference stage of the large language model, the BP algorithm can be used to train the model to obtain a trained model.
[0077] (6) Language model (LM)
[0078] This is used in Natural Language Processing (NLP) and plays a crucial role in the field. Its task is to predict the probability of a sentence occurring in a language. For example, a language model is typically constructed as a probability distribution p(s) for a string s, where p(s) attempts to reflect the frequency with which string s appears as a sentence. This can be applied to scenarios such as text recognition and machine translation.
[0079] (7) Neural machine translation: Neural machine translation is a typical task in natural language processing. Given a sentence in a source language, it outputs the corresponding sentence in the target language. In commonly used neural machine translation models, the words in the source and target language sentences are encoded into vector representations, and the associations between words and sentences are calculated in the vector space to perform the translation task.
[0080] (8) Self-attention model refers to the effective encoding of a sequence of data (such as the natural language “Your phone is very good.”) into several multi-dimensional vectors to facilitate numerical operations. The multi-dimensional vector integrates the similarity information between each element in the sequence, and this similarity is called self-attention.
[0081] (9) Pre-trained language model (PLM): It is a natural language sequence encoder that encodes each word in the natural language sequence into a vector representation, so as to perform downstream tasks. For example, the word vector conversion network, action vector conversion network or action generation network mentioned below in this application can all be implemented using PLM. The training of PLM includes two stages, namely the pre-training stage and the fine-tuning stage. In the pre-training stage, the model is trained on the language model task on large-scale unsupervised text to learn the word representation method. In the fine-tuning stage, the model is initialized with the parameters learned in the pre-training stage, and is trained in fewer steps on downstream tasks such as text classification or sequence labeling, so that the semantic information obtained from the pre-training can be successfully transferred to the downstream tasks.
[0082] (10) Transformer structure: Generally, PLM can be constructed based on the Transformer structure. For example, PLM can be obtained by stacking multiple Transformer structures. A Transformer structure can also be called a Transformer layer. Compared with other neural networks, such as RNN or CNN, the Transformer layer relies on its attention mechanism to capture the long-term dependency between words. For example, the structure of the Transformer layer can be shown in Figure 2. The Transformer layer includes a multi-head attention network and a forward network module. The multi-head attention network obtains the corresponding weight value by calculating the correlation between words and obtains the context-related word representation, which is the core part of the Transformer structure; the forward network further transforms the obtained representation to obtain the final output of the Transformer layer. In addition to the two important components, the residual layer (ADD) and linear normalization (Norm) are also stacked on these two components to optimize the output of the Transformer layer.
[0083] (11) Transformers library:
[0084] It provides models for natural language understanding (NLU) or natural language generation (NLG), such as BERT (bidirectional encoder representations from transformers), GPT-2, RoBERTa, XLM, DistilBert, XLNet, CTRL, etc. It has multiple pre-trained models and supports multiple language processing.
[0085] (12) Large language model (LLM)
[0086] A language model containing hundreds of billions (or more) of parameters, trained on large amounts of text data, is a natural language processing model based on deep learning. These models can process large amounts of text data and learn the grammatical and semantic rules of natural language. LLMs can be applied to text generation, machine translation, question-answering systems, text summarization, or sentiment analysis. They offer advantages such as strong generative capabilities, adaptability, accurate predictions, and scalability. For example, in a movie recommendation scenario, a large language model can generate descriptions of movie scenes, including genre, starring actors, and storyline, enabling the system to better recommend similar films. Large language models can also generate reasons for recommendations. For example, e-commerce websites can use large language models to generate reasons for product recommendations, such as product quality, price, and features, to help users better understand the product's value. Furthermore, by connecting to a candidate list provided by a traditional recommendation system, large language models can also sort and summarize recommendation results, generating results that are easy for users to read and browse.
[0087] However, large language models are typically computationally complex and require significant computing resources and time for training and inference. Therefore, when applied to recommendation systems, computational complexity must be considered, making it difficult to scale language models within these systems. They are often unable to autonomously process large unknown item libraries: Recommendation systems must process vast item libraries, and language models cannot traverse the contents of these libraries with minimal overhead, resulting in the need for a traditional recommendation system to generate candidate sets. Their application scope is also limited: Large language models often cannot directly complete the entire recommendation process and can only replace some steps, limiting their application within recommendation systems.
[0088] (13) Automated Machine Learning (AutoML): refers to the design of a series of advanced control systems to operate machine learning models, so that the models can automatically learn appropriate parameters and configurations without human intervention. In learning models based on deep neural networks, automatic computational learning mainly includes network architecture search and global parameter setting. Among them, network architecture search is used to allow the computer to generate the neural network architecture that best suits the problem based on the data. It has the characteristics of high training complexity and significant performance improvement.
[0089] (14) Gradient: The derivative vector of the loss function with respect to the parameters.
[0090] (15) Stochastic gradient: The number of samples in machine learning is very large, so the loss function is calculated each time based on the data obtained by random sampling, and the corresponding gradient is called stochastic gradient.
[0091] (16)Embedding: refers to the feature representation of a sample or word embedding representation.
[0092] (17) Recommendation system: The recommendation system uses machine learning algorithms to analyze and learn based on the user's historical click behavior data, then predicts the user's new requests and returns a personalized item recommendation list.
[0093] (18) Click Through Rate (CTR): refers to the probability that a user clicks on a displayed item in a specific environment.
[0094] (19) Post-click conversion rate (CVR): refers to the probability that a user converts a clicked item in a specific environment. For example, if a user clicks on an APP icon, conversion refers to downloading, installing, registering, etc.
[0095] (20) Transfer learning: Using existing knowledge to assist in learning new knowledge. The core is to find similarities between existing knowledge and new knowledge.
[0096] (21) Model convergence: After multiple rounds of model iteration, the error between the model's predicted value and the actual value is less than a pre-set smaller value.
[0097] The recommendation method provided in the embodiments of the present application can be executed on a server or on a terminal device. The terminal device can be a mobile phone with image processing capabilities, a tablet personal computer (TPC), a media player, a smart TV, a laptop computer (LC), a personal digital assistant (PDA), a personal computer (PC), a camera, a video camera, a smart watch, a wearable device (WD), or an autonomous vehicle, etc., and the embodiments of the present application are not limited thereto.
[0098] The following describes the system architecture provided by the embodiments of the present application.
[0099] Referring to Figure 2 , an embodiment of the present application provides a system architecture 200 . As shown in system architecture 200 , a data acquisition device 260 can be used to collect training data. After data acquisition device 260 collects the training data, it stores the training data in database 230 . Training device 220 then trains a target model / rule 201 based on the training data maintained in database 230 .
[0100] The following describes how training device 220 obtains target model / rule 201 based on training data. Exemplarily, training device 220 processes multiple sample image frames, outputs corresponding predicted labels, calculates the loss between the predicted labels and the original labels of the samples, and updates the classification network based on this loss until the predicted labels approach the original labels of the samples or the difference between the predicted labels and the original labels is less than a threshold, thereby completing the training of target model / rule 201. A detailed description is provided in the training method below.
[0101] The target model / rule 201 in the embodiment of the present application can specifically be a neural network. It should be noted that in actual applications, the training data maintained in the database 230 does not necessarily come from the collection of the data acquisition device 260, and may also be received from other devices. It should also be noted that the training device 220 does not necessarily train the target model / rule 201 entirely based on the training data maintained by the database 230, and may also obtain training data from the cloud or other places for model training. The above description should not be used as a limitation on the embodiments of the present application.
[0102] The target model / rule 201 trained by the training device 220 can be applied to different systems or devices, such as the execution device 210 shown in FIG2 . The execution device 210 can be a terminal, such as a mobile phone terminal, a tablet computer, a laptop computer, an augmented reality (AR) / virtual reality (VR), an in-vehicle terminal, a television, etc., or a server or cloud. In FIG2 , the execution device 210 is configured with a transceiver 212 , which can include an input / output (I / O) interface or other wireless or wired communication interface for data exchange with external devices. Taking the I / O interface as an example, a user can input data into the I / O interface through the client device 240 .
[0103] When the execution device 210 preprocesses the input data, or when the computing module 111 of the execution device 210 performs calculations and other related processing, the execution device 210 can call the data, code, etc. in the data storage system 250 for corresponding processing, and can also store the data, instructions, etc. obtained from the corresponding processing in the data storage system 250.
[0104] Finally, the I / O interface 212 returns the processing result to the client device 240 so as to provide it to the user.
[0105] It is worth noting that the training device 220 can generate corresponding target models / rules 201 based on different training data for different goals or different tasks. The corresponding target models / rules 201 can be used to achieve the above goals or complete the above tasks, thereby providing users with the desired results.
[0106] In the scenario shown in FIG. 2 , the user can manually input data, which can be performed through the interface provided by transceiver 212. Alternatively, client device 240 can automatically send input data to transceiver 212. If user authorization is required for client device 240 to automatically send input data, the user can set the corresponding permissions in client device 240. The user can view the results output by execution device 210 on client device 240, which can be presented in a display, sound, action, or other specific form. Client device 240 can also serve as a data acquisition terminal, collecting input data from transceiver 212 and output results from transceiver 212 as new sample data and storing them in database 230. Alternatively, data collection can be performed without client device 240, with transceiver 212 directly storing the input data from transceiver 212 and output results from transceiver 212 as new sample data in database 230.
[0107] It is worth noting that Figure 2 is only a schematic diagram of a system architecture provided by an embodiment of the present application. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 2, the data storage system 250 is an external memory relative to the execution device 210. In other cases, the data storage system 250 can also be placed in the execution device 210.
[0108] As shown in FIG2 , a target model / rule 201 is obtained through training by a training device 220 . In an embodiment of the present application, the target model / rule 201 may be a recommendation model in the present application.
[0109] For example, the system architecture for applying the recommendation method provided herein can be shown in Figure 3. In this system architecture 300, server cluster 310 is implemented by one or more servers, optionally in conjunction with other computing devices, such as data storage, routers, and load balancers. Server cluster 310 can use data in data storage system 250 or invoke program code in data storage system 250 to implement the steps of the recommendation method provided herein.
[0110] Users can operate their respective user devices (e.g., local device 301 and local device 302) to interact with server cluster 310. Each local device can represent any computing device, such as a personal computer, a computer workstation, a smartphone, a tablet computer, a smart camera, a smart car or other type of cellular phone, a media consumption device, a wearable device, a set-top box, a game console, etc.
[0111] Each user's local device can interact with the server cluster 310 through a communication network of any communication mechanism / communication standard, and the communication network can be a wide area network, a local area network, a point-to-point connection, or any combination thereof. Specifically, the communication network may include a wireless network, a wired network, or a combination of a wireless network and a wired network. The wireless network includes, but is not limited to, a fifth-generation mobile communication technology (5th-Generation, 5G) system, a long-term evolution (long term evolution, LTE) system, a global system for mobile communication (global system for mobile communication, GSM) or a code division multiple access (code division multiple access, CDMA) network, a wideband code division multiple access (wideband code division multiple access, WCDMA) network, wireless fidelity (wireless fidelity, WiFi), Bluetooth (bluetooth), Zigbee protocol (Zigbee), radio frequency identification technology (radio frequency identification, RFID), long range (Lora) wireless communication, near field communication (NFC) and any one or more combinations thereof. The wired network may include a fiber optic communication network or a network composed of a coaxial cable, etc.
[0112] In another implementation, one or more aspects of the execution device 210 may be implemented by each local device. For example, the local device 301 may provide local data or feedback calculation results to the execution device 210 .
[0113] It should be noted that all functions of the execution device 210 can also be implemented by local devices. For example, the local device 301 implements the functions of the execution device 210 and provides services to its own users, or provides services to the users of the local device 302.
[0114] Typically, machine learning systems include personalized recommendation systems. Based on input data and labels, machine learning model parameters are trained using optimization methods such as gradient descent. Once the model parameters converge, the model can be used to predict unknown data. For example, in a personalized recommendation system, click-through rate prediction involves input data including user characteristics, item characteristics, and contextual features. Predicting personalized recommendations based on user preferences significantly impacts the user experience and platform revenue.
[0115] For example, in online applications, there are various interactive behaviors between users and products, such as clicking, liking, adding to cart, or purchasing. Different types of behaviors express different potential intentions when users interact with products. Therefore, user multi-behavior information can be used to capture the user's true intentions.
[0116] For example, in some recommendation scenarios, such as AutoGPT, large language models are used to complete given tasks. After the user provides a task and goal in the form of a text description, the solution calls GPT-4 to schedule and execute the task. At the same time, the solution maintains a working memory module to store the intermediate states of the task. However, the process is slow and requires a large amount of token inference overhead. Typically, executing a single task requires multiple subtasks, which is costly. Furthermore, the solution relies on the assistance of traditional retrieval systems and cannot replace recommendation systems.
[0117] Another example is the effectiveness of ChatGPT for recommendations in some solutions. This framework designs corresponding prompt templates based on the specific recommendation tasks as ChatGPT input and performs format checking on the output results. However, it cannot adapt to unknown or large item libraries. In the case of unknown item libraries, the accuracy of generating candidate sets without the help of traditional recommendation systems is close to 0, which is not practical. Although the solution supports sorting a small number of candidate items, it is limited by the inference overhead and cannot traverse a large item library.
[0118] Therefore, this application provides a recommendation method that uses language models to implement a more efficient recommendation system, so that recommendations can be made based on user interests and improve user experience.
[0119] Exemplarily, the recommendation framework used in the present application can be shown in FIG4 , which can be divided into a training part and an online reasoning part. Among them, in the training part, the training set includes input data and corresponding labels. For example, in the user product recommendation scenario, the training set can include products that the user clicks, collects or likes, as well as products that are finally purchased. The training set is input into the initial model, and the parameters of the machine learning model are trained by optimization methods such as gradient descent to obtain a recommendation model. In the online reasoning part, the recommendation model can be deployed on the recommendation platform, such as on a server or terminal. Taking the server as an example here, the server can be used to output a recommendation list for the user. For example, in the product recommendation scenario, the information of the products recommended to the user, such as product icons or link titles, can be displayed on the homepage of the user terminal, or after the user clicks on a product, the icon or link title of the product recommended to the user can be displayed in the recommendation area.
[0120] In some application scenarios, the recommendation process can be illustrated in Figure 5, which includes a display list, logs, offline training, and online prediction. Users perform a series of actions in the front-end display list, such as browsing, clicking, commenting, and downloading, generating behavioral data that is stored in logs. The recommendation system uses data, including user behavior logs, to perform offline model training. After training converges, it generates a predictive model. The model is deployed in an online service environment and provides recommendations based on user request access, product features, and contextual information. Users then provide feedback on the recommendation results, forming user data.
[0121] During offline training, the multi-behavior recommendation model provided in this application models user behavior patterns and dynamic interests through historical interactions between users and products. This allows for effective and efficient modeling of user interests, improving the accuracy and personalization of the recommendation model and significantly enhancing the user experience.
[0122] For example, in the case of display ads, users perform a series of actions within the front-end display list, such as browsing, clicking, commenting, and downloading. This generates behavioral data that is stored in logs. Recommendation systems utilize this data, including user behavior logs, for offline model training. After training converges, they generate a predictive model, deploy it in an online service environment, and provide recommendation rankings based on user requests, item features, and contextual information. Finally, users provide feedback on these recommendations, generating user data.
[0123] Typically, most recommendation systems have a large number of items, ranging from tens of thousands to hundreds of millions. Large language models, however, have significant inference overhead and are unable to traverse large item repositories for recommendation ranking. The automated recommendation method provided in this application can achieve personalized recommendations on large, unknown item repositories using minimal text input.
[0124] The method flow provided in this application is described in detail below with reference to the accompanying drawings.
[0125] Referring to FIG6 , a flowchart of a recommended method provided by the present application is described below.
[0126] 601. Obtain a user feature set.
[0127] The user feature set may include text for describing user features, or may be understood as keywords or key words related to the user.
[0128] Specifically, the user feature set can be obtained based on the user's input data. The input data may include collected user information, and may also include received input data, etc. The input data may include user information, which may specifically include but is not limited to user identity information, location information, user input data, or historical information generated by the user, etc. Specifically, the user identity information may include information indicating the user's identity, such as the user's name, identifier, etc.; the location information may include the coordinates of the user's own location, which can be obtained by the user using a client for positioning; the user input data may include data of user input operations, such as the user opening an application market or music software, or the user clicking on an app or clicking on a music icon, etc.; historical information generated by the user may include information about apps clicked or downloaded by the user, music played or downloaded, etc.
[0129] It should be understood that user input data is related to the application scenario and may vary in different recommendation scenarios. For example, in an app recommendation scenario, it may include information such as the app name, application type, and application style, as well as further actions after clicking the app, such as download, install, and register. For another example, in a music recommendation scenario, it may include information about a large number of songs clicked by users, such as music type and artist information, as well as further actions after clicking the music, such as play, download, and other conversion actions.
[0130] In one possible implementation, one or more types of raw data containing user information may be collected. For example, the raw data may include images, voice, or text. Text may then be extracted from the raw data to obtain a user feature set. For example, a pre-trained transformer network may be used to extract features from images or voice to extract text from the input data.
[0131] Furthermore, one or more keywords for each user can be extracted from the original data to obtain the user's description information, that is, the description information includes one or more keywords describing the user, and the description information can be used as the input of the language model, so as to classify the user's keywords through the language model, and obtain a user set based on the classification result. Among them, the classification of user keywords can usually be divided into one or more levels, and it can be understood that each category can include one or more subcategories. Specifically, when the description information is used as the input of the language model, it can be input according to a pre-set input format, such as "summarize the user's interest topics based on the user's characteristics and sort them", so that the language model can identify the tasks to be performed based on the input data and execute them.
[0132] 602. Generate a recall path based on the user feature set using a language model.
[0133] After obtaining the user feature set, the user feature set can be used as the input of the language model to output a recall path for recommendation to the user, which may also be called a recommendation category path or a recommendation directory path.
[0134] Keywords in a user feature set can be divided into one or more categories. Some categories may include one or more subcategories. When there are multiple categories, they can be divided into one or more levels of categories based on the relationships between them. For example, the multiple categories can be represented by a tree structure, with each category including one or more subcategories.
[0135] In one possible implementation, a specific method of generating a recall path through a language model may include: taking two adjacent levels of categories as an example, to facilitate the distinction between the first-level category and the second-level category, the second-level category is a subcategory of the first-level category, and the first-level category may include one or more second-level categories. One or more first-level categories are used as input to the language model to filter out keywords of at least one first-level category, and then the language model is used to determine the weight value corresponding to each first-level category. The weight value can be used to represent the recommendation level of each first-level category, or can be understood as the predicted user interest in the category. Based on the weight corresponding to each first category, at least one second-level category under one or more first-level categories is determined to obtain a recall path.
[0136] Specifically, the weight value of each second-level category under at least one filtered first-level category can be determined through a language model, and one or more second-level categories can be filtered out from the multiple second-level categories under the at least one first-level category based on the weight value of each second-level category, thereby obtaining a recall path.
[0137] It should be understood that if the second-level category also includes a third-level category, the weights corresponding to each third-level category under each second-level category in the at least one second-level category can also be determined, and then one or more third-level categories can be filtered out based on the weight of each third-level category, and so on.
[0138] For example, K first-level categories can be determined based on the weight values corresponding to the keywords of each first-level category; the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories can be determined through a language model, where K is a positive integer; Q second-level categories can be determined based on the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories, where Q is a positive integer; and the recall path can be determined based on the keywords included in the K first-level categories and the Q second-level categories. Therefore, keyword classification can be performed based on user data, so that recommendations can be made using a language model based on the relationship between keyword categories. Without manual intervention, the language model can also be applied to multiple scenarios or large item library scenarios, and the language model can be used to accurately mine keywords that are closer to the user, so that more accurate recommendations can be made for users in recommendation scenarios.
[0139] Furthermore, when a user feature set is used as input to a language model, it can be input in a pre-set format, allowing the language model to identify and execute the task described by the input text. For example, when a first-level category is used as input to a language model, it can be input in a pre-set template, such as "Weight and sort the following categories based on user interests: [Category 1][Category xxx]," allowing the language model to identify the task it needs to perform based on the input data.
[0140] 603. Generate a recommendation list for the user based on the recall path using a language model.
[0141] After determining the recall path, a recommendation list for the user can be generated based on the recall path. For example, the recommendation data corresponding to the keywords corresponding to the last-level category under each recall path can be obtained, and the recommendation data can be sorted using a language model to obtain the recommendation list.
[0142] In this embodiment of the present application, a language model can be used to classify a user's keywords and filter out recommended categories for the user. Therefore, a language model can be used in various stages of the recommendation system to generate more accurate and relevant recommendation data that is closer to the user's interests, thereby improving the user experience.
[0143] The above describes the process of the method provided by this application. The following is a collection of specific application scenarios to introduce the process of the method provided by this application in more detail.
[0144] The recommendation method provided by this application can be divided into multiple parts. See Figure 7, which is a flowchart of another recommendation method provided by this application. It can be divided into multiple parts, such as the user interest summary module 701, the personalized recall module 702, and the personalized ranking module 703 shown in Figure 7.
[0145] Module 701 converts user behavior data into natural text and summarizes the user's interest categories from strong to weak. Module 702, based on the user's interests and the category hierarchy of the candidate item library, allocates the proportion of items to be recalled for each category, selecting a corresponding number of candidate items from categories with high recall ratios. Module 703 sorts the selected items from each category in a mixed order, taking into account the differences between adjacent items based on the needs of the sorting process to improve the diversity of the recommendation list.
[0146] Each module will be introduced below in conjunction with FIG7 .
[0147] 701. User interest summary module.
[0148] First, a text description of the user is obtained based on the user's raw data, which can be understood as keywords describing the user's characteristics. The raw data can specifically include text, images, or voice data. For example, the raw data can be converted into a user feature list to represent the user's keywords or categories of interest.
[0149] User categories or specific numerical features can be described using pre-defined data structures. For example, a template such as "[Feature Name] = [Feature Value]" can be used for descriptions, such as "Gender" = "Male / Female" and "Age" = "50." For historical user behavior, using news items clicked on as an example, features such as the news titles they interacted with can be used to describe them, such as "Historically clicked news items are: [News Title 1], [News Title 2], ..., [News Title N]." By combining text descriptions of various categories of features, a prompt template input for the large prediction model can be formed.
[0150] The language model is used to generate a summary description of the user's interests based on the user's feature description. In addition, this application exemplarily introduces the language model as a large language model. The large language model mentioned below can be replaced by a language model, which will not be repeated below.
[0151] For example, the user's characteristics and prompt text can be used as input to the language model, which can then summarize the user's characteristics and determine the user's topics of interest. For example, the prompt input to the language model could be "Based on the user's characteristics, summarize the user's topics of interest and sort them from strong to weak." The language model can then determine the task it needs to perform based on the input data, thereby filtering out keywords of interest to the user based on the user's characteristics.
[0152] 702. Personalized recall module.
[0153] After obtaining the user interest summary, a recall path for the user can be generated based on the user interest summary. The recall path can be determined based on the user's interest level in each category, or it can also be understood as a path of recommendation level for user's interested categories or keywords.
[0154] Typically, the user's keywords of interest may be classified into one or more categories, each of which may include one or more subcategories, each of which may include its next-level subcategories, and so on.
[0155] Taking the text editing scenario as an example, assume that the candidate news set includes first-level topic categories and second-level topic categories, each second-level topic category belongs to a first-level topic category, and each news belongs to a second-level category.
[0156] In addition, it should be noted that one interaction with a large language model can be understood as a conversation.
[0157] In the same session, the first-level categories are used as input to the large language model, which then uses the large language model to generate the recalled first-level topic categories and their weights based on user interests. A possible prompt template is "first-level categories include: [category 1], [category 2], ..., [category X], and the recommended first-level categories and their weights are generated based on user interests." After this prompt template is input to the model, the model will output a list of recommended first-level categories [t1, t2, ..., t M ] and the corresponding recall weights [w1,w2,…,w M ].
[0158] Usually the recall weights given by large language models may not be normalized, so optionally, these weights can be normalized, such as dividing each weight by the sum of the M weights to obtain the weights [w′1, w′2, …, w′ M ].
[0159] Select the K first-level categories with the highest weights, and use the language model to recommend the second-level categories under these first-level categories (further screening). In the same session, take the list of second-level categories under these K first-level categories as input, and require the language model to give the recalled first-level topic categories and their proportions based on user interests. For example, the prompt template is "The second-level categories under [category 1] include: [second-level category 1], [second-level category 2],…, [second-level category Y]. …The second-level categories under [category K] include: [second-level category 1], [second-level category 2],…, [second-level category Z]. Recommended second-level categories and weights are given based on user interests." After the prompt template is input into the model, the model will output a list of recommended second-level categories under each first-level category [t 1,1 ,t 1,2 ,…,t1,P ],…,[t K,1 ,t K,2 ,…,t K,P ], and the corresponding recall weight [w 1,1 ,w 1,2 ,…,w 1,P ],…,[w K,1 ,w K,2 ,…,w K,P ].
[0160] Normalize the weight of the secondary category recommended by each primary category to obtain the normalized weight [w′ 1,1 ,w′ 1,2 ,…,w′ 1,P ],…,[w′ K,1 ,w′ K,2 ,…,w′ K,P The weight of the secondary category is multiplied by the weight of the corresponding primary category to obtain a unified secondary category weight. Let the weight of the jth secondary category under the i-th primary category be s i,j , calculated as s i,j =w′ i ×w′ i,j .
[0161] Select the Q second-level categories with the highest weights, and perform personalized sorting on the news in each second-level category (there may be third-level categories or fourth-level categories, etc., and iterate and apply the above steps). First, renormalize the weights of these second-level categories to obtain the weight s′ i,j Assuming that each category expects to select S news in total, then N news will be selected under each recommended secondary category. i,j =S×s i,j For each secondary category, the template input to the large language model can be "[Secondary Category i] includes news: [News Title 1], [News Title 2], ..., [News Title W]. Recommend [N i,j ] news". The above templates will be constructed for each of the Q secondary categories and input into the language model for news selection.
[0162] Of course, in addition to being divided into primary and secondary categories, there may also be tertiary or quaternary categories. For details, please refer to the above description. The large language model outputs the weight corresponding to the next level category and performs screening, and so on. I will not go into details here.
[0163] 703. Personalized sorting module.
[0164] After determining the Q secondary categories of news, they are mixed and used as input to the large language model for sorting. For example, a prompt could be entered: "Personalize the sorting of the following news. Note the diversity among the news in the sorted list. [News Title 1], [News Title 2], ..., [News Title S]." The sorting results output by the large language model are mapped to the IDs of the original news items and passed to the front-end system for displaying the news content to users.
[0165] It can be understood that in the implementation of this application, the large model first summarizes the user's interest description from their behavioral history. Then, based on the hierarchical category structure of the candidate item library, a step-by-step recommendation recall path is generated. Next, a corresponding number of items from the higher-weighted item categories are selected and sorted, and finally, items from various categories are mixed and ranked comprehensively. Furthermore, the method uses a prompt template to require the large model to automatically generate recall paths and path weights related to interest strength. Based on these weights, the paths are pruned and sampled to generate the final desired candidate item category distribution.
[0166] Therefore, in the implementation mode of the present application, more accurate recommendations for users can be achieved through a large language model. Generally, a recommendation system has multiple processes such as recall, sorting, and rearrangement, while in existing solutions, large models can only participate in part of the process and cannot directly replace traditional recommendation systems. On the one hand, the latency requirements of the recommendation system are extremely stringent, and large language models are difficult to reason quickly and on a large scale. On the other hand, the recommended item library is large in scale and dynamically updated, which makes it difficult for large language models to process directly. The present invention aims to achieve efficient automatic recommendations based on large models, and can automatically implement all the main processes of the recommendation system with a large language model at a higher computational efficiency.
[0167] Take, for example, a browser's recommendations. News ranking requires predicting the click-through rate of news articles. Inputs include user and news features, which are then used to generate predictions using a model. This application provides a recommendation method based on a large language model, leveraging the understanding capabilities of large language models to model complex recommendation strategies.
[0168] Specific processes may include:
[0169] First, the system logs are collected, the data is cleaned, and the user features are textualized and input into the 701 module to obtain a description of the user's interests.
[0170] Subsequently, in the same session, after adding the set of news first-level category names, the 702 module is used to obtain the recall weight of the first-level category.
[0171] In the same session, for a high-weighted first-level category, after adding a set of subordinate second-level category names, the 702 module is used to obtain the recall weight of the second-level category, and so on to obtain the recall weight of the finest level.
[0172] Subsequently, the news in the finest categories with high recall weights are input into the large language model for sorting and selection.
[0173] Then, the selected news under each category is input into the 703 module for mixed sorting
[0174] Traditional recommendation schemes require large amounts of training data and cannot make accurate recommendations when the training data is relatively sparse. Among language model-based recommendation methods, existing recommendation schemes generally rely heavily on traditional recommendation models to generate candidate sets, which has limited accuracy and cannot handle unknown large-scale candidate libraries. This application provides a fully automatic and efficient recommendation method based on a large language model that can effectively handle large-scale recommendation candidate item libraries.
[0175] For example, the method provided in the present application can be applied to an APP recommendation scenario. As shown in FIG8 , the icon of the recommended app can be displayed in the display interface of the user's terminal, so that the user can further click or download the recommended app, allowing the user to quickly find the required app and improve the user experience.
[0176] For another example, the method provided in the present application can be applied to a product recommendation scenario. As shown in FIG9 , the icon of the recommended product can be displayed on the display interface of the user's terminal, so that the user can further click, add to cart, or purchase the recommended product, allowing the user to view the required product and improve the user experience.
[0177] For example, the method provided in the present application can be applied to a music recommendation scenario. As shown in FIG10 , an icon of recommended music can be displayed on the display interface of the user's terminal, so that the user can further click, collect or play the recommended music, allowing the user to view more preferred music and improve the user experience.
[0178] The method provided in this application improves the application paradigm of large language models in recommendation systems, increasing their involvement in recommendation systems and potentially replacing traditional recommendation systems. This approach can achieve the following: Improved recommendation accuracy: Large language models can improve the accuracy of recommendation systems by conducting in-depth analysis of user historical behavior and interests; Enriched recommendation content: Large language models can generate richer and more diverse recommendations, thereby increasing user choice and satisfaction; Improved user experience: Large language models can be adjusted and optimized in real time based on user behavior and feedback, thereby improving user experience and satisfaction.
[0179] The above describes the method flow provided by the present application. The following describes the device structure for executing the above method flow provided by the present application.
[0180] Referring to FIG11 , a schematic structural diagram of a recommended device provided by the present application is described below.
[0181] An acquisition module 1101 is configured to acquire a user feature set, wherein the user feature set includes text describing a user profile;
[0182] Processing module 1102 is configured to generate a recall path based on a user feature set using a language model, where the recall path represents a recommendation path for the user. The language model is configured to classify input data and generate a corresponding weight for each category, and the recall path is generated based on the corresponding weight for each category.
[0183] The processing module 1102 is further configured to generate a recommendation list for the user based on the recall path using a language model.
[0184] In a possible implementation, the keywords included in the aforementioned user feature set are divided into at least one category, and the processing module 1102 is configured to:
[0185] Using keywords of a first-level category in at least one category as input to a language model, and determining a weight value corresponding to each keyword of the first-level category;
[0186] According to the weight value corresponding to each first-level category keyword, at least one second-level category keyword in each first-level category is determined to obtain a recall path, where the first-level category and the second-level category are any two adjacent categories in the category of the keyword of the user feature set.
[0187] In one possible implementation, the processing module 1102 is used to: determine K first-level categories based on the weight values corresponding to the keywords of each first-level category; determine the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories through a language model, where K is a positive integer; determine Q second-level categories based on the weights corresponding to the keywords of at least one second-level category under each of the K first-level categories, where Q is a positive integer; and determine a recall path based on the keywords included in the K first-level categories and the Q second-level categories.
[0188] In a possible implementation, the processing module 1102 is configured to: obtain recommendation data corresponding to the keywords of the last level category under the recall path; sort the recommendation data, and generate a recommendation list for the user.
[0189] In one possible implementation, the acquisition module 1101 is used to: obtain user description information, the description information including multiple keywords describing the user; generate a user feature set based on the description information through a language model, wherein the language model is used to classify the user's keywords from the description information, and obtain the user feature set based on the classification results.
[0190] In a possible implementation, the acquisition module 1101 is configured to: acquire original data of the user, where the original data includes one or more of text, voice, or image; and extract keywords from the original data to obtain description information.
[0191] In one possible implementation, the input of the language model includes a preset format.
[0192] Please refer to FIG12 , which is a schematic structural diagram of another recommended device provided by this application, as described below.
[0193] The recommendation device may include a processor 1201 and a memory 1202. The processor 1201 and the memory 1202 are interconnected via a line. The memory 1202 stores program instructions and data.
[0194] The memory 1202 stores program instructions and data corresponding to the steps in FIG. 6 to FIG. 10 .
[0195] The processor 1201 is configured to execute the method steps performed by the recommendation apparatus as shown in any of the embodiments in FIG. 6 to FIG. 10 .
[0196] Optionally, the recommendation device may further include a transceiver 1203 for receiving or sending data.
[0197] A computer-readable storage medium is also provided in an embodiment of the present application, which stores a program for generating a vehicle driving speed. When the program is running on a computer, the computer executes the steps in the method described in the embodiments shown in Figures 6 to 10 above.
[0198] Optionally, the recommended device shown in the aforementioned FIG. 12 is a chip.
[0199] An embodiment of the present application also provides a recommendation device, which can also be called a digital processing chip or chip. The chip includes a processing unit and a communication interface. The processing unit obtains program instructions through the communication interface, and the program instructions are executed by the processing unit. The processing unit is used to execute the method steps performed by the recommendation device shown in any of the embodiments of Figures 6 to 10 above.
[0200] The present application also provides a digital processing chip. This digital processing chip integrates circuitry and one or more interfaces for implementing the aforementioned processor 1201 or its functions. If the digital processing chip incorporates memory, it can perform the method steps of any one or more of the aforementioned embodiments. If the digital processing chip does not incorporate memory, it can connect to an external memory via a communication interface. The digital processing chip implements the actions performed by the recommended device in the aforementioned embodiments based on program code stored in the external memory.
[0201] An embodiment of the present application also provides a computer program product, which, when running on a computer, enables the computer to execute the steps performed by the recommendation device in the method described in the embodiments shown in Figures 6 to 10 above.
[0202] The recommendation device provided in the embodiment of the present application can be a chip, and the chip includes: a processing unit and a communication unit. The processing unit can be, for example, a processor, and the communication unit can be, for example, an input / output interface, a pin or a circuit. The processing unit can execute the computer-executable instructions stored in the storage unit so that the chip in the server executes the neural network training method described in the embodiments shown in Figures 6 to 10 above. Optionally, the storage unit is a storage unit in the chip, such as a register, a cache, etc. The storage unit can also be a storage unit located outside the chip in the wireless access device, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.
[0203] Specifically, the aforementioned processing unit or processor may be a central processing unit (CPU), a neural-network processing unit (NPU), a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0204] For example, see Figure 13, which is a schematic diagram of the structure of a chip provided in an embodiment of the present application. The chip can be represented as a neural network processor NPU 130. NPU 130 is mounted on the host CPU (host CPU) as a coprocessor and assigned tasks by the host CPU. The core of the NPU is arithmetic circuit 1303, which is controlled by controller 1304 to extract matrix data from memory and perform multiplication operations.
[0205] In some implementations, arithmetic circuit 1303 includes multiple processing engines (PEs). In some implementations, arithmetic circuit 1303 is a two-dimensional systolic array. Arithmetic circuit 1303 can also be a one-dimensional systolic array or other electronic circuitry capable of performing mathematical operations such as multiplication and addition. In some implementations, arithmetic circuit 1303 is a general-purpose matrix processor.
[0206] For example, assume there are input matrix A, weight matrix B, and output matrix C. The computation circuit retrieves the corresponding data of matrix B from weight memory 1302 and caches it on each PE in the computation circuit. The computation circuit then retrieves the data of matrix A from input memory 1301 and performs a matrix operation on it with matrix B. The partial or final matrix result is stored in accumulator 1308.
[0207] Unified memory 1306 is used to store input and output data. Weight data is directly transferred to weight memory 1302 via direct memory access controller (DMAC) 1305. Input data is also transferred to unified memory 1306 via DMAC.
[0208] The bus interface unit (BIU) 1310 is used for interaction between the AXI bus, the DMAC, and the instruction fetch buffer (IFB) 1309 .
[0209] The bus interface unit 1310 (BIU) is used for the instruction fetch memory 1309 to obtain instructions from the external memory, and is also used for the storage unit access controller 1305 to obtain the original data of the input matrix A or the weight matrix B from the external memory.
[0210] DMAC is mainly used to move input data in the external memory DDR to the unified memory 1306 or to move weight data to the weight memory 1302 or to move input data to the input memory 1301.
[0211] The vector calculation unit 1307 includes multiple operation processing units. When necessary, it further processes the output of the operation circuit, such as vector multiplication, vector addition, exponential operation, logarithmic operation, size comparison, etc. It is mainly used for non-convolutional / fully connected layer network calculations in neural networks, such as batch normalization, pixel-level summation, and upsampling of feature planes.
[0212] In some implementations, the vector calculation unit 1307 can store the processed output vector to the unified memory 1306. For example, the vector calculation unit 1307 can apply a linear function and / or a nonlinear function to the output of the operation circuit 1303, such as linear interpolation of the feature plane extracted by the convolution layer, or accumulate a vector of values to generate an activation value. In some implementations, the vector calculation unit 1307 generates a normalized value, a pixel-level summed value, or both. In some implementations, the processed output vector can be used as an activation input to the operation circuit 1303, such as for use in subsequent layers in a neural network.
[0213] An instruction fetch buffer 1309 connected to the controller 1304 is used to store instructions used by the controller 1304;
[0214] Unified memory 1306, input memory 1301, weight memory 1302, and instruction fetch memory 1309 are all on-chip memories. External memories are private to the NPU hardware architecture.
[0215] The operations of each layer in the recurrent neural network can be performed by the operation circuit 1303 or the vector calculation unit 1307.
[0216] The processor mentioned in any of the above places may be a general-purpose central processing unit, a microprocessor, an ASIC, or one or more integrated circuits for controlling the execution of the programs of the methods of FIG. 6 to FIG. 10 .
[0217] It should also be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separate, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed across multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment. In addition, in the drawings of the device embodiments provided in this application, the connection relationship between the modules indicates that there is a communication connection between them, which can be specifically implemented as one or more communication buses or signal lines.
[0218] Through the description of the above embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software plus necessary general-purpose hardware, and of course can also be implemented by dedicated hardware including application-specific integrated circuits, dedicated CPUs, dedicated memories, dedicated components, etc. In general, all functions performed by computer programs can be easily implemented with corresponding hardware, and the specific hardware structures used to implement the same function can also be diverse, such as analog circuits, digital circuits, or dedicated circuits. However, for the present application, software program implementation is a better implementation method in most cases. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer's floppy disk, USB flash drive, mobile hard disk, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc., including a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.
[0219] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0220] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website, a computer, a server, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website, a computer, a server, or a data center. The computer-readable storage medium can be any available medium that a computer can store or a data storage device such as a server or a data center that includes one or more available media integrations. The available medium can be a magnetic medium, (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)).
[0221] The terms "first," "second," "third," "fourth," and the like (if any) in the specification and claims of this application and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or sequential sequence. It should be understood that the terms used in this manner are interchangeable where appropriate so that the embodiments described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," and any variations thereof, are intended to cover non-exclusive inclusions, e.g., a process, method, system, product, or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0222] Finally, it should be noted that the above is only a specific implementation method of the present application, but the protection scope of the present application is not limited to this. Any technician familiar with this technical field can easily think of changes or replacements within the technical scope disclosed in this application, which should be covered by the protection scope of the present application.
Claims
1. A recommendation method, characterized in that: include: Obtaining a user feature set, wherein the user feature set includes text describing a user portrait; Generate a recall path based on the user feature set through a language model, wherein the recall path represents a path for recommendation for the user, wherein the language model is used to classify input data and generate a corresponding weight for each category, and generate the recall path according to the corresponding weight generated for each category; A recommendation list for the user is generated based on the recall path using the language model.
2. The method according to claim 1, characterized in that The keywords included in the user feature set are divided into at least one category, and the generating a recall path based on the user feature set by using a language model includes: Using the keywords of the first-level category in the at least one category as inputs of the language model, and determining a weight value corresponding to each keyword of the first-level category; According to the weight value corresponding to the keyword of each first-level category, determine at least one second-level category keyword in each first-level category to obtain the recall path, and the first-level category and the second-level category are any two adjacent categories in the category of the keyword of the user feature set.
3. The method according to claim 2, characterized in that The step of determining at least one second-level category keyword in each first-level category according to the weight value corresponding to the keyword of each first-level category to obtain the recall path includes: Determine K first-level categories according to the weight values corresponding to the keywords of each first-level category; Determine, by using the language model, weights corresponding to keywords of at least one second-level category under each of the K first-level categories, where K is a positive integer; Determine Q second-level categories according to the weights respectively corresponding to the keywords of at least one second-level category under each first-level category in the K first-level categories, where Q is a positive integer; The recall path is determined according to keywords included in the K first-level categories and the Q second-level categories.
4. The method according to any one of claims 1 to 3, characterized in that The generating a recommendation list for the user based on the recall path by using the language model includes: Obtaining recommendation data corresponding to the keywords of the last level category under the recall path; The recommendation data is sorted by using the language model to generate a recommendation list for the user.
5. The method according to any one of claims 1 to 4, characterized in that The obtaining of the user feature set includes: Acquire description information of the user, where the description information includes a plurality of keywords describing the user; The user feature set is generated based on the description information through the language model, wherein the language model is used to classify the user's keywords from the description information and obtain the user feature set according to the classification result.
6. The method according to claim 5, characterized in that The obtaining the description information of the user includes: Acquire original data of the user, where the original data includes one or more of text, voice or image; Keywords are extracted from the original data to obtain the description information.
7. The method according to any one of claims 1 to 6, characterized in that The input of the language model includes a preset format.
8. A recommendation device, characterized in that: include: An acquisition module, used to acquire a user feature set, wherein the user feature set includes text describing a user portrait; A processing module is used to generate a recall path based on the user feature set through a language model, wherein the recall path represents a user feature set. The language model is used to classify the input data and generate a corresponding weight for each category, and the recall path is generated according to the corresponding weight generated for each category; The processing module is further configured to generate a recommendation list for the user based on the recall path using the language model.
9. The device according to claim 8, characterized in that The keywords included in the user feature set are divided into at least one category, and the processing module is used to: Using the keywords of the first-level category in the at least one category as inputs of the language model, and determining a weight value corresponding to each keyword of the first-level category; According to the weight value corresponding to the keyword of each first-level category, determine at least one second-level category keyword in each first-level category to obtain the recall path, and the first-level category and the second-level category are any two adjacent categories in the category of the keyword of the user feature set.
10. The device according to claim 9, characterized in that The processing module is used for: Determine K first-level categories according to the weight values corresponding to the keywords of each first-level category; Determine, by using the language model, weights corresponding to keywords of at least one second-level category under each of the K first-level categories, where K is a positive integer; Determine Q second-level categories according to the weights respectively corresponding to the keywords of at least one second-level category under each first-level category in the K first-level categories, where Q is a positive integer; The recall path is determined according to keywords included in the K first-level categories and the Q second-level categories.
11. The device according to any one of claims 8 to 10, characterized in that The processing module is used for: Obtaining recommendation data corresponding to the keywords of the last level category under the recall path; The recommendation data is sorted to generate a recommendation list for the user.
12. The device according to any one of claims 8 to 11, characterized in that The acquisition module is used to: Acquire description information of the user, where the description information includes a plurality of keywords describing the user; The user feature set is generated based on the description information through the language model, wherein the language model is used to classify the user's keywords from the description information and obtain the user feature set according to the classification result.
13. The device according to claim 12, characterized in that The acquisition module is used to: Acquire original data of the user, where the original data includes one or more of text, voice or image; Keywords are extracted from the original data to obtain the description information.
14. The device according to any one of claims 8 to 13, characterized in that The input of the language model includes a preset format.
15. A data processing device, characterized in that: The method comprises one or more processors, wherein the one or more processors are coupled to a memory, wherein the memory stores a program, and when the program instructions stored in the memory are executed by the one or more processors, the steps of the method according to any one of claims 1 to 7 are implemented.
16. A computer-readable storage medium, characterized in that: The invention comprises a program, which, when executed by a processing unit, performs the method according to any one of claims 1 to 7.
17. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Food path recommendation method and device, electronic equipment and storage medium
CN115237966A
Implementation method for interactive content recommendation
CN116077942A
Recommendation method and device
CN117009650A
Detachable foldable cup handle
KR1020210128044A
Parameterizing network communication paths
US20180203573A1
Cited By
AI-driven customer segmentation and personalized recommendation system
CN119537706A
News recommendation method and system based on user portrait dynamic configuration recall strategy
CN119598030A
News Recommendation Method and System for Dynamically Configuring Recall Strategies Based on User Profiles
CN119598030B
Vehicle recommendation method and device, storage medium and program product
CN120429509A
Method and device for generating personalized response of large language model agent
CN120745843A