Video cutting method, device, electronic device and storage medium

By obtaining and adjusting the voice and lens boundary time points in the video, and combining voice and visual features, the video is segmented, which solves the problems of low video segmentation efficiency and poor voice integrity in the existing technology, and achieves a more efficient video Fragment semantic integrity.

CN114299415BActive Publication Date: 2024-10-25BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202111467723.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-02
Publication Date
2024-10-25
Estimated Expiration
2041-12-02

AI Technical Summary

Technical Problem

Existing video segmentation methods are inefficient and the voice integrity of the segmented video segments is poor, resulting in poor video segmentation effects.

Method used

By obtaining the voice boundary time point and the shot boundary time point in the target video, adjust the voice boundary time point to the time difference with the shot boundary time point, segment the video based on the adjusted time point, and combine voice and visual features to Improve the semantic integrity of video clips.

Benefits of technology

It improves the semantic integrity of video segments after segmentation, avoids the problem of too fragmented video segments, and achieves video segmentation effects that are more in line with actual needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114299415B_ABST
    Figure CN114299415B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a video segmentation method, device, electronic device and storage medium, and relates to the field of video processing technology. The embodiments of the present disclosure at least solve the problem in the related art that the voice integrity in the segmented video segment is destroyed. The method includes: obtaining the voice boundary time point of each audio segment in the target video; obtaining the shot boundary time point in the target video, the shot boundary time point is the segmentation time point of the video shot of the target video; adjusting any boundary point in the voice boundary time point according to the time difference between any boundary point in the voice boundary time point and the shot boundary time point, and obtaining the adjusted voice boundary time point; based on the adjusted voice boundary time point and the shot boundary time point, segmenting the target video to obtain at least one target sub-video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of video processing technology, and in particular to a video segmentation method, device, electronic device and storage medium. Background Art

[0002] Generally, video files are obtained by selecting, choosing, decomposing and splicing a large amount of material (original video) obtained by multiple shooting. If the video file is long, in order to reduce the time of watching the video file, you can re-edit the video file to extract part of the video content. Before re-editing the video file, you need to split the video file.

[0003] In the related art, manual segmentation or segmentation of video files based on visual content differences is mainly adopted. These segmentation methods not only have low segmentation efficiency, but also have poor integrity of the segmented video segments, resulting in poor video segmentation effect. Summary of the invention

[0004] The present disclosure provides a video segmentation method, device, electronic device and storage medium to at least solve the problem in the related art that the voice integrity of the segmented video segments is destroyed. The technical solution of the present disclosure is as follows:

[0005] According to a first aspect of an embodiment of the present disclosure, a video segmentation method is provided, comprising: obtaining a speech boundary time point of each audio segment in a target video; obtaining a shot boundary time point in the target video, the shot boundary time point being a segmentation time point of a video shot of the target video; adjusting any one of the speech boundary time points according to a time difference between any one of the speech boundary time points and a shot boundary time point, to obtain an adjusted speech boundary time point; and segmenting the target video based on the adjusted speech boundary time points and the shot boundary time points, to obtain at least one target sub-video.

[0006] Optionally, the above-mentioned "obtaining shot boundary time points in the target video" includes: extracting video features of each video frame in the target video according to a pre-trained shot segmentation model; calculating the probability value of whether the video frame corresponding to the video feature is a boundary frame; when the probability value is greater than a first preset threshold, obtaining the shot boundary time point of the video frame corresponding to the probability value.

[0007] Optionally, the shot segmentation model includes at least: a three-dimensional spatiotemporal convolutional network and a fully connected network; the above-mentioned extracting video features of each video frame in the target video based on the pre-trained shot segmentation model includes: inputting each video frame in the target video into the three-dimensional spatiotemporal convolutional network to obtain a spatiotemporal convolution pixel set of each video frame; expanding the spatiotemporal convolution pixel set of each video frame in parallel according to a preset void rate to obtain an expanded pixel set of each video frame; inputting the expanded pixel set of each video frame into the fully connected network to extract the video features of each video frame.

[0008] Optionally, the above-mentioned "adjusting any boundary point among the speech boundary time points according to the time difference between any boundary point among the speech boundary time points and the shot boundary time point to obtain the adjusted speech boundary time" includes: when the time difference between any boundary point among the speech boundary time points and the shot boundary time point is less than a second preset threshold, updating any boundary point among the speech boundary time points to a shot boundary time point to obtain the adjusted speech boundary time point.

[0009] Optionally, the above-mentioned "segmenting the target video based on the adjusted speech boundary time points and the shot boundary time points to obtain at least one target sub-video includes" includes: determining the audio-visual conflict time points based on the adjusted speech boundary time points and the shot boundary time points; the audio-visual conflict time points are: the shot boundary time points between two boundary points in the adjusted speech boundary time points; in the shot boundary time points, deleting the audio-visual conflict time points, adding the adjusted speech boundary time points corresponding to the audio-visual conflict time points, obtaining the fusion boundary time points, and segmenting the target video according to the fusion boundary time points to obtain at least one target sub-video.

[0010] Optionally, the above-mentioned "obtaining the speech boundary time point of each audio segment in the target video" includes: obtaining the speech boundary time point of each audio segment in the target video according to a preset speech recognition function, the speech recognition function is used to identify the starting time point and the ending time point of the audio segment, and the speech boundary time points include the starting time point and the ending time point of the audio segment.

