Behavior data processing method, and recommendation method and related apparatus
By processing user behavior sequences in blocks and extracting interest information using a large language model (LLM), and combining this with a self-attention mechanism to update target interest features, the problem of insufficient accuracy and efficiency in traditional user behavior modeling is solved, resulting in more accurate user interest analysis and recommendation results.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2025-10-24
- Publication Date
- 2026-05-07
AI Technical Summary
Traditional user behavior modeling methods ignore external knowledge, making it difficult for Large Language Models (LLMs) to meet the needs of downstream tasks when modeling user behavior, resulting in insufficient accuracy and efficiency.
By segmenting user behavior sequences and extracting interest information using LLM, limiting the amount of behavior data in each segment, reducing the number of LLM calls, and combining interest representations with a self-attention mechanism, the target interest features are continuously updated to reflect the user's current interests.
It improves the accuracy and efficiency of downstream task processing results, ensures the accuracy of interest information provided by LLM, reduces computational overhead, and continuously captures changes in users' lifetime interests.
Smart Images

Figure CN2025129785_07052026_PF_FP_ABST
Abstract
Description
Methods for processing behavioral data, recommendation methods, and related devices
[0001] This application claims priority to Chinese Patent Application No. 202411563077.X, filed on November 4, 2024, entitled "Method for Processing Behavioral Data, Recommendation Method and Related Apparatus", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of artificial intelligence, and more specifically, to a method for processing behavioral data, a recommendation method, and related apparatus. Background Technology
[0003] User behavior sequence analysis is widely used in user understanding tasks. By leveraging user behavior information, task models can learn user interests, thereby enabling them to perform tasks more effectively. Taking recommender systems as an example, the task of a recommender system is to comprehensively consider factors such as the user, the object, and the current context to recommend objects that the user may be interested in. In actual modeling, the probability of a user clicking or converting is often used to rank objects and display the recommendation results. Click-through rate (CTR) or conversion rate prediction is a core task in recommender systems, aiming to predict the probability of a user clicking on or converting to recommended objects (such as music, advertisements, etc.). User behavior sequences are a crucial factor affecting the accuracy of prediction. Traditional user behavior modeling methods typically only consider information from their own dataset, ignoring other valuable external knowledge.
[0004] In recent years, the use of large language models (LLMs) to assist in user behavior modeling has been proposed. An LLM is a neural network model with a large number of parameters trained on a vast corpus, capable of understanding and generating natural language text. Specifically, large language models are typically based on neural network techniques, learning the syntax, semantics, and contextual information of a language through training on large amounts of text data. During training, the model continuously optimizes its parameters to improve its ability to understand and generate text. Due to its powerful ability to understand natural language, large language models have been widely applied in many fields to solve natural language understanding and generation problems. Because LLMs have accumulated a large amount of factual knowledge and possess strong reasoning capabilities, using LLMs to assist in user behavior modeling can achieve a more accurate analysis of user interests. However, some problems still exist when using LLMs for user behavior modeling, making it difficult to meet the needs of downstream tasks. Summary of the Invention
[0005] This application provides a method, recommendation method, and related apparatus for processing behavioral data. This solution helps improve the accuracy of downstream task processing results while ensuring processing efficiency.
[0006] Firstly, a method for processing behavioral data is provided, comprising: acquiring a user behavior stream, the user behavior stream including multiple behavioral data of the user acquired in chronological order; constructing n1 first blocks based on the first behavior sequence when the first behavior sequence satisfies preset conditions, wherein the multiple behavioral data in the first behavior sequence comes from the user behavior stream, each of the n1 first blocks is based on the multiple behavioral data in the first behavior sequence, and n1 is a positive integer; extracting n1 first interest information from the n1 first blocks respectively through a large language model (LLM), the n1 first interest information being used to determine a first target interest feature, and the first target interest feature being used for a downstream task model.
[0007] According to the scheme of this application embodiment, when a behavior sequence meets certain conditions, blocks are constructed based on the behavior data in the behavior sequence. The user's interest information is extracted from each block using the external knowledge and reasoning capabilities of the LLM. This helps limit the amount of behavior data in each block, avoids directly using the LLM to process extremely long user behavior sequences, and thus helps ensure the accuracy of the interest information provided by the LLM, thereby improving the accuracy of downstream task processing results. Simultaneously, when a behavior sequence meets certain conditions, new blocks are constructed, and the LLM is called to extract interest information from the newly constructed blocks. This helps reduce the number of LLM calls, thereby reducing computational overhead and ensuring processing efficiency.
[0008] For example, constructing n1 first blocks based on the first row sequence may include: dividing multiple row data in the first row sequence to obtain n1 first blocks.
[0009] For example, the n1 pieces of first interest information can be used as first target interest features, or the n1 pieces of first interest information can be used to generate first target interest features.
[0010] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: when the second behavior sequence satisfies preset conditions, constructing n2 second blocks based on the second behavior sequence, wherein multiple behavior data in the second behavior sequence come from the user behavior stream, each of the n2 second blocks is based on multiple behavior data in the second behavior sequence, the multiple behavior data in the second behavior sequence is obtained after multiple behavior data in the first behavior sequence, and n2 is a positive integer; extracting n2 second interest information from the n2 second blocks respectively through LLM, the n2 second interest information is used to determine the second target interest feature, and the second target interest feature is used to replace the first target interest feature in the downstream task model.
[0011] For example, the n2 pieces of second interest information can be used as second target interest features, or the n2 pieces of second interest information can be used to generate second target interest features.
[0012] n1 and n2 can be the same or different.
[0013] According to the above scheme, as behavioral data continues to arrive, new blocks can be constructed under the condition of meeting preset conditions. The interest information from the new blocks can be used to determine new target interest features to replace the target interest features used in the downstream task model. The new target interest features are more in line with the user's current interests, which is conducive to continuously providing accurate interest analysis results for the downstream task model, thereby helping to continuously ensure the accuracy of the processing results of the downstream task model.
[0014] In conjunction with the first aspect, in some implementations of the first aspect, the first behavior sequence includes all behavior data in the first region, the first region is used to store behavior data in the user behavior flow, and the method further includes: when constructing n1 first blocks based on the first behavior sequence, performing a clearing operation on the first region to clear some or all of the behavior data in the first region, the second behavior sequence includes all behavior data in the first region after the clearing operation is performed, the n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
[0015] Furthermore, the method also includes: in the case of constructing n2 second blocks based on the second action sequence, clearing some or all of the action data in the first region.
[0016] Optionally, the first area is a cache and the second area is memory.
[0017] According to the above scheme, when new behavioral data is acquired, the behavioral data can be stored in the first region first. When the behavioral data in the first region meets certain conditions, a new block is constructed in the second region based on the behavioral data in the first region, and the behavioral data in the first region is cleared, thereby realizing the streaming update of target interest features.
[0018] In conjunction with the first aspect, in some implementations of the first aspect, the second target interest feature is generated based on at least one second interest information among n2 second interest information and at least one first interest information among n1 first interest information.
[0019] According to the above scheme, new interest information (such as second interest information) is extracted from new blocks (such as the second block) through LLM, and the user's target interest features (such as the first target interest features) are updated based on the new interest information and the previous interest information (such as the first interest information). This realizes incremental capture and streaming update of the user's lifelong interests, which is conducive to further improving the accuracy of user interest analysis results.
[0020] In conjunction with the first aspect, in some implementations of the first aspect, the at least one first interest information satisfies preset condition #2.
[0021] In other words, at least one piece of first interest information can be used to generate the second target interest feature only if it meets the preset condition #2.
[0022] For example, preset condition #2 may include: the time when the interest information was generated is less than or equal to the current time, which is a threshold #4.
[0023] For example, preset condition #2 may include: the interest information belongs to the M interest information generated before the second interest information that is closest to the current time in terms of generation time, where M is a positive integer.
[0024] According to the above scheme, only interest information that meets the preset conditions can participate in the construction of target interest features, which is equivalent to setting an elimination mechanism. This helps to make the target interest features better reflect the user's current interests, that is, to further improve the accuracy of the target interest features.
[0025] In conjunction with the first aspect, in certain implementations of the first aspect, n1 pieces of first interest information are extracted from n1 first blocks using a Large Language Model (LLM), including: generating n1 first interest summaries from each of the n1 first blocks using the LLM, wherein the n1 pieces of first interest information include the n1 first interest summaries; and n2 pieces of second interest information are extracted from n2 second blocks using the LLM, including: generating n2 second interest summaries from each of the n2 second blocks using the LLM; generating n2 pieces of interest transition information from the n2 pieces of second interest summaries and at least one of the n1 pieces of first interest summaries using the LLM, wherein the n2 pieces of interest transition information are used to indicate the differences between the n2 pieces of second interest summaries and at least one of the n1 pieces of first interest summaries, wherein the n2 pieces of second interest information include the n2 pieces of second interest summaries and the n2 pieces of interest transition information.
[0026] According to the above scheme, user interest information is determined by summarizing interests within blocks and analyzing interest changes between blocks. This captures the long-term evolution of user interests, which helps to better capture changes in user interests and thus facilitates a more accurate understanding of users' lifelong interests.
[0027] In conjunction with the first aspect, in some implementations of the first aspect, the method further includes: fusing at least one second interest representation and at least one first interest representation based on a self-attention mechanism to obtain a second target interest feature, wherein at least one second interest representation is obtained by encoding at least one second interest information among n2 second interest information by an encoder, and at least one first interest representation is obtained by encoding at least one first interest information among n1 first interest information by an encoder.
[0028] According to the above scheme, using a self-attention mechanism to fuse interest representations is beneficial to obtaining better aggregation results of interest information, making the analysis of user interests more accurate, and thus improving the performance of downstream tasks. For example, if the downstream task is a recommendation task, it is beneficial to improve the performance of the recommendation model.
[0029] In conjunction with the first aspect, in some implementations of the first aspect, the preset condition includes that the amount of behavioral data is greater than or equal to a first threshold.
[0030] In conjunction with the first aspect, in some implementations of the first aspect, the downstream task model includes a recommendation model, which is used to predict the probability that a user will perform an action on a candidate recommendation object. The input information of the recommendation model includes a first target interest feature or a second target interest feature.
[0031] In conjunction with the first aspect, in some implementations of the first aspect, the first target interest feature is used in the training phase of the downstream task model, and / or, the first target interest feature is used in the inference phase of the downstream task model.
[0032] Secondly, a recommendation method is provided, comprising: responding to a first recommendation request, acquiring first input information related to the first recommendation request, the first input information including information of a target user, information of a first candidate recommendation object, and first target interest features, wherein the first target interest features are generated based on n1 pieces of first interest information, the n1 pieces of first interest information are extracted from n1 first blocks by a large language model (LLM), the n1 first blocks are constructed based on a first behavior sequence, the first behavior sequence satisfies preset conditions, multiple behavior data in the first behavior sequence come from a user behavior stream, the user behavior stream includes multiple behavior data of the target user acquired in chronological order, each of the n1 first blocks is based on multiple behavior data in the first behavior sequence, and n1 is a positive integer; inputting the first input information into a first recommendation model to predict the probability that the target user has an action on the first candidate recommendation object.
[0033] According to the scheme of this application embodiment, when a behavior sequence meets certain conditions, blocks are constructed based on the behavior data in the behavior sequence. The user's interest information is extracted from each block using the external knowledge and reasoning capabilities of the LLM. This helps limit the amount of behavior data in each block, avoids directly using the LLM to process extremely long user behavior sequences, and thus helps ensure the accuracy of the interest information provided by the LLM, thereby improving the accuracy of the recommendation results. Simultaneously, when a behavior sequence meets certain conditions, new blocks are constructed, and the LLM is called to extract interest information from the newly constructed blocks. This helps reduce the number of LLM calls, thereby reducing computational overhead and ensuring processing efficiency.
[0034] In conjunction with the second aspect, in some implementations of the second aspect, the first recommendation model is trained based on at least one training sample and corresponding sample labels. Each training sample in the at least one training sample includes user information, information of the recommended object, and first target interest features. The sample label corresponding to each training sample is used to indicate whether the user in each training sample has an operation on the recommended object.
[0035] According to the above scheme, target interest features can be used to optimize the training algorithm, that is, to train the recommendation model, so that the recommendation system can better utilize the knowledge generated by LLM, thereby improving the ability of the recommendation model and improving the accuracy of the recommendation results.
[0036] In conjunction with the second aspect, in some implementations of the second aspect, the method further includes: receiving a second recommendation request, which is received after the first recommendation request; obtaining second input information related to the second recommendation request, the second input information including information about the target user, information about the second candidate recommendation object, and second target interest features, wherein the second target interest features are generated based on n2 pieces of second interest information, the n2 pieces of second interest information are extracted from n2 second blocks respectively through LLM, the n2 second blocks are constructed based on a second behavior sequence, the second behavior sequence satisfies preset conditions, multiple behavior data in the second behavior sequence come from user behavior streams, each of the n2 second blocks is based on multiple behavior data in the second behavior sequence, the multiple behavior data in the second behavior sequence are obtained after multiple behavior data in the first behavior sequence, and n2 is a positive integer; inputting the second input information into the second recommendation model to predict the probability that the target user will have an action on the second candidate recommendation object.
[0037] According to the above scheme, as behavioral data continues to arrive, new blocks can be constructed under the premise of meeting preset conditions. Interest information from the new blocks can be used to determine new target interest features to replace the target interest features used in the recommendation model. The new target interest features are more in line with the user's current interests, which is conducive to continuously providing accurate interest analysis results for the recommendation model, thereby helping to continuously ensure the accuracy of the recommendation results.
[0038] In conjunction with the second aspect, in some implementations of the second aspect, the first recommendation model and the second recommendation model are the same model.
[0039] In conjunction with the second aspect, in some implementations of the second aspect, the second recommendation model is trained based on at least one training sample and corresponding sample labels. Each training sample in the at least one training sample includes user information, information of the recommendation object, and second target interest features. The sample label corresponding to each training sample is used to indicate whether the user in each training sample has an action on the recommendation object.
[0040] In conjunction with the second aspect, in some implementations of the second aspect, the first behavior sequence includes all behavior data in the first region, the first region is used to store behavior data in the user behavior flow, and when n1 first blocks are constructed based on the first behavior sequence, some or all of the behavior data in the first region is cleared, the second behavior sequence includes all behavior data in the cleared first region, the n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
[0041] In conjunction with the second aspect, in some implementations of the second aspect, the second target interest feature is generated based on at least one second interest information among n2 second interest information and at least one first interest information among n1 first interest information.
[0042] In conjunction with the second aspect, in some implementations of the second aspect, the n1 first interest information items include n1 first interest summaries, which are generated by the LLM based on the n1 first blocks respectively; the n2 second interest information items include n2 second interest summaries and n2 interest transition information items, which are generated by the LLM based on the n2 second blocks respectively; the n2 interest transition information items are generated by the LLM based on at least one of the n2 second interest summaries and the n1 first interest summaries; and the n2 interest transition information items are used to indicate the differences between the n2 second interest summaries and at least one of the n1 first interest summaries.
[0043] In conjunction with the second aspect, in some implementations of the second aspect, the second target interest feature is obtained by fusing at least one second interest representation and at least one first interest representation based on a self-attention mechanism. The at least one second interest representation is obtained by encoding at least one second interest information among n2 second interest information by an encoder, and the at least one first interest representation is obtained by encoding at least one first interest information among n1 first interest information by an encoder.
[0044] In conjunction with the second aspect, in some implementations of the second aspect, the preset condition includes that the amount of behavioral data is greater than or equal to a first threshold.
[0045] Thirdly, an apparatus for processing behavioral data is provided, the apparatus comprising modules / units for performing the methods of the first aspect and any implementation thereof.
[0046] Fourthly, a recommended apparatus is provided, comprising modules / units for performing the methods of the first aspect and any implementation thereof.
[0047] It should be understood that the extensions, limitations, interpretations and descriptions of the relevant content in the first aspect above also apply to the same content in the second, third and fourth aspects.
[0048] Fifthly, a computing device is provided, including a processor and a memory, and optionally, an input / output interface. The processor controls the input / output interface to send and receive information, the memory stores a computer program, and the processor retrieves and runs the computer program from the memory, enabling the execution of the method described in the first aspect, the second aspect, or any possible implementation thereof.
[0049] Optionally, the processor can be a general-purpose processor, which can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc.; when implemented in software, the processor can be a general-purpose processor that reads software code stored in memory. This memory can be integrated into the processor or located outside the processor and exist independently.
[0050] Optionally, the aforementioned computing device may be a terminal device / server, or a chip within a terminal device / server.
[0051] Sixthly, a chip is provided that acquires and executes instructions to implement the methods in the first or second aspect and any of the implementation methods described above.
[0052] Optionally, as one implementation, the chip includes a processor and a data interface, through which the processor reads instructions stored in the memory and executes the methods in the first aspect or the second aspect and any of the implementations described above.
[0053] Optionally, as one implementation, the chip may further include a memory storing instructions, and the processor is used to execute the instructions stored in the memory. When the instructions are executed, the processor is used to perform the method in the first aspect or the second aspect and any of the implementations.
[0054] In a seventh aspect, a computer program product containing instructions is provided, which, when executed by a computing device, cause the computing device to perform the methods described in the first or second aspect and any of their implementations.
[0055] Eighthly, a computer-readable storage medium is provided, including computer program instructions that, when executed by a computing device, perform the method as described in the first or second aspect and any of its implementations.
[0056] As examples, these computer-readable storage devices include, but are not limited to, one or more of the following: read-only memory (ROM), programmable ROM (PROM), erasable PROM (EPROM), flash memory, electrically EPROM (EEPROM), and hard drive.
[0057] Alternatively, as one implementation method, the aforementioned storage medium can specifically be a non-volatile storage medium. Attached Figure Description
[0058] Figure 1 is an architecture diagram of a recommendation system according to an embodiment of this application.
[0059] Figure 2 is a schematic diagram of a system architecture provided in an embodiment of this application.
[0060] Figure 3 is a schematic diagram of another system architecture provided in an embodiment of this application.
[0061] Figure 4 is a schematic diagram of a recommendation framework provided in an embodiment of this application.
[0062] Figure 5 is a schematic block diagram of an apparatus for processing behavioral data according to an embodiment of this application.
[0063] Figure 6 is a schematic flowchart of a method for processing behavioral data according to an embodiment of this application.
[0064] Figure 7 is a schematic diagram of the first and second line sequences of an embodiment of this application.
[0065] Figure 8 is a schematic flowchart of a recommended method according to an embodiment of this application.
[0066] Figure 9 is a schematic diagram of an application scenario of an embodiment of this application.
[0067] Figure 10 is a schematic diagram of a behavior data processing flow according to an embodiment of this application.
[0068] Figure 11 is a schematic block diagram of an apparatus according to an embodiment of this application.
[0069] Figure 12 is a schematic diagram of the architecture of a computing device according to an embodiment of this application. Detailed Implementation
[0070] The technical solutions in this application will now be described with reference to the accompanying drawings.
[0071] The terminology used in the following embodiments is for the purpose of describing specific embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” and “the” are intended to include expressions such as “one or more,” unless the context clearly indicates otherwise. It should also be understood that in the following embodiments of this application, “at least one,” “at least one,” and “one or more” refer to one, two, or more than two. “First,” “second,” and various numerical designations are merely distinctions for descriptive convenience and are not intended to limit the scope of the embodiments of this application. “And / or” is used to describe the correspondence between corresponding objects, indicating that three relationships can exist. For example, “A and / or B” can represent: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character “ / ” generally indicates that the preceding and following related objects are in an “or” relationship. The order of the process numbers below does not imply the order of execution. The execution order of each process should be determined by its function and internal logic and should not constitute any limitation on the implementation process of the embodiments of this application. For example, in the embodiments of this application, the words "301", "401", "501" etc. are merely identifiers made for the convenience of description and do not limit the order of execution steps.
[0072] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. In this application, the words "exemplary" or "for example" are used to indicate that something is illustrative, exemplary, or descriptive. Any embodiment or design described as "exemplary" or "for example" in this application should not be construed as being more preferred or advantageous than other embodiments or designs. Specifically, the use of the words "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner. The terms "comprising," "including," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized. In the embodiments of this application, descriptions such as "when," "in the case of," "if," and "if" all refer to the fact that the device will perform a corresponding processing under certain objective circumstances, and are not a limitation on time, nor do they require the device to perform a judgment action during implementation, nor do they imply any other limitations.
[0073] In this application, "for indicating" can include both direct and indirect indication. When describing an indication message as indicating A, it can include whether the indication message directly indicates A or indirectly indicates A, but does not necessarily mean that the indication message carries A.
[0074] The recommendation method provided in this application can be applied to various types of information retrieval scenarios and used for prediction tasks in information retrieval systems (such as recommendation platforms, search engines, and advertising systems).
[0075] Alternatively, the solutions in this application embodiment can be applied to recommendation systems. In the solutions of this application embodiment, a recommendation system refers to a system that analyzes users' historical data, predicts new recommendation requests based on the analysis results, and obtains recommendation results.
[0076] The task of a recommender system is to recommend items that a user is most interested in by comprehensively considering factors such as the user, the item, and the current context. In actual modeling, the probability of a user clicking on or converting the recommended item is often used to rank the items and display the recommendation results. Click-through rate (CTR) or conversion rate estimation is a core task in recommender systems, aiming to predict the probability of a user clicking on or converting to a recommended item (such as music or an advertisement).
[0077] For example, the recommendation method of this application embodiment can be applied to recommendation platforms, such as for product recommendation, music recommendation, or information flow recommendation.
[0078] For example, product recommendations can suggest products that users are most likely to be interested in, thereby increasing click-through rates and conversion rates.
[0079] For example, music recommendations can suggest music that users are most likely to be interested in, thereby increasing users' listening time and improving user experience.
[0080] For example, the recommendation method of this application embodiment can be applied to search engines, such as for product search or browser search.
[0081] For example, the recommended method in this application embodiment can be applied to an advertising system, for example, for ad delivery.
[0082] For example, ad recommendations can suggest ads that users are most interested in, thereby increasing click-through rates and generating revenue for the platform.
[0083] The following is a brief introduction to two commonly used application scenarios.
[0084] Application Scenario 1: App store recommendations;
[0085] The recommendation method of this application embodiment can be applied to the recommendation system of the application market for recommending products (such as applications) in the application market.
[0086] App stores can display a subset of applications. Recommendation systems are used to determine which applications are displayed and their corresponding placement. When a user enters an app store, a recommendation request is triggered. Since placement space for applications is limited, when a recommendation system receives a request, it can sort all available applications by expected revenue and then select one or more of the most valuable applications to display in their respective positions. For example, in a cost-per-click (CPC) system, advertisers only pay when an application is clicked by a user. In a CPC system, an application's value is typically determined by its expected revenue. Each application's expected revenue is related to its estimated click-through rate (CTR). In this case, CTR can be understood as the probability that each application (app) will be clicked. To obtain the ranking based on expected revenue, the estimated CTR is needed.
[0087] Specifically, the estimated CTR of all applications to be displayed is determined, the expected revenue of each application is calculated based on the estimated CTR of each application and they are sorted, and the applications to be displayed and their corresponding display positions are determined based on the sorting results.
[0088] The recall and / or ranking tasks can be determined based on the recommendation methods in the embodiments of this application. For example, all applications to be displayed can be determined based on the recommendation methods in the embodiments of this application. Similarly, the ranking results of the applications can be determined based on the recommendation methods in the embodiments of this application.
[0089] Application Scenario 2: Browser Search Recommendations;
[0090] The solution in this application embodiment can be applied to the browser's search engine for browser search recommendations.
[0091] In one possible scenario, when a user performs a search, after obtaining the user's input search terms, the search engine can determine the ranking of all search results to be displayed based on factors such as the user's search history. The ranking then determines which search results will be displayed and their corresponding placement.
[0092] The recall and / or ranking tasks can be determined based on the recommendation methods in the embodiments of this application. For example, all search results to be displayed can be determined based on the recommendation methods in the embodiments of this application. Similarly, the ranking of search results can be determined based on the recommendation methods in the embodiments of this application.
[0093] In another possible scenario, when a user conducts a search, the search terms typically come from two sources: user-inputted search terms and system-recommended search terms. User-inputted search terms are a user behavior that the system cannot interfere with. System-recommended search terms refer to the search terms that are triggered when a user enters a search context. When the system receives a recommendation request, it can calculate the score of all search terms to be displayed and rank them. For example, the search term score can represent the probability of a search term being clicked. Based on the ranking result, the system can determine which search terms will be displayed and their corresponding display position.
[0094] The recall and / or ranking tasks can be determined based on the recommendation methods in the embodiments of this application. For example, all search terms to be displayed can be determined based on the recommendation methods in the embodiments of this application, and the ranking results of search terms can be determined based on the recommendation methods in the embodiments of this application.
[0095] To facilitate understanding of the solutions in the embodiments of this application, the terms that may be involved in the embodiments of this application will be explained below.
[0096] (1) Neural Networks:
[0097] Neural networks can be composed of neural units, which can refer to units represented by x. s The arithmetic unit takes an intercept of 1 as input, and its output can be:
[0098] Where s = 1, 2, ..., n, n is a natural number greater than 1, W s For x s The weights are denoted by b, where b is the bias of the neural unit.
[0099] f represents the activation function of a neural network, used to introduce nonlinear characteristics and convert the input signal into the output signal. The output signal of this activation function can be used as the input to the next layer. For example, the activation function can be ReLU, tanh, or sigmoid.
[0100] A neural network is a network formed by connecting multiple individual neural units, meaning that the output of one neural unit can be the input of another. The input of each neural unit can be connected to the local receptive field of the previous layer to extract features from the local receptive field, which can be a region composed of several neural units.
[0101] (2) Deep Neural Networks:
[0102] A deep neural network (DNN), also known as a multilayer neural network, can be understood as a neural network with multiple hidden layers. Based on the position of the layers, the internal neural network of a DNN can be divided into three categories: input layer, hidden layer, and output layer. Generally, the first layer is the input layer, the last layer is the output layer, and the layers in between are hidden layers. The layers are fully connected, meaning that any neuron in the i-th layer is connected to any neuron in the (i+1)-th layer.
[0103] Although DNNs seem complex, the operation of each layer is actually not complicated. Simply put, it involves the following linear relationship expression: in, It is the input vector. It is the output vector. is the offset vector, W is the weight matrix (also called coefficients), and α() is the activation function. Each layer is simply an adjustment of the input vector. The output vector is obtained through such a simple operation. Because DNNs have many layers, the coefficients W and the offset vector... The number of these parameters is also relatively large. The definitions of these parameters in DNNs are as follows: Taking the coefficient W as an example: Assuming a three-layer DNN, the linear coefficient from the 4th neuron in the second layer to the 2nd neuron in the third layer is defined as... The superscript 3 represents the layer number where coefficient W is located, while the subscript corresponds to the third layer index 2 of the output and the second layer index 4 of the input.
[0104] In summary, the coefficient from the k-th neuron in layer L-1 to the j-th neuron in layer L is defined as...
[0105] It's important to note that the input layer does not have a W parameter. In deep neural networks, more hidden layers allow the network to better represent complex real-world situations. Theoretically, the more parameters a model has, the higher its complexity and "capacity," meaning it can perform more complex learning tasks. Training a deep neural network is essentially the process of learning the weight matrix, with the ultimate goal of obtaining the weight matrix of all layers in the trained deep neural network (a weight matrix formed by the vectors W from many layers).
[0106] (3) Loss function:
[0107] In training a deep neural network, to ensure the output closely approximates the desired predicted value, we compare the network's prediction with the target value. Based on the difference, we update the weight vector of each layer (usually pre-configuring parameters before the initial update). For example, if the prediction is too high, the weight vector is adjusted to predict a lower value. This adjustment continues until the deep neural network predicts the target value or a value very close to it. Therefore, we need to predefine "how to compare the difference between the predicted and target values," which is the loss function or objective function. These are important equations used to measure the difference between the predicted and target values. Taking the loss function as an example, a higher output value (loss) indicates a greater difference, and training the deep neural network becomes a process of minimizing this loss.
[0108] (4) Backpropagation algorithm:
[0109] Backpropagation (BP) is an algorithm used during training to correct the parameters in the initial model, thereby reducing the model's error loss. Specifically, forward propagation of the input signal to the output generates an error loss; this error loss information is then propagated back to update the parameters in the initial model, leading to convergence of the error loss. The backpropagation algorithm is an error-loss-driven backpropagation process aimed at obtaining optimal model parameters, such as the weight matrix.
[0110] (5) Large language model:
[0111] Large Language Models (LLMs) are neural network models with a large number of parameters trained on vast corpora, capable of understanding and generating natural language text. Specifically, LLMs are typically based on neural network techniques, learning the syntax, semantics, and contextual information of a language through training on large amounts of text data. During training, the model continuously optimizes its parameters to improve its ability to understand and generate text. Due to their powerful ability to understand natural language, LLMs have been widely applied in many fields to solve natural language understanding and generation problems. LLMs have broad applications in artificial intelligence, such as natural language processing, machine translation, and dialogue systems.
[0112] (6) Click-through rate prediction (CTR prediction):
[0113] CTR prediction is a forecast of each product click based on information such as the product, the user, and the context. The accuracy of the prediction affects revenue.
[0114] The system architecture of the embodiments of this application will be described below.
[0115] Figure 1 illustrates a system architecture 100 provided in an embodiment of this application. In Figure 1, a data acquisition device 160 is used to acquire training data. For example, according to the recommended method of this application embodiment, the training data may include at least one user behavior sequence.
[0116] After collecting the training data, the data acquisition device 160 stores the training data in the database 130, and the training device 120 trains the target model / rule 101 based on the training data maintained in the database 130.
[0117] The following describes how the training device 120 obtains the target model / rule 101 based on the training data. The training device 120 processes the input raw data and compares the output value with the target value until the difference between the output value of the training device 120 and the target value is less than a certain threshold, thereby completing the training of the target model / rule 101.
[0118] The target model / rule 101 described above can be used to implement the recommended method of this application embodiment. Specifically, the target model / rule 101 in this application embodiment can be a neural network model. It should be noted that in practical applications, the training data maintained in the database 130 may not all come from the data acquisition device 160; it may also be received from other devices. Furthermore, it should be noted that the training device 120 may not necessarily train the target model / rule 101 entirely based on the training data maintained in the database 130; it may also obtain training data from the cloud or other sources for model training. The above description should not be construed as limiting the embodiments of this application.
[0119] The target model / rule 101 trained by training device 120 can be applied to different systems or devices, such as execution device 110 shown in Figure 1. Execution device 110 can be a terminal, such as a mobile terminal, tablet computer, laptop computer, augmented reality (AR) / virtual reality (VR) device, in-vehicle terminal, etc., or it can be a server or cloud device. In Figure 1, execution device 110 is configured with input / output (I / O) interface 112 for data interaction with external devices. Users can input data to I / O interface 112 through client device 140. In this embodiment, the input data can include data to be processed input by the client device.
[0120] During the preprocessing of input data by the execution device 110, for example, by preprocessing through the preprocessing module 113 and / or the preprocessing module 114, or during the calculation and other related processing by the calculation module 111 of the execution device 110, the execution device 110 may call data, code, etc. in the data storage system 150 for corresponding processing, or store the data, instructions, etc. obtained from the corresponding processing into the data storage system 150.
[0121] Finally, I / O interface 112 returns the processing result, such as the data processing result obtained above, to client device 140, thereby providing it to the user.
[0122] It is worth noting that the training device 120 can generate corresponding target models / rules 101 based on different training data for different objectives or tasks. The corresponding target models / rules 101 can be used to achieve the above objectives or complete the above tasks, thereby providing the user with the required results.
[0123] In the scenario shown in Figure 1, the user can manually provide input data, which can be done through the interface provided by I / O interface 112. Alternatively, the client device 140 can automatically send input data to I / O interface 112. If user authorization is required for the client device 140 to automatically send input data, the user can set the corresponding permissions in the client device 140. The user can view the output results of the execution device 110 on the client device 140, which can be presented in various forms such as display, sound, or animation. The client device 140 can also act as a data acquisition terminal, collecting the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130. Alternatively, data can be collected directly from the I / O interface 112 without going through the client device 140, using the input data and output results of the input I / O interface 112 as new sample data and storing them in the database 130.
[0124] It is worth noting that Figure 1 is only a schematic diagram of a system architecture provided by an embodiment of this application. The positional relationship between the devices, components, modules, etc. shown in the figure does not constitute any limitation. For example, in Figure 1, the data storage system 150 is an external memory relative to the execution device 110. In other cases, the data storage system 150 can also be placed in the execution device 110.
[0125] Figure 2 illustrates a system architecture 200 applicable to an embodiment of this application. The system architecture 200 may include a local device 220, a local device 230, an execution device 210, and a data storage system 250, wherein the local devices 220 and 230 are connected to the execution device 210 via a communication network.
[0126] For example, the execution device 210 can be a device or server with data processing capabilities, such as a cloud server, network server, application server, or management server. For instance, the execution device 210 may be implemented by one or more servers, optionally in conjunction with other computing devices, such as data storage devices, routers, load balancers, etc. The execution device 210 may be deployed on a single physical site or distributed across multiple physical sites. The execution device 210 may use data from the data storage system 250 or call program code from the data storage system 250 to implement the recommended methods of this application embodiment. The execution device 210 can also be referred to as a cloud device, in which case the execution device 210 may be deployed in the cloud.
[0127] In one possible implementation, the method executed by the aforementioned execution device 210 can be a training method executed in the cloud.
[0128] Users can interact with execution device 210 by operating their respective user devices (e.g., local device 220 and local device 230). Each local device can represent any computing device, such as a personal computer, computer workstation, smartphone, laptop, tablet, augmented reality (AR) / virtual reality (VR) device, ultra-mobile personal computer (UMPC), netbook, personal digital assistant (PDA), smart camera, smart car, other types of cellular phone, media consumption device, wearable device, set-top box, or game console, etc.
[0129] Each user's local device can interact with the execution device 210 through a communication network of any communication mechanism / standard. The communication network can be a wide area network, a local area network, a point-to-point connection, or any combination thereof.
[0130] In one implementation, local devices 220 and 230 can obtain relevant parameters of the recommendation model from execution device 210, and use the recommendation model to obtain recommendation results on local devices 220 and 230.
[0131] In another implementation, the recommendation model can be directly deployed on the execution device 210. The execution device 210 obtains recommendation requests and related information, such as user information, candidate recommendation object information and / or context information, from local devices 220 and 230, and obtains recommendation results through the recommendation model.
[0132] For example, the data storage system 250 may be deployed in local device 220 or local device 230 for storing training data of the local device.
[0133] For example, the data storage system 250 can be deployed independently on the storage device, separate from the local device 220 or the local device 230. The storage device can interact with the local device to obtain user behavior logs from the local device and store them in the storage device.
[0134] Figure 3 shows a schematic diagram of the system architecture of a recommendation system according to an embodiment of this application. The recommendation system will be described below using a click-through rate (CTR) prediction scenario as an example. In this case, the model in Figure 3 can be a recommendation model, such as a CTR prediction model. The CTR prediction model is used to predict the user's click-through rate on products to guide the system in making recommendations to the user.
[0135] As shown in Figure 3, the operation of this system can be divided into two parts: online and offline. The system can include an online prediction module and an offline training module.
[0136] In the online component, when a user enters the system, they can initiate a request (such as a recommendation request). The online prediction module can then provide a corresponding click-through rate (CTR) prediction based on relevant information, such as the user, product, and contextual information. For example, as shown in Figure 3, user, product, and contextual information can be used to generate features, which can then serve as input to the model. The online prediction module can be implemented through prediction instances. The request is sent to a prediction instance, which hosts a CTR prediction model. The CTR prediction model outputs the predicted CTR, and the recommendation system can then output recommendations based on this prediction, such as generating a list of recommended products.
[0137] For example, when a user opens the app store on a smart device (e.g., a mobile phone), it triggers the app store's recommendation system, which then initiates a recommendation request. The recommendation system can predict the probability of the user clicking to download various candidate applications based on the user's historical behavior logs, such as their download history, and the app store's own characteristics, such as environmental features like time and location. The recommendation system can then display candidate applications in descending order of predicted download probability, thereby increasing the download probability of each candidate application.
[0138] Recommendations can be fed back to users for interaction. Users browse the product list and may perform actions, such as clicking. User behavior can be recorded and stored in a log. After data processing, the log can be used as training data for an offline training model. The offline training module can train the click-through rate (CTR) prediction model using training algorithms, or in other words, update the CTR prediction model. Features generated based on user, product, and contextual information can also be used as input information in the training data. The updated CTR prediction model is then used in the online prediction module, for example, deployed in a prediction instance, and goes live, completing the entire closed loop.
[0139] A prediction instance can be understood as a computing resource or environment used to run machine learning models. For example, a prediction instance can be a virtual machine (VM), a container, container technologies (such as Docker), or a serverless function.
[0140] In the scheme of this application embodiment, user behavior data in the log can be processed to generate target interest features. The target interest features can be used as an additional feature input into the model to assist the model's prediction in the online stage and / or to optimize the training algorithm in the offline stage, i.e., to train the model, so that the system can better utilize the knowledge generated by LLM, improve the model's capabilities, and thus improve the accuracy of the model results.
[0141] User behavior sequence analysis is widely used in various tasks. User behavior modeling is a crucial factor affecting the accuracy of downstream tasks. Taking the prediction task in recommender systems as an example, user behavior modeling is a significant factor influencing the accuracy of predictions. Because LLM (Local Level Modeling) has accumulated a large amount of factual knowledge and possesses powerful reasoning capabilities, using LLM-assisted user behavior modeling can achieve a more accurate analysis of user interests.
[0142] Figure 4 illustrates a schematic diagram of user behavior modeling using LLM. Leveraging the external knowledge and reasoning capabilities of LLM, user-related textual information is input into the LLM to acquire inference and factual knowledge (as shown in the user understanding features in Figure 4). For example, this textual information may include user profiles or user behavior history. The text generated by the LLM is then converted into augmented vectors through an adapter, and these augmented vectors are used as new features in the recommendation model.
[0143] However, LLM still has some limitations when used for user behavior modeling. For example, this approach suffers from insufficient understanding of long user behavior sequences. Specifically, it can only input shorter user behavior sequences into the LLM; when longer sequences are input, the LLM's processing performance deteriorates. Furthermore, this approach struggles to handle the variability of user behavior sequences. User behavior is constantly changing, requiring a re-invocation of the LLM for each change, but the high computational complexity of the LLM impacts overall processing efficiency.
[0144] In view of this, the embodiments of this application provide a recommendation method that utilizes LLM to better model user behavior and better utilizes the external knowledge and reasoning capabilities of LLM to assist the recommendation system, thereby helping the recommendation system achieve better recommendation results. At the same time, the solution of the embodiments of this application helps to ensure overall processing efficiency and avoids the computational burden caused by too many LLM calls.
[0145] Figure 5 is a schematic diagram of a device 500 for processing user behavior data according to an embodiment of this application. To better understand the method in this embodiment, the functions of each module in Figure 5 are briefly described below. The device 500 can be deployed on a cloud server, on a terminal device, or on both a cloud server and a terminal device.
[0146] As shown in Figure 5, the device 500 may include a user behavior streaming partition module 510, a user interest learning module 520, and a user interest fusion module 530.
[0147] The user behavior streaming segmentation module 510 is used to divide the user's behavior sequence into multiple segments.
[0148] The purpose of this module is to divide the user's behavior sequence into shorter, manageable chunks.
[0149] The above process can be incremental. As shown in Figure 5, the user behavior streaming segmentation module 510 can divide the data based on the user behavior streaming to construct segments. The user behavior streaming includes multiple behavioral data acquired in chronological order. If the acquired behavioral data meets the preset condition #1, the user behavior streaming segmentation module 510 can use the acquired behavioral data to construct segments.
[0150] The User Interest Learning Module 520 is used to extract user interest information from each segment using LLM.
[0151] User interest information can include a user interest summary. A user interest summary can also be called an interest summary or interest summary knowledge, etc.
[0152] LLM can be used to analyze user interests to generate summaries of user interests.
[0153] Taking a segment as an example, the user interest learning module 520 can extract a summary of user interests from the segment through LLM, that is, obtain a summary of user interests for the segment.
[0154] Furthermore, optionally, the user's interest information may also include user interest shifts. User interest shifts are used to indicate changes in a user's interests. User interest shifts can also be referred to as interest shift information or interest shift knowledge.
[0155] LLM can be used to identify changes in user interests, that is, the differences between a user's current interests and their previous interests. For example, summaries of previous and current user interests can be provided to an LLM, which will then output the changes in user interests.
[0156] For example, the user interest learning module 520 can use LLM to extract user interest information in a cascading manner.
[0157] Taking a segment as an example, the user interest learning module 520 can extract a summary of user interests from the segment through LLM, that is, obtain a summary of user interests for the segment. Then, it can analyze the changes in user interests based on the summary of user interests for the segment and the summary of user interests for other segments through LLM, so as to obtain the changes in user interests for the segment.
[0158] The user interest aggregation module 530 is used to determine target interest features based on one or more interest information obtained from the user interest learning module 520.
[0159] For example, the user interest aggregation module 530 can be used to encode the interest information of each block obtained by the user interest learning module 520 to obtain the interest representation of each block.
[0160] If the number of blocks is 1, the interest representation of that block can be used as the target interest representation. Furthermore, if the number of blocks is greater than 1, the user interest aggregation module 530 can also be used to fuse the interest representations of each block to obtain a fused interest representation. This fused interest representation can be used as the target interest feature.
[0161] Target interest features can be used in downstream task models to improve the performance of downstream tasks.
[0162] For a detailed description of each module in device 500, please refer to method 600 shown in Figure 6.
[0163] Figure 6 illustrates a method for processing user behavior data provided in an embodiment of this application. The method 600 shown in Figure 6 can be executed by a cloud server, by a terminal device, or by a combination of both.
[0164] For example, the method 600 shown in FIG6 can be performed by the apparatus shown in FIG5.
[0165] As shown in Figure 6, method 600 may include the following steps.
[0166] 610. Construct n1 first blocks based on the first action sequence. The first action sequence includes multiple action data points of the user, and each of the n1 first blocks is based on one or more action data points from the first action sequence. n1 is a positive integer.
[0167] 620. Using LLM, n1 pieces of first interest information are extracted from each of the n1 first blocks. These n1 pieces of first interest information are used to determine the first target interest feature. The first target interest feature is used in the downstream task model.
[0168] Each of the n1 first interest information items corresponds one-to-one with each of the n1 first blocks.
[0169] Optionally, method 600 may also include step 601.
[0170] 601, Obtain User Behavior Stream. The user behavior stream includes multiple behavior data of the user obtained in chronological order. The first behavior sequence includes multiple behavior data from the user behavior stream.
[0171] Step 610 may include: if the first row sequence satisfies preset condition #1, constructing n1 first blocks based on the first row sequence.
[0172] For example, step 601 can be performed by the user behavior streaming chunking module 510.
[0173] Behavioral data in a user behavior stream can be used as elements in a behavior sequence (such as the first behavior sequence). The user behavior stream includes continuously arriving new behavioral data, which can be added to the behavior sequence, i.e., new behavioral data becomes elements of the behavior sequence. Thus, the behavioral data in the behavior sequence is behavioral data arranged in chronological order. Behavioral data can also be replaced with other descriptions such as user actions.
[0174] User behavior data refers to the records of user interactions with the system.
[0175] For example, the system can be a system used to perform downstream tasks.
[0176] The following example uses downstream tasks as recommended tasks to illustrate user behavior data.
[0177] This system can be a recommendation system. The recommendation task can be a prediction task within the recommendation system, such as click-through rate prediction. User behavior data refers to the records of user interactions with the recommendation system. For example, actions can include clicks, purchases, favorites, ratings, downloads, and any other interaction between the user and recommended items (such as products, articles, videos, etc.).
[0178] For example, user behavior data may include one or more of the following information: behavior type, timestamp, target object, or context information.
[0179] The behavior type refers to the specific action performed by the user, such as browsing, liking, or purchasing. The timestamp records the time when the user performed the action. The target object refers to the specific item or content ID that the user's action targeted. Contextual information can include the user's current situation, such as device type, geographical location, and weather conditions.
[0180] It should be understood that the above are merely examples of behavioral data and do not constitute a limitation on the specific content of behavioral data. Furthermore, this system may not necessarily be a system that performs downstream tasks; that is, behavioral data obtained from user interactions with other systems can be used in downstream tasks.
[0181] The term "first" in "first behavior sequence," "first block," and "first interest information" is for descriptive convenience only and has no other limiting function. A behavior sequence that has not yet been used to construct a block can be used as the first behavior sequence. A block constructed based on the first behavior sequence is the first block. The interest information extracted from the first block is the first interest information.
[0182] For example, step 610 can be performed by the user behavior streaming chunking module 510.
[0183] In this embodiment of the application, blocks can also be replaced with partitions.
[0184] The process of constructing blocks is explained below.
[0185] For example, constructing blocks based on a behavior sequence may include: dividing multiple behavior data in the behavior sequence to obtain one or more blocks. These one or more blocks are the one or more partitioning results obtained from the division, and in this case, each block may include multiple behavior data from the behavior sequence.
[0186] For example, taking the first row sequence as an example, each first block may include multiple rows of data in the first row sequence.
[0187] Different blocks include at least two different behavioral data. The union of behavioral data in one or more blocks constructed based on a certain behavioral sequence may include all behavioral data in the behavioral sequence, or it may include some behavioral data in the behavioral sequence. This application embodiment does not limit this.
[0188] Alternatively, constructing blocks based on behavior sequences may include: dividing multiple behavior data in the behavior sequence, and processing one or more partitioning results to obtain one or more blocks.
[0189] That is, after dividing multiple behavioral data, the division results can be further processed and the processed results can be used as blocks.
[0190] The number of blocks constructed each time can be a fixed value or a variable value.
[0191] Preset condition #1 can also be understood as the condition for constructing a new block.
[0192] If the behavior sequence does not meet the preset condition #1, no new block will be built based on the behavior sequence. New behavior data will be continuously acquired and added to the behavior sequence until the behavior sequence meets the preset condition #1, and then a new block will be built based on the behavior sequence.
[0193] Preset condition #1 can be set as needed.
[0194] For example, the preset condition #1 may include one or more of the following: time-related conditions, space-related conditions, or model-based conditions.
[0195] The following provides an example of time-related conditions.
[0196] Time-related conditions can be understood as conditions for determining whether a behavior sequence can be used to construct a new block by using time factors related to the behavior sequence (such as the time of acquisition of behavior data).
[0197] For example, a time-related condition could be that the earliest acquired behavioral data in the behavioral sequence is acquired at a time greater than or equal to a threshold #1 from the current time. That is, if the earliest acquired behavioral data in the current behavioral sequence is acquired at a time greater than or equal to a threshold #1 from the current time, then the current behavioral sequence satisfies the preset condition #1, and one or more blocks are constructed based on this behavioral sequence.
[0198] For example, a time-related condition could be that the acquisition time of the earliest acquired behavior data and the acquisition time of the latest acquired behavior data in the behavior sequence are greater than or equal to threshold #2. That is, if the acquisition time of the earliest acquired behavior data and the acquisition time of the latest acquired behavior data in the behavior sequence are greater than or equal to threshold #2, then the current behavior sequence satisfies preset condition #1, and one or more blocks are constructed based on this behavior sequence.
[0199] The acquisition time of the behavioral data can be the reception time of the behavioral data, for example, the time when device 500 receives the behavioral data. Alternatively, the acquisition time of the behavioral data can be indicated by the timestamp in the behavioral data. Or, the acquisition time of the behavioral data can be the time when it is added to the behavioral sequence.
[0200] The above are merely examples; time-related conditions can be set to other conditions as well, and this application does not limit this.
[0201] The following provides an example of space-related conditions.
[0202] Space-related conditions can be understood as conditions for determining whether a behavior sequence can be used to construct a new block by using spatial factors (such as the amount of behavior data) related to the behavior sequence.
[0203] For example, a space-related condition could be that the number of behavioral data in the behavioral sequence is greater than or equal to threshold #3 (an example of the first threshold). That is, if the number of behavioral data in the current behavioral sequence is greater than or equal to threshold #3, then the current behavioral sequence satisfies preset condition #1, and one or more blocks are constructed based on this behavioral sequence.
[0204] Taking the first line sequence as an example, step 610 may include: if the number of line data in the first line sequence is greater than or equal to a set threshold #3, construct one or more first blocks based on the first line sequence.
[0205] The number of behavioral data in a behavioral sequence is the number of behaviors in the behavioral sequence, or it can be replaced by the length of the behavioral sequence, etc.
[0206] The above are merely examples; other conditions related to space can also be set, and this application does not limit this.
[0207] The following provides an example of model-based conditions.
[0208] Model-based conditions can be understood as adaptive conditions, which refer to using a model to determine whether a sequence of behaviors can be used to construct a new block.
[0209] For example, the input to the model may include information such as the acquisition time of the behavioral data in the behavioral sequence, the amount of behavioral data, and the system resource usage, and the model will determine whether the current behavioral sequence meets the preset condition #1.
[0210] The above are merely examples; the input to the model may also include other information, and this application does not limit this.
[0211] In addition, the aforementioned time-related conditions, space-related conditions, and model-based conditions can also be used in combination as preset condition #1.
[0212] Taking a combination of time-related and space-related conditions as an example, preset condition #1 could be that the earliest acquired action data in the action sequence is acquired at a time greater than or equal to threshold #1 from the current time, or that the number of action data in the action sequence is greater than or equal to threshold #3. That is, if the earliest acquired action data in the current action sequence is acquired at a time greater than or equal to threshold #1 from the current time, or if the number of action data in the current action sequence is greater than or equal to threshold #3, then the current action sequence satisfies preset condition #1, and one or more blocks are constructed based on this action sequence; otherwise, the current action sequence does not satisfy preset condition #1.
[0213] The solution in this application embodiment can be continuously executed to achieve continuous updating of target interest features.
[0214] Optionally, method 600 may also include steps 630 and 640 (not shown in the figure).
[0215] 630. Construct n² second blocks based on the second action sequence. The second action sequence includes multiple action data points of the user. Each of the n² second blocks is based on one or more action data points from the second action sequence. The multiple action data points in the second action sequence are obtained after the multiple action data points in the first action sequence. n² is a positive integer.
[0216] 640. Using LLM, n² second interest information points are extracted from each of the n² second blocks. These n² second interest information points are used to determine the second target interest features. The second target interest features are then used to replace the first target interest features used by the downstream task model.
[0217] Each of the n² second interest information items corresponds one-to-one with each of the n² second blocks.
[0218] The terms "first" and "second" in "first behavior sequence" and "second behavior sequence" are used only to distinguish between two different behavior sequences. At least some of the behavior data in these two behavior sequences differ.
[0219] For a detailed description of the second behavior sequence, please refer to the descriptions of "behavior sequence" and "first behavior sequence" in the previous text. To avoid repetition, some descriptions will be omitted when explaining the second behavior sequence.
[0220] For example, multiple action data in the second action sequence are obtained after multiple action data in the first action sequence. This can be understood as at least some action data in the second action sequence being obtained after the latest action data obtained in the first action sequence.
[0221] Alternatively, multiple action data in the second action sequence are obtained after multiple action data in the first action sequence. This can be understood as all action data in the second action sequence being obtained after the latest action data obtained in the first action sequence.
[0222] Optionally, the second behavior sequence may include multiple behavior data from the user behavior stream. Step 630 may include: if the second behavior sequence satisfies preset condition #1, constructing n2 second blocks based on the second behavior sequence.
[0223] For example, step 630 can be performed by the user behavior streaming chunking module 510.
[0224] Behavioral data in a user behavior stream can serve as elements in a behavior sequence. A user behavior stream consists of continuously arriving new behavioral data, which is added to one or more behavior sequences. For example, as new behavioral data arrives, it can be added to one or more behavior sequences until one of those sequences is used to build a chunk, after which new behavioral data is added to other behavior sequences outside of that sequence, and so on.
[0225] Taking the first and second line sequences as examples, as new line data arrives, the new line data becomes an element in the first and / or second line sequences.
[0226] Figure 7 illustrates the first and second behavior sequences. As shown in Figure 7, the behavior data in the user behavior stream, acquired in the order from earliest to latest, includes {b1, b2, ..., b...} k ,b k+1 …b i-1 ,b i …}。 b k This represents the k-th action data in the user action stream, where k is a positive integer less than i. iLet represent the i-th action data in the user action flow, where i is a positive integer. For example, as shown in Figure 7(a), as new action data arrives, it can be used as an element of the first action sequence until the first action sequence is used to construct the first block, after which the new action data becomes an element of the second action sequence. In this way, there is no duplicate action data in the first and second action sequences. Similarly, as shown in Figure 7(b), as new action data arrives, the first arriving action data becomes an element of the first action sequence, and the subsequent arriving action data can become an element of both the first and second action sequences until the first action sequence is used to construct the first block, after which the subsequent arriving action data can become an element of the second action sequence and other action sequences. In this way, there is some duplicate action data in the first and second action sequences.
[0227] The term "second" in "second block" and "second interest information" is for descriptive convenience only and has no other limiting effect. The block constructed based on the second action sequence is the second block. The interest information extracted from the second block is the second interest information.
[0228] The construction method of the second block and the relevant content of preset condition #1 can be found in the previous text. To avoid repetition, they will not be repeated here.
[0229] n1 and n2 can be the same or different. That is, for different action sequences, the same number of blocks can be constructed, or different numbers of blocks can be constructed. This application does not limit this. For ease of description, this application mainly uses n1 = n2 = 1 as an example for illustration, and does not constitute a limitation on the scheme of this application embodiment.
[0230] According to the scheme of this application embodiment, as new behavioral data is continuously acquired, the length of the behavioral sequence also increases, or in other words, the number of behavioral data in the behavioral sequence also increases. When the behavioral sequence meets certain conditions, blocks are constructed based on the behavioral data in the sequence. The user's interest information is extracted from each block using the external knowledge and reasoning capabilities of the LLM. This helps limit the amount of behavioral data in each block and avoids the LLM being directly used to process extremely long user behavioral sequences, thus ensuring the accuracy of the interest information provided by the LLM. Simultaneously, calling the LLM to extract interest information from the newly constructed blocks reduces the number of LLM calls, thereby reducing computational overhead and ensuring processing efficiency. Specifically, in the scheme of this application embodiment, the LLM is only called after a new block is constructed, rather than every time user behavior changes, which helps reduce the number of LLM calls.
[0231] Furthermore, as behavioral data continues to arrive, new segments can be constructed under preset conditions. Interest information from these new segments can be used to determine new target interest features to replace the target interest features used in the downstream task model. The new target interest features are more in line with the user's current interests, which helps to continuously provide accurate interest analysis results to the downstream task model, thereby helping to continuously ensure the accuracy of the processing results of the downstream task model.
[0232] Furthermore, the behavioral data in the behavioral sequence comes from the first region.
[0233] The first area is used to store behavioral data from the user behavior stream. In other words, as new behavioral data arrives, it can be stored in the first area first.
[0234] For example, method 600 can be performed by device 500, the first region can be located in device 500, or it can be set up independently of device 500.
[0235] For example, the first area can be a cache.
[0236] As one possible implementation, the behavior data in the behavior sequence can be all the behavior data in the first region. When the behavior sequence is used to construct blocks, some or all of the behavior data in the first region is cleared.
[0237] In other words, the current behavior sequence is the sequence of all behavior data stored in the first region. Adding new behavior data to the first region can be considered as adding that behavior data to the behavior sequence. Using the clearing of behavior data in the first region as a dividing line, the behavior sequence formed by the behavior data in the first region before the clearing operation and the behavior sequence formed by the behavior data in the first region after the clearing operation and before the next clearing operation are different behavior sequences.
[0238] Upon receiving new behavioral data, it can be stored in the first region until the behavioral data in the first region meets preset condition #1, at which point a new block is constructed based on the behavioral data in the first region. After each new block is constructed, some or all of the behavioral data in the first region can be cleared.
[0239] The following explanation uses the first and second row sequences as examples.
[0240] The multiple action data in the first action sequence constitute all action data in the first region. Method 600 may further include: if n1 first blocks are constructed based on the first action sequence, performing a cleanup operation on the first region to remove some or all of the action data in the first region. The multiple action data in the second action sequence constitute all action data in the first region after the cleanup operation.
[0241] Method 600 may further include: in the case of constructing n2 second blocks based on the second action sequence, clearing some or all of the action data in the first region.
[0242] For example, the above steps can be performed by the user behavior streaming segmentation module 510.
[0243] In this case, steps 610 and 630 can be understood as follows: As new behavioral data arrives, it is stored in the first region until the behavioral data in the first region meets the preset condition #1, or in other words, until the behavioral sequence (such as the first behavioral sequence) formed by the behavioral data in the first region meets the preset condition #1. One or more blocks (such as the first block) are constructed based on the behavioral data in the first region, and some or all of the behavioral data in the first region are cleared. The above process is repeated, that is, new behavioral data is received and stored in the first region until the behavioral data in the first region meets the preset condition #1 again, or in other words, until the behavioral sequence (such as the second behavioral sequence) formed by the behavioral data in the first region meets the preset condition #1. One or more blocks (such as the second block) are constructed based on the behavioral data in the first region, and some or all of the behavioral data in the first region are cleared again.
[0244] For example, the behavioral data in the first region can be considered as short-term behavior. For instance, the first region can be called a short-term behavior cache. The first region is used to store the history of short-term behaviors.
[0245] As another possible implementation, the behavioral data in the behavioral sequence can be a portion of the behavioral data in the first region.
[0246] Furthermore, the blocks can be stored in a second region.
[0247] The second area is used to store the constructed blocks. Or, in other words, one or more blocks are constructed based on behavioral data in the second area.
[0248] For example, the n1 first blocks can be stored in the second region.
[0249] For example, the n2 second blocks can be stored in the second region.
[0250] For example, the second region can be memory.
[0251] For example, the behavioral data (or chunks) in the second region can be viewed as long-term behavior. For instance, the second region can be referred to as long-term behavioral memory.
[0252] In the scheme of this application embodiment, when new behavioral data is obtained, the behavioral data can first be stored in a first region (such as cache). If the behavioral data in the first region meets certain conditions, a new block is constructed in a second region (such as memory) based on the behavioral data in the first region, and the behavioral data in the first region is cleared. That is, in this application embodiment, the user behavior stream, i.e., the lifetime behavior sequence, can be divided into short-term behavior cache and long-term behavior memory in a streaming manner. Based on the cache-memory block structure, the streaming update of target interest features is realized.
[0253] Target interest features can be understood as the target interest features corresponding to one or more newly constructed blocks. Specifically, after constructing one or more blocks based on the behavior sequence, target interest features can be determined based on these one or more blocks; these target interest features are the target interest features corresponding to these one or more blocks. For example, the first target interest feature is the target interest feature corresponding to the first block, and the second target interest feature is the target interest feature corresponding to the second block.
[0254] Target interest features can be determined based on one or more interest information pieces. This one or more interest information pieces can include interest information generated based on one or more newly constructed blocks.
[0255] The "first target interest feature" and "second target interest feature" are only used to distinguish the target interest features generated in the two instances and have no other limiting function.
[0256] Taking the first target interest feature as an example, as mentioned above, n1 pieces of first interest information are used to determine the first target interest feature.
[0257] In other words, the first target interest feature can be determined based on one or more interest information pieces. These one or more interest information pieces include at least one of the n1 first interest information pieces.
[0258] For example, the first target interest feature may include some or all of the first interest information from the n1 pieces of first interest information. Alternatively, the n1 pieces of first interest information are used to generate the first target interest feature, that is, the first target interest feature may be generated based on at least one piece of first interest information from the n1 pieces of first interest information.
[0259] Taking the second target interest feature as an example, as mentioned above, n2 pieces of second interest information are used to determine the second target interest feature.
[0260] In other words, the second target interest feature can be determined based on one or more pieces of interest information. This one or more pieces of interest information includes at least one of the n² pieces of second interest information.
[0261] For example, the second target interest feature may include some or all of the n² second interest information. Alternatively, the n² second interest information may be used to generate the second target interest feature, that is, the second target interest feature may be generated based on at least one of the n² second interest information.
[0262] Furthermore, optionally, the target interest features can be determined based on multiple interest information, which may include interest information generated based on one or more newly constructed blocks and previously generated interest information.
[0263] Taking the second target interest feature as an example, the second target interest feature can be determined based on multiple interest information. These multiple interest information include at least one second interest information among the n2 second interest information and at least one first interest information among the n1 first interest information.
[0264] It should be understood that the first interest information is used here only as an example of interest information generated before the second interest information, and does not constitute a limitation on the solution of the embodiments of this application. For example, the multiple interest information used to determine the second target interest feature may also include other interest information generated before the second interest information, in addition to the first interest information.
[0265] The following example illustrates the interest information involved in generating target interest features.
[0266] For example, if the behavior data in the cache meets preset condition #1, multiple blocks #1 are constructed, and the behavior data in the cache is cleared. As new behavior data continues to arrive, if the behavior data in the cache meets preset condition #1, multiple blocks #2 are constructed, and the behavior data in the cache is cleared. As new behavior data continues to arrive, if the behavior data in the cache meets preset condition #1, multiple blocks #3 are constructed. The target interest feature corresponding to block #3 can be determined based on multiple interest information, which can be interest information generated based on the multiple blocks #3 and interest information generated based on the multiple blocks #2. Alternatively, the multiple interest information can be interest information generated based on the multiple blocks #3 and interest information generated based on the multiple blocks #1. Or, the multiple interest information can be interest information generated based on the multiple blocks #3, interest information generated based on the multiple blocks #2, and interest information generated based on the multiple blocks #1.
[0267] After each new block is constructed (such as the second block), the interest information generated based on the new block (such as the second interest information) and one or more previously generated interest information (such as the first interest information and / or other interest information) can be used together to generate new target interest features (such as the second target interest feature) to update the previously generated target interest features (such as the first target interest feature).
[0268] For example, the multiple interests used to determine the target interest features may include interest information generated based on one or more newly constructed blocks and all previously generated interest information.
[0269] That is, the interest information of all blocks is used to determine the target interest features corresponding to the newly constructed blocks.
[0270] For example, when a new block appears in the second region, interest information can be generated based on that block, and the target interest features can be determined based on the interest information of all blocks in the current second region.
[0271] Alternatively, the multiple interests used to determine the target interest features may include interest information generated based on one or more newly constructed blocks and previously generated partial interest information.
[0272] For example, when a new block appears in the second region, interest information can be generated based on that block, and target interest features can be determined based on the interest information of some blocks in the current second region.
[0273] The previously generated interest information can be used to determine the target interest features if the preset condition #2 is met.
[0274] In other words, an elimination mechanism can be set up to eliminate some of the interest information generated previously. The eliminated interest information will not be used to determine the target interest features corresponding to the newly constructed blocks.
[0275] Taking the second target interest feature as an example, the second target interest feature can be determined based on multiple interest information. These multiple interest information include at least one second interest information among the n2 second interest information pieces and at least one first interest information among the n1 first interest information pieces. Wherein, the at least one first interest information piece satisfies preset condition #2.
[0276] For ease of description, only the first interest information is used as an example in the embodiments of this application, and does not constitute a limitation on the solution of the embodiments of this application. Other interest information that meets the preset condition #2 can also be used to determine the second target interest feature.
[0277] Preset condition #2 can be set as needed.
[0278] As an example, preset condition #2 can be a time-related condition. For instance, preset condition #2 could be that the time when the interest information was generated is less than or equal to threshold #4 from the current time.
[0279] Taking the second target interest feature as an example, for instance, if the time when at least one piece of first interest information was generated is less than or equal to a threshold #4 from the current time, the interest information used to determine the second target interest feature may include the at least one piece of first interest information.
[0280] As another example, preset condition #2 can be a spatially related condition. For instance, preset condition #2 could be that the generation time of the interest information used to determine the target interest feature among the previously generated interest information is closest to the current time, and the number of interest information used to determine the target interest feature among the previously generated interest information is less than or equal to threshold #5. Alternatively, it can be understood as the interest information belonging to the M interest information whose generation time is closest to the current time among the previously generated interest information, where M is a positive integer. M is threshold #5.
[0281] Taking the second target interest feature as an example, the interest information used to determine the second target interest feature can include the interest information generated before the second interest information, the M interest information that are closest to the current time when the generation time is, and if at least one first interest information belongs to the M interest information, then the at least one first interest information can be used to determine the second target interest feature.
[0282] According to the above scheme, only interest information that meets the preset conditions can participate in the construction of target interest features, which is equivalent to setting an elimination mechanism. This helps to make the target interest features better reflect the user's current interests, that is, to further improve the accuracy of the target interest features.
[0283] It should be understood that the above explanation only uses the update of target interest features after constructing the second block as an example. The update of target interest features after constructing other blocks can refer to the above process. For example, after constructing n1 first blocks, if there are other blocks in the second region, the first target interest feature can also be generated by combining the interest information generated based on the other blocks and the first interest information.
[0284] Alternatively, the target interest features can be determined based on one or more interest information pieces. This one or more interest information pieces can be interest information generated based on one or more newly constructed blocks.
[0285] Taking the second target interest feature as an example, the second target interest feature can be determined based on one or more interest information, where the one or more interest information is at least one of the n² second interest information. That is, the interest information used to generate the second target interest feature can include only the second interest information and exclude the first interest information.
[0286] In this case, after each new block (such as the second block) is constructed, a new target interest feature (such as the second target interest feature) is generated only based on the interest information generated by the new block (such as the second interest information) to update the previously generated target interest feature (such as the first target interest feature). The previously generated interest information (such as the first interest information) does not participate in the construction of the new target interest feature.
[0287] In the scheme of this application embodiment, as new behavioral data is continuously acquired, new blocks can be constructed. New interest information is extracted from the new blocks through LLM, and the user's target interest features are updated based on the new interest information and the previous interest information, so as to realize the incremental capture and streaming update of the user's lifelong interests, which is conducive to further improving the accuracy of user interest analysis results.
[0288] For example, step 620 can be performed by the user interest learning module 520.
[0289] For example, step 640 can be performed by the user interest learning module 520.
[0290] As mentioned earlier, after constructing a new chunk, the LLM can be invoked to extract interest information from the new chunk.
[0291] The generation methods for interest information are explained below. The generation methods for first and second interest information are similar; for ease of description, no distinction will be made between the two when describing the generation methods of interest information.
[0292] Optionally, interest information may include interest summaries. The interest summaries for each segment can be understood as summaries of user interests based on those segments.
[0293] Interest summary can also be replaced with interest summary, preference summary, or preference summary, etc.
[0294] Interest summaries can also be called interest-based knowledge summaries.
[0295] LLMs can be used to summarize user interests. In this embodiment, one or more LLMs can be used to summarize user interests. The LLMs in this embodiment can be of any structure.
[0296] Taking a segment as an example, the LLM extracts an interest summary from that segment. Or, in other words, the LLM summarizes the user's interests based on that segment to obtain the interest summary for that segment.
[0297] As an example, a segment's interest summary can be determined based on that segment and relevant factors in the dataset.
[0298] For example, the dataset may include the target object in the behavioral data of the segment. The relevant factors of the dataset can also be understood as the attribute information of the dataset, or the attribute information of the elements in the dataset. That is, summarizing user interests from the perspective of the attribute information of the target object within the segment.
[0299] For example, user behavior data could be records of user interactions with a video playback platform. User behavior data could include user movie viewing data, with the target object in the behavior data potentially being movies. The dataset could include movies watched by the user. The dataset's attribute information could include at least one of the following: genre, director, actors, rating, or year. For instance, considering factors such as genre, director, or actors, user interests could be summarized from the segments.
[0300] For example, the relevant factors of each segment and the dataset corresponding to each segment can be input into the LLM through prompt templates, and the LLM can summarize the user's interests.
[0301] For example, taking a chunk as an example, here is an example of cue words used for summarizing interests:
[0302] The following is a list of the user's movie viewing history over time: Movie #a (1981) (5 stars), Movie #b (1994) (4 stars)... Analyzing user preferences for movies (considering factors such as genre and director).
[0303] For example, the first interest information may include a first interest summary. Step 620 may include: extracting n1 first interest summaries from n1 first blocks respectively using LLM.
[0304] For example, the second interest information may include a second interest summary. Step 640 may include: extracting n2 second interest summaries from each of the n2 second blocks using an LLM.
[0305] Furthermore, optionally, the interest information may also include interest change information. Interest change information is used to indicate changes in a user's interests. For example, interest change information may be used to indicate changes in a user's interests based on different segment summaries.
[0306] Information about changes in interests can also be called knowledge about changes in interests.
[0307] LLMs can be used to identify changes in a user's interests. In this application embodiment, one or more LLMs can be used to identify changes in a user's interests.
[0308] Taking a block as an example, LLM extracts an interest summary from that block and then generates interest transition information based on this interest summary and previous interest summaries. The previous interest summaries are those extracted by LLM from previously constructed blocks.
[0309] For example, LLM can be used to extract information of interest from each block in a cascading manner.
[0310] As an example, interest transition information for a segment can be determined based on the interest summary of that segment, the interest summaries of previously constructed segments, and relevant factors in the dataset.
[0311] The interest summary of the previously constructed chunk can be the interest summary of one or more previously constructed chunks.
[0312] For example, the interest summary of this segment, the interest summary of the previously constructed segment, and the relevant factors of the dataset can be input into the LLM through the prompt word template, and the LLM can analyze the changes in the user's interests.
[0313] For example, taking a segment as an example, an example of a cue word template used for interest change analysis is shown below:
[0314] User's previous description: {……}, User's current description: {……}. Does the user's current description contain any new preferences that differ from the user's previous description? If so, list these movie preferences (considering factors such as genre, director, etc.).
[0315] Enter a summary of the user's previous interests in the "Previous User Description" field, and enter a summary of the user's current interests in the "Current User Description" field.
[0316] For a given chunk, a "previously constructed chunk" can be a chunk whose behavioral data was acquired before the acquisition time of the behavioral data within that chunk. In this case, the previously constructed chunk and the current chunk may be constructed based on different behavioral sequences, or they may be constructed based on the same behavioral sequence.
[0317] Alternatively, "previously constructed chunks" can also refer to chunks constructed before this construction of one or more chunks. In this case, the previously constructed chunks and this chunk are constructed based on different sequences of actions.
[0318] Taking the second segment as an example, the second interest information may include second interest summaries and second interest transition information. Step 640 may also include: generating n2 second interest transition information based on at least one of the n2 second interest summaries and n1 first interest summaries using LLM.
[0319] Taking n1=n2=1 as an example, the blocks constructed before the second block can include the first block. For example, the second interest transition information can be determined based on the second interest summary and the first interest summary.
[0320] Taking n² > 1 as an example, the n² second blocks are arranged in ascending order of the acquisition time of the behavioral data they contain: block #a, block #b, block #c, ... Blocks constructed before block #a may include the first block, and the second interest transition information of block #a can be determined based on the second interest summary and the first interest summary of block #a. Blocks constructed before block #b may include block #a and the first block, and the second interest transition information of block #b can be determined based on the second interest summary of block #b and at least one of the second interest summary or the first interest summary of block #a, and so on.
[0321] It should be understood that the examples provided are not intended to limit the solutions of the embodiments of this application. For example, the blocks constructed before the second block may also include other blocks, and the second interest transition information may be generated based on the second interest summary and other interest summaries generated before the second interest summary, excluding the first interest summary.
[0322] The interest transition information for the first block can also be determined by referring to the generation method of the interest transition information for the second block. To avoid duplication, it will not be elaborated here.
[0323] For the first constructed chunk (referred to as the first chunk), since there is no interest summary for the previously constructed chunks, its interest transition information can be set as needed. For example, the interest transition information for the first chunk can be set to "empty". Alternatively, the interest transition information for the first chunk can be set to a default value, such as the default embedding. Another option is for the user to input an interest summary, treating the user-inputted interest summary as the interest summary prior to the first chunk, and using LLM to determine the interest transition information.
[0324] For different segments, the types of content in their interest information can be the same or different.
[0325] For example, the information type in the first interest information may include interest summaries but excludes interest change information, while the information type in the second interest information may include both interest summaries and interest change information.
[0326] Users' interests change. Each action in a user's behavioral sequence is not equal. In response to these changes in user interests, this application, based on a progressive LLM paradigm, captures the long-term evolution of user interests through intra-block interest summarization and inter-block interest transitions. This approach helps to better capture changes in user interests, thereby facilitating a more accurate understanding of users' lifelong interests.
[0327] Target interest features can be used in downstream task models, i.e., for downstream tasks.
[0328] The form of target interest features can be determined based on the form required by the downstream task model, so as to integrate user interest information into the processing of downstream tasks.
[0329] For example, the interest information output by LLM can be in text form.
[0330] In one possible implementation, the target interest features can be in text form.
[0331] For example, downstream task models can accept textual input, and target interest features can be used as an additional input to the downstream task model.
[0332] As mentioned earlier, target interest features can be determined based on one or more pieces of interest information. For example, target interest features may include some or all of the one or more pieces of interest information. Alternatively, target interest features may be obtained by summarizing multiple pieces of interest information. The methods for determining the one or more pieces of interest information used to determine target interest features can be found above and will not be repeated here.
[0333] Taking the first target interest feature as an example, the first target interest feature may include some or all of the n1 first interest information; for example, if n1=1, the first target interest feature may include the first interest information; if n1>1, the first target interest feature may be obtained by summarizing the n1 first interest information.
[0334] Taking the second target interest feature as an example, the second target interest feature may include some or all of the n2 second interest information; or, the second target interest feature may be obtained by summarizing at least one second interest information from the n2 second interest information and at least one first interest information from the n1 first interest information.
[0335] The above are just examples. For relevant descriptions of interest information used to determine the first target interest feature and interest information used to determine the second target interest feature, please refer to the previous text. They will not be repeated here.
[0336] In another possible implementation, the target interest features can be in the form of a representation vector.
[0337] For example, the downstream task model can receive input in the form of a representation vector, and the target interest feature can be used as an additional input to the downstream task model.
[0338] For example, generating target interest features based on one or more interest information can be performed by the user interest aggregation module 530.
[0339] The following example illustrates how to generate target interest features based on interest information.
[0340] For example, one or more pieces of interest information can be encoded separately using an encoder to obtain one or more interest representations. If only one piece of interest information exists, for example, if the second region currently includes only one block, then the interest representation corresponding to that interest information can be used as the target interest feature. For multiple pieces of interest information, the multiple interest representations corresponding to those multiple pieces of interest information can be fused, and the fusion result can be used as the target interest feature.
[0341] An encoder is used to convert / encode textual information into a dense (compact) representation, namely, a representation vector. Specifically, an encoder can encode interest information to obtain a representation vector, which is the interest representation corresponding to that interest information.
[0342] For example, the encoder could be a knowledge encoder.
[0343] The encoder can also be replaced with a language model, etc. For example, the encoder can be a bidirectional encoder representations from Transformers (BERT) model.
[0344] The fusion of multiple interest representations can be achieved in a variety of ways.
[0345] For example, the fusion of multiple interest representations can be achieved by calculating the average of the multiple interest representations or by summing the multiple interest representations.
[0346] Optionally, the fusion of multiple interest representations can be achieved through a self-attention mechanism.
[0347] The fusion of multiple interest representations based on the self-attention mechanism can be achieved by integrating interest representations from different blocks through an attention fuse layer.
[0348] The following explanation uses the example of generating the first target interest feature, which only includes the first interest information.
[0349] The first target interest feature can be determined based on at least one first interest representation. This at least one first interest representation can be obtained by encoding at least one piece of first interest information separately using an encoder. There is a one-to-one correspondence between the at least one first interest representation and the at least one piece of first interest information.
[0350] For example, the at least one first interest representation can be a first interest representation, which can serve as a first target interest feature.
[0351] For example, the at least one first interest representation may include multiple first interest representations, and the first target interest feature may be obtained by fusing the multiple first interest representations. The result of fusing the multiple first interest representations can be used as the first target interest feature.
[0352] Furthermore, optionally, the first target interest feature can be obtained by fusing multiple first interest representations based on a self-attention mechanism.
[0353] The above is just an example. The interest information used to generate the first target interest feature may also include other interest information besides the first interest information. For the specific generation method, please refer to the generation process of the second target interest feature.
[0354] The following explanation uses an example of generating a second target interest feature, which includes at least one second target interest information and at least one first interest information.
[0355] The second target interest feature can be determined based on at least one first interest representation and at least one second interest representation. The at least one second interest representation can be obtained by encoding at least one piece of second interest information using an encoder. There is a one-to-one correspondence between the at least one second interest representation and the at least one piece of second interest information.
[0356] The second target interest feature can be obtained by fusing the at least one first interest representation and the at least one second interest representation. The result of fusing the at least one first interest representation and the at least one second interest representation can be used as the second target interest feature.
[0357] Further, optionally, the first target interest feature can be obtained by fusing the at least one first interest representation and at least one second interest representation based on a self-attention mechanism.
[0358] The above is just an example. The interest information used to generate the second target interest feature can also include only the second interest information. For the specific generation method, please refer to the generation process of the first target interest feature.
[0359] It should be understood that the generation methods of the first and second target interest features described above are merely examples and do not constitute a limitation on the solutions of the embodiments of this application. The relevant descriptions of the interest information corresponding to the interest representations involved in the fusion (i.e., the interest information used to determine the target interest features) can be found in the preceding descriptions and will not be repeated here to avoid repetition.
[0360] In this embodiment, the use of a self-attention mechanism to fuse interest representations is beneficial for obtaining better aggregation results of interest information, making the analysis of user interests more accurate, and thus improving the performance of downstream tasks. For example, if the downstream task is a recommendation task, it is beneficial for improving the performance of the recommendation model.
[0361] As mentioned earlier, target interest features can be used in downstream task models.
[0362] For example, downstream tasks may include recommendation tasks, and target interest features can be used as additional features for recommendation tasks, such as as additional input to the recommendation model.
[0363] Downstream tasks can also be other tasks that depend on user behavior sequences, such as user profile determination tasks or user intent prediction tasks, etc., which are not limited in this application embodiment.
[0364] As one possible implementation, target interest features can be used in the training phase of downstream task models. That is, target interest features can be used as training data for downstream task models. For example, during the training process of downstream task models, target interest features can be included as part of the input information for the downstream task models.
[0365] Taking a downstream task model as an example of a recommendation model, the recommendation model is trained based on at least one training sample and its corresponding label. Each training sample includes user information, information about the recommended object, and target interest features (such as a first target interest feature or a second target interest feature). The corresponding label is used to indicate whether the user in the training sample has performed an action on the recommended object.
[0366] Users in different training samples can be the same or different.
[0367] The recommended objects in different training samples can be the same or different.
[0368] The recommended object refers to the object recommended by the recommendation system to the user. For example, in a music recommendation scenario, the recommended object can be music, while in an advertising scenario, the recommended object can be advertisements. It should be understood that the specific content of the recommended object can be different in different recommendation scenarios, and the embodiments of this application do not limit the specific content of the recommended object.
[0369] Furthermore, training samples can also include contextual information.
[0370] Sample labels can be used to indicate whether a training sample is a positive or negative sample. For example, the label can be 0 or 1, with a positive sample labeled as 1 and a negative sample labeled as 0. Alternatively, the label can be a specific numerical value, representing the probability of a training sample being a positive or negative sample.
[0371] Sample labels can be obtained based on whether the user has taken any action on the recommended object.
[0372] User actions on recommended items can include clicking, downloading, purchasing, browsing, or leaving negative reviews.
[0373] Furthermore, optionally, after obtaining new target interest features each time, the recommendation model can be optimized based on the updated target interest features.
[0374] The following explanation uses the first target interest feature and the second target interest feature as examples.
[0375] For example, after obtaining the first target interest features, the recommendation model can be optimized based on the first target interest features. Specifically, the following steps can be performed.
[0376] Optionally, recommendation model #1 is trained based on at least one training sample and its corresponding sample label. Each training sample may include user information, information about the recommended object, and first target interest features.
[0377] Furthermore, the recommendation model #1 can be deployed online.
[0378] For example, after obtaining the second target interest feature, the first target interest feature can be replaced with the second target interest feature, and the recommendation model can be optimized based on the second target interest feature. Specifically, the following steps can be performed.
[0379] Optionally, recommendation model #2 is trained based on at least one training sample and its corresponding sample label. Each training sample may include user information, information about the recommended object, and second target interest features.
[0380] Furthermore, this recommendation model #2 can be deployed online.
[0381] In this case, recommendation model #1 and recommendation model #2 are different models. Information other than the first target interest feature in at least one training sample used to train recommendation model #1 may be the same as or different from information other than the second target interest feature in at least one training sample used to train recommendation model #2.
[0382] In the scheme of this application embodiment, the target interest features can be used to optimize the training algorithm, that is, to train the recommendation model, so that the recommendation system can better utilize the knowledge generated by LLM, thereby improving the ability of the recommendation model and improving the accuracy of the recommendation results.
[0383] It should be understood that the above are merely examples and do not constitute a limitation on the solutions of this application. For example, in other implementations, the recommendation model can be optimized based on partially updated target interest features; that is, the recommendation model is not optimized based on the new target interest features every time new target interest features are obtained. For example, after obtaining the first target interest feature, the recommendation model can be optimized based on the first target interest feature to obtain recommendation model #1. Recommendation model #1 can be deployed online. After obtaining the second target interest feature, the recommendation model is not optimized using the second target interest feature, and the recommendation model deployed online is still recommendation model #1.
[0384] As another possible implementation, target interest features can be used in the inference stage of the downstream task model. For example, during the inference process of the downstream task model, the target interest features can be used as part of the input information of the downstream task model.
[0385] The description of target interest features used in the inference stage of downstream task models can be found in Method 800 below.
[0386] The following example uses a recommendation system to illustrate the application scenarios of the target interest features obtained through method 600.
[0387] The method 600 shown in Figure 6 can be applied to recommendation systems, for example, by using target interest features as an additional input to the recommendation model. Exemplarily, method 600 can be used in the offline training module and / or online prediction module of Figure 3 to generate input features (i.e., input information) for the recommendation model. The solutions of this application embodiment can be flexibly adapted to any recommendation model and LLM.
[0388] Figure 8 shows a schematic flowchart of a recommendation method according to an embodiment of this application. Exemplarily, the method 800 shown in Figure 8 can be applied to a cloud server. For example, the recommendation model of this application embodiment can be deployed on a cloud server. Exemplarily, the solution of this application embodiment can be applied to a terminal device. For example, the recommendation model of this application embodiment can be built into a terminal device, and the terminal device executes the method of this application embodiment. Alternatively, the recommendation model of this application embodiment can be deployed in an application (APP) of the terminal device, that is, the recommendation method of this application embodiment is executed by calling the APP.
[0389] The target interest features (such as the first target interest feature and the second target interest feature) in method 800 are obtained through method 600. For a detailed description, please refer to method 600. To avoid repetition, some descriptions of method 800 are omitted appropriately.
[0390] As shown in Figure 8, method 800 may include the following steps.
[0391] 810, Receive the first recommendation request.
[0392] 820, Obtain first input information related to the first recommendation request. The first input information includes information about the target user, information about the first candidate recommendation object, and first target interest features.
[0393] The first target interest feature can be generated based on n1 pieces of first interest information, which are extracted from n1 first blocks using LLM. These n1 first blocks are constructed based on a first behavior sequence. The first behavior sequence includes multiple behavior data of the target user. Each of the n1 first blocks is based on one or more behavior data from the first behavior sequence. n1 is a positive integer.
[0394] Optionally, the first behavior sequence satisfies preset condition #1, and the multiple behavior data in the first behavior sequence comes from the user behavior stream, which includes multiple behavior data of the target user obtained in chronological order.
[0395] 830, Input the first input information into the first recommendation model to predict the probability that the target user will perform an action on the first candidate recommendation object.
[0396] For example, when a user enters the recommendation system, a recommendation request is triggered. The user who triggered the recommendation request is the target user, and the recommended objects to be shown to the user can be considered as candidate recommended objects.
[0397] The term "first" in "first recommendation request," "first input information," "first candidate recommendation object," and "first target interest feature" is for descriptive convenience only, used to distinguish the content corresponding to different recommendation requests, and does not have a limiting function. The input information related to the first recommendation request is the first input information, the candidate recommendation object in the first input information is the first candidate recommendation object, and the target interest feature in the first input information is the first target interest feature.
[0398] For example, the target user's information may include the user's identifier ID. The target user's information may also include personalized attributes such as the target user's gender, age, occupation, income, hobbies, or education level.
[0399] For example, the information of a candidate recommendation object may include its identifier ID. The information may also include some attribute information, such as the name or type of the candidate recommendation object.
[0400] For a description of the first target interest features, please refer to Method 600, which will not be repeated here.
[0401] Furthermore, the first input information may also include other information, such as first context information.
[0402] The term "first" in "first context information" is for descriptive convenience only, used to distinguish the content corresponding to different recommendation requests, and has no limiting effect. The context information in the first input information is the first context information.
[0403] The probability that the target user will perform an action on the candidate recommendation object can also be replaced by the probability that the candidate recommendation object will be recommended to the target user.
[0404] As a possible application scenario, the probability that a target user will perform an action on a candidate recommendation object can be used for ranking tasks, such as ranking candidate recommendation objects in a candidate recommendation set.
[0405] The candidate recommendation set can include multiple candidate recommendation objects. The probability that the target user will perform an action on any of these multiple candidate recommendation objects can be determined by referring to steps 820 and 830. All of these multiple candidate recommendation objects can be considered as first candidate recommendation objects. After predicting the probability that the target user will perform an action on any of the candidate recommendation objects in the candidate recommendation set using the recommendation model, the candidate recommendation objects in the candidate recommendation set can be sorted based on this probability to obtain the recommendation result. For example, the candidate recommendation object with the highest probability can be displayed to the target user. Alternatively, multiple candidate recommendation objects with the highest probability can be displayed to the target user in descending order of probability.
[0406] Figure 9 shows the "Recommended" page in an app store. This page can have multiple lists, such as featured apps and featured games. Taking featured games as an example, candidate recommended games can be candidate recommended games. The app store's recommendation system predicts the probability that a user will download (install) a candidate recommended game based on the target user's information and the information of the candidate recommended applications. Based on this probability, the candidate recommended games are sorted in descending order, with the game most likely to be downloaded placed at the top.
[0407] For example, in a featured game, the recommended results could be: App 5 in the first recommended position, App 6 in the second, App 7 in the third, and App 8 in the fourth. After seeing the app store's recommended results, users can interact with them based on their interests. Once a user's action is performed, the corresponding behavioral data is stored in a log for subsequent updates to target interest features and / or the recommendation model.
[0408] As another possible application scenario, for example, the probability that a target user has an action on a candidate recommendation object can be used for a recall task, such as determining a candidate recommendation set.
[0409] The candidate object set can include multiple candidate recommendation objects. The probability that the target user will perform an action on any of these multiple candidate recommendation objects can be determined by referring to steps 820 and 830. All of these multiple candidate recommendation objects can be considered as first candidate recommendation objects. After predicting the probability that the target user will perform an action on any of the candidate recommendation objects in the candidate object set using the recommendation model, suitable candidate recommendation objects can be selected from the candidate object set to form a candidate recommendation set. The candidate recommendation set can be used for subsequent ranking tasks.
[0410] Optionally, the first recommendation model can be trained based on at least one training sample and corresponding sample labels. Each training sample includes user information, information of the recommended object, and first target interest features. The sample label corresponding to each training sample is used to indicate whether the user in each training sample has an action on the recommended object.
[0411] As mentioned above, the first recommendation model can be trained based on the first target interest features. Alternatively, the first recommendation model can also be trained based on other target interest features.
[0412] Optionally, method 800 may also include the following steps (not shown in the figure).
[0413] 840, Receive the second recommendation request, which is received after the first recommendation request.
[0414] 850, Obtain second input information related to the second recommendation request. The second input information includes information about the target user, information about the second candidate recommendation object, and second target interest features.
[0415] The second target interest feature can be generated based on n² pieces of second interest information. These n² pieces of first interest information are extracted from n² blocks using LLM (Limited Linear Modulation), and these n² blocks are constructed based on a second behavior sequence. The second behavior sequence includes multiple behavior data points of the target user. Each of the n² second blocks is based on one or more behavior data points from the second behavior sequence. n² is a positive integer. The multiple behavior data points in the second behavior sequence are obtained after the multiple behavior data points in the first behavior sequence.
[0416] Optionally, the second behavior sequence satisfies preset condition #1, and multiple behavior data in the second behavior sequence come from the user behavior stream.
[0417] 860. Input the second input information into the second recommendation model to predict the probability that the target user will perform an action on the second candidate recommendation object.
[0418] The term "second" in "second recommendation request," "second input information," "second candidate recommendation object," and "second target interest feature" is for descriptive convenience only, used to distinguish the content corresponding to different recommendation requests, and does not have a limiting function. The input information related to the second recommendation request is the second input information, the candidate recommendation object in the second input information is the second candidate recommendation object, and the target interest feature in the second input information is the second target interest feature.
[0419] The descriptions of recommendation requests, input information, and candidate recommendation objects can be found in the previous text and will not be repeated here.
[0420] The second candidate can be the same as or different from the first candidate.
[0421] For a description of the second target interest features, please refer to Method 600, which will not be repeated here.
[0422] Furthermore, the second input information may also include other information, such as second context information.
[0423] The term "second" in "second context information" is for descriptive convenience only, used to distinguish the content corresponding to different recommendation requests, and has no limiting effect. The context information in the second input information is the second context information.
[0424] The first recommendation model and the second recommendation model can be the same recommendation model or different recommendation models.
[0425] For example, the second recommendation model and the first recommendation model are different recommendation models. The second recommendation model can be trained based on at least one training sample and the corresponding sample labels of the training sample. Each training sample includes user information, information of the recommended object, and second target interest features. The sample label corresponding to each training sample is used to indicate whether the user in each training sample has an action on the recommended object.
[0426] The training samples of the second recommendation model can be described by referring to the training samples of the first recommendation model. Simply replace the first target interest feature with the second target interest feature. To avoid repetition, it will not be described again here.
[0427] As mentioned above, the second recommendation model can be trained based on the second target interest features. Furthermore, the second recommendation model can also be trained based on other target interest features.
[0428] Optionally, the first behavior sequence includes all behavior data in the first region, which is used to store behavior data in the user behavior stream. When n1 first blocks are constructed based on the first behavior sequence, some or all of the behavior data in the first region is cleared. The second behavior sequence includes all behavior data in the cleared first region. The n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
[0429] Optionally, the second target interest feature is generated based on at least one second interest information among n2 second interest information and at least one first interest information among n1 first interest information.
[0430] Optionally, the n1 pieces of first interest information include n1 first interest summaries, which are generated by the LLM based on the n1 first blocks respectively. The n2 pieces of second interest information include n2 second interest summaries and n2 interest transition information. The n2 second interest summaries are generated by the LLM based on the n2 second blocks respectively. The n2 interest transition information is generated by the LLM based on at least one of the n2 second interest summaries and the n1 first interest summaries. The n2 interest transition information is used to indicate the differences between the n2 second interest summaries and at least one of the n1 first interest summaries.
[0431] Optionally, the second target interest feature is obtained by fusing at least one second interest representation and at least one first interest representation based on a self-attention mechanism. The at least one second interest representation is obtained by encoding at least one second interest information among n2 second interest information by an encoder, and the at least one first interest representation is obtained by encoding at least one first interest information among n1 first interest information by an encoder.
[0432] Optionally, the preset condition #1 includes that the amount of behavioral data is greater than or equal to a first threshold.
[0433] Figure 10 illustrates a schematic diagram of a behavioral data processing flow. The apparatus shown in Figure 10 can be considered as a specific implementation of the apparatus shown in Figure 5. The method performed by the apparatus shown in Figure 9 can be considered as a specific implementation of the method shown in Figure 5. To avoid repetition, some descriptions are omitted when describing the behavioral data processing flow shown in Figure 10. For example, as shown in Figure 10, this scheme can be applied to a recommendation system. For ease of description, the scheme shown in Figure 10 is illustrated using only n1 = n2 = 1 as an example, and does not constitute a limitation on the scheme of the embodiments of this application.
[0434] The user behavior streaming block module can be used to block user sequences.
[0435] During system operation, new behavioral data is continuously acquired. For example, the user behavior streaming chunking module can store new behavioral data in a short-term behavior cache. As new behavioral data arrives, the amount of data in the short-term behavior cache also increases. When the behavioral data in the short-term behavior cache meets preset condition #1, the behavioral data in the short-term behavior cache can be used to construct new chunks in long-term behavior memory.
[0436] The user interest learning module can be used to extract user interest information from various blocks.
[0437] For example, user interest information may include user interest summary (i.e., interest summary in method 600) and user interest change (i.e. interest change information in method 600).
[0438] For example, the user interest learning module can use LLM to extract user interest information from each block in a cascading manner. That is, the LLM extracts the user's most recent interest information from the newly constructed block based on the interest information extracted from previously constructed blocks. The interest information extracted from the newly constructed block can be provided as input to the LLM for extracting interest information from the next constructed block. As shown in Figure 10, taking a block as an example, the LLM generates a user interest summary based on this block, and then the LLM generates user interest changes based on this user interest summary and previous user interest summaries.
[0439] The user interest aggregation module can be used to generate target interest features based on one or more interest information.
[0440] The user interest aggregation module can convert the text-based interest information generated by the user interest learning module into a compact representation and fuse them to assist in the click-through rate prediction task in the recommendation system (an example of a recommendation task).
[0441] For example, the user interest aggregation module can convert interest information from various blocks into corresponding interest representations through an encoder, and then fuse the interest representations corresponding to each block through a fusion layer to obtain the target interest feature. This target interest feature can also be called a long-term user interest fusion representation. For example, this fusion layer can be an attention fusion layer based on a self-attention mechanism. This target interest feature can be used in a recommendation model to improve recommendation performance.
[0442] The following example illustrates the process of processing behavioral data with reference to Figure 10.
[0443] (1) Store the behavioral data in the user behavior flow into a short-term behavior cache. If the behavioral data in the short-term behavior cache meets the preset condition #1, construct blocks in the long-term behavior memory.
[0444] For example, as shown in Figure 10, the user behavior flow segmentation module can acquire the user behavior flow. The user behavior flow can include {b1, b2, ..., b...} i- 1,b i …}。 b i Let represent the i-th action data in the user action flow, where i is a positive integer. Assume that after a user performs a new action, the corresponding action data is 'b'. i The user behavior streaming segmentation module will use the latest acquired behavior data as b i Storing data in a short-term behavior cache. Behavior data stored in the short-term behavior cache can be considered as behavior data in either the first behavior sequence or the second behavior sequence.
[0445] As new behavioral data continues to arrive, the amount of behavioral data in the short-term behavioral cache also increases. When the behavioral data in the short-term behavioral cache meets preset condition #1, it can be used to construct new blocks in the long-term behavioral memory.
[0446] For example, the preset condition #1 can be: len(short-term behavior cache) ≥ K. len(short-term behavior cache) represents the number of behavior data in the short-term behavior cache. K > 0. That is, the preset condition #1 is that the number of behavior data in the short-term behavior cache exceeds the threshold K (an example of threshold #3).
[0447] Preset condition #1 can also be other conditions. For details, please refer to method 600 above. It will not be repeated here.
[0448] If the preset condition #1 is met, clear all behavior data in the short-term behavior cache and construct a new block P in the long-term behavior memory. j j is a positive integer. P j This represents the j-th block in long-term behavioral memory. Block P j This can be viewed as an example of the first block or an example of the second block.
[0449] This example only demonstrates clearing all behavior data; other implementations may also clear only some behavior data. The example also demonstrates building a new block each time, i.e., n1 = n2 = 1; other implementations may also build multiple blocks based on behavior data in the short-term behavior cache.
[0450] (2) Extract user interest information from blocks using LLM.
[0451] When a new segment P appears in long-term behavioral memory j The user interest learning module can call LLM to access the P block. j Extract user interest information, such as interest summaries and interest change information.
[0452] For example, from block P via LLM j Extracted interest summary The following formula can be satisfied:
[0453] prompt s This represents a prompt template used to generate an interest summary. Interest Summary This can be seen as an example of a summary of primary or secondary interests.
[0454] Furthermore, interest transition information is inferred through LLM based on the currently generated interest summary and the interest summaries extracted from one or more previously constructed blocks.
[0455] For example, using LLM to summarize interests based on the currently generated data. And a previously constructed block P j-1 Extracted interest summary Generated interest change information The following formula can be satisfied:
[0456] prompt c This represents a prompt word template used to generate interest change information. Interest Change Information This can be considered an example of first interest change information or second interest change information.
[0457] For example, using block P j Taking the second block as an example, block P j-1 This can be seen as an example of the first block, an interest summary. This can serve as an example of a second interest summary; interest summary This can serve as an example of summarizing primary interests, and information on changes in interests. This can be seen as an example of information about changes in second interest.
[0458] (3) Generate target interest features based on the user's interest information.
[0459] For example, the user interest aggregation module can encode the newly generated interest information from the user interest learning module into a representation vector using a knowledge encoder, which serves as the interest representation. This interest feature can be viewed as a representation of long-term interests. Then, multiple interest representations of the user are aggregated through a self-attention mechanism to aggregate interest information from multiple blocks, and the aggregation result is the target interest feature.
[0460] For example, for the newly constructed block P j Interest information is used to obtain the block P through a knowledge encoder. j Corresponding interest representation r j The following formula can be satisfied:
[0461] Interest representation r j This can be viewed as an example of a first interest representation or a second interest representation. For example, consider a block P. j Taking the second block as an example, the interest representation r j This can be considered an example of a first interest representation or a second interest representation.
[0462] For example, block P j Corresponding target interest features The following formula can be satisfied:
[0463] `selfattn()` represents fusion processing based on a self-attention mechanism, where `r1` represents the interest feature corresponding to the first block P1 in long-term behavioral memory, `r2` represents the interest feature corresponding to the second block P2 in long-term behavioral memory, and `R`... j This represents the set of representations that participate in the fusion.
[0464] This example uses the interest information for generating target interest features, which includes the interest information corresponding to all blocks in long-term memory. In other implementations, the interest information for generating target interest features may also include only a portion of the interest information. For details, please refer to Method 600 above, which will not be repeated here.
[0465] As shown in Figure 10, target interest features can be input into the recommendation system as an additional input to the recommendation model to obtain the output of the recommendation model.
[0466] For example, the output of recommendation model f The following formula can be satisfied:
[0467] θ represents the model parameters of the recommendation model. x represents the input information of the recommendation model excluding target interest features. Other information besides [the target information]. For example, x can include at least one of the following: user information, item information, contextual information, or user behavior data. User information, item information, and contextual information are the user, item, and contextual features shown in Figure 10. For example, user behavior data can be considered as a representation of the user's short-term interests as shown in Figure 10. x can be directly input into the recommendation model, or it can be input into the recommendation model after relevant processing. For example, user behavior data can be directly used as input information for the recommendation model, or it can be used as input information for the recommendation model after processing (such as ID conversion). After obtaining new target interest features, for example, obtaining [the target information]... back, That is
[0468] The recommendation model in Figure 10 can be either a recommendation model during the inference phase or a recommendation model during the training phase.
[0469] For example, taking the training phase as an example, after the user's behavior sequence is processed by the scheme of this application embodiment, multiple blocks of interest representation can be obtained. These multiple blocks of interest representation can be used for training the attention fusion layer and / or recommendation model shown in Figure 10.
[0470] For example, taking the inference stage as an example, as shown in Figure 3, the solution of this application embodiment can update the target interest features in a streaming manner. The updated target interest features can be uploaded online and used in the inference stage of the recommendation model.
[0471] It should be understood that the behavioral data processing flow shown in Figure 10 is only an example of method 600 and does not constitute a limitation on the solution of the embodiments of this application. Other implementation methods can refer to method 600.
[0472] It should be noted that Figure 10 is only used as an example of the processing flow of user behavior data for recommendation tasks, and does not limit the application scenarios of this application embodiment. When applied to other scenarios, the recommendation system and its input information in Figure 10 can be adaptively replaced with other systems or models and their input information.
[0473] The solution in this application can be applied to various scenarios, which is beneficial for efficiently capturing user interests at the semantic level and improving prediction results.
[0474] Offline experiments were conducted using the scheme of this application embodiment and other recommendation models, and the overall performance comparison results are shown in Table 1.
[0475] This experiment was based on two public datasets: MovieLens (MovieLens-100k in Table 1) and Amazon (Amazon-books in Table 1). The evaluation metrics selected were the area under the receiver operating characteristic (ROC) curve (AUC) and log loss.
[0476] AUC, or the area under the ROC curve, is the ratio of the area under the curve to the coordinate axes. A higher AUC value indicates better recommendation performance. A lower LogLoss value indicates better recommendation performance.
[0477] The baseline models selected two representative types: traditional recommender system models and LLM-based recommender models. Traditional recommender system models include feature interaction models and user behavior sequence models. Feature interaction models include deep and cross networks (DCN), deep factorization machines (DeepFM), extreme deep factorization machines (xDeepFM), automatic integrate attention models (AutoInt), and feature interaction bi-interaction networks (FiBiNet). User behavior sequence models include dynamic interaction networks (DIN) and dynamic interaction-based neural networks (DIEN).LLM-based recommendation models include Universal Sequence Representation Learning (UniSRec), Vector-Quantized Item Representation for Recommenders (VQRec), Pre-trained Language Model to Model Tabular Data (PTab), Recommendation as Language Processing (RLP): A Unified Pretrain, Personalized Prompt and Prediction Paradigm (P5), An Effective and Efficient Tuning Framework to Align Large Language Models with Recommendation (TALLRec), and Knowledge Augmentation from Large Language Models (KAR). The language models used include BERT, Text-to-Text Transformer (T5), and Large Language Model Meta AI (LLaMa2). LIBER represents the scheme adopted in the embodiments of this application, as shown in Figure 10. “Rel.Impr.” represents the relative improvement rate of LIBER relative to each baseline.
[0478] Table 1
[0479] This solution is LIBER as shown in Table 1. As shown in Table 1, the solution in this application has significant improvements in both AUC and LogLoss compared to traditional recommendation system models and LLM-based recommendation models.
[0480] Table 2 shows the comparison results of training efficiency. In Table 2, LIBER#1 represents the scheme shown in Figure 10, LIBER#2 is based on the scheme in Figure 10 but removes the interest change information in the user interest learning module, LLM(length=100) is a baseline scheme for comparison, in which the maximum length of the input behavior sequence is 100, and LLM(length=20) is another baseline scheme for comparison, in which the maximum length of the input behavior sequence is 20. In LLM(length=100) and LLM(length=20), LLM is called again to summarize the user sequence every time the user's behavior changes. #calls / user indicates the average number of times LLM needs to be called per user. #Tokens / prompt indicates the average number of tokens in each prompt.
[0481] Table 2
[0482] As shown in Table 2, compared with the baseline scheme, the number of calls to LLM per user in the scheme of this application is significantly reduced, which helps to improve processing efficiency. At the same time, the recommendation effect, such as the value of AUC, is also significantly improved.
[0483] It should be understood that in this embodiment of the application, only the downstream task is described as a recommended task. The solution of this embodiment of the application can be used for other tasks that require user representation, or other tasks that depend on user behavior sequences, or other user understanding tasks, to help downstream tasks achieve better results.
[0484] For example, user understanding tasks can involve user profiling or predicting user behavior, such as predicting user purchase intent.
[0485] The apparatus of the present application embodiment will now be described with reference to Figures 11 and 12. It should be understood that the apparatus described below is capable of performing the methods of the foregoing embodiments of the present application. To avoid unnecessary repetition, repeated descriptions will be appropriately omitted when introducing the apparatus of the present application embodiment.
[0486] Figure 11 shows a schematic block diagram of an apparatus provided in an embodiment of this application. The apparatus 1800 shown in Figure 11 can be used to perform the methods of the embodiments of this application, such as the methods shown in Figure 6 or Figure 8.
[0487] As shown in Figure 11, the device 1800 may include an acquisition module 1810 and a processing module 1820.
[0488] As one possible implementation, the device 1800 can be used to perform the method shown in FIG6.
[0489] The acquisition module 1810 is used to acquire user behavior streams, which include multiple user behavior data acquired in chronological order.
[0490] The processing module 1820 is used to construct n1 first blocks based on the first behavior sequence when the first behavior sequence meets the preset condition #1. The multiple behavior data in the first behavior sequence come from the user behavior stream, and each of the n1 first blocks is based on the multiple behavior data in the first behavior sequence, where n1 is a positive integer. The module extracts n1 first interest information from the n1 first blocks through the Large Language Model (LLM). The n1 first interest information is used to determine the first target interest feature, and the first target interest feature is used for the downstream task model.
[0491] Optionally, the processing module 1820 is further configured to: construct n2 second blocks based on the second behavior sequence when the second behavior sequence satisfies preset condition #1, wherein multiple behavior data in the second behavior sequence come from the user behavior stream, each of the n2 second blocks is based on multiple behavior data in the second behavior sequence, the multiple behavior data in the second behavior sequence is obtained after multiple behavior data in the first behavior sequence, and n2 is a positive integer; extract n2 second interest information from the n2 second blocks respectively through LLM, the n2 second interest information is used to determine the second target interest feature, and the second target interest feature is used to replace the first target interest feature in the downstream task model.
[0492] Optionally, the first behavior sequence includes all behavior data in the first region, the first region is used to store behavior data in the user behavior flow, and the processing module 1820 is further used to: perform a clearing operation on the first region when n1 first blocks are constructed based on the first behavior sequence, so as to clear some or all of the behavior data in the first region, the second behavior sequence includes all behavior data in the first region after the clearing operation is performed, the n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
[0493] Optionally, the second target interest feature is generated based on at least one second interest information among n2 second interest information and at least one first interest information among n1 first interest information.
[0494] Optionally, the processing module 1820 is specifically used to: generate n1 first interest summaries based on n1 first blocks using LLM, wherein the n1 first interest information includes the n1 first interest summaries; generate n2 second interest summaries based on n2 second blocks using LLM; and generate n2 interest transition information based on the n2 second interest summaries and at least one of the n1 first interest summaries using LLM, wherein the n2 interest transition information is used to indicate the differences between the n2 second interest summaries and at least one of the n1 first interest summaries, and the n2 second interest information includes the n2 second interest summaries and the n2 interest transition information.
[0495] Optionally, the processing module 1820 is further configured to: fuse at least one second interest representation and at least one first interest representation based on a self-attention mechanism to obtain a second target interest feature, wherein the at least one second interest representation is obtained by an encoder encoding at least one second interest information among n2 second interest information, and the at least one first interest representation is obtained by an encoder encoding at least one first interest information among n1 first interest information.
[0496] Optionally, the preset condition #1 includes that the amount of behavioral data is greater than or equal to a first threshold.
[0497] Optionally, the downstream task model includes a recommendation model, which is used to predict the probability that a user will perform an action on a candidate recommendation object. The input information of the recommendation model includes a first target interest feature or a second target interest feature.
[0498] For a detailed description, please refer to Method 600 above; it will not be repeated here.
[0499] As another possible implementation, the device 1800 can be used to perform the method shown in FIG8.
[0500] Specifically, the acquisition module 1810 is used to respond to the first recommendation request and acquire first input information related to the first recommendation request. The first input information includes information about the target user, information about the first candidate recommendation object, and first target interest features. The first target interest features are generated based on n1 pieces of first interest information. The n1 pieces of first interest information are extracted from n1 first blocks by a large language model (LLM). The n1 first blocks are constructed based on a first behavior sequence. The first behavior sequence satisfies a preset condition #1. Multiple behavior data in the first behavior sequence come from a user behavior stream. The user behavior stream includes multiple behavior data of the target user acquired in chronological order. Each of the n1 first blocks is based on multiple behavior data in the first behavior sequence. n1 is a positive integer.
[0501] The processing module 1820 is used to input the first input information into the first recommendation model to predict the probability that the target user will perform an action on the first candidate recommendation object.
[0502] Optionally, the first recommendation model is trained based on at least one training sample and corresponding sample labels. Each training sample includes user information, information of the recommended object, and first target interest features. The sample label corresponding to each training sample is used to indicate whether the user in each training sample has an action on the recommended object.
[0503] Optionally, the acquisition module 1810 is further configured to: receive a second recommendation request, acquire second input information related to the second recommendation request, the second input information including information of the target user, information of the second candidate recommendation object, and second target interest features, the second recommendation request being received after the first recommendation request, wherein the second target interest features are generated based on n2 pieces of second interest information, the n2 pieces of second interest information being extracted from n2 second blocks respectively through LLM, the n2 second blocks being constructed based on a second behavior sequence, the second behavior sequence satisfying preset condition #1, multiple behavior data in the second behavior sequence coming from the user behavior stream, each of the n2 second blocks being based on multiple behavior data in the second behavior sequence, the multiple behavior data in the second behavior sequence being acquired after multiple behavior data in the first behavior sequence, and n2 being a positive integer; the processing module 1820 is further configured to input the second input information into the second recommendation model to predict the probability that the target user will have an operation action on the second candidate recommendation object.
[0504] Optionally, the first recommendation model and the second recommendation model can be the same model.
[0505] Optionally, the first behavior sequence includes all behavior data in the first region, which is used to store behavior data in the user behavior stream. When n1 first blocks are constructed based on the first behavior sequence, some or all of the behavior data in the first region is cleared. The second behavior sequence includes all behavior data in the cleared first region. The n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
[0506] Optionally, the second target interest feature is generated based on at least one second interest information among n2 second interest information and at least one first interest information among n1 first interest information.
[0507] Optionally, the n1 pieces of first interest information include n1 first interest summaries, which are generated by the LLM based on the n1 first blocks respectively. The n2 pieces of second interest information include n2 second interest summaries and n2 interest transition information. The n2 second interest summaries are generated by the LLM based on the n2 second blocks respectively. The n2 interest transition information is generated by the LLM based on at least one of the n2 second interest summaries and the n1 first interest summaries. The n2 interest transition information is used to indicate the differences between the n2 second interest summaries and at least one of the n1 first interest summaries.
[0508] Optionally, the second target interest feature is obtained by fusing at least one second interest representation and at least one first interest representation based on a self-attention mechanism. The at least one second interest representation is obtained by encoding at least one second interest information among n2 second interest information by an encoder, and the at least one first interest representation is obtained by encoding at least one first interest information among n1 first interest information by an encoder.
[0509] Optionally, the preset condition #1 includes that the amount of behavioral data is greater than or equal to a first threshold.
[0510] For a detailed description, please refer to Method 800 above; it will not be repeated here.
[0511] Each module in device 1800 can be implemented in software or in hardware. For example, the implementation of processing module 1820 will be described below. Similarly, the implementation methods of other modules can be the same as those of processing module 1820.
[0512] As an example of a software functional unit, processing module 1820 may include code running on a computing instance. The computing instance may include at least one of a physical host (computing device), a virtual machine, or a container. Further, the aforementioned computing instance may be one or more. For example, processing module 1820 may include code running on multiple hosts / virtual machines / containers. It should be noted that the multiple hosts / virtual machines / containers used to run the code may be distributed within the same region or in different regions. Further, the multiple hosts / virtual machines / containers used to run the code may be distributed within the same availability zone (AZ) or in different AZs, each AZ including one or more geographically proximate data centers. Typically, a region may include multiple AZs.
[0513] Similarly, multiple hosts / virtual machines / containers used to run this code can be distributed within the same Virtual Private Cloud (VPC) or across multiple VPCs. Typically, a VPC is set up within a region. Communication between two VPCs within the same region, as well as between VPCs in different regions, requires a communication gateway to be set up within each VPC to enable interconnection between VPCs.
[0514] As an example of a hardware functional unit, the processing module 1820 may include at least one computing device, such as a server. Alternatively, the processing module 1820 may also be a device implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD). The PLD may be implemented using a complex programmable logical device (CPLD), a field-programmable gate array (FPGA), generic array logic (GAL), or any combination thereof.
[0515] The processing module 1820 includes multiple computing devices that can be distributed within the same region or in different regions. These computing devices can be distributed within the same Availability Zone (AZ), within the same Virtual Private Cloud (VPC), or across multiple VPCs. Furthermore, the multiple computing devices can be any combination of computing devices such as servers, ASICs, PLDs, CPLDs, FPGAs, and GALs.
[0516] It should be noted that the division of units in the above device is only a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. In other embodiments, the processing module 1820 can be used to execute any step in the method described above, and other modules can be used to implement any step described above. The steps that each module is responsible for implementing can be specified as needed. By having each module implement different steps described above, all functions of the device 1800 can be achieved.
[0517] Figure 12 is a schematic block diagram of an image generation apparatus provided in an embodiment of this application. The apparatus 1900 may include a processor 1910, a transceiver 1920, and a memory 1930. The processor 1910, transceiver 1920, and memory 1930 are connected via internal interconnection paths. The memory 1930 stores instructions, and the processor 1910 executes the instructions stored in the memory 1930 to receive / send data via the transceiver 1920. Optionally, the memory 1930 may be coupled to the processor 1910 via an interface or integrated with the processor 1910.
[0518] It should be noted that the transceiver 1920 mentioned above may include, but is not limited to, transceiver devices such as input / output interfaces, to enable communication between device 1900 and other devices or communication networks.
[0519] The memory 1930 can be a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM).
[0520] In one implementation, the processor 1910 can be a circuit with instruction read and execute capabilities, such as a central processing unit (CPU), microprocessor, or digital signal processor (DSP). In another implementation, the processor 1910 can implement certain functions through the logical relationships of hardware circuits. These logical relationships can be fixed or reconfigurable. For example, the processor 1910 can be a hardware circuit implemented using an application-specific integrated circuit (ASIC) or a programmable logic device (PLD), such as a field-programmable gate array (FPGA). In a reconfigurable hardware circuit, the process of the processor loading a configuration document and configuring the hardware circuit can be understood as the processor loading instructions to implement some or all of the functions of the aforementioned units.
[0521] This application also provides an electronic device, which may include the above-described device 1800 or device 1900.
[0522] This application also provides a computing device cluster, which includes at least one computing device. The computing device may be a server, such as a central server, an edge server, or a local server in a local data center. In some embodiments, the computing device may also be a terminal device such as a desktop computer, a laptop computer, or a smartphone. The computing device cluster includes at least one device 1900.
[0523] In some possible implementations, the memory 1930 of one or more computing devices in the computing device cluster may also store partial instructions for executing the aforementioned method. In other words, a combination of one or more computing devices can jointly execute the instructions for executing the aforementioned method.
[0524] It should be noted that the memory 1930 in different computing devices within the computing device cluster can store different instructions, each used to execute a portion of the steps described above. That is, the instructions stored in the memory 1930 of different computing devices can implement the functions of one or more modules in device 1900.
[0525] In some possible implementations, one or more computing devices in a computing device cluster can be connected via a network. This network can be a wide area network (WAN) or a local area network (LAN), etc.
[0526] This application also provides a computer program product, which includes computer program code that, when run on a computer, causes the computer to perform the methods described in the above embodiments.
[0527] This application also provides a computer-readable medium storing program code that, when run on a computer, causes the computer to perform the methods described in the above embodiments.
[0528] This application also provides a chip, including circuitry, for performing the methods described in the above embodiments.
[0529] In implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software. The method disclosed in the embodiments of this application can be directly implemented by a hardware processor, or by a combination of hardware and software modules within the processor. The software modules can reside in random access memory, flash memory, read-only memory, programmable read-only memory, power-on erasable programmable memory, registers, or other mature storage media in the art. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method. To avoid repetition, detailed descriptions are omitted here.
[0530] It should also be understood that, in the various embodiments of this application, the order of the above-mentioned processes does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0531] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0532] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0533] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0534] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0535] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, ROM, RAM, magnetic disks, or optical disks.
[0536] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be covered.
Claims
1. A method for processing behavioral data, characterized in that, include: Acquire user behavior stream, which includes multiple behavioral data of the user acquired in chronological order; If the first behavior sequence satisfies a preset condition, n1 first blocks are constructed based on the first behavior sequence, wherein multiple behavior data in the first behavior sequence come from the user behavior stream, and each of the n1 first blocks is based on multiple behavior data in the first behavior sequence, where n1 is a positive integer; The Large Language Model (LLM) extracts n1 first interest information from each of the n1 first blocks. The n1 first interest information is used to determine the first target interest feature, which is then used in the downstream task model.
2. The method according to claim 1, characterized in that, The method further includes: If the second behavior sequence satisfies the preset condition, n2 second blocks are constructed based on the second behavior sequence, wherein multiple behavior data in the second behavior sequence come from the user behavior stream, and each of the n2 second blocks is based on multiple behavior data in the second behavior sequence, wherein the multiple behavior data in the second behavior sequence is obtained after the multiple behavior data in the first behavior sequence, and n2 is a positive integer; The LLM extracts n2 second interest information from each of the n2 second blocks. The n2 second interest information is used to determine a second target interest feature, which is used to replace the first target interest feature in the downstream task model.
3. The method according to claim 2, characterized in that, The first behavior sequence includes all behavior data in a first region, the first region being used to store behavior data in the user behavior stream, and the method further includes: When constructing the n1 first blocks based on the first behavior sequence, a clearing operation is performed on the first region to clear some or all of the behavior data in the first region. The second behavior sequence includes all the behavior data in the first region after the clearing operation is performed. The n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
4. The method according to claim 2 or 3, characterized in that, The second target interest feature is generated based on at least one of the n2 second interest information and at least one of the n1 first interest information.
5. The method according to claim 4, characterized in that, The step of extracting n1 first interest information points from the n1 first blocks using a large language model (LLM) includes: The LLM generates n1 first interest summaries based on the n1 first blocks, wherein the n1 first interest information includes the n1 first interest summaries; and the LLM extracts n2 second interest information from the n2 second blocks, including: The LLM generates n2 second interest summaries based on the n2 second blocks respectively; The LLM generates n2 interest transition information based on at least one of the n2 second interest summaries and the n1 first interest summaries. The n2 interest transition information is used to indicate the differences between the n2 second interest summaries and at least one of the n1 first interest summaries. The n2 second interest information includes the n2 second interest summaries and the n2 interest transition information.
6. The method according to claim 4 or 5, characterized in that, The method further includes: The second target interest feature is obtained by fusing at least one second interest representation and at least one first interest representation based on a self-attention mechanism. The at least one second interest representation is obtained by encoding at least one second interest information among the n2 second interest information by an encoder. The at least one first interest representation is obtained by encoding at least one first interest information among the n1 first interest information by an encoder.
7. The method according to any one of claims 1 to 6, characterized in that, The preset conditions include that the amount of behavioral data is greater than or equal to a first threshold.
8. The method according to any one of claims 1 to 7, characterized in that, The downstream task model includes a recommendation model, which is used to predict the probability that the user will perform an action on the candidate recommendation object. The input information of the recommendation model includes the first target interest feature.
9. A recommended method, characterized in that, include: In response to the first recommendation request, first input information related to the first recommendation request is obtained. This first input information includes information about the target user, information about the first candidate recommendation object, and first target interest features. The first target interest feature is generated based on n1 first interest information, which are extracted from n1 first blocks by a large language model (LLM). The n1 first blocks are constructed based on a first behavior sequence, which satisfies a preset condition. Multiple behavior data in the first behavior sequence come from a user behavior stream, which includes multiple behavior data of the target user obtained in chronological order. Each of the n1 first blocks is based on multiple behavior data in the first behavior sequence, where n1 is a positive integer. The first input information is input into the first recommendation model to predict the probability that the target user will perform an action on the first candidate recommendation object.
10. The recommended method according to claim 9, characterized in that, The first recommendation model is trained based on at least one training sample and corresponding sample labels. Each training sample includes user information, information of the recommended object, and first target interest features. The sample label corresponding to each training sample is used to indicate whether the user in each training sample has an action on the recommended object.
11. The recommended method according to claim 9 or 10, characterized in that, The method further includes: In response to the second recommendation request, second input information related to the second recommendation request is obtained. The second input information includes information about the target user, information about the second candidate recommendation object, and second target interest features. The second recommendation request is received after the first recommendation request. The second target interest feature is generated based on n2 pieces of second interest information. The n2 pieces of second interest information are extracted from n2 second blocks by LLM. The n2 second blocks are constructed based on a second behavior sequence. The second behavior sequence satisfies the preset condition. Multiple behavior data in the second behavior sequence come from the user behavior stream. Each of the n2 second blocks is based on multiple behavior data in the second behavior sequence. The multiple behavior data in the second behavior sequence are obtained after the multiple behavior data in the first behavior sequence. n2 is a positive integer. The second input information is fed into the second recommendation model to predict the probability that the target user will perform an action on the second candidate recommendation object.
12. The recommended method according to claim 11, characterized in that, The first recommendation model and the second recommendation model are the same model.
13. The recommended method according to claim 11 or 12, characterized in that, The first behavior sequence includes all behavior data in the first region, which is used to store the behavior data in the user behavior stream. When constructing the n1 first blocks based on the first behavior sequence, some or all of the behavior data in the first region is cleared. The second behavior sequence includes all the behavior data in the cleared first region. The n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
14. The recommended method according to any one of claims 11 to 13, characterized in that, The second target interest feature is generated based on at least one of the n2 second interest information and at least one of the n1 first interest information.
15. The recommended method according to claim 14, characterized in that, The n1 first interest information items include n1 first interest summaries, which are generated by the LLM based on the n1 first blocks respectively. The n2 second interest information items include n2 second interest summaries and n2 interest transition information items. The n2 second interest summaries are generated by the LLM based on the n2 second blocks respectively. The n2 interest transition information items are generated by the LLM based on at least one of the n2 second interest summaries and the n1 first interest summaries. The n2 interest transition information items are used to indicate the differences between the n2 second interest summaries and at least one of the n1 first interest summaries.
16. The recommended method according to claim 14 or 15, characterized in that, The second target interest feature is obtained by fusing at least one second interest representation and at least one first interest representation based on a self-attention mechanism. The at least one second interest representation is obtained by encoding at least one second interest information among the n2 second interest information by an encoder. The at least one first interest representation is obtained by encoding at least one first interest information among the n1 first interest information by an encoder.
17. The recommended method according to any one of claims 9 to 16, characterized in that, The preset conditions include that the amount of behavioral data is greater than or equal to a first threshold.
18. An apparatus for processing behavioral data, characterized in that, include: The acquisition module acquires user behavior streams, which include multiple user behavior data acquired in chronological order. Processing module, used for: If the first behavior sequence satisfies a preset condition, n1 first blocks are constructed based on the first behavior sequence, wherein multiple behavior data in the first behavior sequence come from the user behavior stream, and each of the n1 first blocks is based on multiple behavior data in the first behavior sequence, where n1 is a positive integer; The Large Language Model (LLM) extracts n1 first interest information from each of the n1 first blocks. The n1 first interest information is used to determine the first target interest feature, which is then used in the downstream task model.
19. The apparatus according to claim 18, characterized in that, The processing module is also used for: If the second behavior sequence satisfies the preset condition, n2 second blocks are constructed based on the second behavior sequence, wherein multiple behavior data in the second behavior sequence come from the user behavior stream, and each of the n2 second blocks is based on multiple behavior data in the second behavior sequence, wherein the multiple behavior data in the second behavior sequence is obtained after the multiple behavior data in the first behavior sequence, and n2 is a positive integer; The LLM extracts n2 second interest information from each of the n2 second blocks. The n2 second interest information is used to determine a second target interest feature, which is used to replace the first target interest feature in the downstream task model.
20. The apparatus according to claim 19, characterized in that, The first behavior sequence includes all behavior data in a first region, the first region being used to store behavior data in the user behavior stream, and the processing module is further used to: When constructing the n1 first blocks based on the first behavior sequence, a clearing operation is performed on the first region to clear some or all of the behavior data in the first region. The second behavior sequence includes all the behavior data in the first region after the clearing operation is performed. The n1 first blocks are stored in the second region, and the n2 second blocks are stored in the second region.
21. The apparatus according to claim 19 or 20, characterized in that, The processing module is specifically used for: The LLM generates n1 first interest summaries based on the n1 first blocks, and the n1 first interest information includes the n1 first interest summaries. The LLM generates n2 second interest summaries based on the n2 second blocks respectively; The LLM generates n2 interest transition information based on at least one of the n2 second interest summaries and the n1 first interest summaries. The n2 interest transition information is used to indicate the differences between the n2 second interest summaries and at least one of the n1 first interest summaries. The n2 second interest information includes the n2 second interest summaries and the n2 interest transition information.
22. The apparatus according to claim 21, characterized in that, The processing module is also used for: The second target interest feature is obtained by fusing at least one second interest representation and at least one first interest representation based on a self-attention mechanism. The at least one second interest representation is obtained by encoding at least one second interest information among the n2 second interest information by an encoder. The at least one first interest representation is obtained by encoding at least one first interest information among the n1 first interest information by an encoder.
23. A recommendation device, characterized in that, include: The acquisition module is configured to, in response to a first recommendation request, acquire first input information related to the first recommendation request, wherein the first input information includes information about the target user, information about the first candidate recommendation object, and first target interest features, wherein... The first target interest feature is generated based on n1 first interest information, which are extracted from n1 first blocks by a large language model (LLM). The n1 first blocks are constructed based on a first behavior sequence, which satisfies a preset condition. Multiple behavior data in the first behavior sequence come from a user behavior stream, which includes multiple behavior data of the target user obtained in chronological order. Each of the n1 first blocks is based on multiple behavior data in the first behavior sequence, where n1 is a positive integer. The processing module is used to input the first input information into the first recommendation model to predict the probability that the target user will perform an action on the first candidate recommendation object.
24. The recommended device according to claim 23, characterized in that, The first recommendation model is trained based on at least one training sample and corresponding sample labels. Each training sample includes user information, information of the recommended object, and first target interest features. The sample label corresponding to each training sample is used to indicate whether the user in each training sample has an action on the recommended object.
25. The recommended apparatus according to claim 23 or 24, characterized in that, The acquisition module is also used for: In response to the second recommendation request, second input information related to the second recommendation request is obtained. The second input information includes information about the target user, information about the second candidate recommendation object, and second target interest features. The second recommendation request is received after the first recommendation request. The second target interest feature is generated based on n² second interest information pieces, which are extracted from n² second blocks using LLM. These n² second blocks are constructed based on a second behavior sequence that satisfies the preset condition. Multiple behavior data points in the second behavior sequence originate from the user behavior stream. Each of the n² second blocks is based on multiple behavior data points from the second behavior sequence, which are obtained after multiple behavior data points from the first behavior sequence. n² is a positive integer. The processing module is further configured to: The second input information is fed into the second recommendation model to predict the probability that the target user will perform an action on the second candidate recommendation object.
26. The recommended device according to claim 25, characterized in that, The first recommendation model and the second recommendation model are the same model.
27. A computing device, characterized in that, It includes a processor and a memory, the processor being configured to execute instructions stored in the memory to cause the computing device to perform the method as claimed in any one of claims 1 to 8, or the method as claimed in any one of claims 9 to 17.
28. A computer program product containing instructions, characterized in that, When the instructions are executed by the computing device, the computing device performs the method as described in any one of claims 1 to 8, or the method as described in any one of claims 9 to 17.
29. A computer-readable storage medium, characterized in that, It includes computer program instructions, which, when executed by a computing device, cause the computing device to perform the method as described in any one of claims 1 to 8, or the method as described in any one of claims 9 to 17.
Citation Information
Patent Citations
Object recommendation method and device, computer equipment and storage medium
CN110941764A
Recommendation method and device
CN113495991A
Interest pushing method and device, equipment and storage medium
CN114780840A
User interest recommendation method, electronic equipment and storage medium
CN116186388A
Information recommendation method and device, electronic equipment and storage medium
CN116484089A