A training method of a generative recommendation model, a generative recommendation method, and a device

CN122903695APending Publication Date: 2026-10-13NETEASE (HANGZHOU) NETWORK CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611105441.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

然而,相关技术往往将交互对象的内容语义信息与用户行为关联信息独立处理:或仅依赖交互对象标识的嵌入向量进行协同过滤,无法捕捉交互对象在视觉、文本等模态上的内容特征;或将多模态信息映射为语义标识后完全替代交互对象标识,致使模型无法直接获取交互对象之间的行为共现模式

Benefits of technology

[0012]本公开的有益效果是:采用本公开提供的生成式推荐系统的训练方法,在获取历史交互序列及多模态信息后,通过嵌入模块基于各交互对象的多模态信息生成各交互对象的语义标识。随后,通过融合模块将交互对象标识与语义标识在输入层进行融合,生成输入层融合序列表征,从而使得输入层融合序列表征中可以同时包含内容语义和行为关联两个维度的信息。进而,采用序列编码器基于融合表征序列,得到预测用表征序列,并采用预测模块对下一时间步进行预测,得到下一时间步的交互对象对应的预测语义标识。最后基于预测语义标识与下一时间步的真实语义标识之间的差异对推荐模型进行调参,得到目标推荐模型。采用上述训练方法得到的目标推荐模型,可以兼顾语义理解能力和用户行为关联能力,使得目标推荐模型推荐的准确性得到了提升。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903695A_ABST
    Figure CN122903695A_ABST
Patent Text Reader

Abstract

The disclosure provides a training method of a generative recommendation model, a generative recommendation method and equipment, and relates to the technical field of data processing. The method comprises: obtaining sample data of a plurality of users; the sample data comprises a historical interaction sequence and multi-modal information of each interaction object in the historical interaction sequence; using an embedding module in a recommendation model to generate semantic identifiers of each interaction object based on the multi-modal information of each interaction object; using a fusion module in the recommendation model to generate an input layer fusion sequence representation based on the interaction object identifiers and semantic identifiers of each interaction object in the historical interaction sequence; using a sequence encoder in the recommendation model to obtain a prediction representation sequence based on the input layer fusion sequence representation; using a prediction module in the recommendation model to predict a next time step based on a prediction representation of a current time step in the prediction representation sequence, and obtain a predicted semantic identifier corresponding to an interaction object of the next time step; and performing parameter adjustment on the recommendation model based on the predicted semantic identifier and a real semantic identifier of the next time step, to obtain a target recommendation model. The method provided by the disclosure has high recommendation accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, and more specifically, to a training method for a generative recommendation model, a generative recommendation method, and an apparatus. Background Technology

[0002] With the rapid growth of internet content, recommender systems need to filter potentially interesting content from a massive pool of candidate interaction objects. However, in existing technologies, recommender models typically rely solely on sequence modeling based on the identifiers of users' historical interaction objects, making it difficult to directly utilize the semantic information of these objects. When new interaction objects frequently appear online, the lack of historical behavioral data makes it difficult for the model to assign appropriate embedding vectors through collaborative filtering mechanisms. This forces the server to rely on additional cold-start compensation strategies or frequent full model retraining, significantly increasing server computational overhead and storage pressure, and reducing the real-time performance of online inference.

[0003] Existing recommendation methods typically use a user's historical interaction sequence as training samples to train a prediction model. The trained model then predicts the user's next interaction based on their recent interaction sequence, thus enabling recommendation. However, these techniques often process the semantic information of the interaction object's content independently from the user's behavioral association information: either relying solely on the embedding vectors of the interaction object's identifiers for collaborative filtering, failing to capture the content features of the interaction object across visual, textual, and other modalities; or completely replacing the interaction object's identifiers with semantic tags after mapping multimodal information, preventing the model from directly capturing the co-occurrence patterns of behavior between interaction objects. Furthermore, existing parallel semantic encoding methods quantize each subspace independently, lacking hierarchical constraints, and easily generating invalid encoding combinations that do not exist in the semantic space. This leads to a large amount of redundant similarity calculation and filtering operations on the server side during the inference phase, further increasing the data processing pressure.

[0004] However, recommendation methods in related technologies typically only model historical interaction sequences based on the identifiers of interactive objects, failing to effectively utilize the multimodal semantic information of interactive objects, and lacking a mechanism for collaboratively fusing content semantics with user behavior correlation signals, resulting in insufficient recommendation accuracy. Summary of the Invention

[0005] The embodiments disclosed herein address the shortcomings of the prior art by providing a training method, a generative recommendation method, and an apparatus for a generative recommendation model, which achieves high recommendation accuracy.

[0006] To achieve the above objectives, the technical solutions adopted in the embodiments of this disclosure are as follows: In a first aspect, one embodiment of this disclosure provides a method for training a generative recommendation model, the method comprising: Acquire sample data from multiple users; the sample data includes historical interaction sequences and multimodal information of each interaction object in the historical interaction sequences; The embedding module in the recommendation model generates semantic identifiers for each interaction object based on the multimodal information of each interaction object; Using the fusion module in the recommendation model, an input layer fusion sequence representation is generated based on the interaction object identifier and semantic identifier of each interaction object in the historical interaction sequence; The sequence encoder in the recommendation model fuses sequence representations based on the input layer to obtain a representation sequence for prediction. The prediction module in the recommendation model uses the prediction representation of the current time step in the prediction representation sequence to predict the next time step, thereby obtaining the predicted semantic identifier corresponding to the interaction object in the next time step. Based on the predicted semantic identifier and the real semantic identifier of the next time step, the recommendation model is tuned to obtain the target recommendation model.

[0007] Secondly, another embodiment of this disclosure provides a generative recommendation method, the method comprising: Obtain the target user's historical interaction sequence; The historical interaction sequence is input into the recommendation model, and the recommendation model predicts the matching degree of the target user for each candidate interaction object; the recommendation model is a recommendation model trained using the training method of the generative recommendation model as described in any one of claims 1 to 9; The target recommended object is determined from each candidate interaction object based on the matching degree.

[0008] Thirdly, another embodiment of this disclosure provides a training apparatus for a generative recommendation model, the apparatus comprising: a first acquisition module, a generation module, a first prediction module, and a training module, wherein: The first acquisition module is used to acquire sample data from multiple users; the sample data includes historical interaction sequences and multimodal information of each interaction object in the historical interaction sequences; The generation module is used to generate semantic identifiers for each interaction object based on the multimodal information of each interaction object using the embedding module in the recommendation model; to generate an input layer fusion sequence representation based on the interaction object identifiers and semantic identifiers of each interaction object in the historical interaction sequence using the fusion module in the recommendation model; and to obtain a prediction representation sequence based on the input layer fusion sequence representation using the sequence encoder in the recommendation model. The first prediction module is used to use the prediction module in the recommendation model to predict the next time step based on the prediction representation of the current time step in the prediction representation sequence, so as to obtain the prediction semantic identifier corresponding to the interaction object in the next time step. The training module is used to tune the parameters of the recommendation model based on the predicted semantic identifier and the real semantic identifier of the next time step, so as to obtain the target recommendation model.

