Sample data processing method and device, computer readable medium and electronic equipment

By generating augmented sample data through object group segmentation and counterfactual reasoning, the problem of poor model training performance caused by imbalanced sample data is solved, thereby improving the personalization and efficiency of the recommendation system.

CN117009642BActive Publication Date: 2025-11-28TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211278682.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-19
Publication Date
2025-11-28
Estimated Expiration
2042-10-19

AI Technical Summary

Technical Problem

In the process of sample data processing, the model training effect is poor due to the imbalance of the number of different object groups, especially for a small number of object groups.

Method used

By dividing the object groups according to the attribute information of the object data, the preference content data set of each attribute object group is obtained, and counterfactual reasoning is used to generate expanded sample data to increase the sample data of the smaller object groups.

Benefits of technology

This improves the model's recommendation performance for smaller groups of people, avoids the problem of poor model training performance caused by imbalanced sample data, and enhances the personalization and efficiency of the recommendation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117009642B_ABST
    Figure CN117009642B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of computer and communication, and particularly relates to a sample data processing method and device, a computer readable medium and an electronic device. The method comprises the following steps: obtaining original sample data; performing object group division according to attribute information of the object data to obtain a first attribute object group and a second attribute object group; obtaining a first preference content data set corresponding to the first attribute object group and a second preference content data set corresponding to the second attribute object group; and generating expanded sample data corresponding to the second attribute object group according to attribute information of a target object in the first attribute object group and feedback of the target object to the first preference content data set and the second preference content data set. The technical scheme of the embodiment of the application expands the sample data of the second attribute object group, thereby avoiding the problem that the model training effect is poor due to the small amount of sample data of the second attribute object group.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of computer and communication, and particularly relates to a sample data processing method and device, a computer readable medium and an electronic device. BACKGROUND

[0002] In the related technical solution, when the sample data is processed, the original sample data collected is processed. Since the original sample data contains different object groups, there will be differences in the number of different object groups, that is, there will be a phenomenon that the number of an object group is large and the number of an object group is small. In this way, in the process of training the model based on the original sample data, for the object group with a small number, the model training effect is poor due to the unbalanced sample data. SUMMARY

[0003] The purpose of the present application is to provide a sample data processing method and device, a computer readable medium and an electronic device, which can at least to some extent avoid the problem of poor model training effect caused by unbalanced sample quantity by expanding the sample quantity.

[0004] According to an aspect of an embodiment of the present application, a sample data processing method is provided, which comprises:

[0005] Obtaining original sample data, the original sample data comprising object data and content data;

[0006] According to the attribute information of the object data, the object groups are divided to obtain first attribute object groups and second attribute object groups;

[0007] Obtaining a first preferred content data set corresponding to the first attribute object groups and a second preferred content data set corresponding to the second attribute object groups;

[0008] According to the attribute information of the target object in the first attribute object groups and the feedback of the target object to the first preferred content data set and the second preferred content data set, the expansion sample data corresponding to the second attribute object groups is generated.

[0009] According to an aspect of an embodiment of the present application, a sample data processing device is provided, which comprises:

[0010] A first obtaining module is configured to obtain original sample data, the original sample data comprising object data and content data;

[0011] The dividing module is configured to divide the object groups according to attribute information of the object data, to obtain first attribute object groups and second attribute object groups.

[0012] The second obtaining module is configured to obtain a first preference content data set corresponding to the first attribute object groups and a second preference content data set corresponding to the second attribute object groups.

[0013] The expanding module is configured to generate expanded sample data corresponding to the second attribute object groups according to attribute information of a target object in the first attribute object groups and feedback of the target object to the first preference content data set and the second preference content data set.

[0014] In some embodiments of the present application, based on the above technical solutions, the expanding module is further configured to: obtain, from the first attribute object groups, a first object that does not select a first content data in the first preference content data set as the target object; change a first attribute included in attribute information of the first object to a second attribute, and generate negative sample data corresponding to the second attribute object groups in combination with the first content data.

[0015] In some embodiments of the present application, based on the above technical solutions, the expanding module is further configured to: obtain, from the first attribute object groups, a second object that selects a second content data in the second preference content data set as the target object; change a first attribute included in attribute information of the second object to a second attribute, and generate positive sample data corresponding to the second attribute object groups in combination with the second content data.

[0016] In some embodiments of the present application, based on the above technical solutions, the device further includes a verifying module configured to calculate a confidence degree of each expanded sample data; and select a preset number of expanded sample data according to confidence degree sizes corresponding to the expanded sample data.

[0017] In some embodiments of the present application, based on the above technical solutions, the verifying module is further configured to: obtain a click rate of content data included in the expanded sample data by the first attribute object groups and the second attribute object groups respectively, and calculate a first prediction score corresponding to the expanded sample data according to the click rates corresponding to the first attribute object groups and the second attribute object groups; input object data included in the expanded sample data into a recommendation model, and obtain a selection probability of content data included in the expanded sample data by an object included in the object data through the recommendation model, to generate a second prediction score; and generate the confidence degree of the expanded sample data according to the first prediction score and the second prediction score.

[0018] In some embodiments of the present application, based on the above technical solutions, the verification module is further configured to input the object data contained in the augmented sample data into a first recommendation model and a second recommendation model, to output, by the first recommendation model and the second recommendation model respectively, a selection probability of an object contained in the object data on content data contained in the augmented sample data; and calculate the second prediction score according to the selection probabilities output by the first recommendation model and the second recommendation model respectively; wherein the first recommendation model is trained by sample data corresponding to the second attribute object group, and the second recommendation model is trained by sample data corresponding to the first attribute object group and sample data corresponding to the second attribute object group.

[0019] In some embodiments of the present application, based on the above technical solutions, the verification module is further configured to sum the selection probability output by the first recommendation model and the selection probability output by the second recommendation model, and take the obtained sum result as the second prediction score.

[0020] In some embodiments of the present application, based on the above technical solutions, the verification module is further configured to sum the first prediction score and the second prediction score and take an average value, and take the obtained average value as the confidence of the augmented sample data.

[0021] In some embodiments of the present application, based on the above technical solutions, the device further comprises a training module configured to take the original sample data and the augmented sample data as training samples to train a to-be-trained model to obtain a content recommendation model.

[0022] In some embodiments of the present application, based on the above technical solutions, the training module is further configured to initialize parameters of the to-be-trained model; generate a loss function of the to-be-trained model according to a prediction loss function corresponding to the first attribute object group, a prediction loss function corresponding to the second attribute object group, and a prediction loss function corresponding to the augmented sample data; calculate a loss value of the to-be-trained model for the training samples according to the loss function of the to-be-trained model; and adjust the parameters in the to-be-trained model according to the loss value until the to-be-trained model converges.

[0023] In some embodiments of the present application, based on the above technical solutions, the division module is further configured to obtain a plurality of attribute information in the object data; divide the object group in the object data according to specified attribute information in the plurality of attribute information; and select the first attribute object group and the second attribute object group according to the number of objects in the divided object groups.

[0024] In some embodiments of the present application, based on the above technical solutions, the second obtaining module is further configured to: obtain a click rate of the objects included in the first attribute object group on each content data to obtain a first click rate of each content data; obtain a click rate of the objects included in the second attribute object group on each content data to obtain a second click rate of each content data; and regard content data with a first click rate greater than or equal to a first preset threshold as the first preferred content data set, and regard content data with a second click rate greater than or equal to a second preset threshold as the second preferred content data set.

[0025] According to an aspect of an embodiment of the present application, a computer readable medium is provided, and the computer readable medium stores a computer program. The computer program is executed by a processor to implement the sample data processing method in the above technical solutions.

[0026] According to an aspect of an embodiment of the present application, an electronic device is provided, and the electronic device includes: a processor; and a memory configured to store executable instructions of the processor; and the processor is configured to execute the sample data processing method in the above technical solutions by executing the executable instructions.

[0027] According to an aspect of an embodiment of the present application, a computer program product or a computer program is provided, and the computer program product or the computer program includes computer instructions stored in a computer readable storage medium. A processor of a computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to enable the computer device to execute the sample data processing method in the above technical solutions.

[0028] In the technical solutions provided in the embodiments of the present application, the object groups are divided according to the attribute information of the object data to obtain a first attribute object group and a second attribute object group, and then the expanded sample data of the second attribute object group is generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object on the first preferred content data set and the second preferred content data set, so that the sample data corresponding to the second attribute object group can be constructed by using the attribute information of the target object in the first attribute object group and the feedback on the content data, and the sample data belonging to the second attribute object group is increased, thereby avoiding the problem of poor model training effect caused by the small amount of sample data of the second attribute object group.

[0029] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application. BRIEF DESCRIPTION OF DRAWINGS

[0030] Figure 1A system architecture block diagram of the related technical solution is schematically shown.

[0031] Figure 2 A step flow of the sample data processing method provided by an embodiment of the application is schematically shown.

[0032] Figure 3 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0033] Figure 4 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0034] Figure 5 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0035] Figure 6 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0036] Figure 7 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0037] Figure 8 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0038] Figure 9 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0039] Figure 10 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0040] Figure 11 A step flow of the sample data processing method provided by another embodiment of the application is schematically shown.

[0041] Figure 12 A system architecture block diagram of the application is schematically shown.

