Training method of recall model, content recall method and computing equipment

By fusing the encoding and training of user representation vectors and target content representation vectors in the recall model, the problem of capturing fine-grained differences in user interaction behavior in existing technologies is solved, thereby improving the recall effect and robustness of the recall model.

CN121786265APending Publication Date: 2026-04-03XINGIN INFORMATION TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-26
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing recall models struggle to capture fine-grained differences in user interactions when dealing with diverse interactive behaviors from the same source content, leading to reduced recall accuracy and robustness.

Method used

By acquiring multiple content sample pairs containing the same source content, and performing fusion encoding in the initial recall model to generate user representation vectors and target content representation vectors, the model is trained based on similarity to optimize the matching accuracy of the representation vectors and improve the model's adaptability to diverse user behaviors.

Benefits of technology

It significantly improves the recall effect and robustness of content recommendation, and can more accurately match target content that users may be interested in, overcoming the problem of decreased recall accuracy caused by behavioral differences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121786265A_ABST
    Figure CN121786265A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a training method of a recall model, a content recall method and computing equipment, and the training method of the recall model comprises the steps that at least two content sample pairs containing the same source content are obtained, any content sample pair comprises the source content, the target content and related interaction behaviors, and the target content is obtained according to the source content, the target content and the related interaction behaviors; the user executes an interaction behavior on the source content to point to the target content; respectively inputting the at least two content sample pairs into an initial recall model, performing fusion coding on the source content and the interaction behavior in the initial recall model to obtain a user representation vector, and performing coding on the target content to obtain a target content representation vector; and based on the similarity between the user representation vector and the target content representation vector in the at least two content sample pairs, training the initial recall model to obtain a target recall model. The target recall model obtained through training can more accurately match the target content which the user may be interested in, and the recall effect and robustness of content recommendation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of machine learning technology, and in particular to a method for training a recall model, a content recall method, and a computing device. Background Technology

[0002] With the rapid development of multimodal models in video, image, and text understanding, content recommendation systems can effectively improve the accuracy and efficiency of content retrieval by introducing multimodal recall representation technology into the recall model, using the multimodal recall model for vector representation learning, and leveraging the semantic understanding capabilities of the multimodal recall model.

[0003] Currently, training recall models based on users' historical behavior data has become a mainstream approach. This involves constructing training sample pairs by mining users' interactive behaviors with content (such as clicks, favorites, and shares), and using vectorized representations to learn user preferences and content features. This type of method relies on behavioral patterns of shared user interactions to construct training samples for training the recall model, enabling efficient matching of potentially interesting content from a large pool of candidate content.

[0004] However, there are significant limitations when dealing with diverse interactive behaviors within the same source content. Different users' interactions with the same source content may lead to different target content. For example, user 1 might click on a pet video expecting to be redirected to other cat videos, while user 2 might click on the same pet video expecting to be redirected to cat food-related content. Constructing training samples solely based on common interactive behaviors makes it difficult to capture the fine-grained differences in user interactions. These fine-grained differences are not adequately modeled in existing recall representation methods, thus reducing the accuracy and robustness of the trained recall model and impacting recall performance. Summary of the Invention

[0005] In view of this, embodiments of this specification provide a method for training a recall model. One or more embodiments of this specification also relate to a content recall method, a recall model training apparatus, a content recall device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.

[0006] According to a first aspect of the embodiments of this specification, a method for training a recall model is provided, comprising:

[0007] Obtain at least two content sample pairs containing the same source content, wherein each content sample pair contains source content, target content and related interactive behavior, and the user performs interactive behavior on the source content to point to the target content;

[0008] Input at least two content sample pairs into the initial recall model. In the initial recall model, the source content and interaction behavior are fused and encoded to obtain the user representation vector, and the target content is encoded to obtain the target content representation vector.

[0009] The initial recall model is trained based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs to obtain the target recall model.

[0010] According to a second aspect of the embodiments of this specification, a content recall method is provided, comprising:

[0011] Obtain the target user's historical source content and related historical interaction behavior, as well as multiple candidate target content, where the target user performs historical interaction behavior in the historical source content;

[0012] The target recall model is trained by inputting historical source content, multiple candidate target content, and historical interaction behavior into the training method of the above recall model. In the target recall model, historical source content and historical interaction behavior are fused and encoded to obtain user representation vector, and multiple candidate target content are encoded to obtain multiple target content representation vector.

[0013] Based on user representation vectors and multiple target content representation vectors, target recommended content is determined from multiple candidate target content.

[0014] According to a third aspect of the embodiments of this specification, a training apparatus for a recall model is provided, comprising:

[0015] The first acquisition module is configured to acquire at least two content sample pairs containing the same source content, wherein each content sample pair contains source content, target content and related interactive behavior, and the user performs interactive behavior on the source content to point to the target content;

[0016] The first encoding module is configured to input at least two content sample pairs into the initial recall model, and to perform fusion encoding of the source content and interaction behavior in the initial recall model to obtain a user representation vector, and to encode the target content to obtain a target content representation vector.

[0017] The training module is configured to train the initial recall model based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs, thereby obtaining the target recall model.

[0018] According to a fourth aspect of the embodiments of this specification, a content recall apparatus is provided, comprising:

[0019] The second acquisition module is configured to acquire the target user's historical source content and related historical interaction behavior, as well as multiple candidate target content, wherein the target user performs historical interaction behavior in the historical source content;

[0020] The second encoding module is configured to input the historical source content, multiple candidate target content and historical interaction behavior into the target recall model trained by the above recall model training method, and to fuse and encode the historical source content and historical interaction behavior in the target recall model to obtain the user representation vector, and to encode multiple candidate target content to obtain multiple target content representation vectors.

[0021] The recall module is configured to determine the target recommended content from multiple candidate target content based on user representation vectors and multiple target content representation vectors.

[0022] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising:

[0023] Memory and processor;

[0024] The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the above method.

[0025] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.

[0026] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method.

[0027] In one embodiment of this specification, at least two content sample pairs containing the same source content are obtained, wherein each content sample pair contains source content, target content, and related interactive behavior, and the user performs an interactive behavior on the source content to point to the target content; the at least two content sample pairs are respectively input into an initial recall model, in which the source content and interactive behavior are fused and encoded to obtain a user representation vector, and the target content is encoded to obtain a target content representation vector; based on the similarity between the user representation vector and the target content representation vector in the at least two content sample pairs, the initial recall model is trained to obtain a target recall model.

[0028] By acquiring at least two content sample pairs containing the same source content and fusing the source content and interaction behavior into the initial recall model, the model can adjust the user representation according to the user's specific interaction behavior. This accurately reflects the different target content that the user intends to access and effectively captures the fine-grained differences in different user behaviors under the same source content, thereby generating differentiated user representation vectors. By training the model based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs, the model can learn the semantic association between user behavior and target content, optimize the matching accuracy of the representation vectors, improve the recall model's adaptability to diverse user behaviors, and enhance the alignment effect between user preferences and content features. The trained target recall model can more accurately match target content that users may be interested in, overcoming the problem of decreased recall accuracy caused by behavioral differences, and significantly improving the recall effect and robustness of content recommendation. Attached Figure Description

[0029] Figure 1 This is a flowchart illustrating a training method for a recall model provided in one embodiment of this specification;

[0030] Figure 2 This is a schematic diagram of the architecture of a recall model in a training method for a recall model provided in one embodiment of this specification;

[0031] Figure 3 This is a schematic diagram of the output module in a training method for a recall model provided in one embodiment of this specification;

[0032] Figure 4 This is a schematic diagram of the structure of the recall representation layer in a training method for a recall model provided in one embodiment of this specification;

[0033] Figure 5 This is a flowchart of a content recall method provided in one embodiment of this specification;

[0034] Figure 6 This is a front-end schematic diagram of a content recall method provided in one embodiment of this specification;

[0035] Figure 7 This is a schematic diagram of the structure of a training device for a recall model provided in one embodiment of this specification.

[0036] Figure 8 This is a schematic diagram of the structure of a content recall device provided in one embodiment of this specification;

[0037] Figure 9 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0038] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0039] The terminology used in one or more embodiments of the present invention is for the purpose of describing particular embodiments only and is not intended to limit the scope of the invention. The singular forms “a,” “the,” and “the” used in one or more embodiments of the invention are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of the invention refers to and includes any or all possible combinations of one or more associated listed items.

[0040] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of the present invention, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of the present invention, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0041] Furthermore, it should be noted that the data involved in one or more embodiments of the present invention are all information and data authorized by the user or fully authorized by all parties, and the statistics, use and processing of the relevant data need to comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0042] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0043] Vector representation: a technique that converts multimodal data such as text, images, and audio into numerical vectors. It reflects the semantic similarity of data by measuring distances in the vector space (such as cosine similarity), thereby supporting machine learning tasks such as retrieval, classification, and clustering.

[0044] Token: The basic semantic unit in natural language processing, used to segment input text into the smallest units that a computer can process. These units can be words, subwords, characters, or punctuation marks.

[0045] Hidden States: Feature vectors output by the hidden layers of a neural network, which carry the model's intermediate understanding of the input data.

[0046] Hidden Size: The length of the output vector of the hidden layer of a neural network, which directly affects the model's representational ability.

[0047] Embedded dimension (embed_size): The length of the representation vector, which determines the complexity and expressive power of the vector space.

[0048] Transformer architecture: A deep learning model structure based on self-attention mechanism, which includes encoder and decoder stacks and achieves efficient sequence modeling through parallel computing.

[0049] Large Language Model (LLM): A language model with massive parameters based on the Transformer architecture, which achieves natural language understanding and generation tasks through pre-training and fine-tuning.

[0050] Prompts are instructions or query texts input by the user into an artificial intelligence model. Their function is to guide the model to generate responses with specific formats, styles, or content. As a key interface connecting user intent and model capabilities, embedded words describe task requirements through natural language, directly affecting the output and execution accuracy of large language models.

[0051] InfoNCE Contrastive Loss Function: A loss function based on noise-driven contrastive estimation that optimizes representation learning by maximizing the similarity between positive and negative sample pairs and minimizing the similarity between negative sample pairs. This function adjusts the sharpness of the similarity distribution using a temperature parameter and calculates the normalized probability of a positive sample against a negative sample background using a softmax function, thereby driving the model to learn discriminative representations. For example, the InfoNCE loss function is used to calculate the similarity score between positive and negative sample pairs, and the model parameters are updated through gradient backpropagation. Its mathematical form is:

[0052]

[0053] Where q is the query vector, k + For positive sample key vectors, k i The negative sample key vector contains 1 positive sample and K negative samples, sim() is the similarity function (such as cosine similarity), and τ is the temperature hyperparameter used to adjust the sharpness of the distribution.

[0054] This specification provides a method for training a recall model, and also relates to a content recall method, a recall model training device, a content recall device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0055] See Figure 1 , Figure 1 The flowchart illustrates a training method for a recall model according to an embodiment of this specification, including the following specific steps:

