Item recommendation method and device, computer device

By acquiring the behavioral sequence of the target object, determining the multimodal embedding features of the item identifier, predicting and recommending the target item, the problem of users' ambiguous item recommendation needs in the existing technology is solved, and the processing efficiency and user experience of item recommendation are improved.

CN122451202APending Publication Date: 2026-07-24TENCENT TECH (BEIJING) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT TECH (BEIJING) CO LTD
Filing Date
2025-01-24
Publication Date
2026-07-24

AI Technical Summary

Technical Problem

Existing item recommendation methods cannot meet users' needs for vague item recommendations, especially for users without specific travel plans, resulting in a poor recommendation experience.

Method used

By acquiring the behavioral sequence of the target object, the multimodal embedding features of each item identifier are determined, and the target item is predicted and recommended based on the multimodal embedding features and behavioral sequence.

Benefits of technology

It improves the processing efficiency and user experience of item recommendations, reduces resource consumption, and enables fast and accurate personalized item recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122451202A_ABST
    Figure CN122451202A_ABST
Patent Text Reader

Abstract

The application relates to an article recommendation method and device, computer equipment, a storage medium and a computer program product. The method comprises the following steps: obtaining a behavior sequence of a target object; the behavior sequence is composed of article identifiers of each first article interacted by the target object; determining a multi-modal embedding feature corresponding to each article identifier in the behavior sequence; determining an embedding feature of the behavior sequence based on the multi-modal embedding feature and the behavior sequence; determining a target article to be recommended based on the embedding feature of the behavior sequence, and recommending the target article to the target object. The method can effectively improve the article recommendation experience of a user and bring convenience to the user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer equipment, storage medium, and computer program product for recommending items. Background Technology

[0002] With the development of computer and internet technologies, sequence models have emerged and made significant progress in the field of item recommendation. In recommendation systems, modeling user behavior sequences is primarily used to understand and predict user behavior patterns. Sequence models are an effective method for modeling user behavior sequences. They can help recommendation system backends better understand user interests, habits, and behavioral trends, thereby providing more personalized services or products.

[0003] However, current item recommendation methods, due to the massive number of items in the recommendation system, typically rely on precise searches to query and display item information. This requires users to provide accurate information so that the recommendation platform can filter and recommend items from different categories provided by third-party organizations within the range of information provided by the user. However, in practical applications, this method of item recommendation often fails to meet the needs of users with vague item recommendation requirements. For example, taking air tickets as an example, traditional recommendation platforms mostly display flight and price information based on the user's precise search range, resulting in weak user interaction. This is geared towards users who have travel ideas but no specific travel plans. In other words, the recommendation platform cannot provide relevant guidance or recommendations for users with vague ticketing needs, resulting in a poor user experience for these users. Therefore, improving the user's item recommendation experience has become an urgent problem to be solved. Summary of the Invention

[0004] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product for recommending items, which can effectively improve the user's item recommendation experience and bring convenience to the user.

[0005] In a first aspect, this application provides an item recommendation method. The method includes: obtaining a behavior sequence of a target object; the behavior sequence consisting of item identifiers of each first item interacted with by the target object; determining multimodal embedding features corresponding to each item identifier in the behavior sequence; determining embedding features of the behavior sequence based on the multimodal embedding features and the behavior sequence; determining target items to be recommended based on the embedding features of the behavior sequence, and recommending the target items to the target object.

[0006] Secondly, this application also provides an item recommendation device. The device includes: an acquisition module, configured to acquire a behavior sequence of a target object; the behavior sequence consists of item identifiers of each first item interacted with by the target object; a determination module, configured to determine multimodal embedding features corresponding to each item identifier in the behavior sequence; determine embedding features of the behavior sequence based on the multimodal embedding features and the behavior sequence; determine a target item to be recommended based on the embedding features of the behavior sequence; and a recommendation module, configured to recommend the target item to the target object.

[0007] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor. The memory stores a computer program, and the processor, when executing the computer program, performs the following steps: acquiring a behavioral sequence of a target object; the behavioral sequence consists of item identifiers of each first item interacted with by the target object; determining multimodal embedding features corresponding to each item identifier in the behavioral sequence; determining embedding features of the behavioral sequence based on the multimodal embedding features and the behavioral sequence; determining a target item to be recommended based on the embedding features of the behavioral sequence, and recommending the target item to the target object.

[0008] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps: acquiring a behavioral sequence of a target object; the behavioral sequence consisting of item identifiers of each first item interacted with by the target object; determining multimodal embedding features corresponding to each item identifier in the behavioral sequence; determining embedding features of the behavioral sequence based on the multimodal embedding features and the behavioral sequence; determining a target item to be recommended based on the embedding features of the behavioral sequence, and recommending the target item to the target object.

[0009] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps: acquiring a behavior sequence of a target object; the behavior sequence consisting of item identifiers of each first item interacted with by the target object; determining multimodal embedding features corresponding to each item identifier in the behavior sequence; determining embedding features of the behavior sequence based on the multimodal embedding features and the behavior sequence; determining a target item to be recommended based on the embedding features of the behavior sequence, and recommending the target item to the target object.

[0010] The aforementioned item recommendation method, apparatus, computer equipment, storage medium, and computer program product acquire a behavior sequence of a target object, which consists of item identifiers of each first item interacted with by the target object, and determine the multimodal embedding features corresponding to each item identifier in the behavior sequence. Further, based on the multimodal embedding features and the behavior sequence, the embedding features of the behavior sequence are determined, and the target item to be recommended is determined based on the embedding features of the behavior sequence, and the target item is recommended to the target object. Since the multimodal embedding features corresponding to each item identifier in this application are pre-extracted and trained, and the behavior sequence of the target object in this application consists of item identifiers of each first item interacted with by the target object, the multimodal embedding features corresponding to each item identifier can be quickly and accurately determined directly based on the item identifiers in the behavior sequence. This allows for the subsequent prediction of the embedding features of the behavior sequence based on the behavior sequence and the determined multimodal embedding features, and the determination of the target item to be recommended based on the predicted embedding features of the behavior sequence. This effectively improves the speed of processing behavior sequences, consumes relatively few resources, and thus improves the processing efficiency of item recommendation, providing users with a better item recommendation experience and convenience. Attached Figure Description

[0011] Figure 1 This is a diagram illustrating the application environment of the item recommendation method in one embodiment;

[0012] Figure 2 This is a flowchart illustrating an item recommendation method in one embodiment;

[0013] Figure 3 This is a schematic diagram of the product-side display interface of the item recommendation method provided in one embodiment;

[0014] Figure 4 This is a flowchart illustrating the inference process of the recommendation model in one embodiment;

[0015] Figure 5 This is a flowchart illustrating the steps of determining the embedding features of a behavior sequence based on multimodal embedding features and behavior sequences in one embodiment.

[0016] Figure 6 This is a schematic diagram of the basic structure of a recommendation model with two-stage training in one embodiment;

[0017] Figure 7 This is a flowchart illustrating the step of determining the first output probability value based on sample embedding features in one embodiment.

[0018] Figure 8 This is a schematic diagram of the interface display on the product side in one embodiment;

[0019] Figure 9This is a structural block diagram of an item recommendation device in one embodiment;

[0020] Figure 10 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0022] It should be noted that in the following description, the terms "first, second, and third" are used only to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, and third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0023] The item recommendation method provided in this application embodiment can be applied to, for example, Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be a standalone device, integrated into server 104, or located in the cloud or on other network servers. Specifically, terminal 102 can interact with the recommendation platform, i.e., server 104. Terminal 102 can obtain the behavior sequence of the target object, which consists of the item identifiers of each first item interacted with by the target object. Terminal 102 sends the behavior sequence to the recommendation platform, i.e., server 104, so that server 104 can determine the multimodal embedding features corresponding to each item identifier in the behavior sequence, and based on the multimodal embedding features and the behavior sequence, determine the embedding features of the behavior sequence. Furthermore, server 104 can determine the target item to be recommended based on the embedding features of the behavior sequence and return the target item to be recommended to terminal 102, so that terminal 102 can recommend the target item to the target object.

[0024] Terminal 102 can be a smartphone, tablet, laptop, desktop computer, smart speaker, smart TV, smartwatch, IoT device, or portable wearable device. IoT devices can include smart in-vehicle devices, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc.

[0025] Server 104 can be an independent physical server or a service node in a blockchain system. The service nodes in the blockchain system form a peer-to-peer (Peer To Peer) network. The Peer To Peer protocol is an application layer protocol that runs on top of the Transmission Control Protocol (TCP).

[0026] In addition, server 104 can also be a server cluster consisting of multiple physical servers, which can be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms.

[0027] Terminal 102 and server 104 can be connected via Bluetooth, USB (Universal Serial Bus) or network, etc., and this application does not impose any restrictions.

[0028] In one embodiment, such as Figure 2 As shown, an item recommendation method is provided. This method can be executed by the server or the terminal alone, or by both the server and the terminal. This method can be applied to... Figure 1 Taking the terminal in the example, the explanation includes the following steps:

[0029] Step 202: Obtain the behavior sequence of the target object; the behavior sequence consists of the item identifiers of each first item that the target object has interacted with.

[0030] The target object refers to a specific object. For example, the target object in this application could be different registered users in the recommendation application.

[0031] A behavior sequence refers to a sequence that reflects the behavior pattern (or behavior trend) of a target object. For example, the behavior sequence in this application can be an item sequence, which contains the item identifiers of each item that the target object has interacted with. For example, if user A browses item A, item B, and item C in a recommendation application, the behavior sequence obtained based on the item records that user A has browsed (interacted with) in the past is S1(SASBSC). User A is the target object, and the item sequence S1(SA, SB, SC) is the behavior sequence of user A. Moreover, the item sequence S1 is composed of the item identifiers of each item (item A, item B, and item C) that user A has browsed (interacted with) in the past.