[0042] Figure 13 A structure block diagram of the sample data processing apparatus provided by an embodiment of the application is schematically shown.

[0043] Figure 14 A computer system structure block diagram of an electronic device suitable for implementing an embodiment of the application is schematically shown. DETAILED DESCRIPTION

[0044] Example implementations will now be described more fully with reference to the accompanying drawings. Example implementations may, however, be implemented in many different forms and should not be construed as limited to the examples set forth herein; rather, these implementations are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the example implementations to those skilled in the art.

[0045] Moreover, the described features, structures, or characteristics can be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of embodiments of the application. One skilled in the relevant art will recognize, however, that the

[0046] The block diagrams in the drawings show only the functionality of the example implementations and do not imply any particular physical or architectural arrangement of the example implementations. No inference should be made regarding the architecture or configuration of a hardware implementation from the description of the example implementations provided herein. Also, the functionality provided by the example implementations can be split into additional components not explicitly described, or combined with other example implementations.

[0047] The flow diagrams depicted in the drawings show example implementations only, and are not necessarily to scale. Also, the flow diagrams can not include all of the steps that can be taken, or the particular order in which they can be taken, by an example implementation. For example, some operations / steps can be combined or separated into different operations / steps, and some operations / steps can be performed in different orders than shown.

[0048] To facilitate understanding of the technical solutions of the present application, some abbreviations and key terms are explained as follows:

[0049] Counterfactual reasoning: A research tool in the field of causal inference, which constructs a reasoning behavior of a possible hypothesis by negating the past facts that have occurred, and is used to analyze the influence degree of a variable on the result.

[0050] Data augmentation: A common method in deep learning, which increases the training data set by simple operations on existing data, improves the diversity of the data set, and makes the model have stronger generalization ability.

[0051] CTR: Click Through Rate, representing the click rate.

[0052] ATCA: Attribute-aware Counterfactual Augmentation, a data augmentation method based on counterfactuals.

[0053] Object set U = {u1, u2, ..., u} n} represents all n objects in the dataset;

[0054] Content set V = {v1, v2, ..., v m} represents all m items in the dataset;

[0055] Attribute x represents the attribute characteristics of the object or content, such as object ID, age, content ID, title, etc.

[0056] Object representation u i ={x1,x2,…,x t} represents the representation of all t attributes of the i-th object;

[0057] Content represents v i ={x1,x2,…,x l} represents the representation of all l attributes of the i-th content;

[0058] Deviation attribute x s ∈{a,b} represents an attribute that has a clearly unbalanced distribution in the object, and all possible values ​​of the attribute are a and b;

[0059] The other properties X of an object represent all other properties of the object except for the deviation property;

[0060] Strong attribute object group U a This represents the group of objects that are divided according to their deviation attributes, and the group of objects that constitutes the majority of interactions.

[0061] Weak attribute object group U b This represents dividing the object group based on deviation attributes, and representing a minority of the interacting object group;

[0062] Strong attribute content v a This represents content that is favored by objects with strong attributes.

[0063] Weak attribute content v b This represents content that is liked by objects with weaker attributes.

[0064] The object click interaction y(u,v)∈{0,1} represents whether object u clicked content v. If the value is 1, it means that it clicked; if the value is 0, it means that it did not click.

[0065] The object exposure interaction D(u,v)∈{0,1} represents whether the content v is exposed to the object u. If the value is 1, it means that the content is exposed; if the value is 0, it means that the content is not exposed to the object.

[0066] The click rate p(y(u,v))∈[0,1] represents the probability that object u clicks on content v;

[0067] feature filter network f i , represents the i-th feature filter network, and sets the corresponding feature to zero;

[0068] base classifier C i , represents the i-th base classifier, and completes the prediction task;

[0069] loss function L, represents the loss function for machine learning optimization;

[0070] confidence score s∈[0,1], represents the confidence prediction score obtained by the confidence estimation model.

[0071] In the related technical solution, in order to take into account the influence of sample data corresponding to different object groups on the training model, the general method is to input the original sample data into the training model, so that different object groups have similar fair recommendation results, that is, the recommendation results of different object groups cannot have obvious discrimination. Among them, different object groups are taken as an example of strong attribute object group and weak attribute object group, and the strong attribute object group can be considered as the object group occupying the majority of interaction in the process of interaction, and the weak attribute object group can be considered as the object group occupying the minority of interaction in the process of interaction. That is, in order to take into account the strong attribute object group and the weak attribute object group in the related technical solution, the general method is to have similar fair recommendation results for different attribute object groups.

[0072] For fairness methods, the main purpose of fairness method related research is to realize that different group objects can be treated equally by the recommendation model, specifically, it is hoped that an unbiased representation of objects and content can be learned, so as to have similar recommendation results when facing objects with different attributes. Referring to Figure 1 , Figure 1 schematically shows the system architecture diagram of the related technical solution. The basic idea of this method is to train a predictor and an adversarial classifier at the same time, the predictor is used to learn information representation, and the adversarial classifier is used to minimize the ability of the predictor to predict protected / sensitive attributes, so that sensitive features can be removed from the representation, and in turn alleviate the problem of differential treatment. The setting of the adversarial network includes two modules: a filtering module for removing sensitive information from object embedding representation; and a discriminator module for predicting sensitive features from object embedding representation learned by the filtering module. Specifically, the model first makes the object representation u pass through K feature filters f to obtain the corresponding filtered object representation u' which removes the sensitive features, and then uses K corresponding discriminator modules composed of base classifiers to predict the sensitive features of the object according to u', and obtains the corresponding adversarial learning loss L C . Finally, the loss of adversarial learning L Cand the prediction loss L of the recommendation model Rec Comprehensively as the final model training loss.

[0073] However, if this method is used, it will often cause a loss of personalized recommendation effect, because in a real recommendation system, some attributes of the object often have a great influence on the interest of the object. And there are obvious differences in interest points and interaction characteristics between objects with different attributes, so if an unbiased representation of the object and the content is obtained by using the fairness method for recommendation, it is likely to negatively affect the degree of personalization of the recommendation result.

[0074] The difference between the present application and the fairness method is that the present application focuses on how to use the differences between different attribute object groups to strengthen the data information of the weak attribute objects, so as to improve the recommendation effect of the recommendation system for the weak attribute objects. Specifically, the fairness recommendation hopes to eliminate the differences between different attribute groups to achieve fair recommendation, but will damage the degree of personalization and the recommendation efficiency of the recommendation, and the present application focuses on using the differences between different attribute groups to assist the recommendation effect of the weak attribute objects, and improving the degree of personalization and the recommendation effect of the recommendation system.

[0075] Specifically, the sample data processing method provided by the present application is: obtaining original sample data, the original sample data including object data and content data; performing object group division according to attribute information of the object data to obtain a first attribute object group and a second attribute object group; obtaining a first preference content data set corresponding to the first attribute object group, and a second preference content data set corresponding to the second attribute object group; and generating expansion sample data corresponding to the second attribute object group according to attribute information of a target object in the first attribute object group and feedback of the target object to the first preference content data set and the second preference content data set. In this way, by generating the expansion sample data of the second attribute object group, the data information of the second attribute object group is strengthened, and when the recommendation model is trained, the recommendation effect of the recommendation model for the second attribute object group is improved.

[0076] In addition, it should be noted that the application scenario of the sample data processing method provided by the present application can be used in multiple scenarios of a recommendation platform, such as news recommendation, video recommendation and other recommendation scenarios. The sample data processing method provided by the method is mainly used to help alleviate the recommendation effect deviation caused by some strong attribute objects in the recommendation system, and can also be used to alleviate the recommendation result deviation problem caused by sparse data lacking positive supervision information.

[0077] The sample data processing method, device, computer readable medium and electronic equipment provided by the present application will be described in detail in combination with specific embodiments.

[0078] Figure 2 The steps of the sample data processing method provided by an embodiment of the present application are schematically shown. The execution subject of the sample data processing method can be a terminal device or a server. As shown in the figure, the sample data processing method can mainly include the following steps S210 to S240. Figure 2

[0079] In step S210, original sample data is acquired, and the original sample data includes object data and content data.

[0080] The object data refers to data about objects in the original sample data, for example, the object data can be each object included in the original sample data and attribute information corresponding to each object. The content data refers to data about content in the original sample data, for example, the content data can be videos, images, articles or other content, and attribute information corresponding to the content.

[0081] In step S220, object groups are divided according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0082] When the object groups in the original sample data are divided, the object groups can be divided according to the attribute information of the object data, to obtain the first attribute object group and the second attribute object group. The attribute information includes attributes that are obviously unevenly distributed in the objects, for example, the attribute information of the object data can be object ID, gender, age, etc. For example, assuming that the attribute information that is obviously unevenly distributed in the objects is gender, and the number of male objects is greater than the number of female objects, when the object groups are divided, the object groups can be divided into male groups and female groups according to gender, the male groups are the first attribute object groups, and the female groups are the second attribute object groups. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0083] In this way, the object groups are divided according to the attribute information of the object data, which is beneficial to further determine the preferred content of each attribute object group, and then the sample data of the attribute object group with a smaller number can be expanded according to the preferred content. Of course, when the object groups in the original sample data are divided, the object groups can also be divided by other methods.