[0056] Step 102: Obtain at least two content sample pairs containing the same source content, wherein each content sample pair contains source content, target content and related interactive behavior, and the user performs interactive behavior on the source content to point to the target content.

[0057] Source content refers to the original content item from which the user performs the interaction. Source content can include at least one of the following multimodal information: content image, content video, content title, and content text. For example, a short video about "daily care of pet cats".

[0058] The target content is the associated content item that a user points to through their interaction with the source content. The source content can include at least one of the following multimodal information: content images, content videos, content titles, and content text. For example, a user clicking on the playback page of a short video on "Daily Care for Pet Cats" might be redirected to a "Cat Food Ad Video" or a "Science Notes on Cat Behavior".

[0059] Related interactive behaviors are user actions performed on the source content that express the user's intent and are directly related to the target content. Interactive behaviors include, but are not limited to, clicking, long-pressing, saving, sharing, commenting, and liking. For example, while watching a short video on "daily pet care," a user clicks on a product recommendation card for a "cat food advertisement video" on the playback page.

[0060] Content sample pairs are sample data units used to train the initial recall model. They consist of a source content, at least one user interaction performed on the source content, and at least one target content to which the interaction points. For example, a sample pair is: source content (a short video on "daily pet cat care") -> interaction (click) -> target content ("an advertisement video for cat food").

[0061] To obtain at least two content sample pairs containing the same source content, one option is to obtain at least two content sample pairs containing the same source content from a historical content database. More optionally, multiple content sample pairs can be obtained from the historical content database. Extract at least two content sample pairs that contain the same source content.

[0062] To obtain at least two content sample pairs containing the same source content, one option is to obtain at least two content sample pairs containing the same source content from the system log. More optionally, multiple content sample pairs are obtained from the system log, and at least two content sample pairs containing the same source content are extracted from the multiple content sample pairs.

[0063] To obtain at least two content sample pairs containing the same source content, one option is to obtain at least two content sample pairs containing the same source content from the user behavior data interface provided by the third-party content platform. More optionally, multiple content sample pairs are obtained from the user behavior data interface provided by the third-party content platform, and at least two content sample pairs containing the same source content are extracted from the multiple content sample pairs.

[0064] For example, on a community content platform, a recall model needs to be trained for retrieving community content. M content sample pairs are collected from the platform's historical content database. These M pairs are then filtered to identify K pairs that exhibit interactive behavior. The source content is text-and-image modal community content, and both the source and target content include content images, titles, and text. Interactive behaviors include five types: browsing, saving, commenting, liking, and forwarding.

[0065] In step 102, by obtaining sample pairs containing content, a sample data foundation is provided for the subsequent training of the initial recall model.

[0066] Step 104: Input at least two content sample pairs into the initial recall model. In the initial recall model, the source content and interaction behavior are fused and encoded to obtain the user representation vector, and the target content is encoded to obtain the target content representation vector.

[0067] The initial recall model is an untrained neural network model that matches user intent with target content. It can be a deep learning model based on a neural network architecture, used to learn the mapping relationship between user behavior preferences and content features. Its architecture can be a dual-tower structure, or an encoding layer and a recall representation layer structure. For example, a deep neural network model using an encoding layer and a recall representation layer as its basic architecture.

[0068] The user representation vector is a deep encoded vector generated by fusing features of the encoded source content with features of user interaction behavior. This deep encoded vector represents the user's intentional preference for the source content under a specific interaction behavior. For example, a 512-dimensional floating-point vector, the distribution of its vector values ​​reflects the degree of attention the user's click behavior pays to the product features in the source content.

[0069] The target content representation vector is a deep encoding vector generated by feature extraction of the target content. This deep encoding vector represents the semantic features of the target content. For example, a 512-dimensional floating-point vector, the distribution of its vector values ​​reflects the multimodal semantic features of the target content (such as a product details page).

[0070] At least two content sample pairs are input into the initial recall model. In the initial recall model, the source content and interaction behavior are fused and encoded to obtain a user representation vector, and the target content is encoded to obtain a target content representation vector. An optional approach is to input at least two content sample pairs into the initial recall model, embed and fuse the source content and interaction behavior in the initial recall model to obtain a user representation vector, and embed and encode the target content to obtain a target content representation vector.

[0071] For example, consider two content sample pairs containing the same source content A: in the first content sample pair, the user performs a "click" action pointing to target content B, and in the second content sample pair, the user performs a "comment" action pointing to target content C. The first and second content sample pairs are input into the initial recall model, respectively. In the initial recall model, the source content and interaction behavior are embedded and fused, resulting in user representation vectors for the first content sample pair (content A - click) and the second content sample pair (content A - comment). Simultaneously, target content B is embedded and encoded in the initial recall model, resulting in target content representation vectors for the first and second content sample pairs (content B and content C). Thus, differentiated user representation vectors are generated for the same source content A under different interaction behaviors, and these vectors, along with their corresponding target content representation vectors, form a representation vector sample pair for training the recall model.

[0072] In step 104, the source content and interaction behavior are fused and encoded in the initial recall model. This allows the model to adjust the user representation according to the user's specific interaction behavior, accurately reflecting the fine-grained differences in different user behaviors under the same source content, thus generating differentiated user representation vectors. The target content is then encoded in the initial recall model, ensuring that its semantic information is accurately extracted and represented, resulting in a target content representation vector that precisely reflects its content characteristics. The independent encoding of the user representation vector and the target content representation vector provides a reliable deep feature foundation for subsequent calculations of the similarity between user intent and content.

[0073] Step 106: Based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs, train the initial recall model to obtain the target recall model.

[0074] The similarity between a user representation vector and a target content representation vector represents the degree of proximity between the two vectors in the vector space. It is a scalar value calculated using a similarity function, including but not limited to: cosine similarity, dot product similarity, Euclidean distance, Manhattan distance, etc. This similarity is used to measure the degree of matching between user intent and target content, enabling the model to learn the semantic association between user behavior and target content.

[0075] The target recall model is a neural network model that is trained to accurately match user intent with target content. The target recall model can generate high-quality user representation vectors based on the input source content and interaction behavior, which are used to recall relevant target content from candidate content.

[0076] The initial recall model is trained based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs to obtain the target recall model. Alternatively, the initial recall model is trained by comparison based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs to obtain the target recall model.

[0077] For example, for two sample pairs of the same source content A: the first sample pair generates a user representation vector (content A - click) and a target content representation vector (content B), and the second sample pair generates a user representation vector (content A - comment) and a target content representation vector (content C). The cosine similarity of positive sample pairs [(content A - click), (content B)] and [(content A - comment), (content C)] is calculated, and the cosine similarity of negative sample pairs [(content A - click), (content C)] and [(content A - comment), (content B)] is also calculated. By maximizing the similarity of positive sample pairs and minimizing the similarity of negative sample pairs using a contrastive loss function, the parameters of the initial recall model are updated, ultimately obtaining a target recall model capable of accurately distinguishing different behavioral intentions. On a community content platform, this target recall model can accurately distinguish users' behavioral intentions based on their interaction with source content (such as clicks, comments, etc.) and generate differentiated user representations to complete the recall of target content and achieve content recommendation for users.

[0078] In step 106, the model is trained based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs. This enables the model to learn the semantic association between user behavior and target content, optimize the matching accuracy of the representation vector, improve the recall model's adaptability to diverse user behaviors, and enhance the alignment effect between user preferences and content features.

[0079] In the embodiments of this specification, the trained target recall model can more accurately match target content that users may be interested in, overcome the problem of decreased recall accuracy caused by behavioral differences, and significantly improve the recall effect and robustness of content recommendation.

[0080] In one optional embodiment of this specification, the initial recall model includes an encoding layer and a recall representation layer; step 104 includes the following specific steps:

[0081] The source content in at least two content sample pairs and the target content in at least two content sample pairs are respectively input into the encoder for embedding encoding to obtain the embedding vector of the source content in at least two content sample pairs and the embedding vector of the target content in at least two content sample pairs.

[0082] The interaction behaviors of at least two content sample pairs are input into the encoder for embedding encoding to obtain the embedding vectors of the interaction behaviors of at least two content sample pairs.

[0083] The embedding vectors of the source content, the target content, and the interaction behavior from at least two content sample pairs are input into the recall representation layer. In the recall representation layer, the embedding vectors of the source content and the interaction behavior are fused and encoded to obtain the user representation vector, and the embedding vector of the target content is encoded to obtain the target content representation vector.

[0084] The encoding layer is a neural network layer used to transform raw input data into a low-dimensional vector representation. It achieves feature extraction and compression by performing nonlinear transformations on the input features. For example, a multimodal encoding layer based on the Transformer architecture can simultaneously embed and encode multimodal information such as text and images.

[0085] The recall representation layer is a neural network layer used to generate user and content representations. It generates high-dimensional vector representations suitable for similarity matching by deeply fusing and transforming the embedding vectors output by the encoding layer. For example, a multilayer perceptron structure can be used, with nonlinear feature fusion achieved through fully connected layers and activation functions.

[0086] The embedding vector of the source content is a low-dimensional vector representation obtained by feature extraction of the multimodal information of the source content through the encoding layer. This vector preserves the semantic features of the source content. For example, a 512-dimensional floating-point vector, the numerical distribution of which represents the visual and textual features of a short video on "daily care of pet cats".

[0087] The embedding vector of the target content is a low-dimensional vector representation obtained by feature extraction of the multimodal information of the target content through the encoding layer. This vector fully preserves the semantic information of the target content. For example, a 512-dimensional floating-point vector, the numerical distribution of which represents the product features and visual content of "cat food advertisement video".

[0088] The embedding vector of an interaction behavior is a low-dimensional vector representation obtained by feature mapping of the interaction behavior type through an encoding layer. This vector encodes the semantic information of the behavior type. For example, a 128-dimensional floating-point vector can distinguish the feature differences between different behavior types such as "click" and "comment".

[0089] For example, consider two content pairs containing the same source content (a short video about "daily care of pet cats"): in the first pair, the user performs a "click" action to target content ("cat food advertisement video"), and in the second pair, the user performs a "comment" action to target content ("science notes about cat behavior"). First, the source content and the two target contents are respectively input into a multimodal encoding layer based on the Transformer architecture for embedding encoding, obtaining 512-dimensional embedding vectors for the source content, the cat food advertisement video, and the science notes. Simultaneously, the "click" and "comment" interactions are mapped through the embedding layer, obtaining 128-dimensional behavior embedding vectors for each.

[0090] In the recall representation layer employing a multilayer perceptron structure, the source content embedding vector is fused with two behavioral embedding vectors to generate two differentiated 512-dimensional user representation vectors: the first representation vector (pet cat video - click) reflects the attention tendency towards product features, and the second representation vector (pet cat video - comment) reflects the interest tendency towards knowledge content. Simultaneously, the two target content embedding vectors are further encoded to obtain the corresponding 512-dimensional target content representation vectors.