[0011] According to a second aspect of an embodiment of the present disclosure, a video segmentation device is provided, comprising a first acquisition unit, a second acquisition unit, a third acquisition unit, and a processing unit; the first acquisition unit is used to acquire the speech boundary time point of each audio segment in the target video; the second acquisition unit is used to acquire the shot boundary time point in the target video, the shot boundary time point being the segmentation time point of the video shot of the target video; the third acquisition unit is used to adjust any boundary point in the speech boundary time point according to the time difference between any boundary point in the speech boundary time point acquired by the first acquisition unit and the shot boundary time point acquired by the second acquisition unit, and acquire the adjusted speech boundary time point; the processing unit is used to segment the target video based on the adjusted speech boundary time point and shot boundary time point acquired by the third acquisition unit, and acquire at least one target sub-video.

[0012] Optionally, the second acquisition unit is used to: extract video features of each video frame in the target video according to a pre-trained shot segmentation model; calculate the probability value of whether the video frame corresponding to the video feature is a boundary frame; and when the probability value is greater than a first preset threshold, obtain the shot boundary time point of the video frame corresponding to the probability value.

[0013] Optionally, the shot segmentation model includes at least: a three-dimensional spatiotemporal convolutional network and a fully connected network; the above-mentioned second acquisition unit is specifically used to: input each video frame in the target video into the three-dimensional spatiotemporal convolutional network to obtain a spatiotemporal convolution pixel set of each video frame; expand the spatiotemporal convolution pixel set of each video frame in parallel according to a preset hole rate to obtain an expanded pixel set of each video frame; input the expanded pixel set of each video frame into the fully connected network to extract video features of each video frame.

[0014] Optionally, the third acquisition unit is used to update any boundary point in the speech boundary time points to a shot boundary time point when the time difference between any boundary point in the speech boundary time points and the shot boundary time point is less than a second preset threshold, so as to obtain an adjusted speech boundary time point.

[0015] Optionally, the above-mentioned processing unit is used to: determine the audio-visual conflict time point based on the adjusted speech boundary time point and the shot boundary time point; the audio-visual conflict time point is: the shot boundary time point between two boundary points in the adjusted speech boundary time point; in the shot boundary time point, delete the audio-visual conflict time point, add the adjusted speech boundary time point corresponding to the audio-visual conflict time point, obtain the fusion boundary time point, and divide the target video according to the fusion boundary time point to obtain at least one target sub-video.

[0016] Optionally, the above-mentioned first acquisition unit is used to: obtain the speech boundary time point of each audio segment in the target video according to a preset speech recognition function, the speech recognition function is used to identify the starting time point and the ending time point of the audio segment, and the speech boundary time point includes the starting time point and the ending time point of the audio segment.

[0017] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor, a memory, and a program or instruction stored in the memory and executable on the processor; wherein, when the program or instruction is executed by the processor, the video segmentation method provided in the first aspect and any possible design thereof is implemented.

[0018] According to a fourth aspect of an embodiment of the present disclosure, a readable storage medium is provided, on which a program or instruction is stored. When the program or instruction is executed by a processor, a video segmentation method provided in the first aspect and any possible design thereof is implemented.

[0019] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided. The computer program product is stored in a non-volatile storage medium. When the computer program product is executed by at least one processor, the video segmentation method provided in the first aspect and any possible design thereof is implemented.

[0020] The technical solution provided by the embodiment of the present disclosure brings at least the following beneficial effects: first, by obtaining the speech boundary time point of each audio segment in the target video, and then obtaining the shot boundary time point in the target video, and then adjusting any of the speech boundary time points according to the time difference between any of the speech boundary time points and the shot boundary time point, obtaining the adjusted speech boundary time point, and finally segmenting the target video based on the adjusted speech boundary time point and the shot boundary time point to obtain at least one target sub-video. In this way, by simultaneously considering speech features and visual features, that is, speech boundary time points and video boundary time points, the semantic integrity of the segmented video segments can be improved. At the same time, in order to avoid the problem of too fragmented video segments after segmentation caused by directly using speech boundary time points for video segmentation, the video segmentation can be more in line with actual needs.

[0021] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0023] Figure 1is a structural schematic diagram of a video segmentation system according to an exemplary embodiment;

[0024] Figure 2 This is one of the flowchart diagrams of a video segmentation method according to an exemplary embodiment;

[0025] Figure 3 is a second flow chart of a video segmentation method according to an exemplary embodiment;

[0026] Figure 4 is a third flow chart of a video segmentation method according to an exemplary embodiment;

[0027] Figure 5 is a structural schematic diagram of a video segmentation device according to an exemplary embodiment;

[0028] Figure 6 The diagram is a schematic structural diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0029] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0030] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0031] In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, " / " means or, for example, A / B can mean A or B. "And / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, in the description of the embodiments of the present disclosure, "multiple" means two or more than two.

[0032] Video files, such as advertisements, game animations, movies and TV dramas, are multimodal information, usually including visual modal information and voice modal information. If video segmentation is performed based on the visual features that change between frames, only the visual shot boundaries are detected based on the visual modal information. Since a line in a video file may correspond to multiple shot switches, the video segment corresponding to the line is divided into multiple video clips, resulting in a line being truncated in the segmented video clip, destroying the voice integrity in the video clip.