[0084] In step S230, a first preferred content data set corresponding to the first attribute object group and a second preferred content data set corresponding to the second attribute object group are acquired.

[0085] ​The first-preference content data set corresponding to the first attribute object group refers to content data that is preferred by most of the first attribute object group in a series of content data; and the second-preference content data set corresponding to the second attribute object group refers to content data that is preferred by most of the second attribute object group in the series of content data. The first-preference content data set and the second-preference content data set can be obtained by counting the content data selected by the first attribute object group and the second attribute object group.

[0086] Still taking the first attribute object group as a male group and the second attribute object group as a female group as an example, generally, the male group prefers game videos and the female group prefers entertainment videos. Therefore, the first-preference content data set can include game videos and the second-preference content data set can include entertainment videos. In this way, by obtaining the first-preference content data set and the second-preference content data set, it is beneficial to expand the sample data of the attribute object group with a smaller number according to the preferred content.

[0087] In step S240, the expanded sample data corresponding to the second attribute object group is generated according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first-preference content data set and the second-preference content data set.

[0088] The first attribute object group and the second attribute object group each include a plurality of objects, and each object has corresponding attribute information. When generating the expanded sample data corresponding to the second attribute object group, the positive sample data corresponding to the second attribute object group can be generated according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the second-preference content data set; or the negative sample data corresponding to the second attribute object group can be generated according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first-preference content data set; or the positive sample data and the negative sample data can be generated simultaneously according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first-preference content data set and the second-preference content data set.

[0089] In the technical solution provided in this application embodiment, the object group is first divided according to the attribute information of the object data to obtain a first attribute object group and a second attribute object group. Then, based on the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set, the expanded sample data of the second attribute object group is generated. This allows the attribute information of the target object in the first attribute object and the feedback of the target object to the content data to construct sample data corresponding to the second attribute object group, thereby increasing the sample data belonging to the second attribute object group and avoiding the problem of poor model training effect caused by the small amount of sample data in the second attribute object group.

[0090] In generating negative sample data corresponding to the second attribute object group, this application embodiment uses a counterfactual reasoning method. Specifically, counterfactual reasoning, as a research relationship in the field of causal inference, refers to the reasoning behavior of negating past facts to construct a possible hypothesis, which is used to analyze the degree of influence of a certain variable on the result.

[0091] When generating supplementary sample data corresponding to the second attribute object, this application assumes that the probability of an object clicking on content liked by objects with the same attribute is greater than the probability of clicking on content liked by objects with other attributes, that is:

[0092] p(y(u(x s =a,X),v a ))≥p(y(u(x s =b,X),v b ))

[0093] Where, x s This represents an attribute that exhibits a significant imbalance in its distribution within the object, x. s The possible values ​​for are a and b, where X represents all attributes of the object except for the deviation attribute; v a Represents content that is liked by objects with a dominant attribute; v b p(y(u,v)) represents the content that is liked by the object with the weaker attribute, and p(y(u,v)) represents the probability that object u clicks on content v.

[0094] Based on the above assumptions, if an object clicks on an item liked by other objects with different attributes, then it must be strongly influenced by attributes other than the bias attribute. In this case, changing the object's bias attribute will not affect the interaction result. Therefore, two inferences can be drawn:

[0095] Corollary 1: If a dominant attribute object u(x) s =a,X) Click on the content v favored by the weaker attribute object. bIf we change it to a weak attribute object, the object will still click on the content v. b ,Right now:

[0096] Y(u(x s =a,X),v b )=1→Y(u(x s =a,X),v b ) = 1

[0097] Corollary 2: If a dominant attribute object u(x) s =,X) dislikes receiving content liked by the dominant attribute object v a If we change it to a weak attribute object, the object still won't click on the content v. b ,Right now:

[0098] Y(u(x s =a,X),v a )=0→Y(u(x s =b,X),v a ) = 0

[0099] To better understand this hypothesis, consider the following example: Suppose that most men in the male population like gaming videos, and most women in the female population like entertainment videos. For Corollary 1, suppose a male user clicks on an entertainment video. Theoretically, men generally prefer gaming videos, but this user clicked on an entertainment video, which is preferred by the female population. If we change the male attribute to female, the female user will still click on the entertainment video, and this modified sample data will be used as the female population's sample data. Similarly, for Corollary 2, suppose a male user does not click on a gaming video. Theoretically, men generally prefer gaming videos, but this user did not click on one. Therefore, even if we change the male attribute to female, the female user will not click on the gaming video, and this modified sample data will be used as the female population's sample data.

[0100] In some alternative embodiments, see Figure 3 , Figure 3 The flowchart illustrating the steps of a sample data processing method provided in another embodiment of this application is shown. This sample data processing method mainly includes the following steps.

[0101] Step S210: Obtain raw sample data, which includes object data and content data.

[0102] The object data refers to data about objects in the original sample data, for example, the object data can be each object contained in the original sample data and attribute information corresponding to each object. The content data refers to data about content in the original sample data, for example, the content data can be video, image or article and other content and attribute information corresponding to the content.

[0103] In step S220, object groups are divided according to the attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0104] When the object groups in the original sample data are divided, the object groups can be divided according to the attribute information of the object data, to obtain a first attribute object group and a second attribute object group. The attribute information includes attributes that are obviously unevenly distributed in the objects, for example, the attribute information of the object data can be object ID, gender, age, etc. For example, assuming that the attribute information that is obviously unevenly distributed in the objects is gender, and the number of male objects is greater than the number of female objects, when the object groups are divided, the object groups can be divided into male groups and female groups according to the gender, the male groups are the first attribute object groups, and the female groups are the second attribute object groups. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0105] In this way, the object groups are divided according to the attribute information of the object data, which is beneficial to further determine the preferred content of each attribute object group, and then the sample data of the attribute object group with a smaller number can be expanded according to the preferred content. Of course, when the object groups in the original sample data are divided, the object groups can also be divided by other methods.

[0106] In step S230, a first preferred content data set corresponding to the first attribute object group and a second preferred content data set corresponding to the second attribute object group are obtained.

[0107] The first preferred content data set corresponding to the first attribute object group refers to content data that is preferred by most of the first attribute object groups in a series of content data. The second preferred content data set corresponding to the second attribute object group refers to content data that is preferred by most of the second attribute object groups in a series of content data. The first preferred content data set and the second preferred content data set can be obtained by counting the content data selected by the first attribute object group and the second attribute object group.

[0108] Still taking the first attribute object group as the male group and the second attribute object group as the female group as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos. Therefore, the first preference content data set may include game videos, and the second preference content data set may include entertainment videos. In this way, by obtaining the first preference content data set and the second preference content data set, the sample data of the attribute object group with a smaller number can be expanded according to the preferred content.

[0109] In step S310, a first object that does not select the first content data in the first preference content data set is obtained from the first attribute object group as a target object.

[0110] Generally, most of the objects in the first attribute object group will select the content data in the first preference content data set, but there may be an object in the first attribute object group that does not select the content data in the first preference content data set. Therefore, when constructing the sample data, the first object that does not select the first content data in the first preference content data set can be obtained from the first attribute object group.

[0111] For example, taking the first attribute object group as the male group and the second attribute object group as the female group as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos. In the male group, there is an individual male who does not click the game video, and the male is taken as the target object.

[0112] In step S320, the first attribute contained in the attribute information of the first object is changed to the second attribute, and the first content data is combined to generate the negative sample data corresponding to the second attribute object group.

[0113] Still taking the above example as an example, when generating the negative sample data of the female group, the gender attribute of the first object can be modified to female, and other attributes remain unchanged, so that the sample data corresponding to the female group can be constructed.

[0114] In this way, the negative sample data corresponding to the second attribute object group is generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set, and the sample data belonging to the second attribute object group is expanded, so that the problem that the model output result is inaccurate due to the small amount of sample data of the second attribute object group is avoided.

[0115] In some optional embodiments, referring to Figure 4 , Figure 4 The steps of the sample data processing method provided by another embodiment of the application are schematically shown. The sample data processing method may mainly include the following steps.

[0116] In step S210, original sample data is obtained, the original sample data including object data and content data.

[0117] The object data refers to data about objects in the original sample data, for example, the object data can be each object included in the original sample data and attribute information corresponding to each object. The content data refers to data about content in the original sample data, for example, the content data can be videos, images, articles or other content, and attribute information corresponding to the content.

[0118] In step S220, object groups are divided according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0119] When the object groups in the original sample data are divided, the object groups can be divided according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group. The attribute information includes attributes that are obviously unevenly distributed in the objects, for example, the attribute information of the object data can be object ID, gender, age, etc. For example, assuming that the attribute information that is obviously unevenly distributed in the objects is gender, and there are more male objects than female objects, when the object groups are divided, the object groups can be divided into male groups and female groups according to gender, the male groups being the first attribute object groups and the female groups being the second attribute object groups. It should be noted that the first attribute object groups can also be referred to as strong attribute object groups, and the second attribute object groups can also be referred to as weak attribute object groups.

[0120] In this way, the object groups are divided according to the attribute information of the object data, which is conducive to further determining the preferred content of each attribute object group, and then the sample data of the attribute object group with a smaller number can be expanded according to the preferred content. Of course, when the object groups in the original sample data are divided, the object groups can also be divided in other ways.