[0091] In the embodiments described in this specification, a layered processing approach involving an encoding layer and a recall representation layer is adopted. First, unified feature extraction and compression are performed on the multimodal input, followed by deep feature fusion and transformation. This layered architecture ensures both the sufficiency of feature extraction and the flexibility of feature fusion. The encoding layer ensures the effective preservation of original information, while the recall representation layer enables in-depth mining of higher-order semantics. Their collaborative work significantly improves the efficiency and effectiveness of representation learning, allowing the model to better capture fine-grained differences in user behavior, thereby generating more discriminative user representation vectors and target content representation vectors.

[0092] In one optional embodiment of this specification, the encoding layer is a large language model encoding layer; before inputting the source content from at least two content sample pairs and the target content from at least two content sample pairs into the encoder for embedding encoding to obtain the embedding vectors of the source content from at least two content sample pairs and the embedding vectors of the target content from at least two content sample pairs, the following specific steps are also included:

[0093] Add the source content from at least two content sample pairs and the target content from at least two content sample pairs to a preset prompt word template to obtain embedded prompt words for the source content from at least two content sample pairs and embedded prompt words for the target content from at least two content sample pairs.

[0094] The source content from at least two content sample pairs and the target content from at least two content sample pairs are respectively input into the encoder for embedding encoding to obtain the embedding vectors of the source content from at least two content sample pairs and the embedding vectors of the target content from at least two content sample pairs. The specific steps include the following:

[0095] The embedding prompts of the source content in at least two content sample pairs and the embedding prompts of the target content in at least two content sample pairs are respectively input into the large language model encoder for embedding encoding to obtain the embedding vectors of the source content in at least two content sample pairs and the embedding vectors of the target content in at least two content sample pairs.

[0096] The large language model encoding layer is a pre-trained language model encoder based on the Transformer architecture. It is used to perform unified feature extraction and vectorization representation of multimodal input information, and achieves deep fusion and semantic encoding of cross-modal information such as text and images through a self-attention mechanism. For example, using a large language model based on the Transformer architecture as the basic encoding layer can process text descriptions and image features simultaneously.

[0097] The prompt word template is a pre-defined structured text framework containing specific placeholders for organizing multimodal input data. It ensures the model's ability to uniformly process heterogeneous data by standardizing the input structure. For example, it may include image location markers. Title position marker <title> and text location markers<text> Template:<image> \n<title> <text> Please generate the representation vector of this content.<b class="d_n">

[0098] The embedded prompt word is the complete instruction text formed after filling in the specific content according to the prompt word template. It converts the original multimodal data into a standardized input format that the model can parse. For example, the instruction text is formed after filling in the cover image of a pet cat video, the title "Cat Care Guide", and the body text "Daily Care Precautions" into the template. <b class="d_n">

[0099] The embedded prompt word of the source content is the instruction text generated after filling in the multimodal information of the source content in a structured manner according to the prompt word template. It is used to input the encoding layer to extract the features of the source content. For example, the following prompts are generated for the source content "Pet Cat Care Video": "<image>[Cover Image]< / image>\n<title>Cat Care Guide< / title> \n <text> Daily Care Precautions< / text> Please generate the representation vector for this video.

[0100] The target content embedding prompt is a command text generated by structurally filling the multimodal information of the target content according to the prompt template. It is used as input to the encoding layer to extract target content features. For example, the prompt for the target content "cat food advertisement" is: [Product Image]\n <title> Natural Cat Food Promotion< / title> \n <text> Limited-Time Discount Offer< / text> Please generate the representation vector for this advertisement.

[0101] For example, the prompt word template is:

[0102]

[0103] Replace xxxx with the actual content of the notes.<special_token> A meaningless token reserved for use in a multimodal large model.

[0104] In the embodiments of this specification, multimodal inputs are standardized by using prompt word templates to ensure the uniformity of format of heterogeneous data during the encoding process, improve the stability of model feature extraction, and at the same time, with the powerful semantic understanding capabilities of large language models, deep fusion and representation learning of cross-modal information are achieved, significantly improving the semantic richness and discriminability of source content and target content representation vectors, and providing a high-quality feature foundation for subsequent accurate recall.

[0105] In one optional embodiment of this specification, the source content includes at least one of a content image, a content title, and content text; the target content includes at least one of a content image, a content title, and content text; and the prompt word template includes the content image position, the content title position, and the content text position.

[0106] Add the source content from at least two content sample pairs and the target content from at least two content sample pairs to a preset prompt word template to obtain embedded prompt words for the source content from at least two content sample pairs and embedded prompt words for the target content from at least two content sample pairs. This includes the following specific steps:

[0107] Add the content images of the source content to the content image position, add the content titles of the source content to the content title position, and add the content text of the source content to the content text position, thereby obtaining the embedded prompt words of the source content of at least two content samples.

[0108] Add the content image of the target content to the content image position by matching at least two content samples, add the content title of the target content to the content title position by matching at least two content samples, add the content text of the target content to the content text position by matching at least two content samples, and obtain the embedded prompt words of the target content by matching at least two content samples.

[0109] Content images are visual media data contained within content items, which express semantic information through pixel matrices, including but not limited to cover images, embedded illustrations, and video frames. For example, the cover image and video frames of a short video on "daily care for pet cats" show a cat eating cat food.

[0110] The content title is a summary text of the content item's topic, using concise language to summarize the core content and quickly convey semantic information. For example, "Daily care for pet cats".

[0111] Content text is a detailed description of the content item, containing complete semantic expressions and contextual information, used to elaborate on the content topic. For example, detailed text describing the process of a pet cat eating cat food.

[0112] The content image position is a placeholder for image insertion reserved in the prompt word template, used to indicate the embedding location of the image data. For example, in the prompt word template above... mark.

[0113] The content title position is a placeholder for the title text reserved in the prompt template, used to indicate the embedding location of the title data. For example, in the prompt template above... <title>mark.

[0114] The content text position is a placeholder reserved in the prompt word template to indicate the embedding position of the main text data. For example, in the prompt word template above...<text> mark.

[0115] In the embodiments of this specification, the structured organization of multimodal data is achieved by standardizing location markers, which ensures the orderliness and integrity of different modal information in the encoding process, avoids feature confusion, and enhances the model's ability to understand multimodal information by semantically clear location markers, thereby improving the accuracy and robustness of representation learning.

[0116] In one optional embodiment of this specification, the number of content image positions is preset;

[0117] Adding the content images of the source content from at least two content sample pairs to the content image location includes the following specific steps:

[0118] If the number of content images of the source content in at least two content sample pairs does not exceed a preset number, the content image is added to the content image position;

[0119] If the number of images of the source content in at least two content sample pairs exceeds a preset number, the first preset number of content images are cropped and the cropped content images are added to the content image position;

[0120] Adding the content image of the target content from at least two content sample pairs to the content image location, including:

[0121] If the number of images of the target content in at least two content sample pairs does not exceed a preset number, the content image is added to the content image position;

[0122] If the number of images of the target content in at least two content sample pairs exceeds a preset number, the first preset number of content images are cropped and the cropped content images are added to the content image position.

[0123] The preset number is a predefined upper limit value for the number of images, used to control the amount of image data input to the model and balance computational efficiency and feature integrity. For example, the maximum number of images is set to 4.

[0124] For example, the preset number is set to 4.When the source content (a short video about "daily pet cat care") contains 6 images, the first 4 images are cropped and filled into the template.<image> to<image> The positions are as follows: "Notebook cover image" corresponds to "video cover image," and "second image," "third image," and "fourth image" correspond to the content of three images after uniform sampling of all frames of the video. When the target content (cat food advertisement) contains only two images, all images will be filled into the first two.<image> Position, leave the last two positions blank.

[0125] In the embodiments of this specification, the scale of the input image is controlled by a preset number, which avoids computational redundancy while retaining key visual information. The standardization of the input data is ensured by the truncation strategy, which improves the model processing efficiency while maintaining the stability of the feature representation.

[0126] In one optional embodiment of this specification, the interaction behaviors of at least two content sample pairs are respectively input into an encoder for embedding encoding to obtain the embedding vectors of the interaction behaviors of at least two content sample pairs, including the following specific steps:

[0127] The interactive behaviors in at least two content sample pairs are respectively input into the encoder for embedding encoding. In the encoding layer, the interactive behaviors are compared with the embedding vector vocabulary of multiple preset interactive behaviors to determine the embedding vector of the interactive behaviors in at least two content sample pairs. Among them, the multiple preset interactive behaviors include browsing, collecting, commenting, liking and forwarding.

[0128] The preset interactive behavior is a predefined set of user operation types, which includes standardized interaction types commonly found in recommendation systems. These types represent user intent through classification labels and are used to uniformly process heterogeneous behavioral data. For example, it includes a set of behaviors with five basic interaction types: browsing, collecting, commenting, liking, and forwarding.

[0129] The embedding vector vocabulary of multiple preset interactive behaviors is a text-to-vector lookup table that stores the low-dimensional vector representations corresponding to the preset interactive behaviors. It maps discrete behavior types to low-dimensional vector representations in a continuous vector space through a learnable embedding layer to maintain the vectorization consistency of behavior semantics. For example, a trainable 5×128-dimensional embedding matrix, where each row corresponds to an interactive behavior (e.g., the "comment" behavior corresponds to the 128-dimensional vector in the 3rd row).

[0130] For example, when it is necessary to encode two interactive behaviors, "click" and "comment", the index 0 corresponding to "click" and the index 2 corresponding to "comment" are first queried in the preset interactive behavior set; then, the 128-dimensional behavior embedding vectors (such as click vector [0.12, -0.45, ..., 0.67] and comment vector [0.34, 0.21, ..., -0.89]) are obtained by index search in the embedding vector vocabulary, and these behavior embedding vectors are input into the recall representation layer and fused with the source content embedding vector.

[0131] In this embodiment of the specification, the standardized management of behavior types is achieved by pre-setting a set of interactive behaviors, avoiding feature deviations caused by heterogeneous behavior descriptions. The distributed representation of behavior features is achieved by embedding a vector vocabulary, so that similar behaviors have similar semantic relationships in the vector space. The standardized coding method significantly improves the efficiency and consistency of the model in processing behavior features, while enhancing the model's ability to generalize to unknown behaviors.

[0132] In one optional embodiment of this specification, the embedding vector of the source content and the embedding vector of the interaction behavior are fused and encoded to obtain the user representation vector, including the following specific steps:

[0133] The embedding vector of the source content is encoded with a recall representation to obtain the source content representation vector;

[0134] The embedding vector of the interaction behavior is encoded with a recall representation to obtain the interaction behavior representation vector;

[0135] The interactive behavior representation vector is injected into the source content representation vector to obtain the user representation vector.

[0136] The source content representation vector is a deep encoding vector generated by feature extraction of the source content, which represents the semantic features of the source content. For example, a 512-dimensional floating-point vector whose vector value distribution reflects the multimodal semantic features of the source content (such as a short video of "daily care of a pet cat").

[0137] The interaction behavior representation vector is a deep encoding vector generated by feature extraction of the interaction behavior, which represents the semantic features of the interaction behavior. For example, a 128-dimensional floating-point vector, the distribution of its vector values ​​reflects the semantic features of the interaction behavior.

