Search

CN-121996708-A - Method for processing behavior data, recommendation method and related device

CN121996708ACN 121996708 ACN121996708 ACN 121996708ACN-121996708-A

Abstract

The application provides a method for processing behavior data, a recommendation method and a related device, wherein the method for processing behavior data comprises the steps of obtaining user behavior flow, constructing n1 first blocks based on a first behavior sequence under the condition that the first behavior sequence meets preset conditions, wherein a plurality of behavior data in the first behavior sequence come from the user behavior flow, each first block in the n1 first blocks is respectively based on a plurality of behavior data in the first behavior sequence, n1 is a positive integer, extracting n1 first interest information from the n1 first blocks through a large language model LLM, wherein the n1 first interest information is used for determining a first target interest feature, and the first target interest feature is used for a downstream task model. The scheme of the embodiment of the application is beneficial to improving the accuracy of the processing result of the downstream task and ensuring the processing efficiency.

Inventors

  • ZHU CHENXU
  • CHEN BO
  • GUO HUIFENG
  • TANG RUIMING
  • ZHANG WEINAN

Assignees

  • 华为技术有限公司

Dates

Publication Date
20260508
Application Date
20241104

Claims (20)

  1. 1. A method of processing behavioral data, comprising: acquiring a user behavior stream, wherein the user behavior stream comprises a plurality of behavior data of a user acquired in time sequence; Under the condition that a first behavior sequence meets a preset condition, constructing n1 first blocks based on the first behavior sequence, wherein a plurality of behavior data in the first behavior sequence come from the user behavior stream, each first block in the n1 first blocks is respectively based on the plurality of behavior data in the first behavior sequence, and n1 is a positive integer; extracting n1 pieces of first interest information from the n1 pieces of first blocks through a large language model LLM, wherein the n1 pieces of first interest information are used for determining first target interest features, and the first target interest features are used for a downstream task model.
  2. 2. The method according to claim 1, wherein the method further comprises: Under the condition that a second behavior sequence meets the preset condition, constructing n2 second blocks based on the second behavior sequence, wherein a plurality of behavior data in the second behavior sequence come from the user behavior stream, each second block in the n2 second blocks is respectively based on a plurality of behavior data in the second behavior sequence, the plurality of behavior data in the second behavior sequence are acquired after the plurality of behavior data in the first behavior sequence, and n2 is a positive integer; Extracting n2 pieces of second interest information from the n2 second blocks through the LLM, wherein the n2 pieces of second interest information are used for determining second target interest features, and the second target interest features are used for replacing the first target interest features in the downstream task model.
  3. 3. The method of claim 2, wherein the first behavior sequence includes all behavior data in a first region, the first region for storing behavior data in the user behavior stream, and the method further comprises: And in the case of constructing the n1 first partitions based on the first behavior sequence, performing a clear operation on the first region to clear part or all of the behavior data in the first region, wherein the second behavior sequence includes all of the behavior data in the first region after performing the clear operation, wherein the n1 first partitions are stored in a second region, and wherein the n2 second partitions are stored in the second region.
  4. 4. A method according to claim 2 or 3, wherein the second target interest feature is generated from at least one of the n2 second interest information and at least one of the n1 first interest information.
  5. 5. The method of claim 4, wherein extracting n1 pieces of first interest information from the n1 pieces of first partitions, respectively, by a large language model LLM, comprises: generating n1 first interest summaries by the LLM according to the n1 first partitions, wherein the n1 first interest information includes the n1 first interest summaries, and extracting n2 second interest information from the n2 second partitions by the LLM, including: Generating n2 second interest summaries according to the n2 second partitions through the LLM; generating, by the LLM, n2 interest transition information according to at least one of the n2 second interest summaries and the n1 first interest summaries, the n2 interest transition information being used to indicate a difference between the n2 second interest summaries and the at least one of the n1 first interest summaries, the n2 second interest information including the n2 second interest summaries and the n2 interest transition information.
  6. 6. The method according to claim 4 or 5, characterized in that the method further comprises: fusing at least one second interest characterization and at least one first interest characterization based on a self-attention mechanism to obtain the second target interest feature, wherein the at least one second interest characterization is obtained by encoding at least one second interest information in the n2 second interest information through an encoder, and the at least one first interest characterization is obtained by encoding at least one first interest information in the n1 first interest information through an encoder.
  7. 7. The method according to any one of claims 1 to 6, wherein the preset condition comprises the number of behavioural data being greater than or equal to a first threshold value.
  8. 8. The method according to any one of claims 1 to 7, wherein the downstream task model comprises a recommendation model for predicting a probability of the user having an operational action on a candidate recommendation object, the input information of the recommendation model comprising the first target feature of interest.
  9. 9. A recommendation method, comprising: In response to a first recommendation request, obtaining 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 a first target interest feature, wherein, The first target interest feature is generated based on n1 pieces of first interest information, the n1 pieces of first interest information are respectively extracted from n1 pieces of first blocks through a large language model LLM, the n1 pieces of first blocks are constructed based on a first behavior sequence, the first behavior sequence meets a preset condition, a plurality of behavior data in the first behavior sequence come from a user behavior stream, the user behavior stream comprises a plurality of behavior data of the target user acquired in time sequence, and each first block in the n1 pieces of first blocks is respectively based on a plurality of behavior data in the first behavior sequence, and n1 is a positive integer; and inputting the first input information into a first recommendation model to predict the probability of the target user having an operation action on the first candidate recommendation object.
  10. 10. The recommendation method of claim 9, wherein the first recommendation model is trained based on at least one training sample and corresponding sample tags, each training sample in the at least one training sample comprising information of a user, information of a recommended object, and a first target interest feature, the sample tag corresponding to each training sample being used to indicate whether the user in each training sample has an action on the recommended object.
  11. 11. The recommendation method according to claim 9 or 10, wherein said method further comprises: Obtaining second input information related to a second recommendation request in response to the second recommendation request, the second input information including information of the target user, information of a second candidate recommendation object, and a second target interest feature, the second recommendation request being received after the first recommendation request, wherein, The second target interest feature is generated based on n2 second interest information, the n2 second interest information is respectively extracted from n2 second blocks through LLM, the n2 second blocks are constructed based on a second behavior sequence, the second behavior sequence meets the preset condition, a plurality of behavior data in the second behavior sequence come from the user behavior stream, each second block in the n2 second blocks is respectively based on a plurality of behavior data in the second behavior sequence, the plurality of behavior data in the second behavior sequence are acquired after the plurality of behavior data in the first behavior sequence, and n2 is a positive integer; and inputting the second input information into a second recommendation model to predict the probability of the target user having an operation action on the second candidate recommendation object.
  12. 12. The recommendation method of claim 11, wherein the first recommendation model and the second recommendation model are the same model.
  13. 13. The recommendation method according to claim 11 or 12, wherein the first behavior sequence comprises all behavior data in a first area for storing behavior data in the user behavior stream, part or all of the behavior data in the first area is cleared in case of constructing the n1 first partitions based on the first behavior sequence, the second behavior sequence comprises all of the behavior data in the first area after being cleared, the n1 first partitions are stored in a second area, and the n2 second partitions are stored in the second area.
  14. 14. The recommendation method according to any one of claims 11 to 13, wherein the second target interest feature is generated from at least one of the n2 second interest information and at least one of the n1 first interest information.
  15. 15. The recommendation method of claim 14, wherein the n1 first interest information includes n1 first interest summaries, the n1 first interest summaries are generated by the LLM according to the n1 first partitions, respectively, the n2 second interest information includes n2 second interest summaries and n2 interest transition information, the n2 second interest summaries are generated by the LLM according to the n2 second partitions, respectively, the n2 interest transition information is generated by the LLM according to at least one of the n2 second interest summaries and the n1 first interest summaries, the n2 interest transition information is used to indicate a difference between the n2 second interest summaries and the at least one of the n1 first interest summaries.
  16. 16. The recommendation method according to claim 14 or 15, wherein said second target interest feature is obtained by fusing at least one second interest feature and at least one first interest feature based on a self-attention mechanism, said at least one second interest feature being obtained by encoding at least one second interest information of said n2 second interest information by an encoder, said at least one first interest feature being obtained by encoding at least one first interest information of said n1 first interest information by an encoder.
  17. 17. The recommendation method according to any one of claims 9 to 16, wherein said preset condition comprises the number of behavioural data being greater than or equal to a first threshold value.
  18. 18. An apparatus for processing behavioral data, comprising: The system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module acquires a user behavior stream, and the user behavior stream comprises a plurality of behavior data of a user acquired in time sequence; a processing module for: Under the condition that a first behavior sequence meets a preset condition, constructing n1 first blocks based on the first behavior sequence, wherein a plurality of behavior data in the first behavior sequence come from the user behavior stream, each first block in the n1 first blocks is respectively based on the plurality of behavior data in the first behavior sequence, and n1 is a positive integer; extracting n1 pieces of first interest information from the n1 pieces of first blocks through a large language model LLM, wherein the n1 pieces of first interest information are used for determining first target interest features, and the first target interest features are used for a downstream task model.
  19. 19. The apparatus of claim 18, wherein the processing module is further configured to: Under the condition that a second behavior sequence meets the preset condition, constructing n2 second blocks based on the second behavior sequence, wherein a plurality of behavior data in the second behavior sequence come from the user behavior stream, each second block in the n2 second blocks is respectively based on a plurality of behavior data in the second behavior sequence, the plurality of behavior data in the second behavior sequence are acquired after the plurality of behavior data in the first behavior sequence, and n2 is a positive integer; Extracting n2 pieces of second interest information from the n2 second blocks through the LLM, wherein the n2 pieces of second interest information are used for determining second target interest features, and the second target interest features are used for replacing the first target interest features in the downstream task model.
  20. 20. The apparatus of claim 19, wherein the first behavior sequence comprises all behavior data in a first region, the first region to store behavior data in the user behavior stream, and the processing module is further to: And in the case of constructing the n1 first partitions based on the first behavior sequence, performing a clear operation on the first region to clear part or all of the behavior data in the first region, wherein the second behavior sequence includes all of the behavior data in the first region after performing the clear operation, wherein the n1 first partitions are stored in a second region, and wherein the n2 second partitions are stored in the second region.