[0009] Fourthly, another embodiment of this disclosure provides a generative recommendation apparatus, the apparatus comprising: a second acquisition module, a second prediction module, and a determination module, wherein: The second acquisition module is used to acquire the target user's historical interaction sequence; The second prediction module is used to input the historical interaction sequence into the recommendation model, and predict the matching degree of the target user to each candidate interaction object through the recommendation model; the recommendation model is a recommendation model trained using the training method of the generative recommendation model described in any of the first aspects above; The determining module is used to determine the target recommended object from each candidate interaction object based on the matching degree.

[0010] Fifthly, another embodiment of this disclosure provides a computer device, including: a processor, a memory, and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to perform the steps of any of the methods described in the first aspect above.

[0011] In a sixth aspect, another embodiment of this disclosure provides a storage medium storing a computer program that, when executed by a processor, performs the steps of the method described in any of the first aspects above.

[0012] The beneficial effects of this disclosure are as follows: Using the training method for the generative recommendation system provided herein, after acquiring historical interaction sequences and multimodal information, an embedding module generates semantic identifiers for each interaction object based on its multimodal information. Subsequently, a fusion module fuses the interaction object identifiers and semantic identifiers at the input layer, generating a fused sequence representation at the input layer. This allows the fused sequence representation to simultaneously contain information from both content semantics and behavioral association dimensions. Furthermore, a sequence encoder uses the fused representation sequence to obtain a prediction representation sequence, and a prediction module predicts the next time step, obtaining the predicted semantic identifier for the interaction object at the next time step. Finally, the recommendation model is tuned based on the difference between the predicted semantic identifier and the true semantic identifier at the next time step to obtain the target recommendation model. The target recommendation model obtained using the above training method can balance semantic understanding and user behavior association capabilities, thus improving the accuracy of the target recommendation model's recommendations. Attached Figure Description

[0013] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this disclosure and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0014] Figure 1 This illustration shows a training method for a generative recommendation model provided in one embodiment of the present disclosure; Figure 2 A schematic diagram of the process for generating semantic identifiers according to an embodiment of this disclosure is shown; Figure 3 A schematic diagram of the process for generating input layer fusion sequence representations is shown in an embodiment of this disclosure; Figure 4 A schematic flowchart illustrating the generation of a predictive characterization sequence is shown in one embodiment of this disclosure. Figure 5 A schematic diagram of the process for generating predicted semantic identifiers provided in an embodiment of this disclosure is shown; Figure 6 A schematic diagram of the process for tuning the recommendation model according to an embodiment of the present disclosure is shown; Figure 7 A flowchart illustrating a generative recommendation method provided in an embodiment of this disclosure is shown. Figure 8 A schematic diagram of the structure of a training device for a generative recommendation model provided in an embodiment of this disclosure is shown. Figure 9A schematic diagram of the structure of a generative recommendation device provided in an embodiment of this disclosure is shown; Figure 10 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this disclosure are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this disclosure. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this disclosure illustrate operations implemented according to some embodiments of this disclosure. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or performed simultaneously. In addition, those skilled in the art, guided by the content of this disclosure, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.

[0016] Furthermore, the described embodiments are only a portion, not all, of the embodiments disclosed herein. The components of the embodiments of this disclosure, typically described and illustrated in the accompanying drawings, can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but rather to represent selected embodiments of the disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0017] It should be noted that the term "comprising" will be used in the embodiments of this disclosure to indicate the presence of the features subsequently declared, but does not exclude the addition of other features.

[0018] This disclosure can be applied to various internet content platforms and / or e-commerce platforms that need to recommend the next interactive object to users, such as scenarios where the interactive object has a short lifespan and the content is frequently updated, such as short videos, news flashes, and trending products.

[0019] As examples, in short video recommendation scenarios, after a user finishes watching a video, the system needs to predict the next video the user is most likely to be interested in, based on the user's historical viewing sequence and multimodal information such as the video's cover image and title tags, and then push it to the user. In e-commerce recommendation scenarios, after a user completes a browsing or purchasing action, the system predicts the next item the user might add to their cart, based on the user's historical add-to-cart sequence and multimodal information such as product images and descriptions. In news and information recommendation scenarios, after a user reads an article, the system predicts the next news item the user is most likely to click to read, based on the user's historical reading sequence and multimodal information such as the article's images, title, and summary.

[0020] In the aforementioned application scenarios, due to the constantly changing multimodal information of interactive objects, recommendation systems based on fixed item identifiers in related technologies struggle to capture new content and make effective recommendations in a timely manner. This disclosure, however, transforms the multimodal information of interactive objects into semantic identifiers, enabling the recommendation model to quickly adapt to new interactive objects. Once a new interactive object is launched, its multimodal information can be used to generate semantic identifiers and make recommendations, alleviating the problem of insufficient exposure for new interactive objects due to a lack of historical interaction data. The method provided in this disclosure exhibits good versatility and transferability in various content recommendation and product recommendation scenarios.

[0021] Figure 1 This illustration shows a training method for a generative recommendation model provided in one embodiment of the present disclosure, such as... Figure 1 As shown, the method includes steps 110-160, wherein: Step 110: Obtain sample data from multiple users; the sample data includes historical interaction sequences and multimodal information of each interaction object in the historical interaction sequences.

[0022] Each sample data point corresponds to a user's historical interaction sequence within a specific historical event. This historical interaction sequence is formed by arranging the user's historical interaction logs with the interacting objects in chronological order. Each position in the historical interaction sequence corresponds to an interacting object, and the historical interaction sequence can reflect the temporal evolution of user interests. Interaction behaviors include, but are not limited to, clicking, watching, and liking.

[0023] The interaction object is determined based on the object to be recommended in the current scenario. The interaction object includes, but is not limited to: short videos, products, news articles, music, etc.

[0024] Multimodal information refers to the various heterogeneous information contained in an interactive object. Multimodal information includes at least visual information and textual information. Visual information can be the cover image of the interactive object, video frames, etc., while textual information can be the title, tags, descriptive text, etc. of the interactive object.

[0025] Historical interaction sequences reflect user behavior preferences and co-occurrence patterns of interaction objects. Multimodal information includes the content features of interaction objects in visual and textual dimensions. Model training is performed based on sample data containing historical interaction sequences and multimodal information of each interaction object in the historical interaction sequences, enabling the recommendation model to learn simultaneously in both content semantics and behavioral association dimensions.

[0026] Step 120: Using the embedding module in the recommendation model, generate semantic identifiers for each interactive object based on the multimodal information of each interactive object.

[0027] Figure 2 A schematic diagram of a process for generating semantic identifiers according to an embodiment of this disclosure is shown, such as... Figure 2 As shown, step 120 may include: steps 121-123, wherein: Step 121: Using a multimodal large model, based on a preset structured prompt template and the multimodal information of each interactive object, generate text description information for each interactive object.

