Model training method, recommendation data click rate prediction method and electronic equipment

Through the cross-domain model training method, the data sparse problem in the recommendation system is solved, and the accuracy of click-through rate prediction and recommendation effect are improved.

CN119089042APending Publication Date: 2024-12-06ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411140267.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-19
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

Due to sparse data problems, the existing recommendation system cannot effectively characterize user preferences, resulting in poor accuracy in click-through rate prediction, which in turn affects the recommendation effect.

Method used

Using cross-domain model training method, through the joint training of student models and teacher models, separate domain-sharing representation vectors and domain-unique representation vectors, and using cross-entropy loss and distillation technology to realize cross-domain knowledge transfer and self-supervised information utilization to alleviate data Sparse problem.

Benefits of technology

It improves the accuracy of click-through rate prediction of recommended data, improves the recommendation effect of the recommendation system, and achieves richer user and data characterization through the combination of domain shared representation vectors and domain unique representation vectors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119089042A_ABST
    Figure CN119089042A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a model training method, a recommendation data click rate prediction method and electronic equipment, and the method comprises the steps: obtaining target domain sample data and a tag value of a click rate corresponding to the target sample data; firstly, a domain sharing representation vector and a domain unique representation vector are obtained through a first representation decoupling model and a second representation decoupling model in a student model and a domain classifier in a teacher model of which parameter adjustment has been completed, and then, according to the domain sharing representation vector and the domain unique representation vector, the domain sharing representation vector and the domain unique representation vector are obtained. A first predicted value of the click rate corresponding to the target domain sample data is obtained through a click rate prediction model in the student model, and finally, the parameters of the click rate prediction model, the first representation decoupling model and the second representation decoupling model are adjusted with the purpose of minimizing the loss function of the student model, the loss function of the student model comprises a cross entropy between the tag value of the click rate corresponding to the target domain sample data and the first predicted value.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The embodiments of this specification relate to the field of Internet technology, and in particular to a model training method, a method for predicting click-through rate of recommended data, and an electronic device. [Background technology]

[0002] The rapid development of the Internet and information technology has provided convenience to people, but has also generated massive amounts of data. The most direct way for users to quickly extract the information they are interested in from massive amounts of data is through search engines and recommendation systems.

[0003] Existing recommendation systems generally have data sparsity problems, which makes it difficult for recommendation systems to describe user preferences well and poorly predict user click-through rates, resulting in poor recommendation effects. Data sparsity refers to the small number of values ​​of certain features in a data set or the missing labels of certain samples. Therefore, it is necessary to provide a solution to alleviate the data sparsity problem of recommendation systems and to more fully describe users and recommended data in target scenarios. [Summary of the invention]

[0004] The embodiments of this specification provide a model training method, a method for predicting the click-through rate of recommended data, and an electronic device to alleviate the data sparsity problem of the recommendation system, enrich the characterization of users and data to be recommended in the target scenario, improve the click-through rate of the data to be recommended, and thereby improve the recommendation effect of the recommendation system.

[0005] In a first aspect, an embodiment of the present specification provides a model training method, comprising: obtaining target domain sample data and a label value of a click-through rate corresponding to the target sample data; encoding the target domain sample data into a first representation vector through a first representation decoupling model in a student model, and scoring the first representation vector through a domain classifier in a teacher model that has completed parameter adjustment, so that the first representation vector is learned as a domain shared representation vector; and encoding the target domain sample data into a second representation vector through a second representation decoupling model in the student model, and scoring the second representation vector through the domain classifier, so that the second representation vector is learned as a domain unique representation vector; obtaining a first predicted value of a click-through rate corresponding to the target domain sample data through a click-through rate prediction model in the student model based on the domain shared representation vector and the domain unique representation vector; adjusting the parameters of the click-through rate prediction model, the first representation decoupling model, and the second representation decoupling model with the purpose of minimizing the loss function of the student model; wherein the loss function of the student model includes the cross entropy between the label value of the click-through rate corresponding to the target domain sample data and the first predicted value.

[0006] In the above-mentioned model training method, after obtaining the target domain sample data and the label value of the click-through rate corresponding to the above-mentioned target sample data, the domain shared representation vector and the domain unique representation vector are obtained respectively through the first representation decoupling model and the second representation decoupling model in the student model, and the domain classifier in the teacher model whose parameters have been adjusted. Then, based on the above-mentioned domain shared representation vector and the above-mentioned domain unique representation vector, the first predicted value of the click-through rate corresponding to the above-mentioned target domain sample data is obtained through the click-through rate prediction model in the student model. Finally, with the purpose of minimizing the loss function of the above-mentioned student model, the parameters of the above-mentioned click-through rate prediction model, the first representation decoupling model and the second representation decoupling model are adjusted, wherein the loss function of the above-mentioned student model includes the cross entropy between the label value of the click-through rate corresponding to the target domain sample data and the first predicted value. Thereby, it is possible to decouple the domain-shared representation vector from the domain-unique representation vector and utilize them separately. Since the domain-shared representation vector is a representation vector suitable for migration, the above method can realize cross-domain knowledge migration, and the domain-unique representation vector contains the proprietary knowledge of the target domain, so the self-supervision information therein can be utilized to alleviate the data sparsity problem of the target domain. In this way, the first representation decoupling model, the second representation decoupling model and the click-through rate prediction model obtained by training using the above-mentioned domain-shared representation vector and the domain-unique representation vector can enrich the characterization of the users and the data to be recommended in the target scenario, thereby improving the prediction accuracy of the above-mentioned models on the click-through rate of the data to be recommended, and improving the recommendation effect of the recommendation system.

[0007] In one possible implementation, the scoring of the first representation vector by the domain classifier in the teacher model whose parameters have been adjusted so that the first representation vector is learned as a domain shared representation vector includes: adjusting the parameters of the first representation decoupling model so that the first representation vector is learned as a domain shared representation vector with the purpose of minimizing the cross entropy between the score of the first representation vector by the domain classifier and a first predetermined distribution.

[0008] In one possible implementation, scoring the second representation vector by the domain classifier so that the second representation vector is learned as a domain-unique representation vector includes: adjusting the parameters of the second representation decoupling model so that the second representation vector is learned as a domain-unique representation vector with the purpose of minimizing the cross entropy between the score of the second representation vector by the domain classifier and a second predetermined distribution.

[0009] In one possible implementation, after obtaining the target domain sample data, it also includes: encoding the target domain sample data into a third representation vector through an encoder in the teacher model; and adjusting the parameters of the first representation decoupling model with the purpose of minimizing the distance between the third representation vector and the domain shared representation vector.

