Model training method and device, user determination method and device, equipment and product
By combining a gain prediction network and a contrastive learning layer, the problem of imbalanced sample distribution in the gain model is solved, achieving more accurate user behavior prediction and improving the accuracy of model training.
Patent Information
- Application Number
- CN202410947407.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2024-11-15
AI Technical Summary
Existing gain models suffer from uneven sample distribution, resulting in inaccurate training performance, especially when features related to marketing reach are obscured, making it difficult to effectively predict user behavior.
By combining a gain prediction network and a contrastive learning layer, a target gain model is constructed. By utilizing shared feature extraction and sample contrastive learning, the representation distributions of the experimental and control groups are aligned, thereby improving the accuracy of model training.
It enhances the learning of the sample's own representation, improves the accuracy of predicting the target behavior, ensures that the model is aligned with the distribution at the sample feature level, and improves the accuracy of model training.
Smart Images

Figure CN118966309A_ABST
Abstract
Description
Background Art
[0002] With the development of mobile Internet and artificial intelligence technology, intelligent marketing is penetrating into all walks of life. As a merchant, there are various channels to reach consumers, such as advertising, outbound calls and text messages. In each marketing task, users will set corresponding decision-making goals according to their own goals and budgets, such as return on investment (ROI), gross merchandise volume (GMV) and marketing gains. Among them, how to measure and predict the incremental improvement brought by different marketing interventions, and put the budget on marketing-sensitive groups, that is, people who will buy after marketing, rather than people who will buy anyway or will never buy, has become an important topic for marketing algorithms.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0004] The purpose of the present disclosure is to provide a model training method, a user determination method, a model training device, a user determination device, an electronic device and a computer program product, thereby at least to a certain extent overcoming the problem that the sample distribution of the gain model in the related scheme is uneven, resulting in the trained model being not accurate enough.
[0005] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present invention.
[0006] According to a first aspect of the present disclosure, a model training method is provided, comprising: obtaining a pre-constructed training sample set, the training sample set comprising a plurality of training sample pairs, the training sample pairs consisting of an experimental group sample and a control group sample; performing shared feature extraction on the plurality of training sample pairs to obtain shared sample features; inputting the shared sample features into a corresponding gain prediction network according to different sample classification labels to obtain a gain prediction result, and determining a first result loss value based on the gain prediction result and a corresponding true output result; constructing a second result loss value for the training sample pairs, the second result loss value being obtained by performing sample comparison learning on the plurality of training sample pairs; and training a pre-constructed initial model based on the first result loss value and the second result loss value to obtain a target gain model, the gain prediction network being included in the initial model.
[0007] In an exemplary embodiment of the present disclosure, the obtaining of a pre-constructed training sample set includes: obtaining an experimental group sample set and a control group sample set, the experimental group sample set comprising a plurality of the experimental group samples; based on the control group sample set, constructing a positive sample pair and a negative sample pair corresponding to each of the experimental group samples; based on the positive sample pairs and the negative sample pairs, constructing the training sample set.
[0008] In an exemplary embodiment of the present disclosure, the control group sample set includes multiple control group samples, and constructing a positive sample pair and a negative sample pair corresponding to each of the experimental group samples based on the control group sample set, including: determining the sample distance between the experimental group sample and the multiple control group samples; determining a first control group sample corresponding to the experimental group sample based on the sample distance; constructing the positive sample pair based on the experimental group sample and the first control group sample; determining a second control group sample corresponding to the experimental group sample, the second control group sample being other samples in the control group sample set that are different from the first control group sample; and constructing the negative sample pair based on the experimental group sample and the second control group sample.
[0009] In an exemplary embodiment of the present disclosure, the initial model includes a shared feature layer, and the shared feature extraction of the multiple training sample pairs to obtain shared sample features includes: obtaining the shared sample features of the previous period corresponding to the training sample set in the previous training period; determining the original features of the training sample pairs, and inputting the original features into the shared feature layer to obtain the original shared features; determining the shared sample features corresponding to the training sample pairs based on the shared features of the previous period and the original shared features, and the shared sample features are used to construct the shared sample features of the next period corresponding to the next training period.
[0010] In an exemplary embodiment of the present disclosure, the gain prediction network includes a first prediction network and a second prediction network, the gain prediction result includes a first prediction result and a second prediction result, and the multiple training sample pairs are input into the corresponding gain prediction network according to different sample classification labels to obtain the gain prediction result, including: determining the sample classification labels of the training sample pairs, the sample classification labels include a first classification label and a second classification label; inputting the training sample pairs corresponding to the first classification label into the first prediction network to obtain a first prediction result; inputting the training sample pairs corresponding to the second classification label into the second prediction network to obtain a second prediction result.
[0011] In an exemplary embodiment of the present disclosure, the first result loss value includes a first gain loss value and a second gain loss value, and determining the first result loss value based on the gain prediction result includes: determining the first gain loss value according to the first prediction result and the corresponding first true output result; determining the second gain loss value according to the second prediction result and the corresponding second true output result.
[0012] In an exemplary embodiment of the present disclosure, the initial model includes a contrastive learning layer, and constructing the second result loss value of the training sample pair includes: obtaining a positive sample pair and a negative sample pair corresponding to the training sample pair; obtaining a first dimensional representation of the training sample pair, and inputting the first dimensional representation into the contrastive learning layer; determining, by the contrastive learning layer, a first sample similarity of the positive sample pair and a second sample similarity of the negative sample pair; and constructing the second result loss value based on the first sample similarity and the second sample similarity.
[0013] According to a second aspect of the present disclosure, a user determination method is provided, comprising: obtaining a pre-trained target gain model, the target gain model being trained based on the above-mentioned model training method, and the target gain model comprising a gain prediction network, the gain prediction network comprising a first prediction network and a second prediction network; obtaining a user set, inputting a plurality of user features of the user set into the gain prediction network respectively, obtaining a first prediction result output by the first prediction network, and a second prediction result output by the second prediction network; determining a gain prediction result of each user in the user set according to the first prediction result and the second prediction result, so as to determine a target user from the user set based on the obtained gain prediction result.
[0014] According to a third aspect of the present disclosure, a model training device is provided, comprising: a sample acquisition module, used to acquire a pre-constructed training sample set, the training sample set comprising multiple training sample pairs, the training sample pairs consisting of experimental group samples and control group samples; a shared feature extraction module, used to extract shared features from the multiple training sample pairs to obtain shared sample features; a first loss value determination module, used to input the shared sample features into a corresponding gain prediction network according to different sample classification labels, respectively, to obtain a gain prediction result, and determine a first result loss value based on the gain prediction result and the corresponding true output result; a second loss value determination module, used to construct a second result loss value for the training sample pair, the second result loss value being obtained by performing sample comparison learning on the training sample pair; a network training module, used to train a pre-constructed initial model based on the first result loss value and the second result loss value to obtain a target gain model, the gain prediction network being included in the initial model.
[0015] In an exemplary embodiment of the present disclosure, the sample acquisition module includes a sample construction unit, which is used to: acquire an experimental group sample set and a control group sample set, wherein the experimental group sample set includes a plurality of the experimental group samples; based on the control group sample set, construct a positive sample pair and a negative sample pair corresponding to each of the experimental group samples; based on the positive sample pairs and the negative sample pairs, construct the training sample set.
[0016] In an exemplary embodiment of the present disclosure, the control group sample set includes multiple control group samples, and the sample construction unit includes a sample construction subunit, which is used to: determine the sample distance between the experimental group sample and the multiple control group samples; determine the first control group sample corresponding to the experimental group sample based on the sample distance; construct the positive sample pair based on the experimental group sample and the first control group sample; determine the second control group sample corresponding to the experimental group sample, the second control group sample is other samples in the control group sample set that are different from the first control group sample; and construct the negative sample pair based on the experimental group sample and the second control group sample.
[0017] In an exemplary embodiment of the present disclosure, the initial model includes a shared feature layer, and the shared feature extraction module includes a shared feature extraction unit, which is used to: obtain the shared sample features of the previous period corresponding to the training sample set in the previous training period; determine the original features of the training sample pairs, input the original features into the shared feature layer, and obtain the original shared features; determine the shared sample features corresponding to the training sample pairs based on the shared features of the previous period and the original shared features, and the shared sample features are used to construct the shared sample features of the next period corresponding to the next training period.
[0018] In an exemplary embodiment of the present disclosure, the gain prediction network includes a first prediction network and a second prediction network, the gain prediction result includes a first prediction result and a second prediction result, and the first loss value determination module includes a prediction result determination unit, which is used to: determine the sample classification label of the training sample pair, the sample classification label includes a first classification label and a second classification label; input the training sample pair corresponding to the first classification label into the first prediction network to obtain a first prediction result; input the training sample pair corresponding to the second classification label into the second prediction network to obtain a second prediction result.
[0019] In an exemplary embodiment of the present disclosure, the first result loss value includes a first gain loss value and a second gain loss value, and the first loss value determination module includes a gain loss construction unit: determining the first gain loss value according to the first prediction result and the corresponding first real output result; determining the second gain loss value according to the second prediction result and the corresponding second real output result.
[0020] In an exemplary embodiment of the present disclosure, the initial model includes a contrastive learning layer, and the second loss value determination module includes a second function construction unit, which is used to: obtain positive sample pairs and negative sample pairs corresponding to the training sample pairs; obtain a first dimensional representation of the training sample pairs, and input the first dimensional representation into the contrastive learning layer; determine the first sample similarity of the positive sample pair and the second sample similarity of the negative sample pair by the contrastive learning layer; and construct the second result loss value based on the first sample similarity and the second sample similarity.
[0021] According to a fourth aspect of the present disclosure, a user determination device is provided, comprising: a model acquisition module, used to acquire a pre-trained target gain model, the target gain model is trained based on the above-mentioned model training method, and the target gain model includes a gain prediction network, the gain prediction network includes a first prediction network and a second prediction network; a gain prediction module, used to acquire a user set, input a plurality of user features of the user set into the gain prediction network respectively, obtain a first prediction result output by the first prediction network, and a second prediction result output by the second prediction network; a user determination module, used to determine the gain prediction result of each user in the user set according to the first prediction result and the second prediction result, so as to determine the target user from the user set based on the obtained gain prediction result.
[0022] According to a fifth aspect of the present disclosure, an electronic device is provided, comprising: a processor; and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the model training method according to any one of the above items is implemented, or the user determination method according to any one of the above items is implemented.
[0023] According to a sixth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it implements the model training method according to any one of the above items, or implements the user determination method according to any one of the above items.
[0024] According to the seventh aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the model training method described in any one of the above items, or implements the user determination method described in any one of the above items.
[0025] The technical solution provided by the present disclosure may have the following beneficial effects:
[0026] The model training method in the exemplary embodiment of the present disclosure, on the one hand, determines the first result loss value through the gain prediction result of the gain prediction network and uses it for model training, which strengthens the representation learning of the sample itself, so that the target behavior can be better predicted. On the other hand, the second result loss value is constructed through contrastive learning and used for model training, which aligns the representation of the nearest neighbor samples of the experimental group and the control group, so that the representation distribution of the entire experimental group and the control group is closer, making the model training more accurate.
[0027] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0029] Figure 1 A flowchart of a model training method according to an exemplary embodiment of the present disclosure is schematically shown;
[0030] Figure 2 A model architecture diagram of a training target gain model according to an exemplary embodiment of the present disclosure is schematically shown;
[0031] Figure 3 A flowchart of a user determination method according to an exemplary embodiment of the present disclosure is schematically shown;
[0032] Figure 4 A block diagram of a model training device according to an exemplary embodiment of the present disclosure is schematically shown;
[0033] Figure 5 A block diagram schematically shows a user determination device according to an exemplary embodiment of the present disclosure;
[0034] Figure 6 A block diagram schematically shows an electronic device according to an exemplary embodiment of the present disclosure;
[0035] Figure 7 A schematic diagram of a computer-readable storage medium according to an exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0036] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided so that this disclosure will be comprehensive and complete and will fully convey the concepts of the example embodiments to those skilled in the art. The same reference numerals in the figures represent the same or similar parts, and thus their repeated description will be omitted.
[0037] In addition, the described features, structures or characteristics may be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials or operations are not shown or described in detail to avoid blurring the various aspects of the present disclosure.
[0038] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0039] For marketing algorithms, some simple meta-learning algorithms use machine learning models as base learners for modeling. For example, T-learner divides the population into a marketing group and a control group, and models response models on the two populations respectively (that is, taking whether an order is finally placed as the learning goal and learning the probability of placing an order). When predicting, the samples pass through the two models respectively, and the difference between the two models is the gain. S-learner adds the reach method as a feature to the features. For example, t=0 means no reach, and t=1 means reach. When predicting, by changing the value of t, the results of reach and no reach are obtained, and then the gain is obtained by subtracting them.
[0040] In the modeling of the gain model, since it is impossible to observe the reach and non-reach of the same sample at the same time, the best choice in the experiment is to do a randomized controlled experiment. This experiment requires that the reach or not is independent of the user, that is, the experimental group (treatment) and the control group (feature) are independent of each other. However, in actual scenarios, this situation is difficult to meet. For example, when modeling the gain of coupons on conversion rate, although the actual situation is random delivery, the final result shows that the click-through rate (CTR) estimates that those with high conversion rates are more likely to get coupons, that is, the experimental group are all more active and easier to click, while the control group are all people who are unwilling to click to receive coupons. In this case, treatment and feature are not independent of each other, and it is necessary to balance the distribution on both sides.
[0041] In previous models, basic meta-learning algorithms would not perform such operations. They ignored sample bias caused by potential influencing factors, and when there were many sample features like T-learner, the features of marketing reach or not were easily overwhelmed. Some deep learning algorithms all regulated the distribution of the overall samples from a macro perspective, and did not solve the alignment problem from the feature level of independent samples, resulting in the trained model being not accurate enough.
[0042] Based on this, in this example embodiment, a model training method is first provided. The model training method of the present disclosure can be implemented using a server, or the method described in the present disclosure can be implemented using a terminal device, wherein the terminal described in the present disclosure may include mobile terminals such as mobile phones, tablet computers, laptops, PDAs, personal digital assistants (PDAs), and fixed terminals such as desktop computers. Figure 1 The following is a schematic diagram of the model training method flow according to some embodiments of the present disclosure. Figure 1 , the model training method may include the following steps:
[0043] Step S110, obtaining a pre-constructed training sample set, the training sample set includes a plurality of training sample pairs, and the training sample pairs are composed of experimental group samples and control group samples.
[0044] According to some exemplary embodiments of the present disclosure, the training sample set may be a set consisting of multiple training sample pairs. The training sample pairs may be training data consisting of experimental group samples and control group samples, and the training sample pairs are in the form of pairs. The experimental group samples refer to a randomly selected subset of experimental objects. The control group samples refer to a randomly selected subset of the experimental objects. In this embodiment, the experimental group samples may refer to samples that have been exposed to marketing, and the control group samples may refer to samples that have not been exposed to marketing.
[0045] Before model training, a pre-built training sample set is obtained as the training data of the model. In this embodiment, the data is constructed in the form of pairs. Figure 2 , Figure 2 A model architecture diagram of a training target gain model according to an exemplary embodiment of the present disclosure is schematically shown. Figure 2 The training sample set 210 includes multiple training sample pairs, where t in the training sample pair represents the experimental group sample, i.e., the sample reached by marketing, and c represents the control group sample, i.e., the sample not reached by marketing. Each training sample pair (Pair pair) means that each experimental group sample finds a control group sample as its opposite result. After constructing multiple training sample pairs, the above multiple training sample pairs are used as the training sample set.
[0046] Step S120, extracting shared features from multiple training sample pairs to obtain shared sample features.
[0047] According to some exemplary embodiments of the present disclosure, shared sample features may be feature extraction of training sample pairs to obtain corresponding higher-dimensional feature representations.
[0048] For the multiple training sample pairs obtained, shared features are extracted for the above multiple training sample pairs, and the original features of the samples are used as input. After passing through a multi-layer fully connected neural network, a higher dimensional representation of the training sample pairs is output, that is, the shared sample features 221 of the training sample pairs are obtained. The significance of shared feature extraction for the training sample pairs is to make the feature representation purer.
[0049] Step S130, inputting the shared sample features into the corresponding gain prediction network according to different sample classification labels to obtain a gain prediction result, and determining the first result loss value based on the gain prediction result and the actual output result.
[0050] According to some exemplary embodiments of the present disclosure, the sample classification label may be a classification label corresponding to the training sample pair, and the sample classification label may include two types, t=0 means no reach, and t=1 means reach. The gain prediction network may be a network structure that takes the training sample pair as input, performs decision classification based on the characteristics of the training sample pair, and obtains the gain prediction result of the target behavior probability. The target behavior probability may be the probability of whether the user performs a certain behavior in the sample data. Taking marketing reach as an example, the target behavior probability may be the probability of whether the user places an order. The gain prediction result may be a task-oriented gain prediction network that takes the shared sample features of the training sample pair as input to obtain the prediction result of whether the user performs a certain behavior. The first result loss value may be an indicator for characterizing the error between the gain prediction result and the corresponding true output result. The first result loss value may be determined using a pre-constructed loss function, and the loss function may be a function that characterizes the degree of deviation between the gain prediction result and the corresponding true output result, and may be used as a metric for the error between the two.
[0051] After obtaining multiple shared sample features, the shared sample features are input into the gain prediction network. The gain prediction network is a task-oriented learning. According to different sample classification labels, multiple training sample pairs are input into the corresponding gain prediction network, and the gain prediction network outputs the corresponding gain prediction results. Figure 2 , according to different sample classification labels, the training sample pairs are input into Figure 2 In the branch network corresponding to the gain prediction network 230.
[0052] The upper part of the gain prediction network 230 is a network branch that performs gain prediction for samples with a classification label of t=1, and the lower part of the gain prediction network 230 is a network branch that performs gain prediction for samples with a classification label of t=0. That is, when the sample is a sample of the experimental group, it passes through the upper network branch, and if it is a sample of the control group, it passes through the lower network branch. After passing through their respective multi-layer fully connected networks, the two output the corresponding order probability as the gain prediction result.
[0053] After obtaining the gain prediction result, the gain prediction result can be compared with the actual output result (i.e., the actual order situation of the user) to construct a first result loss value, so that the model can be trained based on the first result loss value later. Specifically, a function for measuring the degree of deviation between the gain prediction result and the actual output result can be constructed, such as constructing a cross-entropy loss function (Cross-Entropy Loss, referred to as CE) between the gain prediction result and the actual output result, and using the cross-entropy loss function to determine the first result loss value between the gain prediction result and the actual output result, and then based on the first result loss value for model training, strengthen the model's learning of the sample's own representation.
[0054] Step S140, constructing a second result loss value of the training sample pair, where the second result loss value is obtained by performing sample comparison learning on multiple training sample pairs.
[0055] According to some exemplary embodiments of the present disclosure, the second result loss value may be a loss value obtained by performing comparative learning on the training sample pairs and constructed according to the comparative learning results, such as performing comparative learning based on the positive examples and negative examples in the training sample pairs and constructing the second result loss value according to the difference in the output results corresponding to the two.
[0056] After constructing multiple training sample pairs, the corresponding features of the training sample pairs can be input into the contrastive learning layer, which performs contrastive learning on the experimental group samples and the control group samples to construct a second result loss value. The second result loss value is used in the model training process to align the distribution of the training group data and the control group data, thereby improving the accuracy of the training model.
[0057] Step S150, based on the first result loss value and the second result loss value, the pre-constructed initial model is trained to obtain a target gain model, and the gain prediction network is included in the initial model.
[0058] According to some exemplary embodiments of the present disclosure, the target gain model can be a network model trained based on the information gain theory, which can be used to determine the prediction result of a certain user behavior. In the decision tree algorithm, information gain can be used to evaluate the importance of a feature to the classification prediction result. The target gain model includes a gain prediction network. The gain prediction network can learn the features that have a greater impact on the classification results by learning the sample features in the training samples, and then apply them to the classification prediction task.
[0059] After the first result loss value and the second result loss value are constructed, the total loss value of the model can be constructed according to the first result loss value and the second result loss value, and the pre-constructed initial model is trained based on the total loss value of the model, and the model parameters of the initial model are adjusted. The network structure of the initial model may include a gain prediction network. The specific training process may be back propagation and parameter optimization on the training set until the end condition of the model training is reached to obtain the target gain model.
[0060] According to the model training method in this example embodiment, on the one hand, the first result loss value is determined by the gain prediction result of the gain prediction network and used for model training, which strengthens the representation learning of the sample itself and enables better prediction of the target behavior. On the other hand, the second result loss value is constructed by contrastive learning and used for model training, which aligns the representations of the nearest neighbor samples of the experimental group and the control group, thereby making the representation distribution of the entire experimental group and the control group closer, making the model training more accurate.
[0061] The model training method in this example embodiment will be further described below.
[0062] In an exemplary embodiment of the present disclosure, for step S110, a pre-constructed training sample set is obtained, including: obtaining an experimental group sample set and a control group sample set, the experimental group sample set including multiple experimental group samples; based on the control group sample set, constructing positive sample pairs and negative sample pairs corresponding to each experimental group sample; based on the positive sample pairs and the negative sample pairs, constructing a training sample set.
[0063] The experimental group sample set may be a set consisting of multiple experimental group samples. The control group sample set may be a set consisting of multiple control group samples. A positive sample pair may be a sample pair constructed by an experimental group sample and a control group sample (first control group sample) that matches the experimental group sample determined based on the distance. A negative sample pair may be a sample pair constructed by an experimental group sample and other experimental group samples (second control group samples) in the control group sample set except the first control group sample.
[0064] A sample set for model training is obtained, including an experimental group sample set consisting of multiple experimental group samples and a control group sample set consisting of multiple control group samples. For the experimental group samples, based on the sample distance, an experimental group sample can be selected from the control group sample set, and a positive sample pair can be constructed together with the experimental group sample; after obtaining the positive sample pair, another experimental group sample different from the positive sample pair is selected from the control group sample set, and a negative sample pair can be constructed together with the experimental group sample.
[0065] After constructing the positive sample pairs and the negative sample pairs, a training sample set is constructed based on multiple positive sample pairs and multiple negative sample pairs, which serves as the data basis for the subsequent training target gain model.
[0066] In an exemplary embodiment of the present disclosure, based on a control group sample set, constructing positive sample pairs and negative sample pairs corresponding to each experimental group sample, including: determining the sample distance between the experimental group sample and multiple control group samples; determining a first control group sample corresponding to the experimental group sample based on the sample distance; constructing a positive sample pair based on the experimental group sample and the first control group sample; determining a second control group sample corresponding to the experimental group sample, the second control group sample being other samples in the control group sample set that are different from the first control group sample; and constructing a negative sample pair based on the experimental group sample and the second control group sample.
[0067] The sample distance may be the distance between two samples, such as calculating the sample distance based on the vectors corresponding to the features of the two samples. The first control group sample may be a control group sample corresponding to the experimental group sample selected from the control group sample set based on distance priority matching. The second control group sample may be other samples in the control group sample set that are different from the first control group sample.
[0068] When constructing training sample pairs, since the control group sample set includes multiple control group samples, in order to determine the control group samples that match the experimental group samples, the matching rule adopted is distance priority. The specific logic is: calculate the distance between each experimental group sample t and the control group sample c as the sample distance. The sample distance can use a variety of distance measurement methods. The specific choice depends on the nature of the data and the requirements of the task. Common distance measurement methods include Euclidean distance, Manhattan distance, Chebyshev distance, Minkowski distance, cosine similarity and Hamming distance.
[0069] Sort the samples by distance from small to large, and give priority to matching with smaller distances. If the experimental group sample t i The shortest distance control group sample c i has been selected, then move back to select the control group sample c of the second distance j , and so on.
[0070] After such a rule is adopted, an opposite control group data is selected for each experimental group sample as its positive example (first control group sample) for comparative learning, and a positive sample pair is constructed; and the negative example of the experimental group sample is the control group data other than the first control group sample in a sample batch, and then a negative sample pair is constructed based on the experimental group sample and the second control group sample. After the positive sample pair and the negative sample pair are constructed, they can be used as training data for the comparative learning layer, so that the distribution of the experimental group and the control group can be aligned from the sample feature level during the model training process.
[0071] In an exemplary embodiment of the present disclosure, the shared sample features of the training sample set in the previous training period corresponding to the previous training period are obtained; the original features of the training sample pairs are determined, and the original features are input into the shared feature layer to obtain the original shared features; based on the shared features of the previous period and the original shared features, the shared sample features corresponding to the training sample pairs are determined, and the shared sample features are used to construct the shared sample features of the next period corresponding to the next training period.
[0072] Among them, the original feature can be a feature representation obtained after vector representation of the training sample pair. The shared feature layer can be a network layer that performs feature transformation on the original feature to obtain the first dimension representation. The original shared feature can be a feature obtained by extracting the original feature of the training sample pair by the shared feature layer. The original shared feature can be a feature obtained by extracting the training sample pair in the current Epoch by the shared feature layer. In the model training process, Epoch refers to the process of traversing the entire training data set once. The previous training period can be the previous Epoch corresponding to the current Epoch in the model training process. The shared sample features of the previous period can be the output results of the shared feature layer in the previous Epoch. The next training period can be the next Epoch corresponding to the current Epoch in the model training process. The shared sample features of the next period can be the output results of the shared feature layer in the next Epoch.
[0073] When the model completes one training for all samples in the data set, an epoch is completed. Figure 2 At the beginning of model training, the initial encoding of the training sample pair can be selected as its feature representation. At this time, since it is the first Epoch, there is no previous training period (i.e., the previous Epoch), so the shared sample features of the previous period can be empty. The input of the shared feature layer is the original feature x of the sample. After passing through a multi-layer fully connected neural network, the output can be considered as a higher-dimensional representation of the sample. The meaning of sharing here is to make the representation of the sample purer.
[0074] However, starting from the second Epoch, the output result of the shared feature layer of the previous Epoch can be selected as its representation. Figure 2 The output of the shared feature layer 220 points to the training sample set. The output of each sample after passing through the shared feature layer (i.e., the shared sample features of the current Epoch) is used as the starting code for the next round to construct a sample pair, and the shared sample features are used in the shared feature extraction process of the next Epoch to obtain the shared sample features of the next period. In the feature extraction process, the most recent sample is reselected after each Epoch to continuously improve the model effect.
[0075] In an exemplary embodiment of the present disclosure, for step S120, multiple training sample pairs are input into the corresponding gain prediction network according to different sample classification labels to obtain gain prediction results, including: determining the sample classification labels of the training sample pairs, the sample classification labels include a first classification label and a second classification label; inputting the training sample pairs corresponding to the first classification label into the first prediction network to obtain a first prediction result; inputting the training sample pairs corresponding to the second classification label into the second prediction network to obtain a second prediction result.
[0076] Among them, the first prediction network can be a network structure for gain prediction of the experimental group samples. The second prediction network can be a network structure for gain prediction of the control group samples. The first prediction result can be the prediction result output by the first prediction network. The second prediction result can be the prediction result output by the second prediction network. The sample classification label can indicate whether the reach method acts on the user. The first classification label can indicate the label of the reached user. The second classification label can indicate the label of the unreached user.
[0077] Continue to refer Figure 2 The training process of the model is divided into two parts. The first part is the shared feature layer 220, and the second part is the gain prediction network 230 and the contrast learning layer 240 on the right. The gain prediction network 230 includes a first prediction network 231 and a second prediction network 232. Figure 2 The gain prediction network 230 in the upper right part is task-oriented learning. The upper part is the case of t=1, and the lower part is the case of t=0. That is, when the sample is a sample of the experimental group, it passes through the upper network, and if it is a sample of the control group, it passes through the lower network. The sample data is predicted and processed by the gain prediction network to obtain the corresponding prediction result, and the gain loss of the network model can be determined based on the prediction result.
[0078] In an exemplary embodiment of the present disclosure, determining a first result loss value based on a gain prediction result includes: determining a first gain loss value based on a first prediction result and a corresponding first true output result; and determining a second gain loss value based on a second prediction result and a corresponding second true output result.
[0079] The first real output result may be a real behavior result corresponding to the first prediction result. The first gain loss value may be an indicator for comparing the first prediction result with the first real output result to characterize the error between the two. The second real output result may be a real behavior result corresponding to the second prediction result. The second gain loss value may be an indicator for comparing the second prediction result with the second real output result to characterize the error between the two.
[0080] After the samples in the experimental group and the samples in the control group pass through their respective multi-layer fully connected networks, the corresponding order probabilities are outputted, and then the order probabilities outputted by the prediction network are compared with the actual order situations, and the gain loss value is calculated. Specifically, the calculation method of the first gain loss value between the first prediction result and the corresponding first real output result is shown in Formula 1.
[0081]
[0082] Among them, L h1represents the first gain loss value; CE() represents the cross-entropy loss function (Cross-Entropy Loss, referred to as CE); Can represent the first prediction result; y t It can represent the first real output result.
[0083] The calculation method of the second gain loss value between the second prediction result and the corresponding second true output result is shown in Formula 2.
[0084]
[0085] Among them, L h0 represents the second gain loss value; CE() represents the cross entropy loss function; Can represent the second prediction result; y c It can represent the second real output result.
[0086] The first result loss value is determined according to the error between the predicted result and the actual output result, and the first result loss value can be used for subsequent model training, so that the representation learning of the sample itself is strengthened through model training.
[0087] In an exemplary embodiment of the present disclosure, for step S130, constructing a second result loss value for the training sample pair includes: obtaining a positive sample pair and a negative sample pair corresponding to the training sample pair; obtaining a first dimensional representation of the training sample pair, and inputting the first dimensional representation into a contrastive learning layer; determining, by the contrastive learning layer, a first sample similarity of the positive sample pair, and a second sample similarity of the negative sample pair; and constructing a second result loss value based on the first sample similarity and the second sample similarity.
[0088] The first sample similarity may be the similarity between the original feature and the positive sample pair. The second sample similarity may be the similarity between the original feature and the positive sample pair.
[0089] In order to alleviate the problem of uneven sample distribution in the gain model, in the training contrast learning part of the model, the present disclosure proposes to conduct contrast learning on the experimental group and control group data to align the distribution of the two. The output results of the shared feature layer are used as the representation of the sample, and contrast learning is performed within the batch. The positive examples of contrast learning are pre-constructed positive sample pairs, that is, the experimental group samples and the corresponding nearest neighbor samples in the control group (the first control group samples); the negative sample pairs come from other control group data within the same batch, that is, other samples within the same batch that are different from the first control group samples, and the sample pairs (pair pairs) composed of the experimental group samples.
[0090] Continue to refer Figure 2, the shared feature layer 220 outputs the first dimension representation of the training sample pair, and the obtained first dimension representation is input to the contrastive learning layer, which performs contrastive learning based on the positive sample pair and the negative sample pair to construct a second result loss value corresponding to the sample contrastive learning. Within a batchB, the specific calculation method of the second result loss value is shown in Formula 3.
[0091]
[0092] Among them, L cl represents the second result loss value; (t i ,c i ) represents a pair consisting of the experimental group and its nearest neighbor control group data, that is, a positive sample pair; (t i ,c ' ) represents a negative sample pair, τ is a hyperparameter, sim(·,·) represents the similarity calculation; B represents a sample training batch in the training sample set, that is, batchB.
[0093] The loss value constructed through sample contrast learning is used for model training, which can bring the nearest neighbor data of the experimental group and the control group into line and away from other data.
[0094] After constructing the first result loss value and the second result loss value, the total model loss value of the model training is finally determined. The total model loss value is the weighted sum of the above two result loss values, as shown in Formula 4.
[0095] L=αL h1 +βL h0 +γL cl (Formula 4)
[0096] Among them, α, β, and γ are all weight hyperparameters; L h1 Represents the first gain loss value; L h0 Represents the second gain loss value; L cl represents the second result loss value; L represents the total loss value of the model.
[0097] The model is trained by constructing the total loss value of the model. During the model training process, the learning of the sample's own representation and the comparative representation learning can be integrated to improve the model effect.
[0098] In summary, the model training method disclosed in the present invention obtains a pre-constructed training sample set, the training sample set includes multiple training sample pairs, and the training sample pairs are composed of experimental group samples and control group samples; multiple training sample pairs are input into the corresponding gain prediction network according to different sample classification labels to obtain gain prediction results, and the first result loss value is determined based on the gain prediction results; the second result loss value of the training sample pair is constructed, and the second result loss value is obtained by sample comparison learning of multiple training sample pairs; based on the first result loss value and the second result loss value, the pre-constructed initial model is trained to obtain the target gain model, and the gain prediction network is included in the initial model. On the one hand, the first result loss value is determined by the gain prediction result of the gain prediction network and used for model training, which strengthens the representation learning of the sample itself, so that the target behavior can be better predicted. On the other hand, the second result loss value is constructed through comparative learning and used for model training, which aligns the representation of the nearest neighbor samples of the experimental group and the control group, so that the representation distribution of the entire experimental group and the control group is closer, making the model training more accurate.
[0099] Furthermore, in this exemplary embodiment, a user determination method is provided, and the user determination method of the present disclosure may be implemented by using a server, or may be implemented by using a terminal device. Figure 3 The following is a schematic diagram schematically showing the flow of a user determination method according to some embodiments of the present disclosure. Figure 3 , the user determination method may include the following steps:
[0100] Step S310, obtaining a pre-trained target gain model, the target gain model is trained based on a model training method, and the target gain model includes a gain prediction network, and the gain prediction network includes a first prediction network and a second prediction network.
[0101] Continue to refer Figure 2 After the model training is completed, in the model prediction stage, comparative learning no longer exists. At this time, the target gain model includes a shared feature layer 220 and a gain prediction network 230, and the target gain model obtained by the model training method is obtained, wherein the gain prediction network 230 includes a first prediction network and a second prediction network.
[0102] Step S320, obtaining a user set, inputting a plurality of user features of the user set into the gain prediction network respectively, obtaining a first prediction result output by the first prediction network, and a second prediction result output by the second prediction network.
[0103] According to some exemplary embodiments of the present disclosure, a user set may be a set consisting of user information of multiple users. A user feature may be a feature related to a specific behavior of a user, for example, a user feature may be a feature related to an ordering behavior of a user.
[0104] A user set to be predicted is obtained, and the user set may include user information of multiple different users. After the user information sample passes through the shared feature layer 220, multiple corresponding user features are obtained. The multiple user features are respectively input into the gain prediction network, and the first prediction network outputs the corresponding first prediction result, and the second prediction network outputs the corresponding second prediction result.
[0105] Step S330: determining a gain prediction result of each user in the user set according to the first prediction result and the second prediction result, so as to determine a target user from the user set based on the obtained gain prediction result.
[0106] According to some exemplary embodiments of the present disclosure, the gain prediction result may be a predicted value of the target gain of the target user output by the target gain network. The target user may be a user selected from a user set, that is, a marketing-sensitive group, and marketing reach may be performed on the target user.
[0107] In the model prediction process, after the user features pass through the two prediction networks, the final gain result is the difference between the output results of the two models, that is, Indicates the marketing reach gains of different users as the gain prediction results. After obtaining the gain prediction results of multiple users, the multiple gain prediction results are sorted in descending order. In the subsequent process, the users ranked in the top N can be selected for marketing reach.
[0108] In the user determination method disclosed in the present invention, on the one hand, the target gain model makes the trained model have higher accuracy by learning the representation of the integrated sample itself and the comparative representation learning. On the other hand, according to the gain prediction result output by the target gain model, corresponding operations are performed on the target users in the user set, which can improve the accuracy of user decision-making.
[0109] It should be noted that the terms "first", "second", etc. used in the present disclosure are only for distinguishing different result loss values, control group samples, dimensional representations, classification labels and sample similarities, and should not impose any limitations on the present disclosure.
[0110] It should be noted that, although the steps of the method of the present invention are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0111] In addition, in this exemplary embodiment, a model training device is also provided. Figure 4The model training device 400 may include: a sample acquisition module 410, a shared feature extraction module 420, a first loss value determination module 430, a second loss value determination module 440 and a network training module 450.
[0112] Specifically, the sample acquisition module 410 is used to obtain a pre-constructed training sample set, the training sample set includes multiple training sample pairs, and the training sample pairs are composed of experimental group samples and control group samples; the shared feature extraction module 420 is used to extract shared features from multiple training sample pairs to obtain shared sample features; the first loss value determination module 430 is used to input the shared sample features into the corresponding gain prediction network according to different sample classification labels to obtain gain prediction results, and determine the first result loss value based on the gain prediction results and the corresponding true output results; the second loss value determination module 440 is used to construct a second result loss value for the training sample pair, and the second result loss value is obtained by sample comparison learning of the training sample pair; the network training module 450 is used to train a pre-constructed initial model based on the first result loss value and the second result loss value to obtain a target gain model, and the gain prediction network is included in the initial model.
[0113] In an exemplary embodiment of the present disclosure, the sample acquisition module 410 includes a sample construction unit, which is used to: obtain an experimental group sample set and a control group sample set, the experimental group sample set including multiple experimental group samples; based on the control group sample set, construct positive sample pairs and negative sample pairs corresponding to each experimental group sample; based on the positive sample pairs and the negative sample pairs, construct a training sample set.
[0114] In an exemplary embodiment of the present disclosure, the control group sample set includes multiple control group samples, and the sample construction unit includes a sample construction sub-unit, which is used to: determine the sample distance between the experimental group sample and the multiple control group samples; determine the first control group sample corresponding to the experimental group sample based on the sample distance; construct a positive sample pair based on the experimental group sample and the first control group sample; determine the second control group sample corresponding to the experimental group sample, the second control group sample is other samples in the control group sample set that are different from the first control group sample; and construct a negative sample pair based on the experimental group sample and the second control group sample.
[0115] In an exemplary embodiment of the present disclosure, the initial model includes a shared feature layer, and the shared feature extraction module 420 includes a shared feature extraction unit, which is used to: obtain the shared sample features of the previous period corresponding to the training sample set in the previous training period; determine the original features of the training sample pairs, input the original features into the shared feature layer, and obtain the original shared features; determine the shared sample features corresponding to the training sample pairs based on the shared features of the previous period and the original shared features, and the shared sample features are used to construct the shared sample features of the next period corresponding to the next training period.
[0116] In an exemplary embodiment of the present disclosure, the gain prediction network includes a first prediction network and a second prediction network, the gain prediction result includes a first prediction result and a second prediction result, and the first loss value determination module 430 includes a prediction result determination unit, which is used to: determine the sample classification label of the training sample pair, the sample classification label includes a first classification label and a second classification label; input the training sample pair corresponding to the first classification label into the first prediction network to obtain a first prediction result; input the training sample pair corresponding to the second classification label into the second prediction network to obtain a second prediction result.
[0117] In an exemplary embodiment of the present disclosure, the first result loss value includes a first gain loss value and a second gain loss value, and the first loss value determination module 430 includes a gain loss construction unit: determining the first gain loss value according to the first prediction result and the corresponding first true output result; determining the second gain loss value according to the second prediction result and the corresponding second true output result.
[0118] In an exemplary embodiment of the present disclosure, the initial model includes a contrastive learning layer, and the second loss value determination module 440 includes a second function construction unit, which is used to: obtain positive sample pairs and negative sample pairs corresponding to the training sample pairs; obtain a first dimensional representation of the training sample pairs, and input the first dimensional representation into the contrastive learning layer; determine the first sample similarity of the positive sample pairs and the second sample similarity of the negative sample pairs by the contrastive learning layer; and construct a second result loss value based on the first sample similarity and the second sample similarity.
[0119] In addition, in this exemplary embodiment, a user determination device is also provided. Figure 5 The user determination device 500 may include: a model acquisition module 510, a gain prediction module 520 and a user determination module 530.
[0120] Specifically, the model acquisition module 510 is used to obtain a pre-trained target gain model, the target gain model is trained based on the above-mentioned model training method, and the target gain model includes a gain prediction network, the gain prediction network includes a first prediction network and a second prediction network; the gain prediction module 520 is used to obtain a user set, and input multiple user features of the user set into the gain prediction network respectively to obtain a first prediction result output by the first prediction network and a second prediction result output by the second prediction network; the user determination module 530 is used to determine the gain prediction result of each user in the user set according to the first prediction result and the second prediction result, so as to determine the target user from the user set based on the obtained gain prediction result.
[0121] The specific details of the virtual modules of each model training device mentioned above have been described in detail in the corresponding model training method, and the specific details of the virtual modules of each user determination device have been described in detail in the corresponding user determination method. The undisclosed details can be found in the implementation method content of the method part, and will not be repeated here.
[0122] It should be noted that although several modules or units of the model training device and the user determination device are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the present disclosure, the features and functions of two or more modules or units described above can be concretized in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.
[0123] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.
[0124] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0125] Reference below Figure 6 hereinafter describes an electronic device 600 according to such an embodiment of the present disclosure. Figure 6 The electronic device 600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0126] like Figure 6As shown, the electronic device 600 is in the form of a general computing device. The components of the electronic device 600 may include but are not limited to: at least one processing unit 610, at least one storage unit 620, a bus 630 connecting different system components (including the storage unit 620 and the processing unit 610), and a display unit 640.
[0127] The storage unit stores program codes, which can be executed by the processing unit 610, so that the processing unit 610 executes the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification.
[0128] The storage unit 620 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 621 and / or a cache memory unit 622 , and may further include a read-only memory unit (ROM) 623 .
[0129] The storage unit 620 may include a program / utility 624 having a set (at least one) of program modules 625, such program modules 625 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 an implementation of a network environment.
[0130] Bus 630 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0131] The electronic device 600 may also communicate with one or more external devices 670 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 600, and / or communicate with any device that enables the electronic device 600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 650. Furthermore, the electronic device 600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 660. As shown, the network adapter 660 communicates with other modules of the electronic device 600 via a bus 630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0132] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0133] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present invention can also be implemented in the form of a program product, which includes a program code, and when the program product is run on a terminal device, the program code is used to enable the terminal device to perform the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of the present specification.
[0134] refer to Figure 7 As shown, a program product 700 for implementing the above method according to an embodiment of the present invention is described, which can adopt a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, an apparatus or a device.
[0135] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0136] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. 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. Readable signal media may also be any readable medium other than a 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.
[0137] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0138] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0139] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to an exemplary embodiment of the present invention, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0140] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0141] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A model training method, characterized in that: include: Obtaining a pre-constructed training sample set, wherein the training sample set includes a plurality of training sample pairs, wherein the training sample pairs consist of an experimental group sample and a control group sample; Extracting shared features from the plurality of training sample pairs to obtain shared sample features; Inputting the shared sample features into corresponding gain prediction networks according to different sample classification labels respectively to obtain gain prediction results, and determining a first result loss value based on the gain prediction results and corresponding true output results; Constructing a second result loss value of the training sample pair, where the second result loss value is obtained by performing sample comparison learning on the multiple training sample pairs; Based on the first result loss value and the second result loss value, a pre-constructed initial model is trained to obtain a target gain model, and the gain prediction network is included in the initial model.
2. The method according to claim 1, characterized in that The step of obtaining a pre-built training sample set includes: Acquire an experimental group sample set and a control group sample set, wherein the experimental group sample set includes a plurality of the experimental group samples; Based on the control group sample set, construct a positive sample pair and a negative sample pair corresponding to each of the experimental group samples; The training sample set is constructed based on the positive sample pairs and the negative sample pairs.
3. The method according to claim 2, characterized in that The control group sample set includes a plurality of control group samples, and constructing a positive sample pair and a negative sample pair corresponding to each of the experimental group samples based on the control group sample set includes: Determine the sample distance between the experimental group sample and a plurality of the control group samples; Determining a first control group sample corresponding to the experimental group sample according to the sample distance; Constructing the positive sample pair based on the experimental group sample and the first control group sample; Determine a second control group sample corresponding to the experimental group sample, where the second control group sample is another sample in the control group sample set that is different from the first control group sample; Based on the experimental group samples and the second control group samples, the negative sample pairs are constructed.
4. The method according to claim 1 or 2, characterized in that: The initial model includes a shared feature layer, and the step of extracting shared features from the plurality of training sample pairs to obtain shared sample features includes: Obtaining the shared sample features of the training sample set in the previous period corresponding to the previous training period; Determining original features of the training sample pair, and inputting the original features into the shared feature layer to obtain original shared features; The shared sample features corresponding to the training sample pair are determined according to the shared features of the previous period and the original shared features, and the shared sample features are used to construct the shared sample features of the next period corresponding to the next training period.
5. The method according to claim 1, characterized in that The gain prediction network includes a first prediction network and a second prediction network, the gain prediction result includes a first prediction result and a second prediction result, and the plurality of training sample pairs are input into the corresponding gain prediction network according to different sample classification labels to obtain the gain prediction result, including: Determine a sample classification label of the training sample pair, wherein the sample classification label includes a first classification label and a second classification label; Inputting the training sample pairs corresponding to the first classification labels into the first prediction network to obtain a first prediction result; The training sample pairs corresponding to the second classification labels are input into the second prediction network to obtain a second prediction result.
6. The method according to claim 5, characterized in that The first result loss value includes a first gain loss value and a second gain loss value, and determining the first result loss value based on the gain prediction result includes: Determining the first gain loss value according to the first prediction result and the corresponding first true output result; The second gain loss value is determined according to the second prediction result and the corresponding second true output result.
7. The method according to claim 1, characterized in that The initial model includes a contrastive learning layer, and the constructing of the second result loss value of the training sample pair includes: Obtaining a positive sample pair and a negative sample pair corresponding to the training sample pair; Obtaining a first dimensional representation of the training sample pair, and inputting the first dimensional representation into a contrastive learning layer; Determining, by the contrastive learning layer, a first sample similarity of the positive sample pair and a second sample similarity of the negative sample pair; Based on the first sample similarity and the second sample similarity, the second result loss value is constructed.
8. A user determination method, characterized in that: include: Obtain a pre-trained target gain model, wherein the target gain model is trained based on the model training method according to any one of claims 1 to 7, and the target gain model includes a gain prediction network, wherein the gain prediction network includes a first prediction network and a second prediction network; Acquire a user set, input a plurality of user features of the user set into the gain prediction network respectively, obtain a first prediction result output by the first prediction network, and obtain a second prediction result output by the second prediction network; The gain prediction result of each user in the user set is determined according to the first prediction result and the second prediction result, so as to determine a target user from the user set based on the obtained gain prediction result.
9. A model training device, characterized in that: include: A sample acquisition module, used to acquire a pre-constructed training sample set, wherein the training sample set includes a plurality of training sample pairs, and the training sample pairs are composed of experimental group samples and control group samples; A shared feature extraction module, used to extract shared features from the plurality of training sample pairs to obtain shared sample features; A first loss value determination module is used to input the shared sample features into the corresponding gain prediction network according to different sample classification labels to obtain a gain prediction result, and determine a first result loss value based on the gain prediction result and the corresponding true output result; A second loss value determination module, used to construct a second result loss value of the training sample pair, where the second result loss value is obtained by performing sample comparison learning on the training sample pair; A network training module is used to train a pre-constructed initial model based on the first result loss value and the second result loss value to obtain a target gain model, and the gain prediction network is included in the initial model.
10. A user determination device, characterized in that: include: A model acquisition module, used to acquire a pre-trained target gain model, wherein the target gain model is trained based on the model training method according to any one of claims 1 to 7, and the target gain model includes a gain prediction network, wherein the gain prediction network includes a first prediction network and a second prediction network; A gain prediction module, used to obtain a user set, input a plurality of user features of the user set into the gain prediction network respectively, and obtain a first prediction result output by the first prediction network and a second prediction result output by the second prediction network; The user determination module is used to determine the gain prediction result of each user in the user set according to the first prediction result and the second prediction result, so as to determine the target user from the user set based on the obtained gain prediction result.
11. An electronic device, characterized in that: include: processor; as well as A memory having computer-readable instructions stored thereon, wherein the computer-readable instructions, when executed by the processor, implement the model training method as described in any one of claims 1 to 7, or implement the user determination method as described in claim 8.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, it implements the model training method as described in any one of claims 1 to 7, or implements the user determination method as described in claim 8.
Citation Information
Cited By
Optimization method for gain model and time sequence prediction model
CN120911531A
Gain model training method and device and method and device for predicting reach gain by using gain model
CN121327508A
