Model training, video retrieval method and device, electronic equipment and storage medium
By training a video recall model and calculating the similarity of user interest feature vectors, the problem of not being able to recall videos of different interests simultaneously in existing technologies is solved, and efficient multi-interest video recall is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING QIYI CENTURY SCI & TECH CO LTD
- Filing Date
- 2022-12-12
- Publication Date
- 2026-04-21
AI Technical Summary
Existing video recall models cannot simultaneously recall videos related to users' different interests, resulting in low recall efficiency.
By training a video recall model, user description information and video identifiers are obtained, the similarity of interest feature vectors is calculated, the target interest feature vector is determined, and the model is iteratively optimized during training so that it can analyze video features under multiple interest types at the same time, thus achieving multi-interest recall.
It improves the efficiency of video retrieval, enabling simultaneous retrieval of videos from different user interest categories, and reduces the overlap in retrieval between different interest categories.
Smart Images

Figure CN115984734B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of video processing technology, and in particular to a model training, video retrieval method, apparatus, electronic device, and storage medium. Background Technology
[0002] With the rapid development of internet technology, users are increasingly reliant on obtaining information online. To meet users' needs for watching videos, various video websites have emerged. To satisfy user needs, video websites typically recommend videos that users might be interested in, thus providing personalized services based on individual user preferences.
[0003] Video recommendation systems primarily consist of two phases: video recall and video ranking. The video recall phase retrieves a subset of candidate videos from the video library, while the video ranking phase sorts these candidate videos. Therefore, the accuracy of the candidate videos recalled during the video recall phase is crucial to the overall performance of the video recommendation system.
[0004] In existing technologies, video recall models are typically used for recall operations during the video recall phase. Current video recall models usually extract user interest features based on a single interest and then use these features for recall. However, in real-world applications, users often have multiple different interests, and existing video recall models cannot simultaneously recall videos related to different user interests. Performing multiple recall operations significantly reduces recall efficiency. Summary of the Invention
[0005] The purpose of this invention is to provide a model training, video retrieval method, apparatus, electronic device, and storage medium. The trained video retrieval model can simultaneously analyze multiple interest types, thereby retrieving videos from different user interest categories and improving video retrieval efficiency. The specific technical solution is as follows:
[0006] In a first aspect of this invention, a model training method is provided, comprising:
[0007] Obtain the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in;
[0008] The first descriptive information is used as the input to the model to be trained to obtain the first interest feature vector of the first sample user under each preset interest type, which is output by the model to be trained.
[0009] Calculate the first similarity between each first interest feature vector and the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, to obtain the target interest feature vector under each interest type.
[0010] For each interest type, based on the first similarity corresponding to the target interest feature vector under the interest type, it is determined whether the interest type has been trained.
[0011] After training is completed for each of the aforementioned interest types, a video recall model is obtained.
[0012] Optionally, the method further includes: obtaining second description information of the second sample user and second video identifiers of videos that the second sample user is interested in; using the second description information as input to the video recall model to obtain the second interest feature vectors of the second sample user under each interest type, output by the video recall model; recalling the first target video identifier corresponding to each second interest feature vector; and calculating the offline recall rate of each interest type based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, wherein the offline recall rate of the interest type is used as the basis for calculating the recall volume of the interest type during the video recall process.
[0013] Optionally, the offline recall rate of the interest type is calculated based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, including: for each second interest feature vector under the interest type, obtaining the probability corresponding to the second interest feature vector, wherein the probability represents the probability that the second video identifier exists in the first target video identifier corresponding to the second interest feature vector; and calculating the offline recall rate of the interest type based on the probability corresponding to each second interest feature vector under the interest type.
[0014] Optionally, obtaining the probability corresponding to the second interest feature vector includes: if the second video identifier exists in the first target video identifier, determining the probability corresponding to the second interest feature vector as a value of 1; if the second video identifier does not exist in the first target video identifier, determining the probability corresponding to the second interest feature vector as a value of 0.
[0015] Optionally, the offline recall rate of the interest type is calculated based on the probability corresponding to each second interest feature vector under the interest type, including: calculating the average value of the probabilities corresponding to all second interest feature vectors under the interest type, and using the average value as the offline recall rate of the interest type.
[0016] Optionally, the first description information includes a first historical video identifier of the historical videos watched by the first sample user and first attribute information of the first sample user; using the first description information as input to the model to be trained to obtain the first interest feature vector of the first sample user under each preset interest type output by the model to be trained includes: inputting the first description information into the model to be trained; performing the following operations in the model to be trained: obtaining the first encoded feature vector of the first historical video identifier under each interest type, and the first comprehensive attribute feature vector of the first attribute information; concatenating each of the first encoded feature vectors with the first comprehensive attribute feature vector to obtain the first concatenated feature vector under each interest type; performing feature extraction on the first concatenated feature vector under each interest type to obtain the first interest feature vector of the first sample user under each interest type; and outputting the first interest feature vector of the first sample user under each interest type.
[0017] Optionally, determining whether the interest type has been trained based on the first similarity corresponding to the target interest feature vector under the interest type includes: calculating the loss value corresponding to the interest type based on the first similarity corresponding to the target interest feature vector under the interest type; and determining that the interest type has been trained if the loss value meets a preset condition.
[0018] In a second aspect of the invention, a video recall method is provided, comprising:
[0019] Upon receiving a recommendation request from a user to be processed, obtain the third description information of the user to be processed;
[0020] The third descriptive information is used as input to a pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, which is output by the video recall model; the video recall model is trained by the method described in any of the above methods.
[0021] For each of the third interest feature vectors, the second target video identifier corresponding to the third interest feature vector is recalled as the recall result under the interest type to which the third interest feature vector belongs.
[0022] Optionally, recalling the second target video identifier corresponding to the third interest feature vector includes: obtaining the offline recall rate of the interest type to which the third interest feature vector belongs from the pre-calculated offline recall rates of each interest type; calculating the recall quantity of the interest type to which the third interest feature vector belongs based on the obtained offline recall rate; and recalling the second target video identifier corresponding to the third interest feature vector according to the recall quantity.
[0023] In a third aspect of the present invention, a model training apparatus is provided, comprising:
[0024] The first acquisition module is used to acquire the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in.
[0025] The first processing module is used to take the first description information as input to the model to be trained and obtain the first interest feature vector of the first sample user under each preset interest type, which is output by the model to be trained.
[0026] The first calculation module is used to calculate the first similarity between each first interest feature vector and the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, so as to obtain the target interest feature vector under each interest type.
[0027] The judgment module is used to determine, for each interest type, whether the interest type has been trained successfully based on the first similarity corresponding to the target interest feature vector under the interest type.
[0028] The determination module is used to obtain the video recall model after all the interest types have been trained.
[0029] Optionally, the apparatus further includes: a second acquisition module, configured to acquire second description information of a second sample user and a second video identifier of a video that the second sample user is interested in; a second processing module, configured to use the second description information as input to the video recall model to obtain the second interest feature vector of the second sample user under each interest type, output by the video recall model; a first recall module, configured to recall a first target video identifier corresponding to each second interest feature vector; and a second calculation module, configured to calculate the offline recall rate of each interest type based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, wherein the offline recall rate of the interest type is used as the basis for calculating the recall volume of the interest type during the video recall process.
[0030] Optionally, the second calculation module includes: a probability calculation unit, configured to obtain the probability corresponding to each second interest feature vector under the interest type, wherein the probability represents the probability that the second video identifier exists in the first target video identifier corresponding to the second interest feature vector; and a recall calculation unit, configured to calculate the offline recall rate of the interest type based on the probability corresponding to each second interest feature vector under the interest type.
[0031] Optionally, the probability calculation unit is specifically used to determine the probability corresponding to the second interest feature vector as a value of 1 when the second video identifier exists in the first target video identifier; and to determine the probability corresponding to the second interest feature vector as a value of 0 when the second video identifier does not exist in the first target video identifier.
[0032] Optionally, the recall calculation unit is specifically used to calculate the average probability of all second interest feature vectors under the interest type, and use the average value as the offline recall rate of the interest type.
[0033] Optionally, the first description information includes a first historical video identifier of the historical videos viewed by the first sample user and first attribute information of the first sample user; the first processing module is specifically used to input the first description information into the model to be trained; and to perform the following operations in the model to be trained: obtain the first encoded feature vector of the first historical video identifier under each interest type, and the first comprehensive attribute feature vector of the first attribute information; concatenate each of the first encoded feature vectors with the first comprehensive attribute feature vector to obtain a first concatenated feature vector under each interest type; perform feature extraction on the first concatenated feature vector under each interest type to obtain a first interest feature vector of the first sample user under each interest type; and output the first interest feature vector of the first sample user under each interest type.
[0034] Optionally, the judgment module is specifically used to calculate the loss value corresponding to the interest type based on the first similarity corresponding to the target interest feature vector under the interest type; and to determine that the training of the interest type is completed when the loss value meets the preset conditions.
[0035] In a fourth aspect of the present invention, a video recall device is provided, characterized in that it comprises:
[0036] The third acquisition module is used to acquire the third description information of the user to be processed after receiving the recommendation request from the user to be processed;
[0037] The third processing module is used to take the third description information as input to a pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, output by the video recall model; the video recall model is trained by the method described in any of the above items.
[0038] The second recall module is used to recall the second target video identifier corresponding to each of the third interest feature vectors, as the recall result under the interest type to which the third interest feature vector belongs.
[0039] Optionally, the second recall module includes: a recall rate acquisition unit, configured to acquire the offline recall rate of the interest type to which the third interest feature vector belongs from the pre-calculated offline recall rates of each interest type; and a video recall unit, configured to calculate the recall quantity of the interest type to which the third interest feature vector belongs based on the acquired offline recall rate, and recall the second target video identifier corresponding to the third interest feature vector according to the recall quantity.
[0040] In another aspect of the present invention, an electronic device is also provided, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; the memory is used to store computer programs; and the processor is used to implement any of the above-described model training methods or any of the above-described video recall methods when executing the programs stored in the memory.
[0041] In another aspect of the present invention, a computer-readable storage medium is also provided, wherein instructions are stored therein, which, when executed on a computer, cause the computer to implement any of the model training methods described above, or to implement any of the video recall methods described above.
[0042] In another aspect of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to implement any of the model training methods described above, or to implement any of the video recall methods described above.
[0043] The model training, video recall method, apparatus, electronic device, and storage medium provided in this invention, in the trained video recall model, can simultaneously analyze and obtain the first interest feature vector of the first sample user under each interest type based on the first description information of the first sample user. During the training process, for each first sample user, the model outputs the first interest feature vector under which interest type has the highest first similarity with the first video identifier of the video that the first sample user is interested in. This indicates that the first interest feature vector under that interest type can represent the interest of the first sample user. Therefore, the relevant parameters of the interest type are iteratively trained using the first interest feature vector, and finally the trained video recall model is obtained. Therefore, the trained video recall model can simultaneously analyze and obtain the user's interest feature vector under each interest type, and then use the interest feature vector under each interest type to recall videos of each interest type respectively, thereby realizing the simultaneous recall of videos under different interest types of users and improving video recall efficiency. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.
[0045] Figure 1 This is a flowchart illustrating the steps of a model training method in an embodiment of the present invention.
[0046] Figure 2 This is an overall system architecture diagram in an embodiment of the present invention.
[0047] Figure 3 This is a flowchart illustrating the steps of a video recall method according to an embodiment of the present invention.
[0048] Figure 4 This is a flowchart illustrating the steps of another model training method in an embodiment of the present invention.
[0049] Figure 5 This is a flowchart illustrating the steps of another video retrieval method in an embodiment of the present invention.
[0050] Figure 6 This is a structural block diagram of a model training device according to an embodiment of the present invention.
[0051] Figure 7 This is a structural block diagram of a video recall device according to an embodiment of the present invention.
[0052] Figure 8 This is a structural block diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0053] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0054] The methods and apparatuses described in these embodiments can be applied to video recommendation systems.
[0055] It should be noted that all actions to acquire signals, information or data in the embodiments of the present invention are carried out in compliance with the relevant data protection laws and policies of the country where the location is located, and with the authorization granted by the owner of the corresponding device.
[0056] Figure 1 This is a flowchart illustrating the steps of a model training method in an embodiment of the present invention.
[0057] like Figure 1 As shown, the model training method may include the following steps:
[0058] Step 101: Obtain the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in.
[0059] In implementation, historical user data can be obtained from video websites, and relevant data for training samples can be extracted from the historical user data.
[0060] In this embodiment of the invention, when training the video recall model, the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in are obtained, and this information is used as training samples.
[0061] The first descriptive information of the first sample user may include, but is not limited to: the first historical video identifier of the historical videos viewed by the first sample user and the first attribute information of the first sample user. The first historical video identifier represents the identifier of videos that the first sample user has previously viewed. For example, the identifier of videos viewed by the first sample user within the past day could be selected as the first historical video identifier, and so on. The first attribute information of the first sample user may include, but is not limited to: the gender, age, etc. of the first sample user, and the video duration, video type, etc., corresponding to the first historical video identifier of the historical videos viewed by the first sample user.
[0062] The first video identifier for videos that the first sample user is interested in can be the video identifier corresponding to videos whose viewing time exceeds a preset duration. The specific value of the preset duration can be set based on practical experience, and this embodiment of the invention does not impose any restrictions on it. For example, the preset duration can be set to 10 seconds, 12 seconds, 15 seconds, etc.
[0063] Step 102: Use the first description information as input to the model to be trained to obtain the first interest feature vector of the first sample user under each preset interest type, which is output by the model to be trained.
[0064] The model to be trained refers to the video recall model that has not yet been trained. During the model training process, it is necessary to continuously iterate and optimize the relevant parameters in the model to be trained until the model's loss value meets the preset conditions. The following is a detailed explanation.
[0065] The first description information of the first sample user is used as input to the model to be trained. After feature extraction and other analysis processing are performed on the first description information of the first sample user within the model to be trained, the model to be trained can output the first interest feature vector of the first sample user under each preset interest type. For example, the interest types can include, but are not limited to: humor, food, sports, animation, children's, etc.
[0066] In one optional implementation, firstly, the first descriptive information of the first sample user (including the first historical video identifier of the historical videos viewed by the first sample user and the first attribute information of the first sample user) is input into the model to be trained. Then, the following operations are performed in the model to be trained: obtaining the first encoded feature vector of the first historical video identifier of the first sample user under each interest type, and the first comprehensive attribute feature vector of the first attribute information of the first sample user; concatenating each of the first encoded feature vectors with the first comprehensive attribute feature vector to obtain the first concatenated feature vector under each interest type; performing feature extraction on the first concatenated feature vector under each interest type to obtain the first interest feature vector of the first sample user under each interest type. Finally, the model to be trained outputs the first interest feature vector of the first sample user under each interest type.
[0067] Below, in conjunction with Figure 2 Explain the specific processing steps within the model.
[0068] Figure 2 This is an overall system architecture diagram in an embodiment of the present invention. Figure 2 It contains the specific structure of the video recall model.
[0069] like Figure 2 As shown, the video recall model can include a vector layer, an encoder layer, a first concatenation layer, a second concatenation layer, and a neural network (a neural network with H layers in series, where H is greater than or equal to 1). The internal processing of the video recall model can include the following steps (1) to (5):
[0070] (1) Input the first historical video identifiers ID1, ID2, ..., IDn of the n historical videos watched by the first sample user, and the m first attribute information M1, M2, ..., Mm of the first sample user into the vector layer of the model to be trained.
[0071] The vector layer is used to map the input information into vectors. Therefore, in the vector layer, the first identifier feature vector A1 of the first historical video identifier ID1, the first identifier feature vector A2 of ID2, ..., the first identifier feature vector An of IDn are obtained respectively, resulting in a total of n first identifier feature vectors; the first attribute feature vector B1 of the first attribute information M1, the first attribute feature vector B2 of M2, ..., the first attribute feature vector Bm of Mm are obtained respectively, resulting in a total of m first attribute feature vectors.
[0072] For example, the vector layer in the embodiments of the present invention can be an embedding layer.
[0073] (2) Input the first identifier feature vector A1 of ID1, the first identifier feature vector A2 of ID2, ..., the first identifier feature vector An of IDn output by the vector layer into the encoder layer.
[0074] The encoder layer is used to encode the input vector in order to extract deep encoded features. In this embodiment of the invention, k encoders can be set in the encoder layer for k preset interest types. Each encoder corresponds to one interest type and is used to extract the encoded feature vector under that interest type. Therefore, in the encoder layer, the first encoded feature vectors C1, C2, ..., Ck of the first historical video identifier of the first sample user under k interest types can be obtained, resulting in a total of k first encoded feature vectors.
[0075] In one alternative implementation, the k encoders can be arranged sequentially. The input of the first encoder is the first identifier feature vector A1 of ID1, the first identifier feature vector A2 of ID2, ..., the first identifier feature vector An of IDn output by the vector layer. Starting from the second encoder, its input is the output of the previous encoder. Each encoder outputs a first encoded feature vector under an interest type.
[0076] In another alternative implementation, the k encoders can be arranged in parallel. The input of each encoder is the first identifier feature vector A1 of ID1, the first identifier feature vector A2 of ID2, ..., the first identifier feature vector An of IDn, output by the vector layer. Each encoder outputs a first encoded feature vector under an interest type.
[0077] For example, the encoder layer in the embodiments of the present invention can be a transformer-based encoder.
[0078] (3) Input the first attribute feature vector B1 of M1, the first attribute feature vector B2 of M2, ..., the first attribute feature vector Bm of Mm output by the vector layer into the first splicing layer.
[0079] The first concatenation layer is used to concatenate the input vectors. Therefore, in the first concatenation layer, the first attribute feature vector B1 of M1, the first attribute feature vector B2 of M2, ..., the first attribute feature vector Bm of Mm can be concatenated to obtain a first comprehensive attribute feature vector D1 corresponding to the first attribute information of the first sample user.
[0080] (4) Input the first encoded feature vectors C1, C2, ..., Ck of the first historical video identifier of the first sample user output by the encoder layer under k interest types, and the first comprehensive attribute feature vector D1 corresponding to the first attribute information of the first sample user output by the first splicing layer into the second splicing layer.
[0081] The second concatenation layer is used to concatenate the input vectors. Therefore, in the second concatenation layer, the first encoded feature vectors C1, C2, ..., Ck under k interest types can be concatenated with the first comprehensive attribute feature vector D1 to obtain the first concatenated feature vectors E1, E2, ..., Ek under k interest types. Specifically, C1 is concatenated with D1 to obtain E1, C2 with D1 to obtain E2, ..., and Ck with D1 to obtain Ek.
[0082] (5) Input the first splicing feature vectors E1, E2, ..., Ek of the k interest types output by the second splicing layer into the H-layer neural network.
[0083] Neural networks are used to extract features from input vectors. Therefore, in a neural network, features can be extracted from the first concatenated feature vectors E1, E2, ..., Ek under k interest types, resulting in the first interest feature vectors F1, F2, ..., Fk of the first sample user under the k interest types. The output of the video recall model is the first interest feature vectors F1, F2, ..., Fk of the first sample user under the k interest types.
[0084] For example, the neural network in this embodiment of the invention can be a DNN (Deep Neural Networks) or the like. The activation function of the neural network can be a ReLU function or the like.
[0085] Step 103: Calculate the first similarity between each of the first interest feature vectors and the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, so as to obtain the target interest feature vector under each interest type.
[0086] For each interest type, the first sample user receives a first interest feature vector. In this embodiment, the first interest feature vector with the highest similarity to the first video identifier of the video that the first sample user is interested in is selected and used to optimize the network corresponding to the interest type to which the first interest feature vector belongs. Since the selected first interest feature vector has the highest similarity to the first video identifier, the loss value calculated based on the first interest feature vector is the smallest, thereby accelerating the training speed of the model.
[0087] Therefore, in this embodiment of the invention, the first similarity between the first interest feature vector of the first sample user under each interest type and the first video identifier of the video that the first sample user is interested in is calculated respectively. The first interest feature vector with the largest first similarity is taken as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs. The target interest feature vector under each interest type is obtained by calculating multiple first sample users.
[0088] First, obtain the identifier feature vector of the first video identifier of the video that the first sample user is interested in.
[0089] like Figure 2 As shown, the first video identifier ID of the video that the first sample user is interested in is input into the vector layer. In the vector layer, the identifier feature vector A of the first video identifier ID is obtained.
[0090] Then, the first similarity between each first interest feature vector and the identifier feature vector of the first video identifier is calculated.
[0091] like Figure 2 In this process, the first similarity between the first interest feature vector F1 and the first video identifier ID's identifier feature vector A, the first interest feature vector F2 and the first video identifier ID's identifier feature vector A, ..., the first interest feature vector Fk and the first video identifier ID's identifier feature vector A will be calculated respectively.
[0092] For example, the first similarity can be measured using cosine similarity, Euclidean distance, Manhattan distance, Chebyshev distance, Hamming distance, etc.
[0093] Step 104: For each interest type, determine whether the interest type has been trained based on the first similarity corresponding to the target interest feature vector under the interest type.
[0094] After the calculations in step 103 above, multiple target interest feature vectors can exist under each interest type, and each target interest feature vector corresponds to a first similarity. For each interest type, it can be determined whether the interest type has been trained successfully based on the first similarity corresponding to the target interest feature vectors under that interest type.
[0095] In implementation, for each interest type, a loss value corresponding to that interest type can be calculated based on the first similarity corresponding to the target interest feature vector under that interest type. If the loss value meets a preset condition, the training for that interest type is considered complete. If the loss value does not meet the preset condition, the training for that interest type is considered incomplete, and in this case, the parameters corresponding to that interest type in the model can be updated to continue training.
[0096] For example, the loss function can be an absolute value loss function, a logarithmic loss function, a squared loss function, an exponential loss function, a cross-entropy loss function, a sampled softmax loss function, and so on. The preset condition can be set to the loss value being less than a preset threshold, and so on.
[0097] like Figure 2 As shown, during model training, the loss value is calculated using the sampled softmax loss function.
[0098] For each interest type, the process of calculating the loss value corresponding to the interest type using a random negative sampling loss function may include: First, obtaining the third video identifiers of videos that the first sample user is not interested in. If the first video identifiers of videos that the first sample user is interested in are taken as positive samples, and the third video identifiers of videos that the first sample user is not interested in are taken as negative samples, the ratio of positive samples to negative samples can be set to 1:8000, etc., and this embodiment of the invention does not impose any restrictions on this. Then, calculating the second similarity between the target interest feature vector under the interest type and each of the third video identifiers. The calculation method of the second similarity is the same as the calculation method of the first similarity described above, and the specific details can be found in the relevant description of the first similarity above. Finally, based on the first and second similarities corresponding to the target interest feature vector under the interest type, calculating the loss value corresponding to the interest type, specifically using the calculation formula of the Softmax Loss function, which will not be discussed in detail here.
[0099] Step 105: After all the interest types have been trained, the video recall model is obtained.
[0100] In this embodiment of the invention, during training, for each first sample user, the model outputs the first interest feature vector under which interest type has the highest similarity to the first video identifier of the video that the first sample user is interested in. This indicates that the first interest feature vector under that interest type can represent the interests of the first sample user. Therefore, the relevant parameters of that interest type are iteratively trained using this first interest feature vector, ultimately obtaining the trained video retrieval model. In the trained video retrieval model, based on the first description information of the first sample user, the first interest feature vector of the first sample user under each interest type can be analyzed simultaneously, enabling the simultaneous retrieval of videos under multiple interest types.
[0101] Figure 3 This is a flowchart illustrating the steps of a video recall method according to an embodiment of the present invention.
[0102] like Figure 3 As shown, the video recall method may include the following steps:
[0103] Step 301: After receiving the recommendation request from the user to be processed, obtain the third description information of the user to be processed.
[0104] When users watch videos on a video website, they can trigger recommendation requests from pending users through relevant operations. For example, users can click the "Recommend" control on the video playback interface to trigger a recommendation request from a pending user; or, users can perform a "drop-down" operation on the video playback interface to trigger a recommendation request from a pending user. Of course, users can also trigger recommendation requests from pending users in other ways, and this embodiment of the invention does not limit this.
[0105] After receiving a recommendation request from a user to be processed, the recommendation system obtains the user's third description information. This third description information is similar to the first description information of the first sample user mentioned above, and may include, but is not limited to, identifiers of the third historical videos viewed by the user and the user's third attribute information.
[0106] Step 302: Use the third description information as input to the pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, which is output by the video recall model.
[0107] The third description information of the user to be processed is input into the video recall model trained above. After feature extraction and other analysis processing of the third description information of the user to be processed in the video recall model, the video recall model can output the third interest feature vector of the user to be processed under each interest type.
[0108] For the specific processing of the third description information of the user to be processed in the video recall model, please refer to the relevant description of step 102 above. The embodiments of the present invention will not be discussed in detail here.
[0109] Step 303: For each of the third interest feature vectors, recall the second target video identifier corresponding to the third interest feature vector as the recall result under the interest type to which the third interest feature vector belongs.
[0110] For each third interest feature vector, a search is performed in the video identifier pool using that third interest feature vector to retrieve the corresponding second target video identifier. The second target video identifier corresponding to the third interest feature vector is then used as the retrieval result under the interest type to which the third interest feature vector belongs.
[0111] For example, the video identifier pool contains a large number of identifier feature vectors for video identifiers. The third similarity between this third interest feature vector and the identifier feature vectors of each video identifier in the video identifier pool is calculated. The N video identifiers (N ≥ 1) with the highest third similarity are selected as the second target video identifiers corresponding to this third interest feature vector. The calculation method for the third similarity is the same as that for the first similarity; please refer to the description of the first similarity above for details.
[0112] like Figure 2 As shown, the third interest feature vector of the user under each interest type, output by the last layer of the neural network, is used to retrieve the top N video identifiers from the video identifier pool, thus retrieving the first N video identifiers as the retrieval result. For Figure 2 The offline recall calculation part will be described in the following embodiments.
[0113] In this embodiment of the invention, the video recall model can simultaneously analyze and obtain the user's interest feature vectors under each interest type, and then use the interest feature vectors under each interest type to recall videos of each interest type respectively, thereby realizing the simultaneous recall of videos of different interest types of users, improving video recall efficiency, and reducing the overlap of recalled videos between different interest types.
[0114] Figure 4 This is a flowchart illustrating the steps of another model training method in an embodiment of the present invention.
[0115] like Figure 4As shown, the model training method may include the following steps:
[0116] Step 401: Obtain the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in.
[0117] Step 402: Use the first description information as input to the model to be trained to obtain the first interest feature vector of the first sample user under each preset interest type, which is output by the model to be trained.
[0118] Step 403: Calculate the first similarity between each of the first interest feature vectors and the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, so as to obtain the target interest feature vector under each interest type.
[0119] Step 404: For each interest type, determine whether the interest type has been trained based on the first similarity corresponding to the target interest feature vector under the interest type.
[0120] Step 405: After all the interest types have been trained, the video recall model is obtained.
[0121] Steps 401 to 405 are the same as steps 101 to 105 above, and will not be discussed in detail here in the embodiments of the present invention.
[0122] Step 406: Obtain the second description information of the second sample user and the second video identifier of the video that the second sample user is interested in.
[0123] The second description information of the second sample user is similar to the first description information of the first sample user. The second description information of the second sample user may include, but is not limited to: the second historical video identifier of the historical videos watched by the second sample user and the second attribute information of the second sample user.
[0124] The second video identifier for videos that the second sample users are interested in is similar to the first video identifier for videos that the first sample users are interested in. It can be the video identifier for videos that the second sample users watch for more than a preset duration.
[0125] Step 407: Use the second description information as input to the video recall model to obtain the second interest feature vector of the second sample user under each interest type, output by the video recall model.
[0126] The second description information of the second sample user is input into the trained video recall model. After feature extraction and other analysis processing of the second description information of the second sample user in the video recall model, the video recall model can output the second interest feature vector of the second sample user under each interest type.
[0127] For the specific processing of the second description information of the second sample user by the video recall model, please refer to the relevant description of step 102 above. This embodiment of the invention will not be discussed in detail here.
[0128] Step 408: For each second interest feature vector, recall the first target video identifier corresponding to the second interest feature vector.
[0129] For each second interest feature vector, the second interest feature vector is used to search in the video identifier pool, thereby recalling the first target video identifier corresponding to the second interest feature vector.
[0130] For example, the video identifier pool contains a large number of identifier feature vectors for video identifiers. The fourth similarity between the second interest feature vector and the identifier feature vectors of each video identifier in the video identifier pool is calculated. The N video identifiers (N ≥ 1) with the highest fourth similarity are selected as the first target video identifiers corresponding to the second interest feature vector. The calculation method for the fourth similarity is the same as that for the first similarity; please refer to the description of the first similarity above for details.
[0131] like Figure 2 As shown, the second interest feature vector of the second sample user under each interest type is used by the output of the last layer of the neural network to retrieve the first N video identifiers from the video identifier pool, thereby recalling the first target video identifiers corresponding to the second interest feature vectors.
[0132] Step 409: For each interest type, calculate the offline recall rate of the interest type based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type.
[0133] In one optional implementation, the process of calculating the offline recall rate of the interest type based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type may include the following steps a1 to a2:
[0134] Step a1: For each second interest feature vector under the interest type, obtain the probability corresponding to the second interest feature vector.
[0135] Wherein, the probability corresponding to the second interest feature vector represents the probability that there is a second video identifier in the first target video identifier corresponding to the second interest feature vector that is of interest to the second sample user.
[0136] For example, if, among the first target video identifiers corresponding to the second interest feature vector, there exists a second video identifier for a video that the second sample user is interested in, the probability corresponding to the second interest feature vector can be determined to be 1; if, among the first target video identifiers corresponding to the second interest feature vector, there is no second video identifier for a video that the second sample user is interested in, the probability corresponding to the second interest feature vector can be determined to be 0. It is understood that the probability can also be set to other values, such as 0.9 if it exists, and 0.1 if it does not exist, etc., and this embodiment of the invention does not limit this.
[0137] Step a2: Calculate the offline recall rate of the interest type based on the probability corresponding to each second interest feature vector under the interest type.
[0138] After step a1 above, each second interest feature vector yields a corresponding probability. For an interest type, based on the probabilities corresponding to each second interest feature vector under that interest type, the offline recall rate for that interest type can be calculated.
[0139] For example, the average probability of all second interest feature vectors under the interest type can be calculated, and the average value can be used as the offline recall rate of the interest type.
[0140] like Figure 2 As shown, the offline recall rate for each interest type can be calculated using the second interest feature vector of the second sample user output by the last layer of the neural network under each interest type.
[0141] After calculating the offline recall rate for each interest type, the offline recall rate for each interest type can be stored for use in subsequent online recall.
[0142] In this embodiment, after training the video recall model, the model is further used to recall videos from the second sample users. Based on the recall results, the offline recall rate for each interest type is calculated. This offline recall rate is used as the basis for calculating the recall volume for that interest type in the subsequent online video recall process. During the video recall process, for each interest type, the recall volume for that interest type is calculated based on its offline recall rate. Then, videos under that interest type are recalled according to this recall volume. This will be discussed in detail in the following embodiments.
[0143] Figure 5 This is a flowchart illustrating the steps of another video retrieval method in an embodiment of the present invention.
[0144] like Figure 5 As shown, the video recall method may include the following steps:
[0145] Step 501: After receiving the recommendation request from the user to be processed, obtain the third description information of the user to be processed.
[0146] Step 502: Use the third description information as input to the pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, which is output by the video recall model.
[0147] Steps 501 to 502 are the same as steps 301 to 302 above, and will not be discussed in detail here in the embodiments of the present invention.
[0148] Step 503: For each of the third interest feature vectors, obtain the offline recall rate of the interest type to which the third interest feature vector belongs from the pre-calculated offline recall rates of each interest type.
[0149] Step 504: Based on the obtained offline recall rate, calculate the recall volume of the interest type to which the third interest feature vector belongs, and recall the second target video identifier corresponding to the third interest feature vector according to the recall volume, as the recall result under the interest type to which the third interest feature vector belongs.
[0150] The recall of the interest type to which the third interest feature vector belongs is the product of the offline recall rate of the interest type to which the third interest feature vector belongs and the preset total recall.
[0151] For each third interest feature vector, a recall value is calculated, so the second target video identifier corresponding to the third interest feature vector can be recalled according to the respective recall value.
[0152] For example, if the preset total recall is 100, and there are 3 interest types, each interest type corresponds to a third interest feature vector, and the offline recall rates of the 3 interest types are 0.2, 0.3, and 0.5 respectively, then the recall quantities of the 3 interest types are 20, 30, and 50 respectively. Therefore, the 3 third interest feature vectors will recall 20, 30, and 50 videos respectively.
[0153] In this embodiment of the invention, considering the varying strengths of different user interest types, the offline recall rate of each interest type is used as the basis for evaluating the strength of user interest types, ultimately determining the video recall volume for each interest type. A higher offline recall rate for an interest type indicates a stronger user interest in that interest type, and the user is more likely to recall more videos under that interest type, thus resulting in a larger video recall volume for that interest type. Conversely, a lower offline recall rate for an interest type indicates a weaker user interest in that interest type, and the user is more likely to recall fewer videos under that interest type, thus resulting in a smaller video recall volume for that interest type. Therefore, determining the video recall volume for an interest type based on its offline recall rate better meets user needs, thereby improving the effectiveness and accuracy of video recall.
[0154] Figure 6 This is a structural block diagram of a model training device according to an embodiment of the present invention.
[0155] like Figure 6 As shown, the model training device may include the following modules:
[0156] The first acquisition module 601 is used to acquire the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in.
[0157] The first processing module 602 is used to take the first description information as input to the model to be trained and obtain the first interest feature vector of the first sample user under each preset interest type, output by the model to be trained.
[0158] The first calculation module 603 is used to calculate the first similarity between each first interest feature vector and the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, so as to obtain the target interest feature vector under each interest type.
[0159] The judgment module 604 is used to determine, for each interest type, whether the interest type has been trained successfully based on the first similarity corresponding to the target interest feature vector under the interest type.
[0160] The determination module 605 is used to obtain the video recall model after all the interest types have been trained.
[0161] Optionally, the apparatus further includes: a second acquisition module, configured to acquire second description information of a second sample user and a second video identifier of a video that the second sample user is interested in; a second processing module, configured to use the second description information as input to the video recall model to obtain the second interest feature vector of the second sample user under each interest type, output by the video recall model; a first recall module, configured to recall a first target video identifier corresponding to each second interest feature vector; and a second calculation module, configured to calculate the offline recall rate of each interest type based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, wherein the offline recall rate of the interest type is used as the basis for calculating the recall volume of the interest type during the video recall process.
[0162] Optionally, the second calculation module includes: a probability calculation unit, configured to obtain the probability corresponding to each second interest feature vector under the interest type, wherein the probability represents the probability that the second video identifier exists in the first target video identifier corresponding to the second interest feature vector; and a recall calculation unit, configured to calculate the offline recall rate of the interest type based on the probability corresponding to each second interest feature vector under the interest type.
[0163] Optionally, the probability calculation unit is specifically used to determine the probability corresponding to the second interest feature vector as a value of 1 when the second video identifier exists in the first target video identifier; and to determine the probability corresponding to the second interest feature vector as a value of 0 when the second video identifier does not exist in the first target video identifier.
[0164] Optionally, the recall calculation unit is specifically used to calculate the average probability of all second interest feature vectors under the interest type, and use the average value as the offline recall rate of the interest type.
[0165] Optionally, the first description information includes a first historical video identifier of the historical videos viewed by the first sample user and first attribute information of the first sample user; the first processing module 602 is specifically used to input the first description information into the model to be trained; and to perform the following operations in the model to be trained: obtain the first encoded feature vector of the first historical video identifier under each interest type, and the first comprehensive attribute feature vector of the first attribute information; concatenate each of the first encoded feature vectors with the first comprehensive attribute feature vector to obtain a first concatenated feature vector under each interest type; perform feature extraction on the first concatenated feature vector under each interest type to obtain a first interest feature vector of the first sample user under each interest type; and output the first interest feature vector of the first sample user under each interest type.
[0166] Optionally, the judgment module 604 is specifically used to calculate the loss value corresponding to the interest type based on the first similarity corresponding to the target interest feature vector under the interest type; and to determine that the training of the interest type is completed when the loss value meets the preset conditions.
[0167] Figure 7 This is a structural block diagram of a video recall device according to an embodiment of the present invention.
[0168] like Figure 7 As shown, the video recall device may include the following modules:
[0169] The third acquisition module 701 is used to acquire the third description information of the user to be processed after receiving the recommendation request from the user to be processed;
[0170] The third processing module 702 is used to take the third description information as input to a pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, output by the video recall model; the video recall model is trained by the method described in any of the above items.
[0171] The second recall module 703 is used to recall the second target video identifier corresponding to each of the third interest feature vectors, as the recall result under the interest type to which the third interest feature vector belongs.
[0172] Optionally, the second recall module 703 includes: a recall rate acquisition unit, configured to acquire the offline recall rate of the interest type to which the third interest feature vector belongs from the pre-calculated offline recall rates of each interest type; and a video recall unit, configured to calculate the recall quantity of the interest type to which the third interest feature vector belongs based on the acquired offline recall rate, and recall the second target video identifier corresponding to the third interest feature vector according to the recall quantity.
[0173] In this embodiment of the invention, the trained video retrieval model can simultaneously analyze and obtain the first interest feature vectors of the first sample user under each interest type based on the first description information of the first sample user. During training, for each first sample user, the model outputs the first interest feature vector under which interest type has the highest first similarity to the first video identifier of the video that the first sample user is interested in. This indicates that the first interest feature vector under that interest type can represent the interests of the first sample user. Therefore, the relevant parameters of that interest type are iteratively trained using the first interest feature vector, and finally, the trained video retrieval model is obtained. Thus, the trained video retrieval model can simultaneously analyze and obtain the user's interest feature vectors under each interest type, and then use the interest feature vectors under each interest type to recall videos of each interest type, thereby achieving simultaneous retrieval of videos under different interest types of the user and improving video retrieval efficiency.
[0174] This invention also provides an electronic device, such as... Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803, and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.
[0175] Memory 803 is used to store computer programs;
[0176] When processor 801 executes a program stored in memory 803, it can perform the following steps:
[0177] Obtain the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in;
[0178] The first descriptive information is used as the input to the model to be trained to obtain the first interest feature vector of the first sample user under each preset interest type, which is output by the model to be trained.
[0179] Calculate the first similarity between each first interest feature vector and the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, to obtain the target interest feature vector under each interest type.
[0180] For each interest type, based on the first similarity corresponding to the target interest feature vector under the interest type, it is determined whether the interest type has been trained.
[0181] After training is completed for each of the aforementioned interest types, a video recall model is obtained.
[0182] Optionally, the method further includes: obtaining second description information of the second sample user and second video identifiers of videos that the second sample user is interested in; using the second description information as input to the video recall model to obtain the second interest feature vectors of the second sample user under each interest type, output by the video recall model; recalling the first target video identifier corresponding to each second interest feature vector; and calculating the offline recall rate of each interest type based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, wherein the offline recall rate of the interest type is used as the basis for calculating the recall volume of the interest type during the video recall process.
[0183] Optionally, the offline recall rate of the interest type is calculated based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, including: for each second interest feature vector under the interest type, obtaining the probability corresponding to the second interest feature vector, wherein the probability represents the probability that the second video identifier exists in the first target video identifier corresponding to the second interest feature vector; and calculating the offline recall rate of the interest type based on the probability corresponding to each second interest feature vector under the interest type.
[0184] Optionally, obtaining the probability corresponding to the second interest feature vector includes: if the second video identifier exists in the first target video identifier, determining the probability corresponding to the second interest feature vector as a value of 1; if the second video identifier does not exist in the first target video identifier, determining the probability corresponding to the second interest feature vector as a value of 0.
[0185] Optionally, the offline recall rate of the interest type is calculated based on the probability corresponding to each second interest feature vector under the interest type, including: calculating the average value of the probabilities corresponding to all second interest feature vectors under the interest type, and using the average value as the offline recall rate of the interest type.
[0186] Optionally, the first description information includes a first historical video identifier of the historical videos watched by the first sample user and first attribute information of the first sample user; using the first description information as input to the model to be trained to obtain the first interest feature vector of the first sample user under each preset interest type output by the model to be trained includes: inputting the first description information into the model to be trained; performing the following operations in the model to be trained: obtaining the first encoded feature vector of the first historical video identifier under each interest type, and the first comprehensive attribute feature vector of the first attribute information; concatenating each of the first encoded feature vectors with the first comprehensive attribute feature vector to obtain the first concatenated feature vector under each interest type; performing feature extraction on the first concatenated feature vector under each interest type to obtain the first interest feature vector of the first sample user under each interest type; and outputting the first interest feature vector of the first sample user under each interest type.
[0187] Optionally, determining whether the interest type has been trained based on the first similarity corresponding to the target interest feature vector under the interest type includes: calculating the loss value corresponding to the interest type based on the first similarity corresponding to the target interest feature vector under the interest type; and determining that the interest type has been trained if the loss value meets a preset condition.
[0188] When processor 801 executes a program stored in memory 803, it can also perform the following steps:
[0189] Upon receiving a recommendation request from a user to be processed, obtain the third description information of the user to be processed;
[0190] The third description information is used as input to a pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, which is output by the video recall model.
[0191] For each of the third interest feature vectors, the second target video identifier corresponding to the third interest feature vector is recalled as the recall result under the interest type to which the third interest feature vector belongs.
[0192] Optionally, recalling the second target video identifier corresponding to the third interest feature vector includes: obtaining the offline recall rate of the interest type to which the third interest feature vector belongs from the pre-calculated offline recall rates of each interest type; calculating the recall quantity of the interest type to which the third interest feature vector belongs based on the obtained offline recall rate; and recalling the second target video identifier corresponding to the third interest feature vector according to the recall quantity.
[0193] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0194] The communication interface is used for communication between the aforementioned terminal and other devices.
[0195] The memory may include random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0196] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0197] In another embodiment of the present invention, a computer-readable storage medium is also provided, which stores instructions that, when executed on a computer, cause the computer to implement any of the model training methods or video recall methods described in the above embodiments.
[0198] In another embodiment of the present invention, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to implement any of the model training methods or video recall methods described in the above embodiments.
[0199] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0200] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0201] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0202] The above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention are included within the scope of protection of the present invention.
Claims
1. A model training method, characterized in that, include: Obtain the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in; The first descriptive information includes a first historical video identifier of the historical videos viewed by the first sample user and first attribute information of the first sample user; The first descriptive information is used as the input to the model to be trained to obtain the first interest feature vector of the first sample user under each preset interest type, which is output by the model to be trained. Calculate the first similarity between each first interest feature vector and the identifier feature vector of the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, so as to obtain the target interest feature vector under each interest type. For each interest type, based on the first similarity corresponding to the target interest feature vector under the interest type, it is determined whether the interest type has been trained. After training is completed for each of the aforementioned interest types, a video recall model is obtained; Obtain the second description information of the second sample user and the second video identifier of the video that the second sample user is interested in; The second description information is used as the input to the video recall model to obtain the second interest feature vector of the second sample user under each interest type, which is output by the video recall model. For each second interest feature vector, recall the first target video identifier corresponding to the second interest feature vector; For each interest type, based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, the offline recall rate of the interest type is calculated. The offline recall rate of the interest type is used as the basis for calculating the recall volume of the interest type during the video recall process.
2. The method according to claim 1, characterized in that, Based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, the offline recall rate of the interest type is calculated, including: For each second interest feature vector under the interest type, obtain the probability corresponding to the second interest feature vector, where the probability represents the probability that the second video identifier exists in the first target video identifier corresponding to the second interest feature vector; The offline recall rate of the interest type is calculated based on the probability corresponding to each second interest feature vector under the interest type.
3. The method according to claim 2, characterized in that, Obtaining the probability corresponding to the second interest feature vector includes: If the second video identifier exists in the first target video identifier, the probability corresponding to the second interest feature vector is determined to be 1. If the second video identifier is not present in the first target video identifier, the probability corresponding to the second interest feature vector is set to 0.
4. The method according to claim 2, characterized in that, Based on the probabilities corresponding to each second interest feature vector under the aforementioned interest type, the offline recall rate of the interest type is calculated, including: Calculate the average probability of all second interest feature vectors under the interest type, and use the average value as the offline recall rate of the interest type.
5. The method according to claim 1, characterized in that, Using the first descriptive information as input to the model to be trained, the first interest feature vector of the first sample user under each preset interest type is obtained, output by the model to be trained, including: Input the first description information into the model to be trained; The following operations are performed in the model to be trained: obtaining the first encoded feature vector of the first historical video identifier under each of the interest types, and the first comprehensive attribute feature vector of the first attribute information; concatenating each of the first encoded feature vectors with the first comprehensive attribute feature vector to obtain the first concatenated feature vector under each of the interest types; and extracting features from the first concatenated feature vector under each of the interest types to obtain the first interest feature vector of the first sample user under each of the interest types. Output the first interest feature vector of the first sample user under each of the stated interest types.
6. The method according to claim 1, characterized in that, The step of determining whether the interest type has been trained successfully based on the first similarity corresponding to the target interest feature vector under the interest type includes: Based on the first similarity corresponding to the target interest feature vector under the interest type, calculate the loss value corresponding to the interest type; If the loss value meets the preset conditions, the training of the interest type is considered complete.
7. A video recall method, characterized in that, include: Upon receiving a recommendation request from a user to be processed, obtain the third description information of the user to be processed; The third descriptive information is used as input to a pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, which is output by the video recall model; the video recall model is trained by the method described in any one of claims 1 to 6. For each of the third interest feature vectors, the second target video identifier corresponding to the third interest feature vector is recalled as the recall result under the interest type to which the third interest feature vector belongs.
8. The method according to claim 7, characterized in that, Recalling the second target video identifier corresponding to the third interest feature vector includes: From the pre-calculated offline recall rates of each interest type, obtain the offline recall rate of the interest type to which the third interest feature vector belongs; Based on the obtained offline recall rate, the recall volume of the interest type to which the third interest feature vector belongs is calculated, and the second target video identifier corresponding to the third interest feature vector is recalled according to the recall volume.
9. A model training device, characterized in that, include: The first acquisition module is used to acquire the first description information of the first sample user and the first video identifier of the video that the first sample user is interested in. The first descriptive information includes a first historical video identifier of the historical videos viewed by the first sample user and first attribute information of the first sample user; The first processing module is used to take the first description information as input to the model to be trained and obtain the first interest feature vector of the first sample user under each preset interest type, which is output by the model to be trained. The first calculation module is used to calculate the first similarity between each of the first interest feature vectors and the identifier feature vector of the first video identifier, and take the first interest feature vector with the largest first similarity as the target interest feature vector under the interest type to which the first interest feature vector with the largest first similarity belongs, so as to obtain the target interest feature vector under each interest type. The judgment module is used to determine, for each interest type, whether the interest type has been trained successfully based on the first similarity corresponding to the target interest feature vector under the interest type. The determination module is used to obtain the video recall model after all the interest types have been trained; The second acquisition module is used to acquire the second description information of the second sample user and the second video identifier of the video that the second sample user is interested in; The second processing module is used to take the second description information as input to the video recall model to obtain the second interest feature vector of the second sample user under each interest type, which is output by the video recall model; the first recall module is used to recall the first target video identifier corresponding to the second interest feature vector for each second interest feature vector; the second calculation module is used to calculate the offline recall rate of each interest type based on the first target video identifier and the second video identifier corresponding to the second interest feature vector under the interest type, and the offline recall rate of the interest type is used as the basis for calculating the recall volume of the interest type in the video recall process.
10. A video recall device, characterized in that, include: The third acquisition module is used to acquire the third description information of the user to be processed after receiving the recommendation request from the user to be processed; The third processing module is used to take the third description information as input to a pre-trained video recall model to obtain the third interest feature vector of the user to be processed under each preset interest type, output by the video recall model; the video recall model is trained by the method described in any one of claims 1 to 6. The second recall module is used to recall the second target video identifier corresponding to each of the third interest feature vectors, as the recall result under the interest type to which the third interest feature vector belongs.
11. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method as described in any one of claims 1-7.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Resource type determination method and device
CN111814051A
Target type data recall method and device, electronic equipment and storage medium
CN113742580A