A method for determining a recommendation model and related devices
Through the knowledge distillation framework of the teacher model and student model, the recommendation model is trained, which solves the recommendation accuracy problems caused by the missing characteristics of new content and new users, and achieves efficient and accurate recommendation services.
Patent Information
- Application Number
- CN202210631595.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-06
- Publication Date
- 2025-08-12
- Estimated Expiration
- 2042-06-06
AI Technical Summary
The prior art is difficult to provide accurate recommendation services for new content and new users because these objects lack a certain dimensional feature, resulting in a decrease in the accuracy of the recommendation model.
The knowledge distillation framework of the teacher model and the student model is adopted, and the complete feature vector is extracted through the teacher model, the student model extracts the missing feature vector, and the student model parameters are adjusted using the differences in the correlation prediction results to train a recommended model.
It realizes accurate recommendation services for new content and new users with missing features, improves the accuracy and efficiency of the recommendation model, and reduces the computational complexity and resource utilization.
Smart Images

Figure CN117251617B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to a method for determining a recommendation model and related devices. Background Art
[0002] Content services can be provided to users through the content platform. If appropriate content can be recommended to users when they visit the content platform, it can effectively increase the user's visit time to the content platform and improve the user experience.
[0003] To this end, relevant technologies generally use recommendation models to determine the association between users and content in the content platform, and based on the association, determine which content meets the user's viewing needs, so as to make content recommendations.
[0004] There are more and more uploaders engaged in content transfer and production, and massive amounts of new content or new users appear on content platforms every day. How to effectively recommend these new content and new users is an urgent problem that needs to be solved. Summary of the Invention
[0005] In order to solve the above technical problems, the present application provides a recommendation model determination method and related devices. The recommendation model obtained by training the student model based on the teacher model can be used to provide recommendation services for new content, new users and other such content with incomplete features.
[0006] The embodiments of this application disclose the following technical solutions:
[0007] In one aspect, an embodiment of the present application provides a method for determining a recommendation model, the method comprising:
[0008] Determining a training sample pair, the training sample pair including a first-category sample object and a second-category sample object, wherein a sample label of the training sample pair is used to identify whether the first-category sample object has an association relationship with the second-category sample object;
[0009] According to the first category of sample objects, determining a feature vector of the first category of sample objects by a teacher model, and determining a missing feature vector of the first category of sample objects by a student model, wherein the feature vector of the first category of sample objects includes a first-dimensional subvector and a second-dimensional subvector, and the missing feature vector of the first category of sample objects includes the first-dimensional subvector but lacks the second-dimensional subvector;
[0010] Determining, by the teacher model, a first correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the feature vectors of the first category of sample objects and the feature vectors of the second category of sample objects; and determining, by the student model, a second correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the missing feature vectors and the feature vectors of the second category of sample objects;
[0011] The student model is parameter-adjusted based on the difference between the second association prediction result and the sample label, and the difference between the second association prediction result and the first association prediction result to obtain the recommendation model, which is used to determine the association relationship between the first category of objects that are missing the second dimensional sub-vector and the second category of objects.
[0012] On the other hand, an embodiment of the present application provides a recommendation model determination device, the device comprising a first determination unit, a second determination unit, a third determination unit, and an adjustment unit:
[0013] The first determining unit is configured to determine a training sample pair, the training sample pair including a first-category sample object and a second-category sample object, wherein a sample label of the training sample pair is used to identify whether the first-category sample object has an association relationship with the second-category sample object;
[0014] The second determining unit is configured to determine, based on the first category of sample objects, a feature vector of the first category of sample objects using a teacher model, and determine a missing feature vector of the first category of sample objects using a student model, wherein the feature vector of the first category of sample objects includes a first-dimensional subvector and a second-dimensional subvector, and the missing feature vector of the first category of sample objects includes the first-dimensional subvector but lacks the second-dimensional subvector;
[0015] The third determining unit is configured to determine, by the teacher model, a first correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the feature vectors of the first category of sample objects and the feature vectors of the second category of sample objects; and to determine, by the student model, a second correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the missing feature vectors and the feature vectors of the second category of sample objects;
[0016] The adjustment unit is used to adjust the parameters of the student model based on the difference between the second association prediction result and the sample label, and the difference between the second association prediction result and the first association prediction result, to obtain the recommendation model, and the recommendation model is used to determine the association relationship between the first category of objects that are missing the second dimensional sub-vector and the second category of objects.
[0017] On the other hand, an embodiment of the present application provides a computer device, the computer device including a processor and a memory:
[0018] The memory is used to store program code and transmit the program code to the processor;
[0019] The processor is configured to execute the method described above according to the instructions in the program code.
[0020] On the other hand, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method described in the above aspects.
[0021] On the other hand, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method described above.
[0022] As can be seen from the above technical solution, new content and new users generally lack a certain dimension of features, making it difficult to recommend using related technologies. To this end, training sample pairs are determined, including first-category sample objects and second-category sample objects, and sample labels are annotated to indicate whether the first-category sample objects have an association relationship with the second-category sample objects. When extracting vectors from the training sample pairs using the teacher model and the student model, the teacher model extracts complete feature vectors for the first-category sample objects, while the student model extracts missing feature vectors that are missing the second-dimensional subvector. This simulates cold start objects using the first-category sample objects. Because the teacher model has richer vector information than the student model when determining the association prediction results of the first-category sample objects with the second-category sample objects, when adjusting the student model parameters to obtain the recommendation model, the student model learns how to represent the missing information of the second-dimensional subvector using the first-dimensional subvector through the difference with the first-category association prediction results. Furthermore, the student model learns how to obtain accurate prediction results without relying on the second-dimensional subvector through the difference with the sample labels. The recommendation model thus trained can be used to determine the association relationship between the first-category object and the second-category object for the first-category object that lacks the second-dimensional subvector. Therefore, accurate recommendation services can be provided even for new content and new users whose features are incomplete. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0024] Figure 1 A schematic diagram of a recommendation model scenario provided in an embodiment of the present application;
[0025] Figure 2 A flowchart of a method for determining a recommendation model provided in an embodiment of the present application;
[0026] Figure 3 A device structure diagram of a recommendation model determination device provided in an embodiment of the present application;
[0027] Figure 4 A structural diagram of a terminal device provided in an embodiment of the present application;
[0028] Figure 5 A structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The embodiments of the present application are described below with reference to the accompanying drawings.
[0030] Content platforms see a massive influx of new objects, such as content or users, appearing daily. These new objects often lack certain characteristics compared to existing objects on the platform. For example, new content lacks sufficient and reliable historical click and play information. This lack of characteristics directly impacts recommendations for these new objects, hindering the development of content platforms.
[0031] Some related technologies, such as Related Technology A, directly use a small amount of existing historical click data as feature data for the behavioral dimension of new short videos to extract sub-vectors. Related Technology B, on the other hand, utilizes a newly trained cold-start model to generate behavioral embedding sub-vectors for new short videos that are somewhat adapted to the current recommendation system, thereby compensating for the invalid historical click data of the new short videos.
[0032] However, insufficient historical click data is not reliable, meaning it cannot reflect user account preferences. Therefore, the sub-vectors corresponding to the behavioral dimension generated by Related Technology A are unlikely to provide effective behavioral information and, in turn, affect recommendation accuracy, resulting in a counterproductive effect. Related Technology B can only mitigate the negative impact of invalid behavioral embedding sub-vectors, but cannot completely eliminate them. Furthermore, its accuracy relies heavily on the distribution mapping assumptions of the cold start model, significantly increasing computational complexity and placing an additional burden on system resources.
[0033] To this end, an embodiment of the present application provides a recommendation model determination method and related devices. The recommendation model obtained by training the student model based on the teacher model can be used to provide recommendation services for new content, new users, and other content with incomplete features.
[0034] The recommendation model determination method provided in the embodiments of the present application can be implemented by a computer device, which can be a terminal device or a server, wherein the server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Terminal devices include but are not limited to mobile phones, computers, intelligent voice interaction devices, smart home appliances, and vehicle-mounted terminals. The terminal device and the server can be directly or indirectly connected via wired or wireless communication, which is not limited in this application.
[0035] It is understandable that in the specific implementation of this application, data related to account click-through rate, account content, etc. may be involved. When the above embodiments of this application are applied to specific products or technologies, any one of them needs to obtain user permission or consent separately, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0036] Figure 1 A schematic diagram of a recommendation model scenario provided in an embodiment of the present application, wherein the server 100 is exemplarily used as the aforementioned computer device for illustration.
[0037] In view of the fact that a large amount of new content on the content platform lacks sufficient historical click data, which makes it difficult to provide recommendation services for these new contents, content is determined as the first type of sample object and user accounts are determined as the second type of sample objects. In this way, 200 training sample pairs are constructed, and their sample labels are whether the content has an association with the user account.
[0038] Obtain a teacher model 300 and a student model 400. When performing vector extraction on the training sample pair 200 through the teacher model 300 and the student model 400, for the content as the first category sample object, the teacher model 300 extracts the complete feature vector, while the student model 400 extracts the missing feature vector of the missing second-dimensional sub-vector (in this scenario, the sub-vector corresponding to the historical behavior data), thereby simulating the first category sample object as cold start content through the student model.
[0039] Since the teacher model 300 refers to richer vector information than the student model 400 when determining the correlation prediction results of the first category of sample objects for the second category of sample objects, in the process of adjusting the parameters of the student model 400 to obtain the recommendation model 500, the student model 400 learns how to represent the missing information of the second dimension sub-vector through the first dimension sub-vector through the difference with the first correlation prediction result, and learns how to obtain accurate prediction results without relying on the second dimension sub-vector through the difference with the sample label.
[0040] The recommendation model 500 trained in this way can be used to determine the association relationship between the first-category object that is missing the second-dimensional sub-vector and the second-category object. Therefore, accurate recommendation services can be provided for new content, new users, and other users with incomplete features. For example, when the terminal device 600 logs in to the content platform through a user account that is a second-category object, the terminal device 600 can send a recommendation request to the server 100 based on the terminal device. The server 100 determines the short video (i.e., the first-category object) associated with the user account (i.e., the second-category object) based on the trained recommendation model 500 and returns it to the user account as a recommendation result.
[0041] Figure 2 This is a method flow chart of a method for determining a recommendation model provided in an embodiment of the present application. In this embodiment, a server is exemplified as the aforementioned computer device for illustration.
[0042] The method comprises:
[0043] S201: Determine training sample pairs.
[0044] The training sample pair includes a first category sample object and a second category sample object, and the sample label of the training sample pair is used to identify whether the first category sample object has an association relationship with the second category sample object.
[0045] The determination of training samples is related to the recommendation needs of the content platform. The first type of sample objects are objects that are missing some features when performing recommendation services, while the second type of sample objects are objects that need to be associated with objects with some missing features in the recommendation needs.
[0046] If the recommendation requirement is for content with a missing feature, the first type of sample object is content, and its type is content type. If the recommendation requirement is for user accounts with a missing feature, the first type of sample object is user accounts, and its type is account type. Accordingly, the second type of sample object can be determined based on the first type of sample object and the recommendation requirement of the content platform.
[0047] Among them, the missing part of features can be represented by the subsequent second-dimensional sub-vector, that is, this part of features is extracted by the model to form the second-dimensional sub-vector.
[0048] S202: According to the first category of sample objects, determine the feature vectors of the first category of sample objects through a teacher model, and determine the missing feature vectors of the first category of sample objects through a student model.
[0049] The feature vector of the first type of sample object includes a first-dimensional sub-vector and a second-dimensional sub-vector, and the missing feature vector of the first type of sample object includes the first-dimensional sub-vector but lacks the second-dimensional sub-vector;
[0050] In the embodiment of this application, a recommendation model is trained using a knowledge distillation framework, using a teacher model and a student model. The teacher model assists the student model, allowing it to learn the actual second-dimensional sub-vector knowledge even when it lacks it, and apply it to improve the accuracy of relevance prediction.
[0051] Knowledge distillation refers to a model training framework that pre-trains a teacher model with more parameters, a more complex structure, and more accurate predictions. When training the student model, it provides smooth labels (such as the first correlation prediction results described below) to assist in student model training and improve the student model's final prediction accuracy.
[0052] In other words, under the knowledge distillation framework of the present embodiment, the recommendation model ultimately trained by the student model is the model used for online recommendation, and the model structure of the student model and the recommendation model can be a dual-tower structure. The teacher model is a model that assists the training of the student model and has the same model structure as the student model, for example, a dual-tower structure.
[0053] The above-mentioned double-tower structure has two input ends, one input end is used to input the first type of sample objects, and the corresponding output end is the feature vector of the first type of sample objects; the other input end is used to input the second type of sample objects, and the corresponding output end is the feature vector of the second type of sample objects.
[0054] Since the embodiment of the present application needs to implement a recommendation service for the first category of objects that are missing the second-dimensional sub-vector, under the knowledge distillation framework, the feature vector extracted by the teacher model for the first category of sample objects includes the first-dimensional sub-vector and the second-dimensional sub-vector, that is, the feature vector corresponding to the complete feature of the first category of sample objects is extracted, while the feature vector extracted by the student model includes the first-dimensional sub-vector but does not include the second-dimensional sub-vector, which is recorded as a missing feature vector, that is, the feature vector corresponding to the incomplete feature of the first category of sample objects (the feature corresponding to the missing second-dimensional sub-vector) is extracted. In other words, the second-dimensional sub-vector of the first category of sample objects serves as privileged information in knowledge distillation, that is, an input vector that only appears during model training and not during model inference.
[0055] Taking the first type of sample objects, specifically content-related short videos, as an example, the feature vectors used to identify short videos generally come from feature data of multiple feature dimensions, such as content dimension and behavior dimension. The feature data of the content dimension mainly includes the title, category, description text, etc. of the short video, and the feature data of the behavior dimension mainly includes the frequency of clicks, plays, downloads, etc. by user accounts.
[0056] Because newly released short videos on content platforms lack historical clickthrough data, or the historical clickthrough data is so limited that it is unreliable or even misleading, in order to provide corresponding recommendation services for these short videos, such as recommending such short videos to user accounts or classifying such short videos with other short videos, it is necessary to accurately determine the relevance of such short videos to other objects without relying on historical clickthrough data. In this scenario, the second-dimensional subvector is the subvector determined by historical clickthrough data, thereby eliminating the possible impact of the unavailable second-dimensional subvector on subsequent relevance predictions.
[0057] It should be noted that, in addition to being applicable to the aforementioned first-category objects that lack the second-dimensional sub-vector, for example, scenarios where the first-category objects have no historical click data or the historical click data is too little to be applicable, the embodiments of the present application can also be applied to first-category objects with sufficient historical click data. In this scenario, when performing correlation prediction on the first-category objects, reliable correlation prediction results can be obtained without additional processing or generation of the second-dimensional sub-vector, thereby reducing the prediction calculation amount and resource usage.
[0058] S203: Determine, by the teacher model, a first correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the feature vectors of the first category of sample objects and the feature vectors of the second category of sample objects; and determine, by the student model, a second correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the missing feature vectors and the feature vectors of the second category of sample objects.
[0059] As mentioned above, the teacher model and the student model are identical or similar in model structure, and the determination of the feature vectors for the second category of sample objects is also similar. The difference lies in the determination of the feature vectors for the first category of sample objects.
[0060] The feature vector determined by the teacher model is based on the complete feature data of the first type of sample objects, including the first-dimensional subvector and the second-dimensional subvector. The student model determines the missing feature vector, which is missing the second-dimensional subvector. Therefore, the first correlation prediction result determined by the teacher model additionally refers to the information provided by the second-dimensional subvector compared to the second correlation prediction result.
[0061] It should be noted that for the second category of sample objects, the teacher model and the student model use the same feature data when determining the feature vectors. For example, in the aforementioned dual-tower model structure, the teacher model and the student model each have two independent feature extraction sub-models: one for extracting feature vectors and missing feature vectors for the first category of sample objects, and the other for extracting feature vectors for the second category of sample objects. Therefore, the feature vector extraction for the second category of sample objects will not be detailed here.
[0062] S204: Adjusting parameters of the student model based on the difference between the second relevance prediction result and the sample label, and the difference between the second relevance prediction result and the first relevance prediction result, to obtain the recommendation model.
[0063] Since the first correlation prediction result is obtained by the teacher model based on the complete feature vector of the first type of sample object, during the training stage of the student model, the first correlation prediction result is closer to the actual situation (sample label) than the second correlation prediction result, and can be used as the basis for training the student model.
[0064] Furthermore, since the sample labels are based on actual historical context—either associated or not—they are classified as either 0 or 1, while the first correlation prediction results are based on the teacher model's predictions, they can reflect information about the degree of correlation relative to the sample labels, such as 80% correlation or 35% non-correlation. Therefore, the first correlation prediction results provide smoother discrepancies in training information, providing more detailed guidance to the student model during its training and learning process compared to the sample labels. Therefore, the sample labels can be considered hard labels, while the first correlation prediction results output by the teacher model can be considered smoother soft labels.
[0065] It can be seen that the difference between the second correlation prediction result and the sample label, as well as the difference between the second correlation prediction result and the first correlation prediction result can provide guidance of different granularities for the student model during the training process of the student model, which helps to improve the prediction accuracy of the recommendation model.
[0066] Generally speaking, the model parameters of the teacher model are more complex than those of the student model. Therefore, through the difference between the second correlation prediction result and the first correlation prediction result, the information analyzed by the teacher model can be effectively transferred to the student model, which helps to accelerate the training speed of the student model.
[0067] Moreover, since the teacher model will also refer to the second-dimensional sub-vector that the student model cannot obtain when making correlation predictions, this second-dimensional sub-vector is a valid sub-vector relative to the sub-vector generated in the relevant technology. It is generated based on sufficient historical data of the first category of sample objects and carries valid information rather than invalid or interference information in the relevant technology. Therefore, through the above differences, the student model can also learn relevant valid knowledge of the second-dimensional sub-vector during the training process, so that the recommendation model obtained through training can generate missing feature vectors for the first category of objects based on the above-mentioned knowledge learned. Information or guidance related to the second-dimensional sub-vector can be generated, which reasonably compensates for the impact of the lack of the second-dimensional sub-vector on correlation prediction when the recommendation model is actually used, thereby improving the accuracy and credibility of the recommendation model.
[0068] Guided by these differences, the student model is trained to produce a recommendation model. This recommendation model is used to determine the association relationship between first-category objects that are missing the second-dimensional subvector and second-category objects. Here, the first-category objects and the first-category sample objects are of the same object type, and the second-category objects and the second-category sample objects are of the same object type. For example, if the object type of the first-category sample objects is content type, the object type of the first-category objects is also content type. If the object type of the second-category sample objects is account type, the object type of the second-category objects is also account type.
[0069] It should be noted that, as mentioned above, in addition to being applicable to the first category of objects that are cold-started, that is, objects that cannot generate valid second-dimensional sub-vectors due to cold start, the recommendation model can also be applied to the first category of objects that can generate valid second-dimensional sub-vectors, that is, the first category of objects that are not cold-started. Therefore, the embodiment of the present application can not only effectively provide recommendation services for cold-start objects, but also provide recommendation services for non-cold-start objects, thereby improving the recommendation speed by saving computing power and resources. Furthermore, it can also be applied to other scenarios, such as recommendation services for objects that lack feature data not due to cold start.
[0070] As can be seen, new content and new users generally lack a certain dimension of features, making it difficult to recommend using related technologies. To this end, training sample pairs are determined, including first-category sample objects and second-category sample objects, and sample labels are annotated to indicate whether the first-category sample objects have an association relationship with the second-category sample objects. When extracting vectors from the training sample pairs using the teacher model and the student model, the teacher model extracts complete feature vectors for the first-category sample objects, while the student model extracts missing feature vectors that lack the second-dimensional subvector. This simulates cold start objects using the first-category sample objects. Because the teacher model references richer vector information than the student model when determining the association prediction results of the first-category sample objects with the second-category sample objects, when adjusting the student model parameters to obtain the recommendation model, the student model learns how to represent the missing information of the second-dimensional subvector using the first-dimensional subvector through the difference with the first-category association prediction results. Furthermore, the student model learns how to obtain accurate prediction results without relying on the second-dimensional subvector through the difference with the sample labels. The recommendation model thus trained can be used to determine the association relationship between first-category objects that lack the second-dimensional subvector and second-category objects. Therefore, accurate recommendation services can be provided even for new content and new users whose features are incomplete.
[0071] In the embodiment of the present application, it is not limited whether the object types of the first and second sample objects are the same. The specific object types of the two sample objects can be determined based on actual recommendation requirements or training requirements. In other words, the object types of the first and second sample objects can be the same or different.
[0072] On a content platform, for example, if recommendations need to determine which old user accounts are associated with a new user account (or a cold-started user account), the new user account can be used as the first type of sample object, and the old user account can be used as the second type of sample object. These two types of sample objects have the same object type: account type. For another example, if recommendations need to determine which user accounts are associated with a new short video (or a cold-started short video), the new short video can be used as the first type of sample object, and the user account can be used as the second type of sample object. These two types of sample objects have different object types: content type and account type, respectively.
[0073] In one possible implementation, the object type of the first category of sample objects is different from the object type of the second category of sample objects. Object types may include content types and account types. Content types are used to identify content-related types, such as short videos, long videos, audio, images, comics, articles, and live broadcasts. Account types are primarily used to identify account-related types, such as user accounts.
[0074] In addition to content type and account type, more object types can be determined based on different content platforms or different type classification granularity, such as video type, text type, image type, etc., which will not be repeated here.
[0075] Several object type combinations are described below:
[0076] When the object type of the first type of sample objects is content, the object type of the second type of sample objects is account. This combination of object types can be applied to cold-start recommendation scenarios for content objects, such as determining which user accounts are associated with new short videos in order to recommend these new short videos to the user accounts.
[0077] or,
[0078] When the object type of the first type of sample objects is an account type, the object type of the second type of sample objects is a content type. This combination of object types can be applied to cold-start recommendation scenarios for account-type objects, for example, to determine which content-type objects are associated with a new user account in order to recommend content-type objects such as short videos to the user account.
[0079] In one possible implementation, when the object type of the first category of sample objects is a content type and the object type of the second category of sample objects is an account type, the first-dimensional sub-vector is used to identify the content data corresponding to the first category of sample objects, and the second-dimensional sub-vector is used to identify the behavior data corresponding to the first category of sample objects.
[0080] The "dimension" mentioned here refers to the data dimension. The first-dimensional subvector and the second-dimensional subvector are subvectors determined based on the feature data of different data dimensions. This application does not limit the specific data dimensions of the first and second dimensions. For example, the first-dimensional subvector used to identify the content data corresponding to the first type of sample object can be a content embedding vector, and the second-dimensional subvector used to identify the behavior data corresponding to the first type of sample object can be a content embedding vector.
[0081] Content data is feature data derived from the content dimension. Taking the first type of sample object as an example, short videos, the content data of short videos can include content attributes such as tags, publishers, descriptions, etc. Taking the second type of sample object as an example, user accounts, the content data of user accounts can include non-sensitive account information such as gender, age, and region (but will never be tied to the user's actual identity).
[0082] Behavioral data is feature data derived from the behavioral dimension. Taking short videos as an example, the first type of sample object is a short video. The behavioral data of a short video can include the number of clicks, plays, downloads, follows, and favorites of the short video by the user account. Taking the second type of sample object as an example, the behavioral data of a user account can include non-sensitive behavioral information of the user account, such as historical interaction data generated by the user account, such as click behavior (but it will never be tied to the user's actual identity).
[0083] After the recommendation model is trained, the embodiment of the present application provides an application method for the recommendation model. In one possible implementation, the method further includes:
[0084] S11: Acquire the first-category objects in the target platform that have the same object type as the first-category sample objects.
[0085] It should be noted that the first category of objects in this embodiment and the aforementioned first category of sample objects have the same object type, and the second category of objects and the aforementioned second category of sample objects have the same object type.
[0086] S12: Pre-acquire missing feature vectors of the first category of objects using the recommendation model.
[0087] The missing feature vector of the first type of object includes the first-dimensional sub-vector but lacks the second-dimensional sub-vector.
[0088] S13: When the second category objects of the target platform are obtained, objects to be recommended that have an associated relationship with the second category objects are determined from the first category objects through the recommendation model according to the feature vectors of the second category objects and the missing feature vectors of the first category objects.
[0089] The second category objects and the second category sample objects have the same object type.
[0090] The recommendation model uses independent processes to determine missing feature vectors for first-category objects and feature vectors for second-category objects. Therefore, when the feature data corresponding to the first-dimensional subvectors of first-category objects remains relatively stable and relatively stable, the recommendation model can be used to pre-determine the missing feature vectors corresponding to the first-category objects on the content platform. When it is actually necessary to recommend services related to the second-category objects for the first-category objects, the recommendation model can simply determine the feature vectors for the second-category objects and then directly predict the association based on the pre-obtained missing feature vectors for the first-category objects.
[0091] This method of predetermining missing feature vectors completes part of the work required for recommendation offline in advance, which can effectively reduce subsequent recommendation delays and improve recommendation efficiency.
[0092] Next, several possible implementations of the student model training process are described.
[0093] The first possible implementation method: student model is trained separately
[0094] In this implementation, the teacher model is a pre-trained model. That is, before training the student model, the teacher model has already completed model training and has achieved high accuracy. Therefore, during the student model training process, the teacher model's model parameters can be fixed, and only the student model's model parameters need to be adjusted.
[0095] In this implementation, for example, the following formula 1 can be used to adjust the parameters of the student model:
[0096]
[0097] Among them, the meaning of formula 1 is to adjust the model parameter W of the student model s To minimize the first term in Equation 1 and the second The harmony.
[0098] y∈{0,1} is the sample label of the training sample pair, λ is the preset hyperparameter, f is the model calculation process, is the missing feature vector determined by the student model for the first type of sample objects, is the feature vector determined by the student model for the second type of sample objects, is the first-dimensional subvector in the feature vector determined by the teacher model for the first type of sample object, is the second-dimensional subvector in the feature vector determined by the teacher model for the first type of sample object, is the feature vector determined by the teacher model for the second type of sample object, W t are the model parameters of the teacher model.
[0099] L s is the supervised loss function used to identify the difference between the second relevance prediction result and the sample label, L d is a distillation loss function used to identify the difference between the second relevance prediction result and the first relevance prediction result.
[0100] Through the above method, the high recommendation accuracy of the trained teacher model can be quickly transferred to the student model, which improves the training efficiency of the student model and ensures the training quality.
[0101] The second possible implementation method: student model and teacher model are trained together
[0102] In this implementation, the teacher model is a pre-trained model that has not yet reached parameter convergence. This means that its accuracy has not yet reached optimality and it cannot yet provide optimal training guidance for the student model. This means that while the student model is being trained on training samples, the teacher model also needs to be trained simultaneously. This means that the model parameters of both the teacher and student models need to be adjusted during training.
[0103] This approach is implemented because the teacher model is typically larger than the student model, resulting in longer training times. If the student model is trained only after the teacher model is trained, the overall training time will be considerable. However, after the teacher model reaches a certain level of training, its actual prediction accuracy is sufficient to guide the student model. Therefore, training the teacher and student models simultaneously is feasible and can significantly reduce the time required to train the recommended model, improving training efficiency.
[0104] Therefore, while training the student model, the method further includes: adjusting the parameters of the teacher model according to the difference between the first association prediction result and the sample label.
[0105] This implementation method can, for example, use the following formula 2 to adjust the parameters of the student model:
[0106]
[0107] Compared with formula 1, this formula adds a third term
[0108] Among them, the meaning of formula 2 is to adjust the model parameters W of the student model s and the model parameters W of the teacher model t To minimize the first term in Equation 2 Item 2 and the third L t is a supervised loss function used to identify the difference between the first relevance prediction result and the sample label.
[0109] Although training the teacher model and the student model simultaneously saves time, the teacher model’s correlation prediction accuracy is not stable enough in the early stage of training due to insufficient training of the teacher model. If the first correlation prediction result of the teacher model is directly used to guide the student model to train the model at this stage, the distillation loss function L d It will interfere with the parameter adjustment of the student model.
[0110] To this end, in a possible implementation, the method further includes:
[0111] When it is determined that the parameter convergence degree of the teacher model has not reached the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, reducing the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment;
[0112] When it is determined that the parameter convergence degree of the teacher model reaches the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment is increased.
[0113] This convergence condition can be used to identify that the model parameters begin to stably change within a certain range without large fluctuations. When the degree of convergence of the teacher model parameters does not reach the convergence condition, the teacher model parameters are not stable at this time, and the prediction accuracy of the first correlation prediction result is difficult to meet expectations. At this time, using the first correlation prediction result as a basis for guiding the student model will have an adverse effect on the student model, and its corresponding influence weight can be reduced. The influence weight can be a hyperparameter λ in formula 1. For example, the value of λ can be set to 0 or a certain reduction from the preset value in the early stage of teacher model training to avoid affecting the training of the student model.
[0114] When the teacher model is trained to a certain extent, if the degree of convergence of its parameters does not reach the convergence condition, the originally reduced influence weight, i.e., λ, is restored to a predetermined value (a value between 0 and 1, such as 0.6), and the training of the student network can be guided normally. The restoration method can be to gradually increase the value of λ, or to directly update λ to a predetermined value when the convergence condition is met. This application does not limit this. Whether to restore directly or gradually can be determined based on the actual training needs, or based on the setting level of the convergence condition.
[0115] The third possible implementation: the student model and the teacher model have shared model parameters and are trained together
[0116] This implementation is implemented on the basis of the second possible implementation. For the specific joint training method and the adjustment of the influence weight, please refer to the corresponding description in the second possible implementation, which will not be repeated here.
[0117] Although the second possible implementation method reduces the training time of the recommendation model, training both the teacher model and the student model at the same time still requires huge computing and storage resources.
[0118] For example, the learnable parameters of the teacher and student models—for example, the embedding parameters for the first-dimensional subvector and second-dimensional subvector of the first category of sample objects, and the embedding parameters for the feature vector of the second category of sample objects—as well as the corresponding model variables, are completely independent. This means that during the training of the recommendation model, the teacher model and the student model must independently train these learnable parameters. This means the number of parameters and computational complexity doubles compared to training a single model, and the corresponding storage and computing power requirements also double.
[0119] To this end, the present application proposes a method for sharing the above-mentioned learnable parameters, wherein the teacher model and the student model have a shared first feature extraction layer. The aforementioned S202: based on the first category of sample objects, determining the feature vector of the first category of sample objects through the teacher model, and determining the missing feature vector of the first category of sample objects through the student model, includes:
[0120] According to the first category of sample objects, the feature vectors and missing feature vectors of the first category of sample objects are determined by the first feature extraction layer.
[0121] Since the teacher model and the student model determine the feature vector and missing feature vector of the first type of sample object through the shared first feature extraction layer, the vector content of the determined first-dimensional sub-vector is completely consistent, that is, Therefore, the teacher model and the student model do not need to separately store the model parameters originally used to determine the first type of sample objects. They only need to share and store a copy of the model parameters used to extract the first-dimensional sub-vector (i.e., the model parameters of the first feature extraction layer), saving storage resources and computational complexity.
[0122] Based on the above-mentioned embodiment of sharing the above-mentioned learnable parameters, in a possible implementation, the teacher model and the student model have a shared second feature extraction layer, and the method further includes: determining the feature vector of the second category of sample objects through the second feature extraction layer according to the second category of sample objects.
[0123] The teacher model and the student model determine the feature vectors of the second type of sample objects through the shared second feature extraction layer, so the vector content of the feature vectors of the second type of sample objects determined is completely consistent, that is, Therefore, the teacher model and the student model do not need to separately store the model parameters originally used to determine the second type of sample objects. They only need to share and store a copy of the model parameters of the second feature extraction layer, further saving storage resources and computing power.
[0124] Therefore, the third possible implementation method is to adjust the parameters of the student model using the following formula 3 based on formula 2:
[0125]
[0126] Take the content platform as a short video platform, the first type of object is short videos, and the second type of object is user accounts as an example for explanation.
[0127] The recommendation model in the embodiment of the present application can be a dual-tower structure, with the model structure divided into a user-side model and a short video-side model. The model needs to predict the click-through rate of the user account for all candidate short videos and filter out the k short videos with the highest click-through rate as the recommendation results.
[0128] Input: The input to the user-side model consists of two main components: a vector representation extracted from the user account's historical click behavior sequence, known as the user account's behavioral embedding; and a vector representation extracted from the user account's profile (including gender, age, region, etc.), known as the user account's content embedding. The input to the short video model consists solely of content embeddings extracted from short video attributes (including tags, publisher, description, etc.).
[0129] Processing: The user account's behavior embedding and content embedding are concatenated into a single feature vector, which is then fed into the user-side model of the recommendation model for computation. This model can be any complex neural network. Similarly, the content embedding for the short video is fed into the short video model. The two models in the recommendation model are independent of each other.
[0130] Output: The output of the user-side model is a single vector, which uniquely represents the user account and is called the user embedding vector (e.g., the feature vector of the second category of objects mentioned above). Similarly, the short video embedding vector can be obtained (e.g., the missing feature vector of the first category of objects mentioned above).
[0131] Prediction: After obtaining the user embedding vector and the short video embedding vector, calculate the correlation between the two (which can be dot product, cosine distance, or Euclidean distance) as the click rate of the user account for the short video.
[0132] Typically, the input to the short video side model only has content embedding, not behavioral embedding. From the perspective of short videos, historical click data can reflect the user preferences of the short video, which can improve the accuracy of short video recommendations. However, only short videos with sufficient historical click data (for example, 20 click behaviors) can have their behavioral embeddings contain sufficient preference information to effectively improve recommendation accuracy. When calculating the click-through rate of a user account for a cold-start short video, it is impossible to extract a valid behavioral embedding of the short video due to the lack of historical click data for the cold-start short video. As a result, if the behavioral embedding of the short video is directly introduced, the invalid behavioral embedding of the cold-start short video will affect its recommendation accuracy, resulting in a counterproductive effect.
[0133] When the recommendation model is operating normally online (i.e., during the model's inference phase), there's no guarantee that candidate short videos participating in the current recommendation calculation will have sufficient historical click data. However, when the model is being trained offline (i.e., during the student model's training phase), it's possible to select short videos with sufficient historical click data to achieve the positive effects of introducing behavioral embedding.
[0134] In this embodiment of the application, the behavioral embeddings of short videos are referred to as privileged information. Privileged information refers to information that exists only during the model's training phase and not during the model's inference phase. Therefore, during recommendation model training, this embodiment of the application incorporates the behavioral embeddings of short videos into the input of the teacher model to improve recommendation accuracy. When the recommendation model is launched, the behavioral embeddings of short videos are not used to ensure the accuracy of cold-start short video recommendations.
[0135] After the recommendation model is launched, as mentioned above, the account-based and short video-based components of the recommendation model are structurally separate. Therefore, the recommendation model can pre-calculate the missing feature vectors for all candidate short videos on the short video platform to reduce subsequent recommendation latency.
[0136] Right now in Represents the model parameters of the short video side in the recommendation model, Represents the short video embedding vector of short video i, that is, the missing feature vector. When user account j requests a recommendation service for short videos, the recommendation model calculates the account embedding vector of the user account through the account side, that is, the feature vector Then calculate the correlation between the user account and all short videos, that is Where r is the relevance calculation function and I is the set of all candidate short videos. Sort R in descending order and select the top k short videos as the recommended short videos for user account j.
[0137] Based on the above embodiments, Figure 3 This is a device structure diagram of a recommendation model determination device provided in an embodiment of the present application. The recommendation model determination device 300 includes a first determination unit 301, a second determination unit 302, a third determination unit 303, and an adjustment unit 304:
[0138] The first determining unit 301 is configured to determine a training sample pair, the training sample pair including a first-category sample object and a second-category sample object, wherein a sample label of the training sample pair is used to identify whether the first-category sample object has an association relationship with the second-category sample object;
[0139] The second determining unit 302 is configured to determine, based on the first category of sample objects, a feature vector of the first category of sample objects using a teacher model, and determine a missing feature vector of the first category of sample objects using a student model, wherein the feature vector of the first category of sample objects includes a first-dimensional subvector and a second-dimensional subvector, and the missing feature vector of the first category of sample objects includes the first-dimensional subvector but lacks the second-dimensional subvector;
[0140] The third determining unit 303 is configured to determine, by the teacher model, a first correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the feature vectors of the first category of sample objects and the feature vectors of the second category of sample objects; and to determine, by the student model, a second correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the missing feature vectors and the feature vectors of the second category of sample objects;
[0141] The adjustment unit 304 is used to adjust the parameters of the student model based on the difference between the second association prediction result and the sample label, and the difference between the second association prediction result and the first association prediction result, to obtain the recommendation model, which is used to determine the association relationship between the first category of objects that are missing the second dimensional sub-vector and the second category of objects.
[0142] In a possible implementation, the teacher model is a pre-trained model that has not yet reached parameter convergence, and the adjustment unit is further used to adjust the parameters of the teacher model according to the difference between the first association prediction result and the sample label.
[0143] In a possible implementation, the adjusting unit is further configured to:
[0144] When it is determined that the parameter convergence degree of the teacher model has not reached the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, reducing the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment;
[0145] When it is determined that the parameter convergence degree of the teacher model reaches the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment is increased.
[0146] In a possible implementation, the teacher model and the student model have a shared first feature extraction layer, and the second determination unit is further used to determine the feature vector and missing feature vector of the first category of sample objects through the first feature extraction layer based on the first category of sample objects.
[0147] In a possible implementation, the teacher model and the student model have a shared second feature extraction layer, and the second determination unit is further configured to determine a feature vector of the second category of sample objects through the second feature extraction layer according to the second category of sample objects.
[0148] In one possible implementation, the teacher model is a pre-trained model.
[0149] In a possible implementation manner, the object type of the first category of sample objects is different from the object type of the second category of sample objects;
[0150] When the object type of the first type of sample objects is a content type, the object type of the second type of sample objects is an account type;
[0151] When the object type of the first-category sample object is an account type, the object type of the second-category sample object is a content type.
[0152] In one possible implementation, when the object type of the first category of sample objects is a content type and the object type of the second category of sample objects is an account type, the first-dimensional sub-vector is used to identify the content data corresponding to the first category of sample objects, and the second-dimensional sub-vector is used to identify the behavior data corresponding to the first category of sample objects.
[0153] In a possible implementation, the apparatus further includes an acquiring unit and a fourth determining unit:
[0154] The acquiring unit is configured to acquire, in a target platform, objects of the first category that have the same object type as the sample objects of the first category;
[0155] The acquisition unit is further configured to pre-acquire a missing feature vector of the first category of objects using the recommendation model, where the missing feature vector of the first category of objects includes the first-dimensional sub-vector but lacks the second-dimensional sub-vector;
[0156] The fourth determination unit is used to determine, when obtaining the second-category objects of the target platform, based on the feature vectors of the second-category objects and the missing feature vectors of the first-category objects, the objects to be recommended that have an associated relationship with the second-category objects from the first-category objects through the recommendation model, and the second-category objects and the second-category sample objects have the same object type.
[0157] As can be seen, new content and new users generally lack a certain dimension of features, making it difficult to recommend using related technologies. To this end, training sample pairs are determined, including first-category sample objects and second-category sample objects, and sample labels are annotated to indicate whether the first-category sample objects have an association relationship with the second-category sample objects. When extracting vectors from the training sample pairs using the teacher model and the student model, the teacher model extracts complete feature vectors for the first-category sample objects, while the student model extracts missing feature vectors that lack the second-dimensional subvector. This simulates cold start objects using the first-category sample objects. Because the teacher model references richer vector information than the student model when determining the association prediction results of the first-category sample objects with the second-category sample objects, when adjusting the student model parameters to obtain the recommendation model, the student model learns how to represent the missing information of the second-dimensional subvector using the first-dimensional subvector through the difference with the first-category association prediction results. Furthermore, the student model learns how to obtain accurate prediction results without relying on the second-dimensional subvector through the difference with the sample labels. The recommendation model thus trained can be used to determine the association relationship between first-category objects that lack the second-dimensional subvector and second-category objects. Therefore, accurate recommendation services can be provided even for new content and new users whose features are incomplete.
[0158] The present application also provides a computer device, which is the aforementioned computer device and may include a terminal device or a server. The aforementioned recommendation model determination device may be configured in the computer device. The computer device is described below with reference to the accompanying drawings.
[0159] If the computer device is a terminal device, see Figure 4 As shown, the embodiment of the present application provides a terminal device, taking a mobile phone as an example:
[0160] Figure 4 The block diagram shows a partial structure of a mobile phone related to the terminal device provided in the embodiment of the present application. Figure 4 The mobile phone includes components such as a radio frequency (RF) circuit 1410, a memory 1420, an input unit 1430, a display unit 1440, a sensor 1450, an audio circuit 1460, a wireless fidelity (WiFi) module 1470, a processor 1480, and a power supply 1490. Those skilled in the art will understand that Figure 4 The mobile phone structure shown in the figure does not constitute a limitation to the mobile phone, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0161] The following combination Figure 4 A detailed introduction to the various components of a mobile phone:
[0162] The RF circuit 1410 may be used for receiving and sending signals during information transmission or calls. In particular, after receiving downlink information from the base station, it is sent to the processor 1480 for processing. In addition, the designed uplink data is sent to the base station.
[0163] Memory 1420 can be used to store software programs and modules. Processor 1480 executes the various functional applications and data processing of the mobile phone by running the software programs and modules stored in memory 1420. Memory 1420 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created based on the use of the mobile phone (such as audio data, a phone book, etc.). In addition, memory 1420 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0164] The input unit 1430 may be configured to receive input digital or character information and generate key signal input related to user settings and function control of the mobile phone. Specifically, the input unit 1430 may include a touch panel 1431 and other input devices 1432 .
[0165] The display unit 1440 may be configured to display information input by the user or information provided to the user, as well as various menus of the mobile phone. The display unit 1440 may include a display panel 1441 .
[0166] The mobile phone may also include at least one sensor 1450, such as a light sensor, a motion sensor, and other sensors.
[0167] The audio circuit 1460 , the speaker 1461 , and the microphone 1462 can provide an audio interface between the user and the mobile phone.
[0168] WiFi is a short-range wireless transmission technology. The mobile phone can help users send and receive emails, browse web pages, and access streaming media through the WiFi module 1470, providing users with wireless broadband Internet access.
[0169] The processor 1480 is the control center of the mobile phone. It uses various interfaces and lines to connect various parts of the entire mobile phone. It executes various functions of the mobile phone and processes data by running or executing software programs and / or modules stored in the memory 1420 and calling data stored in the memory 1420.
[0170] The mobile phone also includes a power supply 1490 (such as a battery) for supplying power to various components.
[0171] In this embodiment, the processor 1480 included in the terminal device further has the following functions:
[0172] Determining a training sample pair, the training sample pair including a first-category sample object and a second-category sample object, wherein a sample label of the training sample pair is used to identify whether the first-category sample object has an association relationship with the second-category sample object;
[0173] According to the first category of sample objects, determining a feature vector of the first category of sample objects by a teacher model, and determining a missing feature vector of the first category of sample objects by a student model, wherein the feature vector of the first category of sample objects includes a first-dimensional subvector and a second-dimensional subvector, and the missing feature vector of the first category of sample objects includes the first-dimensional subvector but lacks the second-dimensional subvector;
[0174] Determining, by the teacher model, a first correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the feature vectors of the first category of sample objects and the feature vectors of the second category of sample objects; and determining, by the student model, a second correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the missing feature vectors and the feature vectors of the second category of sample objects;
[0175] The student model is parameter-adjusted based on the difference between the second association prediction result and the sample label, and the difference between the second association prediction result and the first association prediction result to obtain the recommendation model, which is used to determine the association relationship between the first category of objects that are missing the second dimensional sub-vector and the second category of objects.
[0176] If the computer device is a server, this embodiment of the application also provides a server, see Figure 5 As shown, Figure 5The structural diagram of the server 1500 provided in the embodiment of the present application, the server 1500 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 1522 (for example, one or more processors) and a memory 1532, and one or more storage media 1530 (for example, one or more mass storage devices) for storing application programs 1542 or data 1544. Among them, the memory 1532 and the storage medium 1530 can be temporary storage or permanent storage. The program stored in the storage medium 1530 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 1522 can be configured to communicate with the storage medium 1530 to execute a series of instruction operations in the storage medium 1530 on the server 1500.
[0177] The server 1500 may also include one or more power supplies 1526, one or more wired or wireless network interfaces 1550, one or more input and output interfaces 1558, and / or one or more operating systems 1541, such as Windows Server 2003. TM , Mac OS X TM , Unix TM ,Linux TM , FreeBSD TM etc.
[0178] The steps performed by the server in the above embodiment can be based on Figure 5 The server structure shown.
[0179] In addition, an embodiment of the present application further provides a storage medium, which is used to store a computer program, and the computer program is used to execute the method provided by the above embodiment.
[0180] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the method provided in the above embodiment.
[0181] Those skilled in the art will understand that all or part of the steps of implementing the above-mentioned method embodiment can be completed by hardware related to program instructions, and the above-mentioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above-mentioned method embodiment; and the above-mentioned storage medium can be at least one of the following media: read-only memory (English: Read-only Memory, abbreviated: ROM), RAM, magnetic disk or optical disk, etc., various media that can store program codes.
[0182] It should be noted that the various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and system embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of this embodiment. A person of ordinary skill in the art can understand and implement it without expending creative work.
[0183] The above is only one specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the scope of protection of the present application. Moreover, based on the implementation methods provided in the above aspects, the present application can also be further combined to provide more implementation methods. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A method for determining a recommendation model, characterized in that: The method comprises: Determining a training sample pair, the training sample pair including a first-category sample object and a second-category sample object, a sample label of the training sample pair being used to identify whether the first-category sample object has an association relationship with the second-category sample object, the first-category sample object including content or user accounts, and the second-category sample object including content or user accounts; According to the first category of sample objects, determining a feature vector of the first category of sample objects by a teacher model, and determining a missing feature vector of the first category of sample objects by a student model, wherein the feature vector of the first category of sample objects includes a first-dimensional subvector and a second-dimensional subvector, and the missing feature vector of the first category of sample objects includes the first-dimensional subvector but lacks the second-dimensional subvector; Determining, by the teacher model, a first correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the feature vectors of the first category of sample objects and the feature vectors of the second category of sample objects; and determining, by the student model, a second correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the missing feature vectors and the feature vectors of the second category of sample objects; The student model is parameter-adjusted based on the difference between the second association prediction result and the sample label, and the difference between the second association prediction result and the first association prediction result to obtain the recommendation model, which is used to determine the association relationship between the first category of objects that are missing the second dimensional sub-vector and the second category of objects.
2. The method according to claim 1, characterized in that The teacher model is a pre-trained model that has not yet reached parameter convergence, and the method further includes: The parameters of the teacher model are adjusted according to the difference between the first association prediction result and the sample label.
3. The method according to claim 2, characterized in that The method further comprises: When it is determined that the parameter convergence degree of the teacher model has not reached the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, reducing the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment; When it is determined that the parameter convergence degree of the teacher model reaches the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment is increased.
4. The method according to claim 2, characterized in that The teacher model and the student model have a shared first feature extraction layer, and determining, based on the first category of sample objects, the feature vectors of the first category of sample objects by the teacher model, and determining, based on the first category of sample objects, the missing feature vectors of the first category of sample objects by the student model, include: According to the first category of sample objects, the feature vectors and missing feature vectors of the first category of sample objects are determined by the first feature extraction layer.
5. The method according to claim 4, characterized in that The teacher model and the student model have a shared second feature extraction layer, and the method further includes: According to the second type of sample objects, a feature vector of the second type of sample objects is determined by the second feature extraction layer.
6. The method according to claim 1, characterized in that The teacher model is a pre-trained model.
7. The method according to any one of claims 1 to 6, characterized in that The object type of the first category of sample objects is different from the object type of the second category of sample objects; When the object type of the first type of sample objects is a content type, the object type of the second type of sample objects is an account type; When the object type of the first-category sample object is an account type, the object type of the second-category sample object is a content type.
8. The method according to claim 7, characterized in that When the object type of the first category sample object is content type and the object type of the second category sample object is account type, the first dimensional sub-vector is used to identify the content data corresponding to the first category sample object, and the second dimensional sub-vector is used to identify the behavior data corresponding to the first category sample object.
9. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Acquire the first-category objects having the same object type as the first-category sample objects in the target platform; Pre-acquire a missing feature vector of the first category of objects using the recommendation model, where the missing feature vector of the first category of objects includes the first-dimensional sub-vector but lacks the second-dimensional sub-vector; When obtaining the second-category objects of the target platform, based on the feature vectors of the second-category objects and the missing feature vectors of the first-category objects, the recommendation model is used to determine the objects to be recommended that have an associated relationship with the second-category objects from the first-category objects, and the second-category objects and the second-category sample objects have the same object type.
10. A device for determining a recommendation model, characterized in that: The device includes a first determining unit, a second determining unit, a third determining unit and an adjusting unit: The first determining unit is configured to determine a training sample pair, the training sample pair including a first-category sample object and a second-category sample object, the sample label of the training sample pair being used to identify whether the first-category sample object has an association relationship with the second-category sample object, the first-category sample object including content or user accounts, and the second-category sample object including content or user accounts; The second determining unit is configured to determine, based on the first category of sample objects, a feature vector of the first category of sample objects using a teacher model, and determine a missing feature vector of the first category of sample objects using a student model, wherein the feature vector of the first category of sample objects includes a first-dimensional subvector and a second-dimensional subvector, and the missing feature vector of the first category of sample objects includes the first-dimensional subvector but lacks the second-dimensional subvector; The third determining unit is configured to determine, by the teacher model, a first correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the feature vectors of the first category of sample objects and the feature vectors of the second category of sample objects; and to determine, by the student model, a second correlation prediction result of the first category of sample objects with respect to the second category of sample objects based on the missing feature vectors and the feature vectors of the second category of sample objects; The adjustment unit is used to adjust the parameters of the student model based on the difference between the second association prediction result and the sample label, and the difference between the second association prediction result and the first association prediction result, to obtain the recommendation model, and the recommendation model is used to determine the association relationship between the first category of objects that are missing the second dimensional sub-vector and the second category of objects.
11. The device according to claim 10, characterized in that The teacher model is a pre-trained model that has not yet reached parameter convergence, and the adjustment unit is further used to adjust the parameters of the teacher model according to the difference between the first association prediction result and the sample label.
12. The device according to claim 11, characterized in that The adjustment unit is further configured to: When it is determined that the parameter convergence degree of the teacher model has not reached the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, reducing the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment; When it is determined that the parameter convergence degree of the teacher model reaches the convergence condition, in the process of adjusting the parameters of the student model to obtain the recommendation model, the influence weight of the difference between the second correlation prediction result and the first correlation prediction result on the parameter adjustment is increased.
13. A computer device, characterized in that: The computer device includes a processor and a memory: The memory is used to store program code and transmit the program code to the processor; The processor is configured to execute the method according to any one of claims 1 to 9 according to instructions in the program code.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium is used to store a computer program, and the computer program is used to execute the method according to any one of claims 1 to 9.
15. A computer program product comprising instructions, which, when executed on a computer, causes the computer to perform the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Machine learning model training method, device, storage medium and computer device
CN109345302A
Training method and device for multi-target recommendation model based on artificial intelligence
CN111090756A