[0138] The source content embedding vector is encoded with recall representation to obtain the source content representation vector. One possible approach is to use a self-attention mechanism to extract high-order semantic features from the source content embedding vector to obtain the source content representation vector. Another possible approach is to use a fully connected layer and an activation function layer to perform a nonlinear transformation on the source content embedding vector to obtain the source content representation vector. Yet another possible approach is to use a convolution kernel to perform local feature extraction and pooling operations on the source content embedding vector to obtain the source content representation vector. No limitation is imposed here.

[0139] The embedding vector of the interaction behavior is encoded with a recall representation to obtain the interaction behavior representation vector. One possible approach is to use the gating mechanism of the gated recurrent unit network to extract temporal features from the embedding vector of the interaction behavior to obtain the interaction behavior representation vector. Another possible approach is to use the attention mechanism to enhance the features of the embedding vector of the interaction behavior to obtain the interaction behavior representation vector. Yet another possible approach is to use linear transformation and activation function to perform feature mapping on the embedding vector of the interaction behavior to obtain the interaction behavior representation vector. No limitation is imposed here.

[0140] The user representation vector is obtained by injecting the interaction behavior representation vector into the source content representation vector. One possible method is to perform element-wise addition of the interaction behavior representation vector and the source content representation vector, and achieve feature fusion through weighted summation to obtain the user representation vector. Another possible method is to concatenate the interaction behavior representation vector and the source content representation vector and input them into a fully connected layer, and achieve feature fusion through nonlinear transformation to obtain the user representation vector. Yet another possible method is to calculate the cross-attention calculation of the interaction behavior representation vector and the source content representation vector through an attention mechanism to obtain the user representation vector. This method is not limited here.

[0141] For example, for the 512-dimensional embedding vector of the source content ("pet cat daily care" short video), firstly, a high-order semantic extraction is performed through a Transformer-based encoder to obtain a 512-dimensional source content representation vector (whose numerical distribution represents the deep semantic features of the video). At the same time, the 128-dimensional embedding vector of the "click" behavior is enhanced through a gated recurrent unit network to obtain a 128-dimensional interaction behavior representation vector (whose numerical distribution reflects the semantic features of the click behavior). Then, the influence weight of the behavior representation vector on the content representation vector is calculated through an attention mechanism, and weighted fusion is performed based on the weights to finally generate a 512-dimensional user representation vector (whose numerical distribution reflects both video content features and click behavior features).

[0142] In this embodiment of the specification, content features and behavioral features are processed separately through a hierarchical encoding strategy. First, a dedicated encoding network is used to extract their respective high-order semantic representations. Then, a carefully designed fusion mechanism is used to inject features. This hierarchical processing method not only preserves the integrity of the original features but also achieves deep fusion of cross-modal features. Source content encoding ensures the full preservation of content semantics, behavioral encoding ensures the accurate expression of behavioral features, and the fusion mechanism ensures the synergistic effect of the two types of features. The final generated user representation vector can simultaneously and accurately reflect both content characteristics and behavioral intentions, significantly improving the model's ability to represent user preferences.

[0143] In an optional embodiment of this specification, the initial recall model further includes an output module, and the recall representation layer includes a decoding module, a fine-tuning module, and an injection module;

[0144] The source content embedding vector is encoded with a recall representation to obtain the source content representation vector, including the following specific steps:

[0145] Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the source content is decoded in the decoding module to obtain the source content representation vector;

[0146] The embedding vector of the interaction behavior is encoded with a recall representation to obtain the interaction behavior representation vector, including the following specific steps:

[0147] The embedding vector of the interaction behavior is decoded in the decoding module to obtain the interaction behavior representation vector;

[0148] The user representation vector is obtained by injecting the embedding vector of the interaction behavior into the source content representation vector, including the following specific steps:

[0149] In the injection module, the interaction behavior representation vector is injected into the source content representation vector to obtain the user hidden state vector;

[0150] The user hidden state vector is dimension-mapped in the output module to obtain the user representation vector.

[0151] The decoding module is a neural network component used for feature decoding and semantic extraction of the embedded vector. It converts the input vector into a high-order semantic representation through a multi-layer transformation structure. For example, a decoding layer based on the Transformer architecture is used to achieve feature decoding through a self-attention mechanism and a feedforward neural network.

[0152] The fine-tuning module is a feature adaptation component used to dynamically adjust model parameters. It finely adjusts the decoding process through learnable parameters to adapt to different input feature distributions.For example, a parameter-adjusting network combining a linear transformation layer and an activation function can be used.

[0153] The injection module is a neural network component used to achieve feature fusion. It injects behavioral feature vectors into content feature vectors through a specific mechanism to achieve cross-modal feature interaction. For example, a cross-attention mechanism is used to achieve targeted injection of behavioral features into content features.

[0154] The output module is a neural network component used for dimension mapping and feature output. It maps the fused high-dimensional features to the target dimension space to generate the final representation vector. For example, a dimension transformation network combining fully connected layers and normalization layers can be used.

[0155] The user hidden state vector is an intermediate state vector generated during the feature fusion process. It contains mixed semantic information of content features and behavioral features, which is used for subsequent dimension mapping processing. For example, a 640-dimensional floating-point vector whose numerical distribution reflects both video content features and click behavior features.

[0156] Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the source content is decoded in the decoding module to obtain the source content representation vector. One possible approach is to generate parameter weights through the fine-tuning module and use a weighted attention mechanism in the decoding module to decode the embedding vector of the source content to obtain the source content representation vector. Another possible approach is to use the adjustment parameters output by the fine-tuning module to perform feature scaling and offset transformation in the decoding module to obtain the source content representation vector. Yet another possible approach is to control the gating mechanism of the decoding module through the fine-tuning module to decode the embedding vector of the source content to obtain the source content representation vector. This approach is not limited here.

[0157] In the decoding module, the embedding vector of the interaction behavior is decoded to obtain the interaction behavior representation vector. One possible approach is to use a self-attention mechanism in the decoding module to perform semantic enhancement on the behavior embedding vector to obtain the interaction behavior representation vector. Another possible approach is to use a fully connected layer in the decoding module to perform a nonlinear transformation on the behavior embedding vector to obtain the interaction behavior representation vector. Yet another possible approach is to use a convolutional network in the decoding module to extract local features from the behavior embedding vector to obtain the interaction behavior representation vector. This approach is not limited here.

[0158] In the injection module, the interaction behavior representation vector is injected into the source content representation vector to obtain the user hidden state vector. One possible method is to use the attention mechanism in the injection module to perform attention calculation on the interaction behavior representation vector and the source content representation vector to obtain the user hidden state vector. Another possible method is to use the injection module to concatenate the interaction behavior representation vector and the source content representation vector and then fuse them through a fully connected layer to obtain the user hidden state vector. Yet another possible method is to use the gating mechanism in the injection module to control the feature injection ratio and inject the interaction behavior representation vector into the source content representation vector to obtain the user hidden state vector. This method is not limited here.

[0159] In the output module, the user hidden state vector is mapped to a dimension to obtain the user representation vector. One possible method is to map the hidden state vector to the target dimension through the linear transformation layer in the output module to obtain the user representation vector. Another possible method is to use the multilayer perceptron in the output module to perform nonlinear dimension compression to obtain the user representation vector. Yet another possible method is to use the projection matrix in the output module to perform feature space transformation to obtain the user representation vector. This is not limited here.

[0160] For example, for the 512-dimensional embedding vector of the source content ("pet cat daily care" short video), firstly, under the parameter adjustment of the fine-tuning module, high-order semantic decoding is performed through the Transformer layer of the decoding module to obtain the 512-dimensional source content representation vector. At the same time, the 128-dimensional embedding vector of the "click" behavior is enhanced through the fully connected layer of the decoding module to obtain the 128-dimensional interaction behavior representation vector. Then, in the injection module, the behavior representation vector is injected into the content representation vector through a cross-attention mechanism to obtain a 640-dimensional user hidden state vector. Finally, in the output module, the multilayer perceptron in the output module is used to perform non-linear dimensionality compression to map the 640-dimensional vector into a 512-dimensional user representation vector.

[0161] In the embodiments of this specification, the decoding module ensures efficient decoding of the original features, the fine-tuning module enhances the model's adaptability to feature distribution, the injection module achieves accurate fusion of cross-modal features, and the output module ensures the standardization of representation dimensions. This modular architecture improves the flexibility of feature processing and ensures the consistency of representation quality, enabling the model to better balance the relationship between feature preservation and information fusion, ultimately generating high-quality user representation vectors that combine content semantics and behavioral intent, significantly improving the accuracy and robustness of the recall model.

[0162] In one optional embodiment of this specification, the decoding module includes multiple attention layer matrices, and the fine-tuning module corresponds to the multiple attention layer matrices;

[0163] Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the source content is decoded in the decoding module to obtain the source content representation vector, including the following specific steps:

[0164] Under the adjustment of the module parameters of the fine-tuning module, attention calculation is performed on the embedding vector of the source content in multiple attention layer matrices to obtain the source content representation vector.

[0165] The attention layer matrix is ​​a set of parameter matrices used to calculate attention weights. It maps the input vector to the query, key, and value space through linear transformation and models the correlation between features through the attention mechanism. The multiple attention layer matrices include four trainable parameter matrices: query matrix, key matrix, value matrix, and output matrix.

[0166] The query matrix is ​​a parameter matrix used to generate the query vector. It linearly maps the input vector to the query space and is used to calculate the relevance weights with other vectors. The key matrix is ​​a parameter matrix used to generate the key vector. It linearly maps the input vector to the key space and is used as the object being queried to calculate the attention score. The value matrix is ​​a parameter matrix used to generate the value vector. It linearly maps the input vector to the value space and stores the feature information to be extracted. The output matrix is ​​a parameter matrix used to perform a linear transformation on the attention output. It maps the attention-weighted value vector back to the original feature space.

[0167] Under the adjustment of the module parameters of the fine-tuning module, attention calculation is performed on the embedding vector of the source content in multiple attention layer matrices to obtain the source content representation vector. One possible approach is to adjust the parameters of the query matrix, key matrix, value matrix and output matrix in the attention layer matrix through the low-rank adaptation parameters generated by the fine-tuning module, and use the adjusted matrix to perform attention calculation on the embedding vector of the source content to obtain the source content representation vector. Another possible approach is to dynamically scale the weight of the attention layer matrix using the scaling factor output by the fine-tuning module, and use the scaled matrix to perform attention calculation to obtain the source content representation vector. Yet another possible approach is to control the activation threshold of the attention layer matrix through the fine-tuning module, and use the matrix after threshold adjustment to perform attention calculation to obtain the source content representation vector. This approach is not limited here.