[0010] In one possible implementation manner, before adjusting the parameters of the first representation decoupling model for the purpose of minimizing the distance between the third representation vector and the domain shared representation vector, the method further includes: scoring the target domain sample data by the domain classifier; determining the weight of the target domain sample data according to the score of the target domain sample data; and weighting the distance between the third representation vector and the domain shared representation vector by the weight of the target domain sample data.

[0011] In one possible implementation, adjusting the parameters of the first representation decoupling model with the purpose of minimizing the distance between the third representation vector and the domain shared representation vector includes: adjusting the parameters of the first representation decoupling model with the purpose of minimizing the weighted distance; wherein the distance is the distance between the third representation vector and the domain shared representation vector.

[0012] In one possible implementation, after obtaining the target domain sample data, it also includes: converting the target domain sample data into a fourth representation vector through the embedding layer in the second representation decoupling model; performing a random perturbation operation on the fourth representation vector to obtain a fifth representation vector and a sixth representation vector; encoding the fifth representation vector and the sixth representation vector respectively through the encoder in the second representation decoupling model to obtain a seventh representation vector and an eighth representation vector; adjusting the parameters of the encoder in the second representation decoupling model with the purpose of maximizing the similarity between the seventh representation vector and the eighth representation vector.

[0013] In one possible implementation, after the target domain sample data is encoded into a third representation vector by the encoder in the teacher model, it also includes: according to the third representation vector, obtaining a second prediction value of the click-through rate corresponding to the target domain sample data by the prediction model in the teacher model; the loss function of the student model also includes: a difference weighted by the weight of the target domain sample data, wherein the difference is the difference between the first prediction value and the second prediction value.

[0014] In one possible implementation, before the domain classifier in the teacher model that has completed parameter adjustment scores the first representation vector, it also includes: obtaining multi-domain sample data, label values ​​of click-through rates corresponding to the multi-domain sample data, and label values ​​of the domains to which the multi-domain sample data belongs; wherein the multi-domain sample data includes source domain sample data and target domain sample data; converting the multi-domain sample data into a ninth representation vector through an embedding layer in the teacher model; encoding the ninth representation vector into a tenth representation vector through an encoder in the teacher model; and predicting the multi-domain sample data against the target domain through the prediction model in the teacher model according to the tenth representation vector. The predicted value of the corresponding click-through rate; and converting the tenth representation vector into an eleventh representation vector through the gradient back propagation layer in the teacher model, classifying the eleventh representation vector through the domain classifier in the teacher model, and obtaining the predicted value of the domain to which the multi-domain sample data belongs; with the purpose of minimizing the loss function of the teacher model, adjusting the parameters of the encoder, the gradient back propagation layer, the domain classifier and the prediction model in the teacher model; wherein the loss function of the teacher model is the cross entropy between the label value and the predicted value of the click-through rate corresponding to the multi-domain sample data, and the sum of the cross entropy between the label value and the predicted value of the domain to which the multi-domain sample data belongs.

[0015] In a second aspect, an embodiment of the present specification provides a method for predicting the click-through rate of recommended data, comprising: obtaining data to be recommended in a target domain; converting the data to be recommended into a domain-shared representation vector through a first representation decoupling model; and converting the data to be recommended into a domain-unique representation vector through a second representation decoupling model; wherein the first representation decoupling model and the second representation decoupling model have completed parameter adjustment according to the method provided in the first aspect; obtaining the click-through rate corresponding to the data to be recommended through a click-through rate prediction model based on the domain-shared representation vector and the domain-unique representation vector; wherein the click-through rate prediction model has completed parameter adjustment according to the method provided in the first aspect.

[0016] In the above-mentioned method for predicting the click rate of recommended data, the first representation decoupling model, the second representation decoupling model and the click rate prediction model can richly characterize the users and the data to be recommended in the target scenario, thereby improving the prediction accuracy of the click rate of the data to be recommended and enhancing the recommendation effect of the recommendation system.

[0017] In a third aspect, an embodiment of the present specification provides an electronic device, comprising: at least one processor; and at least one memory communicatively connected to the processor, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the method provided in the first aspect or the second aspect.

[0018] In a fourth aspect, an embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions enable the computer to execute the method provided in the first aspect or the second aspect.

[0019] It should be understood that the third to fourth aspects of the embodiments of this specification are consistent with the technical solutions of the first or second aspects of the embodiments of this specification, and the beneficial effects achieved by each aspect and the corresponding feasible implementation methods are similar and will not be repeated.

Brief Description of the Drawings

[0020] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0021] Figure 1 An architectural diagram of a cross-domain recommendation model provided for one embodiment of this specification;

[0022] Figure 2 A schematic diagram of the structure of a student model provided in one embodiment of this specification;

[0023] Figure 3 A flowchart of a model training method provided for one embodiment of this specification;

[0024] Figure 4 A schematic diagram of a decoupling model provided for one embodiment of this specification;

[0025] Figure 5 A flowchart of a model training method provided in another embodiment of this specification;

[0026] Figure 6 A schematic diagram of a cross-domain shared representation vector distillation model provided for one embodiment of this specification;

[0027] Figure 7 A flowchart of a model training method provided in yet another embodiment of this specification;

[0028] Figure 8 A schematic diagram of a domain-specific representation comparison model provided for one embodiment of this specification;

[0029] Fig. 9 A flowchart of a model training method provided in yet another embodiment of this specification;

[0030] Fig.10 A schematic diagram of the structure of a teacher model provided for one embodiment of this specification;

[0031] Fig.11 A flowchart of a method for predicting click-through rate of recommended data provided by one embodiment of this specification;

[0032] Fig.12 A schematic diagram of the structure of a model deployed on a server provided in one embodiment of this specification;

[0033] Fig.13 A schematic diagram of the structure of an electronic device provided in one embodiment of this specification. [Specific implementation method]

[0034] In order to better understand the technical solution of this specification, the embodiments of this specification are described in detail below with reference to the accompanying drawings.

[0035] It should be clear that the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.

[0036] The terms used in the embodiments of this specification are only for the purpose of describing specific embodiments, and are not intended to limit this specification. The singular forms "a", "said" and "the" used in the embodiments of this specification and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings.

[0037] To address the data sparsity problem that is common in recommendation systems, existing technologies provide the following solutions:

[0038] Solution 1: Use a deep neutral networks (DNN) model, which only uses source domain data for training, and does not use target domain data;