[0121] In step S230, a first preferred content data set corresponding to the first attribute object groups and a second preferred content data set corresponding to the second attribute object groups are obtained.

[0122] The first preferred content data set corresponding to the first attribute object groups refers to content data that is preferred by most of the first attribute object groups in a series of content data. The second preferred content data set corresponding to the second attribute object groups refers to content data that is preferred by most of the second attribute object groups in a series of content data. The first preferred content data set and the second preferred content data set can be obtained by counting content data selected by the first attribute object groups and the second attribute object groups.

[0123] Still taking the first attribute object group as the male group and the second attribute object group as the female group as an example, generally, the male group prefers game videos and the female group prefers entertainment videos, and thus the first preference content data set can include game videos and the second preference content data set can include entertainment videos. In this way, by obtaining the first preference content data set and the second preference content data set, the sample data of the attribute object group with less quantity can be expanded according to the preferred content.

[0124] In step S410, a second object that selects the second content data in the second preference content data set is obtained from the first attribute object group as the target object.

[0125] Generally, most of the objects in the first attribute object group will select the content data in the first preference content data set, but there will be an object in the first attribute object group that selects the content data in the second preference content data set. Therefore, when constructing the sample data, the second object that selects the second content data in the second preference content data set can be obtained from the first attribute object group.

[0126] For example, taking the first attribute object group as the male group and the second attribute object group as the female group as an example, generally, the male group prefers game videos and the female group prefers entertainment videos. In the male group, if an individual male clicks the entertainment video, the male will be taken as the target object.

[0127] In step S420, the first attribute contained in the attribute information of the second object is changed to the second attribute, and the second content data is combined to generate the positive sample data corresponding to the second attribute object group.

[0128] Still taking the above example as an example, when generating the positive sample data of the female group, the gender attribute of the first object can be modified to female, and other attributes remain unchanged, so as to construct the sample data corresponding to the female group.

[0129] In this way, the positive sample data corresponding to the second attribute object group is generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the second preference content data set, and the sample data belonging to the second attribute object group is expanded, so as to avoid the problem that the model output result is inaccurate due to the less sample data of the second attribute object group.

[0130] In some optional embodiments, referring to Figure 5 , Figure 5The steps of the sample data processing method provided by another embodiment of the application are schematically shown. The sample data processing method can mainly include the following steps.

[0131] In step S210, original sample data is acquired, and the original sample data includes object data and content data.

[0132] The object data refers to data about objects in the original sample data, for example, the object data can be each object included in the original sample data and attribute information corresponding to each object. The content data refers to data about content in the original sample data, for example, the content data can be videos, images, articles or other content, and attribute information corresponding to the content.

[0133] In step S220, object groups are divided according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0134] When the object groups in the original sample data are divided, the object groups can be divided according to the attribute information of the object data, to obtain the first attribute object group and the second attribute object group. The attribute information includes attributes that are obviously unevenly distributed in the objects, for example, the attribute information of the object data can be object ID, gender, age, etc. For example, assuming that the attribute information that is obviously unevenly distributed in the objects is gender, and the number of male objects is greater than the number of female objects, when the object groups are divided, the object groups can be divided into a male group and a female group according to gender, the male group is the first attribute object group, and the female group is the second attribute object group. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0135] In this way, the object groups are divided according to the attribute information of the object data, which is beneficial to further determine the preferred content of each attribute object group, and then the sample data of the attribute object group with a smaller number can be expanded according to the preferred content. Of course, when the object groups in the original sample data are divided, the object groups can also be divided by other methods.

[0136] In step S230, a first preferred content data set corresponding to the first attribute object group and a second preferred content data set corresponding to the second attribute object group are acquired.

[0137] The first preference content data set corresponding to the first attribute object group refers to content data that is preferred by most of the first attribute object group in a series of content data. The second preference content data set corresponding to the second attribute object group refers to content data that is preferred by most of the second attribute object group in a series of content data. The first preference content data set and the second preference content data set can be obtained by counting the content data selected by the first attribute object group and the second attribute object group.

[0138] Still taking the first attribute object group as a male group and the second attribute object group as a female group as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos. Therefore, the first preference content data set may include game videos, and the second preference content data set may include entertainment videos. In this way, by obtaining the first preference content data set and the second preference content data set, it is beneficial to expand the sample data of the attribute object group with a smaller number according to the preferred content.

[0139] In step S240, the expanded sample data corresponding to the second attribute object group is generated according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0140] The first attribute object group and the second attribute object group each include a plurality of objects, and each object has corresponding attribute information. When the expanded sample data corresponding to the second attribute object group is generated, positive sample data and negative sample data can be generated simultaneously according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0141] In step S510, the confidence of each generated expanded sample data is calculated.

[0142] After each expanded sample data is generated, noise is easily introduced into the expanded sample data. The main sources of noise are that the object data of the weak attribute group is strongly sparse, so there may not be sufficient interaction records when the content preferred by the object is statistically analyzed, resulting in inaccurate statistical results. Or, in some specific scenarios, the expanded sample may conflict with the real situation, resulting in incorrect samples obtained by augmentation, thereby interfering with model learning. Therefore, after each expanded sample data is generated, the sample data is screened. The quality of the expanded sample data can be estimated by the confidence estimation rule proposed, thereby ensuring the correctness and effectiveness of data augmentation.

[0143] Step S520, selecting a preset number of augmented sample data according to the confidence degree corresponding to each augmented sample data.

[0144] The confidence degree corresponding to each augmented sample data is calculated, the confidence degrees are arranged according to the size, and a preset number of augmented sample data is selected.

[0145] In this way, the augmented sample data is screened by calculating the confidence degree corresponding to each augmented sample data, so that the augmented sample data with better quality can be obtained.

[0146] In some optional embodiments, referring to Figure 6 , Figure 6 The steps of the sample data processing method provided by another embodiment of the application are schematically shown. The sample data processing method can mainly include the following steps.

[0147] Step S210, obtaining original sample data, the original sample data including object data and content data.

[0148] The object data refers to the data about objects in the original sample data, for example, the object data can be each object included in the original sample data and the attribute information corresponding to each object; the content data refers to the data about content in the original sample data, for example, the content data can be videos, images or articles and other content and the attribute information corresponding to them.

[0149] Step S220, performing object group division according to the attribute information of the object data to obtain a first attribute object group and a second attribute object group.

[0150] When the object group in the original sample data is divided, the object group can be divided according to the attribute information of the object data, so as to obtain the first attribute object group and the second attribute object group. The attribute information includes attributes that are obviously unevenly distributed in the object, for example, the attribute information of the object data can be object ID, gender, age, etc. For example, assuming that the attribute information that is obviously unevenly distributed in the object is gender, and the number of male objects is greater than that of female objects, when the object group is divided, the object group can be divided into a male group and a female group according to the gender, the male group is the first attribute object group, and the female group is the second attribute object group. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0151] Step S230, obtaining a first preferred content data set corresponding to the first attribute object group and a second preferred content data set corresponding to the second attribute object group.

[0152] The first preference content data set corresponding to the first attribute object group refers to content data that is preferred by most of the first attribute object group in a series of content data; and the second preference content data set corresponding to the second attribute object group refers to content data that is preferred by most of the second attribute object group in the series of content data. The first preference content data set and the second preference content data set can be obtained by counting the content data selected by the first attribute object group and the second attribute object group.

[0153] Still taking the first attribute object group as a male group and the second attribute object group as a female group as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos. Therefore, the first preference content data set can include game videos, and the second preference content data set can include entertainment videos. In this way, by obtaining the first preference content data set and the second preference content data set, it is beneficial to expand the sample data of the attribute object group with a smaller number according to the preferred content.

[0154] In step S240, the expanded sample data corresponding to the second attribute object group is generated according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0155] The first attribute object group and the second attribute object group each include a plurality of objects, and each object has corresponding attribute information. When the expanded sample data corresponding to the second attribute object group is generated, positive sample data and negative sample data can be generated simultaneously according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0156] In step S511, the click rate of the content data included in the expanded sample data by the first attribute object group and the second attribute object group is obtained respectively, and the first prediction score corresponding to the expanded sample data is calculated according to the click rates corresponding to the first attribute object group and the second attribute object group.

[0157] The click rate of the content data included in the expanded sample data by the first attribute object group and the second attribute object group is obtained respectively, and the first prediction score corresponding to the expanded sample data is calculated according to the click rates corresponding to the first attribute object group and the second attribute object group.

[0158] In step S512, the object data included in the expanded sample data is input into the recommendation model, and the selection probability of the object included in the object data to the content data included in the expanded sample data is obtained through the recommendation model to generate the second prediction score.

[0159] The recommendation model is a pre-trained model. By inputting the object data contained in the augmented sample data into the recommendation model, the probability of selection of each object in the object data to the content data contained in the augmented sample data can be predicted.

[0160] In step S513, the confidence of the augmented sample data is generated according to the first prediction score and the second prediction score.

[0161] The confidence of the augmented sample data is generated according to the first prediction score and the second prediction score. The first prediction score and the second prediction score are summed and averaged, and the obtained average value is taken as the confidence of the augmented sample data.

[0162] In this way, by calculating the first prediction score and the second prediction score respectively, the confidence of the augmented sample data can be obtained according to the first prediction score and the second prediction score, thereby facilitating the screening of the augmented sample data.