[0028] In this embodiment, multimodal information is mapped to a unified text modality. A structured prompt template can be pre-built, and the visual and textual information of each interactive object is input into a pre-trained multimodal large-scale model. The multimodal large-scale model then generates text descriptions corresponding to the visual and textual information based on the structured prompt template. For example, in a short video recommendation scenario, the structured prompt template may include three fields: "video title," "cover image content description," and "tag category"; in an e-commerce product recommendation scenario, it may include three fields: "product category," "core selling point description," and "product main image style"; and in a news and information recommendation scenario, it may include three fields: "article summary," "image content description," and "keyword tags."

[0029] The multimodal large model can obtain text description information by organizing and generating the input multimodal information according to the structured prompt word template field. By adopting the above method, it is not necessary to perform end-to-end backpropagation and parameter updates on the massive multimodal large model on industrial-grade large-scale recommendation datasets, reducing the computing power and memory overhead during the training phase. At the same time, the structured prompt template standardizes heterogeneous visual and textual information into a unified text modality input, improving the consistency and reusability of multimodal features in the subsequent semantic labeling generation process.

[0030] Step 122: Using the embedding module in the recommendation model, obtain the dense vector representation of each interactive object based on the text description information of each interactive object.

[0031] An embedding module is used to convert the text description information of each interactive object into a dense vector representation. Each interactive object corresponds to a dense vector representation. .

[0032] Step 123: Generate semantic identifiers for each interactive object based on the dense vector representation of each interactive object and the codebook corresponding to each sub-vector.

[0033] In embodiments of this application, to reduce computational load, dense vectors can be used. Divide the vector evenly into m sub-vectors, that is Each subvector corresponds to a subspace, and each subspace maintains an independent codebook. , where V is the codebook size, which stores V template vectors, and each sub-vector takes values ​​from 1 to V.

[0034] For each subvector, the vector index corresponding to each subvector can be found in the codebook of the subspace to which each subvector belongs through nearest neighbor search. :

[0035] After finding the corresponding vector index for each sub-vector, combining the indices of all sub-vectors in order yields the interactive object. semantic identifiers .

[0036] As an example, suppose the dense vector corresponding to the current interactive object has a dimension of 384 and m is 4, meaning the dense vector is divided into 4 sub-vectors, each with a dimension of 96. The first sub-vector finds its best-matching vector index (vector number) in its own codebook as 5, the second sub-vector as 2, the third sub-vector as 8, and the fourth sub-vector as 3. Therefore, the semantic identifier of the current interactive object is [5, 2, 8, 3]. In another example, the dense vector corresponding to the current interactive object has a dimension of 256 and m is 2, meaning the dense vector is divided into 2 sub-vectors, each with a dimension of 128. The vector index of the first sub-vector is 7, and the vector index of the second sub-vector is 1. Therefore, the semantic identifier of the current interactive object is [7, 1].

[0037] Subsequently, each interaction object in each user's historical sequence is replaced with its corresponding semantic identifier to form a semantic identifier sequence. .

[0038] Step 130: Using the fusion module in the recommendation model, generate the input layer fusion sequence representation based on the interaction object identifiers and semantic identifiers of each interaction object in the historical interaction sequence.

[0039] The fusion module acquires the interaction object identifier and semantic identifier for each interaction object in the historical interaction sequence. Subsequently, the fusion module uses learnable gating units to dynamically fuse the interaction object identifier and semantic identifier to generate an input layer fusion sequence representation.

[0040] Step 140: Use the sequence encoder in the recommendation model to fuse sequence representations based on the input layer to obtain the representation sequence for prediction.

[0041] The sequence encoder performs contextual modeling of the input layer fused sequence representation based on its internal multi-layer self-attention mechanism. During the self-attention computation, each interaction object in the input layer fused sequence representation pays attention to information from all other interaction objects in the input layer fused sequence representation, using attention weights to determine how much information to absorb from each other interaction object. After multiple layers of such processing, the output representation of each interaction object in the input layer fused sequence representation is no longer isolated; it includes both its original cooperative and semantic signals, as well as the contextual information of other interaction objects in the entire historical interaction sequence. After processing, the sequence encoder outputs a prediction representation sequence of the same length as the input.

[0042] Step 150: Using the prediction module in the recommendation model, based on the prediction representation of the current time step in the prediction representation sequence, predict the next time step to obtain the predicted semantic identifier corresponding to the interaction object in the next time step.

[0043] Among them, the predicted semantic label is obtained by the recommendation model based on the predicted representation of the current time step to predict the next time step. It is used to compare with the real semantic label of the next time step in order to determine whether the current prediction is accurate based on the comparison results.

[0044] In another embodiment of this disclosure, the prediction module may also use a single fully connected layer as the prediction head. This fully connected layer directly receives the predicted representation of the current time step and outputs a continuous vector corresponding to the semantic identifier dimension. The continuous vector is then quantized into the codebook space through nearest neighbor search to obtain the predicted semantic identifier. Alternatively, the prediction module may employ an autoregressive decoding method, sequentially predicting the next component bit by bit using the prediction result of the previous component as a condition, gradually generating the complete predicted semantic identifier. These alternative methods can also achieve the function of predicting the interactive object of the next time step based on the representation of the current time step.

[0045] In another embodiment, the prediction module can also employ an autoregressive decoding approach, sequentially predicting the next component bit by bit using the prediction result of the previous component as a condition, gradually generating a complete predicted semantic identifier sequence. Specifically, for the M levels of hierarchical semantic identifiers, the prediction module first calculates the probability distribution of all candidate semantic identifiers on the first-level semantic identifier embedding table based on the sequence latent state representation of the current time step, selecting the identifier with the highest probability as the first-level prediction result; then, it concatenates the embedding vector corresponding to the first-level prediction result with the current sequence latent state representation, updates the decoding conditions, and then calculates the probability distribution on the second-level semantic identifier embedding table and selects the second-level prediction result; repeating the above process until all M levels of semantic identifiers are generated, and combining the prediction results of each level as the complete predicted semantic identifier sequence of the interactive video for the next time step. This autoregressive decoding approach can fully utilize the hierarchical structure of the hierarchical semantic identifiers, allowing the upper-level prediction results to provide contextual constraints for the lower-level predictions, thereby improving prediction accuracy.

[0046] Step 160: Based on the predicted semantic identifier and the real semantic identifier of the next time step, tune the parameters of the recommendation model to obtain the target recommendation model.

[0047] Based on the difference between the predicted semantic identifier and the true semantic identifier at the next time step, the backpropagation algorithm can be used to tune the parameters of all learnable modules in the recommendation model.

[0048] For example, the embedding module, fusion module, sequence encoder, and prediction module in the recommendation model are all tuned. As training progresses, the recommendation model gradually converges.

[0049] When all learnable modules converge to a preset range, or when a preset number of iterations is reached, or when the parameter tuning values ​​of each learnable module are less than a preset threshold, the recommendation model is considered to have converged successfully, and this model is determined to be the target recommendation model after training. For example, the preset range could be that the fluctuation of the loss function value within three consecutive training epochs is less than 0.5%; the preset number of iterations could be set to 50 or 100 epochs; and the preset threshold could be that the average absolute value of the model parameter updates is less than... .