Description

Method for processing behavior data, recommendation method and related device Technical Field The present application relates to the field of artificial intelligence, and more particularly, to a method of processing behavioral data, a recommendation method, and related apparatus. Background User behavior sequence analysis is widely used for user understanding tasks. By means of the behavior information of the user, the task model can learn the interests of the user, so that the task model can better execute tasks. Taking a recommendation system as an example, the task of the recommendation system is to comprehensively consider factors such as a user, an object, current context information and the like to recommend the object possibly interested by the user to the user, and in the actual modeling process, the probability that the user is most likely to click or the probability of conversion is often adopted to sort the objects and display the recommendation result. Click-through rate (CTR) or conversion rate estimation is a core task in a recommendation system, and aims to predict the click probability or conversion probability of a user on a recommendation object (such as music, advertisement, etc.). The sequence of user behavior is an important factor affecting the accuracy of the predictions. Traditional user behavior modeling approaches typically only consider information of their own data sets, while ignoring other valuable knowledge from outside. In recent years, it has been proposed to assist user behavior modeling through a large language model (large language model, LLM). LLM is a neural network model with huge parameters trained using a large number of corpora, and can understand and generate natural language text. Specifically, large language models are typically based on neural network technology, which learns the grammar, semantics, and context information of a language by training a large amount of text data. During the training process, the model will constantly optimize parameters to improve understanding and generating capabilities of the text. Since large language models are very powerful in understanding natural language, they have been widely used in many fields to solve natural language understanding and generation problems. Since LLM has accumulated a great deal of factual knowledge, with strong reasoning capabilities, a more accurate analysis of user interests can be achieved by LLM-aided user behavior modeling. However, when LLM is used for modeling user behavior, there are still some problems, and it is difficult to meet the demands of downstream tasks. Disclosure of Invention The application provides a method for processing behavior data, a recommendation method and a related device. The method for processing the behavior data comprises the steps of obtaining a user behavior stream, wherein the user behavior stream comprises a plurality of behavior data of a user obtained in time sequence, constructing n1 first blocks based on a first behavior sequence under the condition that the first behavior sequence meets a preset condition, wherein the plurality of behavior data in the first behavior sequence come from the user behavior stream, each first block in the n1 first blocks is respectively based on the plurality of behavior data in the first behavior sequence, n1 is a positive integer, extracting n1 first interest information from the n1 first blocks through a large language model LLM, wherein the n1 first interest information is used for determining a first target interest feature, and the first target interest feature is used for a downstream task model. According to the scheme of the embodiment of the application, under the condition that the behavior sequence meets a certain condition, the blocks are constructed based on the behavior data in the behavior sequence, and the interest information of the user is respectively extracted from each block by means of the external knowledge and reasoning capability of the LLM, so that the quantity of the behavior data in each block is favorably limited, the situation that the LLM is directly used for processing the ultra-long user behavior sequence is favorably avoided, the accuracy of the interest information provided by the LLM is favorably ensured, and the accuracy of the processing result of the downstream task is favorably improved. Meanwhile, under the condition that the behavior sequence meets a certain condition, a new partition is constructed, and the LLM is called to extract interest information from the newly constructed partition, so that the calling times of the LLM are reduced, the calculation cost is reduced, and the processing efficiency is ensured. Illustratively, constructing n1 first partitions based on the first behavior sequence may include dividing a plurality of behavior data in the first behavior sequence to obtain n1 first partitions. For example, the n1 pieces of first interest information may be used as the first