[0032] The first item refers to all the items that the target object has interacted with. For example, the first item in this application includes, but is not limited to, various types of items such as videos, pictures, articles, promotional messages, and products that the target object has viewed.

[0033] An item identifier is used to identify a unique item. For example, the item identifier in this application can be a serialized code or a string.

[0034] Step 204: Determine the multimodal embedding features corresponding to each item identifier in the behavior sequence.

[0035] Among them, multimodal embedding features refer to the fused embedding representation obtained by combining image features and text features. For example, the multimodal embedding features corresponding to each item identifier in this application can be: after obtaining the initial multimodal embedding features by pre-extracting features from the image information and text information of each item through a multimodal large language model, the initial multimodal embedding features are then input into the embedding layer of the initial model as initial features. After training the model, richer multimodal embedding features are obtained, and the multimodal embedding features obtained after training are stored in the database or the embedding layer of the model, so that the corresponding multimodal embedding features can be directly retrieved from the database or the embedding layer of the model by item identifier on the application side.

[0036] Specifically, the item recommendation method provided in this application can be widely applied to various personalized item recommendation scenarios such as social networking, gaming, and ticketing. For example, given an item sequence x1…x1 of n items viewed by a user. n The item recommendation method provided in this application can be based on the item sequence x1…x nThis technology allows for the rapid and accurate recommendation of one or more target items to a user, and it has wide applications in social entertainment, product promotion, and gaming. Different users (the objects of operation) can interact with the multimedia information platform (or application) using their devices. When a user (the object of operation) wants to browse personalized recommendations, they can trigger an action to open a multimedia application (APP) on their terminal and then select an option to enter the application's main page. In other words, the user can log in to a multimedia application (such as a video application) by triggering an action. Furthermore, the user can initiate an item recommendation request from the main page of the multimedia application by triggering an action. For example, on the main page of a video application displayed on the terminal, various users of the video application (such as developers) can view the specific content and related functional information on the main page. Each user can trigger a video recommendation request by clicking the "Recommend" control. The terminal then responds to the video recommendation request triggered by the user on the main page of the video application and obtains the behavior sequence of the user, i.e., the target object. After obtaining the behavior sequence of the user, the terminal can determine the multimodal embedding features corresponding to each item identifier in the behavior sequence. For example, the terminal can use a pre-trained recommendation model to perform feature lookup based on the behavior sequence of the target object to obtain the multimodal embedding features corresponding to each item identifier in the behavior sequence of the target object.

[0037] It is understood that the method provided in this application can be implemented through interaction between the terminal and the backend server of the video application, or through interaction between the frontend and backend of the terminal. That is, the frontend of the terminal is used to display the target items recommended to the target object, and the backend of the terminal is equivalent to the backend server, which is used for logical processing such as recognition, feature search, and decoding of the target object's behavior sequence.