[0050] The training method for the generative recommendation system provided in this disclosure, after acquiring historical interaction sequences and multimodal information, generates semantic identifiers for each interaction object based on the multimodal information of each interaction object through an embedding module. Subsequently, a fusion module fuses the interaction object identifiers and semantic identifiers at the input layer to generate an input layer fused sequence representation, thus allowing the input layer fused sequence representation to simultaneously contain information from both content semantics and behavioral association dimensions. Furthermore, a sequence encoder obtains a prediction representation sequence based on the fused representation sequence, and a prediction module predicts the next time step to obtain the predicted semantic identifier for the interaction object at the next time step. Finally, the recommendation model is parameter-tuned based on the difference between the predicted semantic identifier and the true semantic identifier at the next time step to obtain the target recommendation model. The target recommendation model obtained using the above training method maintains the high efficiency of generative recommendation while also considering semantic understanding and user behavior association capabilities, thereby improving the accuracy of the target recommendation model's recommendations.

[0051] Figure 3 This illustration shows a flowchart of generating input layer fusion sequence representations according to an embodiment of the present disclosure, as shown below. Figure 3 As shown, step 130 may include: steps 131-133, wherein: In another embodiment, the fusion module can directly concatenate the identifier embedding vectors and semantic embedding vectors of each interactive object sequentially into a longer joint vector. This joint vector is then mapped back to a space consistent with the original embedding dimensions through a learnable linear projection layer, thus obtaining the input layer fusion sequence representation. Alternatively, the identifier embedding vectors and semantic embedding vectors can be added element-wise and then input into a non-linear activation function, which is then used as the input layer fusion sequence representation and fed into the sequence encoder. Both concatenation and addition fusion methods can simultaneously preserve the behavioral association information and content semantic information of the interactive objects at the input layer.

[0052] Step 131: Obtain the identifier embedding vector corresponding to each interactive object identifier.

[0053] An interaction object identifier (ID) is a unique identifier for an interaction object. The fusion module creates a corresponding learnable identifier embedding vector for each interaction object identifier. The above-mentioned learnable identifier embedding vectors The model is continuously updated during training. For example, by using a large amount of user behavior data such as clicks and views, it gradually learns that interactive objects frequently interacted with by the same group of users should be close to each other in the embedding space. That is, identifying the embedding vectors. It originates from user behavior; the identifier embedding vector carries collaborative filtering signals, which are user behavior-related information.

[0054] Step 132: Use the lookup layer in the fusion module to map the semantic identifiers of each interactive object into semantic embedding vectors.

[0055] Simultaneously, the fusion module maps the semantic identifier sequence into a semantic embedding vector through the lookup layer. .

[0056] As an example, the lookup layer maintains a global embedding table (i.e., a codebook embedding table), which stores the embedding vector corresponding to each vector index. When the semantic identifier of the current interactive object is [5, 2, 8, 3], the lookup layer retrieves the embedding vectors corresponding to vector indices 5, 2, 8, and 3 from the embedding table, respectively. The retrieved embedding vectors are then concatenated or added sequentially to obtain the complete semantic embedding vector. The semantic embedding vector originates from multimodal information and carries content semantic signals.

[0057] It should be noted that each vector index in the semantic identifier of each interactive object corresponds to an independent embedding vector, and the embedding vectors corresponding to multiple vector indices together constitute the complete semantic embedding vector of the interactive object.

[0058] Step 133: Use the fusion module to fuse the identifier embedding vectors of each interactive object with the semantic identifier embedding vectors to obtain the input layer fusion sequence representation.

[0059] Subsequently, the fusion module uses learnable gating units to dynamically fuse the identifier embedding vector. and semantic embedding vectors The input layer fusion sequence representation is obtained. :

[0060]

[0061] in, The fusion weight has a value range of 0-1; It is the Sigmoid activation function. and These are the learnable parameters of the gated network.

[0062] Since the parameters of the gating unit are learnable, during the training process, the gating unit will learn to rely more on semantic embedding vectors for some popular interactive objects (popular videos, new products) and more on label embedding vectors for some unpopular interactive objects (long-tail products, unpopular content).

[0063] Figure 4 This application provides a schematic flowchart for generating a predictive representation sequence according to an embodiment of the present application. Figure 4 As shown, step 140 may include: steps 141-142, wherein: Step 141: Use the sequence encoder in the recommendation model to fuse the sequence representation based on the input layer to obtain the sequence representation of the output layer.

[0064] Characterize the input layer fusion sequence The input is fed into a lightweight Transformer encoder for sequence learning to fuse sequence representations of the input layer. Perform context modeling and output the learned output layer sequence representation. Among them, the input layer fusion sequence is characterized. and output layer sequence representation They are the same length.

[0065] Because the Transformer encoder has multiple layers of self-attention mechanisms, each position in the sequence pays attention to information from all other positions in the input layer's fused sequence representation during self-attention computation. Attention weights determine how much information to absorb from other positions. After this multi-layered processing, the output representation at each position in the input layer's fused sequence representation is no longer isolated. Each position contains its original semantic signals and related information, as well as contextual information from other interacting objects throughout the historical sequence.

[0066] Step 142: Overlay the identifier embedding vector of each interactive object onto the representation of each interactive object in the output layer sequence representation to obtain the representation sequence for prediction.

[0067] Output layer sequence representation Although contextual information is incorporated, the output layer sequence representation is still calculated through the multi-layer self-attention mechanism within the Transformer. The interactive information originally injected into the output layer may be diluted by information from other locations. Therefore, further characterization of the output layer sequence is required. Based on this, the interactive object identifier is re-embedded to obtain the representation sequence for prediction.

[0068] In the embodiments of this application, the identifier embedding vector of each interactive object can be scaled according to a learnable scaling factor; the scaled identifier embedding vector is superimposed on the representation of each interactive object in the output layer sequence representation to obtain the representation sequence for prediction.

[0069] In embodiments of this application, a learnable scaling factor can be used. Weighted superposition is performed to obtain the predictive representation sequence. This strengthens the impact of interactive information on the final prediction.

[0070]

[0071] Among them, the learnable scaling factor It will automatically learn a suitable value as the recommendation model trains. For example, the output layer sequence representation. If the interactive information is sufficient, then the scaling factor... Automatic learning is small; if the output layer sequence representation If significant amounts of interactive information have been lost, then the scaling factor... It will automatically learn big.

[0072] Figure 5 A schematic diagram of the process for generating predicted semantic identifiers according to an embodiment of this disclosure is shown, such as... Figure 5 As shown, step 150 may include: steps 151-152, wherein: Step 151: Use multiple parallel prediction heads to predict each component of the semantic identifier of the interactive object in the next time step.

[0073] The semantic identifier consists of m sub-vectors, each of which is a discrete vector index (vector index value). To predict the m sub-vectors in parallel, the recommendation model designs m parallel prediction heads after the sequence encoder. Each prediction head is an independent linear classifier responsible for predicting the sub-vector at the corresponding position in the semantic identifier.

[0074] Specifically, the first prediction head receives the prediction representation sequence of the current time step as input and outputs a V-dimensional probability distribution, representing the probability that the first position of the semantic identifier of the next interactive object will take each possible vector index; the second prediction head also receives the prediction representation sequence of the current time step and outputs a V-dimensional probability distribution, representing the probability that the second position will take each possible vector index; and so on, with each of the m prediction heads independently performing classification prediction.