[0039] Solution 2: Pretrain & Finetune: This solution is a simple cross-domain learning solution. In simple terms, this solution first pretrains a basic model in the source domain, and then fine-tunes the pre-trained basic model in the target domain. However, this solution does not consider how to better transfer the source domain knowledge.

[0040] Solution 3: The most advanced (state of the art, SOTA) method Star (STAR): This solution uses a star topology design to model different domains in the recommendation system. However, this solution is only a general cross-domain knowledge learning and does not work well in a single domain.

[0041] Solution 4: SOTA method collaborative cross-domain transfer learning framework (CCTL): This solution evaluates the information gain of the source domain to the target domain and adjusts the information transfer weight of each source domain sample. However, this solution lacks cross-domain network migration knowledge.

[0042] Solution 5: disentangled conditional drug representation learning (DisenCDR): This solution uses two regularizers based on mutual information to distinguish domain-shared information from domain-specific information. However, this solution lacks domain-shared knowledge and domain-specific knowledge.

[0043] Based on the above problems, considering that the recommendation platform usually contains many different recommendation scenarios to meet the different preferences of users, the user's knowledge in other recommendation scenarios can be transferred to the target data sparse scenario. Therefore, the embodiment of this specification proposes a new cross-domain recommendation model based on decoupling to alleviate the data sparsity problem. First, a teacher model with a gradient backpropagation layer and a domain classifier is trained; then, a student model of the target domain is created, and the trained domain classifier is used to separate the domain shared representation vector from the domain unique representation vector, and the teacher model is used to guide the learning of the domain shared representation vector; finally, the learning of the domain unique representation vector is enhanced through contrastive learning, and the data sparsity problem of the target domain is further alleviated.

[0044] Figure 1 This is an architecture diagram of a cross-domain recommendation model provided in one embodiment of this specification, such as Figure 1 As shown, the cross-domain recommendation model provided by the embodiment of this specification absorbs the advantages of the hybrid training mode and the pre-training fine-tuning mode, and the overall architecture adopts a two-stage cross-domain distillation architecture.

[0045] First, a teacher model is trained with multi-domain mixed data to learn domain shared knowledge; wherein the teacher model is a cross-domain teacher model, and the above-mentioned teacher model refers to a teacher model used to train the student model, which usually adopts a deeper network structure and more training data; the above-mentioned multi-domain mixed data may include data involving multiple different fields, for example: images, texts and / or voices involving multiple different fields, etc.

[0046] Afterwards, the teacher model is used to guide the learning of the student model in the target domain in a distillation manner; distillation is a model compression technique that reduces the model size and computational complexity by converting the output of a large model into the output of a smaller model. The student model is a student model of a single domain (i.e., the target domain). The student model refers to a model that learns under the guidance of the teacher model, and usually adopts a shallower network structure and less training data.

[0047] In this embodiment, when training the student model, the problem of negative knowledge transfer can be alleviated by selecting appropriate transfer knowledge in the feature dimension through feature decoupling. The above feature decoupling refers to processing different features in the model independently to better extract and represent the intrinsic structure of the data; knowledge transfer refers to the knowledge learned from one field or task can be applied to another field or task.

[0048] Figure 2 A schematic diagram of the structure of a student model provided in one embodiment of this specification, Figure 2 The student model shown is Figure 1 The detailed structural diagram of the student model in the model architecture shown in Figure 2 As shown, the student model may include a representation decoupling module 22 , a cross-domain shared representation distillation module 24 , and a domain-specific representation comparison module 26 .

[0049] Specifically, the target domain sample data first passes through the representation decoupling module 22 to obtain the domain shared representation vector and the domain unique representation vector respectively; for the domain shared representation vector, the knowledge can be transferred from the teacher model to the student model in the cross-domain shared representation distillation module 24; for the domain unique representation vector, contrastive learning can be used in the intra-domain unique representation comparison module 26 to alleviate the data sparsity problem.

[0050] Combine the following Figure 2 The model architecture shown specifically explains the model training method provided in the embodiments of this specification.

[0051] Figure 3 This is a flow chart of a model training method provided by an embodiment of this specification. The model training method provided by this embodiment can be executed by a server, and the server can be a server with a model training function. Figure 3 As shown, the above model training method may include:

[0052] Step 302: Obtain the target domain sample data and the label value of the click rate corresponding to the above target sample data.

[0053] Step 304: encode the target domain sample data into a first representation vector through the first representation decoupling model in the student model, and score the first representation vector through the domain classifier 28 in the teacher model that has completed parameter adjustment, so that the first representation vector is learned as a domain shared representation vector; and encode the target domain sample data into a second representation vector through the second representation decoupling model in the student model, and score the second representation vector through the domain classifier 28, so that the second representation vector is learned as a domain unique representation vector.

[0054] Among them, the model structure involved in this step can be as follows Figure 4 As shown, Figure 4 A schematic diagram of a decoupling model provided for one embodiment of this specification, from Figure 4 and Figure 2 It can be seen that Figure 4 The model structure shown is Figure 2 Part of the student model shown. Figure 4 The first representation decoupling model may include a first embedding layer 222 and a first subnet 224, and the first representation vector may be a representation vector obtained by encoding the first subnet 224; the second representation decoupling model may include a second embedding layer 226 and a second subnet 228, and the second representation vector may be a representation vector obtained by encoding the second subnet 228. The first embedding layer 222, the first subnet 224, the second embedding layer 226 and the second subnet 228 constitute the representation decoupling module 22.

[0055] Specifically, the first characterization vector is scored by the domain classifier 28 in the teacher model that has completed parameter adjustment, so that the first characterization vector is learned as a domain shared characterization vector. The parameters of the first characterization decoupling model are adjusted for the purpose of minimizing the cross entropy between the score of the first characterization vector by the domain classifier 28 and the first predetermined distribution, so that the first characterization vector is learned as a domain shared characterization vector. The value of the first predetermined distribution can be set by itself during the specific implementation. This embodiment does not limit the value of the first predetermined distribution. For example, the first predetermined distribution can be [0.5, 0.5]. The training process of the teacher model can be found below. Fig. 9 and Fig.10 The description of the illustrated embodiment will not be repeated here.

[0056] Scoring the second characterization vector by the domain classifier 28 so that the second characterization vector is learned as a domain-specific characterization vector may be as follows: for the purpose of minimizing the cross entropy between the score of the second characterization vector by the domain classifier 28 and the second predetermined distribution, the parameters of the second characterization decoupling model are adjusted so that the second characterization vector is learned as a domain-specific characterization vector. The value of the second predetermined distribution may be set by the user in a specific implementation. This embodiment does not limit the value of the second predetermined distribution. For example, the second predetermined distribution may be [0, 1].