[0168] For example, for the 512-dimensional embedding vector of the source content ("pet cat daily care" short video), a fine-tuning module is first generated to produce a low-rank adaptation parameter of a certain attention layer in the decoding layer of the large language model. Under the adjustment of the module parameters of the fine-tuning module, the query matrix, key matrix, value matrix and output matrix in the attention layer are adjusted. Then, self-attention is calculated using the adjusted matrix: the source content embedding vector is mapped to a query vector through the adjusted query matrix, to a key vector through the adjusted key matrix, and to a value vector through the adjusted value matrix; the dot product attention score of the query vector and the key vector is calculated, the value vector is weighted and summed, and finally, the 512-dimensional source content representation vector is obtained through linear transformation of the adjusted output matrix. Its numerical distribution accurately represents the deep semantic features of the video.

[0169] In this embodiment of the specification, the attention layer matrix is ​​finely adjusted by a fine-tuning module to achieve dynamic adjustment of the attention calculation process, enabling the model to better capture the key features of the source content. This fine-tuning of the attention mechanism significantly improves the model's ability to represent the semantic features of the source content, making the generated source content representation vector more discriminative and semantically rich, laying a solid foundation for subsequent feature fusion and recall matching.

[0170] In one optional embodiment of this specification, the initial recall model further includes an output module, and the recall representation layer includes a decoding module and a fine-tuning module;

[0171] Encoding the embedding vector of the target content to obtain the target content representation vector includes the following specific steps:

[0172] Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the target content is decoded in the decoding module to obtain the hidden state vector of the target content;

[0173] In the output module, the hidden state vector of the target content is dimension-mapped to obtain the target content representation vector.

[0174] It should be noted that the decoding module, fine-tuning module and output module in the embodiments of this specification are consistent with the embodiments of the above specification, and will not be described again here.

[0175] The target content hidden state vector is an intermediate state vector generated during the target content feature decoding process. It contains deep semantic feature information of the target content and is used for subsequent dimension mapping processing. For example, a 640-dimensional floating-point vector whose numerical distribution reflects the multimodal semantic features of the target content (such as "cat food advertisement video").

[0176] Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the target content is decoded in the decoding module to obtain the hidden state vector of the target content. One possible approach is to generate parameter weights through the fine-tuning module and use a weighted attention mechanism in the decoding module to decode the embedding vector of the target content to obtain the target content representation vector. Another possible approach is to use the adjustment parameters output by the fine-tuning module to perform feature scaling and offset transformation in the decoding module to obtain the target content representation vector. Yet another possible approach is to control the gating mechanism of the decoding module through the fine-tuning module to decode the embedding vector of the target content to obtain the target content representation vector. This approach is not limited here.

[0177] In the output module, the hidden state vector of the target content is mapped to the target dimension to obtain the target content representation vector. One possible method is to map the hidden state vector to the target dimension through the linear transformation layer in the output module to obtain the target content representation vector. Another possible method is to use the multilayer perceptron in the output module to perform nonlinear dimension compression to obtain the target content representation vector. Yet another possible method is to use the projection matrix in the output module to realize feature space transformation to obtain the target content representation vector. This is not limited here.

[0178] For example, for the 512-dimensional embedding vector of the target content ("cat food advertisement video"), firstly, under the parameter adjustment of the fine-tuning module, high-order semantic decoding is performed through the Transformer layer of the decoding module to obtain the 512-dimensional target content representation vector. In the output module, non-linear dimensional compression is performed using the multilayer perceptron in the output module to map the 512-dimensional vector into a 512-dimensional target content representation vector.

[0179] In the embodiments of this specification, the decoding module ensures efficient decoding of the original features, and the output module ensures the standardization of the representation dimensions. This modular architecture improves the flexibility of feature processing and ensures the consistency of representation quality, enabling the model to adapt to diverse input data distributions while maintaining the stability and comparability of the output vectors. By independently optimizing the decoding and output processes, the model can more accurately capture the semantic features of the target content, thereby generating high-quality target content representation vectors and significantly improving the accuracy and robustness of the recall model.

[0180] In one optional embodiment of this specification, the decoding module includes multiple attention layer matrices, and the fine-tuning module corresponds to the multiple attention layer matrices;

[0181] Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the target content is decoded in the decoding module to obtain the hidden state vector of the target content, including the following specific steps:

[0182] Under the adjustment of the module parameters of the fine-tuning module, attention calculation is performed on the embedding vector of the target content in multiple attention layer matrices to obtain the hidden state vector of the target content.

[0183] It should be noted that the multiple attention layer matrices in the embodiments of this specification are consistent with those in the embodiments of the above specification, and will not be repeated here.

[0184] Under the adjustment of the module parameters of the fine-tuning module, attention calculation is performed on the embedding vector of the target content in multiple attention layer matrices to obtain the target content representation vector. One possible approach is to adjust the parameters of the query matrix, key matrix, value matrix and output matrix in the attention layer matrix through the low-rank adaptation parameters generated by the fine-tuning module, and use the adjusted matrix to perform attention calculation on the embedding vector of the target content to obtain the target content representation vector. Another possible approach is to dynamically scale the weights of the attention layer matrix using the scaling factor output by the fine-tuning module, and use the scaled matrix to perform attention calculation to obtain the target content representation vector. Yet another possible approach is to control the activation threshold of the attention layer matrix through the fine-tuning module, and use the matrix after threshold adjustment to perform attention calculation to obtain the target content representation vector. This approach is not limited here.

[0185] For example, for the 512-dimensional embedding vector of the target content ("cat food advertisement video"), a fine-tuning module for low-rank adaptation parameters of a certain attention layer in the decoding layer of the large language model is first generated through a fine-tuning module. Under the adjustment of the module parameters of the fine-tuning module, the query matrix, key matrix, value matrix and output matrix in the attention layer are adjusted. Then, self-attention is calculated using the adjusted matrix: the target content embedding vector is mapped to a query vector through the adjusted query matrix, to a key vector through the adjusted key matrix, and to a value vector through the adjusted value matrix; the dot product attention score of the query vector and the key vector is calculated, the value vector is weighted and summed, and finally, a 512-dimensional target content representation vector is obtained through linear transformation of the adjusted output matrix, whose numerical distribution accurately represents the deep semantic features of the video.

[0186] In the embodiments of this specification, the fine-tuning module is used to finely adjust the parameters of the attention layer matrix, so as to dynamically adjust the attention calculation process, enabling the model to better capture the key features of the target content. This fine-tuning of the attention mechanism significantly improves the model's ability to represent the semantic features of the target content, making the generated target content representation vector more discriminative and semantically rich, laying a solid foundation for subsequent recall matching.

[0187] Related to the above-mentioned multiple embodiments, Figure 2 shows a schematic architecture diagram of a recall model in a training method of a recall model provided by an embodiment of this specification, as shown in Figure 2:

[0188] First, the source content is input into the multi-modal encoding layer to obtain an output sequence of feature vectors. If there is a user interaction behavior, the corresponding interaction behavior identifier is injected into the recall representation layer in the form of a behavior feature vector for fusion processing; if not, there is no need to inject. The hidden state at the corresponding position is taken from the output representation vector according to the index value of <special_token> in the prompt word input to the model, and the representation vector is obtained after inputting to the output module.

[0189] Taking two sample pairs containing the same source content A as an example, when the source content A points to the target content B, the corresponding interaction behavior is click, and when the source content A points to the target content C, the corresponding interaction behavior is comment. The encoder input of the initial recall model is embedded and encoded to obtain the embedded vectors of the source content, the target content, and the interaction behavior. The embedded vector of the source content and the embedded vector of the interaction behavior are fused and encoded in the recall representation layer, and the embedded vector of the target content is encoded in the recall representation layer to obtain the user hidden state vectors and the target content hidden state vectors of two users. After dimensionality mapping in the output module, the user representation vectors and the target content representation vectors of two users are output: the user representation vector of user 1 (content A - click), the user representation vector of user 2 (content A - comment), the target content representation vector of content B, and the target content representation vector of content C.

[0190] The user representation vector of User 1 and the target content representation vector of Content B, and the user representation vector of User 2 and the target content representation vector of Content C form positive sample pairs, while the user representation vector of User 1 and the target content representation vector of Content C, and the user representation vector of User 2 and the target content representation vector of Content B form negative sample pairs.

[0191] Among them, the structure of an output module is shown in Figure 3. Figure 3 shows the structural schematic diagram of the output module in a training method of a recall model provided by an embodiment of this specification:

[0192] The output module includes a linear layer, an activation function layer, a linear layer, and a regularization layer connected in series. After the input of the linear layer and the output of the regularization layer are subjected to residual connection, they are input into a normalization layer for output. This enables a hidden state vector with an input of (1, hidden layer dimension) and outputs a representation vector with an output of (1, representation vector dimension).

[0193] Among them, the structure of a recall representation layer is shown in Figure 4. Figure 4 shows the structural schematic diagram of the recall representation layer in a training method of a recall model provided by an embodiment of this specification:

[0194] The recall representation layer adopts a modular architecture, including core components such as a multi-layer perceptron, a root mean square normalization layer, an attention layer, a fine-tuning module, and an injection module, and realizes the efficient fusion of source content features and interaction behavior features through a carefully designed connection relationship.

[0195] The embedding vector of the source content is first normalized by the root mean square normalization layer and then input into the attention layer. The attention layer receives the normalized features of the embedding vector of the source content. For the four mapping matrices, namely the key vector matrix, the query vector matrix, the value vector matrix and the output vector matrix, fine-tuning modules are added respectively. The low-rank adaptation parameters generated by the fine-tuning modules are used to adjust the parameters of the query matrix, the key matrix, the value matrix and the output matrix in the attention layer matrix. Attention is calculated on the embedding vector of the source content in multiple attention layer matrices to obtain the source content representation vector.

[0196] The original source content embedding vector and the output residual of the attention layer are connected, input to the root mean square normalization layer for normalization processing, and then input to the multilayer perceptron.

[0197] The injection module can predefine multiple preset interactive behavior embedding vector vocabularies (embedded vectors of preset interactive behavior 0, preset interactive behavior 1, preset interactive behavior 2, preset interactive behavior 3, and preset interactive behavior 4). After the embedded vectors of the interactive behaviors are encoded by the large language model encoding layer, an interactive behavior representation vector with dimension (1, hidden layer dimension) is generated. This vector is injected into the source content representation vector with dimension (sequence length, representation vector dimension) in the multilayer perceptron by adding element by element. If there is no interactive behavior, the original source content representation vector remains unchanged.

[0198] In one optional embodiment of this specification, step 106 includes the following specific steps:

[0199] Positive sample pairs are constructed based on the similarity between the user representation vector and the target content representation vector in the same content sample pair;

[0200] Based on the similarity between the user representation vector and the target content representation vector in different content sample pairs, negative sample pairs are constructed;

[0201] Based on positive sample pairs and negative sample pairs, the initial recall model is trained by comparison to obtain the target recall model.

[0202] A positive sample pair is a matching vector pair consisting of a user representation vector and its corresponding target content representation vector from the same content sample pair. This vector pair represents the correct association between the user's intent and the target content. For example, the vector similarity between a user representation vector (pet cat video - click) and a target content representation vector (cat food advertisement video) reflects the degree of correct matching between the user's click behavior and the advertisement content.