[0163] In some optional embodiments, referring to Figure 7 , Figure 7 The steps of the sample data processing method provided by another embodiment of the application are schematically shown. The sample data processing method can mainly include the following steps.

[0164] In step S210, original sample data is obtained, and the original sample data includes object data and content data.

[0165] The object data refers to the data about the objects in the original sample data, for example, the object data can be each object contained in the original sample data and the attribute information corresponding to each object. The content data refers to the data about the content in the original sample data, for example, the content data can be videos, images or articles and other content, and the attribute information corresponding thereto.

[0166] In step S220, object group division is performed according to the attribute information of the object data, and a first attribute object group and a second attribute object group are obtained.

[0167] When the object groups in the original sample data are divided, the object groups can be divided according to attribute information of the object data, so as to obtain a first attribute object group and a second attribute object group. The attribute information includes an attribute that is obviously unevenly distributed in the objects, and the attribute information of the object data can be, for example, object ID, gender, age, and the like. For example, assuming that the attribute information that is obviously unevenly distributed in the objects is gender, and there are more male objects than female objects, when the object groups are divided, the object groups can be divided into male groups and female groups according to gender, the male groups are the first attribute object groups, and the female groups are the second attribute object groups. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0168] In this way, the object groups are divided according to the attribute information of the object data, so as to facilitate further determination of the preference content of each attribute object group, and then the sample data of the attribute object group with a smaller number can be expanded according to the preference content. Of course, when the object groups in the original sample data are divided, the object groups can also be divided in other ways.

[0169] In step S230, a first preference content data set corresponding to the first attribute object group and a second preference content data set corresponding to the second attribute object group are obtained.

[0170] The first preference content data set corresponding to the first attribute object group refers to content data that is preferred by most of the first attribute object groups in a series of content data, and the second preference content data set corresponding to the second attribute object group refers to content data that is preferred by most of the second attribute object groups in a series of content data. The first preference content data set and the second preference content data set can be obtained by counting the content data selected by the first attribute object group and the second attribute object group.

[0171] Still taking the male group as the first attribute object group and the female group as the second attribute object group as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos, so the first preference content data set can include, for example, game videos, and the second preference content data set can include, for example, entertainment videos. In this way, by obtaining the first preference content data set and the second preference content data set, the sample data of the attribute object group with a smaller number can be expanded according to the preference content.

[0172] In step S240, according to attribute information of a target object in the first attribute object group and feedback of the target object to the first preference content data set and the second preference content data set, expansion sample data corresponding to the second attribute object group is generated.

[0173] The first attribute object group and the second attribute object group each include a plurality of objects, and each object has corresponding attribute information. When generating the augmented sample data corresponding to the second attribute object group, the positive sample data and the negative sample data can be generated simultaneously according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preferred content data set and the second preferred content data set.

[0174] In step S511, the click rates of the first attribute object group and the second attribute object group to the content data included in the augmented sample data are obtained respectively, and the first prediction score corresponding to the augmented sample data is calculated according to the click rates corresponding to the first attribute object group and the second attribute object group.

[0175] The click rates of the first attribute object group and the second attribute object group to the content data included in the augmented sample data are obtained, and the first prediction score corresponding to the augmented sample data is obtained by subtracting the two click rates.

[0176] In step S5121, the object data included in the augmented sample data is input into the first recommendation model and the second recommendation model, so as to output the selection probability of the object included in the object data to the content data included in the augmented sample data through the first recommendation model and the second recommendation model respectively.

[0177] The first recommendation model and the second recommendation model are both pre-trained models, and by inputting the object data included in the augmented sample data into different recommendation models, more accurate selection probability values can be predicted.

[0178] In step S5122, the second prediction score is calculated according to the selection probabilities output by the first recommendation model and the second recommendation model respectively.

[0179] The first recommendation model is trained by the sample data corresponding to the second attribute object group, and the second recommendation model is trained by the sample data corresponding to the first attribute object group and the sample data corresponding to the second attribute object group.

[0180] When the second prediction score is calculated according to the selection probabilities output by the first recommendation model and the second recommendation model respectively, the selection probability output by the first recommendation model and the selection probability output by the second recommendation model are summed, and the sum result is taken as the second prediction score.

[0181] In step S513, the confidence of the augmented sample data is generated according to the first prediction score and the second prediction score.

[0182] In this way, different processing is respectively performed by different recommendation models, so that more accurate confidence can be obtained.

[0183] In some optional embodiments, referring to Figure 8 , Figure 8 The steps of the sample data processing method provided by another embodiment of the application are schematically shown. The sample data processing method can mainly include the following steps.

[0184] In step S210, original sample data is obtained, and the original sample data includes object data and content data.

[0185] The object data refers to data about objects in the original sample data, for example, the object data can be each object included in the original sample data and attribute information corresponding to each object. The content data refers to data about content in the original sample data, for example, the content data can be videos, images, articles or other content, and attribute information corresponding to the content.

[0186] In step S220, object groups are divided according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0187] When the object groups in the original sample data are divided, the object groups can be divided according to the attribute information of the object data, to obtain the first attribute object group and the second attribute object group. The attribute information includes attributes that are obviously unevenly distributed in the objects, for example, the attribute information of the object data can be object ID, gender, age, etc. For example, assuming that the attribute information that is obviously unevenly distributed in the objects is gender, and the number of male objects is greater than the number of female objects, when the object groups are divided, the object groups can be divided into male groups and female groups according to the gender, the male groups are the first attribute object groups, and the female groups are the second attribute object groups. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0188] In step S230, a first preferred content data set corresponding to the first attribute object group is obtained, and a second preferred content data set corresponding to the second attribute object group is obtained.

[0189] The first preference content data set corresponding to the first attribute object group refers to content data that is preferred by most of the first attribute object group in a series of content data. The second preference content data set corresponding to the second attribute object group refers to content data that is preferred by most of the second attribute object group in a series of content data. The first preference content data set and the second preference content data set can be obtained by counting the content data selected by the first attribute object group and the second attribute object group.

[0190] Still taking the first attribute object group as a male group and the second attribute object group as a female group as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos. Therefore, the first preference content data set may include game videos, and the second preference content data set may include entertainment videos. In this way, by obtaining the first preference content data set and the second preference content data set, it is beneficial to expand the sample data of the attribute object group with a smaller number according to the preferred content.

[0191] In step S240, the expanded sample data corresponding to the second attribute object group is generated according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0192] The first attribute object group and the second attribute object group each include a plurality of objects, and each object has corresponding attribute information. When the expanded sample data corresponding to the second attribute object group is generated, positive sample data and negative sample data can be generated simultaneously according to the attribute information of a target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0193] In step S510, the confidence of each generated expanded sample data is calculated.

[0194] After each expanded sample data is generated, noise is inevitably introduced into the expanded sample data. The main sources of noise are that the object data of the weak attribute group is strongly sparse, so there may not be sufficient interaction records when the content preferred by the object is statistically analyzed, resulting in inaccurate statistical results. Or, in some specific scenarios, the expanded sample may conflict with the real situation, resulting in incorrect samples obtained by augmentation, thereby interfering with model learning. Therefore, after each expanded sample data is generated, the sample data is screened. The quality of the expanded sample data can be estimated by the confidence estimation rule proposed, thereby ensuring the correctness and effectiveness of data augmentation.

[0195] Step S520, according to the confidence degree corresponding to each augmented sample data, selecting a preset number of augmented sample data.

[0196] By calculating the confidence degree corresponding to each augmented sample data, arranging the confidence degrees according to the size, and selecting a preset number of augmented sample data.

[0197] Step S810, taking the original sample data and the augmented sample data as training samples to train the to-be-trained model, and obtaining a content recommendation model.

[0198] The to-be-trained model may be a basic recommendation model. For the basic recommendation model, the present recommendation model part accepts the object representation u and the content representation v as input, and calculates the predicted click rate p(u, v) as output. Since the present method is a general framework, there is no requirement for specific recommendation models, and therefore all recommendation algorithms conforming to the above form can be used. In this paper, PLE (Progressive Layered Extraction) is selected as the basic recommendation model, and the CTR (Click Rate) estimation tasks of the strong attribute group and the weak attribute group are respectively taken as the two tasks of PLE. Therefore, the prediction results y a (u, v) and y b (u, v) can be calculated by the following formula:

[0199]

[0200] where t a and t b represent the output towers of the two tasks in PLE. g a and g b are the gate networks corresponding to the two tasks in the PLE network:

[0201]

[0202] where is a parameter matrix used to represent the importance of the output of different expert networks in PLE to the task t. S t (u, v) is the output of the exclusive expert network and the shared expert network corresponding to the task t. Softmax is a commonly used mapping function in deep learning, which is used to convert the output value of multi-classification into a probability value between [0, 1] with a sum of 1. The specific calculation formula is as follows:

[0203]

[0204] where x is a vector, x i and x jis the element in the vector, e represents the imaginary part.

[0205] In the training process of the model, exposure to the object and object clicks are selected as positive samples, and the label is 1. Exposure to the object and no clicks of Du Xiaoning are selected as negative samples, and the label is 0.