[0057] That is, the representation decoupling module 22 uses the first representation decoupling model and the second representation decoupling model to separate the domain-shared representation vector from the domain-specific representation vector, and uses the domain classifier 28 to guide the separation of the two.

[0058] Domain transfer has always been a core challenge in the field of transfer learning, because there are features that are suitable for transfer and features that are not suitable for transfer between different data domains. If the data domains are aligned indiscriminately, the performance of the target domain may be affected. For each sample, they may contain domain-shared representation vectors (domain-share embedding) that are suitable for transfer and domain-specific representation vectors (domain-specific embedding) that belong to the current domain. If the domain-specific information of the source domain is mistakenly transferred to the target domain, the performance of the target domain may be reduced.

[0059] In the target domain, the student model ( Figure 2 In the training process of the student model (shown in Figure 2), if we only rely on domain shared information, we may ignore domain-specific features, which will affect the performance of the student model. Therefore, it is necessary to decouple domain shared information from domain-specific information and use them separately.

[0060] In the process of achieving decoupling, this embodiment can use two independent Embedding layers and two subnets to encode the target domain sample features, as shown in Formula (1) and Formula (2), respectively, and then extract the domain shared representation vector and the domain unique representation vector respectively.

[0061] E share =MLP share (V share ) (1)

[0062] E specific =MLP specific (V specific ) (2)

[0063] In formula (1), V shareis the representation vector obtained by the first embedding layer 222 transforming the target domain sample data, MLP (˙) refers to multilayer perceptron, E share The first sub-network 224 encodes the representation vector obtained by converting the first embedding layer 222 to obtain the first representation vector.

[0064] In formula (2), V specific is the representation vector obtained by the second embedding layer 226 from transforming the target domain sample data, E specific The second sub-network 228 encodes the representation vector obtained by converting the second embedding layer 226 to obtain a second representation vector.

[0065] In addition, in order to ensure that the decoupled representation meets the target, this embodiment further utilizes the domain classifier 28 in the teacher model. The encoded first representation vector and the second representation vector are scored by the domain classifier to determine the discrimination of the representation vector. The closer the score of the representation vector is to a uniform distribution, the more the representation vector tends to be a domain-shared representation vector; and the more the score tends to be a unipolar distribution, the more the representation vector tends to be a domain-unique representation vector. Therefore, by making the output distribution of the first representation vector after passing through the domain classifier 28 close to [0.5, 0.5], and the output distribution of the second representation vector close to [0, 1], the first representation vector can be learned as a domain-shared representation vector, and the second representation vector can be learned as a domain-unique representation vector, thereby promoting the decoupling of the two representation vectors.

[0066] The decoupled loss of the domain classifier 28 can be formalized as:

[0067]

[0068] In formula (3), L disen is the disentangle loss of the domain classifier 28, is the domain classifier 28, is the score of the first representation vector by the domain classifier 28, is the score of the second representation vector by the domain classifier 28, is the cross entropy between the score of the first representation vector by the domain classifier 28 and the first predetermined distribution, is the cross entropy between the score of the second representation vector by the domain classifier 28 and the second predetermined distribution.

[0069] Step 306: According to the domain-shared representation vector and the domain-specific representation vector, a first predicted value of the click rate corresponding to the target domain sample data is obtained through the click rate prediction model 210 in the student model.

[0070] Step 308, with the purpose of minimizing the loss function of the student model, adjust the parameters of the click rate prediction model 210, the first representation decoupling model and the second representation decoupling model; wherein the loss function of the student model includes the cross entropy between the label value of the click rate corresponding to the target domain sample data and the first prediction value.

[0071] In the above-mentioned model training method, after obtaining the target domain sample data and the label value of the click-through rate corresponding to the above-mentioned target sample data, the domain shared representation vector and the domain unique representation vector are obtained respectively through the first representation decoupling model and the second representation decoupling model in the student model, and the domain classifier 28 in the teacher model whose parameters have been adjusted. Then, based on the above-mentioned domain shared representation vector and the above-mentioned domain unique representation vector, the first predicted value of the click-through rate corresponding to the above-mentioned target domain sample data is obtained through the click-through rate prediction model 210 in the student model. Finally, with the purpose of minimizing the loss function of the above-mentioned student model, the parameters of the above-mentioned click-through rate prediction model 210, the first representation decoupling model and the second representation decoupling model are adjusted, wherein the loss function of the above-mentioned student model includes the cross entropy between the label value of the click-through rate corresponding to the target domain sample data and the first predicted value. Thereby, it is possible to decouple the domain-shared representation vector from the domain-unique representation vector and utilize them separately. Since the domain-shared representation vector is a representation vector suitable for migration, the above method can realize cross-domain knowledge migration, and the domain-unique representation vector contains the proprietary knowledge of the target domain, so the self-supervision information therein can be utilized to alleviate the data sparsity problem of the target domain. In this way, the first representation decoupling model, the second representation decoupling model and the click-through rate prediction model obtained by training using the above-mentioned domain-shared representation vector and the domain-unique representation vector can enrich the characterization of the users and the data to be recommended in the target scenario, thereby improving the prediction accuracy of the above-mentioned models on the click-through rate of the data to be recommended, and improving the recommendation effect of the recommendation system.

[0072] Figure 5 This is a flowchart of a model training method provided in another embodiment of this specification. The model structure involved in this embodiment can be as follows Figure 6 As shown, Figure 6 A schematic diagram of a cross-domain shared representation vector distillation model provided in one embodiment of this specification, from Figure 6 and Figure 2 It can be seen that Figure 6 for Figure 2 Part of the student model shown.

[0073] like Figure 5 As shown in this manual Figure 3 In the illustrated embodiment, after step 302, the following may also be included:

[0074] Step 502, encode the target domain sample data into a third representation vector through the encoder 242 in the above-mentioned teacher model.

[0075] Among them, since adversarial learning is adopted when training the teacher model, the teacher model can preferentially extract common information between different domains. Therefore, the third representation vector is the domain shared representation vector obtained by the teacher model. The training process of the teacher model can be seen below Fig. 9 and Fig.10 The description of the illustrated embodiment will not be repeated here.

[0076] Step 504 : adjusting the parameters of the first representation decoupling model with the purpose of minimizing the distance between the third representation vector and the domain shared representation vector.

[0077] As described above, the first representation decoupling model includes the first embedding layer 222 and the first sub-network 224 .

[0078] In this embodiment, before step 504, the target domain sample data may be scored by the domain classifier 28, and the weight of the third representation vector may be determined according to the score of the target domain sample data; and the third representation vector may be weighted by the weight of the third representation vector. In this way, step 404 may be: adjusting the parameters of the first representation decoupling model with the purpose of minimizing the distance between the weighted third representation vector and the domain shared representation vector.

[0079] Specifically, in Figure 3 In the illustrated embodiment, the representation decoupling module 22 has distinguished the domain-shared representation vector from the domain-unique representation vector. For the domain-shared representation vector, considering that it is suitable for realizing cross-domain knowledge transfer, the target domain sample data can be encoded into a third representation vector (i.e., the domain-shared representation vector obtained by the teacher model) through the encoder 242 in the teacher model, and then the knowledge distillation technology is applied to transfer the domain-shared knowledge in the teacher model to the student model to realize knowledge transfer.

[0080] When performing distillation, this embodiment focuses on the interaction between the third representation vector (i.e., the domain-shared representation vector obtained by the teacher model) and the domain-shared representation vector obtained by the student model. Given that the representation layer of the neural network contains rich information, this embodiment adopts a method of implementing feature distillation on the representation layer, which is a common practice in the field of knowledge distillation. The process of feature distillation can be formally expressed as:

[0081] L feat =L KD (Softmax(E t ), Softmax(E share )) (4)

[0082] In formula (4), E t and E share They represent the third representation vector and the domain shared representation vector respectively, and Softmax(˙) represents the normalization operation. KD For E t With E share The distance between them is measured by E t With E share The similarity between KD The smaller it is, the more E t With E share The higher the similarity between them, in specific implementation, KL divergence can be used as the similarity metric, where KL is the abbreviation of Kullback-Leibler.

[0083] In addition, in order to eliminate the possibility of negative transfer, the domain classifier 28 in the teacher model can be further used to assign weights to the sample granularity. The output results of the current target domain sample data in the domain classifier 28 are converted and used as the weight to adjust the feature distillation loss. Considering that samples that are difficult for the domain classifier 28 to distinguish are often more inter-domain universal in the feature space and more suitable for knowledge transfer (the score of the domain classifier 28 is around 0.5), a higher weight is given to sample data that is difficult for the domain classifier 28 to distinguish; conversely, a smaller weight is given to sample data that is easier for the domain classifier 28 to distinguish (the score of the domain classifier 28 is close to 0 or 1). Based on this, a quadratic curve about the score of the domain classifier 28 can be designed to weight the distance between the third representation vector and the domain shared representation vector. The weight calculation formula can be shown as formula (5).

[0084] w i =(4–2×b)×min(p0,p1) 2 +b×min(p0,p1) (5)

[0085] In formula (5), b is an adjustable weight parameter, p0 and p1 are the probabilities that the domain classifier 28 predicts the target domain sample data to be the source domain and the target domain, respectively, and min(p0, p1) can be regarded as the score of the target domain sample data by the domain classifier 28. With this method, the learning process of the student model can be optimized so that it can absorb useful knowledge while avoiding the impact of negative transfer. After increasing the weight of the distillation loss, the feature distillation loss can be shown as formula (6).

[0086] L feat =E x~(Dtgt) [w x L KD (Softmax(E t,x ), Softmax(Eshare,x ))] (6)

[0087] In formula (6), L feat is the feature-distill loss, E t,x and E share,x They represent the third representation vector and the domain shared representation vector respectively, and Softmax(˙) represents the normalization operation. KD For E t,x With E share,x The distance between x is the weight corresponding to the sample data in the target domain.

[0088] In this embodiment, the teacher model guides the student model to learn the domain shared representation vector in a distillation manner, and transfers the domain shared knowledge in the teacher model to the student model, thereby realizing the transfer of cross-domain knowledge.

[0089] Figure 7 This is a flowchart of a model training method provided in another embodiment of this specification. The model structure involved in this embodiment can be as follows Figure 8 As shown, Figure 8 A schematic diagram of a domain-specific representation comparison model provided for one embodiment of this specification, from Figure 8 and Figure 2 It can be seen that Figure 8 for Figure 2 Part of the student model shown.

[0090] like Figure 7 As shown in this manual Figure 3 In the illustrated embodiment, after step 302, the following may also be included:

[0091] Step 702: convert the target domain sample data into a fourth representation vector through the embedding layer 226 in the second representation decoupling model.

[0092] Step 704: Perform a random perturbation (dropout) operation on the fourth characterization vector to obtain a fifth characterization vector and a sixth characterization vector.

[0093] See also Figure 8 , the fifth characterization vector may be a domain-unique characterization vector A, and the sixth characterization vector may be a domain-unique characterization vector B.

[0094] Step 706 : Encode the fifth representation vector and the sixth representation vector respectively through the encoder 228 in the second representation decoupling model to obtain a seventh representation vector and an eighth representation vector.

[0095] Specifically, see Figure 8, the fifth characterization vector can be encoded by encoder 262 to obtain a seventh characterization vector, and the seventh characterization vector is a domain-specific output characterization vector A; the sixth characterization vector can be encoded by encoder 264 to obtain an eighth characterization vector, and the eighth characterization vector is a domain-specific output characterization vector B.

[0096] In this embodiment, the parameters of encoder 262 and encoder 264 are the same as those of encoder 228 in the second representation decoupling model, that is, encoder 262 and encoder 264 can be regarded as the same encoders as encoder 228 in the second representation decoupling model.

[0097] Step 708 , adjusting the parameters of the encoder 228 in the second representation decoupling model with the goal of maximizing the similarity between the seventh representation vector and the eighth representation vector.

[0098] It should be noted that in the specific implementation process of adjusting the parameters of the encoder 228 in the second representation decoupling model, for the seventh representation vector and the eighth representation vector obtained from the same sample data, the similarity between the two should be maximized; but for the two seventh representation vectors, or the two eighth representation vectors, or the seventh representation vector and the eighth representation vector obtained from different sample data, the similarity between the two should be minimized.

[0099] For example, assuming that the seventh characterization vector and the eighth characterization vector generated by the first target domain sample data according to steps 702 to 706 are characterization vector A1 and characterization vector B1 respectively; the seventh characterization vector and the eighth characterization vector generated by the second target domain sample data according to steps 702 to 706 are characterization vector A2 and characterization vector B2 respectively. Then, in the specific implementation process of adjusting the parameters of the encoder 228 in the second characterization decoupling model in step 708, it is necessary to maximize the similarity between A1 and B1, and maximize the similarity between A2 and B2, and minimize the similarity between A1 and A2, A1 and B2, B1 and A2, and B1 and B2.

[0100] The domain-specific embedding contains the proprietary knowledge of the target domain, so the self-supervisory information in the domain-specific embedding can be used to solve the sparsity problem of the target domain data and achieve a more balanced domain-specific representation. To this end, this embodiment uses contrastive learning to optimize the learning of domain-specific representation vectors. Specifically, after the target domain sample data passes through the embedding layer 226 in the second representation decoupling model, the fourth representation vector obtained can be subjected to two random perturbations (dropout) and then the representation vector obtained by the perturbation is passed through encoder 262 and encoder 264 to create two enhanced representation vectors, as shown in equations (7) and (8).

[0101] z′ x =MLP specific (dropout(v x )) (7)

[0102] z′ x ′=MLP specific (dropout(v x )) (8)

[0103] In formula (7) and formula (8), v x is the fourth representation vector, and the dropout (v x ) can be regarded as the fifth characterization vector obtained after performing a random perturbation operation on the fourth characterization vector, so z′ x can be the seventh representation vector; the dropout (v x ) can be regarded as the sixth characterization vector obtained after performing a random perturbation operation on the fourth characterization vector, so z′ x ′ may be the eighth characterization vector.

[0104] For the above two enhanced representation vectors, the information noise-contrastive estimation (INFONCE) loss can be used to construct the contrastive loss. The contrastive loss function can be shown as formula (9).

[0105]

[0106] In formula (9), B represents the samples in the same batch as x.

[0107] The loss function shown in formula (9) can bring similar samples closer and push dissimilar samples farther away, thereby obtaining a more robust domain-specific representation vector. This embodiment enables the student model to better capture and utilize the unique representation vector of the target domain, thereby improving the overall performance of the student model.

[0108] The loss function of the student model is explained below.

[0109] like Figure 3 As described in step 306 of the illustrated embodiment, a first prediction value of the click rate corresponding to the target domain sample data can be obtained through the click rate prediction model 210 based on the domain shared representation vector and the domain unique representation vector obtained by decoupling. The first prediction value can be shown as formula (10).

[0110]

[0111] In formula (10), sx is the first predicted value, represents the click rate prediction model 210 in the student model. The cross entropy between the label value of the click rate corresponding to the target domain sample data and the first prediction value can be calculated to construct the main loss function of the click rate prediction model 210, as shown in formula (11).

[0112]

[0113] In formula (11), y x is the label value of the click rate corresponding to the target domain sample data.

[0114] Also, see Figure 2 , in this manual Figure 5 In the illustrated embodiment, after step 502, a second prediction value of the click-through rate corresponding to the target domain sample data can also be obtained through the prediction model in the teacher model based on the third characterization vector; in this way, the loss function of the student model can also include: a difference weighted by the weight of the target domain sample data, and the difference is the difference between the first prediction value and the second prediction value.

[0115] That is to say, in order to further improve the performance of the student model, the classic logits distillation method can also be added to the student model, and the logits output by the teacher model (i.e., the second prediction value mentioned above) can be used to guide the training of the student model. Similarly, the weight w that identifies whether the sample is suitable for migration can also be added. x Applied to the logits distillation loss, the distillation loss can be expressed as formula (12).

[0116]

[0117] In formula (12), L logits is the distillation loss, is the second predicted value mentioned above, is the difference between the first predicted value and the second predicted value, w x is the weight of the target domain sample data, It is the difference weighted by the weights of the above target domain sample data.

[0118] Combining the loss functions mentioned in the above embodiments constitutes the final loss of the student model. That is, the loss function of the student model can be shown as formula (13).

[0119] L=L main +α1L feat +α2L logits +α3L contrast +α4L disen (13)

[0120] In formula (3), L is the loss function of the student model, and α1, α2, α3, and α4 are the weight parameters of the four additional loss functions.

[0121] In this embodiment, Figure 2 The loss functions involved in the training process of the student model shown in the figure are combined to improve the performance of the student model obtained through training, so that the student model obtained through training can richly characterize the users and the data to be recommended in the target scenario, thereby improving the student model's prediction accuracy for the click rate of the recommended data and improving the recommendation effect of the recommendation system.

[0122] Fig. 9 This is a flowchart of a model training method provided in another embodiment of this specification. Figure 1 The training process of the teacher model in the model architecture shown in the figure is explained, and the detailed structural diagram of the teacher model can be shown as follows Fig.10 As shown, Fig.10 A schematic diagram of the structure of a teacher model provided for one embodiment of this specification.

[0123] like Fig. 9 As shown in this manual Figure 3 In the illustrated embodiment, before step 304, the following may also be included:

[0124] Step 902: Obtain multi-domain sample data, label values ​​of click rates corresponding to the multi-domain sample data, and label values ​​of domains to which the multi-domain sample data belongs.

[0125] The multi-domain sample data mentioned above include source domain sample data and target domain sample data; the sample data of each domain may include images, texts and / or voices, etc.

[0126] Step 904 , converting the multi-domain sample data into a ninth representation vector through the embedding layer 1001 in the teacher model 1000 .

[0127] Step 906, encoding the ninth representation vector into a tenth representation vector through the encoder 242 in the teacher model 1000.

[0128] Step 908, based on the tenth representation vector, predict the predicted value of the click rate corresponding to the above-mentioned multi-domain sample data through the prediction model 1003 in the teacher model 1000; and convert the tenth representation vector into an eleventh representation vector through the gradient back propagation layer 1004 in the teacher model 1000, and classify the eleventh representation vector through the domain classifier 28 in the teacher model 1000 to obtain the predicted value of the domain to which the above-mentioned multi-domain sample data belongs.

[0129] Step 910, with the purpose of minimizing the loss function of the teacher model 1000, adjust the parameters of the encoder 242, gradient back propagation layer 1004, domain classifier 28 and prediction model 1003 in the teacher model 1000.

[0130] Among them, the loss function of the teacher model 1000 is the cross entropy between the label value and the predicted value of the click rate corresponding to the multi-domain sample data, and the sum of the cross entropy between the label value and the predicted value of the domain to which the multi-domain sample data belongs.

[0131] Specifically, in order to master multi-domain knowledge, a teacher model 1000 can be first constructed and trained. The teacher model 1000 can be implemented using STAR or CCTL. In addition, in order to ensure that the teacher model 1000 can better learn cross-domain shared knowledge, a domain classifier 28 is added to the teacher model 1000. Fig.10 , the domain classifier 28 uses the representation vector encoded by the encoder 242 of the teacher model 1000 as input, and uses the gradient reversal layer (GradRev Layer) for preprocessing. By establishing an adversarial relationship between the encoder 242 of the teacher model 1000 and the domain classifier 28, the teacher model 1000 can preferentially extract common information between different domains, thereby improving the generalization ability of the teacher model 1000 between domains. This strategy helps the teacher model 1000 to resist the distribution differences between domains and enhance its adaptability and robustness in a multi-domain environment.

[0132] The loss function of the teacher model 1000 can be formalized as:

[0133]

[0134] In formula (14), v x is the ninth representation vector, e(˙) represents the encoder 242 in the teacher model 1000, represents the prediction model 1003 in the teacher model 1000, represents the domain classifier 28 in the teacher model 1000, GradRev(˙) represents the gradient back propagation layer, and y x Represents the label value of the click rate corresponding to the multi-domain sample data, Represents the label value of the domain to which the multi-domain sample data belongs, L CE (˙) represents the cross entropy loss function.

[0135] Fig.11 This is a flow chart of a method for predicting click-through rate of recommended data provided by an embodiment of this specification. The method for predicting click-through rate of recommended data provided by this embodiment can be executed by a server. The server can predict the click-through rate of the recommended data, such as Fig.12 As shown, the server is deployed with a first representation decoupling model, a second representation decoupling model and a click rate prediction model, and the first representation decoupling model, the second representation decoupling model and the click rate prediction model are all configured according to Figures 3 to 10 The method provided by the illustrated embodiment completes parameter adjustment. Fig.12 A schematic diagram of the structure of a model deployed on a server provided in one embodiment of this specification.

[0136] like Fig.11 As shown, the above-mentioned method for predicting the click rate of recommended data may include:

[0137] Step 1102: Obtain the data to be recommended in the target domain.

[0138] Step 1104: convert the data to be recommended into a domain-shared representation vector through a first representation decoupling model; and convert the data to be recommended into a domain-specific representation vector through a second representation decoupling model.

[0139] Step 1106: Obtain the click rate corresponding to the to-be-recommended data through a click rate prediction model according to the domain-shared representation vector and the domain-specific representation vector.

[0140] In the above-mentioned method for predicting the click rate of recommended data, the first representation decoupling model, the second representation decoupling model and the click rate prediction model can richly characterize the users and the data to be recommended in the target scenario, thereby improving the prediction accuracy of the click rate of the data to be recommended and enhancing the recommendation effect of the recommendation system.

[0141] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0142] The embodiment of the present specification also provides an electronic device, which may include at least one processor; and at least one memory connected to the processor in communication, wherein: the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute Figures 3 to 10 The method provided by the embodiment shown; or the processor calling the program instruction can execute Figure 11-12 The method provided by the illustrated embodiment.

