Object recommendation model processing method and apparatus
By acquiring object attribute data and user access results to train the model, generating data representation vectors and performing clustering, and filtering combinations of difficult negative samples and positive samples, the problem of insufficient negative sample selection is solved, and the accuracy and adaptability of the model are improved.
Patent Information
- Application Number
- CN202211268172.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-17
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2042-10-17
AI Technical Summary
In the process of learning representation vectors, positive samples alone are insufficient to make the model converge to the ideal state, while simple negative samples have no effect on model training. How to find suitable negative samples to improve model accuracy is an urgent problem to be solved.
By acquiring object attribute data and user access results of the target project, an object recommendation model is trained, data representation vectors are generated and clustered, combinations of hard negative samples and positive samples are selected, and the model is optimized.
This improves the accuracy of model training results, ensuring that the model can better match users and marketing products and adapt to complex changes in marketing scenarios.
Smart Images

Figure CN115545843B_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of computer technology, and in particular to a method for processing object recommendation models. One or more embodiments of this specification also relate to an object recommendation model processing apparatus, a computing device, and a computer-readable storage medium. Background Technology
[0002] As marketing scenarios become more complex, the characteristics of users and marketing products, such as behavior and attributes, are becoming increasingly rich. Utilizing these characteristics to construct vectorized representations of users and marketing products can not only accelerate the startup speed of algorithm models when faced with rapidly changing marketing scenarios, but also integrate data from various marketing scenarios to provide a more comprehensive description of users and marketing products, thereby achieving a better match between the two.
[0003] By fitting a large number of click and conversion behaviors between different users and different marketing products using deep learning algorithms, a basic representational model can be constructed, thereby producing basic vector representations of users and marketing products. In this process, the composition of the samples is crucial to the model's performance. Typically, positive samples—actual clicks and conversions—are explicitly present in the samples used to train user and product representations. However, in the process of learning representation vectors, positive samples alone are insufficient for the model to converge to an ideal state; usually, a large number of negative samples are needed. However, overly simple negative samples are ineffective for model training. Therefore, finding suitable negative samples so that the model trained using positive samples and these negative samples has high accuracy is a problem that urgently needs to be solved. Summary of the Invention
[0004] In view of this, embodiments of this specification provide a method for processing an object recommendation model. One or more embodiments of this specification also relate to an object recommendation model processing apparatus, a computing device, and a computer-readable storage medium, to address the technical deficiencies existing in the prior art.
[0005] According to a first aspect of the embodiments of this specification, an object recommendation model processing method is provided, including:
[0006] Obtain the object attribute data of the object to be recommended in the target project, and determine the user's access results to the object to be recommended;
[0007] The object attribute data, the user's user attribute data, and the access results are used as training data to train the object recommendation model to generate the object recommendation model.
[0008] Obtain the data representation vector generated by the object recommendation model through processing the training data, and cluster the training data according to the data representation vector to generate the corresponding clustering results;
[0009] The object attribute data and user attribute data contained in the clustering results are combined, and the object recommendation model is updated based on the combination results.
[0010] According to a second aspect of the embodiments of this specification, an object recommendation model processing apparatus is provided, comprising:
[0011] The acquisition module is configured to acquire object attribute data of the object to be recommended in the target project and determine the user's access result to the object to be recommended;
[0012] The input module is configured to use the object attribute data, the user's user attribute data, and the access results as training data to train the object recommendation model to generate the object recommendation model.
[0013] The clustering module is configured to obtain the data representation vector generated by the object recommendation model processing the training data, and to cluster the training data according to the data representation vector to generate the corresponding clustering results;
[0014] The update module is configured to combine the object attribute data and user attribute data contained in the clustering results, and update the object recommendation model based on the combination results.
[0015] According to a third aspect of the embodiments of this specification, a computing device is provided, comprising:
[0016] Memory and processor;
[0017] The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the object recommendation model processing method.
[0018] According to a fourth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the steps of the object recommendation model processing method.
[0019] One embodiment of this specification obtains object attribute data of objects to be recommended in a target project, determines user access results of the objects to be recommended, uses the object attribute data, the user attribute data, and the access results as training data to train an object recommendation model, generates the object recommendation model, obtains the data representation vector generated by the object recommendation model processing the training data, clusters the training data according to the data representation vector, generates corresponding clustering results, combines the object attribute data and user attribute data contained in the clustering results, and updates the object recommendation model based on the combination results.
[0020] The embodiments in this specification first use relatively simple negative samples and combine them with positive samples to train an initial object recommendation model. Then, based on the data representation vector generated by processing the training data using the object recommendation model, the training data are clustered. Then, based on the clustering results, difficult negative samples are selected and combined with positive samples. The combination results are used to optimize the initial object recommendation model, thereby helping to ensure the accuracy of the model training results. Attached Figure Description
[0021] Figure 1 This is a flowchart illustrating an object recommendation model processing method provided in one embodiment of this specification.
[0022] Figure 2 This is a flowchart illustrating the processing procedure of an object recommendation model processing method provided in one embodiment of this specification.
[0023] Figure 3 This is a schematic diagram of an object recommendation model processing device provided in one embodiment of this specification;
[0024] Figure 4 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation
[0025] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.
[0026] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items.
[0027] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0028] First, the terms and concepts used in one or more embodiments of this specification will be explained.
[0029] Vector similarity: A calculation used to characterize the degree of similarity between two vectors. If this similarity needs to satisfy the trigonometric theorem, the L2 distance or cosine value of the two vectors is usually used to express their similarity.
[0030] Vector Recall: The model vectorizes Users and Items, ensuring that the vector similarity of Users and Items with high matching scores is close, while the vector similarity of those with low matching scores is far apart. Vector recall retrieves the closest items to each User based on their vector similarity.
[0031] Clustering: The process of grouping elements in a set into multiple categories based on a certain degree of similarity is called clustering. Elements in the same category are similar to each other. In a set of vectors, vector similarity is usually used for clustering.
[0032] Negative sampling: In the training process of representational models, only inputting positive samples into the model will cause the model to fail to correctly calculate the scores of samples with large differences. The method of selecting appropriate negative samples to improve the model performance is called negative sampling of samples.
[0033] In recommendation marketing scenarios, algorithmic models are built based on user, scenario, and offer characteristics to provide different marketing strategies for different users, thereby improving marketing effectiveness. In this process, as marketing scenarios become more complex, the behavioral and attribute characteristics of users and marketing products gradually become richer. Utilizing these characteristics to construct vectorized representations of users and marketing products not only accelerates the startup speed of algorithmic models in the face of rapidly changing marketing scenarios but also integrates data from various marketing scenarios to provide a more comprehensive description of users and marketing products, thus achieving a better match between them.
[0034] By fitting a large number of click and conversion behaviors between different users and different marketing products using deep learning algorithms, a basic representational model can be constructed, thereby producing basic vector representations of users and marketing products. In this process, the composition of the samples is crucial to the model's performance. Typically, positive samples—actual clicks and conversions—are explicitly present in the samples used to train user and product representations. However, in the process of learning representation vectors, positive samples alone are insufficient for the model to converge to an ideal state; usually, a large number of negative samples are needed. However, overly simple negative samples are ineffective for model training. Therefore, finding suitable negative samples to ensure that the model trained using both positive and negative samples has high accuracy is a problem that urgently needs to be solved.
[0035] Based on this, the embodiments of this specification obtain object attribute data of the object to be recommended in the target project, determine the user's access results to the object to be recommended, use the object attribute data, the user's user attribute data, and the access results as training data to train the object recommendation model, generate the object recommendation model, obtain the data representation vector generated by the object recommendation model processing the training data, cluster the training data according to the data representation vector, generate corresponding clustering results, combine the object attribute data and user attribute data contained in the clustering results, and update the object recommendation model based on the combination results.
[0036] The embodiments in this specification first use relatively simple negative samples and combine them with positive samples to train an initial object recommendation model. Then, based on the data representation vector generated by processing the training data using the object recommendation model, the training data are clustered. Then, based on the clustering results, difficult negative samples are selected and combined with positive samples. The combination results are used to optimize the initial object recommendation model, thereby helping to ensure the accuracy of the model training results.
[0037] This specification provides a method for processing an object recommendation model, and also relates to an apparatus for processing an object recommendation model, a computing device, and a computer-readable storage medium, which will be described in detail in the following embodiments.
[0038] Figure 1 A flowchart of an object recommendation model processing method according to an embodiment of this specification is shown, including steps 102 to 108.
[0039] Step 102: Obtain the object attribute data of the object to be recommended in the target project, and determine the user's access result to the object to be recommended.
[0040] Specifically, the target project refers to the project that needs to be recommended to the target audience, including but not limited to financial projects, insurance projects, trading projects, and product marketing projects; the target audience refers to the objects that need to be recommended in the target project. For example, the target audience in a financial project could be a financial product, the target audience in an insurance project could be an insurance product, and the target audience in a trading project could be a commodity.
[0041] Object attribute data refers to the attributes of the object to be recommended, such as its name, size, validity period, and price. User access results for the object to be recommended indicate whether a user has accessed the object within any historical time interval or a target historical time interval. For example, if a user performs any of the following actions within the target historical time interval: clicking, purchasing, querying, adding to favorites, or adding to cart, then it can be determined that the user has accessed the object within the target historical time interval, and the corresponding access result is "accessed." If the user does not perform any of these actions within the target historical time interval, then it can be determined that the user has not accessed the object within the target historical time interval, and the corresponding access result is "not accessed."
[0042] In the embodiments of this specification, an object recommendation model needs to be trained to determine the probability of a user accessing a recommended object. Based on the access probability, the model determines which objects to recommend to the user. To train the object recommendation model, the object attribute data of the objects to be recommended in the target project is first obtained, and the user's access results for the objects to be recommended are determined. There can be two or more objects to be recommended in the target project, and there can also be two or more users. Therefore, the object attribute data of each object to be recommended in the target project and the access results of each user for each object to be recommended are obtained respectively. The object attribute data, user attribute data, and access results are used to train the object recommendation model to obtain the object recommendation model.
[0043] Step 104: Use the object attribute data, the user's user attribute data, and the access results as training data to train the object recommendation model to generate the object recommendation model.
[0044] Specifically, as mentioned earlier, after obtaining the object attribute data of each object to be recommended in the target project, as well as the access results of each user to each object to be recommended, the object attribute data, user attribute data, and access results can be used to train the object recommendation model to be trained, and obtain the object recommendation model.
[0045] During model training, object attribute data and user attribute data can be used as training samples, and user access results of the objects to be recommended can be used as labels for model training. To ensure the accuracy of the model training results, each training data set used for model training in this embodiment can be a triple, that is, it includes a training sample, a positive sample label, and a negative sample label.
[0046] Based on this, when determining the training data used for model training, the user's access results to the object to be recommended can be determined first, that is, the user's first access result to the first object to be recommended and the user's second access result to the second object to be recommended.
[0047] Accordingly, the object attribute data, the user's user attribute data, and the access results are used as training data, including:
[0048] If the first access result is "accessed" and the second access result is "not accessed", then the user attribute data of the user, the object attribute data of the first object to be recommended, and the object attribute data of the second object to be recommended are used as training samples, the first access result is used as a positive sample label, and the second access result is used as a negative sample label. The training samples, the positive sample labels, and the negative sample labels together constitute the training data.
[0049] Specifically, as mentioned earlier, the user's access result for the recommended object is used to characterize whether the user has accessed the recommended object within any historical time interval or a target historical time interval. For example, if the user has performed any of the following actions on the recommended object within the target historical time interval: clicking, purchasing, querying, adding to favorites, or adding to cart, then it can be determined that the user has accessed the recommended object within the target historical time interval, and the corresponding access result can be "accessed." If the user has not performed any of the following actions on the recommended object within the target historical time interval: clicking, purchasing, querying, adding to favorites, or adding to cart, then it can be determined that the user has not accessed the recommended object within the target historical time interval, and the corresponding access result can be "not accessed."
[0050] When the training data is constructed as triples, each training data contains both training samples and positive and negative sample labels. Accessed samples can be used as positive sample labels, and unaccessed samples can be used as negative sample labels. Therefore, when constructing training data, if the same user has different access results for two different objects to be recommended, they can be combined. That is, the user's user attribute data, the object attribute data of the two objects to be recommended, and the user's access results for the two objects to be recommended are combined into one training data.
[0051] For example, if the first user's first access result for the first recommended object is "accessed", and the first user's second access result for the second recommended object is "not accessed", then the user attribute data of the first user, the object attribute data of the first recommended object, and the object attribute data of the second recommended object are used as training samples, the first access result is used as a positive sample label, and the second access result is used as a negative sample label. The training samples, positive sample labels, and negative sample labels together constitute the training data.
[0052] Similarly, if the second user's third access result for the third recommended object is "accessed", and the second user's fourth access result for the fourth recommended object is "not accessed", then the user attribute data of the second user, the object attribute data of the third recommended object, and the object attribute data of the fourth recommended object are used as training samples, the third access result is used as a positive sample label, and the fourth access result is used as a negative sample label. The training samples, positive sample labels, and negative sample labels together constitute the training data.
[0053] After constructing the training data, the object recommendation model to be trained can be trained using the training data to generate the object recommendation model.
[0054] Step 106: Obtain the data representation vector generated by the object recommendation model after processing the training data, and cluster the training data according to the data representation vector to generate the corresponding clustering results.
[0055] Specifically, the object recommendation model is trained using the training data. After the object recommendation model is generated, it can be used to process each training data to generate a data representation vector corresponding to each training data.
[0056] Since the object recommendation model can be used to predict the probability of a user accessing a recommended object, the generated data representation vector can contain the probability of a user accessing a recommended object.
[0057] In specific implementation, after generating the data representation vector, the training data can be clustered based on the data representation vector to generate corresponding clustering results, including:
[0058] The Euclidean distance between any two training data points is determined based on the data representation vectors corresponding to each of the two training data points.
[0059] The training data is clustered based on the Euclidean distance to generate corresponding clustering results.
[0060] Specifically, after generating the data representation vectors of each training data set, it is possible to determine whether to cluster the two training data sets into one class by calculating the Euclidean distance or cosine similarity between the data representation vectors of any two training data sets.
[0061] The embodiments in this specification may use K-means clustering algorithm or density-based clustering algorithm to perform clustering and generate corresponding clustering results. The specific clustering algorithm used is determined according to actual needs and is not limited here.
[0062] Step 108: Combine the object attribute data and user attribute data contained in the clustering results, and update the object recommendation model based on the combination results.
[0063] Specifically, as mentioned earlier, clustering the training data based on the data representation vector can generate a corresponding number of clusters. The object attribute data and user attribute data contained in the clustering results are then combined, that is, the object attribute data and user attribute data contained in each cluster are combined.
[0064] In specific implementation, if any one of the generated clusters is taken as the target cluster, the object attribute data and user attribute data contained in the clustering result are combined, that is, the object attribute data and user attribute data contained in the target cluster are combined.
[0065] Furthermore, the target cluster includes user attribute data of the first user, object attribute data of the first object to be recommended, user attribute data of the second user, object attribute data of the third object to be recommended, the first access result of the first user to the first object to be recommended, and the third access result of the second user to the third object to be recommended.
[0066] Accordingly, the combination of object attribute data and user attribute data contained in the target cluster specifically means combining the object attribute data and user attribute data contained in the target cluster based on the first access result and the third access result.
[0067] Specifically, in the embodiments of this specification, when constructing training data, the negative samples in the training data can be simple negative samples obtained by random sampling. The image processing model obtained by training the model using such negative samples has low accuracy. In order to improve the accuracy of the model training results, the embodiments of this specification can determine the difficult negative samples based on the access results of different users in the same cluster to different objects to be recommended, and then combine the object attribute data and user attribute data contained in the same cluster based on the difficult negative samples.
[0068] For example, one training data set in the target cluster includes: user attribute data of the first user, object attribute data of the first object to be recommended, object attribute data of the second object to be recommended, the first user's first access result (visited) of the first object to be recommended, and the first user's second access result (not visited) of the second object to be recommended; another training data set in the target cluster includes: user attribute data of the second user, object attribute data of the third object to be recommended, object attribute data of the fourth object to be recommended, the second user's third access result (visited) of the third object to be recommended, and the second user's fourth access result (not visited) of the fourth object to be recommended.
[0069] In this case, since the first user and the second user are clustered into the same cluster, to determine the hard-to-bear samples, we can determine the access results of different users to different objects to be recommended as the accessed samples. Taking the determination of the hard-to-bear samples of the first user as an example, if the first user's first access result to the first object to be recommended is an access result, and the second user's third access result to the third object to be recommended is an access result, then the third object to be recommended can be determined as the hard-to-bear samples of the first user.
[0070] Specifically, based on the first access result and the third access result, the object attribute data and user attribute data contained in the target cluster are combined, including:
[0071] If both the first access result and the third access result are considered visited, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined; and / or,
[0072] If both the first access result and the third access result are accessed, the user attribute data of the second user, the object attribute data of the first object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0073] Specifically, as mentioned above, if both the first and third access results are already visited, the third object to be recommended can be determined as the difficult sample for the first user. Specifically, the object attribute data of the third object to be recommended can be used as the difficult sample, and this difficult sample can be combined with the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended.
[0074] Alternatively, the first object to be recommended can be determined as the difficult sample for the second user. Specifically, the object attribute data of the first object to be recommended can be used as the difficult sample, and this difficult sample can be combined with the user attribute data of the second user and the object attribute data of the third object to be recommended.
[0075] Furthermore, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined, including:
[0076] The user attribute data of the first user and the object attribute data of the third object to be recommended are input into the object recommendation model to predict the access probability and obtain the first access probability of the first user to the third object to be recommended.
[0077] Based on the first access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0078] The data representation vector includes the user's second access probability to the first recommended object and the user's third access probability to the second recommended object.
[0079] Accordingly, the step of combining the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended based on the first access probability includes:
[0080] Based on the relationship between the first access probability, the second access probability, and the third access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0081] In specific implementation, based on the relationship between the first access probability, the second access probability, and the third access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined, including:
[0082] When the second access probability is greater than the first access probability, and the first access probability is greater than the third access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0083] Specifically, since the second user's access result for the third recommended object is "accessed", while the first user's access result for the third recommended object is "not accessed", the third recommended object can be used as a hard-to-bear sample for the first user. This hard-to-bear sample is then combined with the user attribute data of the first user, the object attribute data of the first recommended object, the object attribute data of the second recommended object, and the object attribute data of the third recommended object to construct a sample set. This sample set is then used to retrain the object recommendation model.
[0084] In practical applications, the constructed sample set can be a pairwise / listwise sample set. Therefore, in the process of combining the user attribute data of the first user, the object attribute data of the first recommended object, the object attribute data of the second recommended object, and the object attribute data of the third recommended object, the object attribute data of each recommended object can be combined according to the access probability of the first user to each recommended object, so that the access probability of each recommended object in the combined result satisfies the access probability of the positive sample > the access probability of the hard sample (hard negative sample) > the access probability of the random negative sample.
[0085] Since the first recommended object is a positive sample, the third recommended object is a hard negative sample, and the second recommended object can be used as a random negative sample, the user attribute data of the first user, the object attribute data of the first recommended object, the object attribute data of the second recommended object, and the object attribute data of the third recommended object can be combined to generate the corresponding pairwise / listwise sample set, provided that the second access probability of the first recommended object is greater than the first access probability of the third recommended object, and the first access probability is greater than the third access probability of the second recommended object.
[0086] Similarly, when both the first and third access results are "visited", the user attribute data of the second user, the object attribute data of the first recommended object, and the object attribute data of the third recommended object can be combined to generate a pairwise sample set. Since the second user's access result for the third recommended object is "visited", while the second user's access result for the first recommended object is "not visited", the first recommended object can be used as the second user's hard-to-bear sample. This hard-to-bear sample is then combined with the user attribute data of the second user and the object attribute data of the third recommended object to construct a sample set, and the object recommendation model is retrained using this sample set.
[0087] In specific implementation, the object recommendation model is updated based on the combination results, including:
[0088] The user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are used as training samples, and the first access probability, the second access probability, and the third access probability are used as labels to update the object recommendation model.
[0089] Specifically, after identifying the hard-to-bear samples, they can be combined with the initial training data, and the object recommendation model can be updated based on the combination result. Specifically, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are used as training samples, and the first access probability, second access probability, and third access probability are used as labels to update the object recommendation model.
[0090] In summary, since negative sampling is generally considered an approximation of the Softmax method, random negative sampling is currently widely used to construct basic negative samples. However, random negative samples are relatively simple; within the same exposure, objects that were not clicked are considered negative samples. This method sets a simple rule for obtaining negative samples, but these negative samples may be due to the user genuinely not being interested in the object, or they may be due to other interfering factors such as exposure position and style causing the user to click on other objects and miss the object. Therefore, while this method is simple to obtain negative samples, the accuracy of the negative samples is not easy to determine. Furthermore, negative samples obtained solely using random negative sampling are relatively simple, and the model often fails to converge sufficiently to distinguish fine differences.
[0091] This specification's embodiments use an iterative approach, combined with clustering methods, to more precisely select difficult negative samples. After obtaining simple negative samples using random negative sampling, a version of the model is first trained. Then, the model is used to generate User representation vectors for the training data, and the training data is clustered based on these User representation vectors. Positive samples from other Users within the same cluster are selected as difficult negative samples for the target User, and the label of these difficult negative samples is set to be between the positive samples of the target User and the random negative samples. Subsequently, the new samples are used to form pairwise or listwise training models.
[0092] The specific implementation process is as follows:
[0093] Use random negative sampling + positive samples to construct pairwise / listwise samples, train the initial model, and use it to predict the User representation vector for the initial iteration;
[0094] The initial model is used to predict the User representation vectors of the training data. After obtaining the User representation vectors, the training data is clustered based on the User representation vectors. Among the Users in the same category, samples that are positive samples from other Users and that the target User has not clicked / converted on are selected as hard negative samples.
[0095] Combine the hard samples obtained in the above steps with the positive samples and random negative samples of the target User to construct a pairwise / listwise sample set, ensuring that the size of the label is: positive samples > hard samples > random negative samples, and then retrain the model.
[0096] Training is performed iteratively until the model performance is similar between two iterations, at which point training stops.
[0097] The embodiments in this specification employ the above processing method. Compared to the difficult samples selected using the "exposure without clicks / conversions" strategy, the difficult samples obtained using the above method more clearly show the label relationship between positive samples, difficult samples, and random negative samples. The difficult samples obtained using the above method are highly correlated with the model's own fitting results. Compared to the selection method using manual strategies, it can more fully expose the samples that the current model is easily confused with, and iterate them among the positive samples, thereby improving the model's performance in a targeted manner. Compared to word replacement methods in NLP, the above method has wider applicability, is suitable for any learning scenario of representation vectors, and has lower promotion costs.
[0098] As can be seen, the object recommendation model processing method provided in the embodiments of this specification allows difficult samples to be specifically optimized for the current weak links of the model without much manual intervention. The selection rules are simple and clear, and the label ranking of the finally obtained difficult samples relative to positive samples and random negative samples can be clearly determined. These samples can be directly used to construct pairwise / listwise samples. The object recommendation model trained using these samples will have more accurate output results.
[0099] One embodiment of this specification obtains object attribute data of objects to be recommended in a target project, determines user access results of the objects to be recommended, uses the object attribute data, the user attribute data, and the access results as training data to train an object recommendation model, generates the object recommendation model, obtains the data representation vector generated by the object recommendation model processing the training data, clusters the training data according to the data representation vector, generates corresponding clustering results, combines the object attribute data and user attribute data contained in the clustering results, and updates the object recommendation model based on the combination results.
[0100] The embodiments in this specification first use relatively simple negative samples and combine them with positive samples to train an initial object recommendation model. Then, based on the data representation vector generated by processing the training data using the object recommendation model, the training data are clustered. Then, based on the clustering results, difficult negative samples are selected and combined with positive samples. The combination results are used to optimize the initial object recommendation model, thereby helping to ensure the accuracy of the model training results.
[0101] The following is in conjunction with the appendix Figure 2 Taking the application of the object recommendation model processing method provided in this specification in a product marketing scenario as an example, the object recommendation model processing method will be further explained. Among other things, Figure 2 The flowchart of an object recommendation model processing method provided in one embodiment of this specification is shown, and the specific steps include steps 202 to 218.
[0102] Step 202: Obtain the attribute data of the products to be recommended in the product marketing project, and determine the user's access results for the products to be recommended.
[0103] Step 204: If the first user's first access result for the first product to be recommended is "accessed", and the first user's second access result for the second product to be recommended is "not accessed", then the attribute data of the first user, the attribute data of the first product to be recommended, and the attribute data of the second product to be recommended are used as training samples. The first access result is used as a positive sample label, and the second access result is used as a negative sample label. The training samples, positive sample labels, and negative sample labels are used together as training data to train the product recommendation model to be trained and generate the product recommendation model.
[0104] Step 206: Obtain the data representation vector generated by the product recommendation model after processing the training data. The data representation vector contains the first access probability of the first user to the first product to be recommended and the second access probability of the first user to the second product to be recommended.
[0105] Step 208: Determine the Euclidean distance between any two training data points based on the data representation vectors corresponding to each of the two training data points.
[0106] Step 210: Cluster the training data according to Euclidean distance to generate corresponding clusters.
[0107] Step 212: Determine the attribute data of the first user, the attribute data of the first product to be recommended, the attribute data of the second user, the attribute data of the third product to be recommended, the first access result of the first user to the first product to be recommended, and the third access result of the second user to the third product to be recommended, contained in the target cluster.
[0108] Step 214: If both the first and third access results are already visited, input the attribute data of the first user and the attribute data of the third product to be recommended into the product recommendation model to predict the access probability and obtain the third access probability of the first user for the third product to be recommended.
[0109] Step 216: If the first access probability is greater than the third access probability, and the third access probability is greater than the second access probability, combine the attribute data of the first user, the attribute data of the first product to be recommended, the attribute data of the second product to be recommended, and the attribute data of the third product to be recommended.
[0110] Step 218: Use the attribute data of the first user, the attribute data of the first product to be recommended, the attribute data of the second product to be recommended, and the attribute data of the third product to be recommended as training samples, and use the first access probability, the second access probability, and the third access probability as labels to update the product recommendation model.
[0111] The embodiments in this specification first use relatively simple negative samples and combine them with positive samples to train an initial product recommendation model. Then, based on the product recommendation model, the training data is processed to generate data representation vectors, and each training data is clustered. Then, based on the clustering results, difficult negative samples are selected and combined with positive samples to optimize the initial product recommendation model, thereby helping to ensure the accuracy of the model training results.
[0112] Corresponding to the above method embodiments, this specification also provides embodiments of an object recommendation model processing apparatus. Figure 3 A schematic diagram of an object recommendation model processing apparatus provided in one embodiment of this specification is shown. Figure 3 As shown, the device includes:
[0113] The acquisition module 302 is configured to acquire object attribute data of the object to be recommended in the target project and determine the user's access result to the object to be recommended;
[0114] Input module 304 is configured to use the object attribute data, the user's user attribute data and the access result as training data to train the object recommendation model to generate the object recommendation model.
[0115] Clustering module 306 is configured to obtain the data representation vector generated by the object recommendation model processing the training data, and to cluster the training data according to the data representation vector to generate the corresponding clustering result;
[0116] The update module 308 is configured to combine the object attribute data and user attribute data contained in the clustering results, and update the object recommendation model based on the combination results.
[0117] Optionally, the acquisition module 302 is further configured to:
[0118] Determine the user's first access result to the first recommended object, and the user's second access result to the second recommended object;
[0119] Accordingly, the input module 304 is further configured as follows:
[0120] If the first access result is "accessed" and the second access result is "not accessed", then the user attribute data of the user, the object attribute data of the first object to be recommended, and the object attribute data of the second object to be recommended are used as training samples, the first access result is used as a positive sample label, and the second access result is used as a negative sample label. The training samples, the positive sample labels, and the negative sample labels together constitute the training data.
[0121] Optionally, the clustering module 306 is further configured to:
[0122] The Euclidean distance between any two training data points is determined based on the data representation vectors corresponding to each of the two training data points.
[0123] The training data is clustered based on the Euclidean distance to generate corresponding clustering results.
[0124] Optionally, the clustering results include the target cluster;
[0125] Accordingly, the update module 308 is further configured as follows:
[0126] The object attribute data and user attribute data contained in the target cluster are combined.
[0127] Optionally, the target cluster includes user attribute data of the first user, object attribute data of the first object to be recommended, user attribute data of the second user, object attribute data of the third object to be recommended, the first access result of the first user to the first object to be recommended, and the third access result of the second user to the third object to be recommended.
[0128] Accordingly, the update module 308 is further configured as follows:
[0129] Based on the first access result and the third access result, the object attribute data and user attribute data contained in the target cluster are combined.
[0130] Optionally, the update module 308 is further configured to:
[0131] If both the first access result and the third access result are considered visited, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined; and / or,
[0132] If both the first access result and the third access result are accessed, the user attribute data of the second user, the object attribute data of the first object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0133] Optionally, the update module 308 is further configured to:
[0134] The user attribute data of the first user and the object attribute data of the third object to be recommended are input into the object recommendation model to predict the access probability and obtain the first access probability of the first user to the third object to be recommended.
[0135] Based on the first access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0136] Optionally, the data representation vector includes a second access probability of the user to the first object to be recommended, and a third access probability of the user to the second object to be recommended;
[0137] Accordingly, the update module 308 is further configured as follows:
[0138] Based on the relationship between the first access probability, the second access probability, and the third access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0139] Optionally, the update module 308 is further configured to:
[0140] When the second access probability is greater than the first access probability, and the first access probability is greater than the third access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
[0141] Optionally, the update module 308 is further configured to:
[0142] The user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are used as training samples, and the first access probability, the second access probability, and the third access probability are used as labels to update the object recommendation model.
[0143] The above is a schematic scheme of an object recommendation model processing device according to this embodiment. It should be noted that the technical solution of this object recommendation model processing device and the technical solution of the object recommendation model processing method described above belong to the same concept. For details not described in detail in the technical solution of the object recommendation model processing device, please refer to the description of the technical solution of the object recommendation model processing method described above.
[0144] Figure 4 A structural block diagram of a computing device 400 according to one embodiment of this specification is shown. The components of the computing device 400 include, but are not limited to, a memory 410 and a processor 420. The processor 420 is connected to the memory 410 via a bus 430, and a database 450 is used to store data.
[0145] The computing device 400 also includes an access device 440, which enables the computing device 400 to communicate via one or more networks 460. Examples of these networks include a Public Switched Telephone Network (PSTN), a Local Area Network (LAN), a Wide Area Network (WAN), a Personal Area Network (PAN), or a combination of communication networks such as the Internet. The access device 440 may include one or more of any type of wired or wireless network interface (e.g., a Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) interface, a Wi-MAX interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.
[0146] In one embodiment of this specification, the aforementioned components of the computing device 400 and Figure 4 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 4 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.
[0147] The computing device 400 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or PCs. The computing device 400 can also be a mobile or stationary server.
[0148] The memory 410 is used to store computer-executable instructions, and the processor 420 is used to execute the computer-executable instructions to implement the steps of the object recommendation model processing method.
[0149] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the object recommendation model processing method described above belong to the same concept. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the object recommendation model processing method described above.
[0150] An embodiment of this specification also provides a computer-readable storage medium storing computer instructions that, when executed by a processor, are used to implement the steps of the object recommendation model processing method.
[0151] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the object recommendation model processing method described above. Details not described in detail in the technical solution of the storage medium can be found in the description of the technical solution of the object recommendation model processing method described above.
[0152] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0153] The computer instructions include computer program code, which may be in the form of source code, object code, executable file, or certain intermediate forms. The computer-readable medium may include any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.
[0154] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.
[0155] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0156] The preferred embodiments disclosed above are merely illustrative of this specification. The optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.
Claims
1. A method for processing object recommendation models, comprising: Obtain the object attribute data of the object to be recommended in the target project, and determine the user's access results to the object to be recommended; The object attribute data, the user's user attribute data, and the access results are used as training data to train the object recommendation model to generate the object recommendation model. Obtain the data representation vector generated by the object recommendation model through processing the training data, and cluster the training data according to the data representation vector to generate the corresponding clustering result, wherein the data representation vector includes the probability of a user accessing the object to be recommended; The object attribute data and user attribute data contained in the clustering results are combined, and the object recommendation model is updated based on the combination results; The step of combining the object attribute data and user attribute data contained in the clustering results includes: determining hard-to-bear samples based on the clustering results, wherein the clustering results contain target clusters, and combining the object attribute data and user attribute data contained in the target clusters based on the hard-to-bear samples.
2. The object recommendation model processing method according to claim 1, wherein determining the user's access result to the object to be recommended includes: Determine the user's first access result to the first recommended object, and the user's second access result to the second recommended object; Accordingly, using the object attribute data, the user's user attribute data, and the access results as training data includes: If the first access result is "accessed" and the second access result is "not accessed", then the user attribute data of the user, the object attribute data of the first object to be recommended, and the object attribute data of the second object to be recommended are used as training samples, the first access result is used as a positive sample label, and the second access result is used as a negative sample label. The training samples, the positive sample labels, and the negative sample labels together constitute the training data.
3. The object recommendation model processing method according to claim 1, wherein clustering the training data based on the data representation vector to generate corresponding clustering results includes: The Euclidean distance between any two training data points is determined based on the data representation vectors corresponding to each of the two training data points. The training data is clustered based on the Euclidean distance to generate corresponding clustering results.
4. The object recommendation model processing method according to claim 1, wherein the target cluster includes user attribute data of a first user, object attribute data of a first object to be recommended, user attribute data of a second user, object attribute data of a third object to be recommended, a first access result of the first user to the first object to be recommended, and a third access result of the second user to the third object to be recommended; Accordingly, the step of combining the object attribute data and user attribute data contained in the target cluster based on the hard-to-bear samples includes: Based on the first access result and the third access result, the object attribute data and user attribute data contained in the target cluster are combined.
5. The object recommendation model processing method according to claim 4, wherein combining the object attribute data and user attribute data contained in the target cluster based on the first access result and the third access result includes: If both the first access result and the third access result are accessed, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined. And / or, If both the first access result and the third access result are accessed, the user attribute data of the second user, the object attribute data of the first object to be recommended, and the object attribute data of the third object to be recommended are combined.
6. The object recommendation model processing method according to claim 5, wherein combining the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended includes: The user attribute data of the first user and the object attribute data of the third object to be recommended are input into the object recommendation model to predict the access probability and obtain the first access probability of the first user to the third object to be recommended. Based on the first access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
7. The object recommendation model processing method according to claim 6, wherein the data representation vector includes a second access probability of the user to the first object to be recommended, and a third access probability of the user to the second object to be recommended; Accordingly, the step of combining the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended based on the first access probability includes: Based on the relationship between the first access probability, the second access probability, and the third access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
8. The object recommendation model processing method according to claim 7, wherein combining the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended based on the relationship between the first access probability, the second access probability, and the third access probability includes: When the second access probability is greater than the first access probability, and the first access probability is greater than the third access probability, the user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are combined.
9. The object recommendation model processing method according to claim 7 or 8, wherein updating the object recommendation model based on the combined result includes: The user attribute data of the first user, the object attribute data of the first object to be recommended, the object attribute data of the second object to be recommended, and the object attribute data of the third object to be recommended are used as training samples, and the first access probability, the second access probability, and the third access probability are used as labels to update the object recommendation model.
10. An object recommendation model processing device, comprising: The acquisition module is configured to acquire object attribute data of the object to be recommended in the target project and determine the user's access result to the object to be recommended; The input module is configured to use the object attribute data, the user's user attribute data, and the access results as training data to train the object recommendation model to generate the object recommendation model. The clustering module is configured to obtain the data representation vector generated by the object recommendation model processing the training data, and to cluster the training data according to the data representation vector to generate the corresponding clustering result, wherein the data representation vector includes the probability of a user accessing the object to be recommended; The update module is configured to combine the object attribute data and user attribute data contained in the clustering results, and update the object recommendation model based on the combination results; The update module is further configured to determine hard-to-bear samples based on the clustering results, wherein the clustering results include a target cluster, and the object attribute data and user attribute data contained in the target cluster are combined based on the hard-to-bear samples.
11. A computing device, comprising: Memory and processor; The memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the steps of the object recommendation model processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium storing computer instructions that, when executed by a processor, implement the steps of the object recommendation model processing method according to any one of claims 1 to 9.
13. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the steps of the object recommendation model processing method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Accurate service recommendation method based on economic operation uncertainty factor analysis
CN114841774A
Data processing method and related device
CN115098732A