[0075] The parallel prediction method described above can output the prediction results of all m sub-vectors simultaneously. Each sub-vector is independent of the others, the inference speed is fast, and there is no cumulative error caused by serial prediction.

[0076] Step 152: Based on the components of the semantic identifier of the interactive object in the next time step, obtain the predicted semantic identifier corresponding to the interactive object in the next time step.

[0077] The components of the semantic identifier of the interactive object in the next time step are combined in order to form the predicted semantic identifier corresponding to the interactive object in the next time step.

[0078] Taking m=4 as an example: the first prediction head outputs vector index 5, the second prediction head outputs vector index 2, the third prediction head outputs vector index 8, and the fourth prediction head outputs vector index 3. Combining the above 4 vector indices in order, we obtain the predicted semantic identifier [5, 2, 8, 3] corresponding to the interaction object in the next time step.

[0079] In some embodiments, a multi-label prediction loss can be constructed based on the difference between the prediction results of each component and the corresponding components in the real semantic identifier; the recommendation model can be tuned based on the multi-label prediction loss.

[0080] Taking m=4 as an example, with the predicted semantic label as [5, 2, 8, 3] and the true semantic label as [5, 7, 8, 1], the inference model compares the difference between the predicted value and the true value for each corresponding component, and then adds the differences of all components to construct the multi-label prediction loss. In some embodiments, the parameter tuning of the recommendation model can also be performed by: constructing a group contrastive learning loss based on the output layer sequence representation; and tuning the parameter tuning of the recommendation model based on the group contrastive learning loss to obtain the target recommendation model.

[0081] Figure 6 This illustration shows a flowchart of a parameter tuning process for a recommendation model according to an embodiment of the present disclosure, such as... Figure 6 As shown, step 160 may include: steps 161-163, wherein: Step 161: Determine the multi-label prediction loss based on the predicted semantic label and the true semantic label of the next time step.

[0082] The predicted semantic identifiers and ground truth semantic identifiers are compared one by one at each corresponding position of each component. For each component at a position, the prediction head outputs a probability distribution (representing the probability of selecting each vector index in the codebook at that position), while the value of the ground truth semantic identifier at that position is the known ground truth vector index. The negative logarithm of the predicted probability corresponding to the ground truth vector index is calculated, and the resulting value is the prediction loss at that position. The higher the predicted probability corresponding to the ground truth vector index, the smaller the prediction loss at that position; conversely, the lower the predicted probability, the larger the prediction loss. Summing the prediction losses of all m components yields the multi-label prediction loss value for the current sample data.

[0083] That is, the recommendation model simultaneously predicts all the predicted semantic labels for the next time step n. Sub-tags , Let be the vector index of the j-th component in the interaction object n. n is the interaction object corresponding to the next time step, and j is the j-th component in the predicted semantic label of the next time step, with a value ranging from 1 to m. Multi-label prediction loss function. Defined as the sum of the negative log-likelihoods of all sub-tags: By simultaneously applying prediction loss constraints to all sub-tags of the semantic identifier, the recommendation model performs global optimization of the complete identifier vector in the discrete semantic space during the training phase, avoiding the local optimum bias that may be introduced by component-by-component serial prediction, thereby improving the accuracy and stability of the overall semantic identifier prediction.

[0084]

[0085] Where S is the true semantic identifier for the next time step.

[0086] Step 162: Construct group contrastive learning loss based on the preset batch size and output layer sequence representation.

[0087] In this context, a group is a set of multiple different feature representation spaces. In this embodiment, the number of groups is preset. Each group performs weighted aggregation of sequence representations from its own perspective, which means that the recommendation model extracts different aspects of user interests from multiple angles, thereby constraining the semantic identifier components to form a reasonable hierarchical structure relationship.

[0088] To improve training efficiency, the recommendation model processes multiple samples simultaneously, rather than just one sample at a time, according to a preset batch size B. Each sample, after passing through the sequence encoder, corresponds to an output layer sequence representation. Based on the relationship between the output layer sequence representations of multiple samples in the same batch, the recommendation model constructs a group contrastive learning loss. This loss constrains the similarity distribution of different samples in the representation spaces corresponding to different groups, enabling the recommendation model to learn the hierarchical structural information between components in the semantic identifier, thereby supplementing the hierarchical structural information.

[0089] In some embodiments, step 162 may include: performing a linear transformation and normalization on the output layer sequence representation to obtain group attention weights; performing a weighted summation on the representations of each interactive object in the output layer sequence representation according to the group attention weights to obtain group representations; constructing a contrastive learning loss based on the similarity between group representations in the sample data; constructing an intra-group consistency loss based on the group attention weights; and determining the weighted sum of the contrastive learning loss and the intra-group consistency loss as the group contrastive learning loss.

[0090] Given the output layer sequence representation of the Transformer output The output layer sequence is represented by H, which is a three-dimensional matrix of shape B×L×D. To preset batch size, The sequence length characterized by the output layer sequence. To hide the dimension, and to supplement hierarchical structure information, the recommendation model first projects the output layer sequence representation H into a linear layer for transformation, then performs Softmax normalization to obtain group attention weights A, with a shape of B×L×G, where G is the preset number of groups. Each value in group attention weight A represents the strength of the representation's affiliation to a specific group in a given sample and on a specific interaction object, and the sum of the weights across all groups is 1.

[0091] For example, in the first subordinate example, assuming the batch size B is 2, the sequence length L is 3, the hidden dimension D is 64, and the number of groups G is 2, for the three interaction objects of the first sample in the batch, after projection and Softmax processing, the group attention weights are [0.8, 0.2], [0.3, 0.7], and [0.5, 0.5], respectively. Based on this, the group-level representation of the sample is obtained by weighted summation. In the second subordinate example, the similarity between the interaction object identifiers of the second sample and the first sample is higher than the preset threshold. The two are defined as positive sample pairs, and their group-level representations are brought closer in the contrastive learning loss, while the other sample pairs are moved further apart as negative sample pairs.

[0092] After obtaining the group attention weight A, it is used as a weight coefficient to perform a weighted summation of the representations of each interactive object in the output layer sequence representation H. For each group of each sample data, the representations of all interactive objects are weighted and summed according to their corresponding group attention weights to obtain the group representation of the sample data in that group. Each sample data has G group representations, and each group representation contains global information about the sample data in different semantic aspects.

[0093] Among them, the group attention weights are calculated. and group representation The method is as follows:

[0094]

[0095] in, It is the group-level representation value of the b-th sample, the g-th group, and the d-th hidden dimension; It is the representation value of the b-th sample, the l-th interaction object, and the d-th hidden dimension; It represents the attention weights on the b-th sample, the l-th interaction object, and the g-th group.

[0096] To ensure that similar sample data are grouped together in the group representation space, and dissimilar sample data are grouped apart, in this embodiment, sample data pairs with high group representation similarity and similar interaction object identifiers are defined as positive sample pairs and should be brought closer together; other sample data pairs are defined as negative sample data pairs and should be pushed apart. Furthermore, a group contrastive learning loss is constructed based on the distribution of positive and negative sample pairs in the group-level representation space.

