Video analysis method, device, computer equipment and storage medium
By determining the target video frame of the video program in the video management platform, the problem of difficulty in distinguishing the substantive and non-substantive content of the video program is solved, more accurate start and end position annotation and personalized management are achieved, and efficiency is improved.
Patent Information
- Application Number
- CN202211690922.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-27
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2042-12-27
AI Technical Summary
In the video management platform, it is difficult to distinguish the substantive content and non-substantive content of video programs, resulting in large labeling errors and low efficiency, especially when the similarity between the non-substantive content and substantive content in variety shows is high.
By obtaining the video data to be analyzed, candidate video frames related to the preset content are determined, and target video frames are determined based on these frames, thereby indicating the start and end positions of the preset content, reducing annotation errors and improving efficiency. Specific methods include screening candidate video frames based on content features, identifying position gaps and displacement directions of consecutive video frames, and identifying transition video frames through pixel value differences.
It effectively reduces the error in labeling the start and end positions of non-substantive content or substantive content, improves labeling efficiency, and enables personalized management in the video management platform, such as intelligently skipping ending content and recommending related film and television programs.
Smart Images

Figure CN116017047B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of multimedia technology, and in particular to a video analysis method, apparatus, computer equipment, and storage medium. Background Art
[0002] With the development of video networks, more and more netizens watch video programs through the Internet. These video programs usually include substantial content and non-substantial content. For example, when the video program is a variety show, the non-substantial content may be the opening, ending, promotion and other content, and the substantial content may be the main film.
[0003] When a video management platform manages the video program, or a user watches the video program through an application, there is a need to distinguish between the substantial content and the non-substantial content of the video program. However, it is difficult to distinguish between the substantial content and the non-substantial content of the video program. For example, when the video program is a variety show, the non-substantial content is often very similar to the substantial content, resulting in large errors in marking the start and end positions of the non-substantial content or the substantial content, and low marking efficiency. Summary of the invention
[0004] The embodiments of the present disclosure at least provide a video analysis method, apparatus, computer equipment, and storage medium.
[0005] In a first aspect, an embodiment of the present disclosure provides a video analysis method, including:
[0006] Obtain video data to be analyzed;
[0007] Determining candidate video frames related to preset content in the video data to be analyzed;
[0008] Based on the position of the candidate video frame in the video data to be analyzed, a target video frame is determined in the candidate video frames; wherein the target video frame is used to indicate the start and end positions of the preset content in the video data to be analyzed.
[0009] In an optional implementation manner, determining candidate video frames related to preset content in the video data to be analyzed includes:
[0010] Determine the key information for screening based on the content features corresponding to the preset content;
[0011] Determine candidate video frames in the video data to be analyzed that match the screening key information.
[0012] In an optional implementation manner, determining candidate video frames related to preset content in the video data to be analyzed includes:
[0013] Identifying consecutive video frames including at least partially identical content in the video data to be analyzed;
[0014] Determining a position difference of the at least partially identical content in the consecutive video frames;
[0015] Determine candidate video frames in the continuous video frames whose position difference satisfies a movement condition.
[0016] In an optional implementation manner, determining the candidate video frames whose position difference satisfies the movement condition in the continuous video frames includes:
[0017] Based on the position difference, determining a displacement direction of the at least partially identical content between the consecutive video frames;
[0018] Based on the position difference, determining a displacement distance of the at least partially identical content between the consecutive video frames;
[0019] A preset number of candidate video frames whose displacement directions and displacement distances satisfy the displacement condition are determined in the continuous video frames.
[0020] In an optional implementation manner, determining candidate video frames related to preset content in the video data to be analyzed includes:
[0021] Determining pixel values corresponding to the video frames in the video data to be analyzed based on pixel points of the video frames in the video data to be analyzed;
[0022] Adjacent video frames having pixel value differences exceeding a pixel threshold are determined, and candidate video frames are determined among the adjacent video frames.
[0023] In an optional implementation, determining the target video frame in the candidate video frames based on the position of the candidate video frame in the video data to be analyzed includes:
[0024] Determine a first video frame whose position satisfies a position condition among the candidate video frames;
[0025] Determine a second video frame adjacent to the first video frame among the candidate video frames;
[0026] A time interval between the first video frame and the second video frame is determined, and a target video frame is determined between the first video frame and the second video frame based on the time interval.
[0027] In an optional implementation manner, determining the target video frame between the first video frame and the second video frame based on the time interval includes:
[0028] determining whether the time interval exceeds a time threshold;
[0029] In a case where the time interval exceeds the time threshold, determining the second video frame as a target video frame;
[0030] When the time interval does not exceed the time threshold, the first video frame is determined as a target video frame.
[0031] In a second aspect, the present disclosure also provides a video analysis device, including:
[0032] An acquisition unit, used for acquiring video data to be analyzed;
[0033] A first determining unit, configured to determine candidate video frames related to preset content in the video data to be analyzed;
[0034] The second determining unit is used to determine a target video frame in the candidate video frames based on the position of the candidate video frame in the video data to be analyzed; wherein the target video frame is used to indicate the starting and ending positions of the preset content in the video data to be analyzed.
[0035] In a third aspect, an embodiment of the present disclosure further provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect, or any possible implementation of the first aspect are performed.
[0036] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are executed.
[0037] In the disclosed embodiment, first, the video data to be analyzed can be obtained, and candidate video frames related to preset content can be determined in the video data to be analyzed, where the preset content can be the above-mentioned non-essential content. Next, based on the position of the candidate video frame in the video data to be analyzed, a target video frame can be determined in the candidate video frame, so as to determine the start and end positions of the preset content in the video data to be analyzed based on the target video frame, thereby reducing the error when marking the start and end positions of non-essential content or substantial content, and improving the marking efficiency.
[0038] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0040] Figure 1 A flow chart of a video analysis method provided by an embodiment of the present disclosure is shown;
[0041] Figure 2 A schematic diagram showing a video frame when displaying end credits in a variety show provided by an embodiment of the present disclosure is shown;
[0042] Figure 3 A flowchart of another video analysis method provided by an embodiment of the present disclosure is shown;
[0043] Figure 4 A schematic diagram of a video analysis device provided by an embodiment of the present disclosure is shown;
[0044] Figure 5 A schematic diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0045] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0046] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0047] The term "and / or" herein only describes an association relationship, indicating that three relationships may exist. For example, A and / or B may represent the following three situations: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C may represent including any one or more elements selected from the set consisting of A, B, and C.
[0048] When a video management platform manages a video program, or a user watches the video program through an application, there is a need to distinguish between the substantial content and the non-substantial content of the video program. However, it is difficult to distinguish between the substantial content and the non-substantial content of the video program. For example, when the video program is a variety show, the non-substantial content is often very similar to the substantial content, resulting in large errors in marking the start and end positions of the non-substantial content or the substantial content, and low marking efficiency.
[0049] Based on the above research, the present disclosure provides a video analysis method, apparatus, computer equipment and storage medium. In an embodiment of the present disclosure, first, video data to be analyzed can be obtained, and candidate video frames related to preset content can be determined in the video data to be analyzed, where the preset content can be the above-mentioned non-essential content. Next, based on the position of the candidate video frame in the video data to be analyzed, a target video frame can be determined in the candidate video frame, so as to determine the start and end positions of the preset content in the video data to be analyzed based on the target video frame, thereby reducing the error when marking the start and end positions of non-essential content or substantial content, and improving the marking efficiency.
[0050] To facilitate understanding of this embodiment, a video analysis method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the video analysis method provided in the embodiment of the present disclosure is generally a computer device with certain computing capabilities. In some possible implementations, the video analysis method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0051] In the video analysis method provided by the present disclosure, the video management platform can be installed in the computer device. The video management platform can perform personalized management on the video program based on the start and end positions of the preset content in the determined video program. For example, when the preset content is the ending of a variety show, the personalized management can be: intelligently skipping the ending when the user is watching. Determine whether the user's viewing progress is the ending, and decide whether the viewing is complete based on the viewing progress. When the viewing progress is not at the ending, determine that the user has not finished watching, and recommend the variety show to the user on the homepage. Otherwise, do not recommend the variety show to the user on the homepage. Based on the start and end positions of the ending, place related content of the film and television program, such as recommendations for film and television programs of the same type, jump to the next episode, promotion, etc.
[0052] See also Figure 1 FIG. 1 is a flowchart of a video analysis method provided by an embodiment of the present disclosure, wherein the method includes steps S101 to S105, wherein:
[0053] S101: Obtain video data to be analyzed.
[0054] In the disclosed embodiment, firstly, the video program can be obtained through the above-mentioned video management platform, and the video data to be analyzed can be determined in the video program. Here, the video program can be intercepted according to a preset ratio to obtain the video data to be analyzed, so as to reduce the amount of calculation when marking the video program.
[0055] Specifically, when intercepting the video program, an estimate can be made based on the area where the content to be identified is located, and interception can be performed according to the estimated result. For example, if the content to be identified is the ending of the above-mentioned non-essential content, then an estimate can be made for the ending, and the determined preset ratio can be 20%. When intercepting, the last 20% of the video portion of the above-mentioned video program can be intercepted, thereby obtaining the above-mentioned video data to be analyzed.
[0056] S103: Determine candidate video frames related to preset content in the video data to be analyzed.
[0057] In the disclosed embodiment, the preset content may be content that is desired to be identified in the video program, for example, the ending of the non-essential content. Before determining the candidate video frames related to the preset content in the video data to be analyzed, the video to be analyzed may first be subjected to frame extraction processing to obtain a video frame collection corresponding to the video frame to be analyzed.
[0058] Here, the frame extraction processing method can be second-level frame extraction, that is, extracting a fixed number of video frames from the video data per second, thereby obtaining the video frame collection, so as to further reduce the amount of computation of the device. For example, if the number of frames per second of the video data to be analyzed is 24 frames, then during the frame extraction processing, the first video frame of the 24 frames corresponding to each second can be extracted, thereby obtaining the video frame collection.
[0059] In specific implementation, a tool capable of implementing the second-level frame extraction can be selected to implement the frame extraction processing of the video data, for example, ffmpeg (a video processing tool). When performing the frame extraction processing, a fixed number of video frames can be extracted from the video frames at a fixed interval, for example, the fixed interval can be the first frame per second, the last frame per second, etc., and the fixed number of frames can be one frame or multiple frames, which is not specifically limited in the present disclosure.
[0060] After determining the video frame collection, the candidate video frames related to the preset content can be screened in the video frame collection. Here, the content features of the preset content can be summarized in advance, so as to perform screening based on the content features, wherein the content features can be the same content commonly included in different preset contents. For example, when the preset content is the above-mentioned ending, the content features of the preset content can be keywords that usually appear in the ending.
[0061] S105: Determine a target video frame in the candidate video frames based on the position of the candidate video frame in the video data to be analyzed; wherein the target video frame is used to indicate the start and end positions of the preset content in the video data to be analyzed.
[0062] In the disclosed embodiment, there may be multiple content features corresponding to the above-mentioned preset content, and therefore, there may be multiple corresponding candidate video frames screened out based on the content features, wherein the corresponding positions of each candidate video frame in the video data to be analyzed may be different.
[0063] When determining the target video frame from the candidate video frames, the confidence of each candidate video frame can be determined first, wherein the confidence can be the probability that the candidate video frame is used to indicate the start and end positions of the preset content in the video data to be analyzed. Next, the candidate video frame whose confidence meets the confidence condition can be determined as the target video frame. Here, the confidence condition can be to determine the candidate video frame with the highest confidence as the target video frame, or to determine the candidate video frame whose confidence meets the probability threshold as the target video frame, thereby improving the accuracy of the determined start and end positions of the preset content in the video data to be analyzed, wherein the start and end positions can include the starting position or the ending position.
[0064] It can be seen from the above description that in the embodiment of the present disclosure, firstly, the video data to be analyzed can be obtained, and candidate video frames related to the preset content can be determined in the video data to be analyzed, where the preset content can be the above-mentioned non-essential content. Next, based on the position of the candidate video frame in the video data to be analyzed, a target video frame can be determined in the candidate video frame, so as to determine the start and end positions of the preset content in the video data to be analyzed based on the target video frame, thereby reducing the error when marking the start and end positions of the non-essential content or the substantial content, and improving the marking efficiency.
[0065] In an optional implementation, the above step S103, determining candidate video frames related to preset content in the video data to be analyzed, specifically includes the following process:
[0066] S11: Determine key screening information based on content features corresponding to the preset content.
[0067] In the disclosed embodiment, firstly, a large number of video programs can be obtained through the above-mentioned video management platform, and the preset contents of the obtained video programs can be identified, so as to determine the same or similar contents between the preset contents of these video programs, and determine the content features corresponding to the preset contents based on the same or similar contents.
[0068] After determining the content feature, key filtering information may be determined based on the content feature. For example, when the content feature is displaying sponsors, the determined key filtering information may include keywords such as "exclusive title sponsorship" and "special sponsorship". When the content feature is displaying producers, the determined key filtering information may include the keyword "producer".
[0069] S12: Determine candidate video frames in the video data to be analyzed that match the screening key information.
[0070] After determining the above-mentioned filtering keywords, a collection of video frames corresponding to the video data to be analyzed can be obtained, and text detection and recognition processing can be performed on the video frames in the collection of video frames, and the recognized text can be matched with the keywords in the above-mentioned filtering key information to obtain candidate video frames including the keyword.
[0071] In the disclosed embodiment, the content features of the preset content can be identified, and the key filtering information can be determined based on the content features to filter out the candidate video frames based on the key filtering information, so that the confidence of the determined candidate video frames is higher, thereby improving the confidence of the target video frames determined based on the candidate video frames.
[0072] In an optional implementation, the above step S103, determining candidate video frames related to preset content in the video data to be analyzed, specifically includes the following process:
[0073] S21: Identify consecutive video frames including at least partially identical content in the video data to be analyzed.
[0074] In the disclosed embodiment, since the above-mentioned preset content often displays the end credits, such as Figure 2 The figure shows a video frame when the end credits are displayed in the variety show. Based on this, the video frame including the end credits in the video data to be analyzed can be identified.
[0075] It should be understood that the end credits are often displayed continuously at a preset scrolling speed. Therefore, when the end credits are displayed, there will be an indication that some of the content is the same before adjacent video frames. Based on this, the continuous video frames that include at least some of the same content in the video data to be analyzed can be first identified.
[0076] Specifically, first, the above video frame collection can be obtained, and the text box in the video frame in the video frame collection can be identified, wherein the text box includes the identified text content. After identifying the text box, the video frame n frames after the video frame can be obtained to determine whether there is a text box with at least part of the same content in the video frame n frames. If so, the continuous video frames of the n+1 frames can be obtained. Here, n can be a positive integer, such as 4.
[0077] S22: Determine the position difference of the at least partially identical content in the consecutive video frames.
[0078] S23: Determine, in the continuous video frames, candidate video frames whose positional differences satisfy a displacement condition.
[0079] In an embodiment of the present disclosure, the above-mentioned continuous video frames can be stacked, so that the contents in multiple continuous video frames are superimposed on the same layer to determine the position difference between adjacent continuous video frames of the same content in the multiple continuous video frames, wherein the position difference may include the displacement direction and the displacement distance.
[0080] Next, it can be determined whether the displacement condition satisfies the position difference, and the candidate video frame is determined based on the continuous video frames that satisfy the position difference. Specifically, when the preset content is the end credits, the first video frame in the continuous video frames can be determined as the candidate video frame.
[0081] In an embodiment of the present disclosure, continuous video frames that include at least part of the same content in the video data to be analyzed can be used to determine continuous video frames that may include end credits, so as to determine candidate video frames based on the continuous video frames. Since the end credits may be content among the above-mentioned preset content, the present disclosure improves the confidence of the determined candidate video frames, thereby improving the confidence of the target video frames determined based on the candidate video frames.
[0082] In an optional implementation, the above step S23, determining the candidate video frames whose position difference satisfies the moving condition in the continuous video frames, specifically includes the following process:
[0083] (1) determining a displacement direction of the at least partially identical content between the consecutive video frames based on the position difference;
[0084] (2) determining a displacement distance of the at least partially identical content between the consecutive video frames based on the position difference;
[0085] (3) Determine a preset number of candidate video frames whose displacement directions and displacement distances satisfy the displacement conditions in the continuous video frames.
[0086] In the embodiments of the present disclosure, since the above-mentioned end credits are often displayed in a scrolling manner, during the scrolling display process, the above-mentioned at least part of the same content usually moves in the horizontal or vertical direction. Therefore, the moving direction of at least part of the same content between consecutive video frames can be determined first based on the position difference.
[0087] Similarly, as can be seen from the above, when displaying the end credits, they are often displayed at a preset scrolling speed, resulting in the displacement distance of at least part of the same content in consecutive video frames being the same. Therefore, the moving distance of at least part of the same content between consecutive video frames can also be determined based on the position difference.
[0088] In the disclosed embodiment, the displacement condition defines the displacement direction and displacement distance of the same content in the continuous video frames, so that the continuous video frames that meet the displacement condition are determined to be video frames that scroll to display the end credits. For example, the displacement condition defines that the displacement direction of the same content can be horizontal or vertical, and the defined displacement distance can be determined based on the scrolling speed, for example, 20px.
[0089] After determining that the continuous video frames satisfy the displacement direction and displacement distance, a preset number of candidate video frames can be determined in the continuous video frames, thereby reducing the number of determined candidate video frames to reduce the amount of calculation when the device subsequently determines the target video frame based on the candidate video frames.
[0090] In the embodiments of the present disclosure, continuous video frames can be screened based on displacement conditions to determine continuous video frames that may include end credits, and candidate video frames can be determined based on the continuous video frames, thereby increasing the confidence of the determined candidate video frames, and further increasing the confidence of the target video frames determined based on the candidate video frames.
[0091] In an optional implementation, the above step S103, determining candidate video frames related to preset content in the video data to be analyzed, specifically includes the following process:
[0092] S31: Determine pixel values corresponding to the video frames in the video data to be analyzed based on pixel points of the video frames in the video data to be analyzed.
[0093] In the disclosed embodiments, the variety show may also display preset content through transitions (i.e., video scene transitions). For example, when the preset content is the ending credits, when switching from the main film to the ending credits, the conversion may be performed through transitions. Alternatively, when displaying the ending credits, the display may be performed through multi-scene transition video frames. For example, the nth frame displays the sponsor, and the n+mth frame performs a transition to display the producer.
[0094] Based on this, the transition video frame in the above-mentioned video frame collection can be identified, wherein the difference in pixel value of each pixel point in the transition video frame and the adjacent video frame is large. For example, when the transition is performed in a black screen conversion mode, the pixel value of the pixel point in the transition video frame is less than 10, and the adjacent video frame of the transition video frame renders the screen content normally, so the pixel value difference with the pixel point in the transition video frame is large. Therefore, when specifically identifying the transition video frame, the pixel value of each pixel point in the video frame of the above-mentioned video frame collection can be obtained, and the pixel value of each pixel point in the adjacent video frame can be compared.
[0095] S32: Determine adjacent video frames whose pixel value differences exceed a pixel threshold, and determine candidate video frames among the adjacent video frames.
[0096] After determining the pixel value of each pixel in the candidate video frame, a comparison can be performed on adjacent video frames in the candidate video frame. Specifically, the difference in pixel value of each pixel in adjacent video frames can be determined to obtain a difference matrix, and then it can be determined whether the difference value indicated by the difference matrix exceeds the pixel threshold.
[0097] When the determined difference value exceeds the pixel threshold, it can be determined that there is a transition video frame in the adjacent video frames. Specifically, the transition video frame is usually the last video frame in the adjacent video frames, and the last video frame can be determined as the candidate video frame.
[0098] In the embodiments of the present disclosure, considering that the content displayed in the above-mentioned video data to be analyzed can be switched to preset content by means of transition, the present disclosure determines the transition video frame by comparing the difference values of the pixel values of adjacent video frames, so as to determine the transition video frame as a candidate video frame, thereby improving the confidence of the determined candidate video frame, and further improving the confidence of the target video frame determined based on the candidate video frame.
[0099] In an optional implementation, the above step S105, based on the position of the candidate video frame in the video data to be analyzed, determines the target video frame in the candidate video frames, specifically includes the following process:
[0100] S1051: Determine a first video frame whose position satisfies a position condition among the candidate video frames.
[0101] In the disclosed embodiment, it is considered that in the variety show, the non-preset content part may also be detected as a candidate video frame. For example, a candidate video frame including the above-mentioned keyword is detected in the non-preset content part, and therefore, the confidence of the candidate video frame needs to be analyzed, so as to determine the target video frame based on the confidence.
[0102] In a specific implementation, the first video frame whose position satisfies the position condition can first be determined among the candidate video frames, wherein the position condition can be a position that is highly correlated with non-preset content. The first video frame determined based on the position condition is more likely to be non-preset content, that is, the confidence of the candidate video frame is lower. For example, the position condition can be used to screen the video frame that is ranked first among the candidate video frames.
[0103] S1052: Determine a second video frame adjacent to the first video frame in the candidate video frames.
[0104] S1053: Determine a time interval between the first video frame and the second video frame, and based on the time interval, determine a target video frame between the first video frame and the second video frame.
[0105] In the embodiment of the present disclosure, after determining the first video frame, a second video frame adjacent to the candidate video frame can be determined in the candidate video frames, and the time interval between the first video frame and the second video frame can be determined. Next, a comparison result of the time interval and a time threshold can be determined, and based on the comparison result, a video frame with a better confidence can be determined in the first video frame and the second video frame, and the video frame is determined as the target video frame.
[0106] Based on this, in an embodiment of the present disclosure, the confidence of the first video frame can be determined based on the time interval between the first video frame and the adjacent second video frame in the candidate video frame, so as to determine the target video frame between the first video frame and the second video frame based on the confidence.
[0107] In an optional implementation, the above step S1053, determining the target video frame between the first video frame and the second video frame based on the time interval, specifically includes the following process:
[0108] (1) determining whether the time interval exceeds a time threshold;
[0109] (2) when the time interval exceeds the time threshold, determining the second video frame as a target video frame;
[0110] (3) When the time interval does not exceed the time threshold, determine the first video frame as the target video frame.
[0111] In the embodiment of the present disclosure, when the above-mentioned time interval exceeds the time threshold, it can be determined that the confidence of the first video frame is poor and is smaller than that of the second video frame; when the above-mentioned time interval does not exceed the time threshold, it can be determined that the confidence of the first video frame is good and is greater than that of the second video frame.
[0112] Specifically, if the time interval exceeds the time threshold, it can be determined that the confidence of the first video frame is poor, and the first video frame is determined as an invalid video frame, and the second video frame is determined as the target video frame. If the time interval does not exceed the time threshold, it can be determined that the confidence of the first video frame is good, and the first video frame is determined as the target video frame.
[0113] For example, the first video frame is a video frame including the above-mentioned keyword, the time interval between the first video frame and the second video frame is 5 minutes, and the time threshold is 1 minute, then, it can be determined that the confidence of the first video frame is poor, and the first video frame is determined as an invalid video frame. After the first video frame is determined as an invalid video frame, the second video frame can be determined as a target video frame. In addition, if the time interval between the first video frame and the second video frame is less than the time threshold, then, it can be determined that the confidence of the first video frame is good, and the first video frame is determined as a target video frame.
[0114] In the embodiment of the present disclosure, the confidence of the first video frame may be determined based on the time interval between the first video frame and the adjacent second video frame in the candidate video frames, so as to determine the target video frame between the first video frame and the second video frame based on the confidence.
[0115] See Figure 3As shown, a flowchart of another video analysis method provided by an embodiment of the present disclosure includes steps S301 to S306, wherein:
[0116] S301: Obtain video data to be analyzed.
[0117] S302: Extract frames from the video data to be analyzed to obtain the video frame collection.
[0118] In the embodiment of the present disclosure, the frame extraction process of the frame extraction processing is as described above. Figure 1 The corresponding embodiments are described and will not be repeated here.
[0119] S303: Perform text detection processing on the video frames in the video frame collection to obtain text detection results.
[0120] In the embodiment of the present disclosure, the text detection process can identify the text content in the video frame and obtain a text detection result including the above-mentioned text box.
[0121] S304: Based on the text detection result, determine the candidate video frames that match the above-mentioned screening key information.
[0122] In the embodiment of the present disclosure, the method for determining the candidate video frame matching the above-mentioned screening key information is as described in the embodiment corresponding to the above-mentioned step S103, which will not be repeated here.
[0123] S305: Based on the text detection result, determine consecutive video frames including at least part of the same content, and determine candidate video frames in which the position difference of the same content satisfies the movement condition in the consecutive video frames.
[0124] In the embodiment of the present disclosure, the method of determining consecutive video frames including at least part of the same content and determining candidate video frames whose position difference of the same content in the consecutive video frames meets the movement condition is as described in the embodiment corresponding to the above step S103 and will not be repeated here.
[0125] S306: Determine a target video frame from the candidate video frames based on the processing logic.
[0126] In the embodiment of the present disclosure, based on the processing logic, the method of determining the target video frame from the candidate video frames is as described in the embodiment corresponding to the above step S105, which will not be repeated here.
[0127] In summary, in the disclosed embodiment, first, the video data to be analyzed can be obtained, and candidate video frames related to preset content can be determined in the video data to be analyzed, where the preset content can be the above-mentioned non-essential content. Next, based on the position of the candidate video frame in the video data to be analyzed, a target video frame can be determined in the candidate video frame, so as to determine the start and end positions of the preset content in the video data to be analyzed based on the target video frame, thereby reducing the error when marking the start and end positions of non-essential content or substantial content, and improving the marking efficiency.
[0128] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.
[0129] Based on the same inventive concept, a video analysis device corresponding to the video analysis method is also provided in the embodiment of the present disclosure. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned video analysis method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.
[0130] Reference Figure 4 FIG. 1 is a schematic diagram of a video analysis device provided by an embodiment of the present disclosure, wherein the device comprises: an acquisition unit 41, a first determination unit 42, and a second determination unit 43; wherein:
[0131] An acquisition unit 41, used to acquire video data to be analyzed;
[0132] A first determining unit 42, configured to determine candidate video frames related to preset content in the video data to be analyzed;
[0133] The second determining unit 43 is used to determine a target video frame in the candidate video frames based on the position of the candidate video frame in the video data to be analyzed; wherein the target video frame is used to indicate the start and end positions of the preset content in the video data to be analyzed.
[0134] In the disclosed embodiment, first, the video data to be analyzed can be obtained, and candidate video frames related to preset content can be determined in the video data to be analyzed, where the preset content can be the above-mentioned non-essential content. Next, based on the position of the candidate video frame in the video data to be analyzed, a target video frame can be determined in the candidate video frame, so as to determine the start and end positions of the preset content in the video data to be analyzed based on the target video frame, thereby reducing the error when marking the start and end positions of non-essential content or substantial content, and improving the marking efficiency.
[0135] In a possible implementation manner, the first determining unit 42 is further configured to:
[0136] Determine the key information for screening based on the content features corresponding to the preset content;
[0137] Determine candidate video frames in the video data to be analyzed that match the screening key information.
[0138] In a possible implementation manner, the first determining unit 42 is further configured to:
[0139] Identifying consecutive video frames including at least partially identical content in the video data to be analyzed;
[0140] Determining a position difference of the at least partially identical content in the consecutive video frames;
[0141] Determine candidate video frames in the continuous video frames whose position difference satisfies a movement condition.
[0142] In a possible implementation manner, the first determining unit 42 is further configured to:
[0143] Based on the position difference, determining a displacement direction of the at least partially identical content between the consecutive video frames;
[0144] Based on the position difference, determining a displacement distance of the at least partially identical content between the consecutive video frames;
[0145] A preset number of candidate video frames whose displacement directions and displacement distances satisfy the displacement condition are determined in the continuous video frames.
[0146] In a possible implementation manner, the first determining unit 42 is further configured to:
[0147] Determining pixel values corresponding to the video frames in the video data to be analyzed based on pixel points of the video frames in the video data to be analyzed;
[0148] Adjacent video frames having pixel value differences exceeding a pixel threshold are determined, and candidate video frames are determined among the adjacent video frames.
[0149] In a possible implementation manner, the second determining unit 43 is further configured to:
[0150] Determine a first video frame whose position satisfies a position condition among the candidate video frames;
[0151] Determine a second video frame adjacent to the first video frame among the candidate video frames;
[0152] A time interval between the first video frame and the second video frame is determined, and a target video frame is determined between the first video frame and the second video frame based on the time interval.
[0153] In a possible implementation manner, the second determining unit 43 is further configured to:
[0154] determining whether the time interval exceeds a time threshold;
[0155] In a case where the time interval exceeds the time threshold, determining the second video frame as a target video frame;
[0156] When the time interval does not exceed the time threshold, the first video frame is determined as a target video frame.
[0157] For descriptions of the processing flow of each unit in the device and the interaction flow between each unit, reference may be made to the relevant descriptions in the above method embodiments, which will not be described in detail here.
[0158] Corresponds to Figure 1 The video analysis method in the present disclosure also provides a computer device 500, such as Figure 5 FIG. 5 is a schematic diagram of the structure of a computer device 500 provided in an embodiment of the present disclosure, including:
[0159] Processor 51, memory 52, and bus 53; memory 52 is used to store execution instructions, including memory 521 and external memory 522; memory 521 here is also called internal memory, which is used to temporarily store operation data in processor 51 and data exchanged with external memory 522 such as hard disk. Processor 51 exchanges data with external memory 522 through memory 521. When the computer device 500 is running, the processor 51 communicates with the memory 52 through bus 53, so that the processor 51 executes the following instructions:
[0160] Obtain video data to be analyzed;
[0161] Determining candidate video frames related to preset content in the video data to be analyzed;
[0162] Based on the position of the candidate video frame in the video data to be analyzed, a target video frame is determined in the candidate video frames; wherein the target video frame is used to indicate the start and end positions of the preset content in the video data to be analyzed.
[0163] The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the video analysis method described in the above method embodiment are executed. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0164] The embodiments of the present disclosure also provide a computer program product, which carries a program code. The instructions included in the program code can be used to execute the steps of the video analysis method described in the above method embodiment. For details, please refer to the above method embodiment, which will not be repeated here.
[0165] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is implemented as a computer storage medium. In another optional embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).
[0166] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the device or unit can be electrical, mechanical or other forms.
[0167] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0168] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0169] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0170] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be based on the protection scope of the claims.
Claims
1. A video analysis method, It is characterized in that include: Obtain video data to be analyzed; Determining candidate video frames related to preset content in the video data to be analyzed, wherein determining candidate video frames related to preset content in the video data to be analyzed includes: identifying continuous video frames including at least partially identical content in the video data to be analyzed; determining the position difference of the at least partially identical content in the continuous video frames; and determining candidate video frames in the continuous video frames whose position difference satisfies a moving condition; Based on the position of the candidate video frame in the video data to be analyzed, a target video frame is determined in the candidate video frames; wherein the target video frame is used to indicate the start and end positions of the preset content in the video data to be analyzed.
2. The method according to claim 1, It is characterized in that The step of determining candidate video frames related to preset content in the video data to be analyzed further includes: Determine the key information for screening based on the content features corresponding to the preset content; Determine candidate video frames in the video data to be analyzed that match the screening key information.
3. The method according to claim 1, It is characterized in that The step of determining, in the continuous video frames, the candidate video frames whose position differences satisfy the movement condition comprises: Based on the position difference, determining a displacement direction of the at least partially identical content between the consecutive video frames; Based on the position difference, determining a displacement distance of the at least partially identical content between the consecutive video frames; A preset number of candidate video frames whose displacement directions and displacement distances satisfy a displacement condition are determined in the continuous video frames.
4. The method according to claim 1, It is characterized in that The determining the target video frame in the candidate video frames based on the position of the candidate video frames in the video data to be analyzed includes: Determine a first video frame whose position satisfies a position condition among the candidate video frames; Determine a second video frame adjacent to the first video frame among the candidate video frames; A time interval between the first video frame and the second video frame is determined, and a target video frame is determined between the first video frame and the second video frame based on the time interval.
5. The method according to claim 4, It is characterized in that The determining a target video frame between the first video frame and the second video frame based on the time interval includes: determining whether the time interval exceeds a time threshold; In a case where the time interval exceeds the time threshold, determining the second video frame as a target video frame; When the time interval does not exceed the time threshold, the first video frame is determined as a target video frame.
6. A video analysis device, It is characterized in that include: An acquisition unit, used for acquiring video data to be analyzed; A first determining unit is used to determine candidate video frames related to preset content in the video data to be analyzed, wherein determining the candidate video frames related to preset content in the video data to be analyzed includes: identifying continuous video frames including at least partially identical content in the video data to be analyzed; determining the position difference of the at least partially identical content in the continuous video frames; and determining the candidate video frames in the continuous video frames whose position difference satisfies a movement condition; The second determining unit is used to determine a target video frame in the candidate video frames based on the position of the candidate video frame in the video data to be analyzed; wherein the target video frame is used to indicate the starting and ending positions of the preset content in the video data to be analyzed.
7. A computer device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the video analysis method according to any one of claims 1 to 5 are performed.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, which, when executed by a processor, executes the steps of the video analysis method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Detection of failures in advertisement replacement
CA2971176A1
Video abstract generation method and device
CN108882057A
Video file structure detection method and device
CN112291589A
Text detection processing method and device, electronic equipment and storage medium
CN113343987A
Chip tail identification method and device, electronic equipment and storage medium
CN113920465A