[0038] Let's take personalized video recommendation as an example. Assume the multimedia application is a video application. For example... Figure 3 The diagram shown illustrates the display interface of the item recommendation method provided in this application on the product side. Specifically, when user A (the user object) wants to browse personalized recommended videos, user A can trigger an operation to open the video application A on the terminal and select an option to access the recommended video. Figure 3 As shown in the main page of video application A, user A can log in to video application A by triggering an action. Furthermore, user A can view the following on video application A: Figure 3 On the main page shown, a video recommendation request is initiated by triggering an action. For example, as displayed on the terminal... Figure 3 On the main page shown, user A can click on, for example... Figure 3The "Input" control on the main page shown is used to respond to user A's click operation, displaying an input box or input page. After user A completes the input operation (such as entering user A's own user ID), user A can further click on other input methods such as... Figure 3 The "Recommendation Start" control on the main page is used to initiate a video recommendation request. In response to user A's click on "Recommendation Start" (i.e., video recommendation request) on the main page, the terminal obtains the behavior sequence corresponding to user A's own user identifier, and performs feature lookup based on user A's behavior sequence using a pre-trained recommendation model. This allows the terminal to obtain the multimodal embedding features corresponding to each item identifier in user A's behavior sequence.

[0039] Step 206: Determine the embedding features of the behavior sequence based on the multimodal embedding features and the behavior sequence.

[0040] In this context, the embedding feature of a behavior sequence refers to the embedding feature corresponding to the next item identifier predicted based on the behavior sequence of the target object; it can also be called the predicted embedding feature. For example, if the behavior sequence S1 (SASBSC) of the target object contains three item identifiers, then the embedding feature corresponding to the predicted next item identifier, i.e., the fourth item identifier, is the embedding feature (predicted embedding feature) of the behavior sequence S1 (SASBSC).

[0041] Step 208: Determine the target item to be recommended based on the embedded features of the behavior sequence, and recommend the target item to the target object.

[0042] Here, the target item refers to the relevant item determined based on the embedded features of the predicted behavioral sequence. It is understood that the target item to be recommended in this application can be one or more, and no specific limitation is made here.

[0043] Specifically, after the terminal determines the multimodal embedding features corresponding to each item identifier in the behavior sequence of the target object, the terminal can use a pre-trained recommendation model to decode the multimodal embedding features corresponding to each item identifier in the behavior sequence and the behavior sequence to obtain the predicted embedding features of the behavior sequence. Based on the predicted embedding features of the behavior sequence, the terminal determines the item identifier to be recommended and recommends the item corresponding to the item identifier as the target item to the target object.

[0044] Specifically, when processing the behavior sequence of a target object using a pre-trained recommendation model, the terminal can use the decoding layer of the recommendation model to decode the multimodal embedding features corresponding to each item identifier in the behavior sequence and the behavior sequence itself, obtaining multiple embedding representation vectors. That is, the number of embedding representation vectors is the same as the number of item identifiers contained in the behavior sequence. From these multiple embedding representation vectors, the embedding representation vector corresponding to the item identifier at the target position (end position) in the behavior sequence is selected as the predicted embedding feature of the behavior sequence. Furthermore, the terminal can use the embedding layer of the recommendation model to find a preset number of target embedding features whose distance from the predicted embedding features of the behavior sequence meets a distance threshold, and the items corresponding to the item identifiers of the found target embedding features are selected as the target items to be recommended.

[0045] Let's take a personalized video recommendation scenario as an example. Suppose user A clicks on a video recommendation page... Figure 3 The “Recommendation Start” control shown indicates that the terminal responds to user A’s click on the “Recommendation Start” action (i.e., video recommendation request) on the page. It obtains the behavior sequence S1 (SASBSC) corresponding to user A and inputs the behavior sequence S1 into the pre-trained recommendation model. The embedding layer of the recommendation model performs feature lookup based on user A’s behavior sequence S1 to obtain the multimodal embedding features e0, e1, and e2 corresponding to each item identifier in user A’s behavior sequence S1. The decoding layer of the recommendation model decodes the multimodal embedding features e0, e1, and e2 corresponding to each item identifier in the behavior sequence S1 and the behavior sequence S1 to obtain multiple embedding representation vectors h1, h2, and h3. That is, the number of embedding representation vectors is 3, which is the same as the number of item identifiers (n=3) contained in the behavior sequence S1. From the multiple embedding representation vectors (h1, h2, h3), the embedding representation vector h3 corresponding to the item identifier SC at the target position (end position SC) in the behavior sequence is selected as the predicted embedding feature of the behavior sequence S1. Furthermore, the terminal can use the embedding layer of the recommendation model to find a preset number of target embedding features whose distance to the predicted behavior sequence S1 embedding feature h3 meets a distance threshold. For example, the terminal can use an approximate nearest neighbor algorithm to find the k features that are closest to the embedding feature h3 in the embedding layer of the recommendation model, and use the items corresponding to the item identifiers of the k found features as the target items to be recommended.

[0046] In this embodiment, the behavior sequence of the target object is obtained, which consists of the item identifiers of each first item that the target object has interacted with, and the multimodal embedding features corresponding to each item identifier in the behavior sequence are determined. Further, based on the multimodal embedding features and the behavior sequence, the embedding features of the behavior sequence are determined, and the target item to be recommended is determined based on the embedding features of the behavior sequence, and the target item is recommended to the target object. Since the multimodal embedding features corresponding to each item identifier in this application are pre-extracted and input into the model through training iterations, and the behavior sequence of the target object in this application consists of the item identifiers of each first item that the target object has interacted with, the multimodal embedding features corresponding to each item identifier can be quickly and accurately determined directly based on the item identifiers in the behavior sequence. This allows the embedding features of the behavior sequence to be predicted directly based on the behavior sequence and the determined multimodal embedding features, and the target item to be recommended can be determined based on the predicted embedding features of the behavior sequence. This effectively improves the speed of processing behavior sequences, consumes relatively little resources, and thus improves the processing efficiency of item recommendation, providing users with a better item recommendation experience and convenience.

[0047] In one embodiment, the method further includes:

[0048] Obtain the item identifiers of each first item that the target object has interacted with;

[0049] The item identifiers are serialized to obtain the behavior sequence of the target object;

[0050] Store the behavioral sequences in a database;

[0051] The sequence of actions for obtaining the target object includes:

[0052] Retrieve the behavior sequence of the target object from the database.

[0053] Specifically, let's take personalized video recommendation as an example. The terminal can obtain the video identifiers of each video that different users have interacted with at preset time intervals, serialize each video identifier to obtain the behavior sequence of different users, and store the behavior sequence of different users in the database so that the behavior sequence of different users can be directly retrieved from the database later. For example, assuming the target object is user A, when the terminal is idle, the terminal can obtain the video identifiers of each video that the target object, i.e., user A, has interacted with, and serialize each video identifier to obtain the behavior sequence S1 of the target object, i.e., user A, and store the behavior sequence S1 in the database. Furthermore, when user A wants to browse some personalized recommended videos, or when the recommendation system wants to recommend some personalized videos to user A, the terminal (or the backend of the recommendation system) can directly obtain the behavior sequence of the target object, i.e., user A, from the database, and input the behavior sequence of user A as an input parameter into the pre-trained recommendation model, so that the recommendation model processes the behavior sequence of user A, outputs the predicted embedding features of the behavior sequence of user A, and determines the target video to be recommended based on the predicted embedding features of the behavior sequence of user A, so as to recommend the target video to the target object, i.e., user A. Understandably, in some situations, when user A wants to browse personalized recommended videos, or when the recommendation system wants to recommend personalized videos to user A, the terminal (or the backend of the recommendation system) can obtain the video identifiers of each video that the target object, i.e., user A, has interacted with on that day (or within a preset time period), and serialize each video identifier to obtain the behavior sequence S1 of the target object, i.e., user A. Based on the behavior sequence S1, the target video to be recommended is determined and recommended to the target object, i.e., user A. This allows for the prior acquisition of video identifiers interacted with by different users, and the serialization of each video identifier to obtain the behavior sequences of different users. These behavior sequences are then stored in a database, enabling subsequent processing by directly retrieving the behavior sequences of different users from the database. This further improves the speed of the model's sequence processing, with relatively low resource consumption, thus providing users with a better video recommendation experience and greater convenience.

[0054] In one embodiment, after obtaining the behavior sequence of the target object, the method further includes:

[0055] Get the number of item identifiers contained in the action sequence;

[0056] If the number is less than a preset number, a mask is used to fill in the behavior sequence to obtain the target behavior sequence; or,

[0057] If the number exceeds the preset number, select the preset number of item icons from the behavior sequence according to the interaction time, and use the selected item icons as the target behavior sequence;

[0058] Determining the multimodal embedding features corresponding to each item identifier in the behavior sequence includes:

[0059] By using a recommendation model, feature lookup is performed based on the target behavior sequence to obtain the multimodal embedding features corresponding to each item identifier in the target behavior sequence.

[0060] The preset quantity refers to the number of item identifiers contained in a pre-set sequence. In this application, the preset quantity can be determined based on the number of identifiers contained in the sample sequence during training. For example, if the sample sequence used in the model training phase contains N item identifiers, then the preset quantity also needs to be set to N. That is, when using the trained recommendation model to process the user's behavior sequence, the number of identifiers contained in the sequence input to the recommendation model needs to be the same as the number of identifiers in the sample sequence used during training.

[0061] Specifically, let's take personalized video recommendation as an example. Assume that during model training, the sample sequence used contains 5 item identifiers, then the preset quantity n also needs to be set to 5. After the terminal obtains the behavior sequence S1(x1x2x3) of the current operation object (target object, user A), the terminal can further obtain the number L=3 of item identifiers (i.e., video identifiers) contained in this behavior sequence S1. Since L=3 is less than the preset quantity n=5, meaning the number of identifiers in this behavior sequence is less than the preset number of identifiers, the terminal can use a mask to fill in the behavior sequence S1 to obtain the target behavior sequence. For example, the terminal can use a mask of 0 to fill in the behavior sequence S1 to obtain the target behavior sequence S11(x1x2x300).

[0062] Alternatively, assuming the terminal obtains a behavior sequence S2 (x1x2x3x4x5x6) containing 6 identifiers (L=6), meaning the number of identifiers L=6 in behavior sequence S2 is greater than the preset number of identifiers n=5, the terminal can select a preset number n=5 item identifiers (x1x2x3x4x5) from behavior sequence S2 according to the interaction time, and use the selected item identifiers as the target behavior sequence S22 (x1x2x3x4x5). For example, the terminal can calculate the time interval between the interaction time of each video identifier in behavior sequence S2 and the current time, sort them in ascending order of time interval, and select the top 5 video identifiers (x1x2x3x4x6) with the smallest time intervals from the sorted video identifiers as the target behavior sequence S22 (x1x2x3x4x6).

[0063] Furthermore, after the terminal obtains the target behavior sequence S11(x1x2x300) or S22(x1x2x3x4x6), the terminal can use a pre-trained recommendation model to perform feature lookup based on the target object's behavior sequence S11(x1x2x300) or S22(x1x2x3x4x6) to obtain the multimodal embedding features corresponding to each video identifier in the target object's behavior sequence S11(x1x2x300) or S22(x1x2x3x4x6).

[0064] In this embodiment, since the embedding layer weights are initialized using multimodal embedding representations of items instead of random initialization during the model training phase, the convergence speed during model training is further improved. Consequently, when the model is applied, feature lookup can be performed directly based on the identifiers contained in the target behavior sequence, which can quickly and accurately obtain the initialized multimodal embedding features corresponding to each item identifier. This effectively improves the speed of model data processing and also effectively avoids the problems of poor controllability, high resource consumption, and non-standard ID generation introduced by using pre-trained large models in traditional methods, thereby improving the processing efficiency of item recommendation.

[0065] In one embodiment, the step of obtaining the multimodal embedding features corresponding to each item identifier in the target behavior sequence by performing feature lookup based on the target behavior sequence using a recommendation model includes:

[0066] The target behavior sequence is input into the recommendation model, so that the embedding layer of the recommendation model sequentially searches for the multimodal embedding features corresponding to each item identifier in the target behavior sequence. During the search process, if there is no corresponding multimodal embedding feature for the currently queried item identifier in the target behavior sequence, the search continues to find the multimodal embedding feature corresponding to the next item identifier in the target behavior sequence.

[0067] Specifically, let's take a personalized video recommendation scenario as an example. After the terminal obtains the target behavior sequence S11(x1x2x300) or S22(x1x2x3x4x6), the terminal can input the target behavior sequence into the recommendation model. This allows the embedding layer of the recommendation model to sequentially search the database for multimodal embedding features corresponding to each item identifier in the target behavior sequence, or to sequentially search the embedding layer for multimodal embedding features corresponding to each item identifier in the target behavior sequence. In this way, the multimodal embedding features corresponding to each video identifier in the target object's behavior sequence S11(x1x2x300) or S22(x1x2x3x4x6) can be obtained.

[0068] like Figure 4 The diagram shows the inference process of the recommendation model. For example, the terminal can input the target behavior sequence S11 (x1x2x300) into a system like this. Figure 4 The recommendation model shown allows the embedding layer of the recommendation model to sequentially search for multimodal embedding features corresponding to each video identifier (x1x2x300) in the target behavior sequence S11 (x1x2x300). During the search process, if the currently queried video identifier x1 in the target behavior sequence does not have a corresponding multimodal embedding feature, that is, if no multimodal embedding feature corresponding to video identifier x1 is found in the embedding layer, the terminal can continue to search for the multimodal embedding feature corresponding to the next video identifier x2 in the target behavior sequence S11 (x1x2x300) through the embedding layer of the recommendation model, until all video identifiers contained in the target behavior sequence are traversed and queried, thus obtaining the multimodal embedding features corresponding to each video identifier (x1x2x3) in the target behavior sequence S11 (x1x2x300).

[0069] It is understandable that since the last two identifiers in the target behavior sequence S11(x1x2x300) are obtained by using a mask, during the search process, it is possible to traverse and query the identifiers at the mask filling positions, or ignore the identifiers at the mask filling positions, that is, to automatically ignore the identifiers at the mask filling positions as special identifiers, without needing to perform the query step.

[0070] In this embodiment, by using the embedding layer of the trained model to perform feature lookup on each identifier contained in the user's behavior sequence, the multimodal embedding features corresponding to each identifier can be obtained quickly and accurately, which effectively improves the speed of model data processing. At the same time, it effectively avoids the problems of poor controllability, high resource consumption, and non-standard ID generation introduced by the traditional method when using a pre-trained large model, thereby improving the processing efficiency of item recommendation.

[0071] In one embodiment, such as Figure 5 As shown, the steps for determining the embedding features of a behavior sequence based on multimodal embedding features and the behavior sequence include:

[0072] Step 502: The multimodal embedding features and behavior sequences are decoded through the decoding layer of the recommendation model to obtain the embedding representation vectors; the number of embedding representation vectors is the same as the number of item identifiers.

[0073] Step 504: Select the embedded representation vector corresponding to the item identifier at the target location in the behavior sequence from the embedded representation vector as the embedded feature of the behavior sequence.

[0074] The internal structure of the recommendation model in this application can be as follows: Figure 4 The structure shown indicates that the decoding layer of the recommendation model can be as follows: Figure 4 The Transformer layer shown is a deeper decoder built from stacked Transformer decoder blocks with masking mechanisms to improve the model's performance and generalization ability.

[0075] Specifically, such as Figure 4 As shown, assume that the behavior sequence of the target object obtained by the terminal is S1 (I1…I…) n ), and the behavior sequence S1 (I1…I n Enter as follows Figure 4 In the trained recommendation model shown, the embedding layer of the recommendation model sequentially searches for the action sequence S1 (I1…I…) from the database or from the embedding layer. n The multimodal embedding features corresponding to each item identifier in the data are used to obtain the behavior sequence S1 (I1…I) of the target object. n After embedding the multimodal features corresponding to each item identifier in the data, the terminal can output the behavior sequence S1 (I1…I…) of the target object from the embedding layer. n The multimodal embedding features corresponding to each item identifier in the () are used as input parameters for the next layer (decoding layer), that is, through, as shown in the example Figure 4 The decoding layer (Transformer layer) of the recommendation model shown represents the action sequence S1 (I1…I) of the target object. n The multimodal embedding features corresponding to each item identifier in the (I1…I) and the behavior sequence S1 (I1…I) n The decoding process is performed to obtain embedded representation vectors, where the number of obtained embedded representation vectors is related to the behavior sequence S1 (I1…I…). nThe number of item identifiers contained in the sequence is the same. Furthermore, the terminal, through the decoding layer of the recommendation model, selects the embedding representation vector corresponding to the item identifier at the target position (e.g., the end position) in the behavior sequence from the output embedding representation vectors as the predicted embedding feature of the behavior sequence. For example, the terminal extracts the embedding representation vector output by the last Transformer decoding block (i.e., the Nth Transformer decoding block) from the corresponding position of the last token (i.e., the last item identifier in the sequence) input to the decoding layer of the recommendation model, and uses this embedding representation vector as the embedding representation (embedding hidden state) predicted by the recommendation model for the behavior sequence. This allows for better capture of the embedding features in the behavior sequences of different users using the efficient model structure of pre-trained large language models. This enables wider application of large language model architectures in recommendation applications to process data under limited computing resources, effectively improving the speed of data processing and thus enhancing the efficiency of item recommendation through the model.

[0076] In one embodiment, the step of determining the target item to be recommended based on the embedded features of the behavior sequence includes:

[0077] By using the embedding layer of the recommendation model, a preset number of target embedding features are found whose distance from the embedding features of the behavior sequence meets a distance threshold.

[0078] The item corresponding to the item identifier with the embedded feature of the target is used as the target item to be recommended.

[0079] Specifically, after the terminal predicts the embedding features h of the target object's behavior sequence using a pre-trained recommendation model, the terminal can use the embedding layer of the recommendation model to find a preset number of target embedding features whose distance from the embedding features h of the behavior sequence meets a distance threshold L, and then select the items corresponding to the item identifiers of these target embedding features as the target items to be recommended. Alternatively, the terminal can also use the embedding layer of the recommendation model to find a preset number of target embedding features whose distance from the embedding features h of the behavior sequence meets a distance threshold L from the database, and then select the items corresponding to the item identifiers of these target embedding features as the target items to be recommended. For example, if the preset distance threshold is L=100, the terminal can use the embedding layer of the recommendation model to find the first 6 target embedding features whose distance from the embedding features h of the behavior sequence is less than the distance threshold L=100 from the database or the embedding layer, and select the items corresponding to the item identifiers of these 6 target embedding features as the target items to be recommended. Thus, the terminal can finally recommend 6 target items to the target object. This allows the terminal to recommend any user's item sequence x1…x after the model training is complete. kOnce the model is trained, its Transformer layer can output the predicted item sequence x1…x for the user. k The embedded representation h can be used to find the k items that are closest to the embedded representation h in the model's embedding layer for recommendation. This effectively improves the processing efficiency of item recommendation through the model, thereby improving the user's item recommendation experience and bringing convenience to the user.

[0080] In one embodiment, the first item is an item that the target object interacts with in a first time period, and the method further includes:

[0081] Obtain the item identifier of the second item that the sample object interacted with in the second time period to obtain the historical item identifier; the second time period precedes the first time period.

[0082] The initial recommendation model is trained using a sample sequence composed of historical item identifiers to obtain the recommendation model.

[0083] The sample object refers to the sample sequence used during the model training phase. The sample object in this application may or may not include the target object.

[0084] In this application, the first item and the second item are merely used to distinguish items that the object interacted with at different time periods. For example, the second item could be an item that was interacted with before the model training phase, while the first item could be an item that was interacted with after the model training was completed.

[0085] Specifically, such as Figure 6 The diagram illustrates the basic structure of a two-stage training recommendation model. The terminal can obtain the item identifiers of the second items interacted with by the sample object in the second time period, thus obtaining historical item identifiers. The second time period precedes the first time period. Based on the sample sequence composed of historical item identifiers, the initial recommendation model is trained to obtain the trained recommendation model. For example, the terminal can obtain the item identifiers of each second item interacted with by the sample object in the second time period (before the model starts training), obtaining a set of historical item identifiers, and then train the initial recommendation model based on the sample sequence I1…I… composed of the historical item identifier set. n Furthermore, the terminal can utilize sample sequences I1…I n By performing a two-stage model training on the initial recommendation model, a trained recommendation model can be obtained. Therefore, the two-stage training method proposed in this application can significantly accelerate the training speed of recommendation models based on large language model structures, enabling the model to be more widely applied to various sequence recommendation tasks with limited computing resources, and improving the model's convergence speed while ensuring the accuracy of model predictions.

[0086] In one embodiment, the method further includes:

[0087] Using a multimodal model, initial multimodal embedding features of each historical item identifier in the sample sequence are extracted.

[0088] The embedding layer of the initial recommendation model is initialized based on the initial multimodal embedding features of each historical item identifier.

[0089] The initial recommendation model is trained using a sample sequence composed of the historical item identifiers to obtain the recommendation model, including:

[0090] Based on the sample sequence, the initial recommendation model is trained in the first and second stages to obtain the recommendation model.

[0091] Here, the initial multimodal embedding features refer to the fused features of each item corresponding to its identifier, extracted in advance by other models. For example, the initial multimodal embedding features in this application can be the fused embedding features corresponding to each item obtained by pre-extracting and fusing the image and text information of each item using a multimodal large language model. That is, the multimodal model in this application can be a multimodal large language model.

[0092] Specifically, during the model training phase, such as Figure 6 As shown, the terminal can pre-extract initial multimodal embedding features of items corresponding to each historical item identifier in the sample sequence using a multimodal model. Based on these initial multimodal embedding features, the terminal initializes the embedding layer of the initial recommendation model, inputting these features as initialization parameters into the embedding layer. Further, the terminal can perform first and second stage training on the initial recommendation model based on the sample sequence and the initial multimodal embedding features in the embedding layer to obtain the trained recommendation model. Alternatively, the terminal can input the initial multimodal embedding features of items corresponding to each historical item identifier as initialization parameters into the embedding layer of the initial recommendation model to complete the initialization of the embedding layer (obtaining initialized multimodal embedding features), and then perform first and second stage training on the initialized initial recommendation model based on the sample sequence to obtain the trained recommendation model. In addition, to accelerate model convergence and make the training process more stable, the embedding features of the items corresponding to these historical item identifiers can be regularized using the L2 norm. The weights of these multimodal embedding features will be adjusted during the training process, thereby accelerating the convergence speed of the model.

[0093] In one embodiment, the step of training the initialized initial recommendation model in a first stage and a second stage based on a sample sequence to obtain the recommendation model includes:

[0094] For either the first or second stage, the multimodal embedding features of each historical item identifier in the sample sequence are determined based on the initial multimodal embedding features and the sample sequence through the initial embedding layer in the initial recommendation model. The sample embedding features of the sample sequence are then determined through the decoding layer of the initial recommendation model.

[0095] During the first stage of training, the first output probability value is determined based on the sample embedding features through the first output layer of the initial recommendation model until the first stage of training reaches the first preset number of times, and then the second stage of training begins.

[0096] During the second stage of training, the second output probability value is determined based on the sample embedding features through the second output layer of the initial recommendation model until the number of training iterations in the second stage reaches the second preset number, at which point training stops and the recommendation model is obtained.

[0097] In this context, the sample embedding feature of a sample sequence refers to the embedding feature corresponding to the next item identifier output by the decoding layer, also known as the predicted sample embedding feature. Specifically, in this application, the sample embedding feature of a sample sequence refers to the embedding feature corresponding to the next item identifier in the sample sequence predicted by the model. For example, if a sample sequence S1 (SASBSC) contains three item identifiers, then the embedding feature corresponding to the predicted next item identifier, i.e., the fourth item identifier, is the sample embedding feature (predicted sample embedding feature) of the sample sequence S1 (SASBSC).

[0098] The first and second stages are merely used to distinguish different phases of model training. For example, in the first stage of model training in this application, the loss function used is the "negative sampling cross-entropy loss function," which effectively avoids the heavy computational burden caused by calculating cross-entropy for global item identifiers, while also initially obtaining the suboptimal weights in the entire recommendation model. In the second stage of model training in this application, the loss function used is the "global item ID cross-entropy loss function," meaning that the suboptimal weights from the first stage are fine-tuned during the second stage of training, thereby improving the model's convergence speed while ensuring the accuracy of model predictions.

[0099] The first and second output layers are simply used to distinguish the different output layers used in different stages of model training. For example, ... Figure 6As shown, the output layer of the model training phase in this application includes two sub-layers: a "global item ID probability output layer" and a "negative sampled item ID probability output layer." That is, the first output layer in this application can be... Figure 6 The "negative sampling item ID probability output layer" shown can have a second output layer that is... Figure 6 The “Global Item ID Probability Output Layer” is shown in the image.

[0100] The first and second output probability values ​​are only used to distinguish the different loss values ​​calculated at different stages of model training. For example, the first output probability value in this application can be the loss value calculated based on the "negative sampling cross-entropy loss function" in the first stage of model training, and the second output probability value in this application can be the loss value calculated based on the "global item ID cross-entropy loss function" in the second stage of model training.

[0101] The first and second preset number of times are only used to distinguish the different number of training times in different model training stages. For example, in this application, the first preset number of times is used to reflect the number of training times in the first stage of model training, and the second preset number of times is used to reflect the number of training times in the second stage of model training.

[0102] Specifically, during the model training phase, such as Figure 6 As shown, the terminal can pre-extract initial multimodal embedding features of items corresponding to each historical item identifier in the sample sequence using a multimodal model, and input these initial multimodal embedding features as initialization parameters into the embedding layer of the initial recommendation model. Furthermore, the terminal can train the initial recommendation model in the first and second stages based on the sample sequence and the initial multimodal embedding features in the embedding layer to obtain the trained recommendation model. Specifically, for either the first or second stage, the terminal uses the initialized embedding layer of the initial recommendation model to determine the multimodal embedding features of each historical item identifier in the sample sequence based on the initial multimodal embedding features and the sample sequence, and then uses the decoding layer of the initial recommendation model to determine the sample embedding features of the sample sequence. For example, the terminal uses the decoding layer of the initial recommendation model to perform residual connections between the multimodal embedding features of each historical item identifier and the sample sequence to obtain residual features, and then determines the sample embedding features of the sample sequence based on these residual features. Further, during the first stage of training, the terminal can use the first output layer of the initial recommendation model... Figure 6 The "negative sampling item ID probability output layer" determines the first output probability value P1 based on the sample embedding features until the first stage of training reaches a first preset number of times m, then enters the second stage of training; when in the second stage of training, the terminal uses the second output layer of the initial recommendation model... Figure 6The "global item ID probability output layer" determines the second output probability value P2 based on the sample embedding features, until the number of training iterations in the second stage reaches the second preset number of iterations n, at which point training stops and the trained recommendation model is obtained.

[0103] It is understood that the first preset number of iterations m and the second preset number of iterations n in this application can be the same or different. For example, suppose that the training process of this model requires traversing the data for a total of m+n epochs, where the first m epochs belong to the first stage of training and the last n epochs belong to the second stage of training.

[0104] In this embodiment, the "negative sampling cross-entropy loss function" used in the first stage of training effectively avoids the heavy computational burden caused by calculating the cross-entropy of global item IDs, while also obtaining the suboptimal weights in the entire recommendation model initially. Then, the "cross-entropy of global item IDs" is used for weight fine-tuning in the second stage, thereby improving the model's convergence speed while ensuring the accuracy of its predictions.

[0105] In one embodiment, such as Figure 7 As shown, the second item is an item in the global item set; the step of determining the first output probability value based on sample embedding features includes:

[0106] Step 702: Randomly sample from the global item set to obtain a negative sample set;

[0107] Step 704: Determine the first correlation score between the sample embedding feature and the multimodal embedding feature corresponding to the sample embedding feature;

[0108] Step 706: Determine the second correlation score between the sample embedding features and the multimodal embedding features of each historical item identifier in the negative sample set, and determine the correlation and value between each second correlation score;

[0109] Step 708: Determine the first output probability value based on the first correlation score and the correlation sum.

[0110] The global item set refers to the set containing all items (item identifiers) in the training samples, meaning the second item is an item in the global item set.

[0111] The negative sample set refers to a subset of items (item identifiers) obtained by randomly sampling from the global item set. That is, the second item may or may not be an item in the negative sample set.

[0112] The multimodal embedding feature corresponding to the sample embedding feature refers to the true label corresponding to the sample embedding feature, that is, the multimodal embedding feature corresponding to the embedding feature in the embedding layer. For example, if the sample embedding feature is the embedding feature at position t in the predicted sample sequence, then it is necessary to obtain the true label (actual multimodal embedding feature) corresponding to position t from the embedding layer, and calculate the correlation score between the embedding feature at position t output by the model and the actual multimodal embedding feature, which can also be called the correlation score.

[0113] The first and second correlation scores in this application are only used to distinguish the correlation scores between the sample embedding features predicted by the model and different multimodal embedding features. For example, the first correlation score in this application refers to the correlation score between the sample embedding features predicted by the model and the true labels (actual multimodal embedding features), and the second correlation score in this application refers to the correlation score between the sample embedding features predicted by the model and the multimodal embedding features of each historical item identifier in the negative sample set.

[0114] Specifically, such as Figure 6 As shown, during the first stage of model training, the terminal can use the first output layer of the initial recommendation model, i.e. Figure 6 The "negative sampling item ID probability output layer" determines the first output probability value P1 based on the sample embedding features until the number of training iterations in the first stage reaches the first preset number m, and then enters the second stage of training. The calculation method for determining the first output probability value P1 based on the sample embedding features can be the following formula (1):

[0115] (1)

[0116] in, This represents the predicted probability value corresponding to the t-th item identifier in the input sequence. This represents the predicted embedding feature corresponding to the t-th item identifier in the predicted input sequence. This represents the true label corresponding to the t-th item identifier in the input sequence (i.e., the feature of item t corresponding to the t-th item identifier in the embedding layer). This represents the correlation score between the predicted embedded feature corresponding to the t-th item identifier in the input sequence and the true label. Represents the set of negative samples. This represents the feature of each item i in the embedding layer within the negative sample set.

[0117] In one embodiment, the step of determining a first output probability value based on a first correlation score and a correlation sum value includes:

[0118] Determine the sum between the first correlation score and the correlation sum;

[0119] The ratio between the first correlation score and the sum is used as the first output probability value.

[0120] Specifically, as shown in formula (1) above, the terminal randomly samples from the global item set to obtain the negative sample set. Then, the terminal can determine the sample embedding features. With sample embedding features The corresponding ground truth label is the multimodal embedding feature. The first correlation score between them Furthermore, the terminal can determine the sample embedding features. With negative sample set Multimodal embedding features of various historical artifact identifiers The second correlation score between And determine the correlation and value among the second correlation scores. Furthermore, the terminal determines the first relevance score. Correlation and value The sum between them is: and the first correlation score and sum The ratio between them is used as the first output probability value. Therefore, by using the above-mentioned method of calculating the loss value (i.e., the first output probability value) in the first stage of model training, the heavy computational burden caused by the large number of item IDs in the model and the slow convergence speed of the model can be effectively balanced after introducing the large language model structure. This enables the recommendation model with the large language model architecture to be used more widely in recommendation applications even with limited computing resources, thereby improving the processing efficiency of item recommendation using the recommendation model with the large language model architecture.

[0121] In one embodiment, the second item is an item in the global item set; the step of determining the second output probability value based on sample embedding features includes:

[0122] The third correlation score between the sample embedding features and the multimodal embedding features of each historical item identifier in the global item set is determined separately.

[0123] Determine the sum of the third relevance scores;

[0124] Determine the ratio between each third correlation score and the sum, and select the target ratio from the ratios as the second output probability value.

[0125] In this application, the first correlation score, the second correlation score, and the third correlation score are only used to distinguish the correlation scores between the sample embedding features predicted by the model and different multimodal embedding features. For example, the third correlation score in this application refers to the correlation score between the sample embedding features predicted by the model and the multimodal embedding features of each historical item identifier in the global item set.

[0126] The target ratio refers to the maximum value selected from all ratios, or the top k ratios selected after sorting them in order of size. That is, there can be one or more target ratios in this application.

[0127] Specifically, such as Figure 6 As shown, during the second phase of training, the terminal uses the second output layer of the initial recommendation model. Figure 6 The "global item ID probability output layer" determines the second output probability value P2 based on the sample embedding features, until the number of training iterations in the second stage reaches the second preset number of iterations n, at which point training stops and the trained recommendation model is obtained. The calculation method for determining the second output probability value P2 based on the sample embedding features can be the following formula (2):

[0128] } (2)

