A video recommendation method and device, electronic equipment and storage medium
By acquiring video clips and users' historical browsing data to calculate interest levels, the system recommends video clips with high interest levels, solving the problem of inaccurate video recommendations in existing technologies and improving the effectiveness of recommendations and user experience.
Patent Information
- Application Number
- CN202210546917.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-18
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2042-05-18
AI Technical Summary
In existing technologies, clients cannot specifically recommend video clips that users are interested in, resulting in low effectiveness of video recommendations.
By obtaining the video tags of video clips and the video tags and browsing counts of video clips viewed in the target user's history, the system calculates the user's level of interest in the video clips and recommends the video clips with the highest level of interest.
This improves the targeting and effectiveness of video recommendations, ensuring that video clips of high interest to users are recommended, thus enhancing the user experience.
Smart Images

Figure CN114925233B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of computer, in particular to a video recommendation method and device, electronic equipment and storage medium. BACKGROUND
[0002] With the rapid development of computer technology, the functions provided by the client for users are also more and more, for example, users can watch videos through the client. Because the client provides more videos for users, it is difficult for users to quickly select the video they are interested in from a large number of videos. Therefore, the client can recommend videos that the user may be interested in to the user.
[0003] When the client recommends videos to the user, for a video with a long time (which can be referred to as an original video), the client can also recommend a video clip contained in the original video to the user. In related technologies, the client recommends a video clip of the first n minutes (for example, the first 5 minutes) in the original video to the user.
[0004] However, the video clip of the first n minutes in the original video may not be the video clip that the user is interested in. It can be seen that the related technologies cannot specifically recommend videos to users, resulting in low effectiveness of video recommendation. SUMMARY
[0005] The purpose of the embodiments of the present application is to provide a video recommendation method, device, electronic equipment and storage medium to improve the effectiveness of video recommendation. The specific technical solutions are as follows:
[0006] In the first aspect of the present application, a video recommendation method is first provided, and the method comprises:
[0007] For each video clip contained in the original video, a video tag of the video clip is obtained as a first video tag;
[0008] Obtain the video tags of each historical video clip browsed by the target user in the historical time period as second video tags;
[0009] For each second video tag, the number of times that the target user browses the historical video clip to which the second video tag belongs is obtained as a first browsing number;
[0010] For each first video tag, the label interest degree of the target user to the first video tag is determined according to the first browsing number corresponding to the second video tag which is the same as the first video tag;
[0011] For each video clip contained in the original video, the video interest degree of the target user to the video clip is determined based on the label interest degrees of the target user to each first video tag of the video clip.
[0012] The video recommendation method further includes determining a video segment to be recommended from the video segments included in the original video, wherein the video interest degree corresponding to the video segment to be recommended is greater than the video interest degrees corresponding to other video segments in the video segments.
[0013] In a second aspect of the embodiments of the present application, a video recommendation device is further provided, and the device includes:
[0014] A first obtaining module is configured to obtain, for each video segment included in an original video, a video tag of the video segment as a first video tag.
[0015] A second obtaining module is configured to obtain, as second video tags, video tags of each historical video segment browsed by a target user in a historical time period.
[0016] A third obtaining module is configured to obtain, for each second video tag, a number of times that the target user browses a historical video segment to which the second video tag belongs as a first browsing number.
[0017] A first determining module is configured to determine, for each first video tag, a tag interest degree of the target user for the first video tag according to the first browsing numbers corresponding to the second video tags identical to the first video tag.
[0018] A second determining module is configured to determine, for each video segment included in the original video, a video interest degree of the target user for the video segment based on the tag interest degrees of the target user for the first video tags of the video segment.
[0019] A third determining module is configured to determine a video segment to be recommended from the video segments included in the original video, wherein the video interest degree corresponding to the video segment to be recommended is greater than the video interest degrees corresponding to other video segments in the video segments.
[0020] In still another aspect of the embodiments of the present application, an electronic device is further provided, and the device includes at least one processor; and
[0021] A memory connected in communication with the at least one processor; wherein
[0022] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the video recommendation method described above.
[0023] In yet another aspect of the embodiments of the present application, a non-transitory computer-readable storage medium storing computer instructions is also provided, where the computer instructions are used to cause the computer to perform the video recommendation method described above.
[0024] In yet another aspect of the embodiments of the present application, a computer program product is also provided, which comprises a computer program, where the computer program, when executed by a processor, implements the video recommendation method described above.
[0025] The video recommendation method provided by the embodiments of the present application comprises the following steps: obtaining, for each video segment contained in an original video, a video tag of the video segment as a first video tag; obtaining video tags of each historical video segment browsed by a target user in a historical time period as second video tags; obtaining, for each second video tag, a browsing frequency of the historical video segment browsed by the target user as a first browsing frequency; determining, for each first video tag, a tag interest degree of the target user to the first video tag according to the first browsing frequency corresponding to the second video tag which is the same as the first video tag; determining, for each video segment contained in the original video, a video interest degree of the target user to the video segment based on the tag interest degrees of the target user to each first video tag of the video segment; and determining a to-be-recommended video segment from each video segment contained in the original video, where the video interest degree corresponding to the to-be-recommended video segment is greater than the video interest degrees corresponding to other video segments.
[0026] Based on the above processing, the second video tag of a historical video segment can represent the video feature of the historical video segment, and the first browsing frequency corresponding to a second video tag can represent the interest degree of the target user to the second video tag. Accordingly, for each video segment contained in the original video, the video interest degree of the target user to the video segment can be determined based on the first browsing frequencies corresponding to the second video tags which are the same as the first video tags of the video segment, and then the to-be-recommended video segment determined based on the video interest degrees of the target user to each video segment contained in the original video is a video segment with a higher corresponding video interest degree, that is, the corresponding video segment with a higher video interest degree in the original video can be recommended to the target user, and the effectiveness of the video recommendation can be improved. BRIEF DESCRIPTION OF DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or prior art description will be briefly introduced as follows.
[0028] Figure 1 A flowchart of the video recommendation method provided in the embodiments of the present application;
[0029] Figure 2 A flowchart of another video recommendation method provided in an embodiment of the present invention;
[0030] Figure 3 A flowchart of another video recommendation method provided in an embodiment of the present invention;
[0031] Figure 4 A flowchart of another video recommendation method provided in an embodiment of the present invention;
[0032] Figure 5 A flowchart of another video recommendation method provided in an embodiment of the present invention;
[0033] Figure 6 A flowchart of another video recommendation method provided in an embodiment of the present invention;
[0034] Figure 7 This is a flowchart of a method for determining video tags provided in an embodiment of the present invention;
[0035] Figure 8 This is a structural diagram of a video recommendation device provided in an embodiment of the present invention;
[0036] Figure 9 This is a structural diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0037] The technical solutions of the present invention will now be described with reference to the accompanying drawings in the embodiments of the present invention.
[0038] In related technologies, the client recommends video clips from the first n minutes of the original video to the user. However, these first n minutes may not be video clips that the user is interested in. Therefore, these technologies cannot provide targeted video recommendations to users, resulting in low effectiveness.
[0039] To solve the above problem, see Figure 1 , Figure 1 This is a flowchart illustrating a video recommendation method provided in an embodiment of the present invention. The method is applied to an electronic device, which can be a client, or an app (application) for playing videos. When recommending video clips to a user, the client can directly display the recommended video clip. Alternatively, it can be a server, or the server corresponding to the app for playing videos. When recommending video clips to a user, the server can send the recommended video clip to the client, causing the client to display the recommended video clip.
[0040] The method may include the following steps:
[0041] S101: For each video clip contained in the original video, obtain the video tag of the video clip as a first video tag.
[0042] S102: Obtain the video tags of each historical video clip browsed by the target user in the historical time period as second video tags.
[0043] S103: For each second video tag, obtain the number of times the target user browses the historical video clip to which the second video tag belongs as a first browsing number.
[0044] S104: For each first video tag, determine the label interest degree of the target user for the first video tag according to the first browsing number corresponding to the second video tag which is the same as the first video tag.
[0045] S105: For each video clip contained in the original video, determine the video interest degree of the target user for the video clip based on the label interest degrees of the target user for each first video tag of the video clip.
[0046] S106: Determine the to-be-recommended video clip from each video clip contained in the original video. The video interest degree corresponding to the to-be-recommended video clip is greater than the video interest degrees corresponding to other video clips in each video clip.
[0047] Based on the above processing, the second video tag of a historical video clip can represent the video feature of the historical video clip, and the first browsing number corresponding to a second video tag can represent the interest degree of the target user for the second video tag. Accordingly, for each video clip contained in the original video, the video interest degree of the target user for the video clip can be determined based on the first browsing number corresponding to the second video tag which is the same as the first video tag of the video clip, and the to-be-recommended video clip determined based on the video interest degrees of the target user for each video clip contained in the original video is the video clip with a higher video interest degree, that is, the corresponding video clip with a higher video interest degree in the original video can be recommended to the target user, which can improve the effectiveness of video recommendation.
[0048] For step S101, the electronic device can recommend a video to the user. When the electronic device needs to recommend a video (i.e., the original video) to the user, the original video can be divided to obtain multiple video clips, and the to-be-recommended video clip recommended to the user can be determined from each video clip contained in the original video based on the method provided in the embodiment of the application, and the to-be-recommended video clip is displayed.
[0049] For example, for a movie with a long duration, the electronic device can determine video segments that are likely to be of interest to the user (i.e., to-be-recommended video segments) from each video segment included in the movie based on the method provided in the embodiments of the present application, and recommend the to-be-recommended video segments to the user.
[0050] The electronic device can divide the original video in the following manner to obtain the plurality of video segments.
[0051] Manner one:
[0052] The electronic device can divide the original video in the first preset time length to obtain the plurality of video segments. The first preset time length can be set by a technician according to experience, for example, the first preset time length can be 3 minutes, or the first preset time length can also be 5 minutes, but is not limited thereto.
[0053] Manner two:
[0054] When the original video includes a plot, directly dividing the original video in the first preset time length can result in video segments that include incomplete plots, and recommending the video segments that include incomplete plots to the user can reduce user experience. Accordingly, in order to determine video segments that include complete plots, the original video can be divided according to objects included in the original video, for example, characters in the original video.
[0055] In an embodiment of the present application, on the basis of Figure 1 , see Figure 2 Before step S101, the method can further include the following steps:
[0056] S107: Obtain the original video and perform frame processing on the original video to obtain each video frame included in the original video.
[0057] S108: For each object included in the original video, determine, from each video frame included in the original video, a video frame that includes the object as a first video frame, and determine a video segment that includes the object based on each first video frame that includes the object.
[0058] The electronic device can first obtain the original video that needs to be divided, and perform frame processing on the original video to obtain each video frame included in the original video. Then, for each video frame, the electronic device can perform image recognition on the video frame to obtain a plurality of objects included in the video frame. The objects in a video frame can be at least one of characters, animals, and scenes included in the video frame.
[0059] Then, for each object in the original video, the electronic device can determine, from each video frame included in the original video, a video frame (i.e., a first video frame) that includes the object. Furthermore, the electronic device can take a plurality of consecutive first video frames that include the object as a video clip, and can obtain a plurality of video clips that include the object.
[0060] Based on the above processing, for the original video that includes a plot, the plot in the original video is connected by the objects in the original video, and therefore, a plurality of consecutive first video frames that include the same object can be a complete plot. Determining the plurality of consecutive first video frames that include the same object as a video clip can determine a video clip that includes a complete plot, and subsequently, the video clip that includes a complete plot is recommended to the user, which can improve user experience.
[0061] Method three:
[0062] When the original video includes a plot, the plot in the original video is connected by the objects in the original video. Considering the transition of scenes and roles in the original video, a discontinuous first video frame can also belong to the same plot as a consecutive first video frame. Directly determining a plurality of consecutive first video frames that include the same object as a video clip can miss a first video frame that belongs to the same plot but is not consecutive, resulting in a video clip that includes an incomplete plot. Recommending the video clip that includes an incomplete plot to the user can reduce user experience. Accordingly, to determine a video clip that includes a complete plot, the original video can be divided based on a time difference between first video frames that include the same object.
[0063] In an embodiment of the present application, on the basis of Figure 2 , referring to Figure 3 , step S108 can include the following steps:
[0064] S1081: For each object included in the original video, determining, from each video frame included in the original video, a video frame that includes the object as a first video frame, and determining a first video frame set from each first video frame.
[0065] The first video frame set includes a candidate video frame; the candidate video frame includes a first first video frame, and a video frame between each first video frame and a previous video frame with a time difference greater than a first preset threshold.
[0066] S1082: Determining a second video frame set from each first video frame.
[0067] The time difference between each video frame and the previous video frame in the first video frames is not greater than a first preset threshold, and the time difference between each video frame and the next video frame in the first video frames is greater than the first preset threshold.
[0068] S1083: Determine an ending video frame of a video clip containing the object from the second video frame set.
[0069] The time difference between the ending video frame and the previous candidate video frame in the first video frames is not less than a second preset threshold.
[0070] S1084: Determine a previous candidate video frame of each ending video frame from the first video frame set in order of the first video frames, to obtain a starting video frame of the video clip containing the object corresponding to the ending video frame.
[0071] S1085: Determine a video clip from each starting video frame to the corresponding ending video frame to obtain a video clip containing the object.
[0072] The first preset threshold and the second preset threshold can be set by the technician according to experience.
[0073] After determining the first video frames containing the same object in the original video, the electronic device can also determine the video frame that is likely to be the starting video frame of the plot containing the same object based on the time difference between the first video frames.
[0074] In the original video, the time interval between each plot containing the same object is relatively long, that is, the time difference between the starting video of one plot and the ending video frame (i.e., the previous first video frame) of the previous plot is relatively large.
[0075] Correspondingly, the electronic device can determine the video frame from the first video frames, which has a time difference greater than the first preset threshold with the previous first video frame, and the determined video frame is likely to be the starting video frame of each plot containing the object. Since there is no other first video frame before the first first video frame, the first video frame is the starting video frame of the first plot containing the object. Therefore, the electronic device can determine the first video frame from each first video frame, and the video frame having a time difference greater than the first preset threshold with the previous first video frame, to obtain a video frame set (i.e., the first video frame set) that is likely to be the starting video frame of each plot containing the object.
[0076] Then, the electronic device can also determine a video frame set (i.e., the second video frame set) that is likely to be the ending video frame of each plot containing the object from the first video frames.
[0077] The time interval between each story involving the same object in the original video is long, that is, the time difference between the end video frame of one story and the start video frame of the next story (i.e., the next first video frame) is large, and the time difference between the end video frame of one story and the adjacent video frame in the story (i.e., the previous first video frame) is small.
[0078] Correspondingly, the electronic device can determine, from the first video frames, a set of video frames whose time difference with the previous first video frame is not greater than the first preset threshold and whose time difference with the next first video frame is greater than the first preset threshold, to obtain a set of video frames that are likely to be the end video frames of each story involving the object (i.e., a second set of video frames). For the last first video frame in the first video frames, if the time difference between the last first video frame and the previous first video frame is not greater than the first preset threshold, the last first video frame can also be determined as a video frame in the second set of video frames.
[0079] In the original video, the story involving the same object lasts for a long time, and if the time difference between an end video frame and a start video frame is small, the video frames between the end video frame and the start video frame are likely not one story. Therefore, the electronic device can determine, from the second set of video frames, a video frame whose time difference with the previous candidate video frame (i.e., a video frame in the first set of video frames) is not less than a second preset threshold, to obtain the end video frame of each story involving the object.
[0080] For each end video frame, the electronic device can determine, from the first set of video frames, the previous candidate video frame of the end video frame in the order of the first video frames, to obtain the start video frame of the video segment involving the object corresponding to the end video frame.
[0081] Further, the electronic device can determine the video segment from each start video frame to the corresponding end video frame to obtain one story involving the object, i.e., one video segment involving the object.
[0082] For example, referring to FIG. 1, the original video includes a first story involving the object A and a second story involving the object A. The first story includes a first video segment involving the object A and a second video segment involving the object A. The second story includes a third video segment involving the object A and a fourth video segment involving the object A. Figure 4 , Figure 4Each small square represents 1 ms, and the first video frames containing the same object include: video frame A, video frame B, video frame C, video frame D, video frame E, video frame F and video frame G. Video frame A is the first first video frame. Correspondingly, the time difference between video frame A and video frame B is 1 ms, the time difference between video frame B and video frame C is 2 ms, the time difference between video frame C and video frame D is 4 ms, the time difference between video frame D and video frame E is 2 ms, the time difference between video frame E and video frame F is 4 ms, and the time difference between video frame F and video frame G is 2 ms.
[0083] If the first preset threshold is 3 ms, the first video frame set determined by the electronic device includes video frame A, video frame D and video frame F, that is, video frame A, video frame D and video frame F are the candidate video frames. The second video frame set includes video frame C, video frame E and video frame G.
[0084] If the second preset threshold is 2 ms, the ending video frame determined by the electronic device from the second video frame set includes video frame C and video frame E. The previous candidate video frame of video frame C is video frame A, and video frame A is the starting video frame corresponding to video frame C. The previous candidate video frame of video frame E is video frame D, and video frame D is the starting video frame corresponding to video frame E. The previous candidate video frame of video frame G is video frame F, and video frame F is the starting video frame corresponding to video frame G.
[0085] Further, the electronic device can determine that from video frame A to video frame C is a video segment, from video frame D to video frame E is a video segment, and from video frame F to video frame G is a video segment.
[0086] Based on the above processing, the starting video frame and the ending video frame of each plot containing the same object can be determined based on the time difference between the first video frames containing the same object, and then the video frame corresponding to a plot can be obtained as a video segment. Therefore, the determined video segment contains a complete plot, and the video segment containing a complete plot is also recommended to the user subsequently, which can improve the user experience.
[0087] After obtaining the plurality of video segments, the electronic device can obtain the video tag (i.e., the first video tag) of each video segment.
[0088] In an embodiment of the present application, step S101 can include the following steps: for each video segment contained in the original video, based on the sub-tag set of the video segment, obtaining the video tag of the video segment as the first video tag.
[0089] The sub-tag set includes at least one of the following: a first sub-video tag, a second sub-video tag, and a third sub-video tag. The first sub-video tag is determined based on an identification of a target object in a video frame included in the video clip. The second sub-video tag is determined based on a spectral feature of audio included in the video clip. The third sub-video tag is determined based on a keyword in text associated with the video clip. The text associated with the video clip includes a title, a synopsis, and production information of an original video to which the video clip belongs, and text corresponding to the audio included in the video clip.
[0090] For each video clip included in the original video, the electronic device can obtain video frames included in the video clip, sample a specified video frame from the video frames included in the video clip, and use the poster image of the video clip and the specified video frame as key frames. The electronic device can perform image recognition on each key frame of the video clip to obtain a target object included in the key frame, which can be an actor, a character, a scene, or the like. Further, the first sub-video tag of the video clip can be determined based on the target objects included in the key frames. For example, the target objects included in the key frames include actor A, actor B, actor C, character D, character E, and scene F, and the first sub-video tag can include an actor tag, a character tag, and a scene tag. The actor tag includes actor A, actor B, and actor C, the character tag includes character D and character E, and the scene tag includes scene F. The scene tag represents an environment in which the target object is located in the video clip, such as a geographical environment and a weather environment.
[0091] For each video clip included in the original video, when the sub-tag set only includes the first sub-video tag, the first video tag of the video clip is the first sub-video tag. For the above embodiment, the first video tag of the video clip includes an actor tag: actor A, actor B, and actor C, a character tag: character D and character E, and a scene tag: scene F.
[0092] For each video clip included in the original video, the electronic device can obtain audio included in the video clip, and obtain a spectral feature of each audio frame included in the video clip. The spectral feature of an audio frame can be a MFCC (Mel Frequency Cepstral Coefficents) of the audio frame. Then, the electronic device can input the spectral features of the audio frames into an emotion recognition model to obtain a character emotion in the video clip. Further, based on the character emotion in the video clip, the second sub-video tag of the video clip can be determined. For example, the character emotion in the video clip includes happiness and surprise, and the second sub-video tag can include an emotion tag including happiness and surprise.
[0093] For each video segment contained in the original video, when the sub-tag set contains only the second sub-video tag, the first video tag of that video segment is the second sub-video tag. In the above embodiment, the first video tag of the video segment includes: emotion tags: happy, surprised.
[0094] For each video segment contained in the original video, the electronic device can obtain the text associated with that video segment. This associated text may include: the title, description, and production information of the original video to which the video segment belongs, and the text corresponding to the audio contained in the video segment. For example, if the original video to which the video segment belongs is an episode of a TV series, the title of the original video to which the video segment belongs is the name of the TV series, the description is a synopsis of the episode, and the production information may be the publication information of the TV series. If the original video to which the video segment belongs is an original video uploaded by a user, the title of the original video to which the video segment belongs is the name set by the uploading user, the description is a summary set by the uploading user, and the production information may include keywords set by the uploading user for the original video and the uploading user's identifier, etc.
[0095] Electronic devices can use NLP (Natural Language Processing) algorithms to extract keywords from the text associated with a video clip. These keywords can include: actor names, character names, keywords indicating the emotions of characters in the video clip, keywords indicating the scene in the video clip, and keywords indicating the video type. Then, based on the extracted keywords, a third sub-video tag is determined for the video clip. For example, if the extracted keywords include: actor A, actor B, character C, character D, happy, surprised, scene F, and romance, then the third sub-video tag can include: actor tag, character tag, emotion tag, scene tag, and video type tag. The actor tag includes actor A and actor B; the character tag includes character C and character D; the emotion tag includes happy and surprised; the scene tag includes scene F; and the video type tag includes romance.
[0096] For each video segment contained in the original video, when the sub-tag set contains only the third sub-video tag, the first video tag of that video segment is the third sub-video tag. In the above embodiment, the first video tag of the video segment includes: actor tags: actor A, actor B; character tags: character C, character D; emotion tags: happy, surprised; scene tag: scene F; and video type tag: romance.
[0097] In one embodiment of the present invention, the sub-tag set may include any two of the first sub-video tag, the second sub-video tag, and the third sub-video tag described above. For example, when the sub-tag set includes the first sub-video tag and the second sub-video tag described above, the first video tag of the video clip includes the first sub-video tag and the second sub-video tag. For the above embodiment, the first video tag of the video clip includes: actor tags: actor A, actor B, actor C; character tags: character D, character E; scene tag: scene F; and emotion tags: happy, surprised.
[0098] Alternatively, the sub-tag set may also include the aforementioned first sub-video tag, second sub-video tag, and third sub-video tag. In this case, the first video tag of the video clip includes the first sub-video tag, second sub-video tag, and third sub-video tag. For the above embodiment, the first video tag of the video clip includes: actor tags: actor A, actor B, actor C; character tags: character C, character D, character E; scene tag: scene F; emotion tags: happy, joyful, surprised; and video type tag: romance.
[0099] For steps S102 and S103, the target user can be any user, and the historical time period can be set by technical personnel based on experience. For example, the historical time period can be the day closest to the current time, or the historical time period can be the three days closest to the current time.
[0100] Historical video clips are video clips viewed by the target user within a historical time period. In one implementation, to improve the accuracy of the identified video clips to be recommended, preview video clips can be determined from the video clips viewed by the target user within the historical time period. These preview video clips include those that play automatically without the user clicking, those recommended to the target user, and those whose viewing time is less than a second preset duration (e.g., video clips whose viewing time is less than one-third of the total video clip duration). These are considered invalid video clips. Since invalid video clips may not be of interest to the target user, the electronic device can use all video clips viewed by the target user within the historical time period, excluding invalid ones, as historical video clips. This avoids "information cocoons" and improves the accuracy of the identified video clips.
[0101] The electronic device can acquire multiple historical video clips viewed by a target user within a historical time period, and then acquire the video tag (i.e., the second video tag) for each historical video clip. The method by which the electronic device acquires the second video tag of the historical video clip is similar to the method of acquiring the first video tag, and can be referred to the relevant description in the foregoing embodiments.
[0102] In one implementation, the electronic device can record the number of times the second video tag of each historical video segment is viewed during the process of the target user browsing historical video segments.
[0103] For example, when a target user views the first historical video segment (which can be called the first historical video segment), the electronic device can record the second video tag of the first historical video segment as the set of video tags currently viewed by the target user. The number of views corresponding to a second video tag can be recorded using f(x). For each second video tag in the set of video tags currently viewed by the target user, the electronic device can record that f(x) corresponding to that second video tag is 1.
[0104] When a target user browses a second historical video segment (which can be referred to as the second historical video segment), for each second video tag in the second historical video segment, the electronic device can determine whether there exists a video tag in the target user's currently browsed video tag set that is the same as that second video tag. If so, the electronic device can increment f(x) corresponding to the video tag that is the same as that second video tag by 1, that is, f(x) corresponding to the video tag that is the same as that second video tag is 2. If not, the electronic device can add the second video tag to the target user's currently browsed video tag set and record that f(x) corresponding to the second video tag is 1. And so on, so that the browsing count of the second video tag of the historical video segment can be recorded every time the target user browses the historical video segment.
[0105] Furthermore, the electronic device can obtain the number of views (i.e., the first view count) corresponding to each second video tag of the historical video clips viewed by the target user.
[0106] Regarding steps S104 and S105, in one implementation, for each first video tag, the electronic device can determine whether there is a video tag in the second video tags that is the same as the first video tag. If not, the electronic device can determine that the target user's tag interest level for the first video tag is 0. If yes, the electronic device can use the first view count corresponding to the second video tag that is the same as the first video tag as the target user's tag interest level for the first video tag.
[0107] Furthermore, for each video segment, the electronic device can directly calculate the sum of the tag interest levels corresponding to each first video tag of the video segment, which serves as the target user's video interest level for that video segment.
[0108] In another implementation, Figure 1 Based on this, see Figure 5 Before step S104, the method may further include the following steps:
[0109] S109: For each first video tag, determine each second video tag of the same tag type as the first video tag.
[0110] Accordingly, step S104 may include the following steps:
[0111] S1041: For each first video tag, based on the first view count corresponding to each second video tag of the same tag type as the first video tag, and the first view count corresponding to the second video tag of the same type as the first video tag, determine the target user's tag interest level for the first video tag.
[0112] Video tags can include categories such as actor type, role type, scene type, emotion type, and video type.
[0113] For each first video tag, the electronic device can determine from each second video tag the second video tag of the same tag type as the first video tag.
[0114] Then, the electronic device can calculate the sum of the first view counts for each of the second video tags of the same tag type as the first video tag, to obtain the second view count. The electronic device can also calculate a weighted sum of the first and second view counts for the second video tags that are the same as the first video tag, as the target user's level of interest in the first video tag.
[0115] In one embodiment of the present invention, Figure 5 Based on this, see Figure 6 Step S1041 may include the following steps:
[0116] S10411: For each first video tag, calculate the sum of the first view counts corresponding to each of the second video tags of the same tag type as the first video tag, and use it as the second view count.
[0117] S10412: Calculate the ratio of the first view count to the second view count corresponding to the second video tag that is the same as the first video tag, to obtain the target user's tag interest level for the first video tag.
[0118] Accordingly, step S105 may include the following steps:
[0119] S1051: For each video segment contained in the original video, calculate the weighted sum of the target user's interest in each of the first video tags of the video segment to obtain the target user's video interest in the video segment.
[0120] For each first video tag, the electronic device can obtain the total number of views (i.e., the second number of views) corresponding to each second video tag of the same tag type as the first video tag. For example, the electronic device can calculate the sum of the number of views corresponding to each second video tag of the same tag type as the first video tag to obtain the second number of views.
[0121] Alternatively, the electronic device can record the number of views for each tag type corresponding to the second video tag of a historical video segment as the target user browses the historical video segments. For example, when the target user browses the first historical video segment (which can be called the first historical video segment), the electronic device can record that the tag type to which the second video tag of the first historical video segment belongs is the set of tag types that the target user has currently browsed. The number of views corresponding to a tag type can be recorded using g(x). For each tag type in the set of tag types that the target user has currently browsed, the electronic device can record that g(x) is 1.
[0122] When a target user browses a second historical video segment (which can be referred to as the second historical video segment), for each tag type to which the second video tag belongs in the second historical video segment, the electronic device can determine whether there exists a tag type with the same tag type in the target user's currently browsed tag type set. If so, the electronic device can increment g(x) corresponding to the tag type with the same tag type by 1, that is, g(x) corresponding to the tag type with the same tag type is 2. If not, the electronic device can add the tag type to the target user's currently browsed tag type set and record that g(x) corresponding to the tag type is 1. And so on, so that the electronic device can record the number of times the target user browses the historical video segment each time the target user browses the tag type corresponding to the second video tag of the historical video segment.
[0123] For each first video tag, the electronic device can obtain the number of views corresponding to the tag type to which the first video tag belongs, and obtain the total number of views (i.e., the second number of views) corresponding to each second video tag of the same tag type as the first video tag.
[0124] Then, for each first video tag, the electronic device can calculate the ratio of the first number of views to the second number of views corresponding to the second video tag that is the same as the first video tag, so as to obtain the target user's tag interest level for the first video tag.
[0125] For each video segment contained in the original video, if there are no video tags of the same tag type among the first video tags of the video segment, the electronic device can directly calculate the weighted sum of the tag interest levels corresponding to the first video tags of the video segment to obtain the target user's video interest level for the video segment.
[0126] If there are video tags of the same tag type among the first video tags of the video segment, the electronic device can calculate the target user's video interest level of the video segment based on the tag interest level corresponding to each first video tag of the video segment and the following formula.
[0127]
[0128] A represents the target user's level of interest in the video clip, λ1 to λ2. t This represents the preset weight, t represents the number of tag types to which each of the first video tags in this video segment belongs, m represents the number of first video tags belonging to the a-th tag type, and p(a) represents the preset weight. k p(c) represents the tag interest level corresponding to the k-th first video tag belonging to the a-th tag type, n represents the number of first video tags belonging to the c-th tag type, and p(c) represents the tag interest level. k p(s) represents the tag interest level corresponding to the k-th first video tag belonging to the c-th tag type, o represents the number of first video tags belonging to the s-th tag type, and p(s) represents the tag interest level. k ) represents the tag interest level corresponding to the k-th first video tag belonging to the s-th tag type, p represents the number of first video tags belonging to the d-th tag type, p(d k ) represents the tag interest level corresponding to the k-th first video tag belonging to the d-th tag type.
[0129] Regarding step S106, after calculating the target user's level of interest in each video segment contained in the original video, the electronic device can determine the video segments to be recommended from each video segment based on the respective level of interest. Subsequently, the electronic device can recommend the determined video segments to be recommended to the target user.
[0130] In one embodiment of the present invention, an electronic device may determine the video segments to be recommended from the video segments contained in the original video based on the following method.
[0131] In one implementation, a preset number of video segments are selected from the original video segments according to their level of interest in descending order, and these segments are used as video segments to be recommended.
[0132] The preset number can be set by technicians based on experience. For example, the preset number can be 1, or the preset number can be 3, but it is not limited to this.
[0133] In another implementation, video segments with a video interest level greater than a third preset threshold are identified from the video segments contained in the original video and used as video segments to be recommended.
[0134] The third preset threshold can be set by technicians based on experience. For example, the third preset threshold can be 0.5 or 0.7, but it is not limited to this.
[0135] In one embodiment of the present invention, when multiple video segments belong to the same original video, if there is only one video segment to be recommended, when recommending the video segment to the target user, the electronic device can display the video segment to be recommended in the display area of the original video on the video recommendation page.
[0136] If there are multiple video clips to be recommended, the electronic device can display the video clips to be recommended sequentially in the display area of the original video on the video recommendation page, according to the order in which the video clips are in the original video.
[0137] See Figure 7 , Figure 7 This is a flowchart illustrating a method for determining video tags according to an embodiment of the present invention.
[0138] For each video segment contained in the original video, the electronic device can obtain the title and description information, and manually generated tags / keywords for that video segment. The title and description information is the title and summary of the original video to which the video segment belongs, and the manually generated tags / keywords are the production information of the original video to which the video segment belongs. Both the title and description information and the manually generated tags / keywords are text associated with that video segment. The electronic device can also obtain the video content of the video segment, which includes the audio contained in the video segment. The electronic device can convert the audio contained in the video segment into text, obtaining text associated with that video segment.
[0139] Then, the electronic device can process the text associated with the video clip based on NLP algorithms to obtain information about the actors, characters, scenes, and emotions of the characters in the video clip.
[0140] Electronic devices can also acquire the audio contained in the video clip, perform audio analysis on the audio, and determine the emotional information of the characters in the video clip. In other words, the electronic device can input the spectral features of each audio frame contained in the video clip into the emotion recognition model to obtain the emotional information of the characters in the video clip.
[0141] The electronic device can also acquire keyframes of the video clip, which include the poster image of the video clip and specified video frames obtained by sampling the video frames contained in the video clip. The electronic device can perform image processing on the keyframes of the video clip to obtain actor information, character information, and scene information of the video clip.
[0142] Furthermore, based on the actor information, character information, scene information, and emotional information of the characters in the video clip, the first video tag for the video clip is determined.
[0143] For example, the video clip includes m actors (a1, a2, ..., am), n characters (c1, c2, ..., cn), k scenes (s1, s2, ..., sk), and p emotions (md1, md2, ..., mdp).
[0144] Correspondingly, the actor labels for this video clip can be denoted as row vectors actors, where actors = [a1, a2, ..., am]. Similarly, we can obtain row vectors characters representing the character labels for this video clip, where characters = [c1, c2, ..., cn], row vectors scenes representing the scene labels for this video clip, where scenes = [s1, s2, ..., sk], and row vectors moods representing the emotion labels for this video clip, where moods = [md1, md2, ..., mdp].
[0145] and Figure 1 For the corresponding method implementation examples, see [link to relevant documentation]. Figure 8 , Figure 8 This is a structural diagram of a video recommendation device provided in an embodiment of the present invention. The device includes:
[0146] The first acquisition module 801 is used to acquire the video tag of each video segment contained in the original video, and use it as the first video tag;
[0147] The second acquisition module 802 is used to acquire the video tags of each historical video segment viewed by the target user within a historical time period, and use them as the second video tags.
[0148] The third acquisition module 803 is used to acquire, for each second video tag, the number of times the target user has viewed the historical video segments to which the second video tag belongs, as the first number of views;
[0149] The first determining module 804 is used to determine the target user's level of interest in the first video tag based on the first number of views corresponding to the second video tag that is the same as the first video tag for each first video tag;
[0150] The second determining module 805 is used to determine the target user's video interest level in each video segment contained in the original video based on the target user's interest level in each first video tag of the video segment.
[0151] The third determining module 806 is used to determine the video segment to be recommended from the video segments contained in the original video; wherein the video interest level corresponding to the video segment to be recommended is greater than the video interest level corresponding to other video segments in each video segment.
[0152] Optionally, the device further includes:
[0153] The processing module is configured to, before the first acquisition module 801 performs the acquisition of the original video and the acquisition of the video tag of each video segment contained in the original video as the first video tag, perform frame-segmentation processing on the original video to obtain each video frame contained in the original video.
[0154] For each object contained in the original video, a video frame containing that object is determined from each video frame contained in the original video as a first video frame. Based on each first video frame containing that object, a video segment containing that object is determined.
[0155] Optionally, the processing module is specifically used to determine a first video frame set from each of the first video frames; wherein, the first video frame set includes candidate video frames; the candidate video frames include a first first video frame, and video frames in each first video frame whose time difference with the previous video frame is greater than a first preset threshold.
[0156] A second set of video frames is determined from each of the first video frames; wherein, for each video frame in the second set of video frames, in each of the first video frames, the time difference between the video frame and the previous video frame is not greater than the first preset threshold, and the time difference between the video frame and the next video frame is greater than the first preset threshold.
[0157] The end video frame of the video segment containing the object is determined from the second set of video frames; wherein, in each first video frame, the time difference between the end video frame and the previous candidate video frame is not less than a second preset threshold.
[0158] According to the order in each first video frame, determine the previous candidate video frame of each ending video frame from the first video frame set, and obtain the starting video frame of the video segment containing the object corresponding to the ending video frame.
[0159] Determine the video segment from each starting video frame to the corresponding ending video frame, and obtain the video segment containing the object.
[0160] Optionally, the first acquisition module 801 is specifically used to obtain a video tag for each video segment contained in the original video, based on the sub-tag set of the video segment, as a first video tag; wherein, the sub-tag set includes at least one of the following: a first sub-video tag, a second sub-video tag, and a third sub-video tag; the first sub-video tag is determined based on the identifier of the target object in the video frame contained in the video segment; the second sub-video tag is determined based on the spectral characteristics of the audio contained in the video segment; the third sub-video tag is determined based on keywords in the text associated with the video segment; the text associated with the video segment includes: the title, description, and production information of the original video to which the video segment belongs, and the text corresponding to the audio contained in the video segment.
[0161] Optionally, the device further includes:
[0162] The fourth determining module is used to determine each second video tag of the same tag type as the first video tag for each first video tag before the first determining module 804 performs the following: for each first video tag, determine the target user's tag interest level for the first video tag based on the first number of views corresponding to the second video tag that is the same as the first video tag.
[0163] The first determining module 804 is specifically used to determine the target user's tag interest level for each first video tag based on the first number of views corresponding to each second video tag of the same tag type as the first video tag, and the first number of views corresponding to the second video tag of the same type as the first video tag.
[0164] Optionally, the first determining module 804 is specifically used to calculate, for each first video tag, the sum of the first browsing counts corresponding to each second video tag of the same tag type as the first video tag, and use it as the second browsing count;
[0165] Calculate the ratio of the first number of views to the second number of views corresponding to the second video tag that is the same as the first video tag, and obtain the target user's level of interest in the first video tag;
[0166] The second determining module 805 is specifically used to calculate, for each video segment, the weighted sum of the target user's interest in each of the first video tags of the video segment, so as to obtain the target user's video interest in the video segment.
[0167] Optionally, the third determining module 806 is specifically used to determine the first preset number of video segments from the video segments contained in the original video in descending order of the corresponding video interest level, as video segments to be recommended;
[0168] or,
[0169] From the video segments contained in the original video, video segments with a video interest level greater than a third preset threshold are identified as video segments to be recommended.
[0170] Based on the video recommendation apparatus provided in this embodiment of the invention, a second video tag for a historical video segment can represent the video features of that historical video segment, and a first view count corresponding to a second video tag can represent the target user's level of interest in that second video tag. Accordingly, for each video segment contained in the original video, based on the first view count corresponding to a second video tag that is the same as the first video tag for that video segment, the target user's level of interest in that video segment can be determined. Therefore, the recommended video segments determined based on the target user's level of interest in each video segment contained in the original video are: video segments with higher corresponding levels of video interest. In other words, video segments with higher corresponding levels of video interest in the original video can be specifically recommended to the target user, thereby improving the effectiveness of video recommendation.
[0171] This invention also provides an electronic device, such as... Figure 9 As shown, it includes at least one processor 901; and
[0172] A memory 902 is communicatively connected to the at least one processor 901; wherein,
[0173] The memory 902 stores instructions that can be executed by the at least one processor 901, which, when executed by the at least one processor 901, enable the at least one processor 901 to perform the following steps:
[0174] For each video segment contained in the original video, obtain the video tag of that video segment and use it as the first video tag;
[0175] Obtain the video tags of each historical video clip viewed by the target user within a historical time period, and use them as the second video tags;
[0176] For each second video tag, the number of times the target user viewed the historical video segments to which the second video tag belongs is obtained, and this number is used as the first number of views;
[0177] For each first video tag, the target user's level of interest in the first video tag is determined based on the first number of views corresponding to the second video tag that is the same as the first video tag.
[0178] For each video segment contained in the original video, the target user's video interest level for that video segment is determined based on the target user's interest level in each of the first video tags of that video segment;
[0179] From the video segments contained in the original video, video segments to be recommended are determined; wherein, the video interest level corresponding to the video segment to be recommended is greater than the video interest level corresponding to other video segments in each video segment.
[0180] In one embodiment of the present invention, the electronic device further includes a communication interface and a communication bus, wherein the processor 901, the communication interface, and the memory 902 communicate with each other through the communication bus.
[0181] The communication bus mentioned in the above electronic devices 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 indicate that there is only one bus or one type of bus.
[0182] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0183] 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.
[0184] 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.
[0185] Based on the electronic device provided in this embodiment of the invention, a second video tag for a historical video segment can represent the video features of that historical video segment, and a first view count corresponding to a second video tag can represent the target user's level of interest in that second video tag. Accordingly, for each video segment contained in the original video, based on the first view count corresponding to a second video tag that is the same as the first video tag for that video segment, the target user's level of interest in that video segment can be determined. Furthermore, the recommended video segments determined based on the target user's level of interest in each video segment contained in the original video are: video segments with higher corresponding levels of video interest. That is, video segments with higher corresponding levels of video interest in the original video can be specifically recommended to the target user, thereby improving the effectiveness of video recommendation.
[0186] In another embodiment of the present invention, a non-transitory computer-readable storage medium storing computer instructions is also provided, the computer instructions being used to cause the computer to execute any of the video recommendation methods described in the above embodiments.
[0187] In another embodiment of the present invention, a computer program product is also provided, including a computer program that, when executed by a processor, implements any of the video recommendation methods described in the above embodiments.
[0188] 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 as 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)).
[0189] 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.
[0190] 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 embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0191] 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 video recommendation method, characterized by, The method comprises: For each video segment contained in the original video, obtaining the video tag of the video segment as a first video tag; Obtain the video tag of each historical video segment browsed by the target user within a historical time period as a second video tag; For each second video tag, obtain the number of times the target user browses the historical video segment to which the second video tag belongs as a first browsing number; For each first video tag, determine the label interest degree of the target user for the first video tag according to the first browsing number corresponding to the second video tag which is the same as the first video tag; For each video segment contained in the original video, determine the video interest degree of the target user for the video segment based on the label interest degree of the target user for each first video tag of the video segment; From each video segment contained in the original video, determine the video segment to be recommended; wherein the video interest degree corresponding to the video segment to be recommended is greater than the video interest degree corresponding to other video segments in each video segment; Before the step of obtaining the video tag of each video segment contained in the original video as a first video tag, the method further comprises: Obtain the original video and perform frame processing on the original video to obtain each video frame contained in the original video; For each object contained in the original video, determine the video frame containing the object as a first video frame from each video frame contained in the original video, and determine the video segment containing the object based on each first video frame containing the object; The step of determining the video segment containing the object based on each first video frame containing the object comprises: Determine a first video frame set from the first video frames; wherein the first video frame set comprises a candidate video frame; the candidate video frame comprises a first first video frame, and a video frame between each first video frame and a previous video frame has a time difference greater than a first preset threshold; Determine a second video frame set from the first video frames; wherein for each video frame in the second video frame set, in each first video frame, the time difference between the video frame and the previous video frame is not greater than the first preset threshold, and the time difference between the video frame and the next video frame is greater than the first preset threshold; Determine an ending video frame of the video segment containing the object from the second video frame set; wherein in each first video frame, the time difference between the ending video frame and the previous candidate video frame is not less than a second preset threshold; Determine the previous candidate video frame of each ending video frame from the first video frame set in the order in each first video frame to obtain the starting video frame of the video segment containing the object corresponding to the ending video frame; Determine the video segment from each starting video frame to the corresponding ending video frame to obtain the video segment containing the object.
2. The method of claim 1, wherein, The step of obtaining the video tag of each video segment contained in the original video as a first video tag comprises: For each video clip included in the original video, based on a sub-tag set of the video clip, a video tag of the video clip is obtained as a first video tag, wherein the sub-tag set includes at least one of the following: a first sub-video tag, a second sub-video tag and a third sub-video tag; the first sub-video tag is determined based on an identification of a target object in a video frame included in the video clip; the second sub-video tag is determined based on a spectral feature of audio included in the video clip; and the third sub-video tag is determined based on a keyword in text associated with the video clip.
3. The method of claim 1, wherein, Before the determining, for each first video tag, a label interest degree of the target user in the first video tag according to a first browsing frequency corresponding to a second video tag of the same label type as the first video tag, the method further includes: For each first video tag, determining second video tags of the same label type as the first video tag; The determining, for each first video tag, a label interest degree of the target user in the first video tag according to a first browsing frequency corresponding to a second video tag of the same label type as the first video tag, includes: For each first video tag, based on a first browsing frequency corresponding to each second video tag of the same label type as the first video tag, and a first browsing frequency corresponding to a second video tag of the same label type as the first video tag, a label interest degree of the target user in the first video tag is determined.
4. The method of claim 3, wherein, The determining, for each first video tag, a label interest degree of the target user in the first video tag according to a first browsing frequency corresponding to a second video tag of the same label type as the first video tag, includes: For each first video tag, a sum value of the first browsing frequencies corresponding to each second video tag of the same label type as the first video tag is calculated as a second browsing frequency; A ratio of the first browsing frequency corresponding to the second video tag of the same label type as the first video tag and the second browsing frequency is calculated to obtain the label interest degree of the target user in the first video tag; The determining, for each video clip included in the original video, a video interest degree of the target user in the video clip based on the label interest degrees of the target user in each first video tag of the video clip, includes: For each video clip included in the original video, a weighted sum of the label interest degrees of the target user in each first video tag of the video clip is calculated to obtain a video interest degree of the target user in the video clip.
5. The method of claim 1, wherein, The determining, from the video clips included in the original video, a to-be-recommended video clip, includes: According to an order from large to small of the corresponding video interest degrees, a preset number of video clips from the video clips included in the original video are determined as to-be-recommended video clips; Or, From the video clips included in the original video, a video clip with a corresponding video interest degree greater than a third preset threshold is determined as a to-be-recommended video clip.
6. A video recommendation apparatus, comprising: The device comprises: The first acquisition module is used for acquiring, for each video segment contained in the original video, a video tag of the video segment as a first video tag; The second acquisition module is used for acquiring video tags of each historical video segment browsed by the target user within a historical time period as second video tags; The third acquisition module is used for acquiring, for each second video tag, a browsing frequency of a historical video segment browsed by the target user and belonging to the second video tag as a first browsing frequency; The first determination module is used for determining, for each first video tag, a tag interest degree of the target user for the first video tag according to the first browsing frequencies corresponding to the second video tags identical to the first video tag; The second determination module is used for determining, for each video segment contained in the original video, a video interest degree of the target user for the video segment based on the tag interest degrees of the target user for the first video tags of the video segment; The third determination module is used for determining a to-be-recommended video segment from each video segment contained in the original video; wherein the video interest degree corresponding to the to-be-recommended video segment is greater than the video interest degrees corresponding to other video segments in each video segment; The device further comprises: The processing module is used for, before the first acquisition module performs, for each video segment contained in the original video, acquisition of a video tag of the video segment as a first video tag, performing acquisition of the original video and performing frame processing on the original video to obtain each video frame contained in the original video; For each object contained in the original video, determining, from each video frame contained in the original video, a video frame containing the object as a first video frame, and determining a video segment containing the object based on each first video frame containing the object; The processing module is specifically used for determining a first video frame set from the first video frames; wherein the first video frame set comprises a candidate video frame; the candidate video frame comprises a first first video frame and a video frame between each first video frame and a previous video frame with a time difference greater than a first preset threshold; Determining a second video frame set from the first video frames; wherein, for each video frame in the second video frame set, in each first video frame, the time difference between the video frame and a previous video frame is not greater than the first preset threshold, and the time difference between the video frame and a subsequent video frame is greater than the first preset threshold; Determining an ending video frame of the video segment containing the object from the second video frame set; wherein, in each first video frame, the time difference between the ending video frame and a previous candidate video frame is not less than a second preset threshold; Determining, in sequence in each first video frame, a previous candidate video frame of each ending video frame from the first video frame set to obtain a starting video frame of the video segment containing the object corresponding to the ending video frame; Determining a video segment from each starting video frame to a corresponding ending video frame to obtain the video segment containing the object.
7. An electronic device, comprising: comprise: at least one processor; and a memory in communication with the at least one processor; wherein the memory has stored instructions executable by the at least one processor such that the at least one processor is enabled to perform the method of any one of claims 1-5.
8. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, the computer instructions are for causing the computer to perform the method of any one of claims 1-5.
9. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-5.
Citation Information
Patent Citations
Video recommendation method and device
CN106507143A
Video segment extraction method, apparatus and device, and computer-readable storage medium
WO2020135756A1