Processing method and device based on media resource recommendation, equipment, medium and product
Through user type division and satisfaction threshold setting based on user historical data, the problem of inaccurate sample annotation of media resource recommendation models in the prior art is solved, the personalized effect of live resource recommendation is improved, and more efficient user satisfaction is achieved measure and recommend the effect.
Patent Information
- Application Number
- CN202411315696.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
AI Technical Summary
During the sample annotation process of existing media resource recommendation models, it is difficult to accurately measure the user's satisfaction with media resources, resulting in poor recommendation results. Especially in the personalized recommendation of live broadcast resources, users' instant interaction and long-term differences lead to The sample annotation results are inaccurate.
By obtaining the target user's historical viewing data, including historical viewing time and interactive data, determining the user type, setting satisfaction thresholds based on the user type, and performing sample annotation to improve the accuracy of sample labels and the prediction accuracy of the recommended model.
It achieves a more accurate measurement of user satisfaction and improves the personalized effect of media resource recommendations. Especially in live resource recommendations, content that meets user satisfaction standards can be recommended more accurately and improve user experience.
Smart Images

Figure CN119293272A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of artificial intelligence technology, and in particular to technical fields such as information recommendation, live broadcasting, and recommendation models. Background Art
[0002] With the rapid development of Internet technology, users can browse a variety of media content through the Internet. The number of media resources on the Internet is huge, and it is difficult for users to quickly find the media content they are interested in. In the personalized information service application of the Internet, personalized information services can be provided to users, thereby realizing automatic media content recommendation. Summary of the invention
[0003] The present disclosure provides a labeling method, training method, recommendation method, device, equipment, medium and product based on media resource recommendation.
[0004] According to one aspect of the present disclosure, a sample annotation method based on media resource recommendation is provided, comprising:
[0005] Acquire historical viewing data of the target user for the media resource in a historical period, wherein the historical viewing data includes historical viewing duration and historical interaction data;
[0006] determining a user type of the target user according to the historical viewing data;
[0007] Determining a satisfaction threshold of the target user according to the user type, wherein different user types correspond to different satisfaction thresholds;
[0008] Determining a sample label of sample data to be labeled according to the satisfaction threshold, wherein the sample data includes media resource data;
[0009] The sample data is labeled according to the sample label.
[0010] According to another aspect of the present disclosure, a method for training a recommendation model based on media resource recommendation is provided, comprising:
[0011] Acquire a training set, wherein the training set includes a plurality of training samples, and the training samples include sample data labeled with sample labels, and the sample labels are determined by the sample labeling method provided by the embodiment of the present disclosure;
[0012] The training set is used to train the preset recommendation model.
[0013] According to another aspect of the present disclosure, a media resource recommendation method is provided, comprising:
[0014] Determining input data according to candidate media resource data;
[0015] Inputting the input data into a target recommendation model, wherein the target recommendation model is obtained by using the training method of the recommendation model provided by the embodiment of the present disclosure;
[0016] The media resource to be recommended for the target user is determined from the candidate media resources to which the candidate media resource data belongs according to the output of the target recommendation model.
[0017] According to another aspect of the present disclosure, a sample annotation device based on media resource recommendation is provided, comprising:
[0018] A historical data acquisition module, used to acquire the historical viewing data of the target user for the media resource in the historical period, wherein the historical viewing data includes historical viewing duration and historical interaction data;
[0019] A type determination module, used to determine the user type of the target user according to the historical viewing data;
[0020] A threshold determination module, used to determine a satisfaction threshold of the target user according to the user type, wherein different user types correspond to different satisfaction thresholds;
[0021] A label determination module, used to determine a sample label of sample data to be labeled according to the satisfaction threshold, wherein the sample data includes media resource data;
[0022] A labeling module is used to label the sample data according to the sample label.
[0023] According to another aspect of the present disclosure, there is provided a training device for a recommendation model based on media resource recommendation, comprising:
[0024] A training set acquisition module, used to acquire a training set, wherein the training set includes a plurality of training samples, and the training samples include sample data labeled with sample labels, and the sample labels are determined by the sample labeling method provided by the embodiment of the present disclosure;
[0025] The training module is used to train the preset recommendation model using the training set.
[0026] According to another aspect of the present disclosure, a media resource recommendation device is provided, comprising:
[0027] An input data determination module, used to determine input data according to candidate media resource data;
[0028] A data input module is used to input the input data into a target recommendation model, wherein the target recommendation model is obtained using the training method of the recommendation model provided in the embodiment of the present disclosure.
[0029] The resource determination module is used to determine the media resources to be recommended for the target user from the candidate media resources to which the candidate media resource data belongs according to the output of the target recommendation model.
[0030] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0031] at least one processor; and
[0032] a memory communicatively connected to the at least one processor; wherein,
[0033] The memory stores instructions that can be executed by the at least one processor. The instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the embodiment of the present disclosure.
[0034] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the embodiment of the present disclosure.
[0035] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, wherein when the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.
[0036] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0038] Figure 1 is a flow chart of a sample labeling method provided according to an embodiment of the present disclosure;
[0039] Figure 2 is a flowchart of another sample labeling method provided according to an embodiment of the present disclosure;
[0040] Figure 3 is a flowchart of another sample labeling method provided according to an embodiment of the present disclosure;
[0041] Figure 4 is a flowchart of a training method for a recommendation model provided according to an embodiment of the present disclosure;
[0042] Figure 5 is a flow chart of a media resource recommendation method provided according to an embodiment of the present disclosure;
[0043] Figure 6 is a structural schematic diagram of a sample labeling device provided according to an embodiment of the present disclosure;
[0044] Figure 7 is a structural schematic diagram of a training device for a recommendation model provided according to an embodiment of the present disclosure;
[0045] Figure 8 is a structural schematic diagram of a media resource recommendation device provided according to an embodiment of the present disclosure;
[0046] Fig. 9 The block diagram is a block diagram of an electronic device for implementing the method of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0047] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.
[0048] In order to better understand the embodiments of the present disclosure, the following is an introduction to the related technology. In the related technology, when annotating samples of a recommendation model for recommending media resources, it is usually determined whether the user is satisfied with the media resource being watched based on whether the user's viewing time is greater than a pre-set time threshold. The pre-set time threshold is usually an empirical value, and the time threshold is the same for different users.
[0049] In the disclosed embodiment, the user type is determined based on the user's historical viewing time and historical interaction data, and then the corresponding satisfaction threshold is determined based on the user type, so that the satisfaction threshold can more accurately measure the user's satisfaction with the media resources, thereby improving the accuracy of sample annotation.
[0050] Figure 1 The present invention provides a flow chart of a sample annotation method according to an embodiment of the present invention. The present invention can be applied to the case of annotating samples of a recommendation model for media resource recommendation. The method can be executed by a sample annotation device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 , the method specifically includes the following:
[0051] S101, obtaining historical viewing data of a target user for a media resource in a historical period, wherein the historical viewing data includes historical viewing duration and historical interaction data;
[0052] S102, determining the user type of the target user according to the historical viewing data;
[0053] S103, determining a satisfaction threshold of the target user according to the user type, wherein different user types correspond to different satisfaction thresholds;
[0054] S104, determining a sample label of sample data to be labeled according to the satisfaction threshold, wherein the sample data includes media resource data;
[0055] S105: Label the sample data according to the sample label.
[0056] Among them, the target user can be any user. The historical period can be determined according to actual needs, for example, it can be the most recent historical period, and the length of the historical period can be, for example, 1 week or 3 days. The specific type of media resources is not limited, and can be text resources (such as e-books), graphic resources (such as graphic information), video resources (such as short videos or film and television dramas, etc.) or live resources (such as live streaming), etc. The target user can watch the media resources within the historical period, and the viewing time of each media resource watched by the target user within the historical period can be obtained, which is recorded as the historical viewing time. In the process of watching media resources within the historical period, the target user may also interact based on the media resources, which can be specifically input interactive operations for the media resources, such as likes, comments, sharing, giving virtual resources (such as live room gifts) or obtaining resource objects (such as purchasing goods), etc., and data related to the interaction can be obtained, which is recorded as historical interaction data, for example, it may include whether there is interaction for each media resource, the number of interactions, and the type of interaction.
[0057] For example, the target user has watched 10 media resources (respectively recorded as media resources a to media resources j) in the past three days. The historical viewing time includes the viewing time of each of the 10 media resources that the target user watched, that is, it includes 10 historical viewing times. While watching these 10 media resources, the target user interacted with media resource a, media resource b, and media resource c once, interacted with media resource d and media resource e twice, and did not interact with media resources f to media resource j. The historical interaction data may include the corresponding relationship between the media resources with interaction and the corresponding number of interactions.
[0058] In the disclosed embodiment, the user type of the target user is determined based on the historical viewing time and the historical interaction data in the historical viewing data. The method of dividing the user types is not limited, and the user types can be divided according to the first statistical value of the historical viewing time and the second statistical value of the historical interaction data, etc. The specific statistical method is not limited. For example, if the first statistical value is greater than the first threshold, and the second statistical value is greater than the second threshold, it is determined to be the first user type; if the first statistical value is greater than the first threshold, or the second statistical value is greater than the second threshold, it is determined to be the second user type; if the first statistical value is less than or equal to the first threshold, and the second statistical value is less than or equal to the second threshold, it is determined to be the third user type. The first statistical value can be, for example, the sum or average of the historical viewing time; the second statistical value can be, for example, the sum or average of the number of interactions for each media resource.
[0059] Optionally, different user types correspond to different satisfaction thresholds, and a correspondence between different user types and different preset satisfaction thresholds can be established in advance. After determining the user type of the target user, the satisfaction threshold of the target user can be determined by querying the correspondence.
[0060] Optionally, the satisfaction threshold of the target user may be dynamically determined based on historical viewing data and user type, thereby further improving the accuracy of the satisfaction threshold.
[0061] In the disclosed embodiment, the sample data to be labeled may include data on media resources viewed by the target user within the current sampling period. For example, the historical period is the last three days and the current sampling period may be today. The sample data to be labeled may also include data on media resources viewed by the target user within the historical period.
[0062] Exemplarily, the sample label may include a first label and a second label, wherein the first label is used to indicate satisfaction and the second label is used to indicate dissatisfaction. For a sample data to be labeled, the corresponding sample label may be determined based on the relationship between the target user's viewing time for the sample data and the satisfaction threshold. After the sample label is determined, the sample label is added to the corresponding sample data to be labeled to label the sample data, and the sample data labeled with the sample label is obtained. The sample data labeled with the sample label can be used as a training sample, and multiple training samples can form a training set, so as to train the recommendation model using the training set.
[0063] The sample labeling method based on media resource recommendation provided by the embodiment of the present disclosure obtains the historical viewing data of the target user for the media resources in the historical period, wherein the historical viewing data includes the historical viewing time and the historical interaction data, determines the user type of the target user according to the historical viewing data, determines the satisfaction threshold of the target user according to the user type, different user types correspond to different satisfaction thresholds, and determines the sample label of the sample data to be labeled according to the satisfaction threshold, wherein the sample data includes the media resource data. By adopting the above technical scheme, the diversity of user viewing habits and interactive behaviors is fully considered, the user type is determined based on the user characteristics that can be reflected in the historical viewing time and the historical interaction data, and then the corresponding satisfaction threshold is determined according to the user type, so that the satisfaction threshold can more accurately measure the user's satisfaction with the media resources, improve the accuracy of sample labeling, and thus help to improve the prediction accuracy of the recommendation model trained based on the labeled samples.
[0064] In an optional implementation, the media resource is a live broadcast resource. For live broadcast resources, compared with resource forms such as graphics, text or video, there will be relatively large differences in the degree of reception of live broadcast resources such as instant, highly interactive and long-duration resources by different users. This difference is not only reflected in the type preference of live broadcast content, but also involves multiple dimensions such as viewing time, interactive behavior and interaction frequency. If a single fixed time threshold standard is used to measure user satisfaction with live broadcast resources, it will lead to inaccurate sample annotation results. In the disclosed embodiment, for live broadcast resources, based on the historical viewing time of live broadcasts, the historical interactions of users during the viewing process are also considered, so that sample annotation can be performed more accurately, and then personalized satisfaction modeling of live broadcasts can be realized. The recommendation model obtained by modeling can more accurately recommend live broadcast resources that meet the personalized satisfaction standards of users for different users, so that users can see more live broadcast content that they are satisfied with, improve the recommendation effect of live broadcasts, and improve user experience.
[0065] In an optional implementation, the determination of the user type of the target user based on the historical viewing data includes at least one of the following: when the target user's historical interaction times are greater than or equal to a first preset times threshold, the target user is determined to be a first user type; wherein the historical interaction times are the times the target user interacts with the media resource during the historical period determined based on the historical interaction data; when the historical viewing times are less than the first preset times threshold, and the historical viewing times are greater than or equal to a second preset times threshold, the target user is determined to be a second user type; wherein the historical viewing times are the times the target user views the media resource during the historical period determined based on the historical viewing duration; when the historical viewing times are less than the first preset times threshold, and the historical viewing times are less than the second preset times threshold, the target user is determined to be a third user type. The advantage of such a setting is that it can better combine historical viewing duration and historical interaction data to perform accurate user type classification.
[0066] There is no limitation on the specific values of the first preset number threshold and the second preset number threshold, and there is no limitation on the magnitude relationship between the two. Optionally, the second preset number threshold is equal to the first preset number threshold.
[0067] Optionally, the satisfaction thresholds corresponding to the first user type, the second user type, and the third user type respectively decrease in sequence.
[0068] Optionally, the method may further include: determining the number of interactions of the target user with respect to the media resource within the historical period according to the historical interaction data, and obtaining the number of historical interactions.
[0069] Optionally, the method may further include: determining the number of times the target user has viewed the media resource within the historical period according to the historical viewing data to obtain the historical viewing number.
[0070] Figure 2 This is a flow chart of another sample labeling method provided according to an embodiment of the present disclosure. This embodiment is optimized based on the optional solutions in the above embodiments, and the step of determining the user type of the target user is optimized, which can improve the accuracy of user type classification. The method may include:
[0071] S201: Obtain historical viewing data of a target user for a media resource within a historical period, wherein the historical viewing data includes historical viewing duration and historical interaction data.
[0072] S202: Determine the number of interactions of the target user with respect to the media resource in a historical period according to the historical interaction data, and obtain the number of historical interactions.
[0073] Exemplarily, the total number of interactions of the target user with each media resource in the historical period is counted, and the total number is determined as the historical number of interactions. For example, the target user interacted with media resource a, media resource b, and media resource c once, and interacted with media resource d and media resource e twice, and the total number is 7. Then the historical number of interactions is 7.
[0074] S203, determine whether the number of historical interactions is greater than or equal to a first preset number threshold, if so, execute S208; otherwise, execute S204.
[0075] Exemplarily, if the number of historical interactions is greater than or equal to the first preset number threshold, the target user can be considered to be a user with recent trusted interactive behavior, and is determined to be the first user type, that is, the user type of the target user is the first user type, which can also be recorded as an interactive user type.
[0076] S204: Determine the number of times the target user viewed the media resource within a historical period according to the historical viewing data to obtain the historical viewing number.
[0077] For example, the number of historical viewing durations included in the historical viewing data, that is, the number of media resources viewed by the target user in the historical period, is determined as the number of historical viewings. For viewing of the same media resource in the historical period, the counts may be counted separately or combined, depending on actual needs.
[0078] Optionally, this step may include: determining the number of valid historical viewing durations included in the historical viewing data, wherein the valid historical viewing duration is greater than a preset duration threshold; and determining the number of historical viewings according to the number of valid historical viewing durations. The advantage of such a setting is that invalid viewing data can be filtered, thereby more accurately counting the number of historical viewings.
[0079] For example, when watching live broadcasts and other media resources, users may trigger the viewing of media resources due to curiosity or misoperation, but may quickly end the viewing after a short viewing. In order to eliminate the impact of such invalid viewing on the statistical results, a preset time threshold can be set, such as 5 seconds. If the historical viewing time is greater than 5 seconds, it can be determined as a valid viewing behavior, and the historical viewing time is determined as the valid historical viewing time. The preset time thresholds corresponding to different types of media resources may be different, and are not specifically limited.
[0080] Optionally, this step may also be performed before S203, and the specific order is not limited.
[0081] S205, determining whether the number of historical viewings is greater than or equal to a second preset number threshold, if so, executing S206; otherwise, executing S207.
[0082] For example, if the historical viewing count is greater than or equal to the second preset number threshold, it can be determined that although the target user has no recent trusted interaction behavior, he has a trusted viewing behavior, and can be determined as the second user type, that is, the user type of the target user is the second user type, and can also be recorded as the viewing user type. If the historical viewing count is less than the second preset number threshold, it can be determined that the target user has no recent trusted interaction behavior and no trusted viewing behavior, and is likely to be a user who is not interested in media resources, such as live broadcast resources, or a new user who has just started to contact live broadcast, therefore, it can be determined as the third user type, that is, the user type of the target user is the third user type, and can also be recorded as an ordinary user type.
[0083] S206: Determine that the target user is a second user type, and execute S209.
[0084] S207: Determine that the target user is a third user type, and execute S209.
[0085] S208: Determine that the target user is the first user type, and execute S209.
[0086] S209: Determine a satisfaction threshold of the target user according to the user type, wherein different user types correspond to different satisfaction thresholds.
[0087] S210: Determine a sample label of sample data to be labeled according to a satisfaction threshold, wherein the sample data includes media resource data.
[0088] S211. Label the sample data according to the sample labels.
[0089] Optionally, determine whether the target user's viewing time for the sample data to be labeled is greater than the satisfaction threshold; if so, determine that the sample label of the sample data to be labeled is a first label, wherein the first label is used to indicate satisfaction; if not, determine that the sample label of the sample data to be labeled is a second label, wherein the second label is used to indicate dissatisfaction. The advantage of this setting is that the sample labeling can be performed quickly and accurately according to the relationship between the viewing time of the sample data to be labeled and the determined satisfaction threshold, thereby improving the efficiency and accuracy of sample labeling.
[0090] The sample labeling method based on media resource recommendation provided by the embodiment of the present disclosure can, after obtaining the historical viewing time and historical interaction data of the target user for the media resources in the historical period, accurately divide the user types according to the relationship between the historical interaction times determined by the historical interaction data and the historical viewing times determined by the historical viewing times, and a pre-set number threshold, so as to accurately determine the satisfaction threshold that meets the characteristics of the target user according to the accurately divided user types, and then more accurately determine the sample labels, further improve the prediction accuracy of the recommendation model trained based on the labeled samples, and achieve more accurate recommendation of media resources that meet the user's personalized satisfaction standards for different users, so that users can see more media content that they are satisfied with, improve the recommendation effect of media resources, and improve user experience.
[0091] In an optional implementation, before determining whether the target user's viewing time for the sample data to be labeled is greater than the satisfaction threshold, it also includes: determining whether the target user has interaction with the sample data to be labeled; if so, determining that the sample label of the sample data to be labeled is the first label; if not, triggering the step of determining whether the target user's viewing time for the sample data to be labeled is greater than the satisfaction threshold. The advantage of this setting is that when determining the sample label, not only the relationship between the viewing time and the satisfaction threshold expressed by the time is considered, but also the target user's interactive behavior with respect to the sample data is taken into account, so that the sample label is determined more reasonably and accurately.
[0092] In an optional implementation manner, determining the satisfaction threshold of the target user according to the user type includes at least one of the following:
[0093] In the case where the target user is of the first user type, determining a first category of historical viewing time included in the historical viewing data, and determining a satisfaction threshold of the target user according to a statistical value of the first category of historical viewing time; wherein the first category of historical viewing time is a historical viewing time corresponding to an interactive media resource;
[0094] In the case where the target user is of the second user type, determining a second type of historical viewing duration included in the historical viewing data, and determining a satisfaction threshold of the target user according to a statistical value of the second type of historical viewing duration; wherein the second type of historical viewing duration is greater than a preset duration threshold;
[0095] In the case where the target user is a third user type, the historical viewing time included in the historical viewing data and the target viewing data is sorted to obtain a time sequence, and the satisfaction threshold of the target user is determined according to the historical viewing time corresponding to a preset percentile in the time sequence, wherein the target viewing data includes viewing data of a preset user for the media resource within the historical period, and the preset user is different from the target user.
[0096] The advantage of this setting is that, based on the characteristics of different user types and combined with historical viewing data, the satisfaction threshold corresponding to each user type can be determined more reasonably and accurately, further improving the personalization and accuracy of the satisfaction threshold, which is conducive to further improving the accuracy of the model, so that the model can more accurately recommend media resources that meet the user's personalized satisfaction standards, thereby improving the media resource recommendation effect and improving the user experience.
[0097] Figure 3 This is a flow chart of another sample labeling method provided according to an embodiment of the present disclosure. This embodiment is optimized based on the optional solutions in the above embodiments, and the step of determining the satisfaction threshold is optimized, which can improve the accuracy of the satisfaction threshold. The method may include:
[0098] S301: Obtain historical viewing data of a target user for a media resource within a historical period, wherein the historical viewing data includes historical viewing duration and historical interaction data.
[0099] S302: Determine a user type of the target user according to the historical viewing data, wherein the user type of the target user is a first user type, a second user type, or a third user type.
[0100] Exemplarily, the manner of determining the first user type, the second user type, and the third user type may refer to the related description above, which will not be repeated here.
[0101] S303: If the target user is of the first user type, determine the first category of historical viewing time included in the historical viewing data, and determine the target user's satisfaction threshold according to the statistical value of the first category of historical viewing time; if the target user is of the second user type, determine the second category of historical viewing time included in the historical viewing data, and determine the target user's satisfaction threshold according to the statistical value of the second category of historical viewing time; if the target user is of the third user type, sort the historical viewing time included in the historical viewing data and the target viewing data to obtain a time sequence, and determine the target user's satisfaction threshold according to the historical viewing time corresponding to a preset percentile in the time sequence.
[0102] Among them, the first category of historical viewing time is the historical viewing time corresponding to the media resources with which there is interaction. As in the example above, the target user has conducted 1 interaction based on media resources a, media resources b and media resources c respectively, and 2 interactions with media resources d and media resources e respectively, and has not conducted any interaction with media resources f to media resources j. Then the media resources with interaction include media resources a to media resources e, and the historical viewing time corresponding to media resources a to media resources e are obtained as the first category of historical viewing time. The statistical method for the statistical value of the first category of historical viewing time can be, for example, calculating the average value or the median, for example, calculating the average value of the historical viewing time corresponding to media resources a to media resources e, and obtaining the statistical value of the first category of historical viewing time, which can be directly determined as the satisfaction threshold of the target user in this case.
[0103] Among them, the second type of historical viewing time is greater than the preset time threshold. The preset time threshold can be the same as the preset time threshold used in the previous text to determine the effective historical viewing time, that is, the second type of historical viewing time is the effective historical viewing time, so as to avoid the influence of the historical viewing time corresponding to the invalid viewing behavior on the statistical value. As in the example above, the target user has watched 10 media resources in the last 3 days, media resources a to media resources j. Assuming that 8 of the media resources (such as media resources a to media resources h) have a corresponding historical viewing time greater than 5 seconds (preset time threshold), the historical viewing time corresponding to the 8 media resources is determined as the second type of historical viewing time. The statistical method of the statistical value of the second type of historical viewing time can be, for example, calculating the average value or the median, for example, calculating the average value of the historical viewing time corresponding to media resources a to media resources h, respectively, to obtain the statistical value of the second type of historical viewing time, which can be directly determined as the satisfaction threshold of the target user in this case.
[0104] Among them, the target viewing data includes the viewing data of the preset user for the media resource in the historical period, and the preset user is different from the target user. Exemplarily, the preset user is a user other than the target user who has viewed the media resource in the historical period in the media resource recommendation platform. The target viewing data may specifically include the viewing time of each media resource watched by the preset user in the historical period, which is also recorded as the historical viewing time. Exemplarily, the historical viewing time included in the historical viewing data and the historical viewing time included in the target viewing data are mixed and sorted. The sorting method can be from small to reach. The target percentile can be set according to actual needs, such as 70%. The historical viewing time corresponding to the 70% position in the time sequence is used to determine the satisfaction threshold of the target user. It can be realized to determine the satisfaction threshold of the target user of the ordinary user type based on the historical viewing time of all users in the media resource recommendation platform.
[0105] S304, determining whether the target user has interaction with the sample data to be labeled, if yes, executing S306; otherwise, executing S305.
[0106] S305 , determining whether the viewing time of the target user for the sample data to be labeled is greater than a satisfaction threshold, if so, executing S306 ; otherwise, executing S307 .
[0107] S306: Determine that the sample label of the sample data to be labeled is a first label, wherein the first label is used to indicate satisfaction, and execute S308.
[0108] Exemplarily, if the target user interacts with the sample data to be labeled, it can be determined that the target user is satisfied with the video resource corresponding to the sample data, and the sample label is the first label, such as 1. If the target user does not interact with the sample data to be labeled, but the viewing time is greater than the satisfaction threshold, it is also determined that the target user is satisfied with the video resource corresponding to the sample data, and the sample label is the first label.
[0109] S307: Determine that the sample label of the sample data to be labeled is a second label, wherein the second label is used to indicate dissatisfaction, and execute S308.
[0110] Exemplarily, if the target user has no interaction with the sample data to be labeled, and the viewing time is less than or equal to the satisfaction threshold, it is determined that the target user is dissatisfied with the video resource corresponding to the sample data, and the sample label is the second label, such as 0.
[0111] S308: Label the sample data according to the sample label.
[0112] The sample labeling method based on media resource recommendation provided by the embodiment of the present disclosure determines the user type of the target user according to the historical interaction data and the historical viewing time after obtaining the historical viewing time and historical interaction data of the target user for the media resources in the historical period, and determines the satisfaction threshold corresponding to each user type more reasonably and accurately according to the characteristics of different user types and in combination with the historical viewing data. In this way, the satisfaction threshold of each user is calculated according to the user's own historical viewing behavior. Even if different users have the same viewing time, the sample labels determined subsequently may not be the same, which reflects that different users have different standards for whether they are satisfied with the viewing of media resources, and realizes personalized satisfaction modeling for media resource recommendation, which is conducive to further improving the accuracy of the model, more accurately recommending media resources that meet the user's personalized satisfaction standards, improving the recommendation effect of media resources, and improving user experience.
[0113] Figure 4The present invention is a flowchart of a method for training a recommendation model according to an embodiment of the present invention. The present invention can be applied to the case of training a recommendation model for media resource recommendation. The method can be executed by a training device for a recommendation model, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 4 , the method specifically includes the following:
[0114] S401 . Obtain a training set, wherein the training set includes a plurality of training samples, and the training samples include sample data marked with sample labels.
[0115] The sample tag is determined by the sample labeling method provided by the embodiment of the present disclosure. The sample data includes media resource data.
[0116] S402: Use the training set to train a preset recommendation model.
[0117] Exemplarily, the preset recommendation model may be a decision tree model, a logistic regression model, a Bayesian model or a neural network model, etc. The preset recommendation model may be a pre-trained model, and the acquired training set is used to continue training the preset recommendation model to obtain the latest recommendation model. For example, the training set is a collection of training samples generated after annotating media resource data within the last day (yesterday), and the preset recommendation model is the recommendation model obtained by training in the last day. The preset recommendation model is trained using the training set to obtain the latest recommendation model obtained by training today, which is equivalent to continuously using the current sampling period to obtain a new training set to train and optimize the preset recommendation model obtained by training in the previous sampling period, thereby improving the timeliness and accuracy of the model.
[0118] Exemplarily, in the process of training a preset recommendation model using a training set, the input data of the preset recommendation model may include media resource features corresponding to the sample data (such as resource type features, resource content features, or resource publisher features, etc.), and may also include user features of the target user (such as interaction features determined based on the interaction data corresponding to the target user, attribute features such as user identification, account registration time, or historical online time, etc.), and may also include cross-features of the media resource features corresponding to the sample data and the user features of the target user. The output of the preset recommendation model may be a predicted probability indicating whether the target user is satisfied with the media resource corresponding to the sample data. The loss relationship is determined based on the difference between the preset probability and the sample label, and the model parameters in the preset recommendation model are then tuned based on the loss relationship to obtain the trained preset recommendation model, which can be recorded as the target recommendation model.
[0119] The training method of the recommendation model based on media resource recommendation provided by the embodiment of the present disclosure, when training the preset recommendation model, the training samples in the training set used include sample data marked with sample labels, and the sample labels are determined by the sample labeling method provided by the embodiment of the present disclosure. The satisfaction threshold used to determine the sample label can accurately measure the user's satisfaction with the media resources, improve the accuracy of the sample labeling, and thus help to improve the prediction accuracy of the recommendation model trained based on the labeled samples, and can achieve more accurate recommendation of media resources that meet the user's personalized satisfaction standards for different users, so that users can see more media content that they are satisfied with, improve the recommendation effect of media resources, and enhance user experience.
[0120] Figure 5 1 is a flowchart of a media resource recommendation method provided according to an embodiment of the present disclosure. The embodiment of the present disclosure can be applied to the case of recommending media resources. The method can be executed by a media resource recommendation device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 5 , the method specifically includes the following:
[0121] S501: Determine input data according to candidate media resource data.
[0122] Exemplarily, the candidate media resource data may be data of media resources in a media resource library, such as data of a live broadcast room that can be recommended to a target user. The input data may include media resource features of the candidate media resources determined based on the candidate media resource data (such as resource type features, resource content features, or resource publisher features, etc.), and may also include user features of the target user (such as interactive features determined based on interactive data corresponding to the target user, attribute features such as user identification, account registration time, or historical online duration, etc.), and may also include cross-features of the media resource features of the candidate media resources and the user features of the target user, etc. For different candidate media resources, the input data may be determined based on the data of each candidate media resource.
[0123] S502: Input the input data into a target recommendation model.
[0124] The target recommendation model is obtained by using the training method of the recommendation model provided in the embodiment of the present disclosure.
[0125] Exemplarily, for different candidate media resources, the input data corresponding to each candidate media resource may be independently input into the target recommendation model to obtain the predicted probability of satisfaction corresponding to the current candidate media resource output by the target recommendation model.
[0126] S503: Determine a media resource to be recommended for a target user from the candidate media resources to which the candidate media resource data belongs according to the output of the target recommendation model.
[0127] Exemplarily, the predicted probabilities of satisfaction corresponding to the candidate media resources are arranged in descending order, and the candidate media resources corresponding to the top N predicted probabilities are determined as the media resources to be recommended for the target user, and can be pushed to the target user side in a certain order to achieve the recommendation of media resources.
[0128] The media resource recommendation method provided by the embodiment of the present disclosure uses a target recommendation model obtained by the training method of the recommendation model provided by the embodiment of the present disclosure. When training the preset recommendation model, the training samples in the training set used include sample data labeled with sample labels, and the sample labels are determined by the sample labeling method provided by the embodiment of the present disclosure. The satisfaction threshold used to determine the sample label can accurately measure the user's satisfaction with the media resources, improve the accuracy of the sample labeling, and thus help to improve the prediction accuracy of the recommendation model trained based on the labeled samples, so as to achieve more accurate recommendation of media resources that meet the user's personalized satisfaction standards for different users, so that users can see more media content that they are satisfied with, thereby improving the recommendation effect of media resources and improving user experience.
[0129] Figure 6 1 is a schematic diagram of a sample annotation device according to an embodiment of the present disclosure. The present disclosure embodiment can be applied to the case of annotating samples of a recommendation model for media resource recommendation. The device can be implemented in hardware and / or software and can be configured in an electronic device. Figure 6 , the sample labeling device 600 includes:
[0130] The historical data acquisition module 601 is used to acquire the historical viewing data of the target user for the media resource in the historical period, wherein the historical viewing data includes the historical viewing duration and the historical interaction data;
[0131] A type determination module 602, configured to determine a user type of the target user according to the historical viewing data;
[0132] A threshold determination module 603 is used to determine a satisfaction threshold of the target user according to the user type, wherein different user types correspond to different satisfaction thresholds;
[0133] A label determination module 604 is used to determine a sample label of sample data to be labeled according to the satisfaction threshold, wherein the sample data includes media resource data;
[0134] The labeling module 605 is used to label the sample data according to the sample label.
[0135] The sample annotation device based on media resource recommendation provided by the embodiment of the present disclosure fully considers the diversity of users' viewing habits and interactive behaviors, determines the user type based on the user characteristics that can be reflected in the historical viewing time and historical interactive data, and then determines the corresponding satisfaction threshold based on the user type, so that the satisfaction threshold can more accurately measure the user's satisfaction with the media resources, improve the accuracy of sample annotation, and thus help to improve the prediction accuracy of the recommendation model trained based on the annotated samples.
[0136] In an optional implementation, the type determination module includes at least one of the following:
[0137] A first type determination unit is used to determine that the target user is a first user type when the number of historical interactions of the target user is greater than or equal to a first preset number threshold; wherein the number of historical interactions is the number of interactions of the target user with respect to the media resource within the historical period determined according to the historical interaction data;
[0138] A second type determination unit is configured to determine that the target user is a second user type when the historical viewing number is less than the first preset number threshold and the historical viewing number is greater than or equal to a second preset number threshold; wherein the historical viewing number is the number of times the target user has viewed the media resource within the historical period, determined based on the historical viewing duration;
[0139] The third type determination unit is used to determine that the target user is a third user type when the historical viewing times are less than the first preset times threshold and the historical viewing times are less than the second preset times threshold.
[0140] In an optional embodiment, the device further comprises:
[0141] A quantity determination module, configured to determine the quantity of valid historical viewing durations included in the historical viewing data, wherein the valid historical viewing durations are greater than a preset duration threshold;
[0142] The viewing number determination module is used to determine the historical viewing number according to the amount of the effective historical viewing time.
[0143] In an optional implementation, the threshold determination module includes at least one of the following:
[0144] A first threshold determination unit is used to determine, when the target user is a first user type, a first type of historical viewing time included in the historical viewing data, and determine a satisfaction threshold of the target user according to a statistical value of the first type of historical viewing time; wherein the first type of historical viewing time is a historical viewing time corresponding to a media resource with which there is interaction;
[0145] A second threshold determination unit is used to determine, when the target user is a second user type, a second type of historical viewing time included in the historical viewing data, and determine a satisfaction threshold of the target user according to a statistical value of the second type of historical viewing time; wherein the second type of historical viewing time is greater than a preset time threshold;
[0146] a third threshold determination unit, for, when the target user is a third user type, sorting the historical viewing time included in the historical viewing data and the target viewing data to obtain a time sequence, and determining the satisfaction threshold of the target user according to the historical viewing time corresponding to a preset percentile in the time sequence, wherein the target viewing data includes viewing data of a preset user for the media resource within the historical period, and the preset user is different from the target user.
[0147] In an optional implementation, the tag determination module includes:
[0148] A first determining unit, configured to determine whether the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold;
[0149] A second determining unit is configured to determine, when the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold, that the sample label of the sample data to be labeled is a first label, wherein the first label is used to indicate satisfaction;
[0150] The third determination unit is used to determine that the sample label of the sample data to be labeled is a second label when the viewing time of the target user for the sample data to be labeled is less than or equal to the satisfaction threshold, wherein the second label is used to indicate dissatisfaction.
[0151] In an optional embodiment, the device further comprises:
[0152] An interaction determination module, used for determining whether the target user has interaction with the sample data to be labeled before determining whether the viewing time of the target user with respect to the sample data to be labeled is greater than the satisfaction threshold;
[0153] A sample label determination module, configured to determine that the sample label of the sample data to be labeled is a first label when it is determined whether the target user has interacted with the sample data to be labeled;
[0154] The trigger module is used to trigger the first determination unit to determine whether the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold when it is determined that the target user has no interaction with the sample data to be labeled.
[0155] In an optional implementation, the media resource is a live broadcast resource.
[0156] Figure 7 1 is a schematic diagram of a training device for a recommendation model according to an embodiment of the present disclosure. The present disclosure embodiment can be applied to the case of training a recommendation model for media resource recommendation. The device can be implemented in hardware and / or software and can be configured in an electronic device. Figure 7 , the training device 700 of the recommendation model includes:
[0157] A training set acquisition module 701 is used to acquire a training set, wherein the training set includes a plurality of training samples, and the training samples include sample data labeled with sample labels, and the sample labels are determined by the sample labeling method provided by the embodiment of the present disclosure;
[0158] The training module 702 is used to train the preset recommendation model using the training set.
[0159] The training device for the recommendation model based on media resource recommendation provided by the embodiment of the present disclosure, when training the preset recommendation model, the training samples in the training set used include sample data marked with sample labels, and the sample labels are determined by the sample labeling method provided by the embodiment of the present disclosure. The satisfaction threshold used to determine the sample label can accurately measure the user's satisfaction with the media resource, improve the accuracy of the sample labeling, and thus help to improve the prediction accuracy of the recommendation model trained based on the labeled samples.
[0160] Figure 8 1 is a schematic diagram of a media resource recommendation device according to an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where media resources are recommended. The device can be implemented in hardware and / or software and can be configured in an electronic device. Figure 8 , the media resource recommendation device 800 includes:
[0161] An input data determination module 801 is used to determine input data according to candidate media resource data;
[0162] The data input module 802 is used to input the input data into a target recommendation model, wherein the target recommendation model is obtained using the training method of the recommendation model provided in the embodiment of the present disclosure.
[0163] The resource determination module 803 is used to determine the media resources to be recommended for the target user from the candidate media resources to which the candidate media resource data belongs according to the output of the target recommendation model.
[0164] The media resource recommendation device provided by the embodiment of the present disclosure uses a target recommendation model obtained by the training method of the recommendation model provided by the embodiment of the present disclosure. When training the preset recommendation model, the training samples in the training set used include sample data labeled with sample labels, and the sample labels are determined by the sample labeling method provided by the embodiment of the present disclosure. The satisfaction threshold used to determine the sample label can accurately measure the user's satisfaction with the media resource, improve the accuracy of the sample labeling, and thus help improve the prediction accuracy of the recommendation model trained based on the labeled samples, thereby improving the recommendation effect of the media resource.
[0165] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0166] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0167] Fig. 9 A schematic block diagram of an example electronic device 900 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0168] like Fig. 9As shown, the device 900 includes a computing unit 901, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 902 or a computer program loaded from a storage unit 908 into a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0169] A number of components in the device 900 are connected to the I / O interface 905, including: an input unit 906, such as a keyboard, a mouse, etc.; an output unit 907, such as various types of displays, speakers, etc.; a storage unit 908, such as a disk, an optical disk, etc.; and a communication unit 909, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 909 allows the device 900 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0170] The computing unit 901 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 901 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 901 performs the various methods and processes described above, such as a sample annotation method, a training method for a recommendation model, and a media resource recommendation method. For example, in some embodiments, the sample annotation method, the training method for a recommendation model, and the media resource recommendation method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 908. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 900 via the ROM 902 and / or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the sample annotation method, the training method for a recommendation model, and the media resource recommendation method described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to execute the sample labeling method, the recommendation model training method, and the media resource recommendation method in any other appropriate manner (for example, by means of firmware).
[0171] Various implementations 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 chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0172] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0173] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the 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 acoustic input, voice input, or tactile input).
[0175] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0176] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services. The server may also be a server of a distributed system, or a server combined with a blockchain.
[0177] Artificial intelligence is a discipline that studies how to use computers to simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.). It includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, machine learning / deep learning technology, big data processing technology, knowledge graph technology, and other major directions.
[0178] Cloud computing refers to a technology system that uses network access to elastically scalable shared physical or virtual resource pools. Resources can include servers, operating systems, networks, software, applications, and storage devices, and can be deployed and managed on demand and in a self-service manner. Cloud computing technology can provide efficient and powerful data processing capabilities for technical applications such as artificial intelligence and blockchain, as well as model training.
[0179] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution provided by this disclosure can be achieved, and this document does not limit this.
[0180] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A sample annotation method based on media resource recommendation, comprising: Acquire historical viewing data of the target user for the media resource in a historical period, wherein the historical viewing data includes historical viewing duration and historical interaction data; determining a user type of the target user according to the historical viewing data; Determining a satisfaction threshold of the target user according to the user type, wherein different user types correspond to different satisfaction thresholds; Determining a sample label of sample data to be labeled according to the satisfaction threshold, wherein the sample data includes media resource data; The sample data is labeled according to the sample label.
2. The method according to claim 1, wherein: The determining the user type of the target user according to the historical viewing data includes at least one of the following: In the case where the target user's historical interaction times are greater than or equal to a first preset times threshold, the target user is determined to be a first user type; wherein the historical interaction times are the times of the target user's interactions with the media resource within the historical period determined based on the historical interaction data; When the historical viewing number is less than the first preset number threshold, and the historical viewing number is greater than or equal to the second preset number threshold, the target user is determined to be a second user type; wherein the historical viewing number is the number of times the target user has viewed the media resource within the historical period, determined according to the historical viewing duration; When the number of historical viewings is less than the first preset number threshold, and the number of historical viewings is less than the second preset number threshold, the target user is determined to be a third user type.
3. The method according to claim 2, further comprising: Determine the number of valid historical viewing durations included in the historical viewing data, wherein the valid historical viewing duration is greater than a preset duration threshold; The number of historical viewing times is determined according to the number of valid historical viewing durations.
4. The method according to claim 2, wherein: The step of determining the target user's satisfaction threshold according to the user type includes at least one of the following: In the case where the target user is of the first user type, determining a first category of historical viewing time included in the historical viewing data, and determining a satisfaction threshold of the target user according to a statistical value of the first category of historical viewing time; wherein the first category of historical viewing time is a historical viewing time corresponding to an interactive media resource; In the case where the target user is of the second user type, determining a second type of historical viewing duration included in the historical viewing data, and determining a satisfaction threshold of the target user according to a statistical value of the second type of historical viewing duration; wherein the second type of historical viewing duration is greater than a preset duration threshold; In the case where the target user is a third user type, the historical viewing time included in the historical viewing data and the target viewing data is sorted to obtain a time sequence, and the satisfaction threshold of the target user is determined according to the historical viewing time corresponding to a preset percentile in the time sequence, wherein the target viewing data includes viewing data of a preset user for the media resource within the historical period, and the preset user is different from the target user.
5. The method according to claim 2, wherein: The step of determining the sample labels of the sample data to be labeled according to the satisfaction threshold comprises: Determining whether the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold; If yes, determining that the sample label of the sample data to be labeled is a first label, wherein the first label is used to indicate satisfaction; If not, it is determined that the sample label of the sample data to be labeled is a second label, wherein the second label is used to indicate dissatisfaction.
6. The method according to claim 5, before determining whether the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold, further comprising: Determine whether the target user has interaction with the sample data to be labeled; If so, determining that the sample label of the sample data to be labeled is the first label; If not, a step is triggered to determine whether the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold.
7. The method according to any one of claims 1 to 6, wherein: The media resource is a live broadcast resource.
8. A method for training a recommendation model based on media resource recommendation, comprising: Acquire a training set, wherein the training set includes a plurality of training samples, and the training samples include sample data labeled with sample labels, and the sample labels are determined by the sample labeling method according to any one of claims 1 to 7; The training set is used to train the preset recommendation model.
9. A media resource recommendation method, comprising: Determining input data according to candidate media resource data; Inputting the input data into a target recommendation model, wherein the target recommendation model is obtained by using the training method of the recommendation model according to claim 8; The media resource to be recommended for the target user is determined from the candidate media resources to which the candidate media resource data belongs according to the output of the target recommendation model.
10. A sample annotation device based on media resource recommendation, comprising: A historical data acquisition module, used to acquire the historical viewing data of the target user for the media resource in the historical period, wherein the historical viewing data includes historical viewing duration and historical interaction data; A type determination module, used to determine the user type of the target user according to the historical viewing data; A threshold determination module, used to determine a satisfaction threshold of the target user according to the user type, wherein different user types correspond to different satisfaction thresholds; A label determination module, used to determine a sample label of sample data to be labeled according to the satisfaction threshold, wherein the sample data includes media resource data; A labeling module is used to label the sample data according to the sample label.
11. The device according to claim 10, wherein: The type determination module includes at least one of the following: A first type determination unit is used to determine that the target user is a first user type when the number of historical interactions of the target user is greater than or equal to a first preset number threshold; wherein the number of historical interactions is the number of interactions of the target user with respect to the media resource within the historical period determined according to the historical interaction data; A second type determination unit is configured to determine that the target user is a second user type when the historical viewing number is less than the first preset number threshold and the historical viewing number is greater than or equal to a second preset number threshold; wherein the historical viewing number is the number of times the target user has viewed the media resource within the historical period, determined based on the historical viewing duration; The third type determination unit is used to determine that the target user is a third user type when the historical viewing times are less than the first preset times threshold and the historical viewing times are less than the second preset times threshold.
12. The apparatus according to claim 11, further comprising: A quantity determination module, configured to determine the quantity of valid historical viewing durations included in the historical viewing data, wherein the valid historical viewing durations are greater than a preset duration threshold; The viewing number determination module is used to determine the historical viewing number according to the amount of the effective historical viewing time.
13. The device according to claim 11, wherein: The threshold determination module includes at least one of the following: A first threshold determination unit is used to determine, when the target user is a first user type, a first type of historical viewing time included in the historical viewing data, and determine a satisfaction threshold of the target user according to a statistical value of the first type of historical viewing time; wherein the first type of historical viewing time is a historical viewing time corresponding to a media resource with which there is interaction; A second threshold determination unit is used to determine, when the target user is a second user type, a second type of historical viewing time included in the historical viewing data, and determine a satisfaction threshold of the target user according to a statistical value of the second type of historical viewing time; wherein the second type of historical viewing time is greater than a preset time threshold; a third threshold determination unit, for, when the target user is a third user type, sorting the historical viewing time included in the historical viewing data and the target viewing data to obtain a time sequence, and determining the satisfaction threshold of the target user according to the historical viewing time corresponding to a preset percentile in the time sequence, wherein the target viewing data includes viewing data of a preset user for the media resource within the historical period, and the preset user is different from the target user.
14. The device according to claim 11, wherein: The label determination module comprises: A first determining unit, configured to determine whether the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold; A second determining unit is configured to determine, when the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold, that the sample label of the sample data to be labeled is a first label, wherein the first label is used to indicate satisfaction; The third determination unit is used to determine that the sample label of the sample data to be labeled is a second label when the viewing time of the target user for the sample data to be labeled is less than or equal to the satisfaction threshold, wherein the second label is used to indicate dissatisfaction.
15. The apparatus according to claim 14, further comprising: An interaction determination module, used for determining whether the target user has interaction with the sample data to be labeled before determining whether the viewing time of the target user with respect to the sample data to be labeled is greater than the satisfaction threshold; A sample label determination module, configured to determine that the sample label of the sample data to be labeled is a first label when it is determined whether the target user has interacted with the sample data to be labeled; The trigger module is used to trigger the first determination unit to determine whether the viewing time of the target user for the sample data to be labeled is greater than the satisfaction threshold when it is determined that the target user has no interaction with the sample data to be labeled.
16. According to the device according to any one of claims 10-15, the media resource is a live broadcast resource.
17. A training device for a recommendation model based on media resource recommendation, comprising: A training set acquisition module, used to acquire a training set, wherein the training set includes a plurality of training samples, and the training samples include sample data annotated with sample labels, and the sample labels are determined by the sample labeling device according to any one of claims 10 to 16; The training module is used to train the preset recommendation model using the training set.
18. A media resource recommendation device, comprising: An input data determination module, used to determine input data according to candidate media resource data; A data input module, used for inputting the input data into a target recommendation model, wherein the target recommendation model is obtained by using the training device for the recommendation model according to claim 17; The resource determination module is used to determine the media resources to be recommended for the target user from the candidate media resources to which the candidate media resource data belongs according to the output of the target recommendation model.
19. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.
20. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-9.
21. A computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Cited By
Live broadcasting room recommendation method and system
CN119583895A