[0033] Based on this, the embodiment of the present disclosure provides a video segmentation method, which can improve the semantic integrity of the segmented video segments by simultaneously considering voice features and visual features, that is, voice boundary time points and video boundary time points. At the same time, in order to avoid directly using voice boundary time points for video segmentation, which causes the segmented video segments to be too fragmented, the video segmentation can be more in line with actual needs.

[0034] A video segmentation method provided in an embodiment of the present disclosure may be applicable to a video segmentation system. Figure 1 FIG. 4 shows a schematic diagram of the structure of the video segmentation system. Figure 1 As shown, the video segmentation system is used to solve the problem in the related art that the integrity of the voice in the segmented video segments is destroyed. The video segmentation system includes: a first device 11 and a second device 12. The first device 11 is connected to the second device 12.

[0035] The first device 11 may be used to perform data interaction with the second device 12 . For example, the first device 11 may send a target video to the second device 12 , and receive video segments of the target video that are fed back by the second device 12 .

[0036] In the embodiment of the present disclosure, the first device 11 may also include a database or be connected to a database, and the target video may be stored in the database. The first device 11 may implement an access operation to the target video in the database.

[0037] In the embodiment of the present disclosure, the first device 11 may be a personal smart device such as a mobile phone, a smart watch, a camera, a tablet computer, augmented reality (AR), virtual reality (VR), or other electronic devices, or may be other electronic devices that can shoot, display or store the target video. There is no limitation on the device form of the first device 11.

[0038] The second device 12 can also execute the video segmentation method in the embodiment of the present disclosure, for example, obtaining the speech boundary time point of each audio segment in the target video; obtaining the shot boundary time point in the target video, the shot boundary time point being the segmentation time point of the video shot of the target video; adjusting any boundary point in the speech boundary time point according to the time difference between any boundary point in the speech boundary time point and the shot boundary time point, and obtaining the adjusted speech boundary time point; based on the adjusted speech boundary time point and the shot boundary time point, segmenting the target video to obtain at least one target sub-video.

[0039] In the embodiment of the present disclosure, the second device 12 can be a personal smart device such as a mobile phone or a tablet computer, or it can also be an electronic device such as a laptop computer, a handheld computer, a desktop computer, an ultra-mobile personal computer (UMPC), a server, or it can also be other electronic devices that can store and process the target video. There is no limitation on the device form of the second device 12.

[0040] Exemplarily, if the second device 12 is a server, then the second device 12 can be a data server of an Internet platform such as a short video application service platform, a news service platform, a live broadcast service platform, a shopping service platform, a food delivery service platform, a sharing service platform, or a functional website.

[0041] In the embodiment of the present disclosure, the first device 11 and the second device 12 may have the same device form. For example, the first device 11 and the second device 12 may both be mobile phones, or both be tablet computers. In some other embodiments, the first device 11 and the second device 12 may also have different device forms.

[0042] Optionally, the first device 11 and the second device 12 may be connected via a wired or wireless method. For example, the wireless communication protocol used between the first device 11 and the second device 12 may be a wireless fidelity (Wi-Fi) protocol, a Bluetooth protocol, a ZigBee protocol, a near field communication (NFC) protocol, various cellular network protocols, etc., which are not limited here.

[0043] It should be noted that the first device 11 and the second device 12 may be independent devices or integrated into the same device, and the present invention does not specifically limit this. When the first device 11 and the second device 12 are integrated into the same device, the communication method between the first device 11 and the second device 12 is the communication between the internal modules of the device. In this case, the communication process between the two is the same as "the communication process between the first device 11 and the second device 12 when they are independent of each other".

[0044] In practical applications, the video segmentation method provided by the embodiment of the present disclosure is applied to the second device 12. The video segmentation method provided by the embodiment of the present disclosure is described below in conjunction with the accompanying drawings. The method is exemplified below by taking the execution subject as a video segmentation device as an example.

[0045] Figure 2 The flowchart of the video segmentation method provided by the embodiment of the present disclosure is shown in FIG. Figure 2 As shown, the video segmentation method provided by the embodiment of the present disclosure includes the following steps 201 to 204.

[0046] Step 201: The video segmentation device obtains the speech boundary time point of each audio segment in the target video.

[0047] In the disclosed embodiment, the speech boundary time point includes the start time point and the end time point of the audio segment. It can be understood that, since the audio segment in the target video may be discontinuous, the two speech boundary time points (start time and end time) of an audio segment can be recorded as a set of data.

[0048] Exemplarily, speech boundary time points may be represented as [[s_1, e_1], [s_2, e_2], ..., [s_n, e_n]].

[0049] In the disclosed embodiment, the target video refers to a file having visual modality information and voice modality information, which can display continuous image changes and play audio when in playback state.

[0050] In the disclosed embodiment, the audio clip corresponds to the lines of the target video, and each line or each paragraph of lines corresponds to an audio clip. It can be understood that the lines can be dialogues, narrations or monologues.

[0051] In an embodiment of the present disclosure, the video segmentation device can directly obtain the voice boundary time points of the target video from a database or other terminal. The video segmentation device can also divide the target video and obtain the voice boundary time points according to a preset division basis. The present disclosure does not limit this.