[0206] In this way, after obtaining the expanded sample data, the expanded sample data and the original sample data are used as training samples to train the to-be-trained model, so that a more accurate content recommendation model can be obtained, so that the output result is more accurate.

[0207] In some optional embodiments, referring to Figure 9 , Figure 9 The steps of the sample data processing method provided by another embodiment of the application are schematically shown. The sample data processing method can mainly include the following steps.

[0208] In step S210, original sample data is obtained, and the original sample data includes object data and content data.

[0209] The object data refers to the data about the object in the original sample data, and the content data refers to the data about the content in the original sample data. The object data can be, for example, each object in the original sample data and the attribute information corresponding to each object, and the content data can be a video, an image or an article and the attribute information corresponding thereto.

[0210] In step S220, object groups are divided according to the attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0211] When the object groups in the original sample data are divided, the object groups can be divided according to the attribute information of the object data, to obtain a first attribute object group and a second attribute object group. The attribute information includes an attribute that is obviously unevenly distributed in the object, and the attribute information of the object data can be, for example, object ID, gender, age and the like. For example, assuming that the attribute information that is obviously unevenly distributed in the object is gender, and the number of male objects is greater than that of female objects, when the object groups are divided, the object groups can be divided into male groups and female groups according to the gender, the male groups are the first attribute object groups, and the female groups are the second attribute object groups. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0212] In step S230, a first preferred content data set corresponding to the first attribute object group is obtained, and a second preferred content data set corresponding to the second attribute object group is obtained.

[0213] The first preference content data set corresponding to the first attribute object group refers to a content data that is clicked by most of the first attribute object group in a series of content. The second preference content data set corresponding to the second attribute object group refers to a content data that is clicked by most of the second attribute object group in a series of content. Still taking the first attribute object group as male and the second attribute object group as female as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos. Therefore, the first preference content data set can include game videos, and the second preference content data set can include entertainment videos.

[0214] In step S240, the expanded sample data corresponding to the second attribute object group is generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0215] The first attribute object group and the second attribute object group each include a plurality of objects, and each object has corresponding attribute information. When the expanded sample data corresponding to the second attribute object group is generated, the positive sample data and the negative sample data are simultaneously generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0216] In step S510, the confidence of each generated expanded sample data is calculated.

[0217] After each expanded sample data is generated, noise is easily introduced into the expanded sample data. The main sources of noise are that the object data of the weak attribute group has strong sparsity, so there may not be sufficient interaction records when the content preferred by the object is statistically analyzed, thereby causing the statistical result to be inaccurate. Or, in some specific scenarios, the expanded sample may conflict with the real situation, resulting in an error sample obtained by augmentation, thereby interfering with model learning. Therefore, after each expanded sample data is generated, the sample data is screened. Specifically, the quality of the expanded sample data can be estimated by using the confidence estimation rule proposed, thereby ensuring the correctness and effectiveness of data augmentation.

[0218] In step S520, a preset number of expanded sample data is selected according to the confidence corresponding to each expanded sample data.

[0219] By calculating the confidence corresponding to each expanded sample data, the confidence is arranged according to the size, and a preset number of expanded sample data is selected.

[0220] In step S811, the parameters of the model to be trained are initialized.

[0221] The model to be trained may be a basic recommendation model, for example, and the parameters of the basic recommendation model are initialized.

[0222] At step S812, a loss function of the model to be trained is generated according to the prediction loss function corresponding to the first group of attribute objects, the prediction loss function corresponding to the second group of attribute objects, and the prediction loss function corresponding to the augmented sample data.

[0223] The loss function L is composed of three parts, i.e., the prediction loss function L a corresponding to the first group of attribute objects, the prediction loss function L b corresponding to the second group of attribute objects, and the prediction loss function L aug corresponding to the augmented sample data, i.e.:

[0224] L = L a + L b + λL aug

[0225] where λ is a weight parameter of the prediction loss corresponding to the augmented sample data. In order to further alleviate the recommendation imbalance problem caused by the imbalance of object attributes, the BinaryFocalLoss is used as the loss function in the embodiments of the present application. The definition of the loss function is as follows:

[0226] FL(p t (p, y)) = -α t (1-p t ) γ log(p t )

[0227] where FL(p t (p, y)) represents the prediction loss function, p t (p, y) represents the click rate of the object, p represents the predicted click rate, y represents the true label, α t and γ represent optional parameters, and the specific values may be α t = 0.75, γ = 2. p t (p, y) represents the click rate of the object:

[0228]

[0229] At step S813, the loss value of the model to be trained for the training sample is calculated according to the loss function of the model to be trained.

[0230] At step S814, the parameters in the model to be trained are adjusted according to the loss value until the model to be trained converges.

[0231] In this way, by training the to-be-trained model, a more accurate content recommendation model can be trained.

[0232] In some optional embodiments, referring to Figure 10 , Figure 10 The steps of the sample data processing method provided by another embodiment of the present application are schematically shown. The sample data processing method can mainly include the following steps.

[0233] In step S210, original sample data is obtained, and the original sample data includes object data and content data.

[0234] The object data refers to the data about the objects in the original sample data, for example, the object data can be each object included in the original sample data and the attribute information corresponding to each object. The content data refers to the data about the content in the original sample data, for example, the content data can be videos, images, articles or other content, and the attribute information corresponding to them.

[0235] In step S221, multiple attribute information in the object data is obtained.

[0236] The object data includes multiple attribute information, for example, the multiple attribute information can be object ID, gender, age, and the like.

[0237] In step S222, the object groups in the object data are divided according to the specified attribute information in the multiple attribute information.

[0238] The specified attribute information refers to the attribute that causes the objects to have an obvious unbalanced distribution. By dividing the object groups in the object data according to the specified attribute information, different groups can be obtained. For example, assuming that the attribute information that causes the objects to have an obvious unbalanced distribution is gender, when the object groups are divided, the object groups can be divided into male groups and female groups according to the gender.

[0239] In step S223, a first attribute object group and a second attribute object group are selected according to the number of objects in the divided object groups.

[0240] Still taking the attribute information that causes the objects to have an obvious unbalanced distribution as the gender as an example, when the object groups are divided, the object groups can be divided into male groups and female groups according to the gender. Specifically, assuming that the number of male groups is greater than the number of female groups, the male groups are divided into the first attribute object group, and the female groups are divided into the second attribute object group.

[0241] In step S230, a first preferred content data set corresponding to the first attribute object group and a second preferred content data set corresponding to the second attribute object group are obtained.

[0242] The first preference content data set corresponding to the first attribute object group refers to a content data that is clicked by most of the first attribute object group in a series of content; the second preference content data set corresponding to the second attribute object group refers to a content data that is clicked by most of the second attribute object group in a series of content. Still taking the first attribute object group as male and the second attribute object group as female as an example, generally, the male group prefers game videos, and the female group prefers entertainment videos, so the first preference content data set can include game videos, and the second preference content data set can include entertainment videos.

[0243] In step S240, the expanded sample data corresponding to the second attribute object group is generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0244] In the first attribute object group and the second attribute object group, a plurality of objects are included, and each object has corresponding attribute information. When the expanded sample data corresponding to the second attribute object group is generated, the positive sample data and the negative sample data are generated simultaneously according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0245] In this way, when the object group is divided, the specified attribute information is determined first, and then the first attribute object group and the second attribute object group are divided according to the specified attribute, thereby facilitating the construction of the sample data corresponding to the second attribute object group.

[0246] In some optional embodiments, referring to Figure 11 , Figure 11 The steps of the sample data processing method provided by another embodiment of the application are schematically shown. The sample data processing method can mainly include the following steps.

[0247] In step S210, the original sample data is obtained, and the original sample data includes object data and content data.

[0248] The object data refers to the data about the objects in the original sample data, for example, the object data can be each object included in the original sample data and the attribute information corresponding to each object; the content data refers to the data about the content in the original sample data, for example, the content data can be videos, images or articles and other content, and the attribute information corresponding to them.

[0249] S220, performing object group division according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0250] In the object group division of the original sample data, the object group can be divided according to the attribute information of the object data, so as to obtain the first attribute object group and the second attribute object group. The attribute information refers to the attribute with obvious unbalanced distribution in the object, and the attribute information of the object data can be, for example, object ID, gender, age, etc. For example, assuming that the attribute information with obvious unbalanced distribution in the object is gender, and the number of male objects is greater than that of female objects, when the object group is divided, the object group can be divided into male group and female group according to the gender, the male group is the first attribute object group, and the female group is the second attribute object group. It should be noted that the first attribute object group can also be referred to as a strong attribute object group, and the second attribute object group can also be referred to as a weak attribute object group.

[0251] In this way, the object group is divided according to the attribute information of the object data, so as to facilitate the further determination of the preference content of each attribute object group, and then the sample data of the attribute object group with less quantity can be expanded according to the preference content. Of course, when the object group in the original sample data is divided, it can also be divided by other ways, which is not limited herein.

[0252] S231, obtaining the click rate of each content data by the object in the first attribute object group, to obtain the first click rate of each content data.

[0253] For example, the first attribute object group is the male group, and the content data includes game video and entertainment video. The click rate of the male group clicking the game video and the entertainment video is counted respectively, so as to obtain the first click rate corresponding to each content data.

[0254] S232, obtaining the click rate of each content data by the object in the second attribute object group, to obtain the second click rate of each content data.