[0143] The electronic device may be a server, and the server may be set up in the cloud. When the processor calls the program instruction, it can execute Figures 3 to 10 In the method provided in the embodiment shown, the server may be a server with a model training function; when the processor calls the program instruction, it can execute Figure 11-12 In the method provided in the illustrated embodiment, the server may be a server having a function of predicting the click rate of the data to be recommended.

[0144] Typically, the server with the model training function and the server with the click rate prediction function are different servers.

[0145] Fig.13 A schematic diagram of the structure of an electronic device provided in one embodiment of this specification, Fig.13 A block diagram of an exemplary electronic device suitable for implementing the embodiments of the present description is shown. Fig.13 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of this specification.

[0146] like Fig.13 As shown, the electronic device is in the form of a general computing device. The components of the electronic device may include, but are not limited to: one or more processors 410, a communication interface 420, a memory 430, and a communication bus 440 connecting different components (including the memory 430, the communication interface 420 and the processor 410).

[0147] The communication bus 440 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, or a local bus using any of a variety of bus structures. For example, the communication bus 440 may include, but is not limited to, an industry standard architecture (ISA) bus, a micro channel architecture (MCA) bus, an enhanced ISA bus, a video electronics standards association (VESA) local bus, and a peripheral component interconnection (PCI) bus.