[0052] In the embodiment of the present disclosure, the audio segments may be divided based on at least one of the following: sound interruption time, sound frequency, volume, and semantics.

[0053] In one design, if the division of audio segments is based on semantics, then the video segmentation device obtains the speech boundary time point of each audio segment in the target video, which may include: performing speech recognition on the target video, obtaining the dialogue text in the target video and recording the start time and end time of each dialogue text, then calculating the semantic correlation coefficient between adjacent sentences, and judging whether to mark the segmentation marks between the adjacent sentences according to whether the semantic correlation coefficient is greater than a preset threshold, traversing all the dialogue texts, dividing the dialogues corresponding to two adjacent segmentation marks into the same audio segment, and taking the start time of the first dialogue after the first segmentation mark and the end time of the last dialogue before the second segmentation mark as the start time and end time of the audio segment. The semantic correlation coefficient is used to indicate the degree of semantic correlation between adjacent sentences, and its range is [0-1]. The larger the speech relationship coefficient, the greater the semantic correlation degree.

[0054] In another design, if the audio segments are divided based on the sound interruption time, sound frequency or volume, then the video segmentation device obtains the speech boundary time points of each audio segment in the target video, and may also include: obtaining the speech boundary time points of each audio segment in the target video according to a preset speech recognition function, wherein the speech recognition function is used to identify the starting time point and the ending time point of the audio segment, and the speech boundary time points include the starting time point and the ending time point of the audio segment.

[0055] The technical solution provided by the present disclosure brings at least the following beneficial effects: by using a preset speech recognition function, the speech boundary time point of each audio clip (i.e. each line) in the target video is obtained, which can improve the efficiency of obtaining the speech boundary time point.

[0056] Step 202: The video segmentation device obtains shot boundary time points in the target video.

[0057] In the disclosed embodiment, the shot boundary time point is the segmentation time point of the video shot of the target video. It is understandable that, since the video frames in the target video are played continuously at a preset playback speed, a single shot boundary time point is used to identify the segmentation time point of the video shot. It should be noted that there is at least one shot boundary time point in the target video.

[0058] Exemplarily, the shot boundary time points may be represented as [b_1, b_2, ..., b_m].

[0059] In an embodiment of the present disclosure, the video segmentation device can directly obtain the shot boundary time points of the target video from a database or other terminal. The video segmentation device can also divide the target video and obtain the shot boundary time points according to a preset division basis. The present disclosure does not limit this.

[0060] In the embodiment of the present disclosure, when the video segmentation device obtains the shot boundary time point, it can obtain each video frame in the target video, then extract the image features of each video frame, and then determine whether the adjacent video frame is a segmentation point based on the similarity of the image features of the adjacent video frames. If it is a segmentation point, the segmentation time point of the segmentation point in the target video is searched, and the segmentation time point is determined to be the shot boundary time point.

[0061] Step 203: The video segmentation device adjusts any one of the speech boundary time points according to the time difference between any one of the speech boundary time points and the shot boundary time point to obtain the adjusted speech boundary time point.

[0062] In the disclosed embodiment, the accuracy of the speech recognition algorithm used by the video segmentation device is limited, and there is a lot of noise in the start time point and the end time point of the audio segment corresponding to the speech boundary time point. Moreover, if the target video is segmented according to the speech boundary time point, the target video may be segmented into too many audio segments, that is, the target video is segmented too finely, resulting in that a single audio segment may not express a complete meaning. Therefore, the shot boundary time point and the speech boundary time point are used for denoising correction.

[0063] In one design, when the time difference between any of the speech boundary time points and the shot boundary time point is less than a second preset threshold, any of the speech boundary time points is updated to a shot boundary time point.

[0064] In one example, when the time difference between the starting time point in the speech boundary time point and the shot boundary time point is less than a second preset threshold, the starting time point in the speech boundary time point is updated to the shot boundary time point to obtain an adjusted speech boundary time point.

[0065] In another example, when the time difference between the end time point in the speech boundary time points and the shot boundary time point is less than a second preset threshold, the end time point in the speech boundary time points is updated to the shot boundary time point.

[0066] For example, assuming that the above-mentioned speech boundary time points are [[s_1, e_1], [s_2, e_2], ..., [s_n, e_n]], and the above-mentioned shot boundary time points are [b_1, b_2, ..., b_m]], the video segmentation device can be used to correct the speech boundary time point [s_1, e_2, ..., b_m] in any speech boundary time point.i , e i ], i represents the position of the speech boundary time point to be corrected in the speech boundary time point. The second preset threshold is the set noise range d. Select any shot boundary time point b j , and calculate s i With b j If the time difference is less than d, s i Updated to b j Similarly, calculate e i With b j If the time difference is less than d, e i Updated to b j . Finally, the adjusted speech boundary time points [[sd_1, ed_1], [sd_2, ed_2], …, [sd_n, ed_n]] are recorded and obtained.

[0067] The technical solution provided by the present disclosure brings at least the following beneficial effects: by comparing any boundary point among the speech boundary time points with the shot boundary time point, when the time difference between the two is less than a second preset threshold, the speech boundary time point is denoised and corrected to make the video segmentation more in line with actual needs.