[0203] A negative sample pair is a non-matching vector pair consisting of user representation vectors and non-corresponding target content representation vectors from different content sample pairs. This vector pair represents the erroneous association between user intent and target content. For example, the vector similarity between a user representation vector (pet cat video - click) and a target content representation vector (science notes) reflects the degree of mismatch between user click behavior and knowledge content.

[0204] Based on positive and negative sample pairs, the initial recall model is compared and trained to obtain the target recall model. One possible approach is to construct a contrastive loss function by calculating the similarity scores of positive and negative sample pairs and optimizing the model parameters using the gradient descent algorithm. Another possible approach is to adopt a hard negative sample mining strategy to select sample pairs that are difficult to distinguish from negative sample pairs and add them to the training to enhance the model's discrimination ability. Yet another possible approach is to use multi-temperature parameter contrastive learning to assign different temperature coefficients to sample pairs of different difficulties for weighted training, which is not limited here.

[0205] For example, for two sample pairs of the same source content (pet cat daily care videos): positive sample pairs include [(pet cat video - click), (cat food advertisement video)] and [(pet cat video - comment), (science notes)], negative sample pairs include [(pet cat video - click), (science notes)] and [(pet cat video - comment), (cat food advertisement video)]. The cosine similarity score of the positive sample pairs is calculated (e.g., 0.85 and 0.92), and the cosine similarity score of the negative sample pairs is calculated (e.g., 0.15 and 0.08). The InfoNCE contrastive loss function is used, and the model parameters are updated through the gradient descent algorithm to increase the similarity score of the positive sample pairs and decrease the similarity score of the negative sample pairs. After multiple rounds of iterative training, a target recall model that can accurately distinguish different behavioral intentions is finally obtained.

[0206] In this embodiment of the specification, the model is able to learn the semantic association between user behavior and target content through a contrastive training mechanism of positive and negative sample pairs, thereby optimizing the matching accuracy of the representation vector. Positive sample pairs ensure that the model learns the correct matching relationship, while negative sample pairs enhance the model's discriminative ability. The contrastive loss function promotes the clustering of similar samples and the separation of dissimilar samples. This training method significantly improves the model's adaptability to diverse user behaviors, enhances the alignment effect between user preferences and content features, and enables the final target recall model to more accurately match content that users may be interested in, overcoming the problem of decreased recall accuracy caused by behavioral differences, and significantly improving the recall effect and robustness of content recommendation.

[0207] In one optional embodiment of this specification, the initial recall model is compared and trained based on positive sample pairs and negative sample pairs to obtain the target recall model, including the following specific steps:

[0208] The similarity of positive sample pairs is determined based on the similarity between the user representation vector and the target content representation vector in the positive sample pairs;

[0209] The similarity of negative sample pairs is determined based on the similarity between the user representation vector and the target content representation vector in the negative sample pairs;

[0210] Calculate the contrast loss value based on the similarity of positive sample pairs and the similarity of negative sample pairs;

[0211] Based on the comparison loss value, adjust the model parameters of the initial recall model.

[0212] Positive sample pair similarity is the degree of closeness between the user representation vector and the target content representation vector in the vector space. It is a scalar value calculated by a similarity function, which represents the strength of the correct match between the user's intent and the target content. For example, the cosine similarity value between the user representation vector (pet cat video - click) and the target content representation vector (cat food advertisement video) is 0.92. The higher the value, the more accurate the match between the user's click behavior and the advertisement content.

[0213] Negative sample pair similarity is the degree of closeness between the user representation vector and the non-corresponding target content representation vector in the vector space. It is a scalar value calculated by a similarity function, which represents the strength of the mismatch between the user's intent and the target content. For example, the cosine similarity value between the user representation vector (pet cat video - click) and the target content representation vector (science notes) is 0.15. The lower the value, the lower the degree of mismatch between the user's click behavior and the knowledge content.

[0214] The contrast loss value is a loss function value calculated based on the similarity between positive and negative sample pairs. It drives the model to optimize the representation vector by quantifying the matching difference between positive and negative sample pairs. For example, the InfoNCE loss function is used, and the scalar loss value calculated based on the similarity scores of positive and negative sample pairs is used to update the model parameters in the gradient descent algorithm.

[0215] For example, the cosine similarity score for the positive sample pair [(pet cat video - click), (cat food advertisement video)] is 0.92, and the similarity score for the positive sample pair [(pet cat video - comment), (science notes)] is 0.85; the similarity score for the negative sample pair [(pet cat video - click), (science notes)] is 0.15, and the similarity score for the negative sample pair [(pet cat video - comment), (cat food advertisement video)] is 0.08. Using the InfoNCE loss function with a temperature parameter τ = 0.1, the contrast loss value is calculated as follows:

[0216]

[0217] The loss value is minimized by the gradient descent algorithm, and the model parameters are updated so that the similarity of positive sample pairs approaches 1 and the similarity of negative sample pairs approaches 0.

[0218] In the embodiments of this specification, by accurately calculating the similarity between positive and negative sample pairs and optimizing the contrast loss value, the model can explicitly distinguish between correct and incorrect matches, driving the representation vector to form a clear semantic boundary in the vector space. The similarity of positive sample pairs ensures accurate alignment between user intent and target content, while the similarity of negative sample pairs enhances the model's ability to suppress incorrect associations. The contrast loss value achieves fine-grained adjustment of the representation space through a gradient optimization mechanism. This training strategy based on similarity comparison significantly improves the model's ability to capture fine-grained differences in user behavior, enabling the generated representation vector to possess both high discriminativeness and strong generalization, ultimately enhancing the accuracy, robustness, and recommendation effect of the recall model.

[0219] In one optional embodiment of this specification, the initial recall model includes a decoding module, which includes a fine-tuning module and an output module;

[0220] Based on the contrastive loss value, the model parameters of the initial recall model are adjusted, including the following specific steps:

[0221] Based on the comparison loss value, adjust the module parameters of the fine-tuning module and the module parameters of the output module.

[0222] The module parameters of the fine-tuning module are a set of learnable parameters within the fine-tuning module, which are dynamically adjusted through gradient backpropagation to finely control the adaptability of the feature decoding process. For example, the low-rank adaptation matrix parameter in the fine-tuning module affects the adjustment magnitude and direction of the attention layer matrix.

[0223] The module parameters of the output module are the set of learnable parameters inside the output module, which are iteratively updated through optimization algorithms to precisely control the transformation relationship of the dimension mapping process. For example, the numerical distribution of the weight matrix and bias vector of the linear transformation layer in the output module determines the mapping relationship from the hidden state vector to the representation vector.

[0224] For example, for the low-rank adaptation parameter matrix (e.g., a 5×128-dimensional matrix) in the fine-tuning module and the linear layer weight matrix (e.g., a 640×512-dimensional matrix) in the output module, the gradients of the InfoNCE contrastive loss values ​​with respect to these two types of parameters are first calculated. Using the Adam optimization algorithm with a global learning rate of 0.001, the gradients of the fine-tuning module parameters (e.g., the gradient of the low-rank matrix) and the output module parameters (e.g., the gradient of the weight matrix) are calculated respectively. Parameters are updated synchronously according to the gradient direction: the updated numerical distribution of the low-rank adaptation parameter matrix in the fine-tuning module is more conducive to capturing behavioral feature differences, and the updated numerical distribution of the weight matrix in the output module is more conducive to maintaining consistency in representation dimensions. After multiple iterations, the fine-tuning module can more accurately adjust attention calculations, and the output module can more effectively generate representation vectors.

[0225] In this embodiment of the specification, the parameters of the fine-tuning module and the output module are adjusted synchronously based on the contrastive loss value, thereby achieving collaborative optimization of the decoding and mapping processes. The optimization of the fine-tuning module parameters enhances the adaptability to feature distribution, enabling the model to more accurately capture fine-grained differences in user behavior; the optimization of the output module parameters improves the standardization of dimensional mapping, making the generated representation vectors more discriminative and consistent. This collaborative parameter adjustment mechanism ensures a balance between decoding accuracy and mapping quality, significantly improving the model's ability to handle diverse inputs and the stability of output results. The fine-tuning module focuses on the refined expression of feature semantics, while the output module ensures the standardization of vector space mapping. The collaborative work of both enables the final recall model to possess both high accuracy and strong robustness, effectively improving the accuracy and efficiency of content recall.

[0226] It should be noted that, since the input source content, target content, and interactive behavior are decoupled, the input remains unchanged. Furthermore, the interactive behavior is fused and encoded after injection, ensuring that the representation vector of the source content without interactive behavior is unaffected. The training method embodiment of the recall model trains and obtains the target recall model, which can also be directly integrated into the existing representation multi-model large model as a plug-in.

[0227] Refer to Figure 5. Figure 5 shows a flowchart of a content recall method provided by an embodiment of this specification, including the following specific steps:

[0228] Step 502: Obtain the historical source content and relevant historical interaction behaviors of the target user, as well as multiple candidate target contents, where the target user performs historical interaction behaviors on the historical source content.

[0229] The historical source content is the original content item interacted with by the target user in the past period of time, and it includes at least one multimodal information of content images, content videos, content titles, and content texts. For example, the "Autumn Fashion" graphic note clicked by the target user in the past week, which contains fashion pictures, the title "Autumn Fashion Guide", and the body content.

[0230] The historical interaction behavior is the operation record performed by the target user on the historical source content, which expresses the user's intention and is directly associated with subsequent content recommendations. The historical interaction behaviors include but are not limited to clicking, collecting, commenting, liking, forwarding, etc. For example, the "click" behavior performed by the target user on the "Autumn Fashion" graphic note.

[0231] The candidate target content is a set of potential associated content items to be recommended to the target user, and it includes at least one multimodal information of content images, content videos, content titles, and content texts. For example, the graphic or video content such as "City Food", "Mobile Photography", and "Domestic小众旅行” stored in the platform. It should be noted that there may be an error in the Chinese term "国内小众旅行” in the original text. It might be an incorrect or incomplete expression. If it is a specific Chinese term that needs to be accurately translated, please provide the correct information. Here, I've translated it as "Domestic小众旅行” as it is not clear what the exact English equivalent should be based on this unclear term.

[0232] To obtain the target user's historical source content and related historical interaction behavior, as well as multiple candidate target content, one option is to extract the target user's interaction records in the recent period from the user behavior log, parse out the historical source content and historical interaction behavior, and at the same time retrieve all recommendable content from the content database as candidate target content; another option is to obtain the user's real-time interaction behavior through the real-time data stream interface, combine it with historical data to generate historical source content and interaction behavior, and dynamically filter candidate target content from the content pool; yet another option is to use the user behavior profile provided by the third-party data service to obtain historical source content and interaction behavior, and merge candidate target content from the multi-source content library, which is not limited here.

[0233] For example, on the community content platform, the target user ID is 123. In the offline scenario, the user's interaction records for the past 7 days are obtained from the user behavior log: the historical source content includes the "Autumn Outfit" text and image notes that the user clicked and the "City Food" video notes that the user collected. The historical interaction behaviors include two types: "click" and "collect". At the same time, in the offline scenario, all text and image and video content is retrieved from the platform content database, and 1,000 candidate target contents are selected, including notes such as "Mobile Photography Tutorial" and "Domestic Niche Travel Guide".