[0148] Electronic devices typically include a variety of computer system readable media. These media can be any available media that can be accessed by the electronic device, including volatile and non-volatile media, removable and non-removable media.

[0149] The memory 430 may include a computer system readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory. The memory 430 may include at least one program product having a set (e.g., at least one) of program modules configured to execute the instructions of the present invention. Figures 3 to 10 The functions of the embodiments shown in this specification may be configured to perform Figure 11-12 Functionality of the illustrated embodiment.

[0150] A program / utility having a set (at least one) of program modules may be stored in the memory 430, such program modules including - but not limited to - an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include the implementation of a network environment. The program modules generally execute the instructions in this specification. Figures 3 to 10 The functions and / or methods in the described embodiments, or program modules, generally execute the functions and / or methods of the present invention. Figure 11-12 The functions and / or methods in the described embodiments.

[0151] The processor 410 executes various functional applications and data processing by running the programs stored in the memory 430, such as implementing the present specification. Figures 3 to 10 The model training method provided in the embodiment shown, or the implementation of this specification Figure 11-12 The illustrated embodiment provides a method for predicting click-through rate of recommendation data.

[0152] The embodiment of the present specification provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, wherein the computer instructions enable the computer to execute the present specification. Figures 3 to 10 The model method provided in the embodiment shown, or the computer instruction enables the computer to execute the instructions of this specification Figure 11-12 The illustrated embodiment provides a method for predicting click-through rate of recommendation data.