[0129] in, This represents the predicted probability value corresponding to the t-th item identifier in the input sequence. This represents the predicted embedding feature corresponding to the t-th item identifier in the predicted input sequence. This represents the feature of each item (0-X) within the global item set at the embedding layer. … These represent the predicted embedding features corresponding to the t-th item identifier in the predicted input sequence. Features of each item (0-X) in the embedding layer within the global item set The correlation score between them Represents the global item set. This represents the predicted embedding feature corresponding to the t-th item identifier in the predicted input sequence. Features of each item (0-X) in the embedding layer within the global item set The sum of the correlation scores between them.

[0130] In one embodiment, after obtaining the trained recommendation model, the method further includes:

[0131] Obtain the multimodal embedding features of each historical item identifier in the sample sequence;

[0132] Find the number of target embedding features whose distance to the multimodal embedding features of each historical item identifier meets a preset distance threshold;

[0133] The item corresponding to the item identifier with the embedded feature of the target is used as the target item to be recommended.

[0134] Specifically, after completing the two-stage training of the model, the terminal does not need to obtain the behavior sequence of the target object. Instead, it can directly obtain the multimodal embedding features of each historical item identifier in the sample sequence, and search from the database or the embedding layer of the trained recommendation model for a preset number of target embedding features whose distance to the multimodal embedding features of each historical item identifier meets a distance threshold. The item corresponding to the item identifier of the target embedding feature is then used as the target item to be recommended. For example, when... Figure 6 After the recommendation model shown is trained, the terminal can directly use each item ID to... Figure 6 The embedded representation in the embedding layer of the model structure shown uses the Approximate Nearest Neighbor (ANN) algorithm to find the item corresponding to the nearest item identifier, performing item-to-item (I2I) recommendations. This allows for the recommendation of relevant items to users from different dimensions by providing different item recommendation methods, increasing the diversity of item recommendations and thus improving the user's item recommendation experience, bringing convenience to users.

