Commodity recommendation method and device, equipment and medium
By combining intent encoding networks and conditional diffusion networks, the problem of distinguishing between user interests and noise in traditional sequence recommendation methods is solved, achieving high-precision and personalized product recommendations.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 广州商研网络科技有限公司
- Filing Date
- 2026-02-06
- Publication Date
- 2026-05-19
AI Technical Summary
Traditional deep learning-based sequence recommendation methods cannot effectively distinguish between users' true interests and behavioral noise, resulting in low recommendation accuracy.
An intent encoding network is used to extract user intent vectors from user interaction sequences, and a conditional diffusion network is used to denoise random noise, generating recommended product vectors that are highly consistent with user intent.
It improves the alignment accuracy between recommended products and users' actual needs, enhances the accuracy and novelty of personalized recommendations, and avoids rigid or biased recommendation results.
Smart Images

Figure CN122066489A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of e-commerce technology, and in particular to a product recommendation method and the corresponding apparatus, computer equipment, and computer-readable storage medium. Background Technology
[0002] In product recommendation scenarios, traditional deep learning-based sequence recommendation methods typically model the user's original historical product interaction sequence directly. These methods, such as those based on recurrent neural networks or Transformers, work by treating a series of chronologically generated product interaction records as a single input sequence and mapping this sequence into one or more vector representations through a model encoder. This representation aims to directly establish a predictive association from the entire historical sequence to the next product to be recommended; that is, the model's learning objective is to maximize the conditional probability of correctly predicting subsequent products based on the overall sequence representation in an end-to-end manner. This paradigm essentially attempts to fit a complex, direct mapping relationship between all product interactions in the sequence and the final recommendation goal.
[0003] However, this technical approach of directly modeling the overall sequence and its association with the final goal has inherent limitations. Lacking a clear and explicit intermediate modeling stage to specifically extract and represent the user's core intent, the model is forced to directly learn a fusion representation for the ultimate prediction task from the original sequence, which includes accidental noise such as accidental clicks and temporary browsing. This means that both interactions representing genuine long-term interests and transient noise signals are indiscriminately encoded into the final user sequence representation under the same optimization objective. Therefore, this representation vector inevitably becomes a mixture of the user's true intent and behavioral noise, making it difficult for recommendation inference based on this to accurately focus on the user's essential needs, thus reducing the accuracy of recommended product predictions. Given the shortcomings of traditional technologies, this application proposes an alternative approach to solve the technical challenges of this business scenario. Summary of the Invention
[0004] The primary objective of this application is to solve at least one of the aforementioned problems by providing a product recommendation method and corresponding apparatus, computer equipment, and computer-readable storage medium.
[0005] To achieve the various objectives of this application, the following technical solution is adopted: A product recommendation method provided for one of the purposes of this application includes the following steps: In response to a product recommendation event triggered by a user, obtain the encoded vector sequence corresponding to the user's interactive product sequence; The user intent of the encoded vector sequence is extracted using the intent encoding network in the preset product recommendation model and represented as a user intent vector; The conditional diffusion network in the product recommendation model uses the user intent vector to conditionally denoise the random noise vector, and infers the recommended product vector. From a pre-defined product embedding vector library, retrieve recommended products corresponding to product embedding vectors that match the recommended product vectors, and push the recommended products to the user.
[0006] On the other hand, a product recommendation device provided to meet one of the purposes of this application includes an event response module, an intent representation module, a diffusion reconstruction module, and a product selection module. The event response module is used to respond to a product recommendation event triggered by a user and obtain an encoding vector sequence corresponding to the user's interactive product sequence. The intent representation module is used to extract the user intent from the encoding vector sequence using an intent encoding network in a preset product recommendation model, representing it as a user intent vector. The diffusion reconstruction module is used to conditionally denoise a random noise vector using the user intent vector through a conditional diffusion network in the product recommendation model, inferring a recommended product vector. The product selection module is used to obtain recommended products from a preset product embedding vector library that match the recommended product vector, and push the recommended products to the user.
[0007] In another aspect, a computer device provided for one of the purposes of this application includes a central processing unit and a memory, the central processing unit being used to invoke and run a computer program stored in the memory to perform the steps of the product recommendation method described in this application.
[0008] In another aspect, a computer program product provided for another purpose of this application includes a computer program / instructions that, when executed by a processor, implement the steps of the method described in any embodiment of this application.
[0009] The technical solution of this application has many advantages, including but not limited to the following aspects: This application achieves precise capture and utilization of users' deep intentions by organically integrating all steps from user interaction sequences to final recommendation generation, thus effectively overcoming the challenge of sequence noise interfering with recommendation accuracy. The entire process begins with the encoding and transformation of the user's interaction product sequence, followed by the active extraction of intent vectors representing the user's core interests from the sequence by the intent encoding network. This explicit extraction and separation of intent effectively filters out accidental noise mixed in with the original behavioral data, focusing the model's attention on the user's stable and genuine needs, thereby providing a pure and high-fidelity intent foundation for subsequent recommendations.
[0010] Based on the obtained clear intent, the conditional diffusion network guides and denoises random noise step by step, inferring a recommended product vector that highly matches the user's intent. This generation process ensures that the derivation of the recommendation results is directly controlled by the extracted user intent, rather than directly dependent on the noisy original sequence, thus significantly enhancing the alignment accuracy between recommended products and the user's actual needs. Simultaneously, the conditional generation characteristics of the diffusion model allow for controlled diversity exploration guided by intent, avoiding rigid or biased recommendation results caused by mixed intents, and improving the personalization and novelty of the recommendations.
[0011] In summary, a progressive architecture was constructed, from behavior sequence to intent extraction and then to intent-guided generation. Intent modeling serves as a crucial intermediate stage, making the decision-making logic of the recommendation service clearer and more robust. Finally, based on the generated recommendation vector, specific products are matched and pushed from the product library. This improves the accuracy of predictions and enhances the interpretability and user experience of personalized services. Attached Figure Description
[0012] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein: Figure 1 The network architecture of the e-commerce platform exemplified in this application; Figure 2 This is a flowchart illustrating a typical embodiment of the product recommendation method of this application; Figure 3 This is a schematic block diagram of the product recommendation device of this application; Figure 4 This is a schematic diagram of the structure of a computer device used in this application. Detailed Implementation
[0013] The following describes in detail Embodiment 1 of this application. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0014] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.
[0015] Those skilled in the art will understand that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0016] like Figure 1 In the network architecture shown, the e-commerce platform 82 is deployed on the Internet to provide corresponding services to its users. Similarly, the devices 80 of the merchant users and the devices 81 of the consumer users of the e-commerce platform 82 are also connected to the Internet to use the services provided by the e-commerce platform.
[0017] An exemplary e-commerce platform 82 provides supply and demand matching of products and / or services to the general public through the Internet infrastructure. In e-commerce platform 82, products and / or services are provided as commodity information. For the sake of simplicity, the concepts of commodity and product are used in this application to refer to the products and / or services in e-commerce platform 82. Specifically, these may be physical products, digital products, tickets, service subscriptions, other offline services, etc.
[0018] In reality, various entities can access e-commerce platform 82 as users and utilize its online services to participate in the business activities facilitated by the platform. These entities can be natural persons, legal persons, or social organizations. Corresponding to the two types of entities in business activities—merchants and consumers—e-commerce platform 82 has two corresponding categories of users: merchant users and consumer users. Entities involved in the product distribution chain in business activities, including manufacturers, sellers, retailers, and logistics providers, can all use online services on e-commerce platform 82 as merchant users. Similarly, consumers in business activities, including actual or potential consumers, can use online services on e-commerce platform 82 as consumer users. In actual business activities, the same entity can operate as both a merchant user and a consumer user; this should be interpreted flexibly.
[0019] The infrastructure used to deploy the e-commerce platform 82 mainly includes the backend architecture and frontend devices. The backend architecture runs various online services through a service cluster, including middleware or frontend services for the platform, services for consumers, and services for merchants, to enrich and improve its service functions. The frontend devices mainly cover the terminal devices used by users as clients to access the e-commerce platform 82, including but not limited to various mobile terminals, personal computers, and point-of-sale devices. For example, merchant users can use their terminal device 80 to enter product information for their online stores or use the interfaces opened by the e-commerce platform to generate their product information; consumer users can use their terminal device 81 to access the webpage of the online store implemented by the e-commerce platform 82, trigger the shopping process by clicking the shopping button provided on the webpage, and call various online services provided by the e-commerce platform 82 during the shopping process to achieve the purpose of placing an order.
[0020] In some embodiments, the e-commerce platform 82 may be implemented via a processing facility including a processor and memory, which stores a set of instructions that, when executed, cause the e-commerce platform 82 to perform the e-commerce and support functions as described in this application. The processing facility may be part of a server, client, network infrastructure, mobile computing platform, cloud computing platform, fixed computing platform, or other computing platform, and may provide electronic components, merchant devices, payment gateways, application developers, marketing channels, transportation providers, customer devices, point-of-sale devices, etc., for the e-commerce platform 82.
[0021] E-commerce platform 82 can provide online services such as cloud computing services, Software as a Service (SaaS), Infrastructure as a Service (IaaS), Platform as a Service (PaaS), Desktop as a Service (DaaS), Hosted Software as a Service, Mobile Backend as a Service (MBaaS), and Information Technology Management as a Service (ITMaaS). In some embodiments, the various functional components of e-commerce platform 82 can be implemented to operate on various platforms and operating systems. For example, for an online store, its administrator user enjoys the same or similar functions regardless of whether it is on iOS, Android, HomonyOS, or a web page.
[0022] E-commerce platform 82 enables merchants to create their own independent websites to run their online stores. It provides merchants with corresponding business management engine instances, allowing them to establish, maintain, and operate one or more online stores across these independent websites. The business management engine instance can be used for content management, task automation, and data management for one or more online stores. It can be configured through interfaces or built-in components to support various specific business processes in the online store, supporting business activities. Independent websites are the infrastructure of e-commerce platform 82, which offers cross-border services. Merchants can maintain their online stores relatively independently and centrally based on these independent websites. Independent websites typically have dedicated domain names and storage space, and different independent websites are relatively independent. E-commerce platform 82 can provide standardized or customized technical support for a large number of independent websites, allowing merchants to customize a business management engine instance that suits their needs and use it to maintain one or more online stores.
[0023] Online stores can be configured and maintained in the backend by merchant users logging into their Business Management Engine instance as administrators. Supported by the various online services provided by the e-commerce platform 82's infrastructure, merchant users can configure various functions within their online stores and view various data as administrators. For example, merchant users can manage various aspects of their online stores, such as viewing recent online store activities, updating the online store's product catalog, managing orders, recent visit activity, and total order activity. Merchant users can also view more detailed information about their business and visitors to their online store by obtaining reports or metrics, such as displaying a sales summary of the merchant's overall business, specific sales and engagement data from promotional sales and marketing channels, etc.
[0024] E-commerce platforms 82 can provide communication facilities and associated merchant interfaces for electronic communication and marketing. For example, they can utilize electronic messaging aggregation facilities to collect and analyze communication interactions between merchants, consumers, merchant devices, customer devices, point-of-sale devices, etc., aggregating and analyzing communications to increase the potential for product sales. For instance, a consumer may have product-related questions, which could lead to a dialogue between the consumer and the merchant (or an automated processor-based agent representing the merchant), where the communication facilities handle the interaction and provide the merchant with analysis on how to increase the probability of a sale.
[0025] In some embodiments, applications suitable for installation on devices can be provided to serve the access needs of different users, enabling various users to access the e-commerce platform 82 by running the application on their terminal devices. Examples include the merchant backend module of online stores within the e-commerce platform 82. During the process of conducting business activities through these functions, the e-commerce platform 82 can implement various functions related to business activities as middleware or online services and expose corresponding interfaces. Then, toolkits corresponding to the interface access functions are embedded into the application to achieve functional expansion and task completion. The business management engine can include a series of basic functions and expose these functions to online services and / or applications via APIs. Online services and applications use the corresponding functions by remotely calling the corresponding APIs.
[0026] With the support of various components of the Business Management Engine instance, E-commerce Platform 82 can provide online shopping functionality, enabling merchants to connect with customers in a flexible and transparent manner. Consumers can select items online, create orders, provide delivery addresses in the orders, and complete payment confirmation. Merchants can then review and complete or cancel orders.
[0027] One product recommendation method of this application can be programmed into a computer program product and deployed on a client or server for execution. For example, in an exemplary application scenario of this application, it can be deployed on the server of an e-commerce customer service platform. In this way, the method can be executed by human-computer interaction with the process of the computer program product through a graphical user interface by accessing the interface opened after the computer program product is running.
[0028] Please see Figure 2 The product recommendation method of this application, in its typical embodiment, includes the following steps: Step S1100: Respond to the product recommendation event triggered by the user and obtain the encoding vector sequence corresponding to the user's interactive product sequence; Product recommendation events are usually triggered by specific user behaviors on e-commerce platforms, such as users actively clicking on the "You May Also Like" module, entering the product recommendation zone, or personalized recommendations automatically initiated by the platform based on the user's conversation status.
[0029] The interactive product sequence includes product identifiers that the user has recently interacted with, arranged chronologically according to the interaction time. Interactions include, but are not limited to, browsing, clicking, adding to cart, placing an order, and purchasing. The specific duration of "recently" can be one week, one month, six months, etc., and can be configured as needed by those skilled in the art.
[0030] The encoded vector sequence includes a product encoding vector that corresponds bit-by-bit to the product identifier in the interactive product sequence. It can be understood that the encoded vector sequence can be constructed simply by obtaining the product encoding vector associated with each product identifier in the interactive product sequence bit-by-bit.
[0031] It's easy to understand that the product encoding vector for each item sold online can be pre-prepared. In practice, this process typically involves two sub-steps. The first step is to obtain the product embedding vector for each interactive item in the sequence. The product embedding vector is a fixed-dimensional dense vector that can be generated using a pre-trained multimodal coding model. This model can fuse multi-dimensional information about the product, including product images and product description text, encoding them into a unified vector representation—the product embedding vector that represents the semantic features of the product. The second step is to append a positional encoding vector to the product embedding vector of each item. Since user interactions have a temporal sequence, which is crucial for understanding the evolution of interests, positional information needs to be explicitly provided to the model. The positional encoding vector can be generated using sine and cosine functions to create a fixed code, or it can be configured as learnable parameters. Adding or concatenating the product embedding vector with the corresponding positional encoding vector yields the product encoding vector for each interactive item. These product encoding vectors can be associated with product storage for later retrieval.
[0032] Step S1200: Extract the user intent of the encoded vector sequence using the intent encoding network in the preset product recommendation model, and represent it as a user intent vector; To achieve the crucial intermediate step of abstracting core interests from raw behavioral sequences, we explicitly and proactively extract and condense a structured semantic representation—the user intent vector—that represents the user's stable and essential interests and preferences from the potentially noisy user history interaction product sequences. This lays a precise foundation for subsequent generative recommendations.
[0033] In practice, the intent encoding network receives the sequence of encoded vectors obtained in the previous step as input. Each vector in this sequence not only contains multimodal semantic information of the corresponding product (derived from product images and text), but also embeds the temporal sequence information of the interaction through positional encoding. The intent encoding network itself is a parameterized deep neural network, and its architecture design needs to have strong sequence modeling and information aggregation capabilities. In one embodiment, the intent encoding network is implemented based on a Transformer encoder. The Transformer encoder consists of multiple layers of the same stacked structure, each layer containing a multi-head self-attention sublayer and a feedforward neural network sublayer, and uses residual connections and layer normalization to stabilize training. In the self-attention mechanism, each encoded vector in the sequence (as a query) interacts with all encoded vectors in the sequence (as keys and values). By calculating attention weights, it dynamically determines which parts of the sequence should be focused on when generating the representation of the current position. This allows the model to capture long-distance dependencies between any two products within the sequence, such as capturing the association between a certain type of product that a user browsed earlier and a similar product that has been frequently clicked recently, thus forming a coherent theme of interest. After iterative processing through multiple layers of Transformer blocks, each position in the sequence obtains a vector representation that incorporates global context information.
[0034] Next, the intent encoding network needs to aggregate this variable-length sequence into a fixed-dimensional user intent vector. This can be achieved through a pooling operation. In one embodiment, mean pooling can be used, where the output vectors at all positions in the sequence are summed and divided by the sequence length to obtain a single vector summing the global information of the sequence. In another embodiment, the output vector corresponding to the special marker "[CLS]" at the first position of the sequence can be used as the aggregated representation of the entire sequence. This special marker is added to the beginning of the sequence during initial input and learns to carry sequence-level semantics during training. In yet another embodiment, attention pooling can be used, which introduces a learnable query vector, calculates the weights of each position in the sequence through an attention mechanism, and then performs a weighted sum to generate the intent vector. Regardless of the pooling strategy used, the final generated user intent vector is a dense, low-dimensional real vector designed to encode the user's core interests and preferences in a compressed form.
[0035] In other embodiments, the intent encoding network can also be implemented using other sequence modeling architectures, including but not limited to recurrent neural networks based on gated recurrent units (GRUs) or bidirectional long short-term memory networks (BiLSTMs). These networks process the encoded vector sequence sequentially, maintaining a hidden state through their internal gating mechanisms. This state is updated at each step by fusing the current input with historical information, and the final hidden state after sequence processing can serve as the user intent vector. This type of architecture is naturally well-suited for capturing temporal evolution patterns in sequences.
[0036] Step S1300: The conditional diffusion network in the product recommendation model performs conditional denoising on the random noise vector using the user intent vector to infer the recommended product vector; Conditional diffusion networks are the core component for generating specific recommended product vectors from abstract user intent. By utilizing their learned diffusion reconstruction capabilities, guided and controlled by the extracted user intent vector, they transform an initial random noise vector into a recommended product vector that highly matches the user intent in the product semantic space through a progressive denoising iterative process.
[0037] In practice, the first step is to initialize a random noise vector. This random noise vector is typically sampled from a standard Gaussian distribution, with dimensions consistent with the dimension of the ultimately desired recommended product vector. For example, if the product embedding vector is 256-dimensional, the random noise vector is also a 256-dimensional vector, with each element typically independently following a Gaussian distribution with a mean of 0 and a variance of 1. Next, the user intent vector extracted by the intent encoding network in the previous step is injected into the conditional diffusion network as conditional information. The conditional diffusion network is typically built on the framework of the Denoising Diffusion Probability Model (DDPM), and its core includes a parameterized denoising network, such as implemented using a U-Net structure. During the inference phase, the conditional diffusion network performs a reverse denoising process. This process is a multi-step iterative inference chain. The initial state is the aforementioned random noise vector, denoted as the state at the final time step T. The goal of the denoising network is, in each iteration, to predict the "noise components" in the current state that are inconsistent with the user intent, based on the noise state at the current time step t, the current time step index, and the user intent vector as conditions. Then, a portion of the predicted noise is subtracted from the current noisy state to obtain a new state that is "cleaner" and closer to the target product vector. This process starts at t=T and proceeds step by step to t=0. At t=0, the state no longer contains random noise but converges to a definite, semantically meaningful vector, i.e., the inferred recommended product vector.
[0038] Step S1400: Obtain the recommended product corresponding to the product embedding vector that matches the recommended product vector from the preset product embedding vector library, and push the recommended product to the user.
[0039] The product embedding vector library can be pre-built offline. That is, for each product sold online, its unique identifier (such as product ID) is associated with its corresponding product embedding vector and persistently stored in the product embedding vector library. In particular, this library needs to be updated regularly to cover new products and discontinued products.
[0040] After generating recommended product vectors through conditional diffusion network inference, a nearest neighbor search is performed in the product embedding vector library to find the semantically closest products. Specifically, this is achieved by first calculating the similarity between vectors. In one embodiment, for each candidate product embedding vector in the product embedding vector library, its cosine similarity to the recommended product vector is calculated. Cosine similarity focuses on the alignment of vectors in direction, with a value range of [-1, 1]. A larger value indicates that the two vectors are more aligned in direction in the semantic space, and the more similar the product features they represent. Thus, multiple products with high vector similarity can be selected as recommended products and pushed to the user.
[0041] As can be seen from the typical embodiments of this application, the technical solution of this application has many advantages, including but not limited to the following aspects: This application achieves precise capture and utilization of users' deep intentions by organically integrating all steps from user interaction sequences to final recommendation generation, thus effectively overcoming the challenge of sequence noise interfering with recommendation accuracy. The entire process begins with the encoding and transformation of the user's interaction product sequence, followed by the active extraction of intent vectors representing the user's core interests from the sequence by the intent encoding network. This explicit extraction and separation of intent effectively filters out accidental noise mixed in with the original behavioral data, focusing the model's attention on the user's stable and genuine needs, thereby providing a pure and high-fidelity intent foundation for subsequent recommendations.
[0042] Based on the obtained clear intent, the conditional diffusion network guides and denoises random noise step by step, inferring a recommended product vector that highly matches the user's intent. This generation process ensures that the derivation of the recommendation results is directly controlled by the extracted user intent, rather than directly dependent on the noisy original sequence, thus significantly enhancing the alignment accuracy between recommended products and the user's actual needs. Simultaneously, the conditional generation characteristics of the diffusion model allow for controlled diversity exploration guided by intent, avoiding rigid or biased recommendation results caused by mixed intents, and improving the personalization and novelty of the recommendations.
[0043] In summary, a progressive architecture was constructed, from behavior sequence to intent extraction and then to intent-guided generation. Intent modeling serves as a crucial intermediate stage, making the decision-making logic of the recommendation service clearer and more robust. Finally, based on the generated recommendation vector, specific products are matched and pushed from the product library. This improves the accuracy of predictions and enhances the interpretability and user experience of personalized services.
[0044] In a further embodiment, before step S1100, which responds to a user-triggered product recommendation event, the following steps are included: Step S1000: Obtain the dataset, which includes multiple samples and their supervision labels. The samples and their supervision labels correspond to the encoding vector sequence corresponding to the subsequence in the historical interactive product sequence, and the product embedding vector of the target interactive product corresponding to the subsequence. To develop a product recommendation model, a supervised learning dataset is first required. The samples in this dataset are subsequences extracted from any user's historical product interaction sequence. Specifically, for a given user, a sliding window is used to sample their chronologically ordered sequence of interacting products (e.g., [product A, product B, product C, product D, product E]). One implementation involves setting a fixed length L and sequentially extracting consecutive product identifier segments of length L as subsequences, starting from the beginning of the sequence (e.g., when L=3, we can extract [product A, B, C], [product B, C, D], etc.). Regardless of the extraction strategy, each sample corresponds to the next product that the user actually interacts with immediately following that subsequence in the original complete sequence; this product is called the target interactive product.
[0045] Further preprocessing involves retrieving the corresponding product embedding vector for each product identifier in the subsequence by querying a pre-built product embedding vector library. These vectors are then arranged in the order of interaction to form a sequence of encoded vectors, serving as samples. Simultaneously, the product identifier of the target interactive product is also converted into its product embedding vector, which serves as the supervision label for that sample. Therefore, the dataset essentially consists of numerous mapping pairs between different encoded vector sequences and target product embedding vectors. Its purpose is to teach the model how to predict the products a user is most likely to be interested in in the future based on their past behavior sequences.
[0046] Step S1010: Train the product recommendation model based on the dataset until it converges, and learn the ability to infer the corresponding recommended product vector based on the interactive product sequence.
[0047] The application dataset is used to train a product recommendation model, aiming to enable the model to learn the ability to infer corresponding recommended product vectors based on user interaction product sequences. The training process is a supervised end-to-end learning method, but the model contains multiple sub-networks with specific functions, requiring collaborative optimization. First, the dataset is divided into a training set for parameter updates and a validation set for performance evaluation. Common partition ratios are 8:1:1 (training:validation:test) or 7:2:1, which can be adjusted according to the total amount of data. The core of training lies in defining an overall objective loss function and iteratively updating all trainable parameters in the model through backpropagation until the model's performance on the validation set reaches a preset convergence criterion, such as recall or normalized loss cumulative gain no longer significantly improving or exceeding a certain threshold. Finally, when the model's performance on the test set meets the criteria, it can be used for online real-time product recommendations.
[0048] In one embodiment, when applying a specific training set, the samples in the set, i.e., the sequence of encoded vectors, are input into the intent encoding network, which outputs a user intent vector. Simultaneously, noise is gradually added to the sample supervision labels (i.e., the target product vector) through a forward diffusion process until it becomes pure random noise. The task of the conditional diffusion network is to learn to perform a reverse denoising process, conditioned on the user intent vector generated by the intent encoding network, i.e., predicting the noise added at each step and ultimately reconstructing the original target product vector from the pure noise. The objective loss of the entire model training is to minimize the diffusion reconstruction loss (the difference between predicted noise and real noise) and the final recommendation task loss (the difference between the generated vector and the target product vector). The specific objective loss function can be flexibly implemented by those skilled in the art based on the disclosure herein. Through this end-to-end training, the intent encoding network is implicitly driven to learn to extract from the original sequence the information most helpful for the subsequent diffusion model to accurately reconstruct the target product; this information essentially fits the purest possible user intent.
[0049] This embodiment reveals the complete training process of the product recommendation model. This process addresses the key deficiency of traditional sequence recommendation models, which indiscriminately encode noise and genuine interests into the same vector representation. This ability learned by the model ensures that, in subsequent actual recommendation inference, whether through explicit contrastive learning to obtain a robust intent encoder or implicit learning, the conditional diffusion network can provide purer and more faithful user intent conditions. This significantly improves the alignment accuracy between the final generated recommended products and the user's actual needs, enhancing the accuracy and personalization of the recommendation service.
[0050] In a further embodiment, step S1010, training the product recommendation model to a convergent state based on the dataset and acquiring the ability to infer corresponding recommended product vectors based on the sequence of interacting products, includes the following steps: Step S1011: Divide the dataset into a training set and a validation set, input the samples in the training set into a preset augmentation prediction network, and obtain the corresponding augmentation sequence. The augmentation sequence includes the mask probability distribution of each sequence element in the sample, and the insertion probability distribution between each pair of adjacent sequence elements and their inserted product vector. It is understandable that the dataset can be divided into a training set, a validation set, and a test set, with a ratio of 8:1:1, 7:2:1, etc., which can be configured as needed by those skilled in the art.
[0051] First, samples from the pre-defined dataset are input into a pre-defined augmentation prediction network. The core motivation is that users' historical product interaction sequences often contain occasional noisy behaviors (such as accidental clicks or brief browsing). If directly used for training, the product recommendation model may struggle to distinguish between noise and genuine interest. To improve the model's robustness, the augmentation prediction network is designed to analyze and predict the input sample sequences, aiming to reconstruct as accurately as possible the sequence generated by the user's actual interaction with the desired products according to their intentions, thus generating a structured augmented sequence. The augmented sequence contains two key pieces of information: First, a predicted mask probability distribution for each original element in the sample sequence (i.e., the encoded vector corresponding to each historically interacted item). This binary probability distribution represents the probability of whether the corresponding element is replaced by a mask due to noise or irrelevant behavior. Second, a predicted insertion probability distribution for each pair of adjacent original elements in the sample sequence. This binary probability distribution represents the probability of whether an item that the user doesn't actually interact with but wants to interact with needs to be inserted between these elements. The corresponding insertion item vector simulates relevant items that may actually exist or be implicit in the user's real interest chain. It can be understood that if the insertion probability distribution indicates that a corresponding item needs to be inserted between corresponding elements, then the corresponding insertion item vector is a vector representing that item; if the insertion probability distribution indicates that a corresponding item does not need to be inserted between corresponding elements, then the corresponding insertion item vector is a vector that does not represent any item.
[0052] In practical implementation, the augmentation prediction network can be an attention-based sequence model (such as a Transformer encoder) or a GRU (Gated Recurrent Unit) sequence model, or an end-to-end sequence model. Those skilled in the art can choose one to implement as needed. When the augmentation prediction network generates the augmented sequence, specifically, for each sequence element in the original sample sequence (i.e., the encoded vector of each item arranged in the interaction order), the augmentation prediction network outputs a mask probability distribution that perfectly corresponds to its position. This means that if the original sequence has N elements, the portion of the augmented sequence related to the mask probability distribution will also contain N mask probability distributions, and the i-th mask probability distribution explicitly corresponds to the item element at the i-th position in the original sequence. This design ensures that the model can fully consider the contextual position information of the item in the sequence when considering whether to mask a certain item. For example, the most recently interacted item at the end of the sequence may have a different mask probability pattern because it may represent the latest interest. Simultaneously, for each pair of adjacent sequence elements in the original sequence (e.g., the element at position i and the element at position i+1), the augmentation prediction network generates a corresponding insertion probability distribution and its inserted item vector between them. The logical position of this pair of information in the augmented sequence lies between the two original elements it is associated with. Therefore, if the original sequence has N elements, then N-1 pairs of adjacent element relationships will be generated, and correspondingly, the augmented sequence will contain N-1 sets of insertion probability distributions and inserted item vectors. This design simulates the possibility that between two consecutive user interactions, there may be an implicit item that is not directly observed but conforms to the logic of interest.
[0053] Through the modeling process described above, the enhanced sequence completely encapsulates the structure of the original sequence: it follows the linear order of the original sequence, adds masking decision information to each original element position, and inserts supplementary decision information between every two original elements. This relationship between order and structure is crucial, ensuring that subsequent sequence optimization networks can perform precise, structure-aware data augmentation operations on the original sequence based on this enhanced sequence. For example, it can precisely mask products at a specific position or insert a new product between two specific products, thereby generating a target optimization sequence that introduces reasonable changes while maintaining the coherence of behavioral logic, and can restore the user's actual intent as accurately as possible.
[0054] Step S1012: Using a preset sequence optimization network, the sample is sampled based on the enhanced sequence to determine whether each sequence element in the sample is replaced with a mask, and whether a corresponding product embedding vector is inserted between each pair of adjacent sequence elements, so as to obtain the corresponding target optimized sequence. The augmented sequence contains the mask probability distribution for each sequence element in the corresponding sample, as well as the insertion probability distribution and corresponding inserted item vector for each pair of adjacent sequence elements. The sequence optimization network needs to make deterministic decisions based on these probability distributions: whether each original sequence element is replaced with a mask, and whether the corresponding item embedding vector is inserted between each pair of adjacent sequence elements.
[0055] To implement this discrete decision-making process and maintain gradient differentiability to support end-to-end training, the sequence optimization network employs two different sampling strategies. For the mask probability distribution, the sequence optimization network uses Gumbel-Softmax for sampling. The mask probability distribution corresponding to each sequence element is a binomial distribution. Gumbel-Softmax generates a differentiable, approximately one-hot continuous vector to simulate the discrete sampling result during the training phase by introducing Gumbel noise and applying the Softmax function; during inference or forward computation, a definite mask decision (mask or retain) can be obtained by taking argmax. In practice, for each sequence element, the network calculates an approximately one-hot vector based on its mask probability distribution, where one dimension represents the "mask" and the other dimension represents the "retain". If the "mask" dimension is activated, the sequence element is replaced with a special mask symbol (such as an all-zero vector or a learnable mask embedding) that does not carry any specific product semantic feature information. When a sequence element is masked, its position in the sequence is preserved, but the vector at that position no longer represents the original product. Therefore, in the subsequent intent encoding network, the feature interaction (such as self-attention calculation) between the masked position and other sequence elements becomes meaningless. It is equivalent to the interaction behavior at that position being implicitly deleted from the sequence, thereby effectively filtering out interaction records that may be noise.
[0056] For the insertion probability distribution, the network implements sampling and decision-making based on the Straight-Through Estimator (STE). Specifically, for each pair of adjacent original sequence elements, the network first generates a Bernoulli sampling result based on its corresponding insertion probability distribution (a binomial distribution). This result is a binary decision (0 or 1), indicating whether to insert a product between the two. During forward propagation, if the sampling result is 1 (representing the decision to insert), the corresponding insertion product vector provided in the augmented sequence is used. However, this vector is not directly used to construct the sequence, but rather serves as a query vector. Further, this query vector is subjected to matrix operations with a pre-constructed product embedding vector matrix, where each row of the matrix corresponds to the product embedding vector of a product in the product library. By calculating the cosine similarity or dot product similarity between the query vector and each product embedding vector in the matrix, a similarity vector (i.e., one row of the similarity matrix) is obtained. Subsequently, the index corresponding to the highest similarity value is selected from this similarity vector, and the corresponding product embedding vector is retrieved from the product embedding vector matrix based on this index. Ultimately, the retrieved, real-world product embedding vector is inserted between the corresponding two original sequence elements. This "query-match" mechanism ensures that the inserted product is a real product in the product library and best matches the intent prototype predicted by the augmented prediction network, thus transforming the abstract intent completion into a concrete product entity. If the sampling result is 0 (representing a decision not to insert), no operation is required. It can be understood that during the forward propagation, STE allows the execution of this non-differentiable operation, while during the backward propagation, STE allows the gradient to directly penetrate this operation and continue backpropagating; those skilled in the art can define this gradient as needed.
[0057] Through the synergy of the two sampling mechanisms described above, the sequence optimization network can perform two structured data augmentation operations on the original sample sequence based on the guidance of the augmentation sequence: first, based on masking decisions, it selectively deletes some interactive items that may be noise; second, based on insertion decisions, it supplements the continuous interactions with items that match the user's potential intentions. It is evident that the final optimized sequence generated in this way better reflects the user's true interest preferences.
[0058] Compared to directly training a model using raw, noisy sequences, which can easily lead to the intent encoding network learning noisy patterns, introducing controllable data transformations that align with interest logic by enhancing the prediction network and sequence optimization network can force the model to focus more on the user's true intent, thereby improving the model's robustness and generalization ability.
[0059] Step S1013: Input the target optimization sequence and the sample into the intent encoding network in the product recommendation model, and construct a training intent vector based on the corresponding optimized intent vector and sample intent vector. Next, to train the intent encoding network to extract clean intent from noisy sequences, a contrastive learning scenario is constructed. The samples and their corresponding target optimization sequences are input into the same intent encoding network in the product recommendation model.
[0060] The intent encoding network, in its model architecture, can be a Transformer encoder. Its role is to map a variable-length product code sequence into a fixed-dimensional vector representation, i.e., an intent vector. By processing two sequences separately, the network outputs two intent vectors: one is the sample intent vector extracted from the potentially noisy original sequence, and the other is the optimized intent vector extracted from the target optimized sequence after noise reduction. Subsequently, these two intent vectors, which have the same vector dimension, are averaged to obtain the training intent vector, which is then used by the subsequent conditional diffusion network. In practice, the two vectors can be weighted and summed, with each weight set to 0.5.
[0061] Step S1014: Input the training intent vector and the supervision label of the sample into the conditional diffusion network in the product recommendation model, add real noise to the supervision label to generate a training random noise vector, and use the training intent vector as a denoising condition to remove the prediction noise in the training random noise vector to obtain the prediction product vector. The training objective of a Conditional Diffusion Network is to learn the ability to reconstruct a target item vector from noise, given a user intent. A Conditional Diffusion Network can be a diffusion model implemented based on the DDPM architecture.
[0062] During training, the supervision label for the current sample is first obtained, which is the product embedding vector of the next real interactive product immediately following the sample. Then, during the forward pass of the conditional diffusion model, noise is progressively added to this real vector. Specifically, based on the pre-configured number of diffusion steps t, the variance scheduling coefficients for each time step within that number of steps are obtained. Next, Gaussian noise matching the corresponding coefficients is added to the real product vector step by step, thus synthesizing a training random noise vector after t time steps.
[0063] Furthermore, in the reverse denoising and reconstruction process corresponding to the forward diffusion noise addition process, the training intent vector is first used as the denoising condition. Specifically, this vector and the training random noise vector are coupled to the U-Net structure in the form of cross-attention, so that the sub-network of the U-Net structure is responsible for predicting the noise step by step, while continuously injecting the corresponding intent semantic information. Next, the noise predicted by the U-Net at each step is optimized based on the schedule algorithm (dynamically adjusting the predicted noise and controlling the intensity of the U-Net predicted noise), thereby coordinating the progress of the denoising process. Finally, the vector in the latent representation space after denoising for multiple time steps is input into the sub-network of the VAE-Decoder structure to decode the predicted product vector.
[0064] Step S1015: Determine the intent difference loss value based on the optimized intent vector and the sample intent vector; determine the diffusion reconstruction loss value based on the real noise and the predicted noise; determine the recommendation task loss value based on the supervision label and the predicted product vector; and fuse the various loss values to obtain the target loss value. The determination of the intent difference loss value aims to improve the contrastive learning effect by constraining the intent encoding network to make the intent representation extracted from the potentially noisy original sequence as close as possible to the intent representation extracted from the enhanced and optimized target sequence, which better represents the user's true interests. The motivation for this is that the generation process of the enhanced sequence simulates the denoising and interest completion of the original sequence; therefore, the optimized intent vector is considered a purer representation that is closer to the user's true intent. By minimizing the distance between these two intent vectors, the intent encoding network can be forced to have a certain degree of noise resistance, i.e., during the learning process, it ignores random noise in the sequence and focuses on restoring stable, core user interest patterns. In practice, various metrics can be used to calculate the intent difference loss value, including but not limited to: the InfoNCE loss function, the cross-entropy loss function, etc., which can be flexibly adapted by those skilled in the art.
[0065] The determination of the diffusion reconstruction loss value aims to improve the learning effect of conditional diffusion reconstruction. Its purpose is to enable the network to accurately predict the noise added to the real product vector given the user's intent, thereby possessing the ability to reconstruct the target product vector from the noise. This loss directly measures the difference between the noise predicted by the conditional diffusion network during the backward denoising process and the actual noise added during the forward diffusion process. In practice, the mean squared error loss function can be used to calculate the loss value between the predicted noise and the actual noise. Minimizing this loss value means that the network, guided by the intent vector, becomes increasingly adept at removing noise that does not match the intent, reconstructing a state consistent with the real target product vector. This loss term ensures the controllability and fidelity of the conditional diffusion model generation process.
[0066] The purpose of determining the loss value for the recommendation task is to train and improve the matching degree between the predicted product vectors output by the entire product recommendation model and the actual expected product vectors (i.e., supervision labels). In other words, it ensures that the generated predicted product vectors highly match the product vectors that the user will actually interact with in the product semantic space. This is the most direct supervision signal to ensure recommendation accuracy. In specific implementation, an appropriate loss function can be selected based on the properties of the product embedding vectors; those skilled in the art can flexibly adapt it. In one embodiment, the loss function is calculated as follows: the vector similarity between the predicted product vector and the supervision label is calculated, and the maximum vector similarity minus this vector similarity is used as the loss value for the recommendation task.
[0067] After calculating the intent difference loss, diffusion reconstruction loss, and recommendation task loss separately, they need to be fused to obtain a unified target loss value to guide the update of all network parameters involved in training. The purpose of fusion is to coordinate the learning objectives of different sub-tasks and balance their contributions to the overall model performance. In one embodiment, the fusion method is weighted summation, that is, multiplying each loss value by its respective weight and then summing them to obtain the target loss value. The setting of each weight can be adjusted based on experience or through a validation set, and those skilled in the art can flexibly implement it.
[0068] The fused target loss value comprehensively reflects the performance of the intent encoding robustness, the conditional compliance of the diffusion generation, and the final recommendation accuracy, providing a comprehensive optimization target for subsequent gradient backpropagation.
[0069] Step S1016: With reducing the target loss value as the training objective, update the corresponding network parameters in the augmented prediction network, sequence optimization network, and product recommendation model. When the validation set is called to determine that the inference performance of the updated product recommendation model meets the preset conditions, determine that the product recommendation model has been trained to a convergent state.
[0070] The training objective is to reduce the target loss value, updating the corresponding network parameters within the augmentation prediction network, sequence optimization network, and product recommendation model. This is achieved through backpropagation. Specifically, after calculating the target loss value, the gradient of this loss value with respect to all trainable parameters in the model is calculated. Then, gradient descent optimization algorithms, such as stochastic gradient descent (SGD), Adam, or AdamW, are used to update these parameters along the reverse gradient direction, thus achieving end-to-end training. As the target loss value decreases, the augmentation prediction network gradually learns to generate more reasonable masks and insertion suggestions, the sequence optimization network learns to make better data augmentation decisions, the intent encoding network learns to extract more robust and purer user intent vectors, and the conditional diffusion network learns to generate product vectors more accurately given intents.
[0071] When the validation set confirms that the inference performance of the updated product recommendation model meets the preset conditions, the product recommendation model is considered to have reached a convergent state. After each epoch or after several parameter updates, a validation set independent of the training set is used to evaluate the performance of the current model. Specifically, each sample in the validation set can be passed through the augmented prediction network, sequence optimization network, and forward inference of the product recommendation model in the current training state to obtain the predicted product vector output by the model. The top-K most similar product embedding vectors based on vector similarity are then retrieved to form a product recommendation list. If the product recommendation list contains the product corresponding to the supervision label of the corresponding sample, the recommended product obtained from the corresponding sample is confirmed to be accurate; otherwise, the recommended product obtained from the corresponding sample is confirmed to be inaccurate. Therefore, the ratio between the total number of samples corresponding to accurately recommended products and the total number of samples in the validation set can be calculated, i.e., the recall rate. When the recall rate exceeds a preset threshold, the inference performance of the product recommendation model is considered to meet the preset conditions, training is stopped, and the model is confirmed to have reached a convergent state. The preset threshold can be configured as needed by those skilled in the art. In addition, those skilled in the art may also choose other ranking metrics, such as normalized loss cumulative gain, for comprehensive evaluation as needed. Similarly, when the corresponding evaluation value reaches a threshold, it is considered that the preset conditions are met, thereby confirming that the product recommendation model has been trained to a convergent state.
[0072] It's understandable that once the product recommendation model has converged, it can be directly used for real-time product recommendations without needing to enhance the prediction network and sequence optimization network, and after passing the corresponding performance tests on the test set. This is because the intent encoding network in the product recommendation model is already robust; even without relying on the enhancement prediction network and sequence optimization network, it can still perform reasonable denoising and interest completion on the original input sequence, modeling a vectorized representation that better reflects the user's actual intent.
[0073] In this embodiment, an end-to-end training framework incorporating data augmentation, contrastive learning, and diffusion model training is designed to systematically address the core technical challenge of traditional sequence recommendation models, which suffer from mixed user intent representations and limited recommendation accuracy due to directly fitting noisy original sequences. Specifically, the augmentation prediction network actively analyzes the training sample sequence, predicting the probability that each position should be masked (treated as noise) and the probability and prototype vector that should be inserted (to complete potential interests) between consecutive actions. This simulates the generation process of denoising and completing interest logic in the original action sequence. Subsequently, the sequence optimization network, based on these probability distributions, uses differentiable sampling techniques such as Gumbel-Softmax and direct-pass estimators to make specific masking and insertion decisions, thereby dynamically reconstructing the original, potentially noisy training sample sequence into a target optimized sequence that better reflects the user's true and coherent interest tendencies. In essence, this explicitly injects denoising and interest enhancement supervision signals into the training data.
[0074] Furthermore, by inputting the same original sample and its corresponding optimized sequence into a shared intent encoding network, and using contrastive learning (through intent difference loss) to constrain the output intent vectors of the two to be as close as possible, the intent encoding network is forced to learn to ignore noise interference in the original sequence and focus on extracting a pure user core interest pattern consistent with the optimized sequence. This significantly improves the robustness of the intent encoding network and the fidelity of intent extraction. Simultaneously, the conditional diffusion network, during training, uses the fused training intent vector as a condition to learn to predict and remove noise from the noisy real target item vector. Its loss function (diffusion reconstruction loss and recommendation task loss) directly ensures the alignment of the generation process with the user intent and the final recommendation target. The entire training process is optimized end-to-end through a multi-objective loss function that integrates intent difference, diffusion reconstruction, and recommendation task, enabling the reinforcement prediction network, sequence optimization network, intent encoding network, and conditional diffusion network to learn collaboratively. Ultimately, this results in the converged item recommendation model (especially its intent encoding network) possessing strong noise resistance and the ability to distill pure intent from the original interaction sequence.
[0075] It is evident that by introducing controllable data augmentation and contrastive learning, the robustness and generalization ability of the model to noise are greatly enhanced, making the model more stable and accurate when facing real online user sequences full of random behavior. This results in more accurate product recommendations that better match the user's true intentions, effectively improving the accuracy, recall, and user experience of the recommendation service.
[0076] In a further embodiment, after step S1010, which involves training the product recommendation model to convergence based on the dataset and acquiring the ability to infer the corresponding recommended product vector based on the interactive product sequence, the following steps are included: Step S2000: After multiple recommended products are pushed to the corresponding users, collect the exposure and interaction data of each recommended product; To assess whether the product recommendation model is failing to adapt to changes in user interaction and thus experiencing performance degradation, exposure interaction data for each recommended product is recorded after it is pushed to any user. Exposure interaction data refers to various recordable behavioral data generated by the user after the recommended product is actually presented to them (i.e., exposure occurs), including but not limited to: interaction type, interaction timestamp, user ID, and product ID. Interaction types include, but are not limited to: browsing, clicking, adding to cart, placing an order, and purchasing.
[0077] In practice, this can be achieved by deploying event tracking logs on the client side (such as an app or webpage) or the server side. When the recommendation results are rendered to the user interface, exposure tracking is triggered; when the user performs any action on the recommended products, corresponding interaction tracking is triggered. These event tracking logs are sent to a log collection server in real time or near real time. After being cleaned and formatted, they are stored in a data warehouse or big data platform to form a structured exposure interaction fact table.
[0078] Step S2010: Determine the exposure performance score of each recommended product based on the exposure interaction data of each recommended product, and determine the recommendation performance score based on all exposure performance scores; The raw behavioral logs are transformed into quantifiable evaluation metrics to systematically measure recommendation effectiveness. First, an exposure effectiveness score needs to be calculated for each exposed recommended product. This is a comprehensive metric used to measure the quality of that recommendation (a specific product to a specific user).
[0079] It is understandable that different subsequent user interactions imply varying levels of user interest and commercial value. For example, a purchase demonstrates the success and value of a recommendation more strongly than a click. Therefore, exposure effectiveness scoring is not a simple count, but a weighted or modeled synthesis of multiple interactive behaviors. In practice, there are various calculation methods. One embodiment uses a statistically based weighted method. For example, it can be defined as: 1 point for a click, 2 points for a details page view exceeding 30 seconds, 5 points for adding to the cart, and 10 points for a successful purchase. Then, for a recommended product, its exposure effectiveness score is the sum of the weighted scores of all associated interactive behaviors within a preset time window (e.g., 24 hours after exposure). Another embodiment trains a lightweight effectiveness prediction model (e.g., logistic regression or gradient boosting tree) using exposure effectiveness data as input to directly predict the probability of a high-value interaction (e.g., purchase) generated by that exposure, and uses this probability as the exposure effectiveness score. This method can capture non-linear relationships more precisely.
[0080] After obtaining the exposure effectiveness score for each recommended product, further aggregation is needed to evaluate the overall effectiveness of the recommendation strategy over a period of time, i.e., determining the recommendation effectiveness score. The recommendation effectiveness score is a comprehensive measure of the model's online service performance. In one embodiment, the average exposure effectiveness score of all exposed recommended products is calculated within the evaluation period (e.g., one day). In another embodiment, users can be grouped, and the average exposure effectiveness score of recommendations received by each user can be calculated first, then averaged over all users to avoid the excessive influence of active users on the overall metric.
[0081] Step S2020: When the recommendation performance score is lower than the recommendation business threshold, the product recommendation model is retrained.
[0082] The recommended business threshold is a pre-set performance threshold, which is usually determined based on business objectives (such as maintaining click-through rate or conversion rate at a certain level) and historical performance baselines. Those skilled in the art can flexibly configure it according to the disclosure herein.
[0083] When the calculated recommendation effectiveness score consistently falls below a certain threshold, it indicates that the currently deployed model is no longer able to adapt to changes in user interest distribution or the product library, and its recommendation capabilities are degrading, necessitating a model update process. It's easy to understand that a machine learning model is essentially a fitter to the distribution of its training data. Continuously collected online exposure and interaction data, especially those generating positive interactions, represent the latest user-product matching relationships, naturally selected by users, and are high-quality training samples. Retraining using this new data allows the model to learn the latest user preference patterns and product popularity trends, thereby overcoming the model degradation problem.
[0084] In this embodiment, by constructing a complete technical closed loop—from online exposure and interaction data collection to multi-dimensional performance scoring calculation, and then to model retraining triggering based on performance thresholds—the performance degradation problem caused by user interest drift and changes in the product library after the recommendation model goes live is effectively solved. This ensures that the provided recommendation service is no longer a static, fixed model after deployment, but an intelligent service that can continuously learn from real user feedback and dynamically evolve. This significantly improves the long-term stability of recommendation effectiveness and business sustainability, avoiding the loss of business opportunities due to declining recommendation quality. Simultaneously, this closed loop can automatically absorb the latest user behavior patterns, ensuring that recommendation results are always synchronized with current market trends and user preferences, thereby continuously providing accurate and personalized product recommendations in a changing environment.
[0085] In a further embodiment, step S1100, obtaining the encoding vector sequence corresponding to the user's interactive product sequence, includes the following steps: Step S1110: Obtain the product embedding vector of each interactive product in the user's interactive product sequence. The product embedding vector is obtained by encoding the product image and product description text of the corresponding interactive product. The product embedding vector is a fixed-dimensional real-number vector that comprehensively represents the multimodal semantic features of the corresponding product. Its generation relies on a pre-defined multimodal coding model specifically designed to fuse visual and textual information. Specifically, for each interactive product in the sequence, its product image and product description text are first obtained. The product image refers to the main image or detail image of the product, and the product description text includes the product title, attribute tags, and detailed description text. Next, the product image is input into the image encoding network of the multimodal coding model. This network is typically a pre-trained deep convolutional neural network (such as ResNet or VIT) or a visual Transformer, whose function is to map the pixel matrix into an image encoding vector representing visual features. Simultaneously, the product description text is input into the text encoding network of the multimodal coding model. This network is typically a pre-trained language model (such as BERT or RoBERTa), whose function is to map the text symbol sequence into a text encoding vector representing semantic features. Then, the image-text fusion network in the multimodal coding model fuses the aforementioned image and text encoding vectors. This can be achieved, for example, by concatenating the vectors and then passing them through a fully connected layer for dimensionality reduction and feature interaction, or by using a cross-modal attention mechanism for deep alignment and fusion, ultimately generating a unified product embedding vector. This vector simultaneously encodes the product's visual appearance and textual description information, providing a rich semantic foundation for subsequent understanding of user interests. Through this step, the original symbolic product sequence is transformed into a semantically rich vector sequence, a necessary prerequisite for deep intent modeling.
[0086] Step S1120: For each interactive product in the corresponding interactive product sequence, add a corresponding position encoding vector to the product embedding vector of each interactive product, and form an encoding vector sequence from the resulting product encoding vectors of each interactive product.
[0087] It is understandable that user interaction behavior is a strictly chronological sequence of events, and the order of interaction itself contains important information, such as the evolution of interests and causal relationships of behavior. To enable the model to perceive and utilize this temporal relationship, positional information is explicitly injected into the input representation. The positional encoding vector is a vector with the same dimension as the item embedding vector, and its value is generated by the positional encoding function. In specific implementations, there are several ways to append positional encoding. One embodiment uses fixed positional encoding generated by sine and cosine functions. Based on the absolute position index of each item in the sequence (e.g., the first item is at position 1, the second at position 2), a set of sine and cosine values with different frequencies are calculated to form the positional encoding vector, which is then element-wise added to the corresponding item embedding vector. Another embodiment uses learnable positional encoding, that is, assigning a trainable parameter vector to each possible position in the sequence (up to a preset maximum length). During model training, these positional vectors are optimized along with other model parameters, thereby learning the positional representation best suited for the current task.
[0088] The product embedding vector with the added position encoding vector is the product encoding vector. This vector contains both the semantic content of the product and its temporal position information in the sequence. Finally, the product encoding vectors corresponding to all interactive products are arranged in order of their position in the original interaction sequence to form the encoding vector sequence. This sequence will serve as the direct input to the subsequent intent encoding network.
[0089] In this embodiment, a complete and structured model input representation is constructed. First, multimodal encoding transforms product images and text into unified semantic vectors, solving the problems of information sparsity and semantic incompleteness caused by using only product IDs or single-modal features in traditional methods, thus laying the foundation for accurate understanding of product connotations. Second, by explicitly appending positional encoding, key temporal sequence information is injected into the model, enabling it to distinguish the different interests represented by the two behavioral patterns of "browsing A first and then B" versus "browsing B first and then A." This is crucial for capturing the dynamic evolution of user interests. These two preprocessing steps together ensure that the data input to the core recommendation model (intent encoding network) is rich in semantic information and temporal structure, providing a high-quality, information-rich input basis for robustly extracting clean and coherent user intent vectors from potentially noisy original behavioral sequences. This directly improves the effectiveness and robustness of the entire recommendation service front-end feature engineering, and is an indispensable technical link for ultimately achieving high-precision recommendations.
[0090] In a further embodiment, step S1400, obtaining the recommended product corresponding to the product embedding vector that matches the recommended product vector, and pushing the recommended product to the user, includes the following steps: Step S1410: Calculate the similarity between each product embedding vector in the product embedding vector library and the recommended product vector, and filter out recommended products whose similarity exceeds the matching threshold; First, the similarity between the product embedding vector of each candidate product in the product embedding vector library and the recommended product vector generated in the previous steps is calculated, and filtering is performed based on a preset matching threshold. This similarity is used to quantify the closeness of two vectors in the semantic space, and its calculation method has several specific embodiments. In one embodiment, cosine similarity can be calculated, which is the dot product of two vectors divided by the product of their respective moduli, with a value range of [-1, 1]. The larger the value, the more consistent the direction and the closer the semantics. In another embodiment, the reciprocal or negative value of the Euclidean distance can be calculated, with the smaller the distance, the more similar the two vectors. In yet another embodiment, dot product similarity can also be used, especially after the vectors have been normalized, the dot product result is equivalent to cosine similarity. The calculated similarity reflects the matching degree between the generated vector and each product in the library at the semantic level, which integrates visual and textual features. Subsequently, a preset matching threshold is applied. This threshold can be a fixed value determined in advance through experiments, such as 0.7 or 0.8, to filter out products with low semantic relevance, ensuring the quality of the initial selection set. Those skilled in the art can further configure it as needed based on the disclosure herein.
[0091] Step S1420: For each recommended product, a preset exposure performance model is used to infer the exposure performance score of the recommended product based on the product embedding vector of the recommended product and the user's profile embedding vector. Next, for each candidate recommended product selected in the previous step, an exposure effectiveness model pre-trained to convergence is used. Based on the product's embedding vector and the current user's profile embedding vector, the expected exposure effectiveness score if the product is pushed to this user is inferred. The exposure effectiveness score is a predictive metric used to estimate the probability or expected value of triggering positive user interaction behavior for a specific recommendation (a specific product to a specific user). The user's profile embedding vector is a dense vector that comprehensively represents the user's static attributes (such as age and gender) and dynamic long-term interests, which can be obtained through aggregation of the user's historical behavior sequence or a dedicated feature encoding subnetwork. The exposure effectiveness model itself is a machine learning model. Its input is the product embedding vector and the user profile embedding vector after concatenation or interaction through a cross-attention mechanism, and its output is a scalar score. In one specific embodiment, the model is a binary classification model (such as logistic regression, gradient boosting tree, or neural network), trained using historical exposure log data, with the label indicating whether the user has generated a target interaction behavior (such as clicking or purchasing) for the exposed product, and its output probability value is the exposure effectiveness score. Those skilled in the art can flexibly adapt the model capabilities disclosed herein to pre-train the model.
[0092] Step S1430: Sort the recommended products in reverse order according to the exposure effectiveness score, and push the sorted recommended products to the user.
[0093] Finally, all candidate recommended products are sorted in reverse order based on the calculated exposure effectiveness score, and the sorted list is pushed to the user. Reverse sorting means placing the product with the highest predicted exposure effectiveness score at the top. This sorting strategy is based on a clear business logic: within limited display space, prioritize displaying products most likely to attract users, provide a satisfactory experience, or generate commercial value, thereby maximizing the overall utility of a single recommendation. After sorting, this ordered list of product identifiers is returned and presented to the user through channels such as the application interface, web components, or messaging interfaces, completing the entire recommendation process. Thus, the calculation results of the first two steps are transformed into the final, user-perceived output, and the sorting logic directly determines the priority of the information received by the user, directly impacting user experience and core metrics.
[0094] In this embodiment, a progressive product selection and ranking process—comprising semantic matching filtering, personalized effectiveness prediction, and utility maximization ranking—effectively addresses the problems of rigid recommendation results, lack of personalization, and unoptimized overall list utility that may result from single similarity matching. First, similarity calculation and threshold filtering ensure the basic relevance of the recommendation pool, inheriting the accuracy of the intent generated by the conditional diffusion network. Second, an exposure effectiveness model is introduced for secondary scoring, dynamically incorporating users' historical behavior patterns, real-time preferences, and the attractiveness of the products themselves into the decision-making process. This ensures that the recommendation results not only "look" like what users want but are also "like" what users will like, significantly enhancing the personalization accuracy and attractiveness of the recommendations. Finally, ranking based on predicted effectiveness maximizes the overall recommendation utility under display constraints, directly improving key business metrics such as click-through rate and conversion rate. These three interconnected steps work together to transform the abstract recommended product vector into a high-quality, highly relevant, and highly attractive specific product recommendation list. This is a crucial terminal technology link ensuring the superior final implementation effect and excellent user experience of the entire invention.
[0095] In a further embodiment, before step S1400, which involves obtaining the recommended product corresponding to the product embedding vector that matches the recommended product vector from a preset product embedding vector library, and pushing the recommended product to the user, the following steps are included: Step S2400: Obtain the product image and product description text for each product in the product database; The product database stores structured information about all products for sale, including product images and descriptions for each product. Product images typically refer to visual information carriers such as main images and detail images, and can be in formats such as JPEG and PNG; product descriptions include natural language descriptions such as product titles, attribute descriptions, and detailed information.
[0096] Step S2410: For each product, the product image and product description text are simultaneously encoded using the image encoding network and text encoding network in the preset multimodal coding model to obtain the image encoding vector and text encoding vector. For each product, the product image and description text are simultaneously encoded using the image encoding network and text encoding network of a pre-defined multimodal coding model, resulting in image encoding vectors and text encoding vectors. A pre-trained deep neural network is then used to transform the unstructured raw data into a structured, machine-understandable dense vector representation. The multimodal coding model is a neural network pre-trained on large image-text pairs, comprising two independent sub-network branches: an image encoding network and a text encoding network. The image encoding network specifically handles visual information; its specific implementation can be a pre-trained deep convolutional neural network, such as ResNet, EfficientNet, or a Vision Transformer model based on the Transformer architecture. This network receives the product image as input, undergoes multiple non-linear transformations, and finally outputs a fixed-dimensional image encoding vector that encapsulates the product's visual features, such as color, shape, texture, and style. The text encoding network specifically handles linguistic information; its specific implementation can be a pre-trained language model, such as BERT, RoBERTa, or a similar model. The network receives product description text (usually preprocessed such as word segmentation) as input, captures semantic relationships between words through mechanisms such as self-attention, and finally outputs a fixed-dimensional text encoding vector that encapsulates the semantic features of the product, such as function, material, use, and brand. Two networks work in parallel, extracting high-level abstract features from visual and linguistic modalities respectively.
[0097] Step S2420: The image encoding vector and the text encoding vector are fused by the image-text fusion network in the multimodal coding model to obtain the product embedding vector of the product; It's understandable that the meaning of a product can be more fully understood when viewed with both text and images. For example, the phrase "red lace dress" needs to be combined with a corresponding image to more accurately convey its style. This fusion effectively resolves potential ambiguities or deficiencies in single-modal information, generating high-quality semantic embeddings for products. This ensures the quality of subsequent accurate intent matching and similarity calculations.
[0098] To construct a unified semantic representation of products, features from different modalities are integrated into a single vector representation that is complementary and enhanced. Image-text fusion networks are a core component of multimodal coding models, responsible for achieving cross-modal feature interaction and alignment. There are several implementation methods. In one embodiment, a simple feature concatenation followed by a fully connected layer is used: the image encoding vector and the text encoding vector are directly concatenated into a longer vector, which is then input into one or more fully connected layers for nonlinear transformation and dimensionality reduction, outputting the final fused vector. In another embodiment, a cross-modal attention mechanism is employed: for example, the text vector is used as the query, and the image vector as the key and value. The attention weight of the text on the image region is calculated, thereby generating a visual context vector guided by text information, which is then fused with the original text vector; conversely, image-to-text attention can also be performed. The fused product embedding vector integrates the product's visual appearance and textual description information, forming a more comprehensive and robust semantic representation than any single modality.
[0099] Step S2430: Associate each product embedding vector with the corresponding product and store it in the product embedding vector library.
[0100] The calculated semantic representations are persistently stored and managed to construct a vector database that can be efficiently retrieved by online systems. In specific implementation, a storage architecture for the product embedding vector library needs to be established. One embodiment uses a key-value database or relational database, with the product ID as the primary key and the corresponding product embedding vector as the value. Another embodiment, more suitable for large-scale vector retrieval, employs a specialized vector database, such as Milvus, Pinecone, or Elasticsearch (with a vector plugin). These databases are optimized for similarity searches of high-dimensional vectors and support the creation of efficient index structures. During storage, the product embedding vector generated for each product in the previous step needs to be strongly associated with its unique product ID. Furthermore, the library needs to be a maintainable and updatable system. When a new product is added or existing product information (such as text and images) undergoes significant changes, the aforementioned encoding and fusion steps need to be re-executed to generate new product embedding vectors and update the corresponding records in the library; when a product is removed from the shelves, the corresponding record needs to be removed.
[0101] It's easy to understand that by pre-compiling and building a vector library, computationally intensive tasks can be taken offline, allowing online services to focus on efficient vector retrieval. This satisfies the stringent requirements of recommendation services for low latency and high concurrency.
[0102] In this embodiment, a complete semantic product representation process, from raw multimodal data to standardized vector storage, is constructed to systematically address the information insufficiency and semantic gap issues caused by the reliance on sparse IDs or manual features in traditional recommendation services. First, parallel image and text encoding networks are used to extract deep features from both visual and linguistic core modalities, ensuring rich product representation. Second, a graph-text fusion network achieves deep integration of cross-modal information, generating unified semantic vectors that more comprehensively and accurately reflect the essence of products. This lays a solid foundation for the accuracy of intent matching in subsequent steps. Finally, by constructing an efficient searchable product embedding vector library, complex model computations are rendered offline, providing plug-and-play, low-latency, high-quality semantic indexes for online real-time recommendation services. This entire process is not merely data preprocessing, but also an infrastructure construction that enhances the overall understanding capabilities of the recommendation service. It enables products to enter the recommendation service with a machine-understandable "language" (i.e., dense vectors), serving as a prerequisite and guarantee for subsequent accurate intent extraction and condition generation, significantly improving the semantic understanding level and the upper limit of the final effect of the entire recommendation chain.
[0103] Please see Figure 3 This product recommendation device, provided to meet one of the purposes of this application, is a functional embodiment of the product recommendation method of this application. On another aspect, this product recommendation device, provided to meet one of the purposes of this application, includes an event response module 1100, an intent representation module 1200, a diffusion reconstruction module 1300, and a product selection module 1400. The event response module 1100 is used to respond to a product recommendation event triggered by a user and obtain an encoding vector sequence corresponding to the user's interactive product sequence. The intent representation module 1200 is used to extract the user intent from the encoding vector sequence using an intent encoding network in a preset product recommendation model, representing it as a user intent vector. The diffusion reconstruction module 1300 is used to conditionally denoise a random noise vector using the user intent vector through a conditional diffusion network in the product recommendation model, inferring a recommended product vector. The product selection module 1400 is used to obtain recommended products from a preset product embedding vector library that match the recommended product vector, and push the recommended products to the user.
[0104] In a further embodiment, before the event response module 1100, there is a data acquisition submodule, used to acquire a dataset, the dataset including multiple samples and their supervision labels, the samples and their supervision labels corresponding to the encoding vector sequence corresponding to the subsequence in the historical interactive product sequence, and the product embedding vector of the target interactive product corresponding to the subsequence; and a model training submodule, used to train a product recommendation model to convergence based on the dataset, and learn the ability to infer the corresponding recommended product vector based on the interactive product sequence.
[0105] In a further embodiment, the model training submodule includes: a sequence augmentation unit, configured to divide the dataset into a training set and a validation set, input the samples in the training set into a preset augmentation prediction network to obtain corresponding augmentation sequences, wherein the augmentation sequences include a mask probability distribution for each sequence element in the samples, and an insertion probability distribution and an inserted product vector between each pair of adjacent sequence elements; a sequence optimization unit, configured to use a preset sequence optimization network to make sampling decisions on the samples based on the augmentation sequences, determine whether each sequence element in the samples should be replaced with a mask, and whether a corresponding product embedding vector should be inserted between each pair of adjacent sequence elements, to obtain a corresponding target optimization sequence; an intent quantization unit, configured to input the target optimization sequence and the samples into the intent encoding network in the product recommendation model, and construct a training intent vector based on the corresponding obtained optimized intent vector and sample intent vector; and a diffusion reconstruction unit. The system is configured to: input the training intent vector and the supervision label of the sample into the conditional diffusion network of the product recommendation model; append real noise to the supervision label to generate a training random noise vector; and use the training intent vector as a denoising condition to remove prediction noise from the training random noise vector to obtain a predicted product vector; a loss calculation unit is configured to: determine the intent difference loss value based on the optimized intent vector and the sample intent vector; determine the diffusion reconstruction loss value based on the real noise and the prediction noise; determine the recommendation task loss value based on the supervision label and the predicted product vector; and fuse the various loss values to obtain a target loss value; and a training convergence unit is configured to: update the corresponding network parameters of the augmented prediction network, the sequence optimization network, and the product recommendation model with the goal of reducing the target loss value; and determine that the product recommendation model has reached a convergence state when the inference performance of the updated product recommendation model is determined to meet the preset conditions by calling the validation set.
[0106] In a further embodiment, after the model training submodule, the module includes: an interaction acquisition submodule, used to acquire exposure interaction data for each recommended product after multiple recommended products are pushed to the corresponding users; an exposure quantification submodule, used to determine the exposure effectiveness score of each recommended product based on the exposure interaction data of each recommended product, and to determine the recommendation effectiveness score based on all exposure effectiveness scores; and a retraining submodule, used to retrain the product recommendation model when the recommendation effectiveness score is lower than the recommendation business threshold.
[0107] In a further embodiment, the event response module 1100 includes: a data acquisition submodule, used to acquire the product embedding vector of each interactive product in the user's interactive product sequence, wherein the product embedding vector is obtained by encoding the product image and product description text of the corresponding interactive product; and a sequence composition submodule, used to append a corresponding position encoding vector to the product embedding vector of each interactive product according to the position of each interactive product in the interactive product sequence, and to compose the obtained product encoding vectors of each interactive product into an encoding vector sequence.
[0108] In a further embodiment, the recommended product selection module 1400 includes: a product initial screening submodule, used to calculate the similarity between each product embedding vector in the product embedding vector library and the recommended product vector, and to filter out recommended products with similarity exceeding a matching threshold; a product fine ranking submodule, used to, for each recommended product, use a preset exposure performance model to infer the exposure performance score of the recommended product based on the product embedding vector of the recommended product and the user's profile embedding vector; and a recommended push submodule, used to sort the recommended products in reverse order according to the exposure performance score, and push the sorted multiple recommended products to the user.
[0109] In a further embodiment, before the recommended product selection module 1400, the module includes: a data acquisition submodule, used to acquire product images and product description text for each product in the product database; an image-text encoding submodule, used to simultaneously encode the product images and product description text for each product using an image encoding network and a text encoding network in a preset multimodal encoding model, to obtain image encoding vectors and text encoding vectors; an image-text fusion submodule, used to fuse the image encoding vectors and the text encoding vectors using the image-text fusion network in the multimodal encoding model, to obtain the product embedding vector of the product; and an association storage submodule, used to associate each product embedding vector with a corresponding product and store it in a product embedding vector library.
[0110] To address the aforementioned technical problems, embodiments of this application also provide computer equipment. For example... Figure 4The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can implement a product recommendation method. The processor of the computer device provides computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the product recommendation method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0111] In this embodiment, the processor is used to execute... Figure 3 The system defines the specific functions of each module and its sub-modules. The memory stores the program code and various data required to execute these modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the product recommendation device of this application. The server can call the server's program code and data to execute the functions of all sub-modules.
[0112] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the product recommendation method of any embodiment of this application.
[0113] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0114] In summary, this application can recommend products that users like based on precise user intent.
[0115] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those in the open-source operations, methods, and processes of this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.
[0116] The above description is only a partial embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A product recommendation method, characterized in that, Includes the following steps: In response to a product recommendation event triggered by a user, obtain the encoded vector sequence corresponding to the user's interactive product sequence; The user intent of the encoded vector sequence is extracted using the intent encoding network in the preset product recommendation model and represented as a user intent vector; The conditional diffusion network in the product recommendation model uses the user intent vector to conditionally denoise the random noise vector, and infers the recommended product vector. From a pre-defined product embedding vector library, retrieve recommended products corresponding to product embedding vectors that match the recommended product vectors, and push the recommended products to the user.
2. The product recommendation method according to claim 1, characterized in that, Before responding to a user-triggered product recommendation event, the following steps are included: Obtain a dataset, which includes multiple samples and their supervision labels. The samples and their supervision labels correspond to the encoding vector sequence corresponding to the subsequence in the historical interaction product sequence, and the product embedding vector of the target interaction product corresponding to the subsequence. The product recommendation model is trained to convergence based on the dataset, and learns the ability to infer the corresponding recommended product vector based on the sequence of interactive products.
3. The product recommendation method according to claim 2, characterized in that, The product recommendation model is trained to convergence based on the dataset, acquiring the ability to infer corresponding recommended product vectors based on the sequence of interacting products. This includes the following steps: The dataset is divided into a training set and a validation set. The samples in the training set are input into a preset augmentation prediction network to obtain corresponding augmentation sequences. The augmentation sequences include the mask probability distribution of each sequence element in the sample, the insertion probability distribution between each pair of adjacent sequence elements and their inserted product vector. A preset sequence optimization network is used to make sampling decisions on the sample based on the enhanced sequence, to determine whether each sequence element in the sample should be replaced with a mask, and whether a corresponding product embedding vector should be inserted between each pair of adjacent sequence elements, so as to obtain the corresponding target optimized sequence. The target optimization sequence and the sample are respectively input into the intent encoding network in the product recommendation model, and a training intent vector is constructed based on the corresponding optimized intent vector and sample intent vector. The training intent vector and the supervision label of the sample are input into the conditional diffusion network in the product recommendation model. Real noise is added to the supervision label to generate a training random noise vector. The training intent vector is used as a denoising condition to remove the prediction noise in the training random noise vector and obtain the prediction product vector. The intention difference loss value is determined based on the optimized intention vector and the sample intention vector; the diffusion reconstruction loss value is determined based on the real noise and the predicted noise; the recommendation task loss value is determined based on the supervision label and the predicted product vector; and the target loss value is obtained by fusing the various loss values. With the goal of reducing the target loss value, the corresponding network parameters in the augmented prediction network, sequence optimization network, and product recommendation model are updated. When the validation set is called to determine that the inference performance of the updated product recommendation model meets the preset conditions, the product recommendation model is determined to have been trained to a convergent state.
4. The product recommendation method according to claim 2, characterized in that, After training the product recommendation model to convergence based on the dataset and acquiring the ability to infer the corresponding recommended product vector based on the sequence of interactive products, the model includes: After collecting multiple recommended products and pushing them to the corresponding users, the exposure and interaction data of each recommended product are collected; The exposure performance score of each recommended product is determined based on the exposure interaction data of each recommended product, and the recommendation performance score is determined based on all exposure performance scores. When the recommendation performance score is lower than the recommendation business threshold, the product recommendation model is retrained.
5. The product recommendation method according to claim 1, characterized in that, Obtaining the encoded vector sequence corresponding to the user's interactive product sequence includes the following steps: Obtain the product embedding vector for each interactive product in the user's interactive product sequence. The product embedding vector is obtained by encoding the product image and product description text of the corresponding interactive product. For each interactive product in the corresponding interactive product sequence, a corresponding position encoding vector is appended to the product embedding vector of each interactive product, and the resulting product encoding vectors of each interactive product are combined into an encoding vector sequence.
6. The product recommendation method according to claim 1, characterized in that, Obtaining the recommended product corresponding to the product embedding vector that matches the recommended product vector, and pushing the recommended product to the user, includes the following steps: Calculate the similarity between each product embedding vector in the product embedding vector library and the recommended product vector, and filter out recommended products whose similarity exceeds the matching threshold; For each recommended product, a preset exposure performance model is used to infer the exposure performance score of the recommended product based on the product embedding vector of the recommended product and the user's profile embedding vector. The recommended products are sorted in reverse order based on the exposure effectiveness score, and the sorted recommended products are then pushed to the user.
7. The product recommendation method according to claim 1, characterized in that, Before pushing the recommended products to the user, the following steps are included: First, from a pre-defined product embedding vector library, the recommended products corresponding to the product embedding vectors that match the recommended product vectors are retrieved. Retrieve the product image and product description text for each product in the product database; For each product, the image encoding network and text encoding network in the preset multimodal encoding model are used to simultaneously encode the product image and product description text to obtain the image encoding vector and text encoding vector. The image encoding vector and the text encoding vector are fused by the image-text fusion network in the multimodal coding model to obtain the product embedding vector of the product; Each product embedding vector is associated with the corresponding product and stored in the product embedding vector library.
8. A product recommendation device, characterized in that, include: The event response module is used to respond to product recommendation events triggered by users and obtain the encoding vector sequence corresponding to the user's interactive product sequence; The intent representation module is used to extract the user intent of the encoded vector sequence using the intent encoding network in the preset product recommendation model, and represent it as a user intent vector; The diffusion reconstruction module is used to perform conditional denoising on the random noise vector using the user intent vector by the conditional diffusion network in the product recommendation model, and infer the recommended product vector. The product recommendation module is used to retrieve recommended products from a preset product embedding vector library that match the recommended product vector, and push the recommended products to the user.
9. A computer device comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 7, which, when invoked by a computer, executes the steps included in the corresponding method.