[0097] That is, a set of positive sample pairs is constructed based on gating similarity and interaction object identifier similarity. To define the group contrast loss :

[0098] Subsequently, in order to constrain the attention distribution of each interaction object across groups to prevent it from becoming too scattered, it is also necessary to define an intra-group consistency loss. :

[0099] When the affiliation of an interactive object to a specific group is very clear, meaning the attention weight of the interactive object is concentrated on a single group, the corresponding loss is relatively small. Conversely, when the affiliation of an interactive object is ambiguous, meaning the attention weight of the interactive object is distributed across multiple groups, the corresponding loss is relatively large. The aforementioned intra-group consistency loss setting allows the recommendation model to learn a clear and definite group affiliation for each interactive object.

[0100] Subsequently, based on group contrast loss and intragroup consistency loss Determine the total learning loss of the group comparison Among them, group comparison loss Intra-group consistency loss is used to align similar sample data in the group representation space. This is used to make the group affiliation of each interactive object clearer.

[0101] That is, the total learning loss of group contrastive learning. The calculation method is as follows:

[0102] in, This is a hyperparameter used to control the proportion of intragroup consistency loss in the total group contrast loss.

[0103] Step 163: Based on the multi-label prediction loss and group contrastive learning loss, tune the parameters of the recommendation model to obtain the target recommendation model.

[0104] Based on the marked predicted loss Group comparison learning loss Determine the total loss function of the recommendation model. for:

[0105] in, and All of these are hyperparameters.

[0106] Figure 7 The diagram illustrates a flowchart of a generative recommendation method according to an embodiment of this disclosure, as shown below. Figure 7 As shown, the method includes steps 210-230, wherein: Step 210: Obtain the target user's historical interaction sequence.

[0107] During the recommendation phase, the recommendation model acquires the target user's historical interaction records over a certain period of time and constructs the target user's historical interaction sequence based on the chronological order of each interaction object in the historical interaction records. For example, in a short video recommendation scenario, it acquires a list of videos recently watched by the target user; in an e-commerce recommendation scenario, it acquires a list of products recently browsed, favorited, or purchased by the target user.

[0108] Furthermore, to calculate the semantic identifiers of candidate interaction objects, the recommendation model also needs to acquire multimodal information about these objects, such as image and text information. Then, the acquired historical interaction sequences and the multimodal information of each candidate interaction object are used as input to the recommendation model to predict the target user's preference for each candidate interaction object.

[0109] Step 220: Input the historical interaction sequence into the recommendation model, and use the recommendation model to predict the matching degree of the target user with each candidate interaction object.

[0110] The recommendation model adopts the method described above. Figures 1-5 The recommendation model is trained using the training method of any one of the generative recommendation models.

[0111] In some embodiments, step 220 may include: an embedding module using a recommendation model generating semantic identifiers for each candidate interaction object based on the content information of each candidate interaction object; a prediction module using a recommendation model obtaining the predicted semantic identifier of the target user at the next time step; and determining the matching degree based on the similarity between the predicted semantic identifier and the semantic identifiers of each candidate interaction object.

[0112] The content information can be multimodal. Specifically, the embedding module of the recommendation model generates semantic identifiers for each candidate interaction object based on its multimodal information, and simultaneously obtains the interaction object identifier embedding vectors for each candidate interaction object. Subsequently, the fusion module of the recommendation model obtains the original embedding vectors of each interaction object identifier in the target user's historical interaction sequence, maps the semantic identifiers to semantic embedding vectors through a lookup layer, and then fuses the two into an input layer fusion sequence representation through a gated fusion module.

[0113] Furthermore, the sequence encoder of the recommendation model performs context modeling based on the fused sequence representations in the input layer, and in the output layer, it superimposes the original identifiers of each interactive object in the historical interaction sequence into the corresponding output representations through a learnable scaling factor, thereby obtaining the prediction representation sequence for the target user. The output representation of the last time step represents the current overall interest state of the target user.

[0114] Finally, the prediction module of the recommendation model predicts the interaction objects for the next time step based on the prediction representation sequence.

[0115] Specifically, the predicted semantic identifiers output by the prediction module and the semantic identifiers of each candidate interaction object reside in the same discrete space. By calculating the similarity between the predicted semantic identifiers and the semantic identifiers of each candidate interaction object, the matching degree between the target user and each candidate interaction object can be obtained. The higher the matching degree, the more closely the candidate interaction object matches the user's current interests.

[0116] As an example, the similarity between the predicted semantic identifier and the semantic identifier of each candidate interaction object can be calculated using dot product, cosine similarity, or distance metric.

[0117] Step 230: Determine the target recommendation object from each candidate interaction object based on the matching degree.

[0118] Based on the matching degree between the target user and each candidate interaction object, all candidate interaction objects are sorted from high to low according to the matching degree, and the candidate interaction object with the highest matching degree is determined as the target recommendation object.

[0119] In some embodiments, the recommendation system may identify a single candidate interaction object as the target recommendation object (such as the next video in "You May Like"); in addition, the recommendation system may also identify multiple candidate interactions objects that rank highly as the target recommendation objects (such as the Top-K items in the recommendation list).

[0120] Once the target recommendation object is determined, it will be pushed to the target user's client for display, and the user will then see the recommendation results.

[0121] For scenarios that return multiple target recommendation objects, the display order of each target recommendation object can be assigned according to the matching degree, and the target recommendation object with the highest matching degree will be displayed first to improve the recommendation effect and user experience.

[0122] Based on the same inventive concept, this disclosure also provides a training device for a generative recommendation model corresponding to the training method of the generative recommendation model. Since the principle of the device in this disclosure for solving the problem is similar to the training method of the generative recommendation model described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0123] Figure 8 The diagram shows a schematic representation of a training apparatus for a generative recommendation model according to an embodiment of this disclosure. Figure 8 As shown, the device includes: a first acquisition module 310, a generation module 320, a first prediction module 330, and a training module 340, wherein: The first acquisition module 310 is used to acquire sample data from multiple users; the sample data includes historical interaction sequences and multimodal information of each interaction object in the historical interaction sequences; The generation module 320 is used to generate semantic identifiers for each interaction object based on the multimodal information of each interaction object using the embedding module in the recommendation model; to generate an input layer fusion sequence representation based on the interaction object identifiers and semantic identifiers of each interaction object in the historical interaction sequence using the fusion module in the recommendation model; and to obtain a prediction representation sequence based on the input layer fusion sequence representation using the sequence encoder in the recommendation model. The first prediction module 330 is used to use the prediction module in the recommendation model to predict the next time step based on the prediction representation of the current time step in the prediction representation sequence, so as to obtain the prediction semantic identifier corresponding to the interaction object in the next time step. The training module 340 is used to tune the parameters of the recommendation model based on the predicted semantic identifier and the real semantic identifier of the next time step to obtain the target recommendation model.

[0124] In some embodiments, the generation module 320 is specifically used to generate text description information of each interactive object using a multimodal large model based on a preset structured prompt template and the multimodal information of each interactive object; to obtain a dense vector representation of each interactive object using the embedding module based on the text description information of each interactive object; and to generate a semantic identifier of each interactive object according to the dense vector representation of each interactive object and the codebook corresponding to each sub-vector.