[0135] This application also provides an application scenario in which the above-mentioned item recommendation method is applied. Specifically, the item recommendation method is applied in this scenario as follows:

[0136] During the interaction between users and multimedia information platforms, the aforementioned item recommendation methods can be used, such as... Figure 8 The image shows a schematic of the product-side interface. After a user (the user object) has browsed some items they want to buy within the shopping app, the app can recommend relevant personalized products. This means the app's backend server can obtain information such as... Figure 8The system displays the identifiers of products recently viewed by the user (19 minutes ago) (i.e., product 1, product 2, and product 3). These identifiers are then serialized to obtain the user's behavior sequence. Further, the backend server determines whether the number of identifiers in the user's behavior sequence equals the preset number of identifiers (i.e., the number of identifiers in the sample sequence during model training). If the number of identifiers in the user's behavior sequence equals the preset number, the backend server inputs the user's behavior sequence into a pre-trained recommendation model. The embedding layer of the recommendation model sequentially searches for multimodal embedding features corresponding to each identifier in the behavior sequence. The decoding layer of the recommendation model then predicts the embedding features of the behavior sequence based on the behavior sequence and the corresponding multimodal embedding features. Finally, the backend server determines the target product identifier to be recommended based on the embedding features of the behavior sequence predicted by the recommendation model and returns the target product identifier to the terminal for display, allowing the terminal to recommend relevant products to the user. This improves the user's shopping recommendation experience and brings convenience to the user.

