Video division method, device, server, terminal and storage medium
The video plot is determined by the similarity of the background features of the video frames, which solves the problem of poor video division effect in the existing technology and achieves more accurate video plot division and playback functions.
Patent Information
- Application Number
- CN202110246631.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-05
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2041-03-05
AI Technical Summary
Due to limited action recognition during video division, the existing technology has poor video division results and cannot effectively cover various types of video plots.
By extracting features from the background area of the video frame, the background features of the video segments are obtained, and based on similarity, it is determined whether the video segments belong to the same video plot, thereby dividing and merging the videos, and creating video division records to maintain the division results.
It improves the effect of video division, can cover any type of video plot, avoids the limitations of action-based division, and records maintenance results to facilitate subsequent verification and playback.
Smart Images

Figure CN113709584B
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a video segmentation method, device, server, terminal and storage medium. Background Art
[0002] With the continuous development of multimedia technology, playing videos has become a common form of entertainment for users in their leisure time and is favored by the majority of users. In order to facilitate users to jump to the video plot they are interested in when watching videos, the video can be divided into multiple video segments so that each video segment contains a video plot.
[0003] In the related art, action recognition is performed on multiple video segments in the original video to obtain the action contained in each video segment, and the adjacent video segments containing the same action are determined as video segments belonging to the same video plot. However, since the actions that can be recognized are limited, the above technology has great limitations, resulting in poor video segmentation effect. Summary of the invention
[0004] The embodiments of the present application provide a video segmentation method, device, server, terminal and storage medium, which can improve the effect of video segmentation. The technical solution is as follows:
[0005] On the one hand, a video segmentation method is provided, the method comprising:
[0006] Dividing the original video into a plurality of continuous original video segments, wherein the similarity between adjacent video frames in each original video segment is greater than a first threshold;
[0007] Based on the background area of each video frame in each original video segment, obtaining background features of each original video segment;
[0008] In response to a similarity between background features of at least two adjacent original video segments being greater than a second threshold, determining the at least two original video segments as video segments belonging to the same video plot;
[0009] A video division record corresponding to the original video is created, wherein the video division record includes a video segment identifier of each original video segment and an association relationship between video segment identifiers of different original video segments belonging to the same video plot.
[0010] Optionally, extracting features from the background area of each video frame in the original video segment to obtain background features of each video frame includes:
[0011] For each of the video frames, image segmentation is performed on the video frame to obtain a background image corresponding to the video frame, wherein the background image includes a background area of the video frame but does not include a foreground area of the video frame;
[0012] Feature extraction is performed on the background image to obtain background features of the video frame.
[0013] Optionally, determining the background feature of the original video segment based on the background features of a plurality of video frames in the original video segment includes:
[0014] Based on background features of multiple video frames in the original video segment, clustering the multiple video frames to obtain multiple video frame sets, each video frame set including at least one video frame;
[0015] Selecting a reference video frame set from the multiple video frame sets, the reference video frame set refers to a video frame set including the largest number of video frames;
[0016] The average value of the background features of multiple video frames in the reference video frame set is determined as the background feature of the original video segment.
[0017] Optionally, in response to the similarity between the background features of at least two adjacent original video segments being greater than a second threshold, after determining the at least two original video segments as original video segments belonging to the same video plot, the method further includes:
[0018] Merge multiple original video segments belonging to the same video plot.
[0019] On the other hand, a video segmentation method is provided, the method comprising:
[0020] receiving a verification request sent by a server, the verification request carrying a video segmentation record created by the server, the video segmentation record including a video segment identifier of each original video segment in the original video, and an association relationship between video segment identifiers of different original video segments belonging to the same video plot;
[0021] Displaying video division information indicating the association relationship based on the verification request;
[0022] In response to an editing operation on the video division information, updating the association relationship in the video division record;
[0023] The updated video segmentation record is sent to the server.
[0024] Optionally, in response to the editing operation on the video division information, updating the association relationship in the video division record includes:
[0025] In response to a merging operation of the first indicator and the second indicator, an association relationship between a plurality of video segment identifiers corresponding to the first indicator and the second indicator is created in the video partition record, and the first indicator is adjacent to the second indicator.
[0026] Optionally, in response to the editing operation on the video division information, updating the association relationship in the video division record includes:
[0027] In response to the splitting operation on the fourth indicator mark, determining a plurality of fifth indicator marks obtained by splitting;
[0028] Deleting the association relationship between the multiple video segment identifiers corresponding to the fourth indicator in the video division record;
[0029] For each fifth indicator, an association relationship between multiple video segment identifiers corresponding to the fifth indicator is created in the video division record.
[0030] Optionally, in response to the editing operation on the video division information, updating the association relationship in the video division record includes:
[0031] In response to a deletion operation on the third indicator mark, the association relationship between the multiple video segment identifiers corresponding to the third indicator mark in the video division record is deleted.
[0032] In another aspect, a video segmentation device is provided, the device comprising:
[0033] A video division module, used to divide the original video into a plurality of continuous original video segments, wherein the similarity between adjacent video frames in each original video segment is greater than a first threshold;
[0034] A feature acquisition module, used for acquiring background features of each original video segment based on the background area of each video frame in each original video segment;
[0035] a video segment determination module, configured to determine, in response to a similarity between background features of at least two adjacent original video segments being greater than a second threshold, the at least two original video segments as video segments belonging to the same video plot;
[0036] The segmentation record creation module is used to create a video segmentation record corresponding to the original video, wherein the video segmentation record includes a video segment identifier of each original video segment and an association relationship between video segment identifiers of different original video segments belonging to the same video plot.
[0037] Optionally, the feature acquisition module includes:
[0038] A feature extraction unit, configured to extract features from a background region of each video frame in each original video segment to obtain background features of each video frame;
[0039] The feature determination unit is used to determine the background feature of the original video segment based on the background features of multiple video frames in the original video segment.
[0040] Optionally, the feature extraction unit is used to:
[0041] For each of the video frames, image segmentation is performed on the video frame to obtain a background image corresponding to the video frame, wherein the background image includes a background area of the video frame but does not include a foreground area of the video frame;
[0042] Feature extraction is performed on the background image to obtain background features of the video frame.
[0043] Optionally, the feature determination unit is used to:
[0044] Extracting a plurality of reference video frames from the original video segment, wherein the plurality of reference video frames do not include a start video frame and an end video frame of the original video segment;
[0045] An average value of the background features of the multiple reference video frames is determined as the background feature of the original video segment.
[0046] Optionally, the feature determination unit is used to:
[0047] Based on background features of multiple video frames in the original video segment, clustering the multiple video frames to obtain multiple video frame sets, each video frame set including at least one video frame;
[0048] Selecting a reference video frame set from the multiple video frame sets, the reference video frame set refers to a video frame set including the largest number of video frames;
[0049] The average value of the background features of multiple video frames in the reference video frame set is determined as the background feature of the original video segment.
[0050] Optionally, the feature determination unit is used to:
[0051] Based on background features of multiple video frames in the original video segment, clustering the multiple video frames to obtain multiple video frame sets, each video frame set including at least one central video frame;
[0052] Selecting a reference video frame set from the multiple video frame sets, the reference video frame set refers to a video frame set including the largest number of video frames;
[0053] The background features of the central video frame in the reference video frame set are determined as the background features of the original video segment.
[0054] Optionally, the video segment determination module includes:
[0055] a similarity determination unit, configured to determine, among the plurality of continuous original video segments, starting from the second original video segment, the similarity between the video background features of each original video segment and the previous original video segment;
[0056] The video segment determining unit is configured to determine any original video segment and a previous original video segment as video segments belonging to the same video plot in response to the similarity between the background features of any original video segment and a previous original video segment of the any original video segment being greater than the second threshold.
[0057] Optionally, the device further comprises:
[0058] The video segment merging module is used to merge multiple original video segments belonging to the same video plot.
[0059] Optionally, the device further comprises:
[0060] A verification request sending module, configured to send a verification request to a terminal, wherein the verification request carries the video division record; the terminal is configured to display video division information indicating the association relationship based on the verification request, update the association relationship in the video division record in response to an editing operation on the video division information, and return the updated video division record;
[0061] The division record receiving module is used to receive the updated video division record.
[0062] In another aspect, a video segmentation device is provided, the device comprising:
[0063] A verification request receiving module, used for receiving a verification request sent by a server, wherein the verification request carries a video segmentation record created by the server, wherein the video segmentation record includes a video segment identifier of each original video segment in the original video, and an association relationship between video segment identifiers of different original video segments belonging to the same video plot;
[0064] An information display module, used for displaying video division information indicating the association relationship based on the verification request;
[0065] An association relationship updating module, configured to update the association relationship in the video division record in response to an editing operation on the video division information;
[0066] The division record sending module is used to send the updated video division record to the server.
[0067] Optionally, the information display module includes:
[0068] An information display unit is used to display indication marks corresponding to multiple video segment identifiers in the video division record based on the verification request, wherein video segment identifiers of different original video segments belonging to the same video plot correspond to one indication mark, and other video segment identifiers correspond to one indication mark respectively.
[0069] Optionally, the verification request further carries a video frame corresponding to each video segment identifier, and the information display module is used to display the video frame corresponding to the same video segment identifier as each indicator mark at the display position corresponding to each indicator mark.
[0070] Optionally, the association relationship updating module includes:
[0071] An association relationship creating unit is used to create an association relationship between a plurality of video segment identifiers corresponding to the first indicator and the second indicator in the video division record in response to a merging operation on the first indicator and the second indicator, wherein the first indicator is adjacent to the second indicator.
[0072] Optionally, the association relationship updating module includes:
[0073] The association relationship deleting unit is used to delete the association relationship between the multiple video segment identifiers corresponding to the third indicator in the video division record in response to the deletion operation of the third indicator.
[0074] Optionally, the association relationship updating module includes:
[0075] an indication mark determining unit, configured to determine a plurality of fifth indication marks obtained by splitting the fourth indication mark in response to a splitting operation on the fourth indication mark;
[0076] an association relationship deleting unit, configured to delete the association relationship between the plurality of video segment identifiers corresponding to the fourth indicator in the video segmentation record;
[0077] The association relationship creating unit is used to create, for each fifth indicator, an association relationship between multiple video segment identifiers corresponding to the fifth indicator in the video division record.
[0078] On the other hand, a server is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the video segmentation method described in the above aspects.
[0079] On the other hand, a terminal is provided, comprising a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the video segmentation method described in the above aspects.
[0080] On the other hand, a computer-readable storage medium is provided, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed in the video segmentation method described in the above aspects.
[0081] On the other hand, a computer program product or a computer program is provided, wherein the computer program product or the computer program comprises a computer program code, wherein the computer program code is stored in a computer-readable storage medium, wherein a processor reads the computer program code from the computer-readable storage medium, and wherein the processor executes the computer program code to implement the operations performed in the video segmentation method as described in the above aspects.
[0082] The method, device, server, terminal and storage medium provided by the embodiments of the present application, since the background features of a video segment represent the environment in which the object in the video segment is located, if the similarity between the background features of at least two adjacent video segments is greater than a second threshold value, it means that the environments in the at least two video segments are similar or the same, and it can be considered that the video plots in the at least two video segments are the same, so the at least two video segments are determined to be video segments belonging to the same video plot. The present application divides the video based on the similarity between the background features of the video segments, thereby determining which video segments belong to the same video plot, and can cover any type of video plot, avoiding the limitations of video division based on action, and improving the effect of video division. In addition, by creating a video division record and maintaining the video division result, it is convenient to subsequently verify the video division result according to the video division record, or to play the video according to the video plot according to the video division record. BRIEF DESCRIPTION OF THE DRAWINGS
[0083] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0084] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application.
[0085] Figure 2 It is a schematic diagram of another implementation environment provided by an embodiment of the present application.
[0086] Figure 3 It is a flowchart of a video segmentation method provided in an embodiment of the present application.
[0087] Figure 4 It is a flowchart of a video segmentation method provided in an embodiment of the present application.
[0088] Figure 5 It is a flowchart of a video segmentation method provided in an embodiment of the present application.
[0089] Figure 6 It is a schematic diagram of a video frame provided in an embodiment of the present application.
[0090] Figure 7 This is a flowchart for obtaining a background image provided by an embodiment of the present application.
[0091] Figure 8 It is a schematic diagram of a video frame and a background image of the video frame provided in an embodiment of the present application.
[0092] Fig. 9 This is a flowchart for obtaining a background image corresponding to a video frame provided by an embodiment of the present application.
[0093] Fig.10 This is a flowchart of obtaining background features of a video segment provided by an embodiment of the present application.
[0094] Fig.11 It is a flowchart of a video segmentation method provided in an embodiment of the present application.
[0095] Fig.12 It is a schematic diagram of a video division result provided in an embodiment of the present application.
[0096] Fig.13 It is a schematic diagram of video division information provided in an embodiment of the present application.
[0097] Fig.14 It is a flowchart of video division and video playback provided in an embodiment of the present application.
[0098] Fig.15 It is a structural schematic diagram of a video division device provided in an embodiment of the present application.
[0099] Fig.16It is a structural schematic diagram of a video division device provided in an embodiment of the present application.
[0100] Fig.17 It is a structural schematic diagram of a video division device provided in an embodiment of the present application.
[0101] Fig.18 It is a structural schematic diagram of a video division device provided in an embodiment of the present application.
[0102] Fig.19 It is a structural diagram of a terminal provided in an embodiment of the present application.
[0103] Fig. 20 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0104] In order to make the objectives, technical solutions and advantages of the embodiments of the present application clearer, the implementation methods of the present application will be further described in detail below in conjunction with the accompanying drawings.
[0105] It is understood that the terms "first", "second", etc. used in this application can be used in this article to describe various concepts, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of this application, a first indicator can be referred to as a second indicator, and similarly, a second indicator can be referred to as a first indicator.
[0106] Here, at least one refers to one or more than one, for example, at least one video segment can be one video segment, two video segments, three video segments, or any other integer greater than or equal to one. Multiple refers to two or more than two, for example, multiple video segments can be two video segments, three video segments, or any other integer greater than or equal to two. Each refers to each of at least one, for example, each video segment refers to each video segment in the multiple video segments. If the multiple video segments are 3 video segments, each video segment refers to each video segment in the 3 video segments.
[0107] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0108] Artificial intelligence technology is a comprehensive discipline that covers a wide range of fields, including both hardware-level and software-level technologies. Basic artificial intelligence technologies generally include sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technology, operating / interactive systems, mechatronics, etc. Artificial intelligence software technologies include natural language processing technology and machine learning.
[0109] Machine Learning (ML) is a multi-disciplinary subject that involves probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and other disciplines. It specializes in studying how computers simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to make computers intelligent. Its applications are spread across all areas of artificial intelligence. Machine learning and deep learning include artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and teaching learning.
[0110] Computer Vision (CV) is a science that studies how to make machines "see". To put it more specifically, it refers to machine vision such as using cameras and computers to replace human eyes to identify and measure targets, and further processing graphics so that computer processing becomes an image that is more suitable for human eye observation or transmission to instruments for detection. As a scientific discipline, computer vision studies related theories and technologies, and attempts to establish an artificial intelligence system that can obtain information from images or multi-dimensional data. Computer vision technology includes image processing, image recognition, image semantic understanding, image retrieval, OCR (Optical Character Recognition), video processing, video semantic understanding, video content / behavior recognition, three-dimensional object reconstruction, 3D (3-Dimension) technology, virtual reality, augmented reality, simultaneous positioning and mapping, and other technologies, as well as common biometric recognition technologies such as face recognition and fingerprint recognition.
[0111] Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, image websites and more portal websites. With the rapid development and application of the Internet industry, each item may have its own identification mark in the future, and all need to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. Various types of industry data require strong system backing support, which can only be achieved through cloud computing.
[0112] Cloud storage is a new concept that extends and develops from the concept of cloud computing. A distributed cloud storage system (hereinafter referred to as storage system) refers to a storage system that uses cluster applications, grid technology, and distributed storage file systems to bring together a large number of different types of storage devices (storage devices are also called storage nodes) in the network through application software or application interfaces to work together and provide external data storage and business access functions.
[0113] The following will describe the video segmentation method provided in the embodiment of the present application based on artificial intelligence technology and cloud storage technology.
[0114] Figure 1 is a schematic diagram of an implementation environment provided by an embodiment of the present application, see Figure 1 The implementation environment includes: a server 101 and a terminal 102, and the server 101 and the terminal 102 are connected via a wireless or wired network. The server 101 is used to divide the original video to obtain video segments belonging to the same video plot. The server 101 is also used to create a video division record according to the division result, and send the video division record to the terminal 102 for verification.
[0115] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop, a desktop computer, a smart speaker, a smart watch, a smart TV, a smart car terminal, etc., but is not limited to this. Optionally, a client is provided on the terminal 102, and the terminal 102 can realize functions such as playing videos and verifying video division records through the client. The client can be a client in the operating system of the terminal 102, or a client provided by a third party. The client can be a video playback client, a browser client, an instant messaging client, an education client, etc.
[0116] It should be noted that Figure 1 In the example, only the implementation environment includes the server 101 and the terminal 102. In another embodiment, the server 101 does not need to send the video segmentation record to other terminals for verification. In this case, the implementation environment only includes the server 101, but does not include the terminal 102. Alternatively, in another embodiment, Figure 2As shown, the implementation environment includes a server 101, a terminal 102 and a terminal 103. The server 101 sends the original video and the video division record to the terminal 103. When playing the original video, the terminal 103 will also mark the position of the video plot division in the original video based on the video division record so that the user can understand the division of the video plot.
[0117] The video segmentation method provided in the embodiment of the present application can be applied to any scenario of video segmentation, such as the scenario of segmenting movie plots. A movie includes multiple movie plots, such as eating in a restaurant, playing in an amusement park, and a gunfight on the street. In order to facilitate users to jump to the movie plots they are interested in when watching a movie, the method provided in the embodiment of the present application is used to segment the movie, and determine the video segments belonging to the same movie plot among multiple video segments. Therefore, when playing the movie, the video segments belonging to the same movie plot can be marked so that users can know which video segments belong to the same movie plot and which video segments belong to the next movie plot.
[0118] Figure 3 This is a flow chart of a video segmentation method provided by an embodiment of the present application. Figure 3 , the method comprising:
[0119] 301. The server divides the original video into a plurality of continuous original video segments.
[0120] The server obtains the original video to be divided, which can be various types of videos, such as movies, TV series, variety shows, cartoons or documentaries, etc. Optionally, the server obtains the stored original video, or the server obtains the original video through other means, etc., which is not limited in the embodiment of the present application.
[0121] The server divides the original video into a plurality of continuous original video segments, each of which includes a plurality of continuous video frames, and a similarity between adjacent video frames in the plurality of video frames is greater than a first threshold, that is, each original video segment includes a plurality of similar video frames. Optionally, the first threshold is set by default by the server, or is set by the server according to an operation of an operation and maintenance personnel.
[0122] 302. The server obtains background features of each original video segment based on the background area of each video frame in each original video segment.
[0123] Each video frame includes a foreground area and a background area. The foreground refers to the object that is relatively close to the camera in the video frame and is the main subject of the video frame, such as people, animals or vehicles. The background refers to the scenery behind the foreground in the video frame, which can express the space-time environment of the foreground, such as streets, restaurants, basketball courts, etc.
[0124] For each original video segment obtained by division, the server obtains background features of the original video segment based on the background area of each video frame in the original video segment. The background features are used to describe the background in the original video segment, that is, the environment in which the object in the original video segment is located.
[0125] 303. In response to the similarity between the background features of at least two adjacent original video segments being greater than a second threshold, the server determines the at least two original video segments as video segments belonging to the same video plot.
[0126] The server obtains the similarity between the background features of each two adjacent original video segments. If the similarity between the background features of the two adjacent original video segments is greater than a second threshold, it means that the environments in the two original video segments are similar or the same. Since the two original video segments are adjacent, it can be considered that the video plots in the two original video segments are the same video plot. Optionally, the second threshold is set by default by the server, or is set by the server according to the operation of the operation and maintenance personnel.
[0127] Therefore, in response to the similarity between the background features of at least two adjacent original video segments being greater than the second threshold, the server determines the at least two original video segments as original video segments belonging to the same video plot. If the similarity between the background features of a certain original video segment and an adjacent original video segment is not greater than the second threshold, the original video segment belongs to a video plot alone. The server can determine multiple groups of original video segments from multiple original video segments in the original video, each group of original video segments represents a different video plot, and each group of original video segments includes one original video segment or multiple original video segments. For example, when a group of original video segments includes only one original video segment, the original video segment belongs to a video plot alone, and when a group of original video segments includes multiple original video segments, the multiple original video segments belong to the same video plot.
[0128] 304. The server creates a video partition record corresponding to the original video.
[0129] When the server completes the video plot division of the original video and determines which original video segments belong to the same video plot, it creates a video division record corresponding to the original video, wherein the video division record includes the video segment identifier of each original video segment and the association relationship between the video segment identifiers of different original video segments belonging to the same video plot.
[0130] In the method provided by the embodiment of the present application, since the background features of a video segment represent the environment in which the object in the video segment is located, if the similarity between the background features of at least two adjacent video segments is greater than a second threshold value, it means that the environments in the at least two video segments are similar or identical, and it can be considered that the video plots in the at least two video segments are identical, so the at least two video segments are determined to be video segments belonging to the same video plot. The present application divides the video based on the similarity between the background features of the video segments, thereby determining which video segments belong to the same video plot, and can cover any type of video plot, avoiding the limitations of video division based on action, and improving the effect of video division. In addition, by creating a video division record and maintaining the video division result, it is convenient to subsequently verify the video division result according to the video division record, or to play the video according to the video plot according to the video division record.
[0131] It should be noted that the embodiment of the present application is only described by taking the execution subject as a server as an example. In another embodiment, the execution subject of the above steps 301-304 may also be other computer devices, such as the execution subject being a terminal.
[0132] Figure 4 This is a flow chart of a video segmentation method provided by an embodiment of the present application. Figure 4 , the method comprising:
[0133] 401. The terminal receives a verification request sent by the server.
[0134] In the above Figure 3 In the embodiment of the present invention, after the server completes the division of the original video, it can also create a video division record of the original video, wherein the video division record includes the video segment identifier of each original video segment in the original video, and the association relationship between the video segment identifiers of different original video segments belonging to the same video plot. In order to further improve the accuracy of video division, after completing the automatic division of the video plot, the server can also send the video division record to the terminal for manual verification, and the server sends a verification request carrying the video division record to the terminal.
[0135] The terminal receives the verification request sent by the server, and the verification request is used to request the terminal to verify the video division record of the original video.
[0136] 402. The terminal displays video division information indicating the association relationship based on the verification request.
[0137] The terminal obtains the video division record carried in the verification request, generates video division information indicating the association relationship according to the association relationship in the video division record, and displays the video division information so that the verification personnel can view the video division information and judge whether the association relationship is accurate according to the video division information, that is, whether the division method of the video segment is accurate.
[0138] The video segmentation information includes multiple types of segmentation information, and it is only necessary to indicate the association relationship between the video segment identifiers of different original video segments belonging to the same video plot, and the embodiment of the present application does not limit this.
[0139] 403. The terminal updates the association relationship in the video division record in response to the editing operation on the video division information.
[0140] The verification personnel checks the video division information to determine whether the video division information is accurate. Since the video division information is used to indicate the association relationship, if the association relationship in the video division record created by the server is inaccurate, the video division information displayed by the terminal is also inaccurate. If the association relationship is accurate, the video division information is also accurate. Accordingly, the verification personnel can verify the association relationship in the video division record by verifying the video division information. For example, the verification personnel checks the video division information to determine whether the original video segments indicated by the multiple original video segment identifiers corresponding to the association relationship belong to the same video segment of the same video plot. If they are indeed video segments belonging to the same video plot, the association relationship is accurate. If they are not video segments belonging to the same video plot, the association relationship is wrong.
[0141] When the verification personnel believe that the video division information is inaccurate, the video division information needs to be edited. Therefore, the verification server responds to the editing operation on the video division information and updates the association relationship in the video division record, thereby correcting the erroneous association relationship.
[0142] 404. The terminal sends the updated video division record to the server.
[0143] After the terminal updates the association relationship in the video division record, it sends the updated video division record to the server, and the server obtains the updated video division record.
[0144] In the method provided by the embodiment of the present application, since the server has created a video division record, the terminal displays the video division information based on the verification request carrying the video division record. The verification personnel judge whether the association relationship indicated by the video division information is accurate by checking the video division information, thereby performing an editing operation on the video division information, so that the terminal updates the association relationship to correct the wrong association relationship, obtains a more accurate video division record, and can further improve the accuracy of video division. Therefore, the embodiment of the present application takes into account the convenience of automatic division and the accuracy of manual division, and improves the overall performance of video division.
[0145] Figure 5 This is a flow chart of a video segmentation method provided in an embodiment of the present application. Taking the interactive subjects as a server and a terminal as an example, see Figure 5 , the method comprising:
[0146] 501. The server divides the original video into a plurality of continuous original video segments.
[0147] The server obtains the original video to be divided, and the original video can be a variety of types of videos, such as movies, TV series, variety shows, cartoons or documentaries, etc. Optionally, the server obtains the stored original video, for example, the server is a video application server, and the video application server stores multiple videos, which is used to provide the stored videos to the video application for playback.
[0148] The server divides the original video into a plurality of continuous original video segments, each of which includes a plurality of continuous video frames, and a similarity between adjacent video frames in the plurality of video frames is greater than a first threshold, that is, each original video segment includes a plurality of similar video frames.
[0149] Each original video segment obtained by the server can be regarded as a storyboard, and the server obtains a plurality of continuous storyboards by performing shot segmentation on the original video. Shot segmentation refers to decomposing continuous video images into units of one shot movement, and a storyboard refers to continuous video images obtained by one continuous shooting. Optionally, the server uses the open source library pyScenedetect (video segmenter) to perform shot segmentation.
[0150] In one possible implementation, the server divides the original video into a plurality of continuous video frames, extracts frame features of each video frame, determines the similarity between the frame features of every two adjacent video frames, and in response to the similarity between the frame features of at least two adjacent video frames being greater than a first threshold, determines the at least two video frames as an original video segment, thereby obtaining a plurality of continuous original video segments.
[0151] Figure 6is a schematic diagram of a video frame provided by the present application. The server divides the original video into multiple original video segments. Figure 6 6 shows the original video segments 601, 602, 603, 604 and 605 obtained by the division. Each original video segment includes a plurality of similar video frames. Figure 6 Two video frames in each original video segment are selected for display.
[0152] 502. For each original video segment, the server extracts features from the background area of each video frame in the original video segment to obtain background features of each video frame.
[0153] Each video frame includes a foreground area and a background area. The foreground refers to the object that is relatively close to the camera in the video frame and is the main subject of the video frame, such as people, animals or vehicles. The background refers to the scenery behind the foreground in the video frame, which can express the space-time environment of the foreground, such as streets, restaurants, basketball courts, etc.
[0154] For each original video segment obtained by division, the server extracts features from the background area of each video frame in the original video segment to obtain background features of each video frame in the original video segment. The background features of the video frame are used to describe the background in the video frame, that is, the environment where the object in the video frame is located.
[0155] In one possible implementation, for each video frame, the server performs image segmentation on the video frame to obtain a background image corresponding to the video frame; and performs feature extraction on the background image to obtain background features of the video frame. The background image includes the background area of the video frame but does not include the foreground area of the video frame. That is, the background image only includes image information of the background area but does not include image information of the foreground area. Therefore, the background features of the video frame can be obtained by directly performing feature extraction on the background image. Optionally, the server performs feature extraction on the background image based on a trained feature extraction model to obtain background features of the video frame corresponding to the background image.
[0156] Optionally, the server generates a background annotation map corresponding to the video frame based on the location of the foreground area or background area in the video frame; based on the background annotation map, the video frame is segmented to obtain a background image. The background annotation map is used to indicate the background area in the video frame. Optionally, the background annotation map corresponding to the video frame has the same size as the video frame, and the pixel values of each pixel in the background annotation map are 0 or 1, wherein the pixel value of 1 is located in the background area, and the pixel value of 0 is located in the foreground area. For example, the background annotation map is a background mask map. The server multiplies the background annotation map with the video frame to obtain the background image corresponding to the video frame.
[0157] Optionally, the server detects the foreground area in the video frame, and based on the detected foreground area, generates a foreground annotation map corresponding to the video frame, and the foreground annotation map is used to indicate the foreground area in the video frame. Then, the foreground annotation map corresponding to the video frame is inverted to obtain a background annotation map corresponding to the video frame. Optionally, the server may use a saliency detection algorithm to detect the foreground area in the video frame, or may use other algorithms for detection, which is not limited in the embodiments of the present application.
[0158] The foreground annotation map corresponding to the video frame has the same size as the video frame, and the pixel values of each pixel in the foreground annotation map are 0 or 1, wherein the pixel values of 1 are located in the foreground area, and the pixel values of 0 are located in the background area. For example, the foreground annotation map is a foreground mask map. Then, inverting the foreground annotation map means replacing 0 in the pixel value with 1 and replacing 1 in the pixel value with 0 in the foreground annotation map, thereby obtaining a background annotation map.
[0159] Figure 7 This is a flowchart of obtaining a background image provided by an embodiment of the present application. Figure 7 , the server detects the foreground area in the video frame 701, generates a foreground annotation image 702 corresponding to the video frame 701 based on the detected foreground area, and then inverts the foreground annotation image 702 to obtain a background annotation image 703 corresponding to the video frame 701. The server performs image segmentation on the video frame 701 based on the background annotation image 703 to obtain a background image 704. Among them, the pixel points with a pixel value of 1 in the foreground annotation image 702 are located in the foreground area, and the pixel points with a pixel value of 0 are located in the background area, so the foreground area is displayed in black and the background area is displayed in white. The pixel points with a pixel value of 1 in the background annotation image 703 are located in the background area, and the pixel points with a pixel value of 0 are located in the foreground area, so the foreground area is displayed in white and the background area is displayed in black.
[0160] Figure 8 is a schematic diagram of a video frame and a background image of the video frame provided in an embodiment of the present application, see Figure 8 , Figure 8 Included are video frame 801 and corresponding background image 802, video frame 803 and corresponding background image 804, video frame 805 and corresponding background image 806, wherein background image 802, background image 804 and background image 806 only include background areas but do not include foreground areas.
[0161] Fig. 9 is a flowchart of obtaining a background image corresponding to a video frame provided by an embodiment of the present application, such as Fig. 9 As shown, including:
[0162] 901. Obtain a video frame;
[0163] 902. Detect a foreground area in a video frame;
[0164] 903. Obtain a foreground annotation map by detecting a foreground area in a video frame;
[0165] 904. Invert the pixel values in the foreground annotation image to obtain a background annotation image;
[0166] 905. Perform image segmentation on the video frame based on the background annotation image to obtain a background image.
[0167] In another possible implementation, the server pre-trains a background recognition model, which is used to generate a background image corresponding to any image. Subsequently, based on the trained background recognition model, the background recognition of the video frame is performed to obtain the background image corresponding to the video frame. Optionally, the background recognition model can be a deep learning network model trained based on imagenet (a large general object recognition open source data set), and the parameter weights of the deep learning network model are obtained through training, thereby obtaining the imagenet pre-trained model as the background recognition model.
[0168] 503. The server determines background features of the original video segment based on background features of multiple video frames in the original video segment.
[0169] The server obtains the background features of each video frame in each original video segment, and then for each original video segment, based on the background features of multiple video frames in the original video segment, determines the background features of the original video segment, and the background features of the original video segment are used to describe the background of the original video segment, that is, the environment in which the object in the original video segment is located.
[0170] In a possible implementation, the server extracts multiple reference video frames from the original video segment, and determines the average of the background features of the multiple reference video frames as the background feature of the original video segment. The multiple reference video frames do not include the starting video frame and the ending video frame of the original video segment, that is, multiple reference video frames are selected from the video frames located in the middle part between the starting video frame and the ending video frame. The average of the background features of the multiple reference video frames is the embedding feature of the original video segment, which serves as the background feature of the original video segment. Since the starting video frame and the ending video frame of an original video segment may include special effects for switching between the original video segments, the background features of the starting video frame and the ending video frame cannot accurately represent the background features of the entire original video segment, which will affect the expression of the storyboard features. Therefore, the background features of the original video segment determined based on the background features of the reference video frames after removing the starting video frame and the ending video frame are more accurate.
[0171] Optionally, the server first determines a first number having a first ratio to a total number of multiple video frames in the original video segment, and a second number having a second ratio to the total number, and then removes the first number of video frames starting from the start video frame of the original video segment and proceeding forward, and removes the second number of video frames starting from the end video frame of the original video segment and proceeding backward, and the remaining multiple video frames are used as reference video frames.
[0172] For example, taking the selection of 80% of the reference video frames as an example, the server removes 10% of the video frames starting from the start video frame of the original video segment and removing 10% of the video frames starting from the end video frame of the original video segment and moving backwards to obtain 80% of the reference video frames in the middle part as the basis for determining the background features of the original video segment.
[0173] In another possible implementation, the server clusters the multiple video frames based on the background features of the multiple video frames in the original video segment to obtain multiple video frame sets, each video frame set includes at least one video frame; selects a reference video frame set from the multiple video frame sets, the reference video frame set refers to a video frame set including the largest number of video frames; and determines the average of the background features of the multiple video frames in the reference video frame set as the background feature of the original video segment.
[0174] In the multiple video frame sets obtained by clustering multiple video frames, the background features of at least one video frame included in each video frame set are similar to each other. The more video frames in the video frame set, the more video frames in the original video segment have background features similar to those in the video frame set, and the background features of the video frames in the video frame set can better reflect the background features of the original video segment. Therefore, the server determines the number of video frames included in each video frame set, and selects a reference video frame set with the largest number of video frames, and uses the background features of the multiple video frames in the reference video frame set as the basis for determining the background features of the original video segment, so that the background features of the original video segment obtained are more accurate.
[0175] Optionally, the server may use a k-means algorithm (a clustering algorithm) to cluster multiple video frames, or use other clustering algorithms to cluster multiple video frames, which is not limited in the embodiments of the present application.
[0176] In another possible implementation, the server clusters the multiple video frames based on the background features of the multiple video frames in the original video segment to obtain each video frame set, each video frame set includes at least one central video frame, and the central video frame in the video frame set is the clustering center in the clustering process. The server selects a reference video frame set from the multiple video frame sets, the reference video frame set refers to a video frame set including the largest number of video frames, and determines the background features of the central video frame in the reference video frame set as the background features of the original video segment.
[0177] Since the background features of the video frames in the reference video frame set can better reflect the background features of the original video segment, and the background features of each video frame in the reference video frame set are highly similar to the background features of the central video frame, the background features of the central video frame can better reflect the background features of the original video segment compared with other video frames in the reference video frame set, and the background features of the central video frame are determined as the background features of the original video segment, and the background features of the original video segment are more accurate.
[0178] Fig.10 This is a flowchart of obtaining background features of an original video segment provided by an embodiment of the present application, see Fig.10 ,include:
[0179] 1001. Obtain a background image corresponding to a video frame;
[0180] 1002. Extract features from the background image;
[0181] 1003. Obtain background features of the video frame by extracting features from the background image;
[0182] 1004. Determine background features of the original video segment based on background features of the multiple video frames.
[0183] It should be noted that, by executing the above steps 502-503, the server obtains the background features of each original video segment based on the background area of each video frame in each original video segment. In addition to the method provided in the above steps 502-503, the server can also use other methods to obtain the background features of the original video segment based on the background area of each video frame.
[0184] It should be noted that the processes such as background area recognition and background feature extraction in the embodiments of the present application can all be performed based on a deep learning model, which can enhance the generalization of the present solution, and the accuracy of the present solution can be continuously improved by subsequently optimizing the model.
[0185] 504. In response to the similarity between the background features of at least two adjacent original video segments being greater than a second threshold, the server determines the at least two original video segments as video segments belonging to the same video plot.
[0186] The server obtains the similarity between the background features of every two adjacent original video segments. If the similarity between the background features of two adjacent original video segments is greater than the second threshold, it means that the environments in the two original video segments are similar or identical. Since the two original video segments are adjacent, it can be considered that the video plots in the two original video segments are continuous and identical video plots. Therefore, in response to the similarity between the background features of at least two adjacent original video segments being greater than the second threshold, the server determines the at least two original video segments as video segments belonging to the same video plot. Among the multiple original video segments belonging to the same video plot, the position of the starting video frame in the first original video segment is the starting position of a video plot, and the position of the ending video frame in the last original video segment is the ending position of a video plot.
[0187] The server may determine multiple groups of original video segments from multiple original video segments in the original video, each group of original video segments represents a different video plot, and each group of original video segments includes one original video segment or multiple original video segments. For example, the multiple groups of original video segments include a group of original video segments belonging to video plot A, a group of original video segments belonging to video plot B, and a group of original video segments belonging to video plot C. Among them, the group of original video segments belonging to video plot A includes only one original video segment 1; the group of original video segments belonging to video plot B includes original video segments 2 and original video segments 3, and the similarity between the background features of original video segments 2 and original video segments 3 is greater than the second threshold; the group of original video segments belonging to video plot C includes original video segments 4, original video segments 5, and original video segments 6, and the similarity between the background features of original video segments 4 and original video segments 5 is greater than the second threshold, and the similarity between the background features of original video segments 5 and original video segments 6 is greater than the second threshold.
[0188] In a possible implementation, the server determines, starting from the second original video segment, the similarity between the video background features of each original video segment and the previous original video segment among a plurality of consecutive original video segments, and in response to the similarity between the background features of any original video segment and the previous original video segment of any original video segment being greater than a second threshold, determines any original video segment and the previous original video segment as video segments belonging to the same video plot.
[0189] The server starts traversing from the second original video segment, and determines whether the similarity between the background features of each original video segment and the previous original video segment is greater than the second threshold. If the similarity between the background features of a certain original video segment and the previous original video segment is greater than the second threshold, the server determines that the original video segment and the previous original video segment are video segments belonging to the same video plot. If the similarity between the background features of a certain original video segment and the previous original video segment is not greater than the second threshold, it means that the video plot of the original video segment is different from that of the previous original video segment, and the server continues to traverse the next original video segment.
[0190] Fig.11 is a flowchart of a video segmentation method provided in an embodiment of the present application, see Fig.11 ,include:
[0191] 1101. Segment the original video into shots to obtain a plurality of continuous video shots (original video segments);
[0192] 1102. Obtain a background image corresponding to each video frame in each video storyboard;
[0193] 1103. Extracting background features of the video frame based on the background image corresponding to the video frame;
[0194] 1104. Acquire background features of the video storyboard based on background features of the plurality of video frames;
[0195] 1105. Based on the background feature of each video storyboard, perform multi-storyboard aggregation, wherein the background features of the multiple video storyboards obtained by aggregation are similar, and the multiple video storyboards obtained by aggregation belong to the same video plot;
[0196] 1106. Complete the plot division of the original video.
[0197] Fig.12 is a schematic diagram of a video segmentation result provided in an embodiment of the present application, see Fig.12 , the original video is divided into original video segments 1201, original video segment 1202, original video segment 1203, original video segment 1204, original video segment 1205, original video segment 1206 and original video segment 1207. The method provided in the embodiment of the present application is used to segment the video plot, and it is determined that the original video segment 1201 belongs to one video plot, the original video segment 1202 and the original video segment 1203 belong to one video plot, the original video segment 1204 belongs to one video plot, and the original video segments 1205, 1206 and 1207 belong to one video plot.
[0198] By executing the above steps 501-504, the video plot segmentation of the original video is completed, thereby a video is divided into multiple video plots according to the narrative, such as a dining plot in a restaurant, a conversation plot in a parking lot, etc. It should be noted that the embodiment of the present application only illustrates the process of dividing the video plot of the original video. In another embodiment, after the server executes the above step 504 to complete the division of the video plot, multiple original video segments belonging to the same video plot can also be merged, then each original video segment obtained by merging belongs to one video plot respectively, and each other unmerged original video segment also belongs to one video plot respectively.
[0199] 505. The server creates a video partition record corresponding to the original video.
[0200] When the server completes the video plot division of the original video and determines which original video segments belong to the same video plot, it creates a video division record corresponding to the original video, wherein the video division record includes a video segment identifier of each original video segment and an association relationship between video segment identifiers of different original video segments belonging to the same video plot. The video segment identifier is used to indicate the original video segment, for example, the video segment identifier is a sequence number of the original video segment.
[0201] The video division record can indicate which original video segments in the original video belong to the same video plot. When the server sends the original video to the terminal for playback, the video division record of the original video can be sent to the terminal synchronously. The terminal can then know which original video segments in the original video belong to the same video plot based on the video division record, thereby determining the video frames corresponding to the positions of different video plot segments in the original video, so as to add marks to these video frames when playing the original video, for example, adding marks to the positions corresponding to the video frames in the progress bar, so that the user can jump to the video plot of interest according to the displayed marks when watching the original video.
[0202] 506. The server sends a verification request to the terminal.
[0203] In order to further improve the accuracy of video division, after completing the automatic division of the video plot, the server can also send the video division record to the terminal for manual verification, and the server sends a verification request carrying the video division record to the terminal.
[0204] 507. The terminal receives the verification request sent by the server.
[0205] 508. The terminal displays video division information indicating the association relationship based on the verification request.
[0206] The terminal obtains the video division record carried in the verification request, generates video division information indicating the association relationship according to the association relationship in the video division record, and displays the video division information so that the verification personnel can view the video division information and determine whether the association relationship is accurate according to the video division information.
[0207] In a possible implementation, the terminal displays the indicator marks corresponding to the multiple video segment identifiers in the video division record based on the verification request. The video segment identifiers of different original video segments belonging to the same video plot correspond to an indicator mark, and the other video segment identifiers correspond to an indicator mark respectively. If the verification personnel finds that the video segment identifiers of multiple different original video segments correspond to an indicator mark, it can be known that there is an association relationship between the multiple different original video segments, that is, the server determines the multiple different original video segments as video segments belonging to the same video plot. If the verification personnel finds that the video segment identifier of a certain original video segment corresponds to an indicator mark alone, it can be known that the server determines the original video segment alone as a video segment belonging to a video plot. Therefore, by displaying the indicator mark corresponding to the video segment identifier, the verification personnel can know the server's division result of the original video, and thus verify the division result.
[0208] In another possible implementation, the verification request also carries a video frame corresponding to each video segment identifier. In addition to displaying the indicator marks corresponding to the multiple video segment identifiers, the terminal also displays the video frame corresponding to the same video segment identifier as each indicator mark at the display position corresponding to each indicator mark.
[0209] Among them, a video frame corresponding to a video segment identifier refers to a video frame in the original video segment indicated by the video segment identifier, for example, the video frame is a video frame located in the middle of the original video segment, etc., and the video frame can be used to represent the video plot to which the original video segment belongs. Then, the terminal displays the video frame corresponding to the same video segment identifier as each indicator mark, so that the verification personnel can determine the video plot to which each original video segment corresponding to the indicator mark belongs by viewing the video frame, which is more intuitive and vivid, thereby judging whether multiple original video segments corresponding to an indicator mark do belong to the same video plot, and judging whether the original video segments corresponding to two different indicator marks do not belong to the same video plot.
[0210] Fig.13 is a schematic diagram of video division information provided by an embodiment of the present application, see Fig.13, the video frames in the original video segment are displayed in order in front of the checker, and the indicator mark is a long strip indicator mark. The checker corrects the video division information by correcting the position of the long strip indicator mark. Wherein, at the display position corresponding to the indicator mark 1308, the video frame 1301 is displayed, and the original video segment where the video frame 1301 is located belongs to a video plot; at the display position corresponding to the indicator mark 1309, the video frames 1302 and 1303 are displayed, and the original video segments where the video frames 1302 and 1303 are located belong to the same video plot; at the display position corresponding to the indicator mark 1310, the video frame 1304 is displayed, and the original video segment where the video frame 1304 is located belongs to a video plot; at the display position corresponding to the indicator mark 1311, the video frames 1305, 1306 and 1307 are displayed, and the original video segments where the video frames 1305, 1306 and 1307 are located belong to the same video plot.
[0211] 509. The terminal updates the association relationship in the video division record in response to the editing operation on the video division information.
[0212] The verification personnel checks the video division information to determine whether the video division information is accurate. Since the video division information is used to indicate the association relationship, if the association relationship in the video division record created by the server is inaccurate, the video division information displayed by the terminal is also inaccurate. If the association relationship is accurate, the video division information is also accurate. Correspondingly, the verification personnel can verify the association relationship in the video division record by verifying the video division information. When the verification personnel believes that the video division information is inaccurate, the video division information needs to be edited. Therefore, the verification server responds to the editing operation of the video division information and updates the association relationship in the video division record, thereby correcting the erroneous association relationship.
[0213] In a possible implementation, as described in step 508 above, the video segment information displayed by the terminal includes indicator marks corresponding to multiple video segment identifiers, and the video segment identifiers of different original video segments belonging to the same video plot correspond to one indicator mark, and the other video segment identifiers correspond to one indicator mark respectively. The manner of updating the association relationship in response to the editing operation on the video segment information includes the following:
[0214] In a first manner, in response to a merging operation of the first indicator and the second indicator, the terminal creates an association relationship between a plurality of video segment identifiers corresponding to the first indicator and the second indicator in a video segmentation record.
[0215] Among them, the first indicator mark is adjacent to the second indicator mark, the first indicator mark corresponds to a video segment identifier, and the second indicator mark also corresponds to at least one video segment identifier, that is, at least one original video segment corresponding to the first indicator mark is adjacent to at least one original video segment corresponding to the second indicator mark. The server determines at least one original video segment corresponding to the first indicator mark as a video segment belonging to one video plot, and determines at least one original video segment corresponding to the second indicator mark as a video segment belonging to another video plot. If the verification personnel determines that the multiple original video segments corresponding to the first indicator mark and the second indicator mark are actually video segments belonging to the same video plot, the first indicator mark and the second indicator mark are merged. In response to the merging operation of the first indicator mark and the second indicator mark, the terminal creates an association relationship between the multiple video segment identifiers corresponding to the first indicator mark and the second indicator mark, and the association relationship indicates that the multiple original video segments indicated by the multiple video segment identifiers are video segments belonging to the same video plot.
[0216] In a second manner, in response to the deletion operation on the third indicator, the terminal deletes the association relationship between the multiple video segment identifiers corresponding to the third indicator in the video division record.
[0217] The third indicator corresponds to multiple video segment identifiers, that is, multiple original video segments. The server determines the multiple original video segments corresponding to the third indicator as video segments belonging to one video plot. If the verification personnel determine that the multiple original video segments corresponding to the third indicator do not actually belong to the same video plot, the third indicator is deleted. In response to the deletion operation of the third indicator, the terminal deletes the association relationship between the multiple video segment identifiers corresponding to the third indicator in the video division record, and no longer determines the multiple original video segments as video segments belonging to the same video plot.
[0218] In a third method, the terminal determines multiple fifth indicator markers obtained by splitting in response to the splitting operation of the fourth indicator marker; deletes the association relationship between the multiple video segment identifiers corresponding to the fourth indicator marker in the video division record; and for each fifth indicator marker, creates an association relationship between the multiple video segment identifiers corresponding to the fifth indicator marker in the video division record.
[0219] The fourth indicator mark corresponds to multiple video segment identifiers, that is, multiple original video segments. The server determines the multiple original video segments corresponding to the fourth indicator mark as video segments belonging to one video plot. If the verification personnel determine that the multiple original video segments are not actually video segments belonging to the same video plot, but the multiple original video segments include multiple groups of original video segments, and each group of original video segments belongs to a video plot, then the verification personnel splits the fourth indicator mark into multiple fifth indicator marks according to the segmentation of the video plots in the multiple original video segments, and each fifth indicator mark corresponds to a group of video segments belonging to the same video plot.
[0220] The terminal deletes the association relationship between the multiple video segment identifiers corresponding to the fourth indicator in the video division record. For each fifth indicator, if a certain fifth indicator corresponds to multiple original video segments, that is, corresponds to multiple video segment identifiers, the terminal creates an association relationship between the multiple video segment identifiers corresponding to the fifth indicator in the video division record to indicate that the multiple original video segments indicated by the multiple video segment identifiers belong to the same video plot.
[0221] 510. The terminal sends an updated video division record to the server.
[0222] After the terminal updates the association relationship in the video division record, an updated video division record is obtained, and the updated video division record is a more accurate video division record that has been manually verified. The terminal sends the updated video division record to the server.
[0223] 511. The server receives the updated video segmentation record.
[0224] The server receives the updated video division record and can replace the original video division record with the updated video division record. When the original video is subsequently sent to the terminal for playback, the updated video division record can be sent to the terminal synchronously.
[0225] It should be noted that the embodiment of the present application is only described by taking the creation of a video division record and sending it to the terminal for verification as an example. In another embodiment, after the server completes the division of the video, it is not necessary to create a video division record, that is, the above steps 505-511 are not performed. Alternatively, after the server creates the video division record, it is not necessary to send it to the terminal for verification, that is, the above steps 506-511 are not performed.
[0226] In the method provided by the embodiment of the present application, since the background features of a video segment represent the environment in which the object in the video segment is located, if the similarity between the background features of at least two adjacent video segments is greater than a second threshold value, it means that the environments in the at least two video segments are similar or identical, and it can be considered that the video plots in the at least two video segments are identical, so the at least two video segments are determined to be video segments belonging to the same video plot. The present application divides the video based on the similarity between the background features of the video segments, thereby determining which video segments belong to the same video plot, and can cover any type of video plot, avoiding the limitations of video division based on action, and improving the effect of video division. In addition, by creating a video division record and maintaining the video division result, it is convenient to subsequently verify the video division result according to the video division record, or to play the video according to the video plot according to the video division record.
[0227] Furthermore, since the server has created a video division record, the terminal displays the video division information based on the verification request carrying the video division record. The verification personnel checks the video division information to determine whether the association relationship indicated by the video division information is accurate, thereby performing an editing operation on the video division information, so that the terminal updates the association relationship to correct the wrong association relationship and obtain a more accurate video division record, thereby further improving the accuracy of the video division. Therefore, the embodiment of the present application takes into account the convenience of automatic division and the accuracy of manual division, and improves the overall performance of video division.
[0228] Furthermore, since the starting video frame and the ending video frame of a video segment may include special effects for switching between video segments, the background features of the starting video frame and the ending video frame cannot accurately represent the background features of the entire video segment, which will affect the expression of the storyboard features. Therefore, it is more accurate to remove the starting video frame and the ending video frame and determine the background features of the video segment based on the background features of the reference video frame.
[0229] In addition, the related art uses manual annotation methods to divide all the video plots in a complete video, which consumes a lot of manpower and time. However, the embodiment of the present application combines artificial intelligence technology to realize automatic division of video plots, reduce manpower investment, and improve the efficiency of video division.
[0230] Moreover, among the multiple video frame sets obtained by clustering the multiple video frames, the reference video frame set including the largest number of video frames can better reflect the background features of the video segment. Therefore, the background features of the multiple video frames in the reference video frame set are used as the basis for determining the background features of the video segment, and the background features of the obtained video segment are more accurate.
[0231] Moreover, the background features of each video frame in the reference video frame set are highly similar to the background features of the central video frame. Therefore, compared with other video frames in the reference video frame set, the background features of the central video frame can better reflect the background features of the video segment. The background features of the central video frame are determined as the background features of the video segment, and the background features of the video segment are more accurate.
[0232] In addition, the terminal displays the video frame corresponding to the same video segment identifier as each indicator mark, which is convenient for the verification personnel to determine the video plot to which each video segment corresponding to the indicator mark belongs by viewing the video frame, which is more intuitive and vivid.
[0233] Moreover, the processes such as background area recognition and background feature extraction in the embodiments of the present application can all be performed based on a deep learning model, thereby enhancing the generalization of the present solution, and the accuracy of video segmentation can be continuously improved by subsequently optimizing the model.
[0234] The method provided in the above embodiment can be applied to a scenario in which a video is played according to a video plot. In this scenario, two processes are included: video segmentation and video playback. Fig.14 As shown, the process of video segmentation and video playback includes:
[0235] 1401. The server divides an original video into a plurality of continuous original video segments, wherein a similarity between adjacent video frames in each original video segment is greater than a first threshold.
[0236] 1402. The server obtains background features of each original video segment based on the background area of each video frame in each original video segment.
[0237] 1403. In response to the similarity between the background features of at least two adjacent original video segments being greater than a second threshold, the server determines the at least two original video segments as video segments belonging to the same video plot.
[0238] 1404. The server creates a video segmentation record corresponding to the original video, wherein the video segmentation record includes a video segment identifier of each original video segment and an association relationship between video segment identifiers of different original video segments belonging to the same video plot.
[0239] 1405. In response to the video playback request sent by the terminal, the server sends the original video and the video division record of the original video to the terminal.
[0240] 1406. The terminal receives the original video and the video segmentation record.
[0241] 1407. The terminal determines at least one original video segment belonging to a video plot according to the video division record.
[0242] 1408. When playing the original video, the terminal determines a starting video frame in at least one original video segment belonging to a video plot, and displays a jump mark at a position corresponding to the starting video frame in the progress bar, wherein at least one original video segment between every two jump marks in the progress bar belongs to a video plot.
[0243] 1409. In response to the click operation on any jump mark, the terminal jumps to the video frame corresponding to the jump mark for playback. If the user is not interested in the video plot of the currently played original video segment, the user can click the next jump mark to jump to the original video segment of the next video plot.
[0244] Fig.15 is a structural diagram of a video segmentation device provided in an embodiment of the present application. Fig.15 , the device comprises:
[0245] The video division module 1501 is used to divide the original video into a plurality of continuous original video segments, wherein the similarity between adjacent video frames in each original video segment is greater than a first threshold;
[0246] A feature acquisition module 1502, configured to acquire background features of each original video segment based on a background region of each video frame in each original video segment;
[0247] The video segment determination module 1503 is configured to determine the at least two adjacent original video segments as video segments belonging to the same video plot in response to the similarity between the background features of the at least two adjacent original video segments being greater than a second threshold;
[0248] The segmentation record creation module 1504 is used to create a video segmentation record corresponding to the original video, wherein the video segmentation record includes a video segment identifier of each original video segment and an association relationship between video segment identifiers of different original video segments belonging to the same video plot.
[0249] The video segmentation device provided by the embodiment of the present application, since the background features of the video segment represent the environment in which the object in the video segment is located, if the similarity between the background features of at least two adjacent video segments is greater than the second threshold, it means that the environments in the at least two video segments are similar or the same, and it can be considered that the video plots in the at least two video segments are the same, so the at least two video segments are determined to be video segments belonging to the same video plot. The present application performs video segmentation based on the similarity between the background features of the video segments, thereby determining which video segments belong to the same video plot, and can cover any type of video plot, avoiding the limitations of video segmentation based on action, and improving the effect of video segmentation. In addition, by creating a video segmentation record and maintaining the video segmentation result, it is convenient to subsequently verify the video segmentation result according to the video segmentation record, or to play the video according to the video plot according to the video segmentation record.
[0250] Alternatively, see Fig.16 , the feature acquisition module 1502 includes:
[0251] The feature extraction unit 15021 is used to extract features from the background area of each video frame in each original video segment to obtain background features of each video frame;
[0252] The feature determination unit 15022 is used to determine the background features of the original video segment based on the background features of multiple video frames in the original video segment.
[0253] Alternatively, see Fig.16 , feature extraction unit 15021, used for:
[0254] For each video frame, the video frame is segmented to obtain a background image corresponding to the video frame, wherein the background image includes a background area of the video frame but does not include a foreground area of the video frame;
[0255] Perform feature extraction on the background image to obtain the background features of the video frame.
[0256] Alternatively, see Fig.16 , a feature determination unit 15022 is used to:
[0257] Extracting multiple reference video frames from the original video segment, wherein the multiple reference video frames do not include a start video frame and an end video frame of the original video segment;
[0258] The average of the background features of multiple reference video frames is determined as the background feature of the original video segment.
[0259] Alternatively, see Fig.16 , a feature determination unit 15022 is used to:
[0260] Based on background features of multiple video frames in the original video segment, clustering the multiple video frames to obtain multiple video frame sets, each of which includes at least one video frame;
[0261] Selecting a reference video frame set from multiple video frame sets, where the reference video frame set refers to a video frame set including the largest number of video frames;
[0262] The average value of the background features of multiple video frames in the reference video frame set is determined as the background feature of the original video segment.
[0263] Alternatively, see Fig.16 , a feature determination unit 15022 is used to:
[0264] Based on background features of multiple video frames in the original video segment, clustering the multiple video frames to obtain multiple video frame sets, each of which includes at least one central video frame;
[0265] Selecting a reference video frame set from multiple video frame sets, where the reference video frame set refers to a reference video frame set including the largest number of video frames;
[0266] The background features of the central video frame in the reference video frame set are determined as the background features of the original video segment.
[0267] Alternatively, see Fig.16 The video segment determination module 1503 includes:
[0268] A similarity determination unit 15031 is used to determine the similarity between the video background features of each original video segment and the previous original video segment starting from the second original video segment in a plurality of consecutive original video segments;
[0269] The video segment determining unit 15032 is configured to determine any original video segment and the previous original video segment as video segments belonging to the same video plot in response to the similarity between the background features of any original video segment and the previous original video segment being greater than a second threshold.
[0270] Alternatively, see Fig.16 , the device further comprises:
[0271] The video segment merging module 1505 is used to merge multiple original video segments belonging to the same video plot.
[0272] Alternatively, see Fig.16 , the device further comprises:
[0273] The verification request sending module 1506 is used to send a verification request to the terminal, the verification request carrying the video division record; the terminal is used to display the video division information indicating the association relationship based on the verification request, and in response to the editing operation of the video division information, update the association relationship in the video division record, and return the updated video division record;
[0274] The segmentation record receiving module 1507 is used to receive the updated video segmentation record.
[0275] It should be noted that: the video division device provided in the above embodiment only uses the division of the above functional modules as an example when dividing the video. In actual applications, the above functional allocation can be completed by different functional modules as needed, that is, the internal structure of the server is divided into different functional modules to complete all or part of the functions described above. In addition, the video division device provided in the above embodiment and the video division method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0276] Fig.17 is a structural diagram of a video segmentation device provided in an embodiment of the present application. Fig.17 , the device comprises:
[0277] The verification request receiving module 1701 is used to receive the verification request sent by the server, the verification request carries the video division record created by the server, the video division record includes the video segment identifier of each original video segment in the original video, and the association relationship between the video segment identifiers of different original video segments belonging to the same video plot;
[0278] An information display module 1702, configured to display video division information indicating an association relationship based on a verification request;
[0279] The association relationship updating module 1703 is used to update the association relationship in the video division record in response to the editing operation on the video division information;
[0280] The segmentation record sending module 1704 is used to send the updated video segmentation record to the server.
[0281] In the video division device provided by the embodiment of the present application, since the server has created a video division record, the terminal displays the video division information based on the verification request carrying the video division record. The verification personnel judge whether the association relationship indicated by the video division information is accurate by checking the video division information, thereby performing an editing operation on the video division information, so that the terminal updates the association relationship to correct the wrong association relationship and obtain a more accurate video division record, thereby further improving the accuracy of the video division. Therefore, the embodiment of the present application takes into account the convenience of automatic division and the accuracy of manual division, and improves the overall performance of video division.
[0282] Alternatively, see Fig.18 , the information display module 1702 includes:
[0283] The information display unit 17021 is used to display the indicator marks corresponding to the multiple video segment identifiers in the video division record based on the verification request, wherein the video segment identifiers of different original video segments belonging to the same video plot correspond to one indicator mark, and the other video segment identifiers correspond to one indicator mark respectively.
[0284] Alternatively, see Fig.18 The verification request also carries a video frame corresponding to each video segment identifier. The information display module 1702 is used to display the video frame corresponding to the same video segment identifier as each indicator mark at the display position corresponding to each indicator mark.
[0285] Alternatively, see Fig.18 , the association relationship updating module 1703 includes:
[0286] The association relationship creating unit 17031 is used to create an association relationship between multiple video segment identifiers corresponding to the first indicator and the second indicator in the video segmentation record in response to the merging operation of the first indicator and the second indicator, and the first indicator is adjacent to the second indicator.
[0287] Alternatively, see Fig.18 , the association relationship updating module 1703 includes:
[0288] The association relationship deleting unit 17032 is configured to delete the association relationship between the multiple video segment identifiers corresponding to the third indicator in the video segmentation record in response to the deletion operation on the third indicator.
[0289] Alternatively, see Fig.18 , the association relationship updating module 1703 includes:
[0290] An indication mark determining unit 17033, configured to determine a plurality of fifth indication marks obtained by splitting the fourth indication mark in response to a splitting operation on the fourth indication mark;
[0291] The association relationship deleting unit 17032 is used to delete the association relationship between the multiple video segment identifiers corresponding to the fourth indicator mark in the video segmentation record;
[0292] The association relationship creating unit 17031 is configured to create, for each fifth indicator, an association relationship between multiple video segment identifiers corresponding to the fifth indicator in the video segmentation record.
[0293] It should be noted that: the video division device provided in the above embodiment only uses the division of the above functional modules as an example when dividing the video. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the terminal is divided into different functional modules to complete all or part of the functions described above. In addition, the video division device provided in the above embodiment and the video division method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0294] An embodiment of the present application further provides a terminal, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the video segmentation method of the above embodiment.
[0295] Fig.19 A schematic diagram of the structure of a terminal 1900 provided by an exemplary embodiment of the present application is shown.
[0296] The terminal 1900 includes a processor 1901 and a memory 1902 .
[0297] The processor 1901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 1901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0298] The memory 1902 may include one or more computer-readable storage media, which may be non-transitory. The memory 1902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1902 is used to store at least one computer program, which is used to be possessed by the processor 1901 to implement the video segmentation method provided in the method embodiment of the present application.
[0299] In some embodiments, the terminal 1900 may further optionally include: a peripheral device interface 1903 and at least one peripheral device. The processor 1901, the memory 1902 and the peripheral device interface 1903 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1903 via a bus, a signal line or a circuit board. Optionally, the peripheral device includes: at least one of a radio frequency circuit 1904 and a display screen 1905.
[0300] The peripheral device interface 1903 may be used to connect at least one peripheral device related to I / O (Input / Output) to the processor 1901 and the memory 1902. In some embodiments, the processor 1901, the memory 1902, and the peripheral device interface 1903 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 1901, the memory 1902, and the peripheral device interface 1903 may be implemented on a separate chip or circuit board, which is not limited in this embodiment.
[0301] The radio frequency circuit 1904 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 1904 communicates with the communication network and other communication devices through electromagnetic signals. The radio frequency circuit 1904 converts the electrical signal into an electromagnetic signal for transmission, or converts the received electromagnetic signal into an electrical signal. Optionally, the radio frequency circuit 1904 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, and the like. The radio frequency circuit 1904 can communicate with other devices through at least one wireless communication protocol. The wireless communication protocol includes, but is not limited to: a metropolitan area network, various generations of mobile communication networks (2G, 3G, 4G and 5G), a wireless local area network and / or a WiFi (Wireless Fidelity) network. In some embodiments, the radio frequency circuit 1904 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.
[0302] The display screen 1905 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, and any combination thereof. When the display screen 1905 is a touch display screen, the display screen 1905 also has the ability to collect touch signals on the surface or above the surface of the display screen 1905. The touch signal can be input to the processor 1901 as a control signal for processing. At this time, the display screen 1905 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, the display screen 1905 can be one, set on the front panel of the terminal 1900; in other embodiments, the display screen 1905 can be at least two, respectively set on different surfaces of the terminal 1900 or in a folding design; in other embodiments, the display screen 1905 can be a flexible display screen, set on a curved surface or a folding surface of the terminal 1900. Even, the display screen 1905 can also be set to a non-rectangular irregular shape, that is, a special-shaped screen. The display screen 1905 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).
[0303] Those skilled in the art will understand that Fig.19 The structure shown in the figure does not constitute a limitation on the terminal 1900, and the terminal 1900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0304] An embodiment of the present application further provides a server, which includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the video segmentation method of the above embodiment.
[0305] Fig. 20 This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 2000 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 2001 and one or more memories 2002, wherein the memory 2002 stores at least one computer program, and the at least one computer program is loaded and executed by the processor 2001 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output, and the server may also include other components for implementing device functions, which will not be described in detail here.
[0306] An embodiment of the present application further provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is loaded and executed by a processor to implement the operations performed in the video segmentation method of the above embodiment.
[0307] An embodiment of the present application also provides a computer program product or a computer program, which includes a computer program code, the computer program code is stored in a computer-readable storage medium, a processor reads the computer program code from the computer-readable storage medium, and the processor executes the computer program code to implement the operations performed in the video segmentation method of the above embodiment.
[0308] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0309] The above description is only an optional embodiment of the embodiments of the present application and is not intended to limit the embodiments of the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application should be included in the protection scope of the present application.
Claims
1. A video segmentation method, characterized in that: The method comprises: Dividing the original video into a plurality of continuous original video segments, wherein the similarity between adjacent video frames in each original video segment is greater than a first threshold; Based on the background area of each video frame in each original video segment, a background feature of each original video segment is obtained; wherein the background feature of the original video segment is an average of background features of at least two video frames of the original video segment or a background feature of a central video frame of the original video segment, and the central video frame is a clustering center of a video frame set obtained by clustering multiple video frames in the original video segment; In response to a similarity between background features of at least two adjacent original video segments being greater than a second threshold, determining the at least two original video segments as video segments belonging to the same video plot; A video division record corresponding to the original video is created, wherein the video division record includes a video segment identifier of each original video segment and an association relationship between video segment identifiers of different original video segments belonging to the same video plot, wherein the video segment identifiers of different original video segments belonging to the same video plot correspond to the same indicator mark, and other video segment identifiers correspond to other indicator marks respectively.
2. The method according to claim 1, characterized in that The acquiring the background feature of each original video segment based on the background area of each video frame in each original video segment includes: For each original video segment, extracting features from a background region of each video frame in the original video segment to obtain background features of each video frame; Based on the background features of a plurality of video frames in the original video segment, the background features of the original video segment are determined.
3. The method according to claim 2, characterized in that The determining the background feature of the original video segment based on the background features of the plurality of video frames in the original video segment comprises: Extracting a plurality of reference video frames from the original video segment, wherein the plurality of reference video frames do not include a start video frame and an end video frame of the original video segment; An average value of the background features of the multiple reference video frames is determined as the background feature of the original video segment.
4. The method according to claim 2, characterized in that: The determining the background feature of the original video segment based on the background features of the plurality of video frames in the original video segment comprises: Based on background features of multiple video frames in the original video segment, clustering the multiple video frames to obtain multiple video frame sets, each video frame set including at least one central video frame; Selecting a reference video frame set from the multiple video frame sets, the reference video frame set refers to a video frame set including the largest number of video frames; The background features of the central video frame in the reference video frame set are determined as the background features of the original video segment.
5. The method according to claim 1, characterized in that In response to the similarity between the background features of at least two adjacent original video segments being greater than a second threshold, determining the at least two adjacent original video segments as original video segments belonging to the same video plot comprises: Among the plurality of continuous original video segments, starting from the second original video segment, determining the similarity between the video background features of each original video segment and the previous original video segment; In response to the similarity between the background features of any original video segment and a previous original video segment of the any original video segment being greater than the second threshold, the any original video segment and the previous original video segment are determined to be video segments belonging to the same video plot.
6. The method according to claim 5, characterized in that After creating the video division record corresponding to the original video, the method further includes: Sending a verification request to a terminal, the verification request carrying the video division record; the terminal is used to display video division information indicating the association relationship based on the verification request, update the association relationship in the video division record in response to an editing operation on the video division information, and return the updated video division record; The updated video partition record is received.
7. A video segmentation method, characterized in that: The method comprises: Receive a verification request sent by a server, the verification request carrying a video division record created by the server, the video division record including a video segment identifier of each original video segment in the original video, and an association relationship between video segment identifiers of different original video segments belonging to the same video plot, wherein the video segment identifiers of different original video segments belonging to the same video plot correspond to the same indicator mark, and other video segment identifiers correspond to other indicator marks respectively; Displaying video division information indicating the association relationship based on the verification request; In response to an editing operation on the video division information, updating the association relationship in the video division record; Sending the updated video segmentation record to the server; The different original video segments belonging to the same video plot are: dividing the original video into a plurality of continuous original video segments, wherein the similarity between adjacent video frames in each original video segment is greater than a first threshold; obtaining background features of each original video segment based on a background area of each video frame in each original video segment; wherein the background features of the original video segment are the average of background features of at least two video frames of the original video segment or the background features of a central video frame of the original video segment, and the central video frame is the clustering center of a set of video frames obtained by clustering multiple video frames in the original video segment; in response to the similarity between the background features of at least two adjacent original video segments being greater than a second threshold, determining the at least two original video segments as different original video segments belonging to the same video plot.
8. The method according to claim 7, characterized in that The displaying of the video division information indicating the association relationship based on the verification request includes: Based on the verification request, indication marks corresponding to the multiple video segment identifiers in the video division record are displayed.
9. The method according to claim 8, characterized in that The verification request also carries a video frame corresponding to each video segment identifier, and the method further includes: At the display position corresponding to each indicator mark, a video frame corresponding to the same video segment identifier as each indicator mark is displayed.
10. A video division device, characterized in that: The device comprises: A video division module, used to divide the original video into a plurality of continuous original video segments, wherein the similarity between adjacent video frames in each original video segment is greater than a first threshold; A feature acquisition module, configured to acquire background features of each original video segment based on a background area of each video frame in each original video segment; wherein the background features of the original video segment are the average of background features of at least two video frames of the original video segment or the background features of a central video frame of the original video segment, and the central video frame is the cluster center of a video frame set obtained by clustering multiple video frames in the original video segment; a video segment determination module, configured to determine, in response to a similarity between background features of at least two adjacent original video segments being greater than a second threshold, the at least two original video segments as video segments belonging to the same video plot; A division record creation module is used to create a video division record corresponding to the original video, wherein the video division record includes a video segment identifier of each original video segment and an association relationship between video segment identifiers of different original video segments belonging to the same video plot, wherein the video segment identifiers of different original video segments belonging to the same video plot correspond to the same indicator mark, and other video segment identifiers correspond to other indicator marks respectively.
11. The device according to claim 10, characterized in that The feature acquisition module comprises: A feature extraction unit, configured to extract features from a background region of each video frame in each original video segment to obtain background features of each video frame; The feature determination unit is used to determine the background feature of the original video segment based on the background features of multiple video frames in the original video segment.
12. The device according to claim 11, characterized in that The feature determination unit is used to: Extracting a plurality of reference video frames from the original video segment, wherein the plurality of reference video frames do not include a start video frame and an end video frame of the original video segment; An average value of the background features of the multiple reference video frames is determined as the background feature of the original video segment.
13. The device according to claim 11, characterized in that The feature determination unit is used to: Based on background features of multiple video frames in the original video segment, clustering the multiple video frames to obtain multiple video frame sets, each video frame set including at least one central video frame; Selecting a reference video frame set from the multiple video frame sets, the reference video frame set refers to a video frame set including the largest number of video frames; The background features of the central video frame in the reference video frame set are determined as the background features of the original video segment.
14. The device according to claim 10, characterized in that The video segment determination module includes: a similarity determination unit, configured to determine, among the plurality of continuous original video segments, starting from the second original video segment, the similarity between the video background features of each original video segment and the previous original video segment; The video segment determining unit is configured to determine any original video segment and a previous original video segment as video segments belonging to the same video plot in response to the similarity between the background features of any original video segment and a previous original video segment of the any original video segment being greater than the second threshold.
15. The device according to claim 14, characterized in that The device also includes: A verification request sending module, configured to send a verification request to a terminal, wherein the verification request carries the video division record; the terminal is configured to display video division information indicating the association relationship based on the verification request, update the association relationship in the video division record in response to an editing operation on the video division information, and return the updated video division record; The division record receiving module is used to receive the updated video division record.
16. A video division device, characterized in that: The device comprises: A verification request receiving module, used to receive a verification request sent by a server, wherein the verification request carries a video division record created by the server, wherein the video division record includes a video segment identifier of each original video segment in the original video, and an association relationship between video segment identifiers of different original video segments belonging to the same video plot, wherein the video segment identifiers of different original video segments belonging to the same video plot correspond to the same indicator mark, and other video segment identifiers correspond to other indicator marks respectively; An information display module, used for displaying video division information indicating the association relationship based on the verification request; An association relationship updating module, configured to update the association relationship in the video division record in response to an editing operation on the video division information; A division record sending module, used for sending updated video division records to the server; The different original video segments belonging to the same video plot are: dividing the original video into a plurality of continuous original video segments, wherein the similarity between adjacent video frames in each original video segment is greater than a first threshold; obtaining background features of each original video segment based on a background area of each video frame in each original video segment; wherein the background features of the original video segment are the average of background features of at least two video frames of the original video segment or the background features of a central video frame of the original video segment, and the central video frame is the clustering center of a set of video frames obtained by clustering multiple video frames in the original video segment; in response to the similarity between the background features of at least two adjacent original video segments being greater than a second threshold, determining the at least two original video segments as different original video segments belonging to the same video plot.
17. The device according to claim 16, characterized in that The information display module comprises: An information display unit is used to display indication marks corresponding to multiple video segment identifiers in the video division record based on the verification request.
18. The device according to claim 17, characterized in that The verification request also carries a video frame corresponding to each video segment identifier, and the information display module is further used to display the video frame corresponding to the same video segment identifier as each indicator mark at the display position corresponding to each indicator mark.
19. A server, characterized in that: The server includes a processor and a memory, wherein at least one computer program is stored in the memory, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the video segmentation method according to any one of claims 1 to 6.
20. A terminal, characterized in that: The terminal includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the operations performed in the video segmentation method according to any one of claims 7 to 9.
21. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one computer program, and the at least one computer program is loaded and executed by a processor to implement the operations performed in the video segmentation method as described in any one of claims 1 to 6, or to implement the operations performed in the video segmentation method as described in any one of claims 7 to 9.
22. A computer program product, comprising a computer program, wherein the computer program is stored in a computer-readable storage medium, and a processor reads and executes the computer program from the computer-readable storage medium to implement the operations performed in the video segmentation method as described in any one of claims 1 to 6, or to implement the operations performed in the video segmentation method as described in any one of claims 7 to 9.
Citation Information
Patent Citations
Video editing method and device
CN104284241A
Film / television plot automatic segmentation method based on film / television content semantic analysis
CN107066488A
Video scene division method and device, equipment and medium
CN110619284A
Video scene segmentation method based on deep learning
CN111008978A
Video processing method and device, storage medium and electronic equipment
CN111950653A