[0125] In some embodiments, the first acquisition module 310 is specifically used to acquire the identifier embedding vector corresponding to each of the interactive object identifiers; The generation module 320 is specifically used to map the semantic identifiers of each interactive object into semantic embedding vectors using the lookup layer in the fusion module; and to fuse the identifier embedding vectors and semantic identifier embedding vectors of each interactive object using the fusion module to obtain the input layer fusion sequence representation.

[0126] In some embodiments, the generation module 320 is specifically used to obtain an output layer sequence representation by using a sequence encoder in the recommendation model based on the input layer fusion sequence representation; and to superimpose the identifier embedding vector of each interaction object on the representation of each interaction object in the output layer sequence representation to obtain the prediction representation sequence.

[0127] In some embodiments, the generation module 320 is specifically used to scale the identifier embedding vector of each of the interactive objects according to a learnable scaling factor; and to superimpose the scaled identifier embedding vector onto the representation of each of the interactive objects in the output layer sequence representation to obtain the prediction representation sequence.

[0128] In some embodiments, the training module 340 is specifically used to determine a multi-label prediction loss based on the predicted semantic identifier and the real semantic identifier of the next time step; construct a group contrastive learning loss based on a preset batch size and the output layer sequence representation; and tune the recommendation model based on the multi-label prediction loss and the group contrastive learning loss to obtain a target recommendation model.

[0129] In some embodiments, the training module 340 is specifically used to perform a linear transformation and normalization on the output layer sequence representation to obtain group attention weights; to perform a weighted summation on the representations of each interactive object in the output layer sequence representation according to the group attention weights to obtain group-level representations; to construct a contrastive learning loss based on the similarity between group-level representations in the sample data; to construct an intra-group consistency loss based on the group attention weights; and to determine the group contrastive learning loss as the weighted sum of the contrastive learning loss and the intra-group consistency loss.

[0130] In some embodiments, the first prediction module 330 is specifically used to use multiple parallel prediction heads to predict each component of the semantic identifier of the interactive object in the next time step; and to obtain the predicted semantic identifier corresponding to the interactive object in the next time step based on each component of the semantic identifier of the interactive object in the next time step.

[0131] In some embodiments, the training module 340 is specifically used to construct a multi-label prediction loss based on the difference between the prediction results of each component and the corresponding components in the real semantic identifier; and to tune the recommendation model based on the multi-label prediction loss.

[0132] Based on the same inventive concept, this disclosure also provides a generative recommendation device corresponding to the generative recommendation method. Since the principle of the device in this disclosure for solving the problem is similar to that of the generative recommendation method described above, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0133] Figure 9 A schematic diagram of a generative recommendation device provided in an embodiment of this disclosure is shown, such as... Figure 9 As shown, the device includes: a second acquisition module 410, a second prediction module 420, and a determination module 430, wherein: The second acquisition module 410 is used to acquire the historical interaction sequence of the target user; The second prediction module 420 is used to input the historical interaction sequence into the recommendation model, and predict the matching degree of the target user with each candidate interaction object through the recommendation model; the recommendation model adopts the above-mentioned... Figures 1-6 The recommendation model trained by any of the generative recommendation models described herein; The determining module 430 is used to determine the target recommended object from each candidate interaction object based on the matching degree. The processing flow of each module in the device and the interaction flow between modules can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.

[0134] This disclosure also provides a computer device. Figure 10 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present disclosure, such as... Figure 10 As shown, the system includes: a processor 61, a memory 62, and optionally, a bus 63. The memory 62 stores machine-readable instructions executable by the processor 61. When the computer device is running, the processor 61 communicates with the memory 62 via the bus 63. When the machine-readable instructions are executed by the processor 61, they are executed to perform the following steps: Acquire sample data from multiple users; the sample data includes historical interaction sequences and multimodal information of each interaction object in the historical interaction sequences; The embedding module in the recommendation model generates semantic identifiers for each interaction object based on the multimodal information of each interaction object; Using the fusion module in the recommendation model, an input layer fusion sequence representation is generated based on the interaction object identifier and semantic identifier of each interaction object in the historical interaction sequence; The sequence encoder in the recommendation model fuses sequence representations based on the input layer to obtain a representation sequence for prediction. The prediction module in the recommendation model uses the prediction representation of the current time step in the prediction representation sequence to predict the next time step, thereby obtaining the predicted semantic identifier corresponding to the interaction object in the next time step. Based on the predicted semantic identifier and the real semantic identifier of the next time step, the recommendation model is tuned to obtain the target recommendation model.

[0135] In an optional embodiment of this disclosure, the step of generating semantic identifiers for each interaction object based on the multimodal information of each interaction object using the embedding module in the recommendation model includes: A multimodal large model is used to generate text description information for each interactive object based on a preset structured prompt template and the multimodal information of each interactive object; The embedding module uses the text description information of each interactive object to obtain a dense vector representation of each interactive object; Based on the dense vector representation of each interactive object and the codebook corresponding to each sub-vector, a semantic identifier for each interactive object is generated.

[0136] In an optional embodiment of this disclosure, the step of generating an input layer fusion sequence representation based on the interaction object identifier and semantic identifier of each interaction object in the historical interaction sequence using the fusion module in the recommendation model includes: Obtain the identifier embedding vector corresponding to each of the interactive object identifiers; The lookup layer in the fusion module maps the semantic identifiers of each interactive object into semantic embedding vectors. The fusion module is used to fuse the identifier embedding vector and semantic identifier embedding vector of each interactive object to obtain the input layer fusion sequence representation.

[0137] In an optional embodiment of this disclosure, the step of obtaining a prediction representation sequence by fusing sequence representations based on the input layer using the sequence encoder in the recommendation model includes: The sequence encoder in the recommendation model is used to fuse the sequence representation of the input layer to obtain the sequence representation of the output layer; The identifier embedding vector of each interactive object is superimposed on the representation of each interactive object in the output layer sequence representation to obtain the prediction representation sequence.

[0138] In an optional embodiment of this disclosure, the step of superimposing the identifier embedding vector of each interaction object onto the representation of each interaction object in the output layer sequence representation to obtain the prediction representation sequence includes: The identifier embedding vector of each interactive object is scaled according to a learnable scaling factor; The scaled identifier embedding vector is superimposed on the representation of each interactive object in the output layer sequence representation to obtain the prediction representation sequence.

[0139] In an optional embodiment of this disclosure, the step of tuning the recommendation model based on the predicted semantic identifier and the real semantic identifier at the next time step to obtain the target recommendation model includes: The multi-label prediction loss is determined based on the predicted semantic identifier and the real semantic identifier at the next time step. Based on the preset batch size and the output layer sequence representation, a group contrastive learning loss is constructed. Based on the multi-label prediction loss and the group contrastive learning loss, the recommendation model is tuned to obtain the target recommendation model.