[0068] Step 204: based on the adjusted speech boundary time points and shot boundary time points, the target video is segmented to obtain at least one target sub-video.

[0069] In the disclosed embodiment, the time nodes corresponding to the adjusted speech boundary time points and shot boundary time points in the target video may be different from the playback order of the target video. Therefore, in one design, the video segmentation device can segment the target video in order from small to large according to the adjusted speech boundary time points and shot boundary time points.

[0070] Exemplarily, the video segmentation device may first sort the adjusted speech boundary time points and shot boundary time points in ascending order, and then segment the target video in sequence according to the re-sorted time points.

[0071] Exemplarily, the video segmentation device can also select the minimum time point among the adjusted voice boundary time points and the lens boundary time points according to a preset algorithm, and then segment the target video according to the minimum time point to obtain a video clip and an intermediate video, and then delete the minimum time point among the adjusted voice boundary time points and the lens boundary time points, and then select the minimum time point therefrom according to the preset algorithm, and repeat the above steps until the target video is segmented according to the above time points.

[0072] The technical solution provided by the present disclosure brings at least the following beneficial effects: the target video is segmented in sequence according to the order of the adjusted voice boundary time points and shot boundary time points from small to large, that is, the playback order of the target video, and the segmentation of the target video is achieved at one time, which can improve the segmentation efficiency, and in the segmentation process, only the target video and the segmented video segments need to be saved, without occupying additional storage space.

[0073] In the disclosed embodiment, after the video segmentation device segments the target video, the obtained video segments have complete semantics and can be used in scenes such as advertisements, game animations, film and television dramas, etc., and can improve the performance of downstream tasks that re-edit based on the video segments.

[0074] The technical solution provided by the present disclosure brings at least the following beneficial effects: considering both speech features and visual features, that is, speech boundary time points and video boundary time points, can improve the semantic integrity of the segmented video segments; at the same time, in order to avoid directly using speech boundary time points for video segmentation, which results in the problem that the segmented video segments are too fragmented, the video segmentation can be made to be more in line with actual needs.

[0075] In one design, the above step 204 can also be implemented through the following steps 2041 to 2043.

[0076] Step 2041: Determine the audio-visual conflict time point based on the adjusted speech boundary time point and shot boundary time point.

[0077] Step 2042: In the shot boundary time points, the audio-visual conflict time points are deleted, and the adjusted speech boundary time points corresponding to the audio-visual conflict time points are added to obtain the fusion boundary time points.

[0078] Step 2043: Segment the target video according to the fusion boundary time point to obtain at least one target sub-video.

[0079] In the embodiment of the present disclosure, the audio-visual conflict time point is: a shot boundary time point between two boundary points in the adjusted speech boundary time points.

[0080] In the disclosed embodiment, if the target video is segmented only according to the shot boundary time point, the integrity of the voice lines is easily destroyed. If the target video is segmented only according to the voice boundary time point, the video segment without voice cannot be segmented. Therefore, in order to ensure that the video clips obtained after segmenting the target video can ensure the integrity of the voice lines and enable all target videos to be segmented, it is necessary to obtain the fusion boundary time point based on the adjusted voice boundary time point and shot boundary time point.

[0081] In the disclosed embodiment, the video segmentation device compares each shot boundary time point with the start time and end time of the adjusted voice boundary time point one by one. If the shot boundary time point is between the start time and end time of a voice boundary time point, the shot boundary time point is determined to be a video-audio conflict time point. After the video-audio conflict time point is determined, the video-audio conflict time point is deleted from the shot boundary time point, and the voice boundary time point corresponding to the video-audio conflict time point is added to obtain a fusion boundary time point.

[0082] It should be noted that, in the process of obtaining the fusion boundary time point, the video segmentation device needs to traverse all the shot boundary time points.

[0083] The technical solution provided by the present disclosure brings at least the following beneficial effects: the target sub-video obtained by segmenting the target video according to the fusion boundary time point can ensure the integrity of the lens picture and the integrity of the voice lines.

[0084] In one design, Figure 3 As shown, the embodiment of the present disclosure also shows that the above step 202 can be implemented through steps 301 to 303.

[0085] Step 301: The video segmentation device extracts video features of each video frame in the target video according to the pre-trained shot segmentation model.

[0086] In the disclosed embodiment, the shot segmentation model includes at least: a three-dimensional spatiotemporal convolutional network and a fully connected network. It should be noted that the shot segmentation model also includes batch normalization (BN) and residual network results to facilitate normalization of training data and optimization of deep network models.

[0087] In the disclosed embodiment, before extracting video features, the video segmentation device may also pre-train the shot segmentation model. In the case of pre-training the shot segmentation model, the video segmentation device may also obtain training data. The training data may be existing data, or may be obtained by splicing according to training requirements in a hard splicing or soft splicing manner.

[0088] In the disclosed embodiment, the video segmentation device first obtains each video frame in the target video in sequence according to the frame rate of the target video, and then inputs the video frame into a pre-trained shot segmentation model to extract video features corresponding to the video frame.

[0089] It is understandable that after the video segmentation device inputs the video frames into the pre-trained shot segmentation model, it can also include compressing the video frames according to a preset size, and if the target video includes a large number of video frames, then the video frames are divided into multiple video segments and input into the trained shot segmentation model multiple times, so as to improve the effectiveness of the video features.