[0234] In step 502, by obtaining the historical source content and interaction behavior of the target user, a behavioral data foundation is provided for the subsequent generation of user representation. At the same time, by obtaining multiple candidate target content, a candidate content pool is provided for recall matching.

[0235] Step 504: Input the historical source content, multiple candidate target content and historical interaction behavior into the target recall model trained by the above recall model training method, and fuse and encode the historical source content and historical interaction behavior in the target recall model to obtain the user representation vector, and encode multiple candidate target content to obtain multiple target content representation vectors.

[0236] The target recall model is a neural network model obtained through the above training method. It can generate high-quality user representation vectors based on the input source content and interaction behavior, and encode the target content to generate content representation vectors for similarity matching. For example, a deep neural network model based on an encoding layer and a recall representation layer architecture is adopted, and its parameters are optimized through comparative learning.

[0237] The user representation vector is a deep encoding vector generated by fusing encoding historical source content features and historical interaction behavior features. This vector represents the target user's intention preference under a specific behavior.For example, a 512-dimensional floating-point vector whose numerical distribution reflects the fashion features that users focus on when clicking on "Autumn Outfits" notes.

[0238] The target content representation vector is a deep encoding vector generated by feature extraction of candidate target content. This vector represents the semantic features of the candidate content. For example, a 512-dimensional floating-point vector whose numerical distribution reflects the multimodal semantic information of the "Mobile Photography Tutorial" notes.

[0239] The historical source content, multiple candidate target content, and historical interaction behavior are input into the target recall model. The historical source content and historical interaction behavior are fused and encoded in the model to obtain user representation vectors, and multiple candidate target content are encoded to obtain multiple target content representation vectors. One optional method is to input the historical source content and historical interaction behavior into the target recall model after structuring them through prompt word templates, perform embedding encoding in the encoding layer, and perform fusion encoding in the recall representation layer to generate user representation vectors; simultaneously, the candidate target content is input into the model through prompt word templates and embedded encoding in the encoding layer to generate target content representation vectors; another optional method is to use the real-time inference interface of the target recall model to process historical source content, interaction behavior, and candidate target content in batches and generate user representation vectors and content representation vectors in parallel; yet another optional method is to use a distributed computing framework to input historical source content, interaction behavior, and candidate target content into the target recall model in segments and generate representation vectors in a distributed manner, which is not limited here.

[0240] For example, in an offline scenario, for the target user's historical source content ("Autumn Outfit" text and image notes) and historical interaction behavior ("clicks"), they are first filled into the prompt word template to generate embedded prompt words: "<image> [Outfit Images]< / image> \n<title> Autumn outfit guide.< / title> \n <text> Autumn Outfit Tips< / text> "Please generate the representation vector for this note." After inputting into the target recall model, multimodal embedding encoding is performed at the encoding layer. At the recall representation layer, the source content embedding vector and the behavior embedding vector are fused to generate a 512-dimensional user representation vector (whose numerical distribution reflects the user's attention to fashion features in their click behavior). Simultaneously, 1000 candidate target contents (such as a "Mobile Photography Tutorial" note) are filled into a template to generate prompt words, which are then input into the model's encoding layer for embedding encoding, generating 1000 512-dimensional target content representation vectors.

[0241] In step 504, the historical source content and interaction behavior are fused and encoded using a target recall model to generate a high-quality user representation vector that accurately reflects the user's behavioral intent. Simultaneously, candidate target content is batch-encoded to generate accurate content representation vectors. The user representation vector captures fine-grained differences in user preferences, while the content representation vector preserves the semantic integrity of the content; both provide a reliable feature foundation for subsequent similarity calculations.

[0242] Step 506: Based on the user representation vector and multiple target content representation vectors, determine the target recommended content from multiple candidate target content.

[0243] The target recommended content is selected based on the similarity between the user's representation vector and the target content's representation vector. This content highly matches the user's intent and is ultimately pushed to the user. For example, the "Mobile Photography Tutorial" notes have the highest similarity to the user's representation vector.

[0244] Based on user representation vectors and multiple target content representation vectors, target recommended content is determined from multiple candidate target content. One possible approach is to calculate the cosine similarity between the user representation vector and each target content representation vector, and select the top N candidate contents with the highest similarity as target recommended content. Another possible approach is to use an approximate nearest neighbor search algorithm to quickly retrieve the top-K contents most similar to the user representation vector in the vector space as target recommended content. Yet another possible approach is to use a re-ranking model to weight and adjust the similarity scores, and combine this with business rules to filter the final target recommended content, which is not limited here.

[0245] For example, the cosine similarity between the target user's user representation vector (a 512-dimensional vector, with a numerical distribution reflecting attention to fashion features) and the representation vectors of 1000 candidate target content is calculated, resulting in 1000 similarity scores. The top 10 candidate content with the highest similarity scores (e.g., "Mobile Photography Tutorial" notes with a similarity of 0.92, "Domestic Niche Travel" notes with a similarity of 0.85, etc.) are selected as the target recommended content list.

[0246] In the embodiments described in this specification, the target recommended content is determined from candidate content based on vector similarity, achieving a precise match between user intent and content features. This significantly improves the accuracy of content retrieval, ensuring that the recommended content highly aligns with user preferences. Simultaneously, the efficient algorithm enables rapid and accurate retrieval of a large number of candidate contents, balancing recommendation quality and computational efficiency.

[0247] In one optional embodiment of this specification, after step 506, the following specific steps are further included:

[0248] The recommended content will be displayed on the target user's homepage.

[0249] The user homepage is the primary interface for target users when accessing a content platform. It displays a personalized list of recommended content and provides an entry point for user interaction with the content. For example, a community content platform's personal homepage or recommendation feed page, such as... Figure 6 The mobile phone interface shown.

[0250] To display the target recommended content on the target user's homepage, one possible approach is to send the list of target recommended content to the user's homepage rendering engine via a content push interface, displaying the content images, titles, and summaries in card format. Another possible approach is to dynamically insert the target recommended content into the user's homepage feed using a real-time recommendation service, adjusting the display order based on the user's real-time behavior. Yet another possible approach is to use an A / B testing framework to assign different recommendation strategies, displaying different versions of the target recommended content on the user's homepage to optimize the effect; this approach is not limited here.

[0251] For example, a list of recommended content (such as "Mobile Photography Tutorials," "Domestic Off-the-Beaten-Path Travel," and 10 other items) is sent to the homepage rendering service for user ID 123 via the platform's push API. The homepage displays the content cover image, title "Mobile Photography Tips," and description "Learn to Take Masterpieces with Your Phone" in the form of image and text cards. Users can click on the card to jump to the details page, such as... Figure 6 The content display area shown.

[0252] Figure 6 This specification illustrates a front-end schematic diagram of a content recall method according to an embodiment of this specification, such as... Figure 6 As shown:

[0253] The front-end interface is the target user's homepage. The top navigation bar includes buttons to switch between three channels: "Following," "Discover," and "Nearby," used to filter content from different sources. The central content display area presents four image and text recommendation cards in a vertical flow format, namely:

[0254] The "Create Your Versatile Autumn OOTD" card displays autumn outfit images, titles, and summaries, corresponding to fashion content. The "Explore Hidden Gems in the City" card displays food images, titles, and summaries, corresponding to food content. The "How to Take Cinematic Photos with Your Phone" card displays photography images, titles, and summaries, corresponding to photography content. The "Unmissable Off-the-Beaten-Path Domestic Travel Destinations" card displays travel images, titles, and summaries, corresponding to travel content.

[0255] Each card contains a content image, title text, summary text, and interactive buttons (such as a "Details" button). The bottom navigation bar has five icon buttons: "Home," "Videos," "Publish Notes," "Messages," and "Me," used for in-app navigation. The background is white, the layout is clean and visually clear, facilitating user browsing and interaction. The target user's homepage displays targeted recommended content generated by the recall model; the target user can obtain personalized information through channel switching and click actions.

[0256] In the embodiments described in this specification, personalized recommendation results are delivered by displaying the target recommended content on the user's homepage. Homepage display ensures that recommended content reaches the user, directly improving the user's content interaction experience and increasing user satisfaction and platform activity.

[0257] Corresponding to the above method embodiments, this specification also provides embodiments of a training device for a recall model. Figure 7 A schematic diagram of a training apparatus for a recall model according to one embodiment of this specification is shown. Figure 7 As shown, the device includes:

[0258] The first acquisition module 702 is configured to acquire at least two content sample pairs containing the same source content, wherein any content sample pair contains source content, target content and related interactive behavior, and the user performs interactive behavior on the source content to point to the target content;

[0259] The first encoding module 704 is configured to input at least two content sample pairs into the initial recall model, and to perform fusion encoding of the source content and interaction behavior in the initial recall model to obtain a user representation vector, and to encode the target content to obtain a target content representation vector.

[0260] Training module 706 is configured to train an initial recall model based on the similarity between user representation vectors and target content representation vectors in at least two content sample pairs, thereby obtaining a target recall model.

[0261] In the embodiments of this specification, the trained target recall model can more accurately match target content that users may be interested in, overcome the problem of decreased recall accuracy caused by behavioral differences, and significantly improve the recall effect and robustness of content recommendation.

[0262] The above is a schematic scheme of a training device for a recall model according to this embodiment. It should be noted that the technical solution of this training device for a recall model and the technical solution of the training method for a recall model described above belong to the same concept. For details not described in detail in the technical solution of the training device for a recall model, please refer to the description of the technical solution of the training method for a recall model described above.

[0263] Corresponding to the above method embodiments, this specification also provides embodiments of a content recall device. Figure 8 A schematic diagram of a content recall device according to one embodiment of this specification is shown. Figure 8 As shown, the device includes:

[0264] The second acquisition module 802 is configured to acquire the target user's historical source content and related historical interaction behavior, as well as multiple candidate target content, wherein the target user performs historical interaction behavior in the historical source content;

[0265] The second encoding module 804 is configured to input the historical source content, multiple candidate target content and historical interaction behavior into the target recall model trained by the above recall model training method, and to fuse and encode the historical source content and historical interaction behavior in the target recall model to obtain the user representation vector, and to encode multiple candidate target content to obtain multiple target content representation vectors.

[0266] The recall module 806 is configured to determine the target recommended content from multiple candidate target content based on the user representation vector and multiple target content representation vectors.

[0267] In the embodiments described in this specification, the target recommended content is determined from candidate content based on vector similarity, achieving a precise match between user intent and content features. This significantly improves the accuracy of content retrieval, ensuring that the recommended content highly aligns with user preferences. Simultaneously, the efficient algorithm enables rapid and accurate retrieval of a large number of candidate contents, balancing recommendation quality and computational efficiency.

[0268] The above is an illustrative scheme of a content recall device according to this embodiment. It should be noted that the technical solution of this content recall device and the technical solution of the content recall method described above belong to the same concept. For details not described in detail in the technical solution of the content recall device, please refer to the description of the technical solution of the content recall method described above.