[0153] The above-mentioned non-transient computer-readable storage medium can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, - but not limited to - electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (read only memory, ROM), erasable programmable read-only memories (erasable programmable read only memory, EPROM) or flash memory, optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.

[0154] Computer-readable signal media may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including, but not limited to, electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0155] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wire, optical cable, radio frequency (RF), etc., or any suitable combination of the foregoing.

[0156] Computer program code for performing the operations of the present specification may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0157] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0158] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of this specification. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.

[0159] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this specification, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0160] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of this specification includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of this specification belong.

[0161] The word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.

[0162] It should be noted that the terminals involved in the embodiments of this specification may include but are not limited to personal computers (PCs), personal digital assistants (PDAs), wireless handheld devices, tablet computers, mobile phones, MP3 players, MP4 players, etc.

[0163] In the several embodiments provided in this specification, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0164] In addition, each functional unit in each embodiment of this specification may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0165] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the method described in each embodiment of this specification. The aforementioned storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes.

[0166] The above description is only a preferred embodiment of this specification and is not intended to limit this specification. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of this specification should be included in the scope of protection of this specification.

Claims

1. A model training method, comprising: Obtain target domain sample data and a label value of a click rate corresponding to the target sample data; The target domain sample data is encoded into a first representation vector through a first representation decoupling model in the student model, and the first representation vector is scored through a domain classifier in a teacher model that has completed parameter adjustment, so that the first representation vector is learned as a domain-shared representation vector; and the target domain sample data is encoded into a second representation vector through a second representation decoupling model in the student model, and the second representation vector is scored through the domain classifier, so that the second representation vector is learned as a domain-unique representation vector; According to the domain shared representation vector and the domain unique representation vector, obtaining a first prediction value of the click rate corresponding to the target domain sample data through a click rate prediction model in the student model; With the purpose of minimizing the loss function of the student model, the parameters of the click-through rate prediction model, the first representation decoupling model and the second representation decoupling model are adjusted; wherein the loss function of the student model includes the cross entropy between the label value of the click-through rate corresponding to the target domain sample data and the first prediction value.