[0090] In the embodiment of the present disclosure, video features include but are not limited to color features, texture features, shape features, and the like.

[0091] In one design, the video segmentation device extracts the video features of each video frame in the target video based on the pre-trained shot segmentation model, such as Figure 4 As shown, it can be implemented through steps 401 to 403.

[0092] Step 401: The video segmentation device inputs each video frame in the target video into a three-dimensional spatiotemporal convolutional network to obtain a spatiotemporal convolution pixel set of each video frame.

[0093] Step 402: The video segmentation device performs parallel expansion on the spatiotemporal convolution pixel set of each video frame according to a preset hole rate to obtain an expanded pixel set of each video frame.

[0094] Step 403: The video segmentation device inputs the dilated pixel set of each video frame into a fully connected network to extract video features of each video frame.

[0095] The technical solution provided by the present disclosure brings at least the following beneficial effects: in the shot segmentation model, the spatiotemporal convolution pixel set is expanded in parallel according to the preset hole rate, so that the time span of the expanded pixel set can be increased, that is, the receptive field of the shot segmentation model is increased, so that the extracted video features can better reflect the global features of the corresponding frame image.

[0096] Step 302: The video segmentation device calculates a probability value of whether the video frame corresponding to the video feature is a boundary frame.

[0097] Step 303: When the probability value is greater than the first preset threshold, the video segmentation device obtains the shot boundary time point of the video frame corresponding to the probability value.

[0098] In the disclosed embodiment, the probability value is used to binarize the video frame, and the probability value is compared with the first preset threshold, and the comparison result only includes: the probability value is greater than the first preset threshold and the probability value is not greater than the first preset threshold.

[0099] It can be understood that "the probability value is greater than the first preset threshold" can be assigned a value of 1, and "the probability value is not greater than the first preset threshold" can be assigned a value of 0, thereby realizing the binarization of the video frame.

[0100] The technical solution provided by the present disclosure brings at least the following beneficial effects: using a shot segmentation model to obtain shot boundary time points is more conducive to detecting the switching time points of hard shot switching and flexible shot switching, so that the obtained shot boundary time points are more accurate.

[0101] The above mainly introduces the scheme of the embodiment of the present disclosure from the perspective of the method. It can be understood that in order to realize the above functions, the video segmentation device includes at least one of the hardware structure and software modules corresponding to the execution of each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed in this article, the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.

[0102] The embodiments of the present disclosure may divide the control device into functional units according to the above method examples. For example, each functional unit may be divided corresponding to each function, or two or more functions may be integrated into one processing unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional units. It should be noted that the division of units in the embodiments of the present disclosure is schematic and is only a logical functional division. There may be other division methods in actual implementation.

[0103] Figure 5 FIG. 1 is a schematic diagram showing a structure of a video segmentation device according to an exemplary embodiment. Figure 5 As shown, the video segmentation device provided by the embodiment of the present disclosure includes: a first acquisition unit 51, a second acquisition unit 52, a third acquisition unit 53, and a processing unit 54;

[0104] The first acquisition unit 51 is used to acquire the speech boundary time point of each audio segment in the target video; for example, Figure 2 As shown, the first acquisition unit 51 can be used to execute step 201.

[0105] The second acquisition unit 52 is used to acquire the shot boundary time point in the target video, where the shot boundary time point is the segmentation time point of the video shot of the target video; for example, Figure 2 As shown, the second acquisition unit 52 can be used to execute step 202 .

[0106] The third acquisition unit 53 is used to adjust any of the speech boundary time points according to the time difference between any of the speech boundary time points acquired by the first acquisition unit 51 and the shot boundary time point acquired by the second acquisition unit 52, and acquire the adjusted speech boundary time point; for example, Figure 2 As shown, the third acquisition unit 53 can be used to execute step 203.

[0107] The processing unit 54 is used to segment the target video based on the adjusted speech boundary time point and shot boundary time point obtained by the third obtaining unit 53 to obtain at least one target sub-video; for example, Figure 2 As shown, the processing unit 54 may be configured to perform step 204 .

[0108] Optional, such as Figure 5 As shown, the second acquisition unit 52 provided in the embodiment of the present disclosure is used to: extract the video features of each video frame in the target video according to the pre-trained shot segmentation model; calculate the probability value of whether the video frame corresponding to the video feature is a boundary frame; and when the probability value is greater than the first preset threshold, obtain the shot boundary time point of the video frame corresponding to the probability value. For example, Figure 3 As shown, the second acquisition unit 52 can be used to execute steps 301 to 303.

[0109] Optional, such as Figure 5 As shown, the shot segmentation model at least includes: a three-dimensional spatiotemporal convolutional network and a fully connected network; the second acquisition unit 52 provided in the embodiment of the present disclosure is specifically used to: input each video frame in the target video into the three-dimensional spatiotemporal convolutional network to obtain the spatiotemporal convolution pixel set of each video frame; expand the spatiotemporal convolution pixel set of each video frame in parallel according to the preset hole rate to obtain the expanded pixel set of each video frame; input the expanded pixel set of each video frame into the fully connected network to extract the video features of each video frame. For example, Figure 4 As shown, the second acquisition unit 52 can be used to execute steps 401 to 403.

