Video sorting method, device, electronic device and storage medium in search scenario
The video sorting model handles the playback characteristics of the target video, which solves the problem that traditional methods fail to take into account the differences in videos, and achieves more accurate video sorting and display.
Patent Information
- Application Number
- CN202011321732.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-23
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2040-11-23
AI Technical Summary
Traditional video sorting methods fail to fully take into account the differences in video samples, resulting in inaccurate sorting and presentation results.
The video sorting model is adopted, and the playback characteristics of the target video and input the preset model to sort it. The model is trained and adjusted according to the playback characteristics of the historical video to ensure that the sorting results take into account the differences between video samples.
Improve the accuracy of video sorting and display results, ensuring that the video is accurately displayed to users according to its characteristics.
Smart Images

Figure CN114528435B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of video processing technology, and in particular to a video sorting method, device, electronic device and storage medium in a search scenario. Background Art
[0002] With the rapid progress of modern information transmission technology and the popularization of video receiving devices such as smart phones, video has gradually become one of the main carriers for people to receive information in their daily lives, and various video platforms have sprung up like mushrooms after rain. In video platforms, it is often necessary to display videos corresponding to the search terms according to the search terms entered by the users. When displaying videos corresponding to the search terms to users, it is usually necessary to arrange and display the recalled multiple videos related to the search terms in a certain order, so that users can complete the search more quickly and obtain the desired video content. Traditional video sorting methods usually compare the features of multiple videos related to the search terms according to video features (or playback features, such as video exposure, number of clicks, click-through rate, number of likes, like rate, attention rate or completion rate, etc.), sort the videos according to the results of the comparison, and display the sorted videos to the users.
[0003] However, traditional video sorting methods compare and sort videos indiscriminately without taking into account the differences among samples, resulting in inaccurate video sorting and display results. Summary of the invention
[0004] The present disclosure provides a video sorting method, device, electronic device and storage medium in a search scenario to at least solve the problem of inaccurate video sorting and display results in the related art. The technical solution of the present disclosure is as follows:
[0005] According to a first aspect of an embodiment of the present disclosure, a video sorting method in a search scenario is provided, comprising:
[0006] Obtain a target video set, and obtain a target playback feature corresponding to a target video in the target video set;
[0007] Input the target playback features corresponding to the target video into a preset video sorting model, and output the sorting results of the target videos in the target video set; wherein the video sorting model is obtained by training after adjusting the loss function in model training according to the historical playback features corresponding to the historical videos in the historical video set;
[0008] According to the sorting result, the target videos in the target video set are displayed.
[0009] In an exemplary embodiment, the method for acquiring the target video set includes:
[0010] Get the target search term;
[0011] Videos related to the target search term are acquired to obtain the target video set.
[0012] In an exemplary embodiment, obtaining a target playback feature corresponding to a target video in the target video set includes:
[0013] Obtaining the item playback feature corresponding to the target video in the target video set;
[0014] The project playback features are weighted according to a preset weight vector to obtain target playback features corresponding to the target video.
[0015] In an exemplary embodiment, the item playback feature includes at least one of a click rate, a like rate, a follow rate, or an average playback time corresponding to the target video.
[0016] In an exemplary embodiment, the method for obtaining the video ranking model includes:
[0017] Selecting a sample pair from the historical videos in the historical video set, the sample pair comprising a first historical video and a second historical video;
[0018] According to the historical playback features corresponding to the first historical video and the historical playback features corresponding to the second historical video, a first loss function of the preset initial video sorting model is weighted to obtain a second loss function;
[0019] The initial video ranking model is trained according to the second loss function to obtain the video ranking model.
[0020] In an exemplary embodiment, the first loss function of the preset initial video sorting model is weighted according to the historical playback feature corresponding to the first historical video and the historical playback feature corresponding to the second historical video to obtain the second loss function, including:
[0021] When the display number corresponding to the first historical video is less than or equal to a first preset threshold, or the display number corresponding to the second historical video is less than or equal to a second preset threshold, 1 is determined as the sample weight;
[0022] When the display number corresponding to the first historical video is greater than the first preset threshold, and the display number corresponding to the second historical video is greater than the second preset threshold, a ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight;
[0023] The first loss function is weighted according to the sample weight to obtain the second loss function.
[0024] In an exemplary embodiment, determining the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video as the sample weight includes:
[0025] Acquire a first correlation between the first historical video and a preset historical search term, and acquire a second correlation between the second historical video and the historical search term;
[0026] If the first correlation is greater than the second correlation, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight.
[0027] According to a second aspect of an embodiment of the present disclosure, a video sorting device in a search scenario is provided, including:
[0028] A video set acquisition unit is configured to acquire a target video set and acquire a target playback feature corresponding to a target video in the target video set;
[0029] The video sorting unit is configured to input the target playback feature corresponding to the target video into a preset video sorting model, and output the sorting result of the target video in the target video set; wherein the video sorting model is obtained by training after adjusting the loss function in the model training according to the historical playback features corresponding to the historical videos in the historical video set;
[0030] The video display unit is configured to display the target video in the target video set according to the sorting result.
[0031] In an exemplary embodiment, the video set acquisition unit is further configured to execute:
[0032] Get the target search term;
[0033] Videos related to the target search term are acquired to obtain the target video set.
[0034] In an exemplary embodiment, the video set acquisition unit is further configured to execute:
[0035] Obtaining the item playback feature corresponding to the target video in the target video set;
[0036] The project playback features are weighted according to a preset weight vector to obtain target playback features corresponding to the target video.
[0037] In an exemplary embodiment, the item playback feature includes at least one of a click rate, a like rate, a follow rate, or an average playback time corresponding to the target video.
[0038] In an exemplary embodiment, the video sorting unit is further configured to perform:
[0039] Selecting a sample pair from the historical videos in the historical video set, the sample pair comprising a first historical video and a second historical video;
[0040] According to the historical playback features corresponding to the first historical video and the historical playback features corresponding to the second historical video, a first loss function of the preset initial video sorting model is weighted to obtain a second loss function;
[0041] The initial video ranking model is trained according to the second loss function to obtain the video ranking model.
[0042] In an exemplary embodiment, the video sorting unit is further configured to perform:
[0043] When the display number corresponding to the first historical video is less than or equal to a first preset threshold, or the display number corresponding to the second historical video is less than or equal to a second preset threshold, 1 is determined as the sample weight;
[0044] When the display number corresponding to the first historical video is greater than the first preset threshold, and the display number corresponding to the second historical video is greater than the second preset threshold, a ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight;
[0045] The first loss function is weighted according to the sample weight to obtain the second loss function.
[0046] In an exemplary embodiment, the video sorting unit is further configured to perform:
[0047] Acquire a first correlation between the first historical video and a preset historical search term, and acquire a second correlation between the second historical video and the historical search term;
[0048] If the first correlation is greater than the second correlation, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight.
[0049] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:
[0050] processor;
[0051] a memory for storing instructions executable by the processor;
[0052] The processor is configured to execute the instructions to implement the video sorting method in the search scenario described in any one of the first aspects above.
[0053] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the video sorting method in any search scenario described in the first aspect.
[0054] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, the program product comprising a computer program, the computer program being stored in a readable storage medium, at least one processor of a device reading and executing the computer program from the readable storage medium, so that the device executes the video sorting method in the search scenario described in any one of the embodiments of the first aspect.
[0055] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0056] By obtaining a target video set and a target playback feature corresponding to a target video in the target video set, the target playback feature corresponding to the target video is input into a preset video sorting model, and the sorting result of the target video in the target video set is output, and the target video in the target video set is displayed according to the sorting result. Among them, the video sorting model is trained after adjusting the loss function in the model training according to the historical playback features corresponding to the historical videos in the historical video set. The video sorting method in the search scenario adjusts the loss function in the model training according to the historical video features, so that the trained video sorting model can fully take into account the differences between video samples, accurately display the target videos sorted by the video sorting model, and improve the accuracy of the video sorting and display results.
[0057] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0059] Figure 1 The figure is a flowchart of a video sorting method in a search scenario according to an exemplary embodiment.
[0060] Figure 2 The figure is a flowchart of a method for obtaining a video ranking model according to an exemplary embodiment.
[0061] Figure 3 is a flowchart of an implementable method of step S220 according to an exemplary embodiment.
[0062] Figure 4 is a flowchart of an implementable method of step S222 according to an exemplary embodiment.
[0063] Figure 5 The present invention is a block diagram of a video ranking device in a search scenario according to an exemplary embodiment.
[0064] Figure 6 The invention is a block diagram of an electronic device for sorting videos in a search scenario according to an exemplary embodiment. DETAILED DESCRIPTION
[0065] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0066] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0067] Figure 1 This is a flowchart of a video sorting method in a search scenario according to an exemplary embodiment. This embodiment uses the method applied to an electronic device as an example. It can be understood that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps:
[0068] In step S100, a target video set is obtained, and a target playback feature corresponding to a target video in the target video set is obtained.
[0069] In step S200, the target playback features corresponding to the target video are input into a preset video sorting model, and the sorting results of the target videos in the target video set are output; wherein the video sorting model is obtained by training based on the historical playback features corresponding to the historical videos in the historical video set, by adjusting the loss function in the model training.
[0070] In step S300, the target videos in the target video set are displayed according to the sorting result.
[0071] The target video set is a set of videos that need to be sorted and displayed. The target playback feature refers to the playback feature related to the target video, such as click-through rate, like rate, attention rate or average playback time.
[0072] Specifically, a target video set is obtained, as well as target playback features corresponding to target videos in the target video set, and the target playback features corresponding to the target videos are input into a preset video sorting model. Through the video sorting model, the target videos in the target video set are sorted according to the target playback features corresponding to each target video, the sorting results of the target videos are output, and the target videos in the target video set are displayed according to the sorting results.
[0073] The video sorting model is trained by adjusting the loss function in the model training according to the historical playback features corresponding to the historical videos in the historical video set. The video sorting model adjusts the loss function in the model training according to the historical video features so that the trained video sorting model can fully take into account the differences between video samples. In the process of video sorting, the target videos in the target video set can be sorted according to the target playback features corresponding to each target video.
[0074] The video sorting method in the above search scenario obtains a target video set and a target playback feature corresponding to a target video in the target video set, inputs the target playback feature corresponding to the target video into a preset video sorting model, outputs the sorting result of the target video in the target video set, and displays the target video in the target video set according to the sorting result. Among them, the video sorting model is trained after adjusting the loss function in the model training according to the historical playback features corresponding to the historical videos in the historical video set. The video sorting method in the search scenario adjusts the loss function in the model training according to the historical video features, so that the trained video sorting model can fully take into account the differences between video samples, accurately display the target videos sorted by the video sorting model, and improve the accuracy of the video sorting and display results.
[0075] In an exemplary embodiment, which is an implementable method of step S100, the method of acquiring the target video set includes:
[0076] Obtain a target search term; obtain videos related to the target search term to obtain a target video set.
[0077] Specifically, in a video search scenario, according to the target search term, videos related to the target search term can be recalled. These videos are the videos that need to be sorted and displayed, forming a target video set, which provides boundaries for the subsequent sorting and display of the videos. It can be understood that the above is only a way to obtain the target video set and is not used to limit the target video set. For example, a target video set can also be determined by user ID, video ID, video release area, video release time, etc.
[0078] Optionally, obtaining the target playback features corresponding to the target video in the target video set includes: obtaining the project playback features corresponding to the target video in the target video set; weighting the project playback features according to a preset weight vector to obtain the target playback features corresponding to the target video. Optionally, the project playback features include at least one of the click-through rate, like rate, attention rate or average playback time corresponding to the target video. It is understandable that the above is only an exemplary description of the project playback features and is not used to limit the project playback features. By way of example, the project playback features may also include the number of clicks, the number of likes, the amount of playback, etc.
[0079] The weight vector is a set of weights that can map the project playback features to the target playback features.
[0080] Specifically, for any search term, through its search log, we can count the project playback features of all videos (photo) under the search term (query) within a period of time, such as click-through rate (ctr), like rate (ltr), follow rate (ftr), average playback time, etc. The specific method of obtaining project playback features is shown in formulas (1), (2), (3), and (4):
[0081]
[0082]
[0083]
[0084]
[0085] in, Indicates the click-through rate of the videos found by the query word query. Indicates the like rate of the video found by the query word query. Indicates the attention rate of the videos found by the query word query. It represents the average playing time of the videos found by the query word query, #SHOW represents the number of displays of the videos found by the query word query, #CLICK represents the number of clicks on the videos found by the query word query, click represents a click on the videos found by the query word query, like represents a like on the videos found by the query word query, follow represents a follow on the videos found by the query word query, play_time represents the playing time of the videos found by the query word query, user represents the users found by the query word query, and date represents the time found by the query word query.
[0086] After obtaining the project playback features in the above manner, the project playback features are weighted according to the preset weight vector to obtain the target playback features corresponding to the target video. For example, the target playback features are obtained as shown in formula (5):
[0087]
[0088] in, represents the target playback feature, and α, β, and γ are three hyper-parameters.
[0089] The above exemplary embodiment provides a method for obtaining a target video set, which provides a boundary for the subsequent video sorting and display. And through the project playback characteristics of the target video, the target video characteristics for subsequent video sorting and display are determined, so that the subsequent video sorting model can fully take into account the differences between video samples and accurately display the target videos sorted by the video sorting model, thereby improving the accuracy of the video sorting and display results.
[0090] In an exemplary embodiment, if Figure 2 FIG. 1 is a flowchart of a method for obtaining a video sorting model according to an exemplary embodiment, which specifically includes the following steps:
[0091] In step S210, a sample pair is selected from the historical videos in the historical video set, where the sample pair includes a first historical video and a second historical video.
[0092] In step S220, the first loss function of the preset initial video sorting model is weighted according to the historical playback features corresponding to the first historical video and the historical playback features corresponding to the second historical video to obtain a second loss function.
[0093] In step S230, the initial video ranking model is trained according to the second loss function to obtain a video ranking model.
[0094] The sample pair refers to a sample formed by two videos that need to be sorted. The historical playback feature is the playback feature of the item related to the historical video corresponding to the target playback feature, such as click-through rate, like rate, attention rate or average playback time. In the video sorting process, there are many different sorting schemes, which often involve determining the positional relationship between two different videos. For example, the LTR (Learning to Rank) algorithm can be used for sorting.
[0095] Specifically, a sample pair is selected from the historical videos in the historical video set, the sample pair includes a first historical video and a second historical video, and the first loss function of the preset initial video sorting model is weighted according to the historical playback features corresponding to the first historical video and the historical playback features corresponding to the second historical video to obtain a second loss function, so that the second loss function can include the features of two different video samples, and the weights of the samples are controlled according to the differences of the samples themselves, and the initial video sorting model is trained according to the second loss function to obtain a video sorting model. The trained video sorting model can fully take into account the differences between video samples, and in the process of video sorting, the target videos in the target video set can be sorted according to the target playback features corresponding to each target video.
[0096] In the above exemplary embodiment, a sample pair is selected from the historical videos in the historical video set, and the sample pair includes a first historical video and a second historical video; the first loss function of the preset initial video sorting model is weighted according to the historical playback features corresponding to the first historical video and the historical playback features corresponding to the second historical video to obtain a second loss function; the initial video sorting model is trained according to the second loss function to obtain a video sorting model. Thus, the obtained video sorting model can fully take into account the differences between video samples, and when the model is applied, the target video sorted by the video sorting model can also be accurately displayed, thereby improving the accuracy of video sorting and display results.
[0097] In an exemplary embodiment, if Figure 3 FIG. 1 is a flowchart of an implementable method of step S220 according to an exemplary embodiment, which specifically includes the following steps:
[0098] In step S221, when the display number corresponding to the first historical video is less than or equal to the first preset threshold, or the display number corresponding to the second historical video is less than or equal to the second preset threshold, 1 is determined as the sample weight.
[0099] In step S222, when the display number corresponding to the first historical video is greater than the first preset threshold and the display number corresponding to the second historical video is greater than the second preset threshold, the ratio of the historical playback features corresponding to the first historical video to the historical playback features corresponding to the second historical video is determined as the sample weight.
[0100] In step S223, the first loss function is weighted according to the sample weight to obtain a second loss function.
[0101] The first preset threshold and the second preset threshold are used to define whether the number of video displays is sufficient and whether the number of displays can fully reflect the characteristics of the video. For example, when the number of displays of a video is 1, 5, 20 or other relatively small values, the click rate, like rate, attention rate or average playback time of the video cannot fully reflect the playback characteristics of the video. Therefore, the first preset threshold and the second preset threshold can be set to 1000, 10000, 10000 or more, and the first preset threshold and the second preset threshold can be the same or different.
[0102] Specifically, when the number of displays corresponding to the first historical video is less than or equal to the first preset threshold, or the number of displays corresponding to the second historical video is less than or equal to the second preset threshold, it means that the influence of the sample video on the training is unclear. Therefore, the sample weight is not adjusted, and 1 is determined as the sample weight. When the number of displays corresponding to the first historical video is greater than the first preset threshold, and the number of displays corresponding to the second historical video is greater than the second preset threshold, it means that the sample video can have a greater impact on the training result. Therefore, in order to enable the trained video sorting model to output a more accurate video sorting result, the sample weight needs to be adjusted. At this time, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight. After obtaining the sample adjusted weight, the first loss function is weighted according to the sample weight to obtain the second loss function. The model is trained using the second loss function and the historical video set to obtain the corresponding video sorting model.
[0103] In the above exemplary embodiment, when the display times corresponding to the first historical video is less than or equal to the first preset threshold, or the display times corresponding to the second historical video is less than or equal to the second preset threshold, 1 is determined as the sample weight; when the display times corresponding to the first historical video is greater than the first preset threshold, and the display times corresponding to the second historical video is greater than the second preset threshold, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight, and the first loss function is weighted according to the sample weight to obtain the second loss function. The second loss function can fully take into account the differences between video samples, and the video sorting model trained by the second loss function can accurately display the target video sorted by the video sorting model, thereby improving the accuracy of the video sorting and display results.
[0104] In an exemplary embodiment, if Figure 4 FIG. 2 is a flowchart of an implementable method of step S222, which specifically includes the following steps:
[0105] In step S2221, a first correlation between the first historical video and a preset historical search term is obtained, and a second correlation between the second historical video and the historical search term is obtained.
[0106] In step S2222, if the first correlation is greater than the second correlation, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight.
[0107] Specifically, after determining the first correlation between the first historical video and the preset historical search term, and obtaining the second correlation between the second historical video and the historical search term, different sample weights can be determined according to the correlation to enhance the sample sorting accuracy, or reduce the sample sorting accuracy. For example, for a historical video set, during the training process, two samples, the first historical video i and the second historical video j, are randomly selected according to the labeled data. i >Second relevance ranklabel j , that is, the correlation i>j. For samples i and j, their corresponding historical playback features are engagement i and engagement j , then the sample weight of the obtained sample pair is shown in formula (6):
[0108]
[0109] Here, δ is the display threshold (the first preset threshold or the second preset threshold) corresponding to samples i and j. In this way, it can be ensured that samples i and j will generate confident posterior historical playback features only under sufficient posterior conditions.
[0110] It should be noted that when the first relevance ranklabel i >Second relevance ranklabel j When , the above sample weight is The accuracy of sample sorting can be enhanced. For some special purposes, the sample weight can also be set to The inverse of is used to reduce the sorting accuracy of samples and make the video sorting more diverse.
[0111] In the above exemplary embodiment, by obtaining the first correlation between the first historical video and the preset historical search term, and obtaining the second correlation between the second historical video and the historical search term, when the first correlation is greater than the second correlation, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight. The second loss function adjusted by the sample weight can fully take into account the differences between video samples, and the video sorting model trained by the second loss function can accurately display the target video sorted by the video sorting model, thereby improving the accuracy of the video sorting and display results.
[0112] It should be understood that although Figure 1-4 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-4 At least part of the steps may include multiple steps or multiple stages. These steps or stages are not necessarily performed at the same time, but can be performed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed in turn or alternately with other steps or at least part of the steps or stages in other steps.
[0113] Figure 5 is a block diagram of a video ranking device in a search scenario according to an exemplary embodiment. Figure 5 , the device includes a video set acquisition unit 501, a video sorting unit 502 and a video display unit 503:
[0114] The video set acquisition unit 501 is configured to acquire a target video set and acquire a target playback feature corresponding to a target video in the target video set;
[0115] The video sorting unit 502 is configured to input the target playback feature corresponding to the target video into a preset video sorting model, and output the sorting result of the target video in the target video set; wherein the video sorting model is obtained by training after adjusting the loss function in the model training according to the historical playback features corresponding to the historical videos in the historical video set;
[0116] The video display unit 503 is configured to display the target video in the target video set according to the sorting result.
[0117] In an exemplary embodiment, the video set acquisition unit 501 is further configured to execute: acquiring a target search term; acquiring videos related to the target search term to obtain a target video set.
[0118] In an exemplary embodiment, the video set acquisition unit 501 is further configured to execute: acquiring the item playback feature corresponding to the target video in the target video set; weighting the item playback feature according to a preset weight vector to obtain the target playback feature corresponding to the target video.
[0119] In an exemplary embodiment, the item playback feature includes at least one of a click rate, a like rate, a follow rate, or an average playback time of the target video.
[0120] In an exemplary embodiment, the video sorting unit 502 is further configured to perform: selecting a sample pair from historical videos in a historical video set, the sample pair comprising a first historical video and a second historical video; weighting a first loss function of a preset initial video sorting model according to historical playback features corresponding to the first historical video and historical playback features corresponding to the second historical video to obtain a second loss function; and training the initial video sorting model according to the second loss function to obtain a video sorting model.
[0121] In an exemplary embodiment, the video sorting unit 502 is also configured to perform: when the number of displays corresponding to the first historical video is less than or equal to a first preset threshold, or the number of displays corresponding to the second historical video is less than or equal to a second preset threshold, 1 is determined as the sample weight; when the number of displays corresponding to the first historical video is greater than the first preset threshold, and the number of displays corresponding to the second historical video is greater than the second preset threshold, the ratio of the historical playback features corresponding to the first historical video to the historical playback features corresponding to the second historical video is determined as the sample weight; according to the sample weight, the first loss function is weighted to obtain the second loss function.
[0122] In an exemplary embodiment, the video sorting unit 502 is also configured to perform: obtaining a first correlation between a first historical video and a preset historical search term, and obtaining a second correlation between a second historical video and the historical search term; if the first correlation is greater than the second correlation, then the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight.
[0123] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0124] Figure 6 1 is a block diagram of an electronic device 600 for video sorting in a search scenario according to an exemplary embodiment. For example, the device 600 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0125] Reference Figure 6 , device 600 may include one or more of the following components: a processing component 602 , a memory 604 , a power component 606 , a multimedia component 608 , an audio component 610 , an input / output (I / O) interface 612 , a sensor component 614 , and a communication component 616 .
[0126] The processing component 602 generally controls the overall operation of the device 600, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 602 may include one or more processors 620 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 602 may include one or more modules to facilitate the interaction between the processing component 602 and other components. For example, the processing component 602 may include a multimedia module to facilitate the interaction between the multimedia component 608 and the processing component 602.
[0127] The memory 604 is configured to store various types of data to support operations on the device 600. Examples of such data include instructions for any application or method operating on the device 600, contact data, phone book data, messages, pictures, videos, etc. The memory 604 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk.
[0128] The power supply component 606 provides power to the various components of the device 600. The power supply component 606 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 600.
[0129] The multimedia component 608 includes a screen that provides an output interface between the device 600 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 608 includes a front camera and / or a rear camera. When the device 600 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0130] The audio component 610 is configured to output and / or input audio signals. For example, the audio component 610 includes a microphone (MIC), and when the device 600 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 604 or sent via the communication component 616. In some embodiments, the audio component 610 also includes a speaker for outputting audio signals.
[0131] I / O interface 612 provides an interface between processing component 602 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0132] The sensor assembly 614 includes one or more sensors for providing various aspects of status assessment for the device 600. For example, the sensor assembly 614 can detect the open / closed state of the device 600, the relative positioning of components, such as the display and keypad of the device 600, and the sensor assembly 614 can also detect the position change of the device 600 or a component of the device 600, the presence or absence of user contact with the device 600, the orientation or acceleration / deceleration of the device 600, and the temperature change of the device 600. The sensor assembly 614 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 614 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 614 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0133] The communication component 616 is configured to facilitate wired or wireless communication between the device 600 and other devices. The device 600 can access a wireless network based on a communication standard, such as WiFi, a carrier network (such as 2G, 3G, 4G or 6G), or a combination thereof. In an exemplary embodiment, the communication component 616 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 616 also includes a near field communication (NFC) module to facilitate short-range communication.
[0134] In an exemplary embodiment, the device 600 may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0135] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 604 including instructions, and the instructions can be executed by a processor 620 of the device 600 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0136] In an exemplary embodiment, a computer program product is also provided, the program product comprising a computer program, the computer program being stored in a readable storage medium, at least one processor 620 of the device reading and executing the computer program from the readable storage medium, so that the device performs the above method.
[0137] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0138] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A video sorting method in a search scenario, characterized in that: include: Obtain a target video set, and obtain target playback features corresponding to target videos in the target video set, where the target playback features are playback features related to the target video, including at least click-through rate, like rate, attention rate, and average playback time; Inputting the target playback features corresponding to the target video into a preset video sorting model, and outputting the sorting results of the target videos in the target video set; According to the sorting result, display the target video in the target video set; The method for obtaining the video sorting model includes: Selecting a sample pair from historical videos in a historical video set, the sample pair comprising a first historical video and a second historical video; According to the historical playback features corresponding to the first historical video and the historical playback features corresponding to the second historical video, a first loss function of the preset initial video sorting model is weighted to obtain a second loss function; The initial video ranking model is trained according to the second loss function to obtain the video ranking model.
2. The video sorting method in the search scenario according to claim 1, characterized in that: The method for obtaining the target video set includes: Get the target search term; Videos related to the target search term are acquired to obtain the target video set.
3. The video sorting method in the search scenario according to claim 1, characterized in that: The obtaining of the target playback feature corresponding to the target video in the target video set includes: Obtaining the item playback feature corresponding to the target video in the target video set; The project playback features are weighted according to a preset weight vector to obtain target playback features corresponding to the target video.
4. The video sorting method in the search scenario according to claim 3, characterized in that: The item playback feature includes at least one of a click rate, a like rate, a follow rate, or an average playback time corresponding to the target video.
5. The video sorting method in a search scenario according to claim 1, characterized in that: The step of weighting the first loss function of the preset initial video sorting model according to the historical playback feature corresponding to the first historical video and the historical playback feature corresponding to the second historical video to obtain the second loss function includes: When the display number corresponding to the first historical video is less than or equal to a first preset threshold, or the display number corresponding to the second historical video is less than or equal to a second preset threshold, 1 is determined as the sample weight; When the display number corresponding to the first historical video is greater than the first preset threshold, and the display number corresponding to the second historical video is greater than the second preset threshold, a ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight; The first loss function is weighted according to the sample weight to obtain the second loss function.
6. The video sorting method in the search scenario according to claim 5, characterized in that: The step of determining the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video as the sample weight includes: Acquire a first correlation between the first historical video and a preset historical search term, and acquire a second correlation between the second historical video and the historical search term; If the first correlation is greater than the second correlation, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight.
7. A video sorting device in a search scenario, characterized in that: include: A video set acquisition unit is configured to acquire a target video set and acquire a target playback feature corresponding to a target video in the target video set, wherein the target playback feature is a playback feature related to the target video, including at least a click-through rate, a like rate, a follow rate, and an average playback time; A video sorting unit, configured to input the target playback feature corresponding to the target video into a preset video sorting model, and output a sorting result of the target video in the target video set; Selecting a sample pair from historical videos in a historical video set, the sample pair comprising a first historical video and a second historical video; According to the historical playback features corresponding to the first historical video and the historical playback features corresponding to the second historical video, a first loss function of the preset initial video sorting model is weighted to obtain a second loss function; According to the second loss function, the initial video ranking model is trained to obtain the video ranking model; The video display unit is configured to display the target video in the target video set according to the sorting result.
8. The video sorting device in the search scenario according to claim 7, characterized in that: The video set acquisition unit is further configured to execute: Get the target search term; Videos related to the target search term are acquired to obtain the target video set.
9. The video sorting device in a search scenario according to claim 7, characterized in that: The video set acquisition unit is further configured to execute: Obtaining the item playback feature corresponding to the target video in the target video set; The project playback features are weighted according to a preset weight vector to obtain target playback features corresponding to the target video.
10. The video sorting device in the search scenario according to claim 9, characterized in that: The item playback feature includes at least one of a click rate, a like rate, a follow rate, or an average playback time corresponding to the target video.
11. The video sorting device in a search scenario according to claim 7, characterized in that: The video sorting unit is further configured to perform: When the display number corresponding to the first historical video is less than or equal to a first preset threshold, or the display number corresponding to the second historical video is less than or equal to a second preset threshold, 1 is determined as the sample weight; When the display number corresponding to the first historical video is greater than the first preset threshold, and the display number corresponding to the second historical video is greater than the second preset threshold, a ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight; The first loss function is weighted according to the sample weight to obtain the second loss function.
12. The video sorting device in a search scenario according to claim 11, characterized in that: The video sorting unit is further configured to perform: Acquire a first correlation between the first historical video and a preset historical search term, and acquire a second correlation between the second historical video and the historical search term; If the first correlation is greater than the second correlation, the ratio of the historical playback feature corresponding to the first historical video to the historical playback feature corresponding to the second historical video is determined as the sample weight.
13. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the video sorting method in the search scenario as described in any one of claims 1 to 6.
14. A storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the video ranking method in a search scenario as described in any one of claims 1 to 6.