[0137] The method provided in this application embodiment can be applied to various scenarios of product recommendation, item recommendation, and video recommendation. The following uses a scenario of user interaction with a multimedia information platform as an example to illustrate the item recommendation method provided in this application embodiment.

[0138] Embedding representation, in particular, is a distributed representation of the input "objects" generated based on a neural network model. Its main function is to transform the high-dimensional sparse vectors of the original objects into low-dimensional, dense vectors. These low-dimensional, dense vectors can express certain features of the corresponding objects, and the distance between vectors reflects the similarity between objects, thus facilitating processing by downstream models, especially deep learning models. These input "objects" are typically words, entities, semantic labels, and nodes in a graph, as used in natural language processing.

[0139] The Transformer is a well-known deep learning model widely used in natural language processing (NLP), computer vision (CV), and speech processing. Originally proposed as a sequence-to-sequence model for machine translation, the Transformer has become the preferred architecture in NLP, particularly for pre-trained models. A classic Transformer model is a sequence-to-sequence model consisting of an encoder and a decoder. Both the encoder and decoder are composed of a set of identical Transformer blocks. Each Transformer block primarily consists of a multi-head self-attention module and a feedforward neural network.

[0140] Batch Normalization (BN): Also known as batch standardization. In the process of neural network training, Batch Normalization (BN) is introduced to solve the gradient explosion problem. The essence of Batch Normalization is to adjust the data distribution to an approximate normal distribution.

[0141] Language Model: A language model is a model used to model natural language, with the goal of predicting the next word or character in a given sequence of text. Language models can be used for various natural language processing tasks, such as semantic extraction, text generation, machine translation, and speech recognition. Existing research shows that Transformer-based pre-trained language models (PTMs) can achieve good results on various natural language processing tasks. Commonly used pre-trained language models include large-scale pre-trained models such as BERT and the GPT series.

[0142] A large language model is a natural language processing model with a large number of parameters and trained on massive amounts of data. The training process of a large language model typically employs unsupervised learning, meaning it is trained on a large-scale text corpus, allowing the model to learn the probability distribution and rules of language. During training, large language models usually optimize their parameters as the objective function by maximizing the predicted probability of the next word. Currently, the most representative large language models are OpenAI's GPT series models, which use the Transformer model structure and are trained on large-scale corpora, generating high-quality natural language text such as articles and dialogues.

[0143] Token: In large language models, a token is the smallest unit in text, typically a word, punctuation mark, or other symbol. In natural language processing, tokenization is one of the fundamental steps in breaking down text into discrete units. In large language models, each token is assigned a unique integer ID, often called a token ID. These token IDs can be used to represent each token in the text and are used to train and evaluate the large language model.

[0144] In large language models, the meaning of tokens is crucial. Since both training and prediction are based on tokens, different tokenization methods and token sets need to be chosen for different tasks and application scenarios. For example, in text classification tasks, words are typically used as tokens. In machine translation tasks, subwords are often used as tokens. In large language models, tokens can also be used to represent contextual information within text. For instance, in the BERT model, each token is assigned a positional code to represent its location within the text. This allows the model to leverage contextual information to better understand the text and generate more accurate predictions. In short, tokens are the fundamental units in large language models, and their selection and representation have a significant impact on the model's performance and effectiveness.

[0145] The scaling laws refer to the phenomenon in machine learning and deep learning where model performance (such as accuracy and loss) significantly improves with increasing model size (such as the number of parameters, the amount of training data, and computing resources).

[0146] I2I and U2I: In a recommendation system, the recall method of finding recommended items for users is called U2I recall (i.e., user-to-item, abbreviated as U2I); while the recall method of recommending similar items using items is called I2I recall (i.e., item-to-item, abbreviated as I2I).

[0147] Approximate Nearest Neighbor: Approximate Nearest Neighbor (ANN) is a fast nearest neighbor search algorithm for high-dimensional data. It can perform efficient nearest neighbor search on large-scale datasets and is often used in fields such as computer vision and natural language processing.

[0148] In traditional recommendation systems, behavioral sequence modeling is primarily used to understand and predict user behavior patterns. Sequence models are an effective method for modeling user behavior sequences. They can help better understand user interests, habits, and behavioral trends, thereby providing more personalized services or products. Large language models are currently an important technology in the field of artificial intelligence, and they are also a powerful type of sequence model. The mainstream implementation of current large language models is to predict the next word in a word (token) sequence through autoregression. This method is based on the assumption that each word depends on the words preceding it. During training, the model gradually learns how to predict the next word based on contextual information, thus understanding and generating coherent text.

[0149] Current research has yielded many methods that utilize large language models as models for recommender systems. These methods generally transform the recommendation task into a natural language task and then leverage large language models for recommendation. However, methods that directly apply large model structures to item IDs for sequence modeling are still relatively rare.

[0150] Currently, the most widely used autoregressive model is SASREC. SASREC uses a Transformer decoder with multi-head attention to learn the sequence relationships between items in a sequence through autoregression. SASREC is currently one of the better-performing and more advanced algorithms in the field of sequence recommendation. If the binary cross-entropy loss function in the SASREC model is replaced with a cross-entropy loss function based on the output probabilities of all items (or a negatively sampled cross-entropy loss function that approximates the cross-entropy loss function), the performance of the SASREC model will be significantly improved. Many sequence recommendation algorithms are also developed based on SASREC. Once the loss function of SASREC is replaced with a cross-entropy loss function based on the output probabilities of all items, the SASREC model structure becomes very similar to the GPT2 model structure. At this point, the model can be considered as directly applying the GPT2 model structure to sequence recommendation.

[0151] While the aforementioned models demonstrate significant performance improvements, directly applying these generative models to recommendation systems results in an enormous parameter scale, consuming substantial GPU computing resources and hindering their applicability to common recommendation services. Training directly using the SASRec model with a negative-sampling cross-entropy loss function significantly degrades the generative model's performance, performing worse than a non-sampling cross-entropy loss function. Applying the large language model architecture directly to sequence recommendation requires calculating the probability of all item IDs across the entire recommended item set, placing an extremely heavy computational burden on the model. Furthermore, the large model architecture leads to very slow convergence during training. In short, given the massive number of items in recommendation systems, calculating the display probability of each item at each position in the sequence using a loss function based on "global ID cross-entropy," following the model structure and training methods of large language models, imposes a tremendous training burden on the recommendation system.

[0152] The technical solution provided in this application can solve these problems simultaneously through the design of an innovative and complete process:

[0153] In this application, to improve the training efficiency of large language models for item sequences, a two-stage training method is proposed. This method first obtains suboptimal model weights through "negative sampling cross-entropy," thereby accelerating the training of sequence recommendation models based on large language model structures. First, in the first stage of model training, the model is trained using a "negative sampling cross-entropy" loss function. The training speed in this stage is significantly faster than the training speed in the second stage based on "global ID cross-entropy." By training the model using "negative sampling cross-entropy" in the first stage, the model weights are in a suboptimal state. Therefore, after the first stage of training is completed, the model enters the second stage of training. In the second stage, the model is fine-tuned using the standard "global ID cross-entropy" method found in large language models. This proposed training method can greatly accelerate the training speed of recommendation models based on large language model structures, enabling the model to be more widely applied to various sequence recommendation tasks even with limited computing resources.

[0154] This application proposes an autoregressive structure based on a large language model. By introducing the initial textual semantic features of items and a two-stage loss function, it improves the convergence speed of the large language model during training. Through this method, which enhances the convergence speed of the large language model in recommendation scenarios using a two-stage loss function, recommendation systems can leverage the efficient model structure of the large language model to better capture embedded features in user behavior sequences. Simultaneously, this application effectively balances the heavy computational burden caused by the large number of item IDs in the model and the slow convergence speed after introducing the large language model structure. This allows for wider application of the large language model architecture in recommendation applications even with limited computing resources, effectively improving the processing efficiency of item recommendation models using the large language model architecture and enhancing the user's item recommendation experience, thus bringing convenience to users.

[0155] On the product side, the technical solution provided in this application is applicable to various scenarios of personalized item recommendation, such as social networking, gaming, ticketing, and shopping.

[0156] From a technical perspective, the schematic diagram of the recommendation model proposed in this application during training can be as follows: Figure 6 The process framework shown is as follows. The working principle of the large language model proposed in this application is as follows: The large language model will process the item sequence x1…x1 of the n items browsed by the user. n The representation is input into the model, where x i This represents the i-th item in the sequence. During training, the training labels are the corresponding x2…x (n+1) That is, x i The next word x at each position (i+1). Briefly, the training process is as follows: According to the first k items in the sequence x1…x k corresponding embedded representations output by the Transformer layer, predict the probability distribution of the next item x (k+1) .

[0157] The main training steps of the model provided in this application are as follows:

[0158] First, obtain the multimodal embedding features of each item in the item sequence, and use the multimodal embedding features of each item for the initialization of the model embedding layer. Next, the two-stage autoregressive training stage of the model can be entered. Assume that a total of m + n epochs of data need to be traversed during the training process of the model, where the first m epochs belong to the first stage of training, and the last n epochs belong to the second stage of training. The first stage of training is called the negative sampling cross-entropy loss function training stage, and this stage uses Figure 6 the "negative sampling item ID probability output layer" in to perform probability prediction using the aforementioned formula (1). The second stage of training is called the global cross-entropy loss function training stage, and this stage uses Figure 6 the "global item ID probability output layer" in to perform probability prediction using the aforementioned formula (2).