[0110] Optional, such as Figure 5 As shown, the third acquisition unit 53 provided in the embodiment of the present disclosure is used to: when the time difference between any boundary point in the speech boundary time point and the shot boundary time point is less than a second preset threshold, update any boundary point in the speech boundary time point to a shot boundary time point to obtain an adjusted speech boundary time point.

[0111] Optional, such as Figure 5As shown, the processing unit 54 provided in the implementation example of the present disclosure is used to: determine the audio-visual conflict time point based on the adjusted speech boundary time point and the shot boundary time point; the audio-visual conflict time point is: the shot boundary time point between two boundary points in the adjusted speech boundary time point; in the shot boundary time point, delete the audio-visual conflict time point, add the adjusted speech boundary time point corresponding to the audio-visual conflict time point, obtain the fusion boundary time point, and divide the target video according to the fusion boundary time point to obtain at least one target sub-video.

[0112] Optional, such as Figure 5 As shown, the first acquisition unit 51 provided in the implementation example of the present disclosure is used to: obtain the speech boundary time point of each audio segment in the target video according to a preset speech recognition function, the speech recognition function is used to identify the starting time point and the ending time point of the audio segment, and the speech boundary time point includes the starting time point and the ending time point of the audio segment.

[0113] Regarding the device in the above embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment of the method, and will not be elaborated here.

[0114] Figure 6 Schematic diagram of the structure of an electronic device provided by the present disclosure. Figure 6 The electronic device may include a processor 61, a memory 62, and a program or instruction stored in the memory 62 and executable on the processor 61; wherein the program or instruction, when executed by the processor 61, implements the video segmentation method in the above-mentioned embodiment.

[0115] In addition, the electronic device may further include a communication bus 63 and at least one communication interface 64 .

[0116] The processor 61 may be a central processing unit (CPU), a microprocessing unit, an application specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of the program of the disclosed solution.

[0117] The communication bus 63 is a signal path for transmitting information between the above components.

[0118] The communication interface 64 uses any transceiver or other device for communicating with other devices or communication networks, such as Ethernet, radio access network (RAN), wireless local area networks (WLAN), etc.

[0119] The memory 62 may be a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory (EEPROM), a compact disc read-only memory (CD-ROM) or other optical disc storage, an optical disc storage (including a compressed optical disc, a laser disc, an optical disc, a digital versatile disc, a Blu-ray disc, etc.), a magnetic disk storage medium or other magnetic storage device, or any other medium that can be used to carry or store the desired program code in the form of an instruction or data structure and can be accessed by a computer, but is not limited thereto. The memory 62 may exist independently and be connected to the processor 61 via a communication bus 64. The memory 62 may also be integrated with the processor 61.

[0120] The memory 62 is used to store instructions for executing the solution of the present disclosure, and the execution is controlled by the processor 61. The processor 61 is used to execute the program or instructions stored in the memory 62, so as to realize the functions in the method of the present disclosure.

[0121] As an example, combining Figure 5 The functions implemented by the first acquisition unit 51, the second acquisition unit 52, the third acquisition unit 53, and the processing unit 54 in the video segmentation device are similar to those Figure 6 The function of processor 61 in is the same.

[0122] In a specific implementation, as an embodiment, the processor 61 may include one or more CPUs, such as Figure 6 CPU0 and CPU1 in.

[0123] In a specific implementation, as an embodiment, the electronic device may include multiple processors 61. Each of these processors 61 may be a single-core (single-CPU) processor or a multi-core (multi-CPU) processor. The processor 61 here may refer to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).

[0124] In a specific implementation, as an embodiment, the electronic device may further include an output device 65 and an input device 66. The output device 65 communicates with the processor 61 and may display information in a variety of ways. For example, the output device 65 may be a liquid crystal display (LCD), a light emitting diode (LED) display device, a cathode ray tube (CRT) display device, or a projector. The input device 66 communicates with the processor 61 and may receive user input in a variety of ways. For example, the input device 66 may be a mouse, a keyboard, a touch screen device, or a sensor device.

[0125] Those skilled in the art will understand that Figure 6 The structure shown in the figure does not constitute a limitation on the electronic device, and may include more or less components than shown in the figure, or combine some components, or adopt a different component arrangement. Figure 6 The electronic device in the system may be a server, a client or other device.

[0126] In addition, the present disclosure also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the electronic device can execute the video segmentation method provided in the above embodiment.

[0127] In addition, the present disclosure also provides a computer program product, including the computer program product being stored in a non-volatile storage medium, and when the computer program product is executed by at least one processor, the electronic device executes the video segmentation method provided in the above embodiment.

[0128] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.

Claims

1. A video segmentation method, characterized in that: include: Get the speech boundary time point of each audio clip in the target video; Acquire a shot boundary time point in the target video, where the shot boundary time point is a segmentation time point of a video shot of the target video; According to the time difference between any one of the speech boundary time points and the shot boundary time point, adjusting any one of the speech boundary time points to obtain the adjusted speech boundary time point, including: when the time difference between any one of the speech boundary time points and the shot boundary time point is less than a second preset threshold, updating any one of the speech boundary time points to the shot boundary time point to obtain the adjusted speech boundary time point; Based on the adjusted speech boundary time point and the shot boundary time point, the target video is segmented to obtain at least one target sub-video, including: based on the adjusted speech boundary time point and the shot boundary time point, the audio-visual conflict time point is determined; the audio-visual conflict time point is: a shot boundary time point between two boundary points in the adjusted speech boundary time point; in the shot boundary time point, the audio-visual conflict time point is deleted, and the adjusted speech boundary time point corresponding to the audio-visual conflict time point is added to obtain a fusion boundary time point; according to the fusion boundary time point, the target video is segmented to obtain the at least one target sub-video.

