Method, device, electronic device and storage medium for replying to comment content
By identifying consultation comments in the short video comment area, performing video frame matching and database query, and determining and replying to the feature video information, the problem of users being unable to obtain feature video information is solved and the user experience is improved.
Patent Information
- Application Number
- CN202210050043.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-17
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-01-17
AI Technical Summary
When users query feature video information in the short video comment area, they usually cannot get effective replies, which affects the user experience.
By identifying the consultation comments in the comment area, video frames are extracted, the specified database is used to match the target video frames, the feature video information to which the short video belongs is determined, and a reply is made.
It achieves effective replies to user consultation comments, improves user experience, and ensures that users can obtain feature video information in a timely manner.
Smart Images

Figure CN114417890B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing technology, and in particular to a comment content reply method, device, electronic device and storage medium. Background Art
[0002] As video software becomes more and more abundant, more and more short videos from TV series, variety shows, animations, etc. are presented to users. When users watch short videos and become interested, they will want to know the video information of the main video to which the short video belongs, such as the video name and / or video viewing address. At this time, users usually give consulting comments on the main video in the comment area of the short video to inquire about the video information of the main video to which the short video belongs.
[0003] In the related art, when a user gives an advisory comment on a feature video in the comment section of a short video, if other users know about it, they may reply below the comment and lead the user to watch further.
[0004] However, in many cases, other users are unaware or have no intention to respond, resulting in users' consulting comments on the feature video not receiving an effective response, ultimately affecting the user experience. Summary of the invention
[0005] The purpose of the embodiment of the present invention is to provide a comment reply method to achieve the purpose of effectively replying to the user's consulting comments on the feature video. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present invention provides a method for replying to a comment content, the method comprising:
[0007] Identify whether there are any consulting comments in the comment area of the target short video; wherein the consulting comments are comments for inquiring about the video information of the feature video to which the target short video belongs;
[0008] If the recognition result is yes, extract the video frame of the target short video to obtain the video frame to be used;
[0009] Based on a designated database, a target video frame matching the to-be-used video frame is determined; wherein the designated database records frame information of target video frames obtained by extracting frames from a plurality of candidate feature videos, and each target video frame is associated with video information of the candidate feature video to which it belongs;
[0010] Based on the video information associated with the found target video frame, determine the video information of the main video to which the target short video belongs;
[0011] The consulting comments are replied by using the video information of the main video to which the target short video belongs.
[0012] Optionally, the step of identifying whether there are consulting comments in the comment area of the target short video includes:
[0013] Identify whether there are any comments containing the specified keyword in the comments section of the target short video, and if so, identify that there are consulting comments in the comment section of the target short video;
[0014] The designated keyword is a keyword used to represent the queried video information.
[0015] Optionally, extracting video frames from the target short video to obtain video frames to be used includes:
[0016] According to a predetermined frame extraction strategy, video frames are extracted from the target short video to obtain video frames to be used; wherein the predetermined frame extraction strategy includes: if the number of video scene changes of the target short video is greater than or equal to a predetermined number threshold or the video itself is longer than or equal to a predetermined duration threshold, then a transition frame extraction method is used to extract video frames; otherwise, a uniform frame extraction method is used to extract video frames.
[0017] Optionally, the designated database records image feature vectors of target video frames of multiple candidate feature videos;
[0018] The step of determining a target video frame matching the to-be-used video frame based on a designated database includes:
[0019] Generate an image feature vector of the video frame to be used as a target vector;
[0020] Based on the graph index retrieval method, from the image feature vectors of the target video frames of each candidate feature video, multiple image feature vectors ranked top in similarity to the target vector are retrieved;
[0021] From the target video frames to which the multiple image feature vectors belong, a target video frame whose similarity with the video frame to be used is greater than a predetermined threshold is selected to obtain a target video frame that matches the video frame to be used.
[0022] Optionally, the number of the found target video frames is multiple;
[0023] The step of determining the video information of the main video to which the target short video belongs based on the video information associated with the found target video frame includes:
[0024] Determine each candidate video information corresponding to the video frame to be used; wherein each candidate video information includes video information after deduplication of each video information associated with the found target video frame;
[0025] For each candidate video information corresponding to the video frame to be used, determine the similarity between the target video frame corresponding to the candidate video information and the video frame to be used, sum the determined similarities to obtain the similarity of the candidate video information; wherein the target video frame corresponding to the candidate video information is the target video frame associated with the candidate video information among the found target video frames;
[0026] Based on the similarity of each candidate video information corresponding to the to-be-used video frame, the video information of the main video to which the target short video belongs is determined.
[0027] Optionally, the number of the video frames to be used is multiple;
[0028] The step of determining the video information of the main video to which the target short video belongs based on the similarity of each candidate video information corresponding to the video frame to be used includes:
[0029] Determine each piece of video information to be used; wherein each piece of video information to be used includes video information obtained after deduplication of candidate video information corresponding to each video frame to be used;
[0030] For each piece of video information to be used, summing up the similarities of the video information to be used to obtain the similarity of the video information to be used;
[0031] The video information to be used with the highest similarity is selected as the video information of the main video to which the target short video belongs.
[0032] Optionally, the using the video information of the feature video to which the target short video belongs to reply to the consultation comment includes:
[0033] The video information of the main video to which the target short video belongs is used as the reply content of the consulting comment, and the comment content involved in the comment area of the target short video is updated using the reply content.
[0034] Optionally, after replying to the consultation comment using the video information of the feature video to which the target short video belongs, the method further includes:
[0035] Push a reminder message to the user who issued the consulting comment; wherein the reminder message is used to prompt the user that the consulting comment has been replied.
[0036] In a second aspect, an embodiment of the present invention provides a comment content replying device, comprising:
[0037] An identification module, used to identify whether there are consulting comments in the comment area of the target short video; wherein the consulting comments are comments used to inquire about the video information of the feature video to which the target short video belongs;
[0038] An extraction module, configured to extract video frames from the target short video to obtain video frames to be used if the recognition result is yes;
[0039] A first determination module is used to determine a target video frame matching the to-be-used video frame based on a specified database; wherein the specified database records frame information of target video frames obtained by extracting frames from a plurality of candidate feature videos, and each target video frame is associated with video information of the candidate feature video to which it belongs;
[0040] A second determination module is used to determine the video information of the main video to which the target short video belongs based on the video information associated with the found target video frame;
[0041] The reply module is used to reply to the consulting comments by using the video information of the main video to which the target short video belongs.
[0042] Optionally, the identification module is specifically used to:
[0043] Identify whether there are any comments containing the specified keyword in the comment area of the target short video. If so, identify that there are consulting comments in the comment area of the target short video.
[0044] The designated keyword is a keyword used to represent the queried video information.
[0045] Optionally, the extraction module is specifically used to: extract video frames from the target short video according to a predetermined frame extraction strategy to obtain video frames to be used; wherein the predetermined frame extraction strategy includes a strategy set based on the number of video scene changes and / or video length.
[0046] Optionally, the predetermined frame extraction strategy includes:
[0047] If the number of video scene changes of the target short video is greater than or equal to a predetermined number threshold or the duration of the video itself is greater than or equal to a predetermined duration threshold, a transition frame extraction method is used to extract video frames;
[0048] Otherwise, a uniform frame extraction method is used to extract video frames.
[0049] Optionally, the designated database records image feature vectors of target video frames of multiple candidate feature videos;
[0050] The first determination module includes:
[0051] A generating submodule, used for generating an image feature vector of the video frame to be used as a target vector;
[0052] A retrieval submodule, for retrieving, based on a graph index retrieval method, a plurality of image feature vectors ranked top in similarity to the target vector from the image feature vectors of the target video frames of the candidate feature videos;
[0053] The selection submodule is used to select a target video frame whose similarity with the video frame to be used is greater than a predetermined threshold from the target video frames to which the multiple image feature vectors belong, so as to obtain a target video frame matching the video frame to be used.
[0054] Optionally, the number of the found target video frames is multiple;
[0055] The second determination module is specifically used to: determine each candidate video information corresponding to the video frame to be used; wherein each candidate video information includes video information after deduplication of each video information associated with the found target video frame;
[0056] For each candidate video information corresponding to the video frame to be used, determine the similarity between the target video frame corresponding to the candidate video information and the video frame to be used, sum the determined similarities to obtain the similarity of the candidate video information; wherein the target video frame corresponding to the candidate video information is the target video frame associated with the candidate video information among the found target video frames;
[0057] Based on the similarity of each candidate video information corresponding to the to-be-used video frame, the video information of the main video to which the target short video belongs is determined.
[0058] Optionally, the number of the video frames to be used is multiple;
[0059] The second determination module includes:
[0060] The second determination submodule is used to:
[0061] Determine each piece of video information to be used; wherein each piece of video information to be used includes video information obtained after deduplication of candidate video information corresponding to each video frame to be used;
[0062] For each piece of video information to be used, summing up the similarities of the video information to be used to obtain the similarity of the video information to be used;
[0063] The video information to be used with the highest similarity is selected as the video information of the main video to which the target short video belongs.
[0064] Optionally, the reply module is specifically used for:
[0065] By calling the intelligent robot of the video client to which the target short video belongs, the consulting comments are replied using the video information of the feature video to which the target short video belongs.
[0066] Optionally, the device further comprises:
[0067] The message sending module is used to push a reminder message to the user who issued the consultation comment after replying to the consultation comment using the video information of the main video to which the target short video belongs; wherein the reminder message is used to prompt the user that the consultation comment has been replied.
[0068] In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0069] Memory, used to store computer programs;
[0070] The processor is used to implement the method steps of replying to any comment content when executing the program stored in the memory.
[0071] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for replying to comment content described above is implemented.
[0072] In a fifth aspect, an embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the above-mentioned methods for replying to comment content.
[0073] Beneficial effects of the embodiments of the present invention:
[0074] The solution provided by the present invention can identify whether there are consulting comments in the comment area of the target short video. If there are consulting comments, the target short video is extracted to obtain the video frame to be used; in the specified database, the target video frame matching the video frame to be used is determined; then based on the video information associated with the found target video frame, the video information of the feature video to which the target short video belongs is determined, and the video information of the feature video to which the target short video belongs is used to reply to the consulting comments. It can be seen that through this solution, when the user becomes interested in the short video and consults the video information, the consulting comments of the user on the feature video can be effectively replied, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0076] Figure 1 A flowchart of a method for replying to comment content provided by an embodiment of the present invention;
[0077] Figure 2 A schematic diagram of replying to a comment provided by an embodiment of the present invention;
[0078] Figure 3 A flowchart of a comment content reply embodiment provided by an embodiment of the present invention;
[0079] Figure 4 A schematic diagram of the structure of a comment content replying device provided by an embodiment of the present invention;
[0080] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0081] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0082] When a user gives an advisory comment on a feature video, he or she hopes to get a reply. In the related art, when a user gives an advisory comment on a feature video in the comment area of a short video, when other users know the video information corresponding to the user's advisory comment on the feature video, they can click a reply button under the user's advisory comment to reply to the video information of the feature video to which the short video belongs, thereby completing the reply to the comment content.
[0083] However, in many cases, other users do not know or do not want to reply at all. At this time, the user's consulting comments on the feature video cannot be replied, resulting in the user being unable to watch the feature film, thus bringing an unfriendly experience to the user.
[0084] Based on this, the embodiments of the present invention provide a method, device, electronic device and storage medium for replying to comment content, so as to achieve effective reply to the consulting comments of users on the feature video and improve the user experience.
[0085] The following first introduces a comment content reply method provided by an embodiment of the present invention.
[0086] A comment content replying method provided by an embodiment of the present invention can be applied to an electronic device.
[0087] The electronic device may be a server, and of course may also be a terminal device. For example, the terminal device may be a smart phone, a tablet computer, a desktop computer, etc.
[0088] Specifically, the execution subject of the comment content reply method can be a comment content reply device. Exemplarily, when the comment content reply method is applied to a server, the comment content reply device can be a functional module in a server program corresponding to a video client running in the server. Exemplarily, when the comment content reply method is applied to a terminal device, the comment content reply device can be a functional module in a video client running in the terminal device. Then, for this case, the comment content reply method can be specifically applied to a video client in a terminal device.
[0089] It is understandable that the video client in the embodiment of the present invention can be a short video client, that is, a client specifically used to provide short videos. Of course, it can also be a non-short video client that can provide short video services, but it is certainly not limited to this.
[0090] In order to solve the problems of the related art, a method for replying to a comment content provided by an embodiment of the present invention may include the following steps:
[0091] Identify whether there are any consulting comments in the comment area of the target short video; wherein the consulting comments are comments for inquiring about the video information of the feature video to which the target short video belongs;
[0092] If the recognition result is yes, extract the video frame of the target short video to obtain the video frame to be used;
[0093] Based on a designated database, a target video frame matching the to-be-used video frame is determined; wherein the designated database records frame information of target video frames obtained by extracting frames from a plurality of candidate feature videos, and each target video frame is associated with video information of the candidate feature video to which it belongs;
[0094] Based on the video information associated with the found target video frame, determine the video information of the main video to which the target short video belongs;
[0095] The consulting comments are replied by using the video information of the main video to which the target short video belongs.
[0096] The solution provided by the present invention can identify whether there are consulting comments in the comment area of the target short video. If there are consulting comments, the target short video is extracted to obtain the video frame to be used; in the specified database, the target video frame matching the video frame to be used is determined; then based on the video information associated with the found target video frame, the video information of the feature video to which the target short video belongs is determined, and the video information of the feature video to which the target short video belongs is used to reply to the consulting comments. It can be seen that through this solution, when the user becomes interested in the short video and consults the video information, the consulting comments of the user on the feature video can be effectively replied, thereby improving the user experience.
[0097] A comment content reply method provided by an embodiment of the present invention is described in detail below in conjunction with the accompanying drawings.
[0098] Figure 1 A flowchart of a method for replying to a comment provided by an embodiment of the present invention is shown in FIG. Figure 1 As shown, the method may include the following steps S101-S105;
[0099] S101: Identify whether there are consulting comments in the comment area of the target short video;
[0100] Among them, the consulting comments are comments for inquiring about the video information of the feature video to which the target short video belongs. Moreover, the feature video to which the target short video belongs is the complete video before editing; the so-called video information includes the information of the feature video, such as the video name and / or the video viewing address, but is of course not limited to this. It can be understood that for any short video, it can be identified whether the short video is an edited video. If so, the short video is determined as the target short video. At this time, the target short video can be an edited video belonging to a film and television drama, variety show, animation, etc. Of course, for any short video, the short video can also be directly determined as the target short video. At this time, the target short video is any short video published to the video client. Among them, when identifying whether any short video is an edited video, the title of the short video can be used to identify whether the short video is an edited video. In addition, it should be noted that if the target short video is not an edited video, the subsequent consultation comments in the comment area will usually not be detected, so that the comments on such short videos can be not replied.
[0101] In addition, it should be noted that the short video client is a client specifically used to provide short video services, that is, the duration of the videos published by the short video client is less than a predetermined duration threshold, such as 60 seconds or 90 seconds, etc. Therefore, any video published by the short video client can be directly used as a short video. Non-short video clients can usually provide short video services and non-short video services, such as feature video services. Therefore, for any video published by a non-short video client, it can be analyzed whether the duration of the video is less than the predetermined duration threshold. If it is, it is determined that the video belongs to a short video. Of course, it can also be analyzed whether the video is located in a short video service channel / topic. If so, it is determined that the video belongs to a short video, etc.; wherein the short video service channel / topic is: a channel / topic provided by a non-short video client for short video services.
[0102] For users of any video client, if a user watches a short video on the video client and becomes interested, the user will usually post a comment in the comment area asking where to watch the feature video, i.e., an advisory comment; if the user's advisory comment can be replied to, it will help the user use the video client that plays the short video more frequently, further increase the number of daily active users of the video client and the user's retention on the client; where, the so-called retention means: assuming that 100 users use the video client at a certain time, and after a period of time, only 60 users are still using the video client, then these 60 users are the retained users of the video client, and these 60 users have been retained. For example: assuming that a content producer posts a short video edited from a movie in a video client, the user watches the short video and becomes interested, and asks how to watch the movie, then if the user's advisory comment can be replied to at this time, the user can further watch the feature video of the movie; this will not only encourage the content producer of the short video, but also help improve the user's viewing experience.
[0103] Based on the above ideas, in order to solve the problems existing in the related technologies, when a user views a short video and gives an advisory comment on the feature video, instead of waiting for other users to reply, it identifies whether there are advisory comments in the comment area of the target short video, so that different processing can be performed according to different recognition results. Among them, identifying whether there are advisory comments in the comment area of the target short video can specifically be identifying whether there are advisory comments in each comment in the comment area of the target short video, where each comment is the comment content to be identified.
[0104] It is understandable that when the comment content reply device is a functional module in the server program corresponding to the video client, the target short video can be any short video posted by any user through the video client; and the comment content reply device can obtain the comment content of the comment area of the target short video based on the log data or database used to record the comment content of the comment area of each short video, and obtain the comment content to be identified. When the comment content reply device is a functional module in the video client, the target short video can be the short video that the user is watching through the video client; and the comment content reply device can use the comment content posted by the user as the comment content to be identified.
[0105] In addition, it is understandable that there are multiple ways to identify whether there are consulting comments in the comment area of the target short video.
[0106] Optionally, in one implementation, identifying whether there are consulting comments in the comment area of the target short video may include: identifying whether there are comments containing specified keywords in the comments in the comment area of the target short video, and if so, identifying that there are consulting comments in the comment area of the target short video; wherein the specified keyword is a keyword used to characterize the inquiry for video information.
[0107] The number of designated keywords may be at least one, and if any designated keyword is included, it can be determined to be a consulting review, wherein each designated keyword is a keyword used to inquire about video information, such as: what movie it is, what is the name of the drama, where to watch it, which episode, etc. It can be understood that the designated keyword can be a keyword in a predetermined keyword list, that is, at least one designated keyword is stored in a list form.
[0108] Exemplarily, in one implementation, the method of constructing the keyword list may include: obtaining a plurality of initial keywords, wherein the initial keyword is a keyword used to characterize the queried video information; and using each initial keyword as a designated keyword to form a keyword list.
[0109] In another implementation, in order to enrich the designated keywords, the method of constructing the keyword list may include: obtaining multiple initial keywords, wherein the initial keywords are keywords used to characterize the queried video information; performing synonym expansion on the multiple initial keywords to obtain extended keywords; wherein the so-called synonym expansion is to obtain synonyms of the multiple initial keywords; of course, there may be multiple ways to obtain synonyms of the multiple initial keywords, for example: inputting the initial keywords into software or models that can perform a synonym search function, or manually searching for synonyms of the initial keywords; using the multiple initial keywords and the obtained extended keywords as designated keywords to form a keyword list.
[0110] It should be noted that the initial keywords may be obtained by manual maintenance or crawling by a crawler program. The above-mentioned method for obtaining the specified keywords is only an example and should not constitute a limitation on the embodiments of the present invention.
[0111] In addition, the specific implementation method of identifying whether there are consulting comments in the comment area of the target short video is only an example and should not constitute a limitation on the embodiments of the present invention. In specific applications, for example, a pre-trained machine learning model can be used to analyze whether the comment content belongs to consulting comments to obtain an identification result.
[0112] S102: If the recognition result is yes, extract video frames from the target short video to obtain video frames to be used;
[0113] Because it is necessary to determine the video information of the main video to which the target short video belongs before replying to the user consultation comment, the video frame of the target short video can be extracted to obtain the video frame to be used, so as to perform subsequent operations based on the video frame to be used. The number of the video frames to be used can be one or more.
[0114] Optionally, in one implementation, extracting video frames from the target short video to obtain the video frames to be used may include: extracting video frames from the target short video according to a predetermined frame extraction strategy to obtain the video frames to be used. The predetermined frame extraction strategy may include: a strategy set based on the number of video scene changes and / or the video duration; of course, it may also include: extracting video frames from the target short video once every specified period of time, or randomly extracting video frames, which are all reasonable.
[0115] Exemplarily, if the predetermined frame extraction strategy includes a strategy set based on the number of video scene changes and the video duration, then the predetermined frame extraction strategy may include: if the number of video scene changes of the target short video is greater than or equal to the predetermined number threshold or the video itself is greater than or equal to the predetermined duration threshold, then the transition frame extraction method is used to extract the video frame; otherwise, the uniform frame extraction method is used to extract the video frame. For example: the number of scene changes of a target short video is M1, and the predetermined number threshold is M0. If M1 is greater than or equal to M0, or the video duration of the target short video is N1, and the predetermined duration threshold is N0, if N1 is greater than or equal to N0, then the transition frame extraction method is used to extract the video frame; otherwise, the uniform frame extraction method is used to extract the video frame.
[0116] It should be noted that the so-called transition frame extraction includes: selecting the two frames that are closest to each other before and after the video scene changes, and extracting video frames; since there may be multiple changed scenes in the video, transition frame extraction can be performed on each changed scene, or a specified number of changed scenes can be randomly selected for transition frame extraction; the so-called uniform frame extraction includes: for each video frame, one video frame is extracted every specified number of video frames, for example: one video frame is extracted every three video frames.
[0117] If the predetermined frame extraction strategy includes a strategy set based on the number of video scene changes, then the predetermined frame extraction strategy may include: if the number of video scene changes of the target short video is greater than or equal to the predetermined number threshold, then the transition frame extraction method is used to extract the video frame; otherwise, the uniform frame extraction method is used to extract the video frame. It should be noted that any method that can determine the number of video scene changes can be applied to this solution, for example: the number of video scene changes can be determined based on the FFMPEG (a set of open source computer programs that can be used to record, convert digital audio and video, and convert them into streams) framework.
[0118] If the predetermined frame extraction strategy includes a strategy set based on the video duration, then the predetermined frame extraction strategy may include: if the video duration of the target short video itself is greater than or equal to the predetermined duration threshold, then a transition frame extraction method is used to extract video frames; otherwise, a uniform frame extraction method is used to extract video frames.
[0119] It should be noted that the above-mentioned method for extracting video frames is only an example and should not be regarded as a limitation of the present invention.
[0120] In order to make the solution and layout clear, the construction method of the database is specified, which will be introduced in conjunction with other embodiments later.
[0121] S103: Determine a target video frame that matches the video frame to be used based on a designated database;
[0122] The designated database records the frame information of the target video frames obtained by extracting frames from multiple candidate feature videos, and each target video frame is associated with the video information of the candidate feature video. Exemplarily, the candidate feature video can be a feature video that the server can access or obtain.
[0123] Among them, multiple alternative feature videos can be determined in advance. At this time, identifying the video information of the feature video to which the target short video belongs is essentially selecting the feature video to which the target short video belongs from multiple alternative feature videos. It can be understood that if the target short video belongs to the editing content of an alternative feature video, then there will be matching video frames between the target short video and the alternative feature video. Therefore, in order to identify the video information of the feature video to which the target short video belongs, the target video frame that matches the video frame to be used can be determined based on a specified database, so as to use the video information associated with the target video for subsequent processing. Among them, the target video frame found can be one or more.
[0124] The frame information of the target video frame may include: an image feature vector of the target video frame, so that a higher analysis rate can be achieved when performing video frame matching analysis. Of course, the frame information of the target video frame may also include: the image frame of the target video frame itself. In this case, the target video frame matching the video frame to be used is obtained by analyzing the similarity between the video frame to be used and each video frame. It is understandable that any method for calculating image similarity can be used for analyzing the similarity between the video frame to be used and each video frame.
[0125] For the sake of clarity of the scheme and layout, when the frame information of the target video frame includes: the image feature vector of the target video frame, the specific implementation method of determining the target video frame that matches the video frame to be used is based on the specified database, which will be introduced in conjunction with other embodiments later.
[0126] S104: Determine the video information of the main video to which the target short video belongs based on the video information associated with the found target video frame;
[0127] After the target video frame is found, since the found target video frame matches the video frame to be used, there is a video frame among the found target video frames that belongs to the same main video as the video to be used. Therefore, based on the video information associated with the found target video frame, the video information of the main video to which the target short video belongs is determined.
[0128] Optionally, the number of the target video frames found is one, in which case the video information associated with the target video frame can be used as the video information of the main video to which the target short video belongs.
[0129] It can be understood that the number of the found target video frames is multiple. Exemplarily, in one implementation, based on the video information associated with the found target video frames, a method for determining the video information of the main video to which the target short video belongs may include steps A1 to A3:
[0130] Step A1, determining each candidate video information corresponding to the video frame to be used; wherein each candidate video information includes video information after deduplication of each video information associated with the found target video frame;
[0131] Step A2, for each candidate video information corresponding to the video frame to be used, determine the similarity between the target video frame corresponding to the candidate video information and the video frame to be used, sum the determined similarities to obtain the similarity of the candidate video information; wherein the target video frame corresponding to the candidate video information is the target video frame associated with the candidate video information among the found target video frames; it should be noted that the similarity between the target video frame and the video frame to be used can be determined by the Euclidean distance between the feature vector of the target video frame and the feature vector of the video frame to be used, or any image similarity calculation method can be used to determine the similarity between the video frame to be used and the target video frame;
[0132] Exemplarily, a target video frame corresponding to a video frame to be used includes: target video frames A, B, C, and D, wherein the video information associated with target video frames A and C are both video information 1, the video information associated with target video frame B is video information 2, and the video information associated with target video frame D is video information 3. At this time, the video information after deduplication of each video information associated with each target video frame is: video information 1, video information 2, and video information 3; then, the similarities between the target video frames A and C and the video frame to be used are added to obtain a set of fusion results corresponding to the video frame to be used: video information 1: the sum of the similarities between the corresponding target video frames A and C and the video frame to be used; video information 2: the similarity between the corresponding target video frame B and the video frame to be used; video information 3: the similarity between the corresponding target video frame D and the video frame to be used.
[0133] Step A3, based on the similarity of each candidate video information corresponding to the video frame to be used, determine the video information of the main video to which the target short video belongs.
[0134] Optionally, when the number of the to-be-used video frames is one, the to-be-used video frame corresponds to the candidate video information with the highest similarity, that is, the video information of the main film to which the short video belongs.
[0135] Optionally, there are multiple video frames to be used. In this case, based on the similarity of each candidate video information corresponding to the video frames to be used, a method for determining the video information of the main video to which the target short video belongs may include:
[0136] Determine each piece of video information to be used; wherein each piece of video information to be used includes video information obtained after deduplication of candidate video information corresponding to each video frame to be used;
[0137] For each piece of video information to be used, the similarities of the video information to be used are summed to obtain the similarity of the video information to be used; and the video information to be used with the highest similarity is selected as the video information of the main video to which the target short video belongs.
[0138] Exemplarily, the video frames to be used include video frames X, Y, and Z to be used, wherein the candidate video information corresponding to the video frame to be used includes video information 1 and 2, the candidate video information corresponding to the video frame to be used includes video information 2 and 3, and the candidate video information corresponding to the video frame to be used includes video information 4; at this time, the video information obtained after deduplication of the candidate video information corresponding to each video frame to be used is: video information 1, video information 2, video information 3, and video information 4; then, the similarity of the video information 2 corresponding to the video frame to be used X is added to the similarity of the video information 2 corresponding to the video frame to be used Y, and the fusion result after deduplication is obtained:
[0139] Video information 1: the similarity of video information 1 corresponding to the video frame X to be used; video information 2: the similarity of video information 2 corresponding to the video frames X and Y to be used added together; video information 3: the similarity of video information 3 corresponding to the video frame Y to be used; video information 4: the similarity of video information 4 corresponding to the video frame Z to be used.
[0140] It should be noted that when there are multiple video frames to be used, the video information of the main video to which each video frame to be used belongs needs to be deduplicated again to ensure the accuracy of the video information of the main video to which the target short video belongs.
[0141] S105: Reply to the consultation comments using the video information of the main video to which the target short video belongs;
[0142] It is understandable that after obtaining the video information of the feature video to which the target short video belongs, there may be multiple ways to reply to user consultation comments. Exemplarily, in one implementation, by calling the intelligent robot of the video client to which the target short video belongs, the consultation comments are replied using the video information of the feature video to which the target short video belongs. Exemplarily, in another implementation, the comment content reply device may reply to the consultation comments using the video information of the feature video to which the target short video belongs. In this way, real-time replies to user consultation comments can be achieved, and users can be promptly guided to further watch the feature video, thereby improving user stickiness to the video client and increasing retention of the video client.
[0143] Optionally, the reply process of replying to the consulting comment using the video information of the main video to which the target short video belongs may include: using the video information of the main video to which the target short video belongs as the reply content of the consulting comment, and using the reply content to update the comment content involved in the comment area of the target short video, so that when the target short video is displayed on the client, the comment content containing the above-mentioned reply content can be displayed.
[0144] It should be noted that the above-mentioned method of responding to consulting comments is only an example and should not constitute a limitation of the present invention.
[0145] Figure 2 A schematic diagram of an interface of a method for replying to a comment provided by an embodiment of the present invention, such as Figure 2 The method shown includes:
[0146] Users can watch short videos on the short video platform, where the short video platform is the platform for playing short videos, which is the above-mentioned video client. When a user enters the short video platform, the short video platform can play short videos, and users can give various comments in the short video comment area, such as: where can I watch the full episode, this is really good, this is not good, etc. When a user makes an advisory comment like "where can I watch the full episode", the short video platform can automatically identify the video information of the feature video corresponding to the short video and automatically reply to the user's advisory comment.
[0147] It should be noted that after replying to the user's comment, a reminder message can be pushed to the user who issued the consultation comment; wherein the reminder message is used to remind the user that the consultation comment has been replied. In this way, the user can know the video information of the feature video he consulted in time, so as to complete further viewing.
[0148] The solution provided by the present invention can identify whether there are consulting comments in the comment area of the target short video. If there are consulting comments, the target short video is extracted to obtain the video frame to be used; in the specified database, the target video frame matching the video frame to be used is determined; then based on the video information associated with the found target video frame, the video information of the feature video to which the target short video belongs is determined, and the video information of the feature video to which the target short video belongs is used to reply to the consulting comments. It can be seen that through this solution, when the user becomes interested in the short video and consults the video information, the consulting comments of the user on the feature video can be effectively replied, thereby improving the user experience.
[0149] Optionally, in another embodiment of the present invention, the frame information of each target video frame includes: an image feature vector; in this case, the construction method of the specified database may include:
[0150] Extract video frames from each candidate feature video to obtain multiple target video frames, and record the video information corresponding to each extracted target video frame; generate an image feature vector for each target video frame; and save the image feature vector of each target video frame and the video information of the candidate feature video to which the target video frame belongs to the correspondingly designated database.
[0151] Exemplarily, the method of generating the image feature vector of each target video frame may include: inputting each target video frame into a pre-trained feature extraction network to obtain the image feature vector of the target video frame. The introduction of the pre-trained feature extraction network can be found in the corresponding introduction below.
[0152] It can be understood that the frame information of each target video frame can also include: the target video frame itself; at this time, the difference between the construction method of the specified database and the above-mentioned construction method is that: after obtaining each target video frame, each target video frame and the corresponding video information can be directly saved in the specified database.
[0153] In this embodiment, when a user is interested in a short video and inquires about video information, an effective reply can be made to the user's inquiring comments on the feature video, thereby improving the user experience. In addition, the image feature vectors of each target video frame and the corresponding video information are recorded in the designated database, so that in the process of replying to the comment content, the target video frame matching the video frame to be used can be quickly found based on the designated database.
[0154] Optionally, in another embodiment of the present invention, the frame information of the target video frame may include: an image feature vector of the target video frame. In this case, the designated database may record the image feature vectors of the target video frames of multiple candidate feature videos.
[0155] Based on the designated database, a method of determining a target video frame matching a to-be-used video frame may include steps B1 and B2:
[0156] Step B1, generating an image feature vector of the video frame to be used as a target vector;
[0157] Step B2, based on the target vector and the image feature vectors of the target video frames of the candidate feature videos, determine the target video frame that matches the video frame to be used.
[0158] It is understandable that there are multiple ways to generate the image feature vector of the video frame to be used as the target vector. Exemplarily, the video frame to be used can be input into a pre-trained feature extraction network to obtain the image feature vector of the video frame to be used. It is understandable that the feature extraction network can be a part of the image classification network, and the image classification network can also include a fully connected layer network, etc.; after the image classification network training is completed, the feature extraction network in the image classification network can be used in the generation process of the image feature vector. Among them, the image classification network can be trained using sample images and the category label information corresponding to the sample images. The embodiment of the present invention does not limit the specific training process. In addition, the corresponding category label information can be different for different classification scenarios. Exemplarily, the image classification network can be a network for face classification. At this time, the category label information can be person A, person B, etc.
[0159] Exemplarily, in one implementation, based on the target vector and the image feature vectors of the target video frames of each candidate feature video, a method of determining the target video frame that matches the video frame to be used may include:
[0160] Based on the graph index retrieval method, multiple image feature vectors with the highest similarity to the target vector are retrieved from the image feature vectors of the target video frames of each candidate feature video;
[0161] From the target video frames to which the multiple image feature vectors belong, a target video frame whose similarity with the video frame to be used is greater than a predetermined threshold is selected to obtain a target video frame that matches the video frame to be used.
[0162] It is understandable that when analyzing the similarity between two vectors, the Euclidean distance can be used. Specifically, the similarity between the two vectors can be analyzed by analyzing the Euclidean distance between the two vectors. The smaller the Euclidean distance, the greater the similarity. In the process of selecting a target video frame whose similarity with the video frame to be used is greater than a predetermined threshold from the target video frames to which multiple image feature vectors belong, the threshold of the Euclidean distance can be set to 0.5. If the Euclidean distance value between the retrieved image feature vector and the target vector is less than 0.5, it is considered that the target video frame to which the retrieved image feature vector belongs has a similarity with the video frame to be used that is greater than the predetermined threshold. The target video frames that meet the conditions are screened to obtain target video frames that match the video frame to be used.
[0163] By retrieving multiple image feature vectors with high similarity to the target vector in this embodiment, and then comparing the similarity with a predetermined threshold, a target video frame matching the video frame to be used can be obtained from the target video frames to which the multiple image feature vectors belong. In this way, the validity and accuracy of the target video frame determined to match the video frame to be used can be guaranteed.
[0164] Exemplarily, the graph indexing method may be a HNSW graph indexing method. Those skilled in the art should know that the HNSW (Hierarchical Navigable Small World) graph indexing retrieval method introduces the concept of hierarchy compared to the traditional NSW (navigable small world) network. The NSW algorithm uses the characteristics of the small world for neighbor retrieval based on the six degrees of separation theory, and proposes a retrieval scheme based on the graph structure. On the basis of the NSW algorithm, HNSW uses a multi-layer graph structure to complete the construction and retrieval of the graph, so that by randomly dividing the nodes into different layers, in the retrieval from the upper graph to the lower graph, the closer the distance between the nodes in the lower layer, the worse the randomness, and the higher the clustering coefficient. HNSW completes the role of fast retrieval of Long Link (highway) in NSW through top-to-bottom retrieval, and completes the search of local nearest neighbors through the last bottom neighbor retrieval.
[0165] The method based on HNSW graph index retrieval includes:
[0166] The network graph is constructed by continuously inserting the feature vectors of the target video frame. For each feature vector of the target video frame to be inserted, an exponential decay probability distribution function is used to calculate the maximum layer that can be reached, so as to obtain a hierarchical network graph.
[0167] Taking the target feature vector as the entry point, K similar video frames whose similarity exceeds the preset threshold are obtained from each layer of the network graph.
[0168] In this way, by using the HNSW graph index retrieval method, the construction of the network graph can be completed in advance, so that each time a search is performed, the search can be performed directly to speed up the search. It can be understood that since the HNSW search method has the characteristics of fast search speed and high accuracy, the HNSW graph index retrieval method can improve the search speed of similar video frames.
[0169] Exemplarily, in another implementation, based on the target vector and the image feature vectors of the target video frames of each candidate feature video, a method of determining the target video frame that matches the video frame to be used may include:
[0170] Based on the target vector and the image feature vector of the target video frame of each candidate feature video, the similarity between each target video frame and the video frame to be used is calculated, and the target video frame whose similarity exceeds a preset threshold is used as the target video frame that matches the video frame to be used. In this embodiment, when the user becomes interested in the short video and consults the video information, the user's consultation comments on the feature video can be effectively responded to, thereby improving the user experience. In addition, by using the target vector, that is, the image feature vector of the video frame to be used, and the image feature vector of the target video frame of each candidate feature video, the target video frame that matches the video frame to be used can be determined, which can have a higher matching efficiency.
[0171] To facilitate understanding of the solution, a comment content reply method provided by an embodiment of the present invention is introduced below in conjunction with a specific embodiment.
[0172] like Figure 3 As shown, the processing process involved in the solution provided in this embodiment is specifically as follows:
[0173] (1) The comment content reply device obtains the real-time log stream of the APP end (corresponding to the log data or database of the comment content in the comment area of each short video mentioned above);
[0174] Among them, the server program of the short video APP (corresponding to the above-mentioned video client) can record various comments that appear, and when the user makes a comment, the comment is recorded as a real-time comment.
[0175] (2) The comment content reply device can identify whether there are consulting comments in the comments of the target short video by keyword matching (corresponding to the above identification of whether there are comments containing the specified keyword in the comments in the comment area of the target short video);
[0176] Among them, the comment content reply device can perform keyword matching on the recorded real-time comments on the APP side: identify whether the keywords in the real-time comments on the APP side match the keywords in the keyword list; among them, the keywords in the keyword list can be: what movie it is, what TV series it is, what is the name of the drama, where to watch it, which episode, etc.; of course, the keyword list can also be expanded, for example: replace the keywords in the keyword list with synonyms, and record the original keywords and the keywords after the synonym replacement as the expanded keywords.
[0177] (3) After keyword matching, the evaluation content reply device can identify consulting comments, which can also be called identifying qualified log streams. (4) After identifying consulting comments (i.e. qualified log streams), the comment content reply device can execute a short video recognition algorithm to determine the name of the feature video to which the target short video belongs (corresponding to the above-mentioned determination of the target video frame that matches the video frame to be used based on the specified database; and determination of the video information of the feature video to which the target short video belongs based on the video information associated with the found target video frame);
[0178] Short video recognition algorithm: Based on CV (computer vision) algorithm, it can identify the main film to which the short video belongs;
[0179] The short video to which the qualified comments belong is passed through a short video recognition algorithm to identify the name of the feature film corresponding to the short video.
[0180] The short video recognition algorithm can be divided into two stages: offline stage and online stage;
[0181] The offline stage includes: (a) extracting video frames from each candidate feature video accessible to the server or short video APP based on the FFMPEG (an open source computer program that can be used to record, convert digital audio and video, and convert them into streams) framework to obtain multiple target video frames. Specifically, for videos with a scene change number greater than or equal to a preset number threshold or a video duration greater than or equal to a preset time threshold, the video frame is extracted by scene transition extraction to obtain the target video frame; otherwise, the video frame is extracted by uniform frame extraction to obtain the target video frame, wherein each target video frame is a picture; at the same time, the feature name corresponding to each target video frame is recorded to form a data format of frame-feature name; (b) performing image preprocessing on the target video frame extracted in (a), such as image size conversion, mean subtraction, etc., and using the trained mobileNet network (a set of mobile-first computer vision models) to extract image features to obtain the image feature vector of each target video frame; (c) saving the image feature vector of each target video frame.
[0182] The online stage includes: when consulting comments are identified, the target short video is subjected to scene-by-scene frame extraction or uniform frame extraction to obtain multiple query frames (corresponding to the above-mentioned video frames to be used), and the feature representation vector of each query frame (corresponding to the above-mentioned target vector) is extracted using the offline trained mobileNet network; the feature representation vector of the obtained query frame is used to recall K similar frames from the image feature vectors of each target video frame and calculate the similarity using the HNSW algorithm. Based on a preset similarity threshold, the recall results of each query frame are filtered, that is, the recall frames below the preset similarity threshold are eliminated, and the result pairs of the recall frames matching the query frame and the similarity corresponding to the recall frames are obtained: recall frame-similarity; the result pairs are mapped to: feature film name-similarity; based on the mapping results, the feature film names are deduplicated, and the similarities of the repeated features film names are added to obtain a set of fusion results corresponding to each query frame (the number is greater than or equal to 0), and each fusion result includes: feature film name-weighted similarity), and the weighted similarity is the similarity after addition; finally, the feature film names of the fusion results of multiple query frames are deduplicated, and the weighted similarities corresponding to the feature film names are added; the feature film name with the highest similarity is selected as the feature film name of the feature video to which the target short video belongs.
[0183] (5) If the recognition is successful (i.e. the name of the feature film to which the target short video belongs is identified), the corresponding comment can be replied to and the user can be reminded in time in the form of a push message; if the recognition fails, it can be passed, that is, the consultation comment is skipped. Based on the video information of the feature film corresponding to the target short video identified by the short video recognition algorithm, the user's consultation comments can be replied to by calling the platform's intelligent robot or by replying through the client, which is reasonable. Then a push message is sent to the user to remind the user that the consultation comment has been replied and the user can continue watching the movie.
[0184] The solution provided by the present invention can identify whether there are consulting comments in the comment area of the target short video. If there are consulting comments, the target short video is extracted to obtain the video frame to be used; in the specified database, the target video frame matching the video frame to be used is determined; then based on the video information associated with the found target video frame, the video information of the feature video to which the target short video belongs is determined, and the video information of the feature video to which the target short video belongs is used to reply to the consulting comments. It can be seen that through this solution, when the user becomes interested in the short video and consults the video information, the consulting comments of the user on the feature video can be effectively replied, thereby improving the user experience.
[0185] Based on the above method embodiment, the present invention also provides a comment content reply device, such as Figure 4 As shown, the device comprises:
[0186] The identification module 410 is used to identify whether there are any consulting comments in the comment area of the target short video; wherein the consulting comments are comments for inquiring about the video information of the main video to which the target short video belongs;
[0187] The extraction module 420 is used to extract video frames from the target short video to obtain video frames to be used if the recognition result is yes;
[0188] The first determination module 430 is used to determine a target video frame that matches the video frame to be used based on a specified database; wherein the specified database records frame information of target video frames obtained by extracting frames from multiple candidate feature videos, and each target video frame is associated with video information of the candidate feature video to which it belongs;
[0189] The second determination module 440 is used to determine the video information of the main video to which the target short video belongs based on the video information associated with the found target video frame;
[0190] The reply module 450 is used to reply to the consulting comments by using the video information of the main video to which the target short video belongs.
[0191] The solution provided by the present invention can identify whether there are consulting comments in the comment area of the target short video. If there are consulting comments, the target short video is extracted to obtain the video frame to be used; in the specified database, the target video frame matching the video frame to be used is determined; then based on the video information associated with the found target video frame, the video information of the feature video to which the target short video belongs is determined, and the video information of the feature video to which the target short video belongs is used to reply to the consulting comments. It can be seen that through this solution, when the user becomes interested in the short video and consults the video information, the consulting comments of the user on the feature video can be effectively replied, thereby improving the user experience.
[0192] Optionally, the identification module is specifically used to:
[0193] Identify whether there are any comments containing the specified keyword in the comment area of the target short video. If so, identify that there are consulting comments in the comment area of the target short video.
[0194] The designated keyword is a keyword used to represent the queried video information.
[0195] Optionally, the extraction module is specifically used to: extract video frames from the target short video according to a predetermined frame extraction strategy to obtain video frames to be used; wherein the predetermined frame extraction strategy includes: if the number of video scene changes of the target short video is greater than or equal to a predetermined number threshold or the video itself is greater than or equal to a predetermined duration threshold, then use a transition frame extraction method to extract video frames; otherwise, use a uniform frame extraction method to extract video frames.
[0196] Optionally, the designated database records image feature vectors of target video frames of multiple candidate feature videos;
[0197] The first determination module includes:
[0198] A generating submodule, used for generating an image feature vector of the video frame to be used as a target vector;
[0199] A retrieval submodule, for retrieving, based on a graph index retrieval method, a plurality of image feature vectors ranked top in similarity to the target vector from the image feature vectors of the target video frames of the candidate feature videos;
[0200] The selection submodule is used to select a target video frame whose similarity with the video frame to be used is greater than a predetermined threshold from the target video frames to which the multiple image feature vectors belong, so as to obtain a target video frame matching the video frame to be used.
[0201] Optionally, the number of the found target video frames is multiple;
[0202] The second determination module is specifically used to: determine each candidate video information corresponding to the video frame to be used; wherein each candidate video information includes video information after deduplication of each video information associated with the found target video frame;
[0203] For each candidate video information corresponding to the video frame to be used, determine the similarity between the target video frame corresponding to the candidate video information and the video frame to be used, sum the determined similarities to obtain the similarity of the candidate video information; wherein the target video frame corresponding to the candidate video information is the target video frame associated with the candidate video information among the found target video frames;
[0204] Based on the similarity of each candidate video information corresponding to the to-be-used video frame, the video information of the main video to which the target short video belongs is determined.
[0205] Optionally, the number of the video frames to be used is multiple;
[0206] The second determination module includes:
[0207] The second determination submodule is used to:
[0208] Determine each piece of video information to be used; wherein each piece of video information to be used includes video information obtained after deduplication of candidate video information corresponding to each video frame to be used;
[0209] For each piece of video information to be used, summing up the similarities of the video information to be used to obtain the similarity of the video information to be used;
[0210] The video information to be used with the highest similarity is selected as the video information of the main video to which the target short video belongs.
[0211] Optionally, the reply module is specifically used for:
[0212] The video information of the main video to which the target short video belongs is used as the reply content of the consulting comment, and the comment content involved in the comment area of the target short video is updated using the reply content.
[0213] Optionally, the device further comprises:
[0214] The message sending module is used to push a reminder message to the user who issued the consultation comment after replying to the consultation comment using the video information of the main video to which the target short video belongs; wherein the reminder message is used to prompt the user that the consultation comment has been replied.
[0215] The embodiment of the present invention further provides an electronic device, such as Figure 5 As shown, it includes a processor 501, a communication interface 502, a memory 503 and a communication bus 504, wherein the processor 501, the communication interface 502, and the memory 503 communicate with each other through the communication bus 504.
[0216] Memory 503, used for storing computer programs;
[0217] The processor 501 is used to implement any method steps of replying to comment content when executing the program stored in the memory 503.
[0218] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0219] The communication interface is used for communication between the above terminal and other devices.
[0220] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0221] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0222] In another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the comment content reply method described in any of the above embodiments is implemented.
[0223] In another embodiment provided by the present invention, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the comment content replying method described in any one of the above embodiments.
[0224] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. 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 computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). 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 includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0225] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0226] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and electronic device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0227] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A method for replying to comment content, It is characterized in that The method comprises: Identify whether there are consulting comments in the comment area of the target short video; wherein the consulting comments are comments for inquiring about the video information of the main video to which the target short video belongs; and the target short video is a clip video; If the recognition result is yes, extract the video frame of the target short video to obtain the video frame to be used; Based on a designated database, a target video frame matching the to-be-used video frame is determined; wherein the designated database records frame information of target video frames obtained by extracting frames from a plurality of candidate feature videos, and each target video frame is associated with video information of the candidate feature video to which it belongs; Based on the video information associated with the found target video frame, determine the video information of the main video to which the target short video belongs; Reply to the consultation comments using the video information of the main video to which the target short video belongs; The step of extracting video frames from the target short video to obtain video frames to be used includes: Extracting video frames from the target short video according to a predetermined frame extraction strategy to obtain video frames to be used; The predetermined frame extraction strategy includes: if the number of video scene changes of the target short video is greater than or equal to a predetermined number threshold or the duration of the video itself is greater than or equal to a predetermined duration threshold, then a transition frame extraction method is adopted to extract video frames; The number of the found target video frames is multiple; The step of determining the video information of the main video to which the target short video belongs based on the video information associated with the found target video frame includes: Determine each candidate video information corresponding to the video frame to be used; wherein each candidate video information includes video information after deduplication of each video information associated with the found target video frame; For each candidate video information corresponding to the video frame to be used, determine the similarity between the target video frame corresponding to the candidate video information and the video frame to be used, sum the determined similarities to obtain the similarity of the candidate video information; wherein the target video frame corresponding to the candidate video information is the target video frame associated with the candidate video information among the found target video frames; Based on the similarity of each candidate video information corresponding to the to-be-used video frame, the video information of the main video to which the target short video belongs is determined.
2. The method according to claim 1, It is characterized in that Whether there are consulting comments in the comment area of the target short video includes: Identify whether there are any comments containing the specified keyword in the comments section of the target short video, and if so, identify that there are consulting comments in the comment section of the target short video; The designated keyword is a keyword used to represent the queried video information.
3. The method according to claim 1, It is characterized in that The predetermined frame extraction strategy includes: if the number of video scene changes of the target short video is less than a predetermined number threshold or the duration of the video itself is greater than or equal to a predetermined duration threshold, a uniform frame extraction method is used to extract video frames.
4. The method according to claim 1, It is characterized in that The designated database records image feature vectors of target video frames of multiple candidate feature videos; The step of determining a target video frame matching the to-be-used video frame based on a designated database includes: Generate an image feature vector of the video frame to be used as a target vector; Based on the graph index retrieval method, from the image feature vectors of the target video frames of each candidate feature video, multiple image feature vectors ranked top in similarity to the target vector are retrieved; From the target video frames to which the multiple image feature vectors belong, a target video frame whose similarity with the video frame to be used is greater than a predetermined threshold is selected to obtain a target video frame that matches the video frame to be used.
5. The method according to claim 1, It is characterized in that The number of the video frames to be used is multiple; The step of determining the video information of the main video to which the target short video belongs based on the similarity of each candidate video information corresponding to the video frame to be used includes: Determine each piece of video information to be used; wherein each piece of video information to be used includes video information obtained after deduplication of candidate video information corresponding to each video frame to be used; For each piece of video information to be used, summing up the similarities of the video information to be used to obtain the similarity of the video information to be used; The video information to be used with the highest similarity is selected as the video information of the main video to which the target short video belongs.
6. The method according to any one of claims 1 to 5, It is characterized in that The using the video information of the main video to which the target short video belongs to reply to the consultation comment includes: The video information of the main video to which the target short video belongs is used as the reply content of the consulting comment, and the comment content involved in the comment area of the target short video is updated using the reply content.
7. The method according to any one of claims 1 to 5, It is characterized in that After replying to the consultation comments using the video information of the main video to which the target short video belongs, the method further includes: Push a reminder message to the user who issued the consulting comment; wherein the reminder message is used to prompt the user that the consulting comment has been replied.
8. A comment content reply device, It is characterized in that The device comprises: an identification module, used to identify whether there are consulting comments in the comment area of a target short video; wherein the consulting comments are comments for inquiring about the video information of the feature video to which the target short video belongs; and the target short video is a clip video; An extraction module, configured to extract video frames from the target short video to obtain video frames to be used if the recognition result is yes; A first determination module is used to determine a target video frame matching the to-be-used video frame based on a specified database; wherein the specified database records frame information of target video frames obtained by extracting frames from a plurality of candidate feature videos, and each target video frame is associated with video information of the candidate feature video to which it belongs; A second determination module is used to determine the video information of the main video to which the target short video belongs based on the video information associated with the found target video frame; A reply module, used to reply to the consulting comments using the video information of the main video to which the target short video belongs; The extraction module is specifically used for: Extracting video frames from the target short video according to a predetermined frame extraction strategy to obtain video frames to be used; The predetermined frame extraction strategy includes: if the number of video scene changes of the target short video is greater than or equal to a predetermined number threshold or the duration of the video itself is greater than or equal to a predetermined duration threshold, then a transition frame extraction method is adopted to extract video frames; The number of the found target video frames is multiple; The second determining module is specifically used to: Determine each candidate video information corresponding to the video frame to be used; wherein each candidate video information includes video information after deduplication of each video information associated with the found target video frame; For each candidate video information corresponding to the video frame to be used, determine the similarity between the target video frame corresponding to the candidate video information and the video frame to be used, sum the determined similarities to obtain the similarity of the candidate video information; wherein the target video frame corresponding to the candidate video information is the target video frame associated with the candidate video information among the found target video frames; Based on the similarity of each candidate video information corresponding to the to-be-used video frame, the video information of the main video to which the target short video belongs is determined.
9. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1 to 7 when executing a program stored in a memory.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Video clip positioning method, server, client and electronic equipment
CN111294660A
Information processing method and device and electronic equipment
CN112287171A
Video data processing method and device, equipment and medium
CN113395584A