[0159] The optimization goal of the model during the training process is to maximize the probability of the next item given the item sequence x<t. Assume there is an item sequence of length n , where x t represents the item ID at the t-th position. The objective function in this application can be expressed as shown in the following formula (3):

[0160] (3)

[0161] where x<t represents the sequence of item IDs at the first to t - 1 positions. The probability of the item sequence can be calculated and output in two stages through the output layer in Figure 6 .

[0162] Brief description of the model structure of the recommendation model provided in this application:

[0163] The main architecture of the recommendation model based on the large language model used in this application is as Figure 6 shown, and the specific introduction of this model structure includes:

[0164] 1. Item sequence input layer: As shown in Figure 6 , it belongs to the ID sequence of n items. If the number of a sequence is less than n, the subsequent unfilled positions need to be filled with masks.

[0165] 2. Embedding Layer: The output of this layer is the item ID embedding representation, thus obtaining the embedding representation vector of each item ID, which is then input into the subsequent transformer layer.

[0166] Item ID Embedding Layer: This layer retrieves the pre-extracted embedding representation vector for each item ID using a multimodal large language model. These embedding representations are obtained by extracting features from the text and images of the items using other large language models, i.e., extracting the trained multimodal embedding representations for each item.

[0167] Currently, there are many open-source multimodal large language models that can fuse image and text features to generate text based on image information. In short, the technical solution in this application can pre-input both image and text information for each item into this multimodal large language model, obtain a fused embedding representation of the image and text from the final Transformer decoder of this model, and use this fused embedding representation as the multimodal embedding feature of each item as input to a system such as... Figure 6 The model is initialized in the embedding layer. To accelerate model convergence and make the training process more stable, the fused embedding features of these items need to be regularized using the L2 norm (L2 normalization). Furthermore, the weights of these multimodal embedding features will be adjusted during model training, primarily to accelerate model convergence.

[0168] 3. Transformer Layer: This layer is primarily a deeper decoder constructed by stacking multiple Transformer decoder blocks with masking mechanisms, aiming to improve the model's performance and generalization ability. Each decoder block mainly consists of the following parts:

[0169] a) Masked Multi-Head Self-Attention: This part captures the dependencies between different positions in the input sequence by performing multi-head self-attention calculation on the input sequence.

[0170] b) Residual Connection and Layer Normalization: This part accelerates model training and improves model performance by performing residual connections between the output of the previous part and the input sequence, and then performing layer normalization on the results of the residual connections.

[0171] c) Feedforward Neural Network: This part typically consists of two fully connected layers. By performing computation on the representation at each location using the fully connected layers, the feature representation capability at each location is enhanced. Currently, sparse hybrid expert networks are often used to replace traditional feedforward neural networks in Transformer decoding blocks and large language models.

[0172] That is, the terminal inputs the ID sequence of each user's browsed items, such as... Figure 6 After the large language model shown, the embedding representation vector output by the last Transformer decoding block (i.e. the Nth Transformer decoding block) is extracted from the corresponding position of the last token in the input, and this embedding representation vector is used as the embedding hidden state predicted by the large language model for the user's behavior sequence.

[0173] 4. Model Output Layer: The output layer mainly consists of two sub-layers: the "Global Item ID Probability Output Layer" and the "Negative Sampling Item ID Probability Output Layer." The functions of these two sub-layers will be described below:

[0174] (a) Negative Sampling Item ID Probability Output Layer: This layer mainly calculates the embedded representation h of the first k items in the Transformer layer output by embedding weight binding. k With each item i in the embedding layer, the feature e i The correlation score s(h) k ,e i )=h k ×e i In other words, the relevance score is the dot product of two vectors. This layer randomly samples N negative samples from the global item set for each sample point k (N is much smaller than the size of the global item set, typically in the range of 100-1000). Here, this set of negative samples is denoted as... Then the probability The calculation method is as shown in the aforementioned formula (1). During the training process, the model still adjusts the probability distribution difference between the predicted item ID and the actual item ID through cross-entropy.

[0175] (b) Global Item ID Probability Output Layer:

[0176] The sequence of n items viewed by the user, x1…x n The representation is input into the model, where x i Let x represent the i-th item in the sequence. Correspondingly, the training labels would be x2…x (n+1) The input is a sequence of items x1…x kAfter that, the model will use the embedding representations h output by the Transformer layer for the first k items in the input sequence k , and calculate the generation of the next item I by this fully connected layer (k+1) probability distribution.The layer also outputs a dimension of |X| by means of embedding weight binding, that is, a score r(h k ,e i ) will be output for each item i∈X in |X|, where the embedding representations output by the Transformer layer for the first k items are h k , the feature of item i in the embedding layer is e i , and the correlation score s(h k ,e i ) = h k ×e i .

[0177] denotes the probability of predicting x t after the item ID sequence of x<t is given, is the item ID with the maximum probability calculated by the softmax method, and the specific calculation method is shown in the aforementioned formula (2).

[0178] That is, the goal in the training stage is to maximize the product of this conditional probability, that is, to minimize the negative log-likelihood loss L. During the training process, the model will calculate the difference between the predicted item ID and the actual next item ID, and this difference is calculated by the cross-entropy method.

[0179] Applications in recommendation include U2I recommendation and I2I recommendation:

[0180] U2I recommendation: After the model training is completed, for any user input sequence x1…x k , the predicted embedding representation h k can be obtained at the output of the Transformer layer. Just use the approximate nearest neighbor algorithm to find the top k items with the closest distance to h k in the embedding layer of the model for recommendation.

[0181] I2I recommendation (recommendation can be made after the model training is completed): After the large language model training is completed, the initialized embedding representations of each item ID in the embedding layer shown in Figure 6 can be directly used, and the approximate nearest neighbor algorithm (ANN) is used to find the item with the closest distance to it for item-item (I2I) recommendation.

[0182] It is understandable that the "global ID probability output layer" in this application uses an embedded weight binding method in the ID probability output layer. This is mainly to reduce the number of model parameters, thereby reducing the difficulty of model fitting. Alternatively, a separate dense layer can be used to calculate the output probability of each ID. In addition, the two-stage training method of this application can not only be applied to recommendation models based on large language models, but also directly applied to the pre-training fitting of large language models, thereby accelerating the fitting speed of large language models.

[0183] The beneficial effects of the technical solution in this application include:

[0184] 1. The solution provided in this application avoids the heavy computational burden of calculating cross-entropy for global item IDs by using the "negative sampling cross-entropy loss function" in the first stage, while initially obtaining the suboptimal weights in the entire recommendation model. Then, the weights are fine-tuned in the second stage using the "cross-entropy of global item IDs," thereby improving the model's convergence speed while ensuring the accuracy of the model's predictions.

[0185] 2. The solution provided in this application also proposes to initialize the embedding layer weights by using the multimodal embedding representation of the item, rather than random initialization, thereby further improving the convergence speed of the model.

[0186] 3. The solution provided in this application can only search for the nearest item ID through approximate nearest neighbor during the recommendation process, which consumes relatively few resources. It can also avoid the problems introduced by traditional methods using pre-trained large models, such as: difficulty in directly modeling item IDs, need for rich input text, poor controllability of the generation process, high resource consumption, and non-standard generated IDs.

[0187] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0188] Based on the same inventive concept, this application also provides an item recommendation device for implementing the item recommendation method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more item recommendation device embodiments provided below can be found in the limitations of the item recommendation method described above, and will not be repeated here.

[0189] In one embodiment, such as Figure 9 As shown, an item recommendation device is provided, including: an acquisition module 902, a determination module 904, and a recommendation module 906, wherein:

[0190] The acquisition module 902 is used to acquire the behavior sequence of the target object; the behavior sequence consists of the item identifiers of each first item that the target object has interacted with.

[0191] The determination module 904 is used to determine the multimodal embedding features corresponding to each item identifier in the behavior sequence; determine the embedding features of the behavior sequence based on the multimodal embedding features and the behavior sequence; and determine the target item to be recommended based on the embedding features of the behavior sequence.

[0192] The recommendation module 906 is used to recommend the target item to the target object.

[0193] In one embodiment, the acquisition module is further configured to acquire the item identifiers of each first item that the target object has interacted with; the device further includes: a processing module, configured to serialize each of the item identifiers to obtain a behavior sequence of the target object; a storage module, configured to store the behavior sequence in a database; and the acquisition module is further configured to acquire the behavior sequence of the target object from the database.

[0194] In one embodiment, the acquisition module is further configured to acquire the number of item identifiers contained in the behavior sequence; the device further includes: a filling module, configured to fill the behavior sequence with a mask to obtain a target behavior sequence when the number is less than a preset number; a selection module, configured to select the preset number of item identifiers from the behavior sequence according to the interaction time when the number is greater than the preset number, and use the selected item identifiers as the target behavior sequence; and a search module, configured to perform feature search based on the target behavior sequence using a recommendation model to obtain the multimodal embedding features corresponding to each item identifier in the target behavior sequence.

[0195] In one embodiment, the search module is further configured to input the target behavior sequence into the recommendation model, so that the embedding layer of the recommendation model sequentially searches for multimodal embedding features corresponding to each item identifier in the target behavior sequence, and during the search process, if the item identifier to be queried in the target behavior sequence does not have a corresponding multimodal embedding feature, then the search continues to find the multimodal embedding feature corresponding to the next item identifier in the target behavior sequence.

[0196] In one embodiment, the apparatus further includes: a processing module, configured to decode the multimodal embedding features and the behavior sequence through a decoding layer of a recommendation model to obtain an embedding representation vector; the number of the embedding representation vectors is the same as the number of the item identifiers; and a selection module, configured to select, from the embedding representation vectors, the embedding representation vector corresponding to the item identifier at the target position in the behavior sequence as the embedding feature of the behavior sequence.