[0255] Similarly, assuming that the second attribute object group is the female group, and the content data also includes game video and entertainment video. The click rate of the female group clicking the game video and the entertainment video is counted respectively, so as to obtain the second click rate corresponding to each content data.

[0256] S233, taking the content data with the first click rate greater than or equal to the first preset threshold as the first preference content data set, and taking the content data with the second click rate greater than or equal to the second preset threshold as the second preference content data set.

[0257] The first preset threshold and the second preset threshold are preset, and a person skilled in the art can set them according to actual needs. Still taking the above example, assuming that the first preset threshold is 60%, the click rate of the male group on the game video is 70%, and the click rate on the entertainment video is 30%, the game video is classified as one content data in the first preference content data set. For the second preference content data, also assuming that the second preset threshold is also 60%, the click rate of the female group on the game video is 40%, and the click rate on the entertainment video is 80%, the entertainment video is classified as one content data in the second preference content data set. It should be noted that the data here is only used for example and does not mean that the actual data is as such.

[0258] In step S240, according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set, the expansion sample data corresponding to the second attribute object group is generated.

[0259] The first attribute object group and the second attribute object group each contain a plurality of objects, and each object has corresponding attribute information. When generating the expansion sample data corresponding to the second attribute object group, the positive sample data and the negative sample data are generated simultaneously according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set.

[0260] In this way, the object group is divided according to the attribute information of the object data to obtain the first attribute object group and the second attribute object group, and then the expansion sample data of the second attribute object group is generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set, so that the sample data corresponding to the second attribute object group can be constructed by using the attribute information of the target object in the first attribute object group and the feedback of the content data, thereby increasing the sample data belonging to the second attribute object group and avoiding the problem of poor model training effect caused by the small sample data of the second attribute object group.

[0261] In order to facilitate the overall understanding of the technical solutions of the present application, see Figure 12 , Figure 12The system architecture block diagram to which the technical scheme of the present application is applied is schematically shown. The corresponding process of the system architecture is as follows: first, original sample data is acquired, wherein the original sample data comprises object data and content data; then, object groups are divided according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group; a first preference content data set corresponding to the first attribute object group and a second preference content data set corresponding to the second attribute object group are acquired; according to attribute information of a target object in the first attribute object group and feedback of the target object to the first preference content data set and the second preference content data set, expansion sample data corresponding to the second attribute object group is generated. Next, click rates of the first attribute object group and the second attribute object group to content data contained in the expansion sample data are respectively acquired, and a first prediction score corresponding to the expansion sample data is calculated according to the click rates corresponding to the first attribute object group and the second attribute object group; object data contained in the expansion sample data is input into a first recommendation model and a second recommendation model, so as to output selection probabilities of the object data contained in the expansion sample data to content data contained in the expansion sample data through the first recommendation model and the second recommendation model respectively, to obtain two prediction scores; the three scores are summed and averaged to generate a confidence of the expansion sample data. Then, a preset number of expansion sample data is selected according to the confidence corresponding to each expansion sample data. The original sample data and the expansion sample data are used as training samples to train a to-be-trained model, to obtain a content recommendation model.

[0262] It should be noted that although the steps of the method in the present application are described in a specific order in the accompanying drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired result. In addition or alternatively, some steps can be omitted, a plurality of steps can be combined into one step, and / or one step can be divided into a plurality of steps, etc.

[0263] The device embodiment of the present application is introduced below, which can be used to execute the sample data processing method in the above-mentioned embodiments of the present application. Figure 13 The structural block diagram of the sample data processing device provided by the embodiments of the present application is schematically shown. As shown in Figure 13 The sample data processing device 1300 comprises:

[0264] The first acquisition module 1301 is configured to acquire original sample data, wherein the original sample data comprises object data and content data.

[0265] The division module 1302 is configured to divide object groups according to attribute information of the object data, to obtain a first attribute object group and a second attribute object group.

[0266] The second acquisition module 1303 is configured to acquire a first preference content data set corresponding to a first attribute object group and a second preference content data set corresponding to a second attribute object group.

[0267] The expansion module 1304 is configured to generate expansion sample data corresponding to the second attribute object group according to attribute information of a target object in the first attribute object group and feedback of the target object to the first preference content data set and the second preference content data set.

[0268] In some embodiments of the present application, based on the above technical solutions, the expansion module 1304 is further configured to acquire a first object that does not select a first content data in the first preference content data set from the first attribute object group as the target object; change a first attribute contained in attribute information of the first object to a second attribute, and generate negative sample data corresponding to the second attribute object group in combination with the first content data.

[0269] In some embodiments of the present application, based on the above technical solutions, the expansion module 1304 is further configured to acquire a second object that selects a second content data in the second preference content data set from the first attribute object group as the target object; change a first attribute contained in attribute information of the second object to a second attribute, and generate positive sample data corresponding to the second attribute object group in combination with the second content data.

[0270] In some embodiments of the present application, based on the above technical solutions, the device further includes a verification module configured to calculate a confidence of each expansion sample data; and select a preset number of expansion sample data according to confidence corresponding to each expansion sample data.

[0271] In some embodiments of the present application, based on the above technical solutions, the verification module is further configured to acquire a click rate of content data contained in the expansion sample data by the first attribute object group and the second attribute object group respectively, and calculate a first prediction score corresponding to the expansion sample data according to the click rates corresponding to the first attribute object group and the second attribute object group; input object data contained in the expansion sample data into the recommendation model, obtain a selection probability of an object contained in the object data to the content data contained in the expansion sample data through the recommendation model, to generate a second prediction score; and generate the confidence of the expansion sample data according to the first prediction score and the second prediction score.

[0272] In some embodiments of the present application, based on the above technical solutions, the verification module is further configured to input the object data contained in the augmented sample data into the first recommendation model and the second recommendation model to output, by the first recommendation model and the second recommendation model respectively, a selection probability of the object data contained in the augmented sample data on the content data; and calculate a second prediction score according to the selection probabilities output by the first recommendation model and the second recommendation model respectively, wherein the first recommendation model is trained by the sample data corresponding to the second attribute object group, and the second recommendation model is trained by the sample data corresponding to the first attribute object group and the sample data corresponding to the second attribute object group.

[0273] In some embodiments of the present application, based on the above technical solutions, the verification module is further configured to sum the selection probability output by the first recommendation model and the selection probability output by the second recommendation model, and take the sum result as the second prediction score.

[0274] In some embodiments of the present application, based on the above technical solutions, the verification module is further configured to sum the first prediction score and the second prediction score and take an average value, and take the average value as the confidence of the augmented sample data.

[0275] In some embodiments of the present application, based on the above technical solutions, the device further comprises a training module configured to take the original sample data and the augmented sample data as training samples to train the to-be-trained model to obtain a content recommendation model.

[0276] In some embodiments of the present application, based on the above technical solutions, the training module is further configured to initialize parameters of the to-be-trained model; generate a loss function of the to-be-trained model according to the prediction loss function corresponding to the first attribute object group, the prediction loss function corresponding to the second attribute object group, and the prediction loss function corresponding to the augmented sample data; calculate a loss value of the to-be-trained model on the training samples according to the loss function of the to-be-trained model; and adjust the parameters in the to-be-trained model according to the loss value until the to-be-trained model converges.

[0277] In some embodiments of the present application, based on the above technical solutions, the division module 1302 is further configured to obtain a plurality of attribute information in the object data; divide the object group in the object data according to specified attribute information in the plurality of attribute information; and select the first attribute object group and the second attribute object group according to the number of objects in the divided object groups.

[0278] In some embodiments of the present application, based on the above technical solutions, the second acquisition module 1303 is further configured to: acquire a click rate of the objects included in the first attribute object group on each content data to obtain a first click rate of each content data; acquire a click rate of the objects included in the second attribute object group on each content data to obtain a second click rate of each content data; and regard the content data with a first click rate greater than or equal to a first preset threshold as a first preferred content data set, and regard the content data with a second click rate greater than or equal to a second preset threshold as a second preferred content data set.

[0279] The specific details of the sample data processing apparatus provided in the embodiments of the present application have been described in detail in the corresponding method embodiments, and will not be repeated here.

[0280] Figure 14 The computer system structure block diagram of the electronic device for implementing the embodiments of the present application is schematically shown.

[0281] It should be noted that, Figure 14 The computer system 1400 of the electronic device shown is only an example, and should not impose any limitation on the functions and use range of the embodiments of the present application.

[0282] As Figure 14 shown, the computer system 1400 includes a central processing unit 1401 (CPU), which can perform various appropriate actions and processes according to programs stored in a read-only memory 1402 (ROM) or loaded into a random access memory 1403 (RAM) from a storage portion 1408. In the random access memory 1403, various programs and data required for system operation are also stored. The central processing unit 1401, the read-only memory 1402, and the random access memory 1403 are connected to each other through a bus 1404. An input / output interface 1405 (I / O interface) is also connected to the bus 1404.

[0283] The following components are connected to the input / output interface 1405: an input portion 1406 including input devices such as a keyboard and mouse; an output portion 1407 including output devices such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage portion 1408 including a hard disk; and a communication portion 1409 including a network interface card such as a Local Area Network card, a modem, and the like. The communication portion 1409 performs communication processing via a network such as the Internet. A drive 1410 is also connected to the input / output interface 1405 as necessary. A removable media 1411 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, and the like is attached to the drive 1410 as necessary, so that a computer program read therefrom is installed in the storage portion 1408 as necessary.