[0140] In an optional embodiment of this disclosure, the step of constructing group contrastive learning loss based on the output layer sequence representation includes: The output layer sequence representation is linearly transformed and normalized to obtain the group attention weights; Based on the group attention weights, the representations of each interactive object in the output layer sequence representation are weighted and summed to obtain a group-level representation; Contrastive learning loss is constructed based on the similarity between group-level representations in the sample data; Construct an intra-group consistency loss based on the group attention weights; The weighted sum of the contrastive learning loss and the intra-group consistency loss is determined as the group contrastive learning loss.

[0141] In an optional embodiment of this disclosure, the step of using the prediction module in the recommendation model to predict the next time step based on the prediction representation of the current time step in the prediction representation sequence, and obtaining the predicted semantic identifier corresponding to the interaction object in the next time step, includes: Multiple parallel prediction heads are used to predict each component of the semantic identifier of the interactive object in the next time step. Based on the components of the semantic identifier of the interactive object in the next time step, the predicted semantic identifier corresponding to the interactive object in the next time step is obtained.

[0142] In an optional embodiment of this disclosure, the step of tuning the recommendation model based on the predicted semantic identifier and the true semantic identifier of the next time step includes: Based on the differences between the prediction results of each component and the corresponding components in the real semantic labels, a multi-label prediction loss is constructed. Based on the multi-label prediction loss, the recommendation model is tuned.

[0143] In an optional embodiment of this disclosure, the upper processor 61 is further configured to perform the following steps: Obtain the target user's historical interaction sequence; The historical interaction sequence is input into a recommendation model, which predicts the matching degree of the target user for each candidate interaction object; the recommendation model is based on the above... Figures 1-6 The recommendation model trained by any of the generative recommendation models described herein; The target recommended object is determined from each candidate interaction object based on the matching degree.

[0144] This disclosure also provides a computer-readable storage medium storing a computer program, which is executed by a processor. Figures 1-7 The steps of the method.

[0145] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or modules may be electrical, mechanical, or other forms.

[0146] Furthermore, the functional units in the various embodiments of this disclosure 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. If the 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 disclosure, in essence, or the part that contributes to the prior art, or part 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 disclosure. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.

[0147] The above are merely specific embodiments of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure.

Claims

1. A training method for a generative recommendation model, characterized in that, The method includes: Acquire sample data from multiple users; the sample data includes historical interaction sequences and multimodal information of each interaction object in the historical interaction sequences; The embedding module in the recommendation model generates semantic identifiers for each interaction object based on the multimodal information of each interaction object; Using the fusion module in the recommendation model, an input layer fusion sequence representation is generated based on the interaction object identifier and semantic identifier of each interaction object in the historical interaction sequence; The sequence encoder in the recommendation model fuses sequence representations based on the input layer to obtain a representation sequence for prediction. The prediction module in the recommendation model uses the prediction representation of the current time step in the prediction representation sequence to predict the next time step, thereby obtaining the predicted semantic identifier corresponding to the interaction object in the next time step. Based on the predicted semantic identifier and the real semantic identifier of the next time step, the recommendation model is tuned to obtain the target recommendation model.

2. The method according to claim 1, characterized in that, The embedding module in the recommendation model generates semantic identifiers for each interaction object based on the multimodal information of each interaction object, including: A multimodal large model is used to generate text description information for each interactive object based on a preset structured prompt template and the multimodal information of each interactive object; The embedding module uses the text description information of each interactive object to obtain a dense vector representation of each interactive object; Based on the dense vector representation of each interactive object and the codebook corresponding to each sub-vector, a semantic identifier for each interactive object is generated.

3. The method according to claim 1, characterized in that, The step of using the fusion module in the recommendation model to generate an input layer fusion sequence representation based on the interaction object identifiers and semantic identifiers of each interaction object in the historical interaction sequence includes: Obtain the identifier embedding vector corresponding to each of the interactive object identifiers; The lookup layer in the fusion module maps the semantic identifiers of each interactive object into semantic embedding vectors. The fusion module is used to fuse the identifier embedding vector and semantic identifier embedding vector of each interactive object to obtain the input layer fusion sequence representation.

4. The method according to claim 3, characterized in that, The step of using the sequence encoder in the recommendation model to fuse sequence representations based on the input layer to obtain a prediction representation sequence includes: The sequence encoder in the recommendation model is used to fuse the sequence representation of the input layer to obtain the sequence representation of the output layer; The identifier embedding vector of each interactive object is superimposed on the representation of each interactive object in the output layer sequence representation to obtain the prediction representation sequence.

5. The method according to claim 4, characterized in that, The step of superimposing the identifier embedding vector of each interaction object onto the representation of each interaction object in the output layer sequence representation to obtain the prediction representation sequence includes: The identifier embedding vector of each interactive object is scaled according to a learnable scaling factor; The scaled identifier embedding vector is superimposed on the representation of each interactive object in the output layer sequence representation to obtain the prediction representation sequence.

6. The method according to claim 5, characterized in that, The step of tuning the recommendation model based on the predicted semantic identifier and the real semantic identifier at the next time step to obtain the target recommendation model includes: The multi-label prediction loss is determined based on the predicted semantic identifier and the real semantic identifier at the next time step. Based on the preset batch size and the output layer sequence representation, a group contrastive learning loss is constructed. Based on the multi-label prediction loss and the group contrastive learning loss, the recommendation model is tuned to obtain the target recommendation model.

7. The method according to claim 6, characterized in that, The construction of group contrastive learning loss based on the output layer sequence representation includes: The output layer sequence representation is linearly transformed and normalized to obtain the group attention weights; Based on the group attention weights, the representations of each interactive object in the output layer sequence representation are weighted and summed to obtain a group-level representation; Contrastive learning loss is constructed based on the similarity between group-level representations in the sample data; Construct an intra-group consistency loss based on the group attention weights; The weighted sum of the contrastive learning loss and the intra-group consistency loss is determined as the group contrastive learning loss.

8. The method according to claim 1, characterized in that, The prediction module in the recommendation model predicts the next time step based on the prediction representation of the current time step in the prediction representation sequence, obtaining the predicted semantic identifier corresponding to the interaction object in the next time step, including: Multiple parallel prediction heads are used to predict each component of the semantic identifier of the interactive object in the next time step. Based on the components of the semantic identifier of the interactive object in the next time step, the predicted semantic identifier corresponding to the interactive object in the next time step is obtained.

9. The method according to claim 8, characterized in that, The parameter tuning of the recommendation model based on the predicted semantic identifier and the real semantic identifier at the next time step includes: Based on the differences between the prediction results of each component and the corresponding components in the real semantic labels, a multi-label prediction loss is constructed. Based on the multi-label prediction loss, the recommendation model is tuned.

10. A generative recommendation method, characterized in that, The method includes: Obtain the target user's historical interaction sequence; The historical interaction sequence is input into the recommendation model, and the recommendation model predicts the matching degree of the target user for each candidate interaction object; the recommendation model is a recommendation model trained using the training method of the generative recommendation model as described in any one of claims 1 to 9; The target recommended object is determined from each candidate interaction object based on the matching degree.

11. A computer device, characterized in that, include: A processor and a memory, the memory storing machine-readable instructions executable by the processor, which, when the computer device is running, are executed by the processor to perform the steps of the method as described in any one of claims 1 to 10.