A recommendation model training method and device
By extracting predicted interaction features and real interaction results from user interaction sequences in the recommendation model and adjusting the model parameters, the problems of overfitting and weak generalization ability of sequence recommendation models are solved, thereby improving the accuracy of recommendation models and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING LONGZHI DIGITAL TECH CO LTD
- Filing Date
- 2022-12-01
- Publication Date
- 2026-04-21
AI Technical Summary
Existing sequential recommendation models based on user online behavior suffer from overfitting and weak generalization ability due to short sequence lengths and poor correlation between sequences. This results in recommended products or services that do not meet user needs, leading to a poor user experience and low conversion rates.
By using a recommendation model to extract predicted interaction features from the first historical interaction sequence, adjusting model parameters, and combining the actual interaction results from the second historical interaction sequence to optimize the model, the semantic relationships between users' historical interaction features are fully explored, avoiding the problem of a large disparity between positive and negative samples.
It improves the generalization performance and accuracy of the recommendation model in sparse recommendation scenarios, and enhances the conversion rate and user experience of the recommended objects.
Smart Images

Figure CN115935185B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of artificial intelligence technology, and in particular to a method and apparatus for training a recommendation model. Background Technology
[0002] In internet e-commerce, recommending suitable goods or services to users based on their personalized characteristics has always been a crucial issue. In certain relatively low-frequency scenarios, such as online advertising, online rentals, and online home purchases, the sparsity of positive sample data (e.g., clicks, purchases) means that sequence recommendation models built based on user online behavior may suffer from overfitting and weak generalization ability due to the short length of the sequences and poor correlation between them. This can result in insufficient information in the sequence's representational features during training. Consequently, when using sequence recommendation models to recommend goods or services to users, the recommended goods or services may not be what the user actually wants, leading to a poor user experience and limitations in improving conversion rates. Summary of the Invention
[0003] In view of this, the present disclosure provides a training method, apparatus, computer device, and computer-readable storage medium for a recommendation model to solve the problems of overfitting and weak generalization ability in the training process of sequence recommendation models constructed based on users' online behavior, due to the short length of the sequence itself and the poor correlation between sequences. This results in insufficient information in the representational features of the sequence during the training process. Consequently, when using the sequence recommendation model to recommend goods or services to users, the recommended goods or services may not be what the users actually want, leading to a poor user experience and limitations in improving the conversion rate of goods or services.
[0004] A first aspect of this disclosure provides a method for training a recommendation model, the method comprising:
[0005] Using a recommendation model, predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample is obtained; wherein, the first historical interaction sequence includes several historical interaction feature information.
[0006] Based on the predicted interaction feature information and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample, the model parameters of the recommendation model are adjusted to obtain the adjusted recommendation model.
[0007] Using the adjusted recommendation model, the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample is obtained; wherein, the second historical interaction sequence includes several historical interaction feature information;
[0008] Based on the predicted interaction results and the actual interaction results corresponding to the second historical interaction sequence in the second interaction training samples, the model parameters of the adjusted recommendation model are adjusted to obtain the target recommendation model.
[0009] A second aspect of this disclosure provides a training apparatus for a recommendation model, the apparatus comprising:
[0010] The first prediction unit is used to obtain predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample using a recommendation model; wherein, the first historical interaction sequence includes several historical interaction feature information.
[0011] The first adjustment unit is used to adjust the model parameters of the recommendation model based on the predicted interaction feature information and the real interaction feature information in the first interaction training sample corresponding to the first historical interaction sequence, so as to obtain the adjusted recommendation model.
[0012] The second prediction unit is used to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample using the adjusted recommendation model; wherein the second historical interaction sequence includes several historical interaction feature information.
[0013] The second adjustment unit is used to adjust the model parameters of the adjusted recommendation model based on the predicted interaction results and the real interaction results in the second interaction training samples corresponding to the second historical interaction sequence, so as to obtain the target recommendation model.
[0014] A third aspect of this disclosure provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method described above.
[0015] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0016] The beneficial effects of this embodiment compared to the prior art are as follows: This embodiment can first utilize a recommendation model to obtain predicted interaction feature information corresponding to a first historical interaction sequence in the first interaction training sample; wherein, the first historical interaction sequence includes several historical interaction feature information. Then, based on the predicted interaction feature information and the real interaction feature information in the first interaction training sample corresponding to the first historical interaction sequence, the model parameters of the recommendation model can be adjusted to obtain an adjusted recommendation model. Next, the adjusted recommendation model can be used to obtain the predicted interaction result corresponding to a second historical interaction sequence in the second interaction training sample; wherein, the second historical interaction sequence includes several historical interaction feature information. Finally, based on the predicted interaction result and the real interaction result in the second interaction training sample corresponding to the second historical interaction sequence, the model parameters of the adjusted recommendation model can be adjusted to obtain a target recommendation model. As can be seen, in this embodiment, the first historical interaction sequence in the first interaction training sample can be used first, allowing the recommendation model to be modeled based on the user interaction sequence (i.e., the first historical interaction sequence). This enables the recommendation model to extract rich and dynamic semantic representation information from the interaction sequence, thereby improving the recommendation accuracy. Then, the second historical interaction sequence in the second interaction training sample and the corresponding real interaction results can be used to optimize the recommendation model, thereby improving the accuracy of the recommendation model's evaluation of interaction results. In this way, the massive amount of user historical interaction sequences can be fully utilized to fully explore the potential semantic relationships between different historical interaction feature information, and the problem of a huge imbalance between positive and negative samples in the recommendation scenario can be avoided. This improves the training accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, thereby further improving the generalization performance of the recommendation model in sparse recommendation scenarios, and improving the accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, ultimately improving the conversion rate of recommendation objects and user experience. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a schematic diagram illustrating an application scenario of an embodiment of this disclosure;
[0019] Figure 2 This is a flowchart of the training method for the recommendation model provided in this embodiment of the disclosure;
[0020] Figure 3 This is a schematic diagram of the model training process for determining predictive interaction feature information provided in an embodiment of this disclosure;
[0021] Figure 4 This is a schematic diagram of the model training process for determining the predicted interaction result provided in an embodiment of this disclosure;
[0022] Figure 5 This is a block diagram of the training apparatus for the recommendation model provided in the embodiments of this disclosure;
[0023] Figure 6 This is a schematic diagram of a computer device provided in an embodiment of this disclosure. Detailed Implementation
[0024] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, so as to provide a thorough understanding of the embodiments of this disclosure. However, those skilled in the art will understand that this disclosure may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this disclosure with unnecessary detail.
[0025] The following will describe in detail, with reference to the accompanying drawings, a method and apparatus for training a recommendation model according to an embodiment of the present disclosure.
[0026] In existing technologies, due to the training methods of traditional recommendation models, in certain relatively low-frequency scenarios such as online advertising, online rentals, and home purchases, the sparsity of positive sample data (such as clicks and purchases) leads to problems such as overfitting and weak generalization ability in the training process of sequence recommendation models. This is because the sequence itself is short and has poor correlation between sequences. As a result, the information in the representation features of the sequence is insufficient. Consequently, when using sequence recommendation models to recommend goods or services to users, the recommended goods or services may not be what the users actually want, resulting in a poor user experience and limitations in improving the conversion rate of goods or services.
[0027] In online e-commerce recommendation scenarios, existing technologies primarily employ user behavior as feedback information to model user preferences. Then, based on the matching relationship between user preferences and existing product or service databases, they rank and recommend the products or services that best match the user's preferences. The overall structure of these models involves inputting a set of user and product features, determining whether a user will click on or purchase a specific product, and using this determination as the model's output. This output is then compared with actual user clicks or purchases to calculate a loss function, guiding model optimization. Representative models include Deep Factorization Machines (DeepFM) and Deep Interest Networks (DIN). Taking the DIN model as an example, this model uses historical clicks or purchase records to determine the user's preference for the current product, ultimately outputting a single probability indicating the user's tendency to click on or purchase the product. These models share the common characteristic of using known features to predict a user's interaction with a single, specific product. However, this approach means the model can only be trained on positive samples of a single product (i.e., products that have been clicked or purchased), and the proportion of negative samples (i.e., products that haven't been clicked or purchased) is very small. This significantly impacts model training, leading to decreased accuracy and recall of positive samples. In such cases, these models require oversampling of positive samples or undersampling of negative samples, making the training process relatively complex and difficult. Furthermore, these models only consider the impact of a sequence of product interaction behaviors over a period of time on the last behavior, failing to fully leverage the unique potential of the sequence's representational features. This results in poor generalization performance in sparse scenarios.
[0028] To address the aforementioned problems, this invention provides a training method for a recommendation model. In this method, the first historical interaction sequence in the first interaction training sample is used to model the recommendation model based on the user interaction sequence (i.e., the first historical interaction sequence). This allows the recommendation model to extract rich and dynamic semantic representation information from the interaction sequence, thereby improving the recommendation accuracy. Then, the recommendation model is optimized using the second historical interaction sequence in the second interaction training sample and the corresponding real interaction results, further improving the accuracy of the recommendation model's evaluation of interaction results. This approach fully utilizes massive amounts of user historical interaction sequences, fully explores the potential semantic relationships between different historical interaction features, and avoids the problem of a significant imbalance between positive and negative samples in recommendation scenarios. This improves the training accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, thereby further enhancing the generalization performance of the recommendation model in sparse recommendation scenarios and improving the accuracy of the prediction and evaluation of recommendation objects and interaction results. Ultimately, this improves the conversion rate of recommendation objects and the user experience.
[0029] For example, embodiments of the present invention can be applied to, for example... Figure 1 The application scenario shown can include terminal device 1 and server 2.
[0030] Terminal device 1 can be hardware or software. When terminal device 1 is hardware, it can be various electronic devices with a display screen that support communication with server 2, including but not limited to smartphones, tablets, laptops, and desktop computers; when terminal device 1 is software, it can be installed in the aforementioned electronic devices. Terminal device 1 can be implemented as multiple software programs or software modules, or as a single software program or software module, and this disclosure does not limit this. Furthermore, various applications can be installed on terminal device 1, such as data processing applications, instant messaging tools, social platform software, search applications, shopping applications, etc.
[0031] Server 2 can be a server that provides various services, such as a backend server that receives requests sent by terminal devices with which it has established communication connections. This backend server can receive and analyze the requests sent by the terminal devices and generate processing results. Server 2 can be a single server, a server cluster consisting of several servers, or a cloud computing service center; this disclosure does not limit this.
[0032] It should be noted that server 2 can be either hardware or software. When server 2 is hardware, it can be various electronic devices that provide various services to terminal device 1. When server 2 is software, it can be multiple software programs or software modules that provide various services to terminal device 1, or it can be a single software program or software module that provides various services to terminal device 1. This disclosure does not impose any limitations on this aspect.
[0033] Terminal device 1 and server 2 can communicate via a network. The network can be a wired network using coaxial cable, twisted pair, or fiber optic connection, or a wireless network that enables interconnection of various communication devices without wiring, such as Bluetooth, Near Field Communication (NFC), or Infrared. This disclosure does not limit the scope of the embodiments.
[0034] Specifically, the user can input a first interactive training sample and a second interactive training sample through terminal device 1; terminal device 1 sends the first interactive training sample and the second interactive training sample to server 2. Server 2 stores a recommendation model to be trained; server 2 can first use the recommendation model to obtain the predicted interactive feature information corresponding to the first historical interactive sequence in the first interactive training sample; wherein, the first historical interactive sequence includes several historical interactive feature information; then, server 2 can adjust the model parameters of the recommendation model according to the predicted interactive feature information and the real interactive feature information in the first interactive training sample corresponding to the first historical interactive sequence, to obtain an adjusted recommendation model; next, server 2 can use the adjusted recommendation model to obtain the predicted interactive result corresponding to the second historical interactive sequence in the second interactive training sample; wherein, the second historical interactive sequence includes several historical interactive feature information; finally, server 2 can adjust the model parameters of the adjusted recommendation model according to the predicted interactive result and the real interactive result in the second interactive training sample corresponding to the second historical interactive sequence, to obtain the target recommendation model. In this way, since this application can first utilize the first historical interaction sequence in the first interaction training sample, the recommendation model can be modeled based on the user interaction sequence (i.e., the first historical interaction sequence). This allows the recommendation model to extract rich and dynamic semantic representation information from the interaction sequence, thereby improving the recommendation accuracy. Then, the recommendation model can be optimized using the second historical interaction sequence in the second interaction training sample and the corresponding real interaction results, thereby improving the accuracy of the recommendation model's evaluation of interaction results. This approach fully utilizes massive amounts of user historical interaction sequences, fully explores the potential semantic relationships between different historical interaction features, and avoids the problem of a large disparity in the ratio of positive and negative samples in recommendation scenarios. This improves the training accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, further enhancing the generalization performance of the recommendation model in sparse recommendation scenarios and improving the accuracy of the recommendation model's prediction and evaluation of recommendation objects and interaction results. Ultimately, this improves the conversion rate of recommendation objects and the user experience.
[0035] It should be noted that the specific types, quantities, and combinations of terminal device 1, server 2, and network can be adjusted according to the actual needs of the application scenario, and this disclosure embodiment does not impose any restrictions on this.
[0036] It should be noted that the above application scenarios are shown only for the purpose of understanding this disclosure, and the implementation of this disclosure is not limited in any way. On the contrary, the implementation of this disclosure can be applied to any applicable scenario.
[0037] Figure 2 This is a flowchart of a training method for a recommendation model provided in an embodiment of this disclosure. Figure 2 One method for training a recommendation model can be derived from... Figure 1 The terminal device or server executes the command. For example... Figure 2 As shown, the training method for this recommendation model includes:
[0038] S201: Using the recommendation model, obtain the predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample.
[0039] In this embodiment, the recommendation model can be understood as a neural network model used to make personalized recommendations of objects (such as goods or services) to users. As an example, the recommendation model can be a neural network model whose input is a sequence and whose output is a sequence, that is, a sequence-to-sequence (seq2seq) neural network model. For example, it can be an RNN series, a CNN series, a self-attention network, or a network consisting of encoders and decoders composed of transformers. Specifically, it can be a Long Short-Term Memory (LSTM) network, a Convolutional Neural Network (CNN), or a self-attention neural network (transformer). This embodiment does not specifically limit the recommendation model.
[0040] The first interactive training sample may include a first historical interactive sequence and real interactive feature information corresponding to the first historical interactive sequence.
[0041] The first historical interaction sequence includes several historical interaction feature information. This means that these historical interaction feature information, ordered in a preset order, can form the first historical interaction sequence. For example, they can be ordered according to the corresponding interaction time. For instance, the products (i.e., interaction objects) that the same user interacted with on an e-commerce website or application within a certain period can be arranged chronologically to form a sequence of interactive products for that user (i.e., the first historical interaction sequence).
[0042] In one implementation, the historical interaction feature information may include interaction object attribute features, historical interaction behavior features, and interaction user attribute features. Interaction object attribute features can be understood as feature information that reflects the attributes of the interaction object itself. The interaction object can be understood as the object on which the interaction behavior is performed. For example, when the interaction object is a product or service, the interaction object attribute features may reflect attributes such as the price, daily sales volume, and product type of the product or service. Interaction user attribute features can be understood as feature information that reflects the attributes of the user (i.e., the account) performing the interaction behavior. For example, features reflecting the model of the user's mobile phone (i.e., the mobile phone model logged into the account) and the location of the account (e.g., province, city). Historical interaction behavior characteristics can be understood as the features of interactions that have already occurred. These characteristics reflect the actions performed by a user on an interactive object. For example, assuming the interactive object is a product, interaction behavior characteristics include the number of times a user clicks on the product, whether it has been favorited, and / or purchased. It's important to note that in online e-commerce scenarios, users often browse multiple products or services on the same e-commerce website or mobile application. Their actions may include lingering on a product page, clicking on a product to view details, etc. These actions can be collectively referred to as interaction behavior. It's understandable that users generate a large number of interaction sequences, and the content, length, and order of these sequences will differ from user to user. Therefore, historical interaction feature information extracted from the large number of interaction sequences generated by users can represent the personalized behavioral trajectory of each user.
[0043] For example, suppose account A browsed six products on an e-commerce website within an hour, specifically in the order of (product a, product b, product c, product d, product e, product f), and finally purchased product f. These products, account A, and the characteristics corresponding to the interaction behavior "browsing" can be arranged into a time series (i.e., a historical interaction sequence) according to the interaction time order. Specifically, the first historical interaction sequence can be {(interaction object attribute characteristics: price and product type of product a; historical interaction behavior characteristics: browsing; interaction user attribute characteristics: position corresponding to account A), (interaction object attribute characteristics: price and product type of product b; historical interaction behavior characteristics: browsing;} Interactive user attribute characteristics: (location corresponding to account A), (interactive object attribute characteristics: price and product type of product c; historical interaction behavior characteristics: browsing; interactive user attribute characteristics: location corresponding to account A), (interactive object attribute characteristics: price and product type of product d; historical interaction behavior characteristics: browsing; interactive user attribute characteristics: location corresponding to account A), (interactive object attribute characteristics: price and product type of product e; historical interaction behavior characteristics: browsing; interactive user attribute characteristics: location corresponding to account A), (interactive object attribute characteristics: price and product type of product f; historical interaction behavior characteristics: browsing, purchasing; interactive user attribute characteristics: location corresponding to account A)}.
[0044] The real interaction feature information corresponding to the first historical interaction sequence can be understood as interaction feature information that occurs continuously with the first historical interaction sequence. In one implementation, the real interaction feature information may include real interaction object attribute features (i.e., the attribute features of the interaction object that have occurred), real interaction behavior features (i.e., the interaction behavior features that have occurred), and real interaction user attribute features (i.e., the user attribute features of the interaction that have occurred). It should be noted that the real interaction feature information may include one interaction feature information or multiple interaction feature information. When the real interaction feature information includes multiple interaction feature information, the real interaction feature information is also a sequence. For example, suppose user A's historical sequence is {(interaction object attribute features: price and product type of product a; historical interaction behavior features: browsing; interaction user attribute features: position corresponding to account A), (interaction object attribute features: price and product type of product b; historical interaction behavior features: browsing; interaction user attribute features: position corresponding to account A), (interaction object attribute features: price and product type of product c; historical interaction behavior features: browsing; interaction user attribute features: position corresponding to account A), (interaction object attribute features: price and product type of product d; historical interaction behavior features: browsing; interaction user attribute features: position corresponding to account A), (interaction object attribute features: price and product type of product e; historical interaction behavior features: browsing; interaction user attribute features: position corresponding to account A), (interaction object attribute features: price and product type of product f; historical interaction behavior features: browsing, purchasing; interaction user attribute features: position corresponding to account A)}, the first historical interaction sequence can be {(interaction... Interactive object attribute characteristics: price and product type of product a; historical interaction behavior characteristics: browsing; interactive user attribute characteristics: location corresponding to account A), (interactive object attribute characteristics: price and product type of product b; historical interaction behavior characteristics: browsing; interactive user attribute characteristics: location corresponding to account A), (interactive object attribute characteristics: price and product type of product c; historical interaction behavior characteristics: browsing; interactive user attribute characteristics: location corresponding to account A)}, the real interaction feature information corresponding to the first historical interaction sequence is {(real interactive object attribute characteristics: price and product type of product d; real interaction behavior characteristics: browsing; real interactive user attribute characteristics: location corresponding to account A), (real interactive object attribute characteristics: price and product type of product e; real interaction behavior characteristics: browsing; real interactive user attribute characteristics: location corresponding to account A), (real interactive object attribute characteristics: price and product type of product f; real interaction behavior characteristics: browsing, purchasing; real interactive user attribute characteristics: location corresponding to account A)}.
[0045] The predicted interaction feature information corresponding to the first historical interaction sequence can be understood as the interaction feature information of subsequent interactions in the first historical interaction sequence predicted by the recommendation model. In one implementation, the predicted interaction feature information includes predicted interaction object attribute features (i.e., predicted interaction object attribute features), predicted interaction behavior features (i.e., predicted interaction behavior features), and predicted interaction user attribute features (i.e., predicted interaction user attribute features). For example, the first historical interaction sequence can be {(interaction object attribute features: price and product type of product a; historical interaction behavior features: browsing; interaction user attribute features: location corresponding to account A), (interaction object attribute features: price and product type of product b; historical interaction behavior features: browsing; interaction user attribute features: location corresponding to account A)}, and the subsequent interaction feature information of the first historical interaction sequence predicted by the recommendation model can be (interaction object attribute features: price and product type of product f; historical interaction behavior features: browsing; interaction user attribute features: location corresponding to account A).
[0046] S202: Based on the predicted interaction feature information and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample, the model parameters of the recommendation model are adjusted to obtain the adjusted recommendation model.
[0047] After obtaining the predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample, the predicted interaction feature information and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample can be used to calculate the loss function value. If the loss function value does not meet the preset condition, the model parameters of the recommendation model can be adjusted according to the loss function value to obtain the adjusted recommendation model. Then, S201 is executed until the loss function value meets the preset condition or the number of training iterations of S201 reaches the preset number.
[0048] In one implementation, the model parameters of the recommendation model can be adjusted using the cross-entropy loss function, the predicted interaction feature information, and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training samples, to obtain an adjusted recommendation model. Specifically, the average cross-entropy loss can be determined based on the predicted interaction feature information and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training samples; and the total loss function value can be determined based on the average cross-entropy loss, for example, using the average cross-entropy loss as the total loss function value.
[0049] S203: Using the adjusted recommendation model, obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample.
[0050] In this embodiment, the second interaction training sample may include the second historical interaction sequence and the actual interaction results corresponding to the second historical interaction sequence.
[0051] The second historical interaction sequence includes several historical interaction feature information. It can be understood that several historical interaction feature information, ordered in a preset order, can serve as the second historical interaction sequence. For example, several historical interaction feature information can be ordered according to the corresponding interaction time to serve as the second historical interaction sequence. For instance, suppose account A browsed six products sequentially on an e-commerce website within one hour, specifically in the order of (product a, product b, product c, product d, product e, product f), and finally purchased product f. These products, account A, and the features corresponding to the interaction behavior "browsing" can be arranged into a time series (i.e., the historical interaction sequence) according to the interaction time order. Specifically, the second historical interaction sequence can be {(interaction object attribute features: price and product type of product a; historical interaction behavior features: browsing; interaction user attribute features: position corresponding to account A), (interaction object...} Attribute characteristics: Price and product type of product b; Historical interaction behavior characteristics: browsing; Interactive user attribute characteristics: Location corresponding to account A), (Interactive object attribute characteristics: Price and product type of product c; Historical interaction behavior characteristics: browsing; Interactive user attribute characteristics: Location corresponding to account A), (Interactive object attribute characteristics: Price and product type of product d; Historical interaction behavior characteristics: browsing; Interactive user attribute characteristics: Location corresponding to account A), (Interactive object attribute characteristics: Price and product type of product e; Historical interaction behavior characteristics: browsing; Interactive user attribute characteristics: Location corresponding to account A)
[0052] (Interactive object attributes: price and product type of product f; historical interaction behavior characteristics: browsing, purchasing; interactive user attributes: location corresponding to account A)}. It should be noted that the first history...
[0053] The interaction sequence and the second historical interaction sequence can be the same or different.
[0054] In one implementation, to enable the recommendation model to better adapt to the personalized needs of different users, each recommendation model can be trained individually for each user. Accordingly, the training time of each recommendation model...
[0055] The training samples (i.e., the first interaction training sample and the second interaction training sample) are both training samples from the same user. This means that the interactive user attribute features of each historical interaction feature in the first historical interaction sequence of the first interaction training sample and the second historical interaction sequence of the second interaction training sample are identical. In this way, during the training of the recommendation model, personalized user information can be incorporated into the vector representation based on the dynamic changes of different users, effectively improving the personalized performance of the downstream recommendation task corresponding to the recommendation model.
[0056] The actual interaction result corresponding to the second historical interaction sequence can be understood as the actual conversion result corresponding to the 5 interaction objects in the second historical interaction sequence. That is, the actual interaction result corresponding to the second historical interaction sequence includes the actual conversion results of the interaction objects in the second historical interaction sequence. Specifically, the actual interaction result corresponding to the second historical interaction sequence can include the actual conversion results of all interaction objects in the second historical interaction sequence, or it can be the actual conversion results of some interaction objects. For example, suppose account A is in a...
[0057] Within one hour, two products were viewed sequentially on an e-commerce website. The second historical interaction sequence is {(interaction object attribute characteristics: price and product type of product a; historical interaction behavior characteristics: browsing, purchasing;}
[0058] Interactive user attribute characteristics: location corresponding to account A), (interactive object attribute characteristics: price and product type of product b; historical interaction behavior characteristics: browsing; interactive user attribute characteristics: location corresponding to account A)}, then the actual interaction result corresponding to the second historical interaction sequence can be the conversion result of product b.
[0059] It could mean not purchased, or that product A's conversion result is purchased and product B's conversion result is not purchased. It should be noted that, assuming the interaction object is a product, it can be based on the user's interaction with the last product.
[0060] If, within a certain period after the interaction, the user takes further action such as ordering or reserving the interactive product, this further user behavior can be called a conversion. When training the model, it is necessary to collect conversion behavior data for the user's interactive product sequence to determine whether the user ultimately converted on certain products. The training objective of the model is to determine which products the user will actually convert on, given the user's interactive product sequence as input. In this way, the trained recommendation model can push products with high conversion probability to the user during use, thereby improving the user's conversion rate for interactive products.
[0061] The predicted interaction result corresponding to the second historical interaction sequence can be understood as the predicted interaction result obtained by using the adjusted recommendation model, whereby the predicted interaction result includes the predicted conversion result of the interaction object. Specifically, the predicted interaction result corresponding to the second historical interaction sequence may include the predicted conversion results of all interaction objects in the second historical interaction sequence, or it may be the predicted conversion results of some interaction objects. In one implementation, the predicted interaction result corresponding to the second historical interaction sequence can be the predicted conversion success probability. It can be understood that a higher predicted conversion success probability indicates a greater likelihood of the interaction object being successfully converted, and vice versa. In another implementation, the interaction result can be represented by 1 and 0, where 1 represents that the interaction object was ultimately purchased or reserved by the user (i.e., the user performed a conversion behavior on the interaction object), and 0 represents that the interaction object was ultimately not purchased or reserved by the user (i.e., the user did not perform a conversion behavior on the interaction object). For example, suppose account A browses two products on an e-commerce website within one hour. The second historical interaction sequence is {(interaction object attribute characteristics: price and product type of product a; historical interaction behavior characteristics: browsing; interaction user attribute characteristics: location corresponding to account A), (interaction object attribute characteristics: price and product type of product b; historical interaction behavior characteristics: browsing; interaction user attribute characteristics: location corresponding to account A)}. Then the actual interaction result corresponding to the second historical interaction sequence can be that the conversion result of product b is a purchase, or that the conversion result of product a is a purchase and the conversion result of product b is a purchase.
[0062] S204: Based on the predicted interaction results and the actual interaction results in the second interaction training samples corresponding to the second historical interaction sequence, adjust the model parameters of the adjusted recommendation model to obtain the target recommendation model.
[0063] After obtaining the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample, the predicted interaction result and the real interaction result corresponding to the second historical interaction sequence in the second interaction training sample can be used to calculate the loss function value. If the loss function value does not meet the preset condition, the model parameters of the recommendation model can be adjusted according to the loss function value to obtain the target recommendation model. Then, S203 is executed until the loss function value meets the preset condition or the number of training iterations of S203 reaches the preset number.
[0064] In one implementation, the model parameters of the adjusted recommendation model can be adjusted using the binary cross-entropy loss function, the predicted interaction results, and the actual interaction results corresponding to the second historical interaction sequence in the second interaction training samples to obtain the target recommendation model. Specifically, the binary cross-entropy loss value can be determined based on the predicted interaction results and the actual interaction results; and the total loss function value can be determined based on the binary cross-entropy loss value, for example, using the binary cross-entropy loss value as the total loss function value.
[0065] The beneficial effects of this embodiment compared to the prior art are as follows: This embodiment can first utilize a recommendation model to obtain predicted interaction feature information corresponding to a first historical interaction sequence in the first interaction training sample; wherein, the first historical interaction sequence includes several historical interaction feature information. Then, based on the predicted interaction feature information and the real interaction feature information in the first interaction training sample corresponding to the first historical interaction sequence, the model parameters of the recommendation model can be adjusted to obtain an adjusted recommendation model. Next, the adjusted recommendation model can be used to obtain the predicted interaction result corresponding to a second historical interaction sequence in the second interaction training sample; wherein, the second historical interaction sequence includes several historical interaction feature information. Finally, based on the predicted interaction result and the real interaction result in the second interaction training sample corresponding to the second historical interaction sequence, the model parameters of the adjusted recommendation model can be adjusted to obtain a target recommendation model. As can be seen, in this embodiment, the first historical interaction sequence in the first interaction training sample can be used to enable the recommendation model to model based on the user interaction sequence (i.e., the first historical interaction sequence). This allows the recommendation model to extract rich and dynamic semantic representation information from the interaction sequence, thereby improving the recommendation accuracy. Then, the second historical interaction sequence in the second interaction training sample and the corresponding real interaction results can be used to fine-tune the recommendation model, thereby improving the accuracy of the recommendation model's evaluation of interaction results. In this way, the two-stage training can have a regularization effect to a certain extent, improving the numerical stability of the recommendation model's optimization process. It can also make full use of massive user historical interaction sequences to fully explore the potential semantic relationships between different historical interaction feature information, and avoid the problem of a large disparity between positive and negative samples in the recommendation scenario. This can improve the training accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, thereby further improving the generalization performance of the recommendation model in sparse recommendation scenarios, and improving the accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, ultimately improving the conversion rate of recommendation objects and user experience.
[0066] In some embodiments, the recommendation model includes a neural network encoder and a neural network decoder; step S201, "using the recommendation model to obtain the predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample," may include the following steps:
[0067] S201a: Input the first historical interaction sequence in the first interaction training sample into the neural network encoder to obtain the encoded representation features corresponding to each historical interaction feature information in the first historical interaction sequence.
[0068] In this embodiment, the first historical interaction sequence from the first interaction training sample can be input into the neural network encoder. Then, the neural network encoder outputs the encoded representation features corresponding to each historical interaction feature in the first historical interaction sequence. These encoded representation features can be low-dimensional dense representation vectors. It should be noted that the encoded representation features corresponding to the first historical interaction sequence will differ depending on the order of the historical interaction features, thus better adapting to the personalized needs of different users.
[0069] by Figure 3 For example, the first historical interaction sequence {(U0,I0,P0),(U1,I1,P1),(U2,I2,P2)} can be input into the neural network encoder in the recommendation model to obtain the encoded representation feature E0 corresponding to the historical interaction feature information (U0,I0,P0), the encoded representation feature E1 corresponding to the historical interaction feature information (U1,I1,P1), and the encoded representation feature E2 corresponding to the historical interaction feature information (U2,I2,P2).
[0070] S201b: Input the encoded representation features corresponding to each of the historical interaction feature information in the first historical interaction sequence into the neural network decoder to obtain the first prediction decoding representation vector corresponding to the first historical interaction sequence.
[0071] S201c: For the (i-1)th prediction decoding representation vector, input the encoded representation features corresponding to each of the historical interaction feature information in the first historical interaction sequence, as well as the first prediction decoding representation vector to the (i-1)th prediction decoding representation vector, into the neural network decoder to obtain the i-th prediction decoding representation vector; where i is a positive integer greater than 1.
[0072] In this embodiment, the encoded representation features corresponding to each of the historical interaction feature information in the first historical interaction sequence can be input into the neural network decoder so that the neural network decoder can perform autoregressive decoding processing to obtain the predicted decoding representation vector corresponding to the first historical interaction sequence.
[0073] by Figure 3 For example, the encoded representation feature E0 corresponding to the historical interaction feature information (U0, I0, P0), the encoded representation feature E1 corresponding to the historical interaction feature information (U1, I1, P1), and the encoded representation feature E2 corresponding to the historical interaction feature information (U2, I2, P2) are input into the neural network decoder to obtain the first predicted decoding representation vector D2 corresponding to the first historical interaction sequence. Then, the encoded representation feature E0 corresponding to the historical interaction feature information (U0, I0, P0), the encoded representation feature E1 corresponding to the historical interaction feature information (U1, I1, P1), the encoded representation feature E2 corresponding to the historical interaction feature information (U2, I2, P2), and the first predicted decoding representation vector D2 are input into the neural network decoder to obtain the second predicted decoding representation vector D3 corresponding to the first historical interaction sequence. Next, the encoded representation feature E0 corresponding to the historical interaction feature information (U0, I0, P0), the encoded representation feature E1 corresponding to the historical interaction feature information (U1, I1, P1), the encoded representation feature E2 corresponding to the historical interaction feature information (U2, I2, P2), the first prediction decoding representation vector D2, and the second prediction decoding representation vector D3 are input into the neural network decoder to obtain the third prediction decoding representation vector D4 corresponding to the first historical interaction sequence.
[0074] S201d: Input the i-th predicted decoding representation vector into the interactive object attribute feature classifier, the interactive behavior feature classifier, and the interactive user attribute feature classifier respectively to obtain the predicted interactive object attribute feature, the predicted interactive behavior feature, and the predicted interactive user attribute feature.
[0075] In this embodiment, three classifiers (i.e., an interaction object attribute feature classifier, an interaction behavior feature classifier, and an interaction user attribute feature classifier) can be connected after the neural network decoder to predict the predicted interaction object attribute features, the predicted interaction behavior features, and the predicted interaction user attribute features, respectively. It should be noted that, in one implementation of this embodiment, any one of the predicted decoding representation vectors (e.g., the last predicted decoding representation vector) can be input into the interaction object attribute feature classifier, the interaction behavior feature classifier, and the interaction user attribute feature classifier; alternatively, each predicted decoding representation vector can be input into all three classes.
[0076] by Figure 3For example, suppose the second prediction decoding representation vector D3 is input into the interactive object attribute feature classifier, the interactive behavior feature classifier, and the interactive user attribute feature classifier, respectively, to obtain the predicted interactive object attribute feature P'3, the predicted interactive behavior feature I'3, and the predicted interactive user attribute feature U'3 corresponding to the second prediction decoding representation vector D3.
[0077] In some embodiments, the recommendation model includes a neural network encoder and a neural network decoder; step S203, "using the adjusted recommendation model to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample," may include the following steps:
[0078] S203a: Input the second historical interaction sequence in the second interaction training sample into the neural network encoder to obtain the encoded representation features corresponding to each historical interaction feature information in the second historical interaction sequence.
[0079] It should be noted that the encoding representation features of the second historical interaction sequence will also be different depending on the order of some historical interaction feature information in the second historical interaction sequence, so as to better adapt to the personalized needs of different users.
[0080] by Figure 4 For example, the second historical interaction sequence {(U0,I0,P0),(U1,I1,P1),(U2,I2,P2),(U3,I3,P3),(U4,I4,P4),(U5,I5,P5)} can be input into the neural network encoder of the recommendation model to obtain the encoded representation feature E0 corresponding to the historical interaction feature information (U0,I0,P0), the encoded representation feature E1 corresponding to the historical interaction feature information (U1,I1,P1), the encoded representation feature E2 corresponding to the historical interaction feature information (U2,I2,P2), the encoded representation feature E3 corresponding to the historical interaction feature information (U3,I3,P3), the encoded representation feature E4 corresponding to the historical interaction feature information (U4,I4,P4), and the encoded representation feature E5 corresponding to the historical interaction feature information (U5,I5,P5).
[0081] S203b: Input the encoded representation feature corresponding to the last historical interaction feature information in the second historical interaction sequence into the interaction behavior classifier to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample.
[0082] It should be noted that, in one implementation of this embodiment, the encoded representation feature corresponding to any historical interaction feature information (such as the last encoded representation feature) can be input into the interaction behavior classifier, or the encoded representation feature corresponding to each historical interaction feature information can be input into the interaction behavior classifier. This embodiment does not limit this approach.
[0083] by Figure 4 For example, the encoded representation feature E5 corresponding to the historical interaction feature information (U5, I5, P5) can be input into the interaction behavior classifier to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample as 0.6, that is, the predicted conversion success probability is 0.6. Since the predicted conversion success probability is greater than the preset threshold of 0.5, it can be considered that the interaction object was eventually purchased or reserved by the user (that is, the user has performed a conversion behavior on the interaction object). Therefore, the predicted interaction result can also be 1, that is, the interaction object was eventually purchased or reserved by the user (that is, the user has performed a conversion behavior on the interaction object).
[0084] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.
[0085] The following are embodiments of the apparatus disclosed herein, which can be used to execute embodiments of the method disclosed herein. For details not disclosed in the apparatus embodiments of this disclosure, please refer to the embodiments of the method disclosed herein.
[0086] Figure 5 This is a schematic diagram of the training apparatus for the recommendation model provided in the embodiments of this disclosure. Figure 5 As shown, the training apparatus for this recommendation model includes:
[0087] The first prediction unit 501 is used to obtain predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample using a recommendation model; wherein, the first historical interaction sequence includes several historical interaction feature information.
[0088] The first adjustment unit 502 is used to adjust the model parameters of the recommendation model according to the predicted interaction feature information and the real interaction feature information in the first interaction training sample corresponding to the first historical interaction sequence, so as to obtain the adjusted recommendation model.
[0089] The second prediction unit 503 is used to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample using the adjusted recommendation model; wherein, the second historical interaction sequence includes several historical interaction feature information.
[0090] The second adjustment unit 504 is used to adjust the model parameters of the adjusted recommendation model based on the predicted interaction results and the real interaction results in the second interaction training samples corresponding to the second historical interaction sequence, so as to obtain the target recommendation model.
[0091] Optionally, the historical interaction feature information includes interaction object attribute features, historical interaction behavior features, and interaction user attribute features.
[0092] Optionally, the interactive user attribute features of each historical interaction feature information in the first historical interaction sequence and the second historical interaction sequence are the same.
[0093] Optionally, the predicted interaction feature information includes predicted interaction object attribute features, predicted interaction behavior features, and predicted interaction user attribute features.
[0094] The real interaction feature information includes real interaction object attribute features, real interaction behavior features, and real interaction user attribute features.
[0095] Optionally, the recommendation model includes a neural network encoder and a neural network decoder; the first prediction unit 501 is specifically used for:
[0096] The first historical interaction sequence in the first interactive training sample is input into the neural network encoder to obtain the encoded representation features corresponding to each historical interaction feature information in the first historical interaction sequence.
[0097] The encoded representation features corresponding to each of the historical interaction feature information in the first historical interaction sequence are input into the neural network decoder to obtain the first prediction decoding representation vector corresponding to the first historical interaction sequence.
[0098] For the (i-1)th predicted decoding representation vector, the encoded representation features corresponding to each of the historical interaction feature information in the first historical interaction sequence, as well as the first predicted decoding representation vector to the (i-1)th predicted decoding representation vector, are all input into the neural network decoder to obtain the i-th predicted decoding representation vector; where i is a positive integer greater than 1.
[0099] The i-th predicted decoding representation vector is input into the interactive object attribute feature classifier, the interactive behavior feature classifier, and the interactive user attribute feature classifier, respectively, to obtain the predicted interactive object attribute feature, the predicted interactive behavior feature, and the predicted interactive user attribute feature.
[0100] Optionally, the first adjustment unit 502 is used for:
[0101] The model parameters of the recommendation model are adjusted using the cross-entropy loss function, the predicted interaction feature information, and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample, to obtain the adjusted recommendation model.
[0102] Optionally, the predicted interaction result includes the predicted conversion result of the interaction object; the actual interaction result includes the actual conversion result of the interaction object.
[0103] Optionally, the second prediction unit 503 is used for:
[0104] The second historical interaction sequence in the second interaction training sample is input into the neural network encoder to obtain the encoded representation features corresponding to each historical interaction feature information in the second historical interaction sequence.
[0105] Input the encoded representation feature corresponding to the last historical interaction feature information in the second historical interaction sequence into the interaction behavior classifier to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample.
[0106] Optionally, the second adjustment unit 504 is used for:
[0107] The model parameters of the adjusted recommendation model are adjusted using the binary cross-entropy loss function, the predicted interaction results, and the real interaction results corresponding to the second historical interaction sequence in the second interaction training samples, to obtain the target recommendation model.
[0108] The beneficial effects of this disclosure compared to the prior art are as follows: This disclosure provides a training apparatus for a recommendation model, the apparatus comprising: a first prediction unit, configured to use a recommendation model to obtain predicted interaction feature information corresponding to a first historical interaction sequence in a first interaction training sample; wherein the first historical interaction sequence includes several historical interaction feature information; a first adjustment unit, configured to adjust the model parameters of the recommendation model according to the predicted interaction feature information and the real interaction feature information in the first interaction training sample corresponding to the first historical interaction sequence, to obtain an adjusted recommendation model; a second prediction unit, configured to use the adjusted recommendation model to obtain a predicted interaction result corresponding to a second historical interaction sequence in a second interaction training sample; wherein the second historical interaction sequence includes several historical interaction feature information; and a second adjustment unit, configured to adjust the model parameters of the adjusted recommendation model according to the predicted interaction result and the real interaction result in the second interaction training sample corresponding to the second historical interaction sequence, to obtain a target recommendation model. As can be seen, in this embodiment, the first historical interaction sequence in the first interaction training sample can be used first, allowing the recommendation model to be modeled based on the user interaction sequence (i.e., the first historical interaction sequence). This enables the recommendation model to extract rich and dynamic semantic representation information from the interaction sequence, thereby improving the recommendation accuracy. Then, the second historical interaction sequence in the second interaction training sample and the corresponding real interaction results can be used to optimize the recommendation model, thereby improving the accuracy of the recommendation model's evaluation of interaction results. In this way, the massive amount of user historical interaction sequences can be fully utilized to fully explore the potential semantic relationships between different historical interaction feature information, and the problem of a huge imbalance between positive and negative samples in the recommendation scenario can be avoided. This improves the training accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, thereby further improving the generalization performance of the recommendation model in sparse recommendation scenarios, and improving the accuracy of the recommendation model in predicting and evaluating recommendation objects and interaction results, ultimately improving the conversion rate of recommendation objects and user experience.
[0109] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.
[0110] Figure 6 This is a schematic diagram of the computer device 6 provided in an embodiment of this disclosure. Figure 6As shown, the computer device 6 in this embodiment includes a processor 601, a memory 602, and a computer program 603 stored in the memory 602 and executable on the processor 601. When the processor 601 executes the computer program 603, it implements the steps in the various method embodiments described above. Alternatively, when the processor 601 executes the computer program 603, it implements the functions of each module / module in the various device embodiments described above.
[0111] Exemplarily, computer program 603 may be divided into one or more modules, which are stored in memory 602 and executed by processor 601 to perform the present disclosure. The one or more modules may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of computer program 603 in computer device 6.
[0112] Computer device 6 can be a desktop computer, laptop, handheld computer, cloud server, or other similar computer device. Computer device 6 may include, but is not limited to, processor 601 and memory 602. Those skilled in the art will understand that... Figure 6 This is merely an example of computer device 6 and does not constitute a limitation on computer device 6. It may include more or fewer components than shown, or combine certain components, or different components. For example, computer device may also include input / output devices, network access devices, buses, etc.
[0113] The processor 601 can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0114] The memory 602 can be an internal storage module of the computer device 6, such as a hard disk or RAM of the computer device 6. The memory 602 can also be an external storage device of the computer device 6, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the computer device 6. Furthermore, the memory 602 can include both internal and external storage modules of the computer device 6. The memory 602 is used to store computer programs and other programs and data required by the computer device. The memory 602 can also be used to temporarily store data that has been output or will be output.
[0115] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described functional modules are used as examples. In practical applications, the functions described above can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. The functional modules in the embodiments can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules can be implemented in hardware or as software functional modules. Furthermore, the specific names of the functional modules are only for easy differentiation and are not intended to limit the scope of protection of this disclosure. The specific working process of the modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0116] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0117] Those skilled in the art will recognize that the modules and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this disclosure.
[0118] In the embodiments provided in this disclosure, it should be understood that the disclosed apparatus / computer devices and methods can be implemented in other ways. For example, the apparatus / computer device embodiments described above are merely illustrative. For instance, the division of modules or modules is only a logical functional division, and in actual implementation, there may be other division methods. Multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms.
[0119] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0120] Furthermore, the functional modules in the various embodiments of this disclosure can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0121] If an integrated module / module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in a computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in a jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0122] The above embodiments are only used to illustrate the technical solutions of this disclosure, and are not intended to limit it. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be included within the protection scope of this disclosure.
Claims
1. A method for training a recommendation model, characterized in that, The method includes: Using a recommendation model, predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample is obtained; wherein, the first historical interaction sequence includes several historical interaction feature information; the historical interaction feature information includes interaction object attribute features, historical interaction behavior features, and interaction user attribute features; Based on the predicted interaction feature information and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample, the model parameters of the recommendation model are adjusted to obtain the adjusted recommendation model; the predicted interaction feature information includes predicted interaction object attribute features, predicted interaction behavior features, and predicted interaction user attribute features; the real interaction feature information includes real interaction object attribute features, real interaction behavior features, and real interaction user attribute features. Using the adjusted recommendation model, the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample is obtained; wherein, the second historical interaction sequence includes several historical interaction feature information; Based on the predicted interaction results and the actual interaction results corresponding to the second historical interaction sequence in the second interaction training samples, the model parameters of the adjusted recommendation model are adjusted to obtain the target recommendation model; the predicted interaction results include the predicted conversion results of the interaction objects; the actual interaction results include the actual conversion results of the interaction objects.
2. The method according to claim 1, characterized in that, The interactive user attribute features of each historical interaction feature information in the first historical interaction sequence and the second historical interaction sequence are the same.
3. The method according to claim 1, characterized in that, The recommendation model includes a neural network encoder and a neural network decoder; the step of using the recommendation model to obtain the predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample includes: The first historical interaction sequence in the first interactive training sample is input into the neural network encoder to obtain the encoded representation features corresponding to each historical interaction feature information in the first historical interaction sequence. The encoded representation features corresponding to each of the historical interaction feature information in the first historical interaction sequence are input into the neural network decoder to obtain the first prediction decoding representation vector corresponding to the first historical interaction sequence. For the (i-1)th predicted decoding representation vector, the encoded representation features corresponding to each of the historical interaction feature information in the first historical interaction sequence, as well as the first predicted decoding representation vector to the (i-1)th predicted decoding representation vector, are all input into the neural network decoder to obtain the i-th predicted decoding representation vector; where i is a positive integer greater than 1. The i-th predicted decoding representation vector is input into the interactive object attribute feature classifier, the interactive behavior feature classifier, and the interactive user attribute feature classifier, respectively, to obtain the predicted interactive object attribute feature, the predicted interactive behavior feature, and the predicted interactive user attribute feature.
4. The method according to claim 1, characterized in that, The step of adjusting the model parameters of the recommendation model based on the predicted interaction feature information and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training samples to obtain the adjusted recommendation model includes: The model parameters of the recommendation model are adjusted using the cross-entropy loss function, the predicted interaction feature information, and the real interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample, to obtain the adjusted recommendation model.
5. The method according to claim 1, characterized in that, The recommendation model includes a neural network encoder; the step of using the adjusted recommendation model to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample includes: The second historical interaction sequence in the second interaction training sample is input into the neural network encoder to obtain the encoded representation features corresponding to each historical interaction feature information in the second historical interaction sequence. Input the encoded representation feature corresponding to the last historical interaction feature information in the second historical interaction sequence into the interaction behavior classifier to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample.
6. The method according to claim 1, characterized in that, The step of adjusting the model parameters of the adjusted recommendation model based on the predicted interaction results and the actual interaction results corresponding to the second historical interaction sequence in the second interaction training samples to obtain the target recommendation model includes: The model parameters of the adjusted recommendation model are adjusted using the binary cross-entropy loss function, the predicted interaction results, and the real interaction results corresponding to the second historical interaction sequence in the second interaction training samples, to obtain the target recommendation model.
7. A training device for a recommendation model, characterized in that, The device includes: The first prediction unit is used to obtain predicted interaction feature information corresponding to the first historical interaction sequence in the first interaction training sample using a recommendation model; wherein, the first historical interaction sequence includes several historical interaction feature information; the historical interaction feature information includes interaction object attribute features, historical interaction behavior features, and interaction user attribute features. The first adjustment unit is used to adjust the model parameters of the recommendation model based on the predicted interaction feature information and the real interaction feature information in the first interaction training sample corresponding to the first historical interaction sequence, to obtain the adjusted recommendation model; the predicted interaction feature information includes predicted interaction object attribute features, predicted interaction behavior features, and predicted interaction user attribute features; the real interaction feature information includes real interaction object attribute features, real interaction behavior features, and real interaction user attribute features. The second prediction unit is used to obtain the predicted interaction result corresponding to the second historical interaction sequence in the second interaction training sample using the adjusted recommendation model; wherein the second historical interaction sequence includes several historical interaction feature information. The second adjustment unit is used to adjust the model parameters of the adjusted recommendation model based on the predicted interaction results and the actual interaction results in the second interaction training samples corresponding to the second historical interaction sequence, to obtain the target recommendation model; the predicted interaction results include the predicted conversion results of the interaction objects; the actual interaction results include the actual conversion results of the interaction objects.
8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Project recommendation model processing method and device, computer equipment and storage medium
CN110765353A
Training method and device for multi-target recommendation model based on artificial intelligence
CN111090756A