2. The method according to claim 1, wherein: Scoring the first representation vector by a domain classifier in the teacher model whose parameters have been adjusted so that the first representation vector is learned as a domain shared representation vector includes: With the purpose of minimizing the cross entropy between the score of the domain classifier on the first representation vector and a first predetermined distribution, the parameters of the first representation decoupling model are adjusted so that the first representation vector is learned as a domain shared representation vector.

3. The method according to claim 1, wherein: The scoring the second representation vector by the domain classifier so that the second representation vector is learned as a domain-specific representation vector comprises: With the purpose of minimizing the cross entropy between the score of the domain classifier on the second representation vector and a second predetermined distribution, the parameters of the second representation decoupling model are adjusted so that the second representation vector is learned as a domain-specific representation vector.

4. The method according to claim 1 or 2, wherein: After obtaining the target domain sample data, the method further includes: encoding the target domain sample data into a third representation vector by an encoder in the teacher model; The parameters of the first representation decoupling model are adjusted with the purpose of minimizing the distance between the third representation vector and the domain shared representation vector.

5. The method according to claim 4, wherein: Before adjusting the parameters of the first representation decoupling model for the purpose of minimizing the distance between the third representation vector and the domain shared representation vector, the method further includes: Scoring the target domain sample data by using the domain classifier; Determining a weight of the target domain sample data according to the score of the target domain sample data; The distance between the third representation vector and the domain shared representation vector is weighted by the weight of the target domain sample data.

6. The method according to claim 5, wherein: The adjusting the parameters of the first representation decoupling model for the purpose of minimizing the distance between the third representation vector and the domain shared representation vector includes: The parameters of the first representation decoupling model are adjusted with the purpose of minimizing the weighted distance; wherein the distance is the distance between the third representation vector and the domain shared representation vector.

7. The method according to claim 1 or 3, wherein: After obtaining the target domain sample data, the method further includes: Converting the target domain sample data into a fourth representation vector through an embedding layer in the second representation decoupling model; Performing a random perturbation operation on the fourth characterization vector to obtain a fifth characterization vector and a sixth characterization vector; Encoding the fifth representation vector and the sixth representation vector respectively through the encoder in the second representation decoupling model to obtain a seventh representation vector and an eighth representation vector; The parameters of the encoder in the second representation decoupling model are adjusted with the purpose of maximizing the similarity between the seventh representation vector and the eighth representation vector.

8. The method according to claim 5, wherein: After encoding the target domain sample data into a third representation vector through the encoder in the teacher model, the method further includes: According to the third representation vector, obtaining a second prediction value of the click rate corresponding to the target domain sample data through the prediction model in the teacher model; The loss function of the student model also includes: a difference value weighted by the weight of the target domain sample data, where the difference value is the difference between the first prediction value and the second prediction value.

9. The method according to claim 1, wherein: Before scoring the first representation vector by the domain classifier in the teacher model whose parameters have been adjusted, the method further includes: Acquire multi-domain sample data, label values ​​of click rates corresponding to the multi-domain sample data, and label values ​​of domains to which the multi-domain sample data belongs; wherein the multi-domain sample data includes source domain sample data and target domain sample data; Converting the multi-domain sample data into a ninth representation vector through an embedding layer in a teacher model; encoding the ninth representation vector into a tenth representation vector by an encoder in the teacher model; According to the tenth representation vector, predict the predicted value of the click rate corresponding to the multi-domain sample data through the prediction model in the teacher model; and convert the tenth representation vector into an eleventh representation vector through the gradient back propagation layer in the teacher model, and classify the eleventh representation vector through the domain classifier in the teacher model to obtain the predicted value of the domain to which the multi-domain sample data belongs; With the purpose of minimizing the loss function of the teacher model, the parameters of the encoder, the gradient back propagation layer, the domain classifier and the prediction model in the teacher model are adjusted; wherein the loss function of the teacher model is the cross entropy between the label value and the predicted value of the click rate corresponding to the multi-domain sample data, and the sum of the cross entropy between the label value and the predicted value of the domain to which the multi-domain sample data belongs.

10. A method for predicting click rate of recommendation data, comprising: Obtain the data to be recommended in the target domain; The to-be-recommended data is converted into a domain-shared representation vector by using a first representation decoupling model; and converting the to-be-recommended data into a domain-specific representation vector through a second representation decoupling model; wherein the first representation decoupling model and the second representation decoupling model have completed parameter adjustment according to the method according to any one of claims 1 to 9; According to the domain shared representation vector and the domain unique representation vector, a click rate corresponding to the to-be-recommended data is obtained through a click rate prediction model; wherein the click rate prediction model has completed parameter adjustment according to the method described in any one of claims 1-9.

11. An electronic device, comprising: at least one processor; as well as at least one memory in communication with the processor, wherein: The memory stores program instructions executable by the processor, and the processor can execute any one of the methods described in claims 1 to 9 by calling the program instructions; or the processor can execute the method described in claim 10 by calling the program instructions.

12. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions cause the computer to execute the method according to any one of claims 1 to 9; or the computer instructions cause the computer to execute the method according to claim 10.

Citation Information

Cited By

  • Chemical large model attribute prediction method and device, electronic equipment and storage medium

    CN120766822A