Training method of duration estimation model, consumption duration estimation method and device
By using a multi-gated hybrid expert network (MMOE) model, combining the first and second prediction modules, the training process of the duration prediction model is optimized, the directional bias problem is solved, and the effective capture of extreme values and directional bias is achieved, thereby improving the accuracy of consumption duration prediction.
Patent Information
- Application Number
- CN202510906737.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-10-28
AI Technical Summary
Existing duration prediction models suffer from directional bias during training, resulting in insufficient ability to capture extreme values and directional biases, which affects the accuracy of consumption duration prediction.
A multi-gated hybrid expert network (MMOE) model is adopted. The consumption duration and consumption probability related to resource samples are obtained through the first prediction module and the second prediction module, respectively. The model is trained based on multiple consumption durations and consumption probabilities, transforming the implicit symmetric penalty into an explicit controllable optimization, thereby enhancing the ability to capture extreme values and directional biases.
This improves the training performance of the duration prediction model, enabling it to predict the duration of a target user's consumption of a target resource relatively accurately in resource recommendation scenarios.
Smart Images

Figure CN120851104A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to machine learning, intelligent search, intelligent recommendation, and information flow. It can be used in application scenarios such as generative search, intelligent document editing, intelligent assistant, virtual assistant, and intelligent e-commerce. Specifically, it relates to a training method for a duration prediction model, a consumption duration prediction method, and a device. Background Technology
[0002] In today's world of massive resource overload, recommender systems act as a bridge, closely connecting users and resources. They use recommendation algorithms to suggest resources that users may be interested in. To ensure the long-term stable operation of recommender systems, user behavior prediction models are indispensable, and in resource recommendation scenarios, user consumption time is a key area for optimization. Summary of the Invention
[0003] This disclosure provides a training method for a duration prediction model, a method for predicting consumption duration, and an apparatus.
[0004] According to a first aspect of this disclosure, a method for training a duration prediction model is provided, comprising:
[0005] Based on resource samples and user samples, feature data samples are obtained;
[0006] Using the first prediction module included in the duration prediction model, multiple first consumption durations related to resource samples are obtained based on feature data samples; wherein, multiple first consumption durations correspond one-to-one with multiple first duration intervals;
[0007] Using the second prediction module included in the duration prediction model, based on feature data samples, multiple first consumption probabilities are obtained that correspond one-to-one with multiple first duration intervals; wherein, the first consumption probability is used to characterize the probability that the consumption duration of a user sample for a resource sample falls into the first duration interval corresponding to the first consumption probability;
[0008] The duration prediction model is trained based on multiple first consumption durations and multiple first consumption probabilities.
[0009] According to a second aspect of this disclosure, a method for estimating consumption duration is provided, comprising:
[0010] Based on the target resources and target users, target feature data is obtained;
[0011] Using the first prediction module included in the duration prediction model, multiple second consumption durations related to the target resource are obtained based on the target feature data; wherein, the multiple second consumption durations correspond one-to-one with multiple second duration intervals;
[0012] Using the second prediction module included in the duration prediction model, based on the target feature data, multiple second consumption probabilities are obtained that correspond one-to-one with multiple second duration intervals; wherein, the second consumption probability is used to characterize the likelihood that the consumption duration of the target user for the target resource falls into the second duration interval corresponding to the second consumption probability;
[0013] Based on multiple second consumption durations and multiple second consumption probabilities, the estimated result of the target user's second consumption duration for the target resource is obtained.
[0014] According to a third aspect of this disclosure, a training apparatus for a duration prediction model is provided, comprising:
[0015] The feature data sample acquisition unit is used to obtain feature data samples based on resource samples and user samples;
[0016] The first consumption duration acquisition unit is used to obtain multiple first consumption durations related to resource samples based on feature data samples by utilizing the first prediction module included in the duration prediction model; wherein, the multiple first consumption durations correspond one-to-one with multiple first duration intervals.
[0017] The first consumption probability acquisition unit is used to obtain multiple first consumption probabilities corresponding one-to-one with multiple first duration intervals based on feature data samples by utilizing the second prediction module included in the duration prediction model; wherein, the first consumption probability is used to characterize the probability that the consumption duration of a user sample for a resource sample falls into the first duration interval corresponding to the first consumption probability.
[0018] The model training unit is used to train the duration prediction model based on multiple first consumption durations and multiple first consumption probabilities.
[0019] According to a fourth aspect of this disclosure, a consumption duration estimation device is provided, comprising:
[0020] The target feature data acquisition unit is used to obtain target feature data based on target resources and target users;
[0021] The second consumption duration acquisition unit is used to obtain multiple second consumption durations related to the target resource based on the target feature data using the first prediction module included in the duration prediction model; wherein, the multiple second consumption durations correspond one-to-one with multiple second duration intervals.
[0022] The second consumption probability acquisition unit is used to obtain multiple second consumption probabilities corresponding one-to-one with multiple second duration intervals based on the target feature data by utilizing the second prediction module included in the duration prediction model; wherein, the second consumption probability is used to characterize the probability that the consumption duration of the target user for the target resource falls into the second duration interval corresponding to the second consumption probability.
[0023] The consumption duration estimation unit is used to obtain the estimated result of the target user's second consumption duration for the target resource based on multiple second consumption durations and multiple second consumption probabilities.
[0024] According to a fifth aspect of this disclosure, an electronic device is provided, comprising:
[0025] At least one processor;
[0026] Memory that is communicatively connected to at least one processor;
[0027] The memory stores instructions that can be executed by at least one processor to enable the at least one processor to perform the methods provided in the first and / or second aspects of this disclosure.
[0028] According to a sixth aspect of this disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided; wherein the computer instructions are used to cause a computer to perform the methods provided in the first and / or second aspects of this disclosure.
[0029] According to a seventh aspect of this disclosure, a computer program product is provided, including a computer program; wherein, when executed by a processor, the computer program is capable of implementing the methods provided in the first and / or second aspects of this disclosure.
[0030] The present disclosure can optimize the training effect of the duration prediction model, so that when the trained duration prediction model is applied to the resource recommendation scenario, the consumption duration prediction result of the target user for the target resource can be obtained relatively accurately.
[0031] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0032] The accompanying drawings are provided to better understand this solution and do not constitute a limitation of this disclosure. Wherein:
[0033] Figure 1 A flowchart illustrating a training method for a duration prediction model provided in this embodiment of the disclosure;
[0034] Figure 2 A complete flowchart illustrating a training method for a duration prediction model provided in this embodiment of the disclosure;
[0035] Figure 3 An auxiliary illustrative diagram illustrating a training method for a duration prediction model provided in this disclosure embodiment;
[0036] Figure 4 A flowchart illustrating a method for estimating consumption duration provided in an embodiment of this disclosure;
[0037] Figure 5 A complete flowchart illustrating a method for estimating consumption duration provided in this disclosure embodiment;
[0038] Figure 6 An illustrative diagram illustrating a method for estimating consumption duration provided in this disclosure;
[0039] Figure 7 A schematic diagram illustrating an application scenario of a training method for a duration prediction model provided in this embodiment of the disclosure;
[0040] Figure 8 This is a schematic diagram illustrating an application scenario of a consumption duration estimation method provided in an embodiment of this disclosure;
[0041] Figure 9 A schematic structural block diagram of a training device for a duration prediction model provided in this disclosure embodiment;
[0042] Figure 10 A schematic structural block diagram of a consumption duration estimation device provided in this disclosure embodiment;
[0043] Figure 11 This is a schematic structural block diagram of an electronic device provided in an embodiment of the present disclosure. Detailed Implementation
[0044] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.
[0045] As mentioned in the background section, user behavior prediction models are indispensable for ensuring the long-term stable operation of recommendation systems, and in resource recommendation scenarios, user consumption time is a key area for optimization. In other words, for user behavior prediction models, the duration prediction model is an indispensable and relatively important component. Current duration prediction models are often trained in the following ways:
[0046] Obtain the actual consumption time of users on resource samples as the raw label data, and perform a logarithmic operation on the raw label data (i.e., take the Log) to obtain the target label data;
[0047] The original consumption duration is predicted using a duration prediction model on a logarithmic scale, and the original consumption duration is restored to the original scale using an exponential function to obtain the target consumption duration prediction result.
[0048] Calculate the mean squared error (MSE) or mean absolute error (MAE) between the target consumption duration prediction result and the target label data, and use it as the loss value;
[0049] The duration prediction model is trained using the loss value.
[0050] However, the inventors' research revealed that while the training process compressed the prediction range of the original consumption duration estimate, the single-value regression task still falls under the category of average value prediction. Furthermore, considering the loss functions commonly used in single-value regression (e.g., MSE or MAE loss functions), directional bias can lead to similar or identical loss values in different situations. For example, the loss values obtained are the same for "target consumption duration estimate - target label data value = 0.5" and "target consumption duration estimate - target label data = -0.5". This limits the duration prediction model's ability to capture extreme values or directional bias, thus affecting the training effect of the model. Consequently, when the trained duration prediction model is applied to resource recommendation scenarios, it cannot accurately predict the consumption duration of the target user for the target resource.
[0051] To address the above problems, this disclosure provides a training method for a duration prediction model, which can be applied to electronic devices. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer (e.g., a desktop computer), or other similar computing devices. The following will be combined with... Figure 1 The flowchart shown illustrates a training method for a duration prediction model provided in this embodiment of the present disclosure. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described in the flowchart may be executed in a different order.
[0052] Step S101: Based on resource samples and user samples, obtain feature data samples.
[0053] The resource samples can be video resources (e.g., short video resources), audio resources, text and image resources, etc. provided by the application (APP), and the APP can be, but is not limited to, news APP, social APP, and shopping APP; the user samples can be any user of the APP.
[0054] Furthermore, it should be noted that in this embodiment of the disclosure, the feature data sample can be used to characterize the resource features of the resource sample and the user features of the user sample, and this embodiment of the disclosure does not limit this.
[0055] Step S102: Using the first estimation module included in the duration estimation model, based on the feature data samples, obtain multiple first consumption durations related to the resource samples.
[0056] The duration prediction model can be a multi-gate mixture of experts (MMOE), and the first prediction module can be a first task-specific tower in the MMOE, used to obtain multiple first consumption durations related to resource samples based on feature data samples. Here, the multiple first consumption durations are in an increasing order, and each of the multiple first consumption durations can correspond one-to-one with multiple first duration intervals. Specifically, for each of the multiple first duration intervals, its high-order boundary value can be its corresponding first consumption duration, and its low-order boundary value can be the previous first consumption duration of its corresponding first consumption duration. For example, we have:
[0057]
[0058] Step S103: Using the second prediction module included in the duration prediction model, based on the feature data samples, obtain multiple first consumption probabilities that correspond one-to-one with multiple first duration intervals.
[0059] The second prediction module can be a dedicated tower for the second task in an MMOE, used to obtain multiple first consumption probabilities corresponding one-to-one with multiple first duration intervals based on feature data samples. Here, each of the multiple first consumption probabilities can be used to characterize the probability that the consumption duration of a user sample for a resource sample falls within the first duration interval corresponding to that first consumption probability. For example, we have:
[0060]
[0061] In other words, the probability that the user sample's consumption time of the resource sample falls into the first duration interval B1 is 20%; the probability that the user sample's consumption time of the resource sample falls into the first duration interval B2 is 50%; the probability that the user sample's consumption time of the resource sample falls into the first duration interval B3 is 20%; and the probability that the user sample's consumption time of the resource sample falls into the first duration interval B4 is 10%.
[0062] Step S104: Train the duration prediction model based on multiple first consumption durations and multiple first consumption probabilities.
[0063] It should be noted that, in this embodiment of the disclosure, the parameters of the duration prediction model can be adjusted based on multiple first consumption durations and multiple first consumption probabilities to achieve the purpose of training the duration prediction model. Adjusting the parameters of the duration prediction model may include adjusting the parameters of the first prediction module and adjusting the parameters of the second prediction module.
[0064] It should also be noted that in this embodiment, steps S101, S102, S103, and S104 can be executed cyclically until the duration prediction model meets the preset convergence condition, thus obtaining a trained duration prediction model for use in subsequent consumption duration prediction methods. The preset convergence condition can be set based on application requirements, and this embodiment does not impose any limitations on it.
[0065] The training method of the duration prediction model provided in this disclosure can be used to obtain feature data samples based on resource samples and user samples. Then, using the first prediction module included in the duration prediction model, multiple first consumption durations that are related to resource samples and correspond one-to-one with multiple first duration intervals are obtained based on the feature data samples. Additionally, using the second prediction module included in the duration prediction model, multiple first consumption probabilities that correspond one-to-one with multiple first duration intervals are obtained based on the feature data samples. Finally, the duration prediction model is trained based on the multiple first consumption durations and multiple first consumption probabilities. Obviously, the training method of the duration prediction model provided in this disclosure can transform the directional deviation problem from the traditional "implicit symmetric penalty" to "explicit controllable optimization" through multi-objective optimization (optimization of multiple first consumption durations and optimization of multiple first consumption probabilities). This enhances the duration prediction module's ability to capture extreme values or directional deviations, thereby optimizing the training effect of the duration prediction model. When the trained duration prediction model is applied to a resource recommendation scenario, it can obtain the consumption duration prediction result of the target user for the target resource relatively accurately.
[0066] In some optional implementations, step S101, namely, "obtaining feature data samples based on resource samples and user samples", may include:
[0067] Obtain the static resource characteristics of the resource samples, as well as the consumption scenario characteristics of the resource samples;
[0068] Obtain user characteristics from user samples;
[0069] By utilizing the feature processing module included in the duration prediction model, the static resource features of resource samples, the consumption scenario features of resource samples, and the user features of user samples are processed to obtain feature data samples.
[0070] The static resource characteristics of a resource sample can include resource attributes, resource category, and resource popularity information. For resource attributes, when the resource sample is a video resource, it can include duration, resolution, frame rate, encoding format, and whether it contains subtitles; when the resource sample is an audio resource, it can include duration, bitrate, and number of channels; when the resource sample is a text / image resource, it can include the number of words, number of paragraphs, number of images, and whether it contains multimedia data (e.g., tables, formulas). For resource categories, it can be news, entertainment, sports, education, etc. For resource popularity information, it can include the number of likes, favorites, and shares, and may also include ratings and the first historical consumption data for the resource sample. Here, the first historical consumption data can include the historical user group that consumed the resource sample, and the specific consumption details (e.g., consumption duration) of each historical user in the historical user group.
[0071] The consumption scenario characteristics of resource samples can include scenario attributes, consumption time, device type, network status, etc. For scenario attributes, it can be a main channel scenario or an immersive scenario; for consumption time, it can be a weekday or weekend, or daytime or nighttime; for device type, it can be a computer, tablet, mobile phone, etc.; for network status, it can be mobile network communication status, mobile hotspot connection status, and may also include network quality, etc.
[0072] The user characteristics of the user sample can include identity information, historical behavioral characteristics, real-time behavioral characteristics, and social relationships. Identity information can include age, gender, region, cultural background, and occupation. Historical behavioral characteristics can include second-historical consumption patterns, preference categories, and historical completion rates. Real-time behavioral characteristics can include the number of resources currently consumed, the time of the most recent interaction, the current continuous consumption duration, and the current operation frequency. Social relationships can include the number of followers, the consumption behavior of followers, the number of fans, and social activity. Here, second-historical consumption patterns can include the sequence of historically consumed resources, and the specific consumption details of each historical resource in that sequence (e.g., including consumption duration).
[0073] Furthermore, it should be noted that in this embodiment of the disclosure, the feature processing module may be the feature embedding module in MMOE, which can be used to map the static resource features of resource samples, the consumption scenario features of resource samples, and the user features of user samples into high-dimensional dense vectors, and use the high-dimensional dense vectors as feature data samples.
[0074] In this embodiment of the present disclosure, the static resource features and consumption scenario features of resource samples can be obtained simultaneously with the user features of user samples. The feature processing module included in the duration prediction model is used to process the static resource features, consumption scenario features, and user features of user samples to obtain feature data samples, thereby ensuring the richness of feature data samples and further optimizing the training effect of the duration prediction model.
[0075] In some optional implementations, step S102, namely, "using the first estimation module included in the duration estimation model to obtain multiple first consumption durations related to the resource sample based on the feature data sample," may include:
[0076] Obtain multiple first quantiles;
[0077] Using the first prediction module included in the duration prediction model, based on the feature data samples, multiple first consumption durations are obtained that are related to the resource samples and correspond one-to-one with multiple first quantiles.
[0078] The multiple first quantiles can be in an increasing order, and can be preset or acquired in real time. Specifically, when the multiple first quantiles are preset, they can be set as multiple quantiles with equal intervals (here, equal interval can be understood as having approximately equal intervals), for example, 0.25, 0.50, 0.75, and 0.99; when the multiple first quantiles are acquired in real time, they can be set based on application requirements, and this disclosure embodiment does not impose any restrictions on this.
[0079] After obtaining multiple first quantiles, the first prediction module included in the duration prediction model can be used to obtain multiple first consumption durations that are related to the resource sample and correspond one-to-one with the multiple first quantiles, based on feature data samples. Specifically, the first prediction module included in the duration prediction model can be used to obtain multiple first consumption durations that are related to the resource sample and correspond one-to-one with the multiple first quantiles, based on the first data processing result sample and the second data processing result sample obtained from the feature data sample. The first data processing result sample can be feature data related to the multiple first consumption durations obtained based on the feature data sample; the second data processing result sample can be feature data related to both the multiple first consumption durations and the multiple first consumption probabilities obtained based on the feature data sample. For each of the multiple first consumption durations, it can be used to characterize that, in the historical consumption user group of the resource sample, a first proportion of historical users have an upper limit of consumption duration for the resource sample equal to that first consumption duration. The first proportion is obtained based on the first quantile corresponding to that first consumption duration; for example, the first proportion can be equal to the first quantile corresponding to that first consumption duration. For example, if a first consumption duration A1 = 20 minutes and its corresponding first quantile is 0.25, it can be used to characterize that in the historical user group of the resource sample, 25% of the historical users have a consumption duration of 20 minutes or less for the resource sample. That is, in the historical user group of the resource sample, 25% of the historical users have a consumption duration of less than or equal to 20 minutes for the resource sample. For example, if a first consumption duration A2 = 30 minutes and its corresponding first quantile is 0.50, it can be used to characterize that in the historical user group of the resource sample, 50% of the historical users have a consumption duration of 30 minutes or less for the resource sample. That is, in the historical user group of the resource sample, 50% of the historical users have a consumption duration of less than or equal to 30 minutes for the resource sample.
[0080] Through the above methods, in this embodiment of the disclosure, multiple first quantiles can be obtained, and using the first prediction module included in the duration prediction model, multiple first consumption durations related to resource samples and corresponding one-to-one with multiple first quantiles can be obtained based on feature data samples. In other words, in this embodiment of the disclosure, multiple first quantiles in an increasing state can ensure the orderly regression of multiple first consumption durations, thereby further optimizing the training effect of the duration prediction model; moreover, when the source of the feature data samples includes user features of user samples (belonging to the personalized features of user samples), the accuracy of multiple first consumption durations can be significantly improved, further optimizing the training effect of the duration prediction model.
[0081] Furthermore, in this embodiment of the disclosure, when multiple first quantiles are acquired in real time, multiple first quantiles can be acquired in the following ways:
[0082] Determine the initial online duration of the resource sample;
[0083] Based on the first online duration, multiple first quantiles were obtained.
[0084] The first online duration can be used to characterize the release duration of resource samples, and the first online duration can be used to determine whether a resource sample belongs to a cold start resource.
[0085] In one example, if the first online duration is less than or equal to a first preset duration threshold, the resource sample can be determined to be a cold start resource; if the first online duration is greater than the first preset duration threshold, the resource sample can be determined not to be a cold start resource. The first preset duration threshold can be set based on application requirements, and this embodiment does not impose any restrictions on it.
[0086] Based on this, in this embodiment of the disclosure, if it is determined that the resource sample belongs to the cold start resource based on the first online duration, multiple first quantiles can be obtained within the first quantile interval based on the business objective; or, if it is determined that the resource sample does not belong to the cold start resource based on the first online duration, multiple quantiles with equal intervals (here, equal interval can be understood as having approximately equal intervals) can be obtained within the first quantile interval as multiple first quantiles. The business objective can be to improve cold start efficiency or to ensure the reliability of the prediction results; the first quantile interval can be (0, 1], and the multiple equally spaced quantiles obtained within the first quantile interval can be 0.25, 0.50, 0.75, and 0.99.
[0087] Furthermore, as mentioned above, in this embodiment of the disclosure, the business objective can be to improve cold start efficiency or to ensure the reliability of the prediction results. Based on this, in this embodiment of the disclosure, when obtaining multiple first quantiles within a first quantile interval based on the business objective, if the business objective is to improve cold start efficiency, a first number of lower quantiles and a second number of higher quantiles can be obtained within the first quantile interval, and the first number of lower quantiles and the second number of higher quantiles can be used together as multiple first quantiles; or, if the business objective is to ensure the reliability of the prediction results, a third number of lower quantiles and a fourth number of higher quantiles can be obtained within the first quantile interval, and the third number of lower quantiles and the fourth number of higher quantiles can be used together as multiple first quantiles. Wherein, the first quantity is greater than the second quantity, and the first and second quantities can be set based on application requirements, and this embodiment of the disclosure does not impose any restrictions on this; the third quantity is less than the fourth quantity, and the third and fourth quantities can be set based on application requirements, and this embodiment of the disclosure does not impose any restrictions on this; the lower quantile can be the quantile of the lower quantile sub-interval (0, 0.50) within the first quantile interval; the higher quantile can be the quantile of the higher quantile sub-interval (0.50, 0.99) within the first quantile interval. For example, when the business objective is to improve cold start efficiency, and the first quantity is 3 and the second quantity is 1, three lower quantiles can be randomly obtained within the first quantile interval, or three specified lower quantiles can be obtained, for example, 0.10, 0.30. And 0.50, and within the first quantile interval, randomly select one higher quantile, or select one specified higher quantile, for example, 0.99, and use 0.10, 0.30, 0.50 and 0.99 together as multiple first quantiles; for example, when the business objective is to ensure the reliability of the prediction result, and the third quantity is 1 and the fourth quantity is 3, within the first quantile interval, randomly select one lower quantile, or select one specified lower quantile, for example, 0.50, and within the first quantile interval, randomly select three higher quantiles, or select three specified higher quantiles, for example, 0.60, 0.80 and 0.99, and use 0.50, 0.60, 0.80 and 0.99 together as multiple first quantiles.
[0088] Through the above methods, in this embodiment of the disclosure, the first online duration of a resource sample can be determined, and multiple first quantiles can be obtained based on the first online duration, thereby improving the adaptability of the trained duration prediction model to application requirements. Specifically, when obtaining multiple first quantiles based on the first online duration, if it is determined that the resource sample belongs to a cold start resource based on the first online duration, multiple first quantiles can be obtained within the first quantile interval based on business objectives, thereby improving the adaptability of the trained duration prediction model to business objectives; or, if it is determined that the resource sample does not belong to a cold start resource based on the first online duration, multiple quantiles at equal intervals can be obtained within the first quantile interval as multiple first quantiles, thereby ensuring the reliability of the prediction results. Specifically, it can ensure that when the trained duration prediction model is applied to a resource recommendation scenario, the second consumption duration prediction result of the target user for the target resource is relatively reliable.
[0089] More specifically, when determining that a resource sample belongs to a cold-start resource based on the first online duration, and considering the business objective of improving cold-start efficiency, a first number of lower quantiles and a second number of higher quantiles can be obtained within the first quantile interval. These first number of lower quantiles and second number of higher quantiles are then combined to form multiple first quantiles, with the first number being greater than the second number. This allows the duration prediction model to learn how to optimistically estimate the first consumption duration when determining that a resource sample belongs to a cold-start resource based on the first online duration. Thus, when the trained duration prediction model is applied to resource recommendation scenarios, cold-start resources can be quickly promoted, thereby improving their startup efficiency. Alternatively, when determining that a resource sample belongs to a cold-start resource based on the first online duration, to ensure the reliability of the prediction result, a third number of lower quantiles and a fourth number of higher quantiles can be obtained within the first quantile interval, while maintaining business objectives. These third number of lower quantiles and fourth number of higher quantiles can then be combined to form multiple first quantiles, where the third number is less than the fourth number. This allows the duration prediction model to learn how to conservatively estimate the first consumption duration when determining that a resource sample belongs to a cold-start resource based on the first online duration. This ensures that when the trained duration prediction model is applied to resource recommendation scenarios, the estimated second consumption duration of the target user for the target resource is relatively reliable.
[0090] In some optional implementations, step S103, namely, "using the second estimation module included in the duration estimation model to obtain multiple first consumption probabilities corresponding one-to-one with multiple first duration intervals based on feature data samples," can be: using the second estimation module included in the duration estimation model to obtain multiple first consumption probabilities corresponding one-to-one with multiple first duration intervals based on second data processing result samples and third data processing result samples obtained from feature data samples. The second data processing result samples can be feature data related to both multiple first consumption durations and multiple first consumption probabilities, obtained based on feature data samples; the third data processing result samples can be feature data related to multiple first consumption probabilities, obtained based on feature data samples.
[0091] In some optional implementations, step S104, namely, "training the duration prediction model based on multiple first consumption durations and multiple first consumption probabilities," may include:
[0092] Based on multiple initial consumption durations, the first loss is determined;
[0093] Based on multiple first consumption durations and multiple first consumption probabilities, a second loss is derived;
[0094] The duration prediction model is trained using the first loss and the second loss.
[0095] After obtaining a first loss based on multiple first consumption durations and a second loss based on multiple first consumption durations and multiple first consumption probabilities, the duration prediction model can be trained using the first and second losses. Specifically, the first and second losses can be weighted and summed to obtain an overall loss, and the duration prediction model can be trained based on this overall loss; that is, the parameters of the duration prediction model can be adjusted to achieve the purpose of training the duration prediction model. When weighting and summing the first and second losses, a weight ratio of 0.50:0.50 can be used. Adjusting the parameters of the duration prediction model can include adjusting the parameters of the feature processing module, the parameters of the first prediction module, and the parameters of the second prediction module.
[0096] Furthermore, in one example, the first loss can be obtained in the following way:
[0097] For each of the multiple first consumption durations, based on the first consumption duration and the first quantile corresponding to the first consumption duration, the individual loss corresponding to the first consumption duration is obtained;
[0098] Obtain multiple first weights that correspond one-to-one with multiple first consumption durations;
[0099] Based on multiple first weights and multiple individual losses corresponding one-to-one with multiple first consumption durations, the first loss is obtained.
[0100] In a specific example, the quantile loss function (also known as the pinball loss function) can be used to obtain the individual loss corresponding to the first consumption duration, based on the first consumption duration and the first quantile corresponding to the first consumption duration. This process can be characterized as follows:
[0101]
[0102] in, It can be used to characterize the individual loss corresponding to the first consumption duration; 'a' can be used to characterize the first quantile corresponding to the first consumption duration; 'x' can be used to characterize the actual consumption duration of the user sample on the resource sample. It can be used to characterize the duration of the first consumption.
[0103] After obtaining multiple individual losses corresponding one-to-one with multiple first consumption durations, and multiple first weights corresponding one-to-one with multiple first consumption durations (here, the multiple first weights can be equal, and the sum of the multiple first weights can be 1), the first loss can be obtained based on the multiple first weights and multiple individual losses. This process can be characterized as:
[0104]
[0105] Wherein, L1 can be used to represent the first loss; n1 can be used to represent the total number of individual losses, which is also equal to the total number of first weights; Lai can be used to represent the i-th individual loss among multiple (specifically n1) individual losses; Wi can be used to represent the first weight corresponding to the i-th individual loss among multiple (specifically n1) first weights.
[0106] In another example, the second loss can be obtained in the following way:
[0107] Based on multiple first consumption durations and multiple first consumption probabilities, the estimated first consumption duration of user samples for resource samples is obtained;
[0108] Obtain the actual consumption time of user samples on resource samples;
[0109] Based on the estimated first consumption duration and the actual consumption duration, the second loss is derived.
[0110] After obtaining multiple first consumption durations and multiple first consumption probabilities, the estimated first consumption duration of user samples for resource samples can be obtained through the following methods:
[0111]
[0112] Wherein, H1 can be used to characterize the prediction result of the first consumption duration of the resource sample by the user sample; n2 can be used to represent the total number of first consumption durations, which is also equal to the total number of first consumption probabilities; hi can be used to characterize the i-th first consumption duration among multiple (specifically n2) first consumption durations; P i It can be used to characterize the first consumption probability corresponding to the i-th first consumption duration among multiple (specifically n2) first consumption probabilities.
[0113] After obtaining the first consumption duration prediction result of the user sample on the resource sample, and the actual consumption duration of the user sample on the resource sample, a second loss can be obtained based on the first consumption duration prediction result and the actual consumption duration. For example, the difference between the actual consumption duration and the first consumption duration prediction result can be used as the second loss. That is, the second loss can be the actual consumption duration minus the first consumption duration prediction result.
[0114] In this embodiment of the present disclosure, a first loss can be obtained based on multiple first consumption durations, and a second loss can be obtained based on multiple first consumption durations and multiple first consumption probabilities. The duration prediction model can then be trained using the first and second losses. In other words, in this embodiment of the present disclosure, when training the duration prediction model, the model is trained based on the overall loss represented by the first and second losses, rather than solely considering either the first or the second loss, thereby further optimizing the training effect of the duration prediction model. Furthermore, when deriving the first loss based on multiple first consumption durations, for each of the multiple first consumption durations, a single-item loss corresponding to the first consumption duration is obtained based on the first consumption duration and the first quantile corresponding to the first consumption duration. Multiple first weights corresponding one-to-one with the multiple first consumption durations are then obtained, and the first loss is derived based on these multiple first weights and the multiple single-item losses corresponding one-to-one with the multiple first consumption durations. When deriving the second loss based on multiple first consumption durations and multiple first consumption probabilities, the estimated first consumption duration of the user sample on the resource sample and the actual consumption duration of the user sample on the resource sample can be obtained based on the multiple first consumption durations and multiple first consumption probabilities. The second loss is then derived based on the estimated first consumption duration and the actual consumption duration. This process does not involve complex computational procedures, thus improving the training efficiency of the duration prediction model.
[0115] The following, combined with Figure 2 and Figure 3 The complete process of training a duration prediction model provided in this disclosure embodiment will be described.
[0116] Step S201: Obtain the static resource features of the resource samples and the consumption scenario features of the resource samples, and obtain the user features of the user samples. Then, use the feature processing module included in the duration prediction model to process the static resource features of the resource samples, the consumption scenario features of the resource samples, and the user features of the user samples to obtain feature data samples.
[0117] In this embodiment of the disclosure, the specific function and examples of step S201 can be found in the relevant descriptions of the corresponding steps (e.g., step S101) in the aforementioned embodiment of the training method for the duration prediction model, and will not be repeated here.
[0118] Step S202: Using the duration expert network included in the duration prediction model, the feature data sample is processed to obtain the first data processing result sample.
[0119] Among them, the duration prediction model can be MMOE, while the duration expert network, also known as the duration expert network, belongs to the feature extraction network and can be used to process feature data samples to obtain first data processing result samples related to multiple first consumption durations.
[0120] Step S203: Using the shared expert network included in the duration prediction model, the feature data samples are processed to obtain the second data processing result sample.
[0121] Among them, the shared expert network, also known as the shared expert network, belongs to the feature extraction network. It can be used to process feature data samples to obtain second data processing result samples that are related to multiple first consumption durations and multiple first consumption probabilities.
[0122] Step S204: Using the probabilistic expert network included in the duration prediction model, the feature data samples are processed to obtain the third data processing result sample.
[0123] Among them, the probabilistic expert network, also known as the probabilistic expert network, belongs to the feature extraction network. It can be used to process feature data samples to obtain third data processing result samples related to multiple first consumption probabilities.
[0124] Step S205: Obtain multiple first quantiles, and using the first prediction module included in the duration prediction model, based on the first data processing result sample and the second data processing result sample obtained from the feature data sample, obtain multiple first consumption durations that are related to the resource sample and correspond one-to-one with the multiple first quantiles.
[0125] The first prediction module can be the first task-specific tower in the MMOE, which may include multiple first neural network layers; the multiple first consumption durations are in an increasing state, and the multiple first consumption durations can correspond one-to-one with multiple first duration intervals.
[0126] In one example, the feature data sample can be processed by the first gating network included in the duration prediction model to obtain the first control feature sample. After obtaining the first data processing result sample and the second data processing result sample, the weight of the first data processing result sample is adjusted based on the first control feature sample to obtain the first feature sample to be concatenated. Based on the first control feature sample, the weight of the second data processing result sample is adjusted to obtain the second feature sample to be concatenated. The first feature sample to be concatenated and the second feature sample to be concatenated are then concatenated to obtain the first feature concatenation result sample. In this way, the first prediction module included in the duration prediction model can obtain multiple first consumption durations that are related to the resource sample and correspond one-to-one with multiple first quantiles based on the first feature concatenation result sample.
[0127] Furthermore, it should be noted that other functions and examples of step S205 in this embodiment can be found in the relevant descriptions of the corresponding steps (e.g., step S102) in the aforementioned embodiment of the training method for the duration prediction model, and will not be repeated here.
[0128] Step S206: Using the second prediction module included in the duration prediction model, based on the second data processing result sample and the third data processing result sample obtained from the feature data sample, multiple first consumption probabilities corresponding one-to-one with multiple first duration intervals are obtained.
[0129] The second prediction module can be a second task-specific tower in MMOE, specifically including multiple second neural network layers; for each of the multiple first consumption probabilities, it can be used to characterize the probability that the consumption duration of a user sample for a resource sample falls into a first duration interval corresponding to that first consumption probability.
[0130] In one example, the feature data samples can be processed by the second gating network included in the duration prediction model to obtain the second control feature sample. After obtaining the second data processing result sample and the third data processing result sample, the weight of the second data processing result sample is adjusted based on the second control feature sample to obtain the third feature sample to be concatenated. The weight of the third data processing result sample is also adjusted based on the second control feature sample to obtain the fourth feature sample to be concatenated. The third feature sample to be concatenated and the fourth feature sample to be concatenated are then concatenated to obtain the second feature concatenation result sample. Based on the second feature concatenation result sample, the second prediction module included in the duration prediction model can be used to obtain multiple first consumption probabilities that correspond one-to-one with multiple first duration intervals.
[0131] Furthermore, it should be noted that other functions and examples of step S206 in this embodiment can be found in the relevant descriptions of the corresponding steps (e.g., step S103) in the training method of the aforementioned duration prediction model, and will not be repeated here.
[0132] Step S207: Based on multiple first consumption durations, obtain a first loss, and based on multiple first consumption durations and multiple first consumption probabilities, obtain a second loss, and use the first loss and the second loss to train the duration prediction model.
[0133] Training the duration prediction model may include adjusting the parameters of the feature processing module, the duration expert network, the shared expert network, the probability expert network, the first gating network, the second gating network, the first prediction module, and the second prediction module.
[0134] Furthermore, it should be noted that the specific functions and examples of step S207 in the embodiments of this disclosure can be found in the relevant descriptions of the corresponding steps (e.g., step S104) in the aforementioned embodiments of the training method for the duration prediction model, and will not be repeated here.
[0135] This disclosure provides a method for estimating consumption duration, which can be applied to electronic devices. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer, or other similar computing device. The following will be combined with... Figure 4 The flowchart shown illustrates a method for estimating consumption time provided by an embodiment of this disclosure. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described in the flowchart may be executed in a different order.
[0136] Step S401: Based on the target resources and target users, obtain target feature data.
[0137] The target resources can be video resources (e.g., short video resources), audio resources, text and image resources provided by the APP, and the APP can be, but is not limited to, news APP, social APP, and shopping APP; the target users can be any user of the APP.
[0138] Furthermore, it should be noted that in the embodiments of this disclosure, the target feature data can be used to characterize the resource characteristics of the target resource and the user characteristics of the target user, and the embodiments of this disclosure do not impose any limitations on this.
[0139] Step S402: Using the first prediction module included in the duration prediction model, multiple second consumption durations related to the target resource are obtained based on the target feature data.
[0140] The duration prediction model can be trained, specifically a trained MMOE. The training method can be found in the embodiment of the consumption duration prediction method. The first prediction module can be a first task-specific tower in the MMOE, used to obtain multiple second consumption durations related to the target resource based on target feature data. Here, the multiple second consumption durations are in an increasing order, and each second consumption duration can correspond one-to-one with multiple second duration intervals. Specifically, for each second duration interval, its high-order boundary value can be its corresponding second consumption duration, and its low-order boundary value can be the preceding second consumption duration of its corresponding second consumption duration. For example, we have:
[0141]
[0142] Step S403: Using the second prediction module included in the duration prediction model, based on the target feature data, obtain multiple second consumption probabilities that correspond one-to-one with multiple second duration intervals.
[0143] The second prediction module can be a dedicated tower for the second task in an MMOE, used to obtain multiple second consumption probabilities that correspond one-to-one with multiple second duration intervals based on target feature data. Here, each of the multiple second consumption probabilities can be used to characterize the probability that the target user's consumption duration of the target resource falls within the second duration interval corresponding to that second consumption probability. For example, we have:
[0144]
[0145] In other words, the probability that the target user's consumption time of the target resource falls into the second time interval B1 is 20%; the probability that the target user's consumption time of the target resource falls into the second time interval B2 is 50%; the probability that the target user's consumption time of the target resource falls into the second time interval B3 is 20%; and the probability that the target user's consumption time of the target resource falls into the second time interval B4 is 10%.
[0146] Step S404: Based on multiple second consumption durations and multiple second consumption probabilities, obtain the estimated result of the target user's second consumption duration for the target resource.
[0147] The specific functions and examples of step S404 can be found in the description of "obtaining the first consumption duration prediction result of the user sample on the resource sample based on multiple first consumption durations and multiple first consumption probabilities" in the aforementioned consumption duration prediction method embodiment, and will not be repeated here.
[0148] The consumption duration estimation method provided in this disclosure can, after obtaining target feature data based on target resources and target users, utilize a first estimation module included in the duration estimation model to obtain multiple second consumption durations related to the target resources and corresponding one-to-one with multiple second duration intervals, based on the target feature data. It also utilizes a second estimation module included in the duration estimation model to obtain multiple second consumption probabilities corresponding one-to-one with the multiple second duration intervals, based on the target feature data. Finally, based on the multiple second consumption durations and multiple second consumption probabilities, the estimated result of the target user's second consumption duration for the target resources is obtained. Compared to existing technologies, the estimated result of the target user's second consumption duration for the target resources is not obtained by performing an average value estimation task, but rather based on multiple second consumption durations and multiple second consumption probabilities. Therefore, it can obtain the estimated result of the target user's second consumption duration for the target resources relatively accurately.
[0149] In some optional implementations, step S401, namely, "obtaining target feature data based on target resources and target users," may include:
[0150] Obtain the static resource characteristics of the target resource, as well as the consumption scenario characteristics of the target resource;
[0151] Obtain user characteristics of the target user;
[0152] By utilizing the feature processing module included in the duration prediction model, the static resource characteristics of the target resource, the consumption scenario characteristics of the target resource, and the user characteristics of the target user are processed to obtain target feature data.
[0153] The static resource characteristics of the target resource can include resource attributes, resource category, and resource popularity information. For resource attributes, when the target resource is a video resource, it can include duration, resolution, frame rate, encoding format, and whether it contains subtitles; when the target resource is an audio resource, it can include duration, bitrate, and number of channels; when the target resource is a text / image resource, it can include the number of words, number of paragraphs, number of images, and whether it contains multimedia data (e.g., tables, formulas). For resource categories, it can be news, entertainment, sports, education, etc. For resource popularity information, it can include the number of likes, favorites, and shares, and may also include ratings and third-party historical consumption data for the target resource. Here, third-party historical consumption data can include the historical user group that consumed the target resource, and the specific consumption details (e.g., consumption duration) of each historical user in the historical user group.
[0154] The consumption scenario characteristics of the target resource can include scenario attributes, consumption time, device type, network status, etc. For scenario attributes, it can be a main channel scenario or an immersive scenario; for consumption time, it can be a weekday or weekend, or daytime or nighttime; for device type, it can be a computer, tablet, mobile phone, etc.; for network status, it can be mobile network communication status, mobile hotspot connection status, and may also include network quality, etc.
[0155] The target user's characteristics can include identity information, historical behavioral characteristics, real-time behavioral characteristics, and social relationships. Identity information can include age, gender, region, cultural background, and occupation. Historical behavioral characteristics can include fourth-historical consumption patterns, preference categories, and historical completion rates. Real-time behavioral characteristics can include the number of resources currently consumed, the time of the most recent interaction, the current continuous consumption duration, and the current operation frequency. Social relationships can include the number of followers, the consumption behavior of followers, the number of fans, and social activity. Here, fourth-historical consumption patterns can include the sequence of historically consumed resources and the specific consumption details of each historical resource in that sequence (e.g., consumption duration).
[0156] Furthermore, it should be noted that in this embodiment of the disclosure, the feature processing module may be the feature embedding module in the MMOE, which can be used to map the static resource features of the target resource, the consumption scenario features of the target resource, and the user features of the target user into a high-dimensional dense vector, and use the high-dimensional dense vector as the target feature data.
[0157] In this embodiment of the present disclosure, the static resource characteristics and consumption scenario characteristics of the target resource can be obtained simultaneously with the user characteristics of the target user. The feature processing module included in the duration prediction model is used to process the static resource characteristics, consumption scenario characteristics, and user characteristics of the target user to obtain target feature data, thereby ensuring the richness of the target feature data and further improving the prediction accuracy of the duration prediction model for the second consumption duration prediction result.
[0158] In some optional implementations, step S402, namely, "using the first estimation module included in the duration estimation model to obtain multiple second consumption durations related to the target resource based on the target feature data," may include:
[0159] Obtain multiple second quantiles;
[0160] Using the first prediction module included in the duration prediction model, based on the target feature data, multiple second consumption durations are obtained that are related to the target resource and correspond one-to-one with multiple second quantiles.
[0161] The multiple second quantiles can be in an increasing order, and can be preset or acquired in real time. Specifically, when the multiple second quantiles are preset, they can be set as multiple quantiles with equal intervals (here, equal interval can be understood as having approximately equal intervals), for example, 0.25, 0.50, 0.75, and 0.99; when the multiple second quantiles are acquired in real time, they can be set based on application requirements, and this disclosure embodiment does not impose any restrictions on this.
[0162] After obtaining multiple second quantiles, the first prediction module included in the duration prediction model can be used to obtain multiple second consumption durations related to the target resource and corresponding one-to-one with the multiple second quantiles, based on the target feature data. Specifically, the first prediction module included in the duration prediction model can be used to obtain multiple second consumption durations related to the target resource and corresponding one-to-one with the multiple second quantiles, based on the first target data processing result and the second target data processing result obtained from the target feature data. The first target data processing result can be feature data related to the multiple second consumption durations obtained based on the target feature data; the second target data processing result can be feature data related to both the multiple second consumption durations and the multiple second consumption probabilities obtained based on the target feature data. For each of the multiple second consumption durations, it can be used to characterize that, in the historical user group consuming the target resource, a second proportion of historical users have an upper limit of consumption duration for the target resource that second consumption duration, and the second proportion is obtained based on the second quantile corresponding to that second consumption duration. For example, the second proportion can be equal to the second quantile corresponding to that second consumption duration. For example, if there is a second consumption duration A1 = 20 minutes and its corresponding second quantile is 0.25, then it can be used to characterize that in the historical user group consuming the target resource, 25% of the historical users have a consumption duration of 20 minutes or less for the target resource. That is, in the historical user group consuming the target resource, 25% of the historical users have a consumption duration of less than or equal to 20 minutes for the target resource. For example, if there is a second consumption duration A2 = 30 minutes and its corresponding second quantile is 0.50, then it can be used to characterize that in the historical user group consuming the target resource, 50% of the historical users have a consumption duration of 30 minutes or less for the target resource. That is, in the historical user group consuming the target resource, 50% of the historical users have a consumption duration of less than or equal to 30 minutes for the target resource.
[0163] Through the above methods, in this embodiment of the disclosure, multiple second quantiles can be obtained, and using the first prediction module included in the duration prediction model, multiple second consumption durations related to the target resource and corresponding one-to-one with the multiple second quantiles can be obtained based on the target feature data. In other words, in this embodiment of the disclosure, multiple second quantiles in an increasing state can ensure the orderly regression of multiple second consumption durations, thereby further improving the prediction accuracy of the duration prediction model for the predicted results of the second consumption durations. Moreover, when the source of the target feature data includes the user characteristics of the target user (belonging to the personalized characteristics of the target user), the accuracy of the multiple second consumption durations can be significantly improved, further enhancing the prediction accuracy of the duration prediction model for the predicted results of the second consumption durations.
[0164] Furthermore, in this embodiment of the disclosure, when multiple second quantiles are acquired in real time, the multiple second quantiles can be acquired in the following ways:
[0165] Determine the second online duration for the target resource;
[0166] Based on the second online duration, multiple second quantiles were obtained.
[0167] The second online duration can be used to characterize the release duration of the target resource, and based on the second online duration, it can be determined whether the target resource belongs to the cold start resource.
[0168] In one example, if the second online duration is less than or equal to a second preset duration threshold, the target resource can be determined to be a cold start resource; if the second online duration is greater than the second preset duration threshold, the target resource can be determined not to be a cold start resource. The second preset duration threshold can be set based on application requirements, and this embodiment does not impose any limitations on it.
[0169] Based on this, in this embodiment, if the target resource is determined to be a cold start resource based on the second online duration, multiple second quantiles can be obtained within the second quantile interval based on the business objective; or, if the target resource is determined not to be a cold start resource based on the second online duration, multiple quantiles with equal intervals (here, equal interval can be understood as having approximately equal intervals) can be obtained within the second quantile interval as multiple second quantiles. The business objective can be to improve cold start efficiency or to ensure the reliability of the prediction results; the second quantile interval can be (0, 1], and the multiple equally spaced quantiles obtained within the second quantile interval can be 0.25, 0.50, 0.75, and 0.99.
[0170] Furthermore, as mentioned above, in this embodiment of the disclosure, the business objective can be to improve cold start efficiency or to ensure the reliability of the prediction results. Based on this, in this embodiment of the disclosure, when obtaining multiple second quantiles within the second quantile interval based on the business objective, if the business objective is to improve cold start efficiency, a fifth number of lower quantiles and a sixth number of higher quantiles can be obtained within the second quantile interval, and the fifth number of lower quantiles and the sixth number of higher quantiles can be used together as multiple second quantiles; or, if the business objective is to ensure the reliability of the prediction results, a seventh number of lower quantiles and an eighth number of higher quantiles can be obtained within the second quantile interval, and the seventh number of lower quantiles and the eighth number of higher quantiles can be used together as multiple second quantiles. In this embodiment, the fifth quantity is greater than the sixth quantity, and the fifth and sixth quantities can be set based on application requirements; this embodiment does not impose any restrictions on this. The seventh quantity is less than the eighth quantity, and the seventh and eighth quantities can be set based on application requirements; this embodiment does not impose any restrictions on this. The lower quantile can be the quantile of the lower quantile sub-interval (0, 0.50) within the second quantile interval; the higher quantile can be the quantile of the higher quantile sub-interval (0.50, 0.99) within the second quantile interval. For example, when the business objective is to improve cold start efficiency, and the fifth quantity is 3 and the sixth quantity is 1, three lower quantiles can be randomly obtained within the second quantile interval, or three specified lower quantiles, such as 0.10 and 0, can be obtained. 30 and 0.50, and within the second quantile interval, randomly select one higher quantile, or select one specified higher quantile, for example, 0.99, and use 0.10, 0.30, 0.50 and 0.99 together as multiple second quantiles; for example, when the business objective is to ensure the reliability of the estimated results, and the seventh quantity is 1 and the eighth quantity is 3, within the second quantile interval, randomly select one lower quantile, or select one specified lower quantile, for example, 0.50, and within the second quantile interval, randomly select three higher quantiles, or select three specified higher quantiles, for example, 0.60, 0.80 and 0.99, and use 0.50, 0.60, 0.80 and 0.99 together as multiple second quantiles.
[0171] Through the above methods, in this embodiment of the disclosure, the second online duration of the target resource can be determined, and multiple second quantiles can be obtained based on the second online duration, thereby improving the adaptability of the duration prediction model to application requirements. Specifically, when obtaining multiple second quantiles based on the second online duration, if it is determined that the target resource belongs to the cold start resource based on the second online duration, multiple second quantiles can be obtained within the second quantile interval based on business objectives, thereby improving the adaptability of the duration prediction model to business objectives; or, if it is determined that the target resource does not belong to the cold start resource based on the second online duration, multiple quantiles at equal intervals can be obtained within the second quantile interval as multiple second quantiles, thereby ensuring the reliability of the prediction results. Specifically, it can ensure that when the duration prediction model is applied to the resource recommendation scenario, the predicted result of the second consumption duration of the target user for the target resource is relatively reliable.
[0172] More specifically, when determining that a target resource is a cold-start resource based on the second online duration, and with the business objective of improving cold-start efficiency, a fifth number of lower quantiles and a sixth number of higher quantiles can be obtained within the second quantile interval. These fifth number of lower quantiles and sixth number of higher quantiles are then combined to form multiple second quantiles, with the fifth number being greater than the sixth number. This allows the duration prediction model to learn how to optimistically estimate the second consumption duration when the target resource is determined to be a cold-start resource based on the second online duration. Thus, when applying the duration prediction model to resource recommendation scenarios, cold-start resources can be rapidly promoted, thereby improving their startup efficiency. Alternatively, when determining that a target resource is a cold-start resource based on the second online duration, to ensure the reliability of the estimation results, the business objective is to obtain the seventh number of lower quantiles within the second quantile interval, and the eighth number of higher quantiles within the second quantile interval. These seventh number of lower quantiles and eighth number of higher quantiles are then used together as multiple second quantiles, with the seventh number being less than the eighth number. This allows the duration estimation model to learn how to conservatively estimate the second consumption duration when determining that the target resource is a cold-start resource based on the second online duration. This ensures that when the duration estimation model is applied to resource recommendation scenarios, the estimated second consumption duration of the target user for the target resource is relatively reliable.
[0173] In some optional implementations, step S403, namely, "using the second prediction module included in the duration prediction model to obtain multiple second consumption probabilities corresponding one-to-one with multiple second duration intervals based on target feature data," can be: using the second prediction module included in the duration prediction model to obtain multiple second consumption probabilities corresponding one-to-one with multiple second duration intervals based on the second target data processing result and the third target data processing result obtained from the target feature data. The second target data processing result can be feature data related to both the multiple second consumption durations and the multiple second consumption probabilities, obtained based on the target feature data; the third target data processing result can be feature data related to the multiple second consumption probabilities, obtained based on the target feature data.
[0174] The following, combined with Figure 5 and Figure 6 The complete process of a consumption duration estimation method provided by the embodiments of this disclosure will be described.
[0175] Step S501: Obtain the static resource characteristics and consumption scenario characteristics of the target resource, and obtain the user characteristics of the target user. Then, use the feature processing module included in the duration prediction model to process the static resource characteristics, consumption scenario characteristics, and user characteristics of the target resource to obtain target feature data.
[0176] In this embodiment of the disclosure, the specific function and examples of step S501 can be found in the relevant descriptions of the corresponding steps (e.g., step S401) in the aforementioned embodiment of the consumption duration estimation method, and will not be repeated here.
[0177] Step S502: The target feature data is processed using the duration expert network included in the duration prediction model to obtain the first target data processing result.
[0178] Among them, the duration prediction model can be MMOE, while the duration expert network, also known as the duration expert network, belongs to the feature extraction network and can be used to process target feature data to obtain the first target data processing results related to multiple second consumption durations.
[0179] Step S503: The target feature data is processed using the shared expert network included in the duration prediction model to obtain the second target data processing result.
[0180] Among them, the shared expert network, also known as the shared expert network, is a feature extraction network that can be used to process target feature data to obtain second target data processing results that are related to multiple second consumption durations and multiple second consumption probabilities.
[0181] Step S504: Using the probabilistic expert network included in the duration prediction model, the target feature data is processed to obtain the third target data processing result.
[0182] Among them, the probabilistic expert network, also known as the probabilistic expert network, belongs to the feature extraction network. It can be used to process target feature data to obtain the third target data processing results related to multiple second consumption probabilities.
[0183] Step S505: Obtain multiple second quantiles, and using the first prediction module included in the duration prediction model, based on the first target data processing result and the second target data processing result obtained from the target feature data, obtain multiple second consumption durations that are related to the target resource and correspond one-to-one with the multiple second quantiles.
[0184] The first prediction module can be the first task-specific tower in the MMOE, which may include multiple first neural network layers; multiple second consumption durations are in an increasing state, and multiple second consumption durations can correspond one-to-one with multiple second duration intervals.
[0185] In one example, the target feature data can be processed by the first gating network included in the duration prediction model to obtain the first target control feature. After obtaining the first target data processing result and the second target data processing result, the weight of the first target data processing result is adjusted based on the first target control feature to obtain the first target feature to be concatenated. Based on the first target control feature, the weight of the second target data processing result is adjusted to obtain the second target feature to be concatenated. The first target feature to be concatenated and the second target feature to be concatenated are then concatenated to obtain the first target feature concatenation result. Using the first prediction module included in the duration prediction model, multiple second consumption durations related to the target resource and corresponding one-to-one with multiple second quantiles can be obtained based on the first target feature concatenation result.
[0186] Furthermore, it should be noted that other functions and examples of step S505 in this embodiment can be found in the relevant descriptions of the corresponding steps (e.g., step S302) in the aforementioned embodiment of the consumption duration estimation method, and will not be repeated here.
[0187] Step S506: Using the second prediction module included in the duration prediction model, based on the second target data processing result and the third target data processing result obtained from the target feature data, obtain multiple second consumption probabilities that correspond one-to-one with multiple second duration intervals.
[0188] The second prediction module can be a second task-specific tower in MMOE, specifically including multiple second neural network layers; for each of the multiple second consumption probabilities, it can be used to characterize the probability that the consumption duration of the target user for the target resource falls into the second duration interval corresponding to the second consumption probability.
[0189] In one example, the target feature data can be processed by the second gating network included in the duration prediction model to obtain the second target control feature. After obtaining the second target data processing result and the third target data processing result, the weight of the second target data processing result is adjusted based on the second target control feature to obtain the third target feature to be concatenated. Based on the second target control feature, the weight of the third target data processing result is adjusted to obtain the fourth target feature to be concatenated. The third target feature to be concatenated and the fourth target feature to be concatenated are then concatenated to obtain the second target feature concatenation result. Using the second prediction module included in the duration prediction model, multiple second consumption probabilities corresponding one-to-one with multiple second duration intervals can be obtained based on the second target feature concatenation result.
[0190] Furthermore, it should be noted that other functions and examples of step S506 in this embodiment can be found in the relevant descriptions of the corresponding steps (e.g., step S403) in the aforementioned consumption duration estimation method, and will not be repeated here.
[0191] Step S507: Based on multiple second consumption durations and multiple second consumption probabilities, obtain the estimated result of the target user's second consumption duration for the target resource.
[0192] In this embodiment of the disclosure, the specific function and examples of step S507 can be found in the relevant description of the corresponding step (e.g., step S404) in the aforementioned consumption duration estimation method, and will not be repeated here.
[0193] Please see Figure 7 This is a schematic diagram illustrating an application scenario of a training method for a duration prediction model provided in this embodiment of the present disclosure.
[0194] The training method for the duration prediction model provided in this disclosure is applied to an electronic device. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer, or other similar computing device.
[0195] Here, electronic devices are used for:
[0196] Based on resource samples and user samples, feature data samples are obtained;
[0197] Using the first prediction module included in the duration prediction model, multiple first consumption durations related to resource samples are obtained based on feature data samples; wherein, multiple first consumption durations correspond one-to-one with multiple first duration intervals;
[0198] Using the second prediction module included in the duration prediction model, based on feature data samples, multiple first consumption probabilities are obtained that correspond one-to-one with multiple first duration intervals; wherein, the first consumption probability is used to characterize the probability that the consumption duration of a user sample for a resource sample falls into the first duration interval corresponding to the first consumption probability;
[0199] The duration prediction model is trained based on multiple first consumption durations and multiple first consumption probabilities.
[0200] In one example, when obtaining feature data samples based on resource samples and user samples, the static resource features and consumption scenario features of resource samples can be obtained, and the user features of user samples can be obtained. Then, the feature processing module included in the duration prediction model is used to process the static resource features, consumption scenario features, and user features of resource samples to obtain feature data samples.
[0201] It should be noted that, in the embodiments disclosed herein, Figure 7 The application scenario diagrams shown are for illustrative purposes only and are not restrictive. Those skilled in the art can use them as a basis for their own interpretation. Figure 7 The examples may be modified in various obvious ways and / or substitutions, and the resulting technical solutions still fall within the scope of the disclosure of the embodiments of this disclosure.
[0202] Please see Figure 8 This is a schematic diagram illustrating an application scenario of a consumption duration estimation method provided in this embodiment of the disclosure.
[0203] The consumption duration estimation method provided in this disclosure is applied to electronic devices. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer, or other similar computing device.
[0204] Here, electronic devices are used for:
[0205] Based on the target resources and target users, target feature data is obtained;
[0206] Using the first prediction module included in the duration prediction model, multiple second consumption durations related to the target resource are obtained based on the target feature data; wherein, the multiple second consumption durations correspond one-to-one with multiple second duration intervals;
[0207] Using the second prediction module included in the duration prediction model, based on the target feature data, multiple second consumption probabilities are obtained that correspond one-to-one with multiple second duration intervals; wherein, the second consumption probability is used to characterize the likelihood that the consumption duration of the target user for the target resource falls into the second duration interval corresponding to the second consumption probability;
[0208] Based on multiple second consumption durations and multiple second consumption probabilities, the estimated result of the target user's second consumption duration for the target resource is obtained.
[0209] In one example, when obtaining target feature data based on target resources and target users, the static resource features and consumption scenario features of the target resources can be obtained, as well as the user features of the target users. Then, the feature processing module included in the duration prediction model is used to process the static resource features, consumption scenario features, and user features of the target resources to obtain the target feature data.
[0210] It should be noted that, in the embodiments disclosed herein, Figure 8 The application scenario diagrams shown are for illustrative purposes only and are not restrictive. Those skilled in the art can use them as a basis for their own interpretation. Figure 8 The examples may be modified in various obvious ways and / or substitutions, and the resulting technical solutions still fall within the scope of the disclosure of the embodiments of this disclosure.
[0211] To better implement the aforementioned training method for the duration prediction model, this disclosure also provides a training device for the duration prediction model, which can be integrated into an electronic device. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer, or other similar computing device. The following will be combined with... Figure 9 The schematic block diagram shown illustrates a training device 900 for a duration estimation model provided in a disclosed embodiment.
[0212] The training device 900 for the duration prediction model includes:
[0213] The feature data sample acquisition unit 901 is used to obtain feature data samples based on resource samples and user samples;
[0214] The first consumption duration acquisition unit 902 is used to obtain multiple first consumption durations related to resource samples based on feature data samples by utilizing the first prediction module included in the duration prediction model; wherein, the multiple first consumption durations correspond one-to-one with multiple first duration intervals.
[0215] The first consumption probability acquisition unit 903 is used to obtain multiple first consumption probabilities corresponding one-to-one with multiple first duration intervals based on feature data samples by utilizing the second prediction module included in the duration prediction model; wherein, the first consumption probability is used to characterize the probability that the consumption duration of a user sample for a resource sample falls into the first duration interval corresponding to the first consumption probability.
[0216] Model training unit 904 is used to train the duration prediction model based on multiple first consumption durations and multiple first consumption probabilities.
[0217] In some optional implementations, the first consumption duration acquisition unit 902 is used for:
[0218] Obtain multiple first quantiles;
[0219] Using the first prediction module included in the duration prediction model, based on feature data samples, multiple first consumption durations are obtained that are related to resource samples and correspond one-to-one with multiple first quantiles; wherein, the multiple first quantiles are in an increasing state; the first consumption duration is used to characterize the upper limit of the consumption duration of historical users of resource samples in the historical consumption user group of resource samples, which is a first proportion; the first proportion is obtained based on the first quantile corresponding to the first consumption duration.
[0220] In some optional implementations, the first consumption duration acquisition unit 902 is used for:
[0221] Determine the initial online duration of the resource sample;
[0222] Based on the first online duration, multiple first quantiles were obtained.
[0223] In some optional implementations, the first consumption duration acquisition unit 902 is used for:
[0224] If the resource sample is determined to be a cold start resource based on the first online duration, multiple first quantiles are obtained within the first quantile interval based on business objectives.
[0225] Alternatively, if it is determined that the resource sample does not belong to the cold start resource based on the first online duration, multiple quantiles with equal intervals are obtained within the first quantile interval and used as multiple first quantiles.
[0226] In some optional implementations, the first consumption duration acquisition unit 902 is used for:
[0227] With the business objective of improving cold start efficiency, a first number of lower quantiles are obtained within the first quantile interval, and a second number of higher quantiles are obtained within the first quantile interval. The first number of lower quantiles and the second number of higher quantiles are used together as multiple first quantiles; wherein the first number is greater than the second number.
[0228] Alternatively, if the business objective is to ensure the reliability of the forecast results, a third number of lower quantiles are obtained within the first quantile interval, and a fourth number of higher quantiles are obtained within the first quantile interval. The third number of lower quantiles and the fourth number of higher quantiles are then used together as multiple first quantiles; wherein the third number is less than the fourth number.
[0229] In some alternative implementations, the model training unit 904 is used for:
[0230] Based on multiple initial consumption durations, the first loss is determined;
[0231] Based on multiple first consumption durations and multiple first consumption probabilities, a second loss is derived;
[0232] The duration prediction model is trained using the first loss and the second loss.
[0233] In some alternative implementations, the model training unit 904 is used for:
[0234] For each of the multiple first consumption durations, based on the first consumption duration and the first quantile corresponding to the first consumption duration, the individual loss corresponding to the first consumption duration is obtained;
[0235] Obtain multiple first weights that correspond one-to-one with multiple first consumption durations;
[0236] Based on multiple first weights and multiple individual losses corresponding one-to-one with multiple first consumption durations, the first loss is obtained.
[0237] In some alternative implementations, the model training unit 904 is used for:
[0238] Based on multiple first consumption durations and multiple first consumption probabilities, the estimated first consumption duration of user samples for resource samples is obtained;
[0239] Obtain the actual consumption time of user samples on resource samples;
[0240] Based on the estimated first consumption duration and the actual consumption duration, the second loss is derived.
[0241] In some optional implementations, the feature data sample acquisition unit 901 is used for:
[0242] Obtain the static resource characteristics of the resource samples, as well as the consumption scenario characteristics of the resource samples;
[0243] Obtain user characteristics from user samples;
[0244] By utilizing the feature processing module included in the duration prediction model, the static resource features of resource samples, the consumption scenario features of resource samples, and the user features of user samples are processed to obtain feature data samples.
[0245] In this embodiment of the disclosure, the specific functions and examples of each unit in the training device 900 of the duration prediction model can be found in the relevant descriptions of the corresponding steps in the aforementioned embodiment of the training method for the duration prediction model, and will not be repeated here.
[0246] To better implement the aforementioned consumption duration estimation method, this disclosure also provides a consumption duration estimation device, which can be integrated into an electronic device. The electronic device can be a server or a terminal device. Here, the terminal device can be a workbench, a mainframe computer, a conventional computer, or other similar computing device. The following will be combined with... Figure 10 The schematic block diagram shown illustrates a consumption duration estimation device 1000 provided in the disclosed embodiment.
[0247] Consumption duration estimation device 1000, including:
[0248] The target feature data acquisition unit 1001 is used to obtain target feature data based on target resources and target users;
[0249] The second consumption duration acquisition unit 1002 is used to obtain multiple second consumption durations related to the target resource based on the target feature data using the first prediction module included in the duration prediction model; wherein, the multiple second consumption durations correspond one-to-one with multiple second duration intervals.
[0250] The second consumption probability acquisition unit 1003 is used to obtain multiple second consumption probabilities corresponding one-to-one with multiple second time intervals based on the target feature data by utilizing the second prediction module included in the duration prediction model; wherein, the second consumption probability is used to characterize the probability that the consumption duration of the target user for the target resource falls into the second time interval corresponding to the second consumption probability.
[0251] The consumption duration estimation unit 1004 is used to obtain the estimated result of the second consumption duration of the target user for the target resource based on multiple second consumption durations and multiple second consumption probabilities.
[0252] In some optional implementations, the second consumption duration acquisition unit 1002 is used for:
[0253] Obtain multiple second quantiles;
[0254] Using the first prediction module included in the duration prediction model, based on the target feature data, multiple second consumption durations are obtained that are related to the target resource and correspond one-to-one with multiple second quantiles; wherein, the multiple second quantiles can be in an increasing state; the second consumption duration is used to represent the upper limit of the consumption duration of the target resource by historical users with a second proportion in the historical consumption user group of the target resource; the second proportion is obtained based on the second quantile corresponding to the second consumption duration.
[0255] In some optional implementations, the second consumption duration acquisition unit 1002 is used for:
[0256] Determine the second online duration for the target resource;
[0257] Based on the second online duration, multiple second quantiles were obtained.
[0258] In some optional implementations, the second consumption duration acquisition unit 1002 is used for:
[0259] If the target resource is determined to be a cold start resource based on the second online duration, multiple second quantiles are obtained within the second quantile interval based on the business objectives.
[0260] Alternatively, if it is determined that the target resource does not belong to the cold start resource based on the second online duration, multiple quantiles with equal intervals are obtained within the second quantile interval and used as multiple second quantiles.
[0261] In some optional implementations, the second consumption duration acquisition unit 1002 is used for:
[0262] With the business objective of improving cold start efficiency, within the second quantile interval, obtain the fifth number of lower quantiles and the sixth number of higher quantiles, and use the fifth number of lower quantiles and the sixth number of higher quantiles together as multiple second quantiles; wherein the fifth number is greater than the sixth number.
[0263] Alternatively, if the business objective is to ensure the reliability of the forecast results, within the second quantile interval, obtain the seventh number of lower quantiles and the eighth number of higher quantiles, and use the seventh number of lower quantiles and the eighth number of higher quantiles together as multiple second quantiles; wherein the seventh number is less than the eighth number.
[0264] In some optional implementations, the target feature data acquisition unit 1001 is used for:
[0265] Obtain the static resource characteristics of the target resource, as well as the consumption scenario characteristics of the target resource;
[0266] Obtain user characteristics of the target user;
[0267] By utilizing the feature processing module included in the duration prediction model, the static resource characteristics of the target resource, the consumption scenario characteristics of the target resource, and the user characteristics of the target user are processed to obtain target feature data.
[0268] In this embodiment of the disclosure, the specific functions and examples of each unit in the consumption duration estimation device 1000 can be found in the relevant descriptions of the corresponding steps in the aforementioned consumption duration estimation method embodiments, and will not be repeated here.
[0269] The acquisition, storage, and application of user personal information (such as identity information, historical behavioral characteristics, real-time behavioral characteristics, social relationships, etc.) involved in the technical solution disclosed herein comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0270] According to embodiments of this disclosure, this disclosure also provides an electronic device, a readable storage medium, and a computer program product.
[0271] Figure 11 A schematic structural block diagram of an example electronic device 1100 that can be used to implement embodiments of the present disclosure is shown. Electronic device 1100 is intended to represent various forms of digital computers, such as in-vehicle computing devices, laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. Electronic device 1100 may also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.
[0272] like Figure 11 As shown, the electronic device 1100 includes a computing unit 1101, which can perform various appropriate actions and processes according to a computer program stored in read-only memory (ROM) 1102 or a computer program loaded from storage unit 1108 into random access memory (RAM) 1103. The RAM 1103 may also store various programs and data required for the operation of the electronic device 1100. The computing unit 1101, ROM 1102, and RAM 1103 are interconnected via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0273] Multiple components in electronic device 1100 are connected to I / O interface 1105, including: input unit 1106, such as keyboard, mouse, etc.; output unit 1107, such as various types of renderers, speakers, etc.; storage unit 1108, such as disk, optical disk, etc.; and communication unit 1109, such as network card, modem, wireless transceiver, etc. Communication unit 1109 allows electronic device 1100 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0274] The computing unit 1101 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 1101 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any suitable processor, controller, microcontroller, etc. The computing unit 1101 performs the various methods and processes described above, such as methods for training duration estimation models and / or methods for estimating consumption duration. For example, in some embodiments, the methods for training duration estimation models and / or methods for estimating consumption duration may be implemented as computer software programs tangibly contained in a machine-readable medium, such as storage unit 1108. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1100 via ROM 1102 and / or communication unit 1109. When the computer program is loaded into RAM 1103 and executed by computing unit 1101, one or more steps of the training method for the duration estimation model and / or the consumption duration estimation method described above can be performed. Alternatively, in other embodiments, computing unit 1101 can be configured for the training method for the duration estimation model and / or the consumption duration estimation method by any other suitable means (e.g., by means of firmware).
[0275] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0276] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data optimization device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0277] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM) or flash memory, optical fibers, compact disc read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0278] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a rendering device (e.g., a cathode ray tube (CRT) renderer or a liquid crystal display (LCD)) for rendering information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices are also used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0279] The systems and technologies described herein can be implemented in computing systems that include back-end components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include front-end components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with implementations of the systems and technologies described herein), or any combination of such back-end, middleware, or front-end components. The components of the system can be interconnected via digital data communication (e.g., a communication network) of any form or medium. Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.
[0280] A computer system can include client and server components. Clients and servers are generally located far apart and typically interact via a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, a server in a distributed system, or a server incorporating blockchain technology.
[0281] This disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute a training method for a duration prediction model and / or a consumption duration prediction method.
[0282] This disclosure also provides a computer program product, including a computer program that, when executed by a processor, implements a training method for a duration prediction model and / or a consumption duration prediction method.
[0283] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure is achieved, and this is not limited herein. Furthermore, in this disclosure, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Additionally, "multiple" in this disclosure can be understood as at least two.
[0284] The specific embodiments described above do not constitute a limitation on the scope of protection of this disclosure. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the principles of this disclosure should be included within the scope of protection of this disclosure.
Claims
1. A training method for a duration prediction model, comprising: Based on resource samples and user samples, feature data samples are obtained; Using the first prediction module included in the duration prediction model, multiple first consumption durations related to the resource sample are obtained based on the feature data sample; wherein, the multiple first consumption durations correspond one-to-one with multiple first duration intervals; Using the second prediction module included in the duration prediction model, based on the feature data samples, a plurality of first consumption probabilities corresponding one-to-one with the plurality of first duration intervals are obtained; wherein, the first consumption probability is used to characterize the probability that the consumption duration of the user sample for the resource sample falls into the first duration interval corresponding to the first consumption probability. The duration prediction model is trained based on the plurality of first consumption durations and the plurality of first consumption probabilities.
2. The method according to claim 1, wherein, The first prediction module included in the utilization duration prediction model obtains multiple first consumption durations related to the resource sample based on the feature data sample, including: Obtain multiple first quantiles; Using the first estimation module included in the duration estimation model, based on the feature data sample, a plurality of first consumption durations are obtained that are related to the resource sample and correspond one-to-one with the plurality of first quantiles; wherein, the plurality of first quantiles are in an increasing state; the first consumption duration is used to represent that, in the historical consumption user group of the resource sample, a first proportion of historical users have a consumption duration upper limit of the first consumption duration for the resource sample; the first proportion is obtained based on the first quantile corresponding to the first consumption duration.
3. The method according to claim 2, wherein, The process of obtaining multiple first quantiles includes: Determine the initial online duration of the resource sample; Based on the first online duration, the plurality of first quantiles are obtained.
4. The method according to claim 3, wherein, The multiple first quantiles obtained based on the first online duration include: If the resource sample is determined to be a cold start resource based on the first online duration, the plurality of first quantiles are obtained within the first quantile interval based on the business objective. Alternatively, if it is determined based on the first online duration that the resource sample does not belong to the cold start resource, multiple quantiles at equal intervals are obtained within the first quantile interval and used as the multiple first quantiles.
5. The method according to claim 4, wherein, The process of obtaining the plurality of first quantiles within the first quantile interval based on business objectives includes: When the business objective is to improve cold start efficiency, a first number of lower quantiles are obtained within the first quantile interval, and a second number of higher quantiles are obtained within the first quantile interval. The first number of lower quantiles and the second number of higher quantiles are used together as the plurality of first quantiles; wherein the first number is greater than the second number. Alternatively, if the business objective is to ensure the reliability of the prediction results, a third number of lower quantiles are obtained within the first quantile interval, and a fourth number of higher quantiles are obtained within the first quantile interval, and the third number of lower quantiles and the fourth number of higher quantiles are used together as the plurality of first quantiles; wherein the third number is less than the fourth number.
6. The method according to any one of claims 2 to 5, wherein, The step of training the duration prediction model based on the plurality of first consumption durations and the plurality of first consumption probabilities includes: Based on the aforementioned multiple first consumption durations, the first loss is obtained; Based on the plurality of first consumption durations and the plurality of first consumption probabilities, a second loss is obtained; The duration prediction model is trained using the first loss and the second loss.
7. The method according to claim 6, wherein, The first loss is derived based on the plurality of first consumption durations, including: For each of the plurality of first consumption durations, based on the first consumption duration and the first quantile corresponding to the first consumption duration, the individual loss corresponding to the first consumption duration is obtained; Obtain multiple first weights that correspond one-to-one with the multiple first consumption durations; Based on the multiple first weights and multiple individual losses corresponding one-to-one with the multiple first consumption durations, the first loss is obtained.
8. The method according to claim 6, wherein, The second loss is derived based on the plurality of first consumption durations and the plurality of first consumption probabilities, including: Based on the multiple first consumption durations and the multiple first consumption probabilities, the estimated first consumption duration of the user sample for the resource sample is obtained; Obtain the actual consumption duration of the resource sample by the user sample; Based on the first consumption duration estimate and the actual consumption duration, the second loss is obtained.
9. The method according to claim 1, wherein, The feature data samples obtained based on resource samples and user samples include: Obtain the static resource characteristics of the resource sample and the consumption scenario characteristics of the resource sample; Obtain the user characteristics of the user sample; The feature processing module included in the duration prediction model is used to process the static resource features of the resource sample, the consumption scenario features of the resource sample, and the user features of the user sample to obtain the feature data sample.
10. A method for predicting consumption duration, comprising: Based on the target resources and target users, target feature data is obtained; Using the first prediction module included in the duration prediction model, multiple second consumption durations related to the target resource are obtained based on the target feature data; wherein, the multiple second consumption durations correspond one-to-one with multiple second duration intervals; Using the second prediction module included in the duration prediction model, based on the target feature data, a plurality of second consumption probabilities are obtained that correspond one-to-one with the plurality of second duration intervals; wherein, the second consumption probability is used to characterize the probability that the consumption duration of the target user for the target resource falls into the second duration interval corresponding to the second consumption probability; Based on the plurality of second consumption durations and the plurality of second consumption probabilities, the estimated result of the second consumption duration of the target user for the target resource is obtained.
11. The method according to claim 10, wherein, The first estimation module included in the utilization duration estimation model obtains multiple second consumption durations related to the target resource based on the target feature data, including: Obtain multiple second quantiles; Using the first estimation module included in the duration estimation model, based on the target feature data, a plurality of second consumption durations are obtained that are related to the target resource and correspond one-to-one with the plurality of second quantiles; wherein, the plurality of second quantiles are in an increasing state; the second consumption duration is used to represent that, in the historical consumption user group of the target resource, a second proportion of historical users consume the target resource with an upper limit of the second consumption duration; the second proportion is obtained based on the second quantile corresponding to the second consumption duration.
12. The method according to claim 11, wherein, The process of obtaining multiple second quantiles includes: Determine the second online duration for the target resource; Based on the second online duration, the plurality of second quantiles are obtained.
13. The method according to claim 12, wherein, The multiple second quantiles obtained based on the second online duration include: If the target resource is determined to be a cold start resource based on the second online duration, the plurality of second quantiles are obtained within the second quantile interval based on the business objective. Alternatively, if it is determined based on the second online duration that the target resource does not belong to the cold start resource, multiple equally spaced quantiles are obtained within the second quantile interval and used as the multiple second quantiles.
14. The method according to claim 13, wherein, The process of obtaining the plurality of second quantiles within the second quantile interval based on business objectives includes: When the business objective is to improve cold start efficiency, a fifth number of lower quantiles are obtained within the second quantile interval, and a sixth number of higher quantiles are obtained within the second quantile interval. The fifth number of lower quantiles and the sixth number of higher quantiles are used together as the plurality of second quantiles; wherein the fifth number is greater than the sixth number. Alternatively, if the business objective is to ensure the reliability of the prediction results, a seventh number of lower quantiles are obtained within the second quantile interval, and an eighth number of higher quantiles are obtained within the second quantile interval, and the seventh number of lower quantiles and the eighth number of higher quantiles are used together as the plurality of second quantiles; wherein the seventh number is less than the eighth number.
15. The method according to claim 10, wherein, The target feature data obtained based on target resources and target users includes: Obtain the static resource characteristics of the target resource and the consumption scenario characteristics of the target resource; Obtain the user characteristics of the target user; The feature processing module included in the duration prediction model is used to process the static resource features of the target resource, the consumption scenario features of the target resource, and the user features of the target user to obtain the target feature data.
16. A training device for a duration prediction model, comprising: The feature data sample acquisition unit is used to obtain feature data samples based on resource samples and user samples; The first consumption duration acquisition unit is used to obtain multiple first consumption durations related to the resource sample based on the feature data sample by utilizing the first prediction module included in the duration prediction model; wherein, the multiple first consumption durations correspond one-to-one with multiple first duration intervals. The first consumption probability acquisition unit is used to obtain multiple first consumption probabilities corresponding one-to-one with the multiple first duration intervals based on the feature data samples by utilizing the second prediction module included in the duration prediction model; wherein, the first consumption probability is used to characterize the probability that the consumption duration of the user sample for the resource sample falls into the first duration interval corresponding to the first consumption probability. The model training unit is used to train the duration prediction model based on the plurality of first consumption durations and the plurality of first consumption probabilities.
17. A consumption duration estimation device, comprising: The target feature data acquisition unit is used to obtain target feature data based on target resources and target users; The second consumption duration acquisition unit is used to obtain multiple second consumption durations related to the target resource based on the target feature data using the first prediction module included in the duration prediction model; wherein, the multiple second consumption durations correspond one-to-one with multiple second duration intervals. The second consumption probability acquisition unit is used to obtain multiple second consumption probabilities corresponding one-to-one with the multiple second duration intervals based on the target feature data using the second prediction module included in the duration prediction model; wherein, the second consumption probability is used to characterize the probability that the consumption duration of the target user for the target resource falls into the second duration interval corresponding to the second consumption probability; The consumption duration estimation unit is used to obtain the second consumption duration estimation result of the target user for the target resource based on the plurality of second consumption durations and the plurality of second consumption probabilities.
18. An electronic device comprising: At least one processor; A memory that is communicatively connected to the at least one processor; The memory stores instructions that can be executed by the at least one processor, which, when executed by the at least one processor, enables the at least one processor to perform the method according to any one of claims 1 to 15.
19. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 15.
20. A computer program product comprising a computer program; wherein, When the computer program is executed by a processor, it can implement the method of any one of claims 1 to 15.