[0197] In one embodiment, the apparatus further includes: a search module, configured to search for a preset number of target embedded features whose distance to the embedded features of the behavior sequence satisfies a distance threshold through the embedding layer of the recommendation model; and to designate the item corresponding to the item identifier of the target embedded feature as the target item to be recommended.

[0198] In one embodiment, the first item is an item that the target object interacts with in a first time period. The acquisition module is further configured to acquire the item identifier of the second item that the sample object interacts with in a second time period, thereby obtaining historical item identifiers. The second time period precedes the first time period. The device further includes a training module, configured to train an initial recommendation model based on a sample sequence composed of the historical item identifiers, thereby obtaining the recommendation model.

[0199] In one embodiment, the apparatus further includes: an extraction module, configured to extract initial multimodal embedding features of each of the historical item identifiers in the sample sequence using a multimodal model; an initialization module, configured to initialize the embedding layer of the initial recommendation model based on the initial multimodal embedding features of each of the historical item identifiers; and a training module, further configured to perform a first stage and a second stage of training on the initialized initial recommendation model based on the initial multimodal embedding features and the sample sequence to obtain the recommendation model.

[0200] In one embodiment, the determining module is further configured to, for either the first stage or the second stage, determine the multimodal embedding features of each historical item identifier in the sample sequence based on the initial multimodal embedding features and the sample sequence through the initialized embedding layer in the initial recommendation model; determine the sample embedding features of the sample sequence through the decoding layer of the initial recommendation model; when training in the first stage, determine a first output probability value based on the sample embedding features through the first output layer of the initial recommendation model until the training count in the first stage reaches a first preset number, and then proceed to the training in the second stage; when training in the second stage, determine a second output probability value based on the sample embedding features through the second output layer of the initial recommendation model until the training count in the second stage reaches a second preset number, and then stop training to obtain the recommendation model.

[0201] In one embodiment, the second item is an item in a global item set; the apparatus further includes: a sampling module, configured to randomly sample from the global item set to obtain a negative sample set; a determining module, further configured to determine a first correlation score between the sample embedding feature and the multimodal embedding feature corresponding to the sample embedding feature; determine a second correlation score between the sample embedding feature and the multimodal embedding feature of each historical item identifier in the negative sample set, and determine the correlation sum value between each of the second correlation scores; and determine the first output probability value based on the first correlation score and the correlation sum value.

[0202] In one embodiment, the second item is an item in a global item set; the determining module is further configured to determine a third correlation score between the sample embedding feature and the multimodal embedding feature of each historical item identifier in the global item set; determine the sum of each third correlation score; determine the ratio between each third correlation score and the sum, and determine a target ratio from the ratio as the second output probability value.

[0203] In one embodiment, the acquisition module is further configured to acquire the multimodal embedding features of each of the historical item identifiers in the sample sequence; the device further includes: a search module, configured to search for a preset number of target embedding features whose distance to the multimodal embedding features of each of the historical item identifiers meets a distance threshold; and to use the item corresponding to the item identifier of the target embedding feature as the target item to be recommended.

[0204] Each module in the aforementioned item recommendation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.

[0205] In one embodiment, a computer device is provided, which may be a terminal or a server. In this embodiment, the computer device is described as a terminal, and its internal structure diagram is as follows. Figure 10 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements an item recommendation method. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.

[0206] Those skilled in the art will understand that Figure 10 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0207] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0208] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon that, when executed by a processor, implements the steps in the above method embodiments.

[0209] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above method embodiments.

[0210] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0211] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0212] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0213] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.

Claims

1. A method for recommending items, characterized in that, The method includes: Obtain the behavior sequence of the target object; the behavior sequence consists of the item identifiers of each first item that the target object has interacted with; Determine the multimodal embedding features corresponding to each item identifier in the behavior sequence; Based on the multimodal embedding features and the behavior sequence, the embedding features of the behavior sequence are determined; The target item to be recommended is determined based on the embedded features of the behavior sequence, and the target item is recommended to the target object.

2. The method according to claim 1, characterized in that, The method further includes: Obtain the item identifiers of each first item that the target object has interacted with; The item identifiers are serialized to obtain the behavior sequence of the target object; The behavioral sequence is stored in a database; The sequence of actions for obtaining the target object includes: Obtain the behavior sequence of the target object from the database.

3. The method according to claim 1, characterized in that, After obtaining the behavior sequence of the target object, the method further includes: Obtain the number of item identifiers contained in the behavior sequence; If the number is less than a preset number, the behavior sequence is padded with a mask to obtain the target behavior sequence; or, If the number is greater than the preset number, select the preset number of item identifiers from the behavior sequence according to the interaction time, and use the selected item identifiers as the target behavior sequence; Determining the multimodal embedding features corresponding to each item identifier in the behavior sequence includes: By using a recommendation model, feature lookup is performed based on the target behavior sequence to obtain the multimodal embedding features corresponding to each item identifier in the target behavior sequence.

4. The method according to claim 3, characterized in that, The step of using a recommendation model to perform feature lookup based on the target behavior sequence to obtain multimodal embedding features corresponding to each item identifier in the target behavior sequence includes: The target behavior sequence is input into the recommendation model, so that the embedding layer of the recommendation model sequentially searches for multimodal embedding features corresponding to each item identifier in the target behavior sequence. During the search process, if there is no corresponding multimodal embedding feature for the currently queried item identifier in the target behavior sequence, the search continues to find the multimodal embedding feature corresponding to the next item identifier in the target behavior sequence.

5. The method according to claim 1, characterized in that, The step of determining the embedding features of the behavior sequence based on the multimodal embedding features and the behavior sequence includes: The multimodal embedding features and the behavior sequence are decoded through the decoding layer of the recommendation model to obtain the embedding representation vector; the number of the embedding representation vectors is the same as the number of the item identifiers. From the embedded representation vectors, the embedded representation vectors corresponding to the item identifiers at the target locations in the behavior sequence are selected as the embedded features of the behavior sequence.

6. The method according to claim 5, characterized in that, The step of determining the target item to be recommended based on the embedded features of the behavior sequence includes: The embedding layer of the recommendation model is used to find a preset number of target embedding features whose distance to the embedding features of the behavior sequence meets a distance threshold. The item corresponding to the item identifier of the target embedded feature is taken as the target item to be recommended.

7. The method according to claim 1, characterized in that, The first item is the item that the target object interacts with in the first time period, and the method further includes: Obtain the item identifier of the second item that the sample object interacted with in the second time period to obtain the historical item identifier; the second time period precedes the first time period; The initial recommendation model is trained based on the sample sequence composed of the historical item identifiers to obtain the recommendation model.

8. The method according to claim 7, characterized in that, The method further includes: Using a multimodal model, the initial multimodal embedding features of each historical item identifier in the sample sequence are extracted respectively; The embedding layer of the initial recommendation model is initialized based on the initial multimodal embedding features of each of the historical item identifiers. The initial recommendation model is trained using a sample sequence composed of the historical item identifiers to obtain the recommendation model, including: Based on the sample sequence, the initialized initial recommendation model is trained in the first and second stages to obtain the recommendation model.

9. The method according to claim 8, characterized in that, The step of training the initial recommendation model based on the sample sequence in the first and second stages to obtain the recommendation model includes: For either the first stage or the second stage, based on the initial multimodal embedding features and the sample sequence, the multimodal embedding features of each historical item identifier in the sample sequence are determined through the initial embedding layer in the initial recommendation model; and the sample embedding features of the sample sequence are determined through the decoding layer of the initial recommendation model. When in the first stage of training, the first output probability value is determined based on the sample embedding features through the first output layer of the initial recommendation model until the number of training times in the first stage reaches a first preset number, and then the second stage of training begins. During the second stage of training, the second output probability value is determined based on the sample embedding features through the second output layer of the initial recommendation model until the number of training iterations in the second stage reaches a second preset number, at which point training stops and the recommendation model is obtained.

10. The method according to claim 9, characterized in that, The second item is an item in the global item set; determining the first output probability value based on the sample embedding features includes: A negative sample set is obtained by randomly sampling from the global item set; Determine the first correlation score between the sample embedding feature and the multimodal embedding feature corresponding to the sample embedding feature; Determine the second correlation score between the sample embedding features and the multimodal embedding features of each historical item identifier in the negative sample set, and determine the correlation and value between each of the second correlation scores; The first output probability value is determined based on the first correlation score and the correlation sum value.

11. The method according to claim 9, characterized in that, The second item is an item in the global item set; determining the second output probability value based on the sample embedding features includes: The third correlation score is determined between the sample embedding features and the multimodal embedding features of each historical item identifier in the global item set. Determine the sum of the third correlation scores; The ratio between each of the third correlation scores and the sum is determined, and the target ratio is determined from the ratios as the second output probability value.

12. The method according to any one of claims 1 to 9, characterized in that, After obtaining the trained recommendation model, the method further includes: Obtain the multimodal embedding features of each historical item identifier in the sample sequence; Find a preset number of target embedding features whose distance to the multimodal embedding features of each of the aforementioned historical item identifiers meets a distance threshold; The item corresponding to the item identifier of the target embedded feature is taken as the target item to be recommended.

13. An item recommendation device, characterized in that, The device includes: The acquisition module is used to acquire the behavior sequence of the target object; the behavior sequence consists of the item identifiers of each first item that the target object has interacted with; A determination module is used to determine the multimodal embedding features corresponding to each item identifier in the behavior sequence; determine the embedding features of the behavior sequence based on the multimodal embedding features and the behavior sequence; and determine the target item to be recommended based on the embedding features of the behavior sequence. The recommendation module is used to recommend the target item to the target object.

14. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.

16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.