[0269] Figure 9 A structural block diagram of a computing device according to one embodiment of this specification is shown. The components of the computing device 900 include, but are not limited to, a memory 910 and a processor 920. The processor 920 is connected to the memory 910 via a bus 930, and a database 950 is used to store data.

[0270] The computing device 900 also includes an access device 940, which enables the computing device 900 to communicate via one or more networks 960. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 940 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Controller (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, or Near Field Communication (NFC).

[0271] In one embodiment of this specification, the above-described components of the computing device 900 and Figure 9 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 9 " The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0272] The computing device 900 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 900 can also be a mobile or stationary server.

[0273] The processor 920 is used to execute the following computer program / instructions, which, when executed by the processor, implement the steps of the above-mentioned recall model training method or content recall method.

[0274] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solutions of the above-mentioned recall model training method and content recall method. For details not described in detail in the technical solution of the computing device, please refer to the description of the above-mentioned recall model training method or content recall method.

[0275] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the training method or content retrieval method of the recall model described above.

[0276] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions of the above-described recall model training method and content recall method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the above-described recall model training method or content recall method.

[0277] An embodiment of this specification also provides a computer program product, including a computer program / instructions, which, when executed by a processor, implement the steps of the above-described recall model training method or content recall method.

[0278] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the technical solutions of the above-mentioned recall model training method and content recall method. For details not described in detail in the technical solution of the computer program product, please refer to the description of the above-mentioned recall model training method or content recall method.

[0279] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0280] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0281] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0282] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0283] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.

Claims

1. A training method for a recall model, characterized in that, include: Obtain at least two content sample pairs containing the same source content, wherein each content sample pair contains source content, target content and related interactive behavior, and the user performs the interactive behavior on the source content to point to the target content; The at least two content sample pairs are respectively input into the initial recall model, where the source content and interaction behavior are fused and encoded to obtain the user representation vector, and the target content is encoded to obtain the target content representation vector. The initial recall model is trained based on the similarity between the user representation vector and the target content representation vector in at least two content sample pairs to obtain the target recall model.

2. The method according to claim 1, characterized in that, The initial recall model includes an encoding layer and a recall representation layer; The step of inputting the at least two content sample pairs into an initial recall model, fusing and encoding the source content and interaction behavior in the initial recall model to obtain a user representation vector, and encoding the target content to obtain a target content representation vector, includes: The source content and the target content of the at least two content sample pairs are respectively input into the encoder for embedding encoding to obtain the embedding vector of the source content and the embedding vector of the target content of the at least two content sample pairs. The interaction behaviors in the at least two content sample pairs are respectively input into the encoder for embedding encoding to obtain the embedding vectors of the interaction behaviors in the at least two content sample pairs; The embedding vectors of the source content, the embedding vectors of the target content, and the interaction behavior from the at least two content sample pairs are respectively input into the recall representation layer. In the recall representation layer, the embedding vectors of the source content and the embedding vectors of the interaction behavior are fused and encoded to obtain the user representation vector, and the embedding vectors of the target content are encoded to obtain the target content representation vector.

3. The method according to claim 2, characterized in that, The encoding layer is a large language model encoding layer; Before inputting the source content and target content of the at least two content sample pairs into the encoder for embedding encoding to obtain the embedding vectors of the source content and the target content of the at least two content sample pairs, the method further includes: The source content and target content of the at least two content sample pairs are added to a preset prompt word template to obtain embedded prompt words for the source content and embedded prompt words for the target content of the at least two content sample pairs. The step of inputting the source content and the target content of the at least two content sample pairs into the encoder for embedding encoding to obtain the embedding vector of the source content and the embedding vector of the target content of the at least two content sample pairs includes: The embedding prompts of the source content in the at least two content sample pairs and the embedding prompts of the target content in the at least two content sample pairs are respectively input into the large language model encoder for embedding encoding to obtain the embedding vectors of the source content in the at least two content sample pairs and the embedding vectors of the target content in the at least two content sample pairs.

4. The method according to claim 3, characterized in that, The source content includes at least one of a content image, a content title, and content text; the target content includes at least one of a content image, a content title, and content text; and the prompt word template includes the content image position, the content title position, and the content text position. The step of adding the source content from the at least two content sample pairs and the target content from the at least two content sample pairs to a preset prompt word template to obtain embedded prompt words for the source content from the at least two content sample pairs and embedded prompt words for the target content from the at least two content sample pairs includes: Add the content image of the source content in the at least two content sample pairs to the content image position, add the content title of the source content in the at least two content sample pairs to the content title position, and add the content text of the source content in the at least two content sample pairs to the content text position to obtain the embedded prompt words of the source content in the at least two content sample pairs. Add the content image of the target content in the at least two content sample pairs to the content image position, add the content title of the target content in the at least two content sample pairs to the content title position, and add the content text of the target content in the at least two content sample pairs to the content text position to obtain the embedded prompt words of the target content in the at least two content sample pairs.

5. The method according to claim 4, characterized in that, The number of content image positions is preset. Adding the content image of the source content from the at least two content sample pairs to the content image location includes: If the number of content images of the source content in the at least two content sample pairs does not exceed the preset number, the content image is added to the content image position; If the number of content images of the source content in at least two content sample pairs exceeds the preset number, the first preset number of content images are cropped, and the cropped content images are added to the content image position. Adding the content image of the target content in the at least two content sample pairs to the content image position includes: If the number of content images of the target content in the at least two content sample pairs does not exceed the preset number, the content image is added to the content image position; If the number of content images of the target content in at least two content sample pairs exceeds the preset number, the first preset number of content images are cropped, and the cropped content images are added to the content image position.

6. The method according to claim 2, characterized in that, The step of inputting the interaction behaviors of at least two content sample pairs into an encoder for embedding encoding to obtain the embedding vectors of the interaction behaviors of at least two content sample pairs includes: The interactive behaviors in the at least two content sample pairs are respectively input into the encoder for embedding encoding. In the encoding layer, the interactive behaviors are compared with the embedding vector vocabulary of multiple preset interactive behaviors to determine the embedding vector of the interactive behaviors in the at least two content sample pairs. The multiple preset interactive behaviors include browsing, collecting, commenting, liking and forwarding.

7. The method according to any one of claims 2-6, characterized in that, The process of fusing and encoding the embedding vectors of the source content and the embedding vectors of the interaction behavior to obtain the user representation vector includes: The embedding vector of the source content is encoded with a recall representation to obtain the source content representation vector; The embedding vector of the interaction behavior is encoded with a recall representation to obtain the interaction behavior representation vector; The user representation vector is obtained by injecting the interaction behavior representation vector into the source content representation vector.

8. The method according to claim 7, characterized in that, The initial recall model also includes an output module, and the recall representation layer includes a decoding module, a fine-tuning module, and an injection module; The step of encoding the embedding vector of the source content to obtain the source content representation vector includes: With the module parameters adjusted by the fine-tuning module, the embedding vector of the source content is decoded in the decoding module to obtain the source content representation vector; The step of performing recall representation encoding on the embedding vector of the interaction behavior to obtain the interaction behavior representation vector includes: In the decoding module, the embedding vector of the interaction behavior is decoded to obtain the interaction behavior representation vector; The step of injecting the embedding vector of the interaction behavior into the source content representation vector to obtain the user representation vector includes: In the injection module, the interaction behavior representation vector is injected into the source content representation vector to obtain the user hidden state vector; In the output module, the user hidden state vector is dimension-mapped to obtain the user representation vector.

9. The method according to claim 8, characterized in that, The decoding module includes multiple attention layer matrices, and the fine-tuning module corresponds to the multiple attention layer matrices. Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the source content is decoded in the decoding module to obtain the source content representation vector, including: With the module parameters adjusted by the fine-tuning module, attention calculation is performed on the embedding vector of the source content in the multiple attention layer matrices to obtain the source content representation vector.

10. The method according to any one of claims 2-6, characterized in that, The initial recall model also includes an output module, and the recall representation layer includes a decoding module and a fine-tuning module; The process of encoding the embedding vector of the target content to obtain the target content representation vector includes: With the module parameters adjusted by the fine-tuning module, the embedding vector of the target content is decoded in the decoding module to obtain the hidden state vector of the target content; In the output module, the hidden state vector of the target content is dimension-mapped to obtain the target content representation vector.

11. The method according to claim 10, characterized in that, The decoding module includes multiple attention layer matrices, and the fine-tuning module corresponds to the multiple attention layer matrices. Under the adjustment of the module parameters of the fine-tuning module, the embedding vector of the target content is decoded in the decoding module to obtain the hidden state vector of the target content, including: With the module parameters of the fine-tuning module adjusted, attention calculation is performed on the embedding vector of the target content in the multiple attention layer matrices to obtain the hidden state vector of the target content.

12. The method according to claim 1, characterized in that, The initial recall model is trained based on the similarity between user representation vectors and target content representation vectors in at least two content sample pairs to obtain a target recall model, including: Positive sample pairs are constructed based on the similarity between user representation vectors and target content representation vectors in the same content sample pair. Negative sample pairs are constructed based on the similarity between user representation vectors and target content representation vectors in different content sample pairs. Based on the positive sample pairs and the negative sample pairs, the initial recall model is trained comparatively to obtain the target recall model.

13. The method according to claim 12, characterized in that, The step of comparatively training the initial recall model based on the positive sample pairs and the negative sample pairs to obtain the target recall model includes: The similarity of the positive sample pairs is determined based on the similarity between the user representation vector and the target content representation vector in the positive sample pairs. The similarity of the negative sample pairs is determined based on the similarity between the user representation vector and the target content representation vector in the negative sample pairs. Based on the similarity of the positive sample pairs and the similarity of the negative sample pairs, the contrast loss value is calculated; Based on the contrast loss value, the model parameters of the initial recall model are adjusted.

14. The method according to claim 13, characterized in that, The initial recall model includes a decoding module, which includes a fine-tuning module and an output module; The step of adjusting the model parameters of the initial recall model based on the contrast loss value includes: Based on the comparison loss value, adjust the module parameters of the fine-tuning module and the module parameters of the output module.

15. A content recall method, characterized in that, include: The system obtains the target user's historical source content and related historical interaction behavior, as well as multiple candidate target content, wherein the target user performs the historical interaction behavior on the historical source content; The historical source content, the multiple candidate target content, and the historical interaction behavior are input into the target recall model trained by the method of any one of claims 1-14. In the target recall model, the historical source content and the historical interaction behavior are fused and encoded to obtain a user representation vector, and the multiple candidate target content is encoded to obtain multiple target content representation vectors. Based on the user representation vector and the multiple target content representation vectors, target recommended content is determined from the multiple candidate target contents.

16. The method according to claim 15, characterized in that, After determining the target recommended content from the plurality of candidate target contents based on the user representation vector and the plurality of target content representation vectors, the method further includes: The target recommended content will be displayed on the target user's homepage.

17. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 16.

18. A computer-readable storage medium, characterized in that, It stores a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 16.

19. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 16.