2. The video segmentation method according to claim 1, characterized in that: The step of obtaining the shot boundary time point in the target video includes: Extracting video features of each video frame in the target video according to a pre-trained shot segmentation model; Calculating a probability value of whether the video frame corresponding to the video feature is a boundary frame; When the probability value is greater than a first preset threshold, a shot boundary time point of the video frame corresponding to the probability value is obtained.

3. The video segmentation method according to claim 2, characterized in that: The shot segmentation model at least includes: a three-dimensional spatiotemporal convolutional network and a fully connected network; The extracting the video features of each video frame in the target video according to the pre-trained shot segmentation model includes: Input each video frame in the target video into the three-dimensional spatiotemporal convolutional network to obtain a spatiotemporal convolution pixel set corresponding to each video frame; According to a preset hole rate, a parallel expansion process is performed on the spatiotemporal convolution pixel set of each video frame to obtain an expanded pixel set corresponding to each video frame; The dilated pixel set of each video frame is input into the fully connected network to extract the video features of each video frame.

4. The video segmentation method according to claim 1, characterized in that: The step of obtaining the speech boundary time point of each audio clip in the target video includes: According to a preset speech recognition function, the speech boundary time points of each audio segment in the target video are obtained, wherein the speech recognition function is used to identify the starting time point and the ending time point of the audio segment, and the speech boundary time points include the starting time point and the ending time point of the audio segment.

5. A video segmentation device, characterized in that: It includes a first acquisition unit, a second acquisition unit, a third acquisition unit, and a processing unit; The first acquisition unit is used to acquire the speech boundary time point of each audio clip in the target video; The second acquisition unit is used to acquire a shot boundary time point in the target video, where the shot boundary time point is a segmentation time point of a video shot of the target video; The third acquisition unit is used to adjust any boundary point among the speech boundary time points according to the time difference between any boundary point among the speech boundary time points acquired by the first acquisition unit and the shot boundary time point acquired by the second acquisition unit to acquire the adjusted speech boundary time point, including: when the time difference between any boundary point among the speech boundary time points and the shot boundary time point is less than a second preset threshold, updating any boundary point among the speech boundary time points to the shot boundary time point to acquire the adjusted speech boundary time point; The processing unit is used to segment the target video based on the adjusted speech boundary time point and the shot boundary time point obtained by the third acquisition unit to obtain at least one target sub-video, including: determining the audio-visual conflict time point based on the adjusted speech boundary time point and the shot boundary time point; the audio-visual conflict time point is: a shot boundary time point between two boundary points in the adjusted speech boundary time point; in the shot boundary time point, deleting the audio-visual conflict time point, adding the adjusted speech boundary time point corresponding to the audio-visual conflict time point, and obtaining a fusion boundary time point; according to the fusion boundary time point, segmenting the target video to obtain the at least one target sub-video.

6. The video segmentation device according to claim 5, characterized in that: The second acquiring unit is used for: Extracting video features of each video frame in the target video according to a pre-trained shot segmentation model; Calculating a probability value of whether the video frame corresponding to the video feature is a boundary frame; When the probability value is greater than a first preset threshold, a shot boundary time point of the video frame corresponding to the probability value is obtained.

7. The video segmentation device according to claim 6, characterized in that: The shot segmentation model at least includes: a three-dimensional spatiotemporal convolutional network and a fully connected network; The second acquisition unit is specifically used to: Input each video frame in the target video into the three-dimensional spatiotemporal convolutional network to obtain a spatiotemporal convolution pixel set of each video frame; According to a preset hole rate, the spatiotemporal convolution pixel set of each video frame is expanded in parallel to obtain an expanded pixel set of each video frame; The dilated pixel set of each video frame is input into the fully connected network to extract the video features of each video frame.

8. The video segmentation device according to claim 5, characterized in that: The first acquiring unit is used to: According to a preset speech recognition function, the speech boundary time points of each audio segment in the target video are obtained, wherein the speech recognition function is used to identify the starting time point and the ending time point of the audio segment, and the speech boundary time points include the starting time point and the ending time point of the audio segment.

9. An electronic device, characterized in that: include: A processor, a memory, and a program or instruction stored in the memory and executable on the processor; wherein the program or instruction, when executed by the processor, implements the video segmentation method as described in any one of claims 1 to 4.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the video segmentation method according to any one of claims 1 to 4 is implemented.

11. A computer program product comprising instructions, characterized in that The computer program product is stored in a non-volatile storage medium, and when the computer program product is executed by at least one processor, the video segmentation method according to any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Video data partitioning method and device

    CN104780388A

  • Method and device for processing audios and videos

    CN109547843A

  • Video segmentation method and device and computer storage medium

    CN111601162A

  • System and method for automatically generating video cliplets from digital video

    US20030234803A1