[0284] In particular, according to embodiments of the present application, the processes described in the various method flowcharts can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication portion 1409, and / or installed from the removable media 1411. When the computer program is executed by the central processing unit 1401, various functions defined in the system of the present application are performed.

[0285] It should be noted that the computer-readable medium in the embodiments of the present application can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium may, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination thereof. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (Compact Disc Read-Only Memory, CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this application, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, device or apparatus. In this application, the computer-readable signal medium can include a data signal carried in a baseband or as a part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take on many forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination thereof. The computer-readable signal medium can also be any computer-readable medium other than the computer-readable storage medium that can send, propagate or transmit the program for use by or in connection with an instruction execution system, device or apparatus. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, or the like, or any suitable combination thereof.

[0286] The flowcharts and block diagrams in the drawings illustrate the possible implementation architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowcharts or block diagrams can represent a module, a program segment, or a portion of code that contains one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different orders than that shown in the figures. For example, two blocks that are shown in succession can actually be executed substantially concurrently, or they can sometimes be executed in reverse order, depending on the functionality involved. It should also be noted that each block in the flowcharts or block diagrams, and combinations of blocks in the flowcharts or block diagrams, can be implemented by special-purpose hardware-based systems that perform the specified functions or operations, or can be implemented by a combination of special-purpose hardware and computer instructions.

[0287] It should be noted that, although several modules or units for a device for action execution are mentioned in the above detailed description, such a division is not mandatory. Indeed, according to an embodiment of the application, the features and functionalities of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functionalities of one module or unit described above can be further divided into several modules or units embodied.

[0288] Those skilled in the art can easily understand, through the above description of the embodiments, that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solutions according to the embodiments of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes several instructions to make a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) execute the methods according to the embodiments of the present application.

[0289] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed herein. It is intended that the present application cover any and all variations of the application that come within the scope of the present application, along with all equivalents thereof. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the application being indicated by the following claims.

[0290] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application should only be limited by the appended claims.

Claims

1. A method of processing sample data, characterized by, The method comprises: obtaining original sample data, the original sample data comprising object data and content data; performing object group division according to attribute information of the object data to obtain a first attribute object group and a second attribute object group; the first attribute object group comprises a strong attribute object group, and the second attribute object group comprises a weak attribute object group; the strong attribute object group occupies more interactions in an interaction process than the weak attribute object group; obtaining a first preferred content data set corresponding to the first attribute object group and a second preferred content data set corresponding to the second attribute object group; generating expanded sample data corresponding to the second attribute object group according to attribute information of a target object in the first attribute object group and feedback of the target object to the first preferred content data set and the second preferred content data set; wherein the generating of the expanded sample data corresponding to the second attribute object group according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preferred content data set and the second preferred content data set comprises: obtaining a second object that selects second content data in the second preferred content data set from the first attribute object group as the target object; changing a first attribute contained in attribute information of the second object to a second attribute, and generating positive sample data corresponding to the second attribute object group in combination with the second content data.

2. The method of processing sample data according to claim 1, wherein, The generating of the expanded sample data corresponding to the second attribute object group according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preferred content data set and the second preferred content data set further comprises: obtaining a first object that does not select first content data in the first preferred content data set from the first attribute object group as the target object; changing a first attribute contained in attribute information of the first object to a second attribute, and generating negative sample data corresponding to the second attribute object group in combination with the first content data.

3. The method of processing sample data according to claim 1, wherein, After the expanded sample data corresponding to the second attribute object group is generated, the method further comprises: calculating a confidence degree of each generated expanded sample data; selecting a preset number of expanded sample data according to confidence degrees corresponding to the respective expanded sample data.

4. The method of processing sample data according to claim 3, wherein, The calculating of the confidence degree of each generated expanded sample data comprises: respectively obtaining click rates of the first attribute object group and the second attribute object group on content data contained in the expanded sample data, and calculating a first prediction score corresponding to the expanded sample data according to the click rates corresponding to the first attribute object group and the second attribute object group. inputting object data contained in the augmented sample data into a recommendation model, obtaining, by the recommendation model, a selection probability of an object contained in the object data on content data contained in the augmented sample data, to generate a second prediction score; generating a confidence of the augmented sample data according to the first prediction score and the second prediction score.

5. The method of processing sample data according to claim 4, wherein, The inputting object data contained in the augmented sample data into a recommendation model, obtaining, by the recommendation model, a selection probability of an object contained in the object data on content data contained in the augmented sample data, to generate a second prediction score, comprises: inputting object data contained in the augmented sample data into a first recommendation model and a second recommendation model, to output, by the first recommendation model and the second recommendation model respectively, a selection probability of an object contained in the object data on content data contained in the augmented sample data; calculating the second prediction score according to the selection probabilities output by the first recommendation model and the second recommendation model respectively; The first recommendation model is trained by the sample data corresponding to the second attribute object group, and the second recommendation model is trained by the sample data corresponding to the first attribute object group and the sample data corresponding to the second attribute object group.

6. The method of processing sample data according to claim 5, wherein, The calculating the second prediction score according to the selection probabilities output by the first recommendation model and the second recommendation model respectively, comprises: summing the selection probability output by the first recommendation model and the selection probability output by the second recommendation model, and taking the sum result as the second prediction score.

7. The method of processing sample data according to claim 4, wherein, The generating a confidence of the augmented sample data according to the first prediction score and the second prediction score, comprises: summing the first prediction score and the second prediction score and taking the average value as the confidence of the augmented sample data.

8. The method of processing sample data according to claim 3, wherein, After selecting a preset number of augmented sample data, the method further comprises: taking the original sample data and the augmented sample data as training samples to train a to-be-trained model, to obtain a content recommendation model.

9. The method of processing sample data according to claim 8, wherein, The taking the original sample data and the augmented sample data as training samples to train a to-be-trained model, comprises: initializing parameters of the to-be-trained model; generating a loss function of the to-be-trained model according to a prediction loss function corresponding to the first attribute object group, a prediction loss function corresponding to the second attribute object group, and a prediction loss function corresponding to the augmented sample data; calculating a loss value of the to-be-trained model for the training samples according to the loss function of the to-be-trained model; adjusting parameters in the to-be-trained model according to the loss value until the to-be-trained model converges.

10. The method of processing sample data of claim 1, wherein, The object group division according to the attribute information of the object data to obtain the first attribute object group and the second attribute object group, comprises: obtaining a plurality of attribute information in the object data; dividing object groups in the object data according to specified attribute information in the plurality of attribute information; According to the number of objects in the divided object group, the first attribute object group and the second attribute object group are selected.

11. The method of processing sample data according to any one of claims 1 to 10, wherein, The first preference content data set corresponding to the first attribute object group and the second preference content data set corresponding to the second attribute object group are obtained. The click rate of each content data by the objects in the first attribute object group is obtained to obtain a first click rate of each content data. The click rate of each content data by the objects in the second attribute object group is obtained to obtain a second click rate of each content data. The content data with a first click rate greater than or equal to a first preset threshold is taken as the first preference content data set, and the content data with a second click rate greater than or equal to a second preset threshold is taken as the second preference content data set.

12. A processing apparatus of sample data, characterized by, The device comprises: A first acquisition module is configured to acquire original sample data, wherein the original sample data comprises object data and content data. A division module is configured to divide object groups according to attribute information of the object data to obtain a first attribute object group and a second attribute object group; the first attribute object group comprises a strong attribute object group, and the second attribute object group comprises a weak attribute object group; the strong attribute object group occupies more interactions in an interaction process than the weak attribute object group. A second acquisition module is configured to acquire a first preference content data set corresponding to the first attribute object group and a second preference content data set corresponding to the second attribute object group. An expansion module is configured to generate expanded sample data corresponding to the second attribute object group according to attribute information of a target object in the first attribute object group and feedback of the target object to the first preference content data set and the second preference content data set; wherein the expanded sample data corresponding to the second attribute object group is generated according to the attribute information of the target object in the first attribute object group and the feedback of the target object to the first preference content data set and the second preference content data set, comprising: obtaining a second object that selects second content data in the second preference content data set from the first attribute object group as the target object; changing a first attribute contained in the attribute information of the second object to a second attribute, and generating positive sample data corresponding to the second attribute object group in combination with the second content data.

13. A computer readable medium characterized by The computer readable medium stores a computer program, and the computer program is executed by a processor to implement the sample data processing method in any one of claims 1 to 11.

14. An electronic device, comprising: Comprise: A processor; And A memory for storing executable instructions of the processor; Wherein the processor is configured to execute the sample data processing method in any one of claims 1 to 11 by executing the executable instructions.

15. A computer program product, characterised in that, The computer program product comprises a computer program stored in a computer readable storage medium, and a processor of an electronic device reads and executes the computer program from the computer readable storage medium, so that the electronic device executes the processing method of sample data as claimed in any one of claims 1 to 11.

Citation Information

Patent Citations

  • Training sample generation method and device, electronic equipment and storage medium

    CN112784911A

  • Method and equipment for updating training data set

    CN114022737A