Video segmentation method and device and electronic equipment
By determining the priority sequence according to the video segmentation instructions and selecting the appropriate video segmentation method, the video data is diversified and segmented, which solves the problem of single video segmentation method in the prior art and improves the efficiency of video content analysis.
Patent Information
- Application Number
- CN202510293380.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-12
- Publication Date
- 2025-06-20
AI Technical Summary
The existing video segmentation method is single, and the video segmentation method cannot be switched at any time according to user needs, resulting in low video content analysis efficiency.
By obtaining video data and determining the priority sequence according to the video segmentation instructions, selecting appropriate video segmentation methods (such as scene segmentation, time length segmentation, target object segmentation) to diversify video data.
It realizes dynamic switching of video segmentation methods according to user needs, improves the efficiency of video content analysis and reduces manual investment time.
Smart Images

Figure CN120186409A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video analysis technology, and in particular, to a method, apparatus, and electronic device for video segmentation. Background Art
[0002] Currently, video segmentation is applied to various different fields such as video editing, intelligent monitoring, and autonomous driving. With the development of various technologies, the amount of video to be processed is continuously increasing, and the precise identification of video content requires the video to be segmented quickly and accurately during the segmentation process. Therefore, a method is needed to quickly and intelligently achieve precise segmentation of the video.
[0003] In the prior art, longer video content can be segmented into shorter video content through video segmentation. However, the current video segmentation method only segments the video based on a preset duration and video content. This processing method is relatively single, unable to switch the video segmentation method according to the user's needs at any time, and also resulting in a low efficiency of subsequent video content analysis. Summary of the Invention
[0004] This invention application provides a method, apparatus, and electronic device for video segmentation to improve the efficiency of video content analysis.
[0005] In a first aspect, an embodiment of this invention application provides a method for video segmentation, which includes:
[0006] Obtain video data collected by each image acquisition device, where the video data is continuous video within a certain period of time;
[0007] According to the video segmentation instruction, determine a priority sequence in the segmentation instruction, where the priority sequence includes the priority order of each segmentation method;
[0008] According to the priority sequence, determine a first video segmentation method among the set video segmentation methods, where the video segmentation method is at least one method or combination of segmenting by scene, segmenting by time length, and segmenting by target object;
[0009] Segment the video data according to the first video segmentation method to obtain multiple short video data;
[0010] Screen out the target video from the obtained multiple short video data, where the target video is one or more combinations including the target scene, target object, and target time.
[0011] By using this method, the video segmentation method can be switched according to the user's needs at any time, reducing the time for people to invest in video content analysis and improving the efficiency of video content analysis.
[0012] In an alternative embodiment, according to the video segmentation instruction, a priority sequence is determined in the segmentation instruction, including:
[0013] Determine the segmentation method identifier corresponding to each segmentation method;
[0014] According to the video segmentation instruction, determine the segmentation method identifier corresponding to each video segmentation method included in the video segmentation instruction;
[0015] Arrange the determined segmentation method identifiers in the order of priority to determine the priority sequence.
[0016] Through the above priority sequence, video segmentation methods can be combined more accurately, so that video segmentation methods with different priorities can be located more quickly, and thus video data can be segmented more accurately.
[0017] In an alternative embodiment, according to the video segmentation instruction, a first video segmentation method is determined among the set video segmentation methods, including:
[0018] In response to the user starting the video segmentation function, display a video segmentation selection interface;
[0019] Obtain the segmentation parameters selected by the user for the video data in the video segmentation selection interface, and generate a video segmentation instruction including the segmentation parameters, where the segmentation parameters include at least one of a scene, a time length, and a target object;
[0020] According to the video segmentation instruction, determine a first video segmentation method including a scene and / or a time length and / or a target object among the set video segmentation methods.
[0021] The user can select the segmentation method according to their own needs in the video segmentation selection interface, so as to meet the actual needs of different users.
[0022] In an alternative embodiment, if the first video segmentation method includes scene segmentation and time length segmentation, the video data is segmented according to the first video segmentation method to obtain multiple short video data, including:
[0023] Retrieve the pre-configured target scene and time length;
[0024] Based on the pre-configured target scene, identify the corresponding target scene in the video data, and segment the video data according to the scene segmentation to obtain video data segments;
[0025] Segment the video data segments according to the time length to obtain multiple short video data.
[0026] Through the above-mentioned method of splitting by scene and time length, the video data collected by the image acquisition device can be split into short video data with the same duration under different scenes. Therefore, the short video data of a specific scene at a specific time can be quickly screened out, thereby improving the efficiency of video analysis.
[0027] In an alternative embodiment, if the first video splitting method includes scene splitting and target object splitting, the video data is split according to the first video splitting method to obtain multiple short video data, including:
[0028] Retrieve the pre-configured target scene and target object;
[0029] Based on the pre-configured target scene, identify the corresponding target scene in the video data, and split the video data according to the target scene to obtain video data segments;
[0030] Based on the pre-configured target object, identify the corresponding target object in the video data segment, and split the video data segment according to the target object to obtain multiple short video data.
[0031] Through the above-mentioned method of splitting by scene and target object, the video data collected by the image acquisition device can be split at multiple levels, and the obtained short video data is the specific target object in the specific scene, which is beneficial to obtaining the structure of the video data, thereby analyzing the video content more efficiently and accurately and improving the efficiency of analyzing the video content.
[0032] In an alternative embodiment, screening out the target video from the obtained multiple short video data includes:
[0033] Retrieve the configuration conditions, and initially screen the obtained multiple short video data according to the configuration conditions to obtain candidate short videos, where the configuration conditions at least include image templates and image parameters;
[0034] Among the candidate short videos, screen out the target video according to the screening conditions, where the screening conditions include one or more combinations of target scene, target object, and target time.
[0035] In an alternative embodiment, after obtaining multiple short video data, it includes:
[0036] In response to displaying the selection interface of the video analysis method, obtain the selection instruction of the user in the selection interface, where the video analysis method indicates analysis according to the start time of the video and analysis according to the video category;
[0037] According to the selection instruction, retrieve the corresponding video analysis method, and determine the behavior trajectory of the target object according to the video analysis method;
[0038] Convert the behavior trajectory of the target object into a text description and output the text description.
[0039] Through the above selection interface, the user can select the video analysis method according to actual needs, so as to output the text form required by the user, improving the user experience.
[0040] In an alternative embodiment, if the video analysis method is to analyze according to the video start time, determining the behavior trajectory of the target object according to the video analysis method includes:
[0041] In response to the time setting interface of the start time, obtain the start time selected by the user in the time setting interface, where the start time is the start time point for the user to specify the analysis of video data;
[0042] According to the start time, identify and track the target object in the video data, and determine the behavior trajectory of the target object.
[0043] Through the above method of analyzing according to the video start time, the time point for starting content analysis of the video data can be selectively specified without analyzing the entire video, thereby reducing the time required for video analysis and improving the efficiency of video analysis.
[0044] In an alternative embodiment, if the video analysis method is to analyze according to the video category, determining the behavior trajectory of the target object according to the video analysis method includes:
[0045] Classify short video data with the same label into one category and output the category;
[0046] According to the category instruction, retrieve the corresponding short video data, identify and track the target object of the short video data, and determine the behavior trajectory of the target object.
[0047] Through the above method of analyzing according to the video category, the short video data of the corresponding category can be quickly screened out through the category label of the short video data, improving the extraction speed of the short video data, and not requiring the analysis of short video data of other categories, thereby improving the efficiency of video analysis.
[0048] In a second aspect, an embodiment of the present application provides a video segmentation device, the device includes:
[0049] An acquisition module, configured to acquire video data collected by each image acquisition device, where the video data is continuous video within a certain period of time;
[0050] A processing module, configured to determine a priority sequence according to a video segmentation instruction, and determine a first video segmentation method from various set video segmentation methods according to the priority sequence, and segment the video data according to the first video segmentation method to obtain multiple short video data; wherein, the priority sequence includes the priority order of each segmentation method; the video segmentation method is at least one method or a combination of segmenting according to a scene, segmenting according to a time length, and segmenting according to a target object.
[0051] A screening module, configured to screen out a target video from the multiple short video data obtained, where the target video is a combination of one or more of a target scene, a target object, and a target time.
[0052] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0053] A memory, configured to store a computer program;
[0054] A processor, configured to implement the steps of the above video segmentation method when executing the computer program stored on the memory.
[0055] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the above video segmentation method are implemented.
[0056] In a fifth aspect, an embodiment of the present application provides a computer program product, where the computer program product includes: computer program code, and when the computer program code runs on a computer, the computer is caused to execute the above video segmentation method.
[0057] For the various aspects in the above second aspect to fifth aspect and the possible technical effects that each aspect may achieve, please refer to the description of the possible technical effects that can be achieved for the first aspect or various possible solutions in the first aspect above, and details will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] Figure 1 It is a flowchart of a video segmentation method provided by the present application;
[0059] Figure 2 It is a schematic structural diagram of a video segmentation device provided by the present application;
[0060] Figure 3 It is a schematic diagram of an electronic device provided by the present application. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0061] Currently, for longer video content, it can be segmented into shorter video content through video segmentation. However, the current video segmentation method only segments videos based on a preset duration and video content. This processing method is relatively single, unable to switch the video segmentation method according to user needs at any time, and also resulting in low efficiency in subsequent analysis of video content.
[0062] To solve the above technical problems, this application provides a video segmentation method, which includes: obtaining video data collected by each image acquisition device, determining a first video segmentation method among the set video segmentation methods according to a video segmentation instruction, and segmenting the video data according to the first video segmentation method to obtain multiple short video data. Through this method, users can switch the video analysis method according to their needs at any time, realizing diversified segmentation methods for video data, so that different types of short video data can be segmented, and thus the efficiency of subsequent analysis of video content can be improved.
[0063] Next, the technical solutions in the embodiments of this application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are only a part of the embodiments of this application, rather than all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by those of ordinary skill in the art without making creative efforts belong to the scope of protection of this invention.
[0064] Refer to Figure 1 As shown, it is a flowchart of a video segmentation method provided by this application, and this method includes:
[0065] S1. Obtain video data collected by each image acquisition device;
[0066] In the embodiments of this application, the video data is the video data uploaded after video acquisition by multiple image acquisition devices connected to the system, and this video data is continuous video data within a period of time. After these video data are uploaded to the system, the system stores these video data in the corresponding storage locations.
[0067] Of course, in the embodiments of this application, the video data can also be the video data collected by a single image acquisition device, and this application does not limit this.
[0068] S2. Determine a priority sequence in the segmentation instruction according to the video segmentation instruction;
[0069] In this step, to determine the first video segmentation method, it is necessary to first determine the video segmentation instruction, which specifically includes:
[0070] In response to the user starting the video segmentation function, display a video segmentation selection interface.
[0071] Specifically, after the user activates the video segmentation function, a video segmentation selection interface will be displayed on the display device. This video segmentation selection interface includes three video segmentation methods: scene segmentation, time length segmentation, and target object segmentation. The user can choose to combine at least two of these video segmentation methods. For example, the user can select scene segmentation and time length segmentation in this video segmentation selection interface, or they can select time length segmentation and target object segmentation. Of course, the user can also select all three segmentation methods.
[0072] After selecting a video segmentation method in the video segmentation selection interface, the system will obtain a segmentation method identifier corresponding to each video segmentation method. One segmentation method identifier corresponds to one video segmentation method. Of course, after the user selects multiple segmentation methods, multiple segmentation method identifiers will be obtained. At this time, a segmentation method sequence will be obtained, which contains at least one segmentation method identifier, and this segmentation method identifier is sorted by priority according to the order of the video segmentation methods selected by the user. Therefore, the first segmentation method identifier in this priority sequence is the first priority.
[0073] Through the above priority sequence, the video segmentation methods can be combined more accurately, so that different priority video segmentation methods can be located more quickly, and then the video data can be segmented more accurately.
[0074] S3. Determine the first video segmentation method among the set video segmentation methods according to the priority sequence;
[0075] After the user selects the corresponding segmentation method, the system will output a sub-interface of the video segmentation selection interface for the segmentation parameters. Through this sub-interface, the user can select the corresponding segmentation parameters. For example, if the user selects scene segmentation, then the user also needs to select a specific scene in the sub-interface, such as an underground parking lot scene, a scene within a community, etc.; if the user selects time length segmentation, they need to select a specific time length in the sub-interface, such as 10 minutes, 15 minutes, etc.
[0076] After the user completes the selection, obtain the segmentation parameters selected by the user for the video data uploaded by the image acquisition device in the video segmentation selection interface, and generate a video segmentation instruction containing the segmentation parameters. It should be noted that in the embodiments of this application, the segmentation parameters include at least two of the scene, time length, and target object.
[0077] In this step, according to the segmentation parameters selected by the user, generate a video segmentation instruction containing the segmentation parameters. For example, if the user selects the underground parking lot in scene segmentation and 10 minutes in time length segmentation, then the segmentation parameters include the underground parking lot and 10 minutes, and thus generate a video segmentation instruction for segmenting according to the underground parking lot in the scene and 10 minutes in the time length.
[0078] Determine the first video segmentation method among the set video segmentation methods according to the above video segmentation instructions.
[0079] In this step, since there may be multiple segmentation method identifiers in the priority sequence, there are multiple segmentation methods for the first video segmentation method. For example, segmentation by scene and time length, segmentation by time length and target object, etc. Two exemplary methods are provided below:
[0080] 1. If the priority sequence includes a scene segmentation identifier and a duration segmentation identifier, the first video segmentation method is to first segment by scene and then segment by time length.
[0081] 2. If the priority sequence includes a scene segmentation identifier and a target object segmentation identifier, the first video segmentation method is to first segment by scene and then segment by target object.
[0082] S4. Segment the video data according to the first video segmentation method to obtain multiple short video data;
[0083] In the embodiments of the present application, the first video segmentation method can be determined through step S2, and there are multiple situations for the first video segmentation method. Two exemplary methods are provided below:
[0084] 1. If the first video segmentation method includes scene segmentation and time length segmentation, it specifically includes:
[0085] Based on the segmentation parameters in the video segmentation instructions, retrieve the pre-configured target scene and time length.
[0086] In the embodiments of the present application, the target scene is a pre-configured scene, such as an underground parking lot scene, a scene within a community, a supermarket scene, etc. The user can configure different target scenes according to actual needs; the time length is a fixed pre-set time length, such as 10 minutes, 15 minutes, etc.
[0087] Identify the corresponding target scene in the video data based on the pre-configured target scene, and segment the video data according to the target scene to obtain video data segments.
[0088] Specifically, after extracting the pre-configured target scene through the segmentation parameters in the video segmentation instruction, the collected video data is recognized. After identifying the corresponding target scene in the video data, the video data is segmented according to the corresponding target scene. At this time, the video data will be segmented into video data segments under different scenes. Of course, in the embodiments of the present application, after the video data is segmented according to the corresponding target scene, corresponding labels can be added to the segmented video data segments, and the label indicates the scene. For example, label A indicates the underground parking lot scene, label B indicates the scene inside the community, label C indicates the supermarket scene, etc.
[0089] After the video data is segmented into video data segments according to the target scene, the video data segments are segmented based on the pre-set time length to obtain multiple short video data.
[0090] Specifically, after extracting the pre-set time length through the segmentation parameters in the video segmentation instruction, the video data segments are segmented according to the time length, that is, the video data segments are segmented according to a fixed time length, and the video data segments are segmented into multiple short video data with the same duration. For example, segmentation is performed according to 10 minutes.
[0091] Through the above-mentioned methods of segmentation by scene and segmentation by time length, the video data collected by the image acquisition device can be segmented into short video data with the same duration under different scenes. Therefore, short video data of a specific scene at a specific time can be quickly screened out, thereby improving the efficiency of video analysis.
[0092] Second, if the first video segmentation method includes scene segmentation and target object segmentation, it specifically includes:
[0093] Based on the segmentation parameters in the video segmentation instruction, the pre-configured target scene and target object are extracted.
[0094] In the embodiments of the present application, the target scene is a pre-configured scene, such as the underground parking lot scene, the scene inside the community, the supermarket scene, etc. Users can configure different scenes according to actual needs; the target object is also a pre-configured target object, such as people, vehicles, objects, etc. Users can also configure different target objects according to actual needs.
[0095] Based on the pre-configured target scene, the corresponding target scene in the video data is recognized, and the video data is segmented according to the target scene to obtain video data segments.
[0096] Specifically, after retrieving the pre-configured target scene through the segmentation parameters in the video segmentation instruction, the collected video data is recognized. After identifying the corresponding target scene in the video data, the video data is segmented according to the corresponding target scene. At this time, the video data will be segmented into video data segments under different scenes. Of course, in the embodiments of the present application, after the video data is segmented according to the corresponding target scene, corresponding labels need to be added to the segmented video data segments, and the label indicates the scene. For example, label A indicates the underground parking lot scene, label B indicates the scene inside the community, label C indicates the overtime scene, etc.
[0097] After the video data is segmented into video data segments according to the target scene, the video data segments are segmented based on the pre-configured target object to obtain multiple short video data.
[0098] Specifically, after retrieving the pre-configured target object through the segmentation parameters in the video segmentation instruction, the video data segments are segmented according to the target object, that is, the video data segments are recognized. After identifying the corresponding target object in the video data segments, the video data segments are segmented according to the corresponding target object. At this time, the video data segments are segmented into short video data of different target objects. In the embodiments of the present application, after the video data segments are segmented into multiple short video data according to the corresponding target object, corresponding labels need to be added to the multiple short video data, and the label indicates the target object. For example, label 0 indicates a person, label 1 indicates a vehicle, label 2 indicates an object, etc.
[0099] Through the above-mentioned methods of segmentation by scene and target object, the video data collected by the image acquisition device can be segmented at multiple levels, and the obtained short video data is the specific target object in the specific scene. For example, a short video data is a person in the underground parking lot, etc., which is beneficial to obtaining the structure of the video data, so as to analyze the video content more efficiently and accurately, and improve the efficiency of analyzing the video content.
[0100] Through the above-mentioned first video segmentation method, the video data collected by the image acquisition device can be segmented according to different rules, avoiding the over-simplification of the video segmentation method. The more detailed segmentation of the video data enables subsequent analysis of the video data to be carried out more quickly, improving the efficiency of analyzing the video content.
[0101] S5. Screen out the target video from the obtained multiple short video data.
[0102] Specifically, in step S4, the video has been segmented according to the determined video segmentation method. At this time, the original video data will be segmented into different short video data. At this time, the target video can be screened out from the multiple short video data according to the instruction. For example: if the instruction is to screen out the target object, then the short video data with the target object is screened out from the multiple short video data; if the instruction is to screen out the target scene, then the short video data with the target scene is screened out from the multiple short video data. Of course, this is just an example here, and the instruction can include combinations of various situations.
[0103] If the instruction includes screening out the target object in the target scene, then the short video data containing the target object in the target scene is screened out from the multiple short video data. For example, if the instruction is to screen out the video data containing people in the underground parking lot, then the short video data containing people is screened out from all the scenes of the underground parking lot. Of course, this is just an example here, and in actual application scenarios, other screening conditions can be combined to screen out the required short video data. For example, other screening conditions can be added for combination.
[0104] Through this method, the target video can be accurately screened out from the segmented short video data, and then the screened target video is analyzed, so as to reduce the amount of video data analysis, improve the video data analysis efficiency, and reduce the time cost.
[0105] Furthermore, in an optional embodiment, before segmenting the multiple short video data according to the instruction, the configuration conditions can be retrieved first, and the obtained multiple short video data are initially screened according to the configuration conditions to obtain the candidate short videos. The configuration conditions here can include one or a combination of conditions such as image templates, image parameters, image content, image size, video duration, etc. In actual applications, the configuration conditions can be adjusted according to different requirements.
[0106] Through these configuration conditions, the multiple short video data can be initially screened, so as to screen out the short video data that meet the configuration conditions, and then the target video is screened out from the candidate short videos according to the screening conditions. In this way, the target video can be screened out more quickly.
[0107] In an optional embodiment, after obtaining the multiple short video data, the video analysis method is determined based on the selection instruction in the video analysis method selection interface.
[0108] Specifically, after obtaining multiple short video data, in response to the display of a video analysis method selection interface, where the selection interface includes analysis by video start time and analysis by video category. After the user selects the corresponding video analysis method, obtain the selection instruction of the user in the selection interface, and determine the video analysis method through this selection instruction.
[0109] Retrieve the corresponding video analysis method according to the selection instruction, and analyze the behavior trajectory of the target object according to the corresponding video analysis method;
[0110] In this step, there are two video analysis methods. One possible implementation method is to analyze according to the video start time, which specifically includes:
[0111] Determine that the video analysis method is to analyze according to the video start time according to the selection instruction. In response to the time setting interface of the start time, obtain the start time specified by the user in the time setting interface.
[0112] Specifically, for analysis according to the video start time, it is first necessary to determine the start time. In the embodiment of the present application, the start time is the start time point for analyzing video data specified by the user. After the user designates any time point in the video data as the start time, obtain the time point specified by the user in the time setting interface.
[0113] After obtaining the start time specified by the user in the time setting interface, starting from the start time, identify and track the target object in the video data, and determine the behavior trajectory of the target object.
[0114] Specifically, after the intelligent algorithm identifies the target object, it tracks the target object, extracts the image features of the target object in the video data, analyzes the trajectory data of the target object according to the extracted image features, and generates the behavior trajectory of the target object in this scene in combination with the scene category of the video data.
[0115] Through the above method of analyzing according to the video start time, the time point at which the video data starts to perform content analysis can be selectively specified without analyzing the entire video, thereby reducing the time required for video analysis and improving the efficiency of video analysis.
[0116] In an alternative embodiment, the video data can also be analyzed according to the video category, which specifically includes:
[0117] Group the short video data with the same labels into one category and output the category.
[0118] Specifically, first, classify the multiple short video data with the above - added tags that belong to the same tag into one category. For example, if tag A indicates an underground parking lot, then all short video data with tag A are classified into one category, and the classified category is output. After the user selects the category that needs to be analyzed for the video, a category instruction is generated. In the embodiment of the present application, the first video segmentation method includes multiple segmentation methods. Therefore, after the video data is segmented according to the first video segmentation method, a single short video data after segmentation can be tagged with multiple tags, that is, a single short video data can have multiple categories.
[0119] Retrieve the corresponding short video data based on the category instruction, identify and track the target object in the short video data, and determine the behavior trajectory of the target object.
[0120] Specifically, extract the short video data according to the category instruction. After pre - processing the extracted short video data, the intelligent algorithm analyzes the behavior trajectory of the target object in the short video data in the order of the extracted categories.
[0121] Specifically, after the intelligent algorithm determines the category of the short video data, it identifies the target object in the short video data and tracks the target object, and extracts the image features of the target object in the short video data. According to the extracted image features, after analyzing the trajectory data of the target object, the behavior trajectory of the target object is generated.
[0122] Through the above - mentioned method of analyzing according to the video category, the short video data of the corresponding category can be quickly screened out through the category tags of the short video data, improving the extraction speed of the short video data, and there is no need to analyze the short video data of other categories, thereby improving the efficiency of video analysis.
[0123] In an alternative embodiment, after the behavior trajectory of the target object is determined by the intelligent algorithm, the behavior trajectory of the target object is converted into a text description and output.
[0124] Specifically, after generating the behavior trajectory of the target object, the generated behavior trajectory is converted into a text description and output on the user interaction interface.
[0125] In the user interaction interface, the user selects the video data that needs to be analyzed for the video by sliding and clicking, and then selects the video segmentation method on the first video segmentation method selection interface. After the video data is segmented into multiple short video data by the first video segmentation method, the user selects any one of the methods of analyzing according to the start time and analyzing according to the video category on the video analysis method selection interface. Finally, the system converts the analyzed behavior trajectory into a text description and outputs it.
[0126] Specifically, if the user selects the analysis method according to the start time, the text description of the video data is output in the time sequence of the video data; if the user selects the analysis method according to the video category, the text description of the video data is output according to the categories of the short video data. For example, if the categories of the short video data are people and vehicles, the text description first outputs the behavior trajectories of people and then the behavior trajectories of vehicles.
[0127] Through the above user interaction interface, the user only needs to perform simple sliding and clicking operations to replace manual video analysis, and the behavior trajectories of the target objects in the video data can be classified and displayed in the form of text descriptions. The user can clearly and quickly obtain the behavior trajectories of the target objects in the video data, thereby improving the user experience.
[0128] Based on the same inventive concept, an embodiment of the present application further provides a video segmentation device. Refer to Figure 2 The following is a schematic structural diagram of a video segmentation device provided by an embodiment of the present application. The device includes:
[0129] An acquisition module 201, configured to acquire video data collected by each image acquisition device, where the video data is continuous video within a certain period of time;
[0130] A processing module 202, configured to determine a priority sequence in the segmentation instruction according to the video segmentation instruction, and determine a first video segmentation method from the set video segmentation methods according to the priority sequence, and segment the video data according to the first video segmentation method to obtain multiple short video data; where the priority sequence includes the priority order of each segmentation method; the video segmentation method is at least one method or combination of segmentation by scene, segmentation by time length, and segmentation by target object;
[0131] A screening module 203, configured to screen out a target video from the multiple short video data, where the target video is a combination of one or more of a target scene, a target object, and a target time.
[0132] Based on the same inventive concept, an embodiment of the present application also provides an electronic device, which can implement the functions of the foregoing video segmentation device. Refer to Figure 3 , the electronic device includes:
[0133] At least one processor 301, and a memory 302 connected to at least one processor 301. In the embodiment of the present application, the specific connection medium between the processor 301 and the memory 302 is not limited. Figure 3 In Figure 3The medium is represented by a thick line. The connection manners between other components are only for illustrative purposes and are not restrictive. The bus 300 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation, Figure 3 it is only represented by a thick line in the figure, but it does not mean that there is only one bus or one type of bus. Alternatively, the processor 301 can also be referred to as a controller, and there is no limitation on the name.
[0134] In the embodiment of the present application, the memory 302 stores instructions executable by at least one processor 301. By executing the instructions stored in the memory 302, at least one processor 301 can execute the video segmentation method described above. The processor 301 can implement Figure 2 the functions of each module in the device shown.
[0135] Among them, the processor 301 is the control center of the device. It can connect various parts of the entire control device through various interfaces and lines. By running or executing the instructions stored in the memory 302 and calling the data stored in the memory 302, various functions of the device and process data, so as to monitor the device as a whole.
[0136] In a possible design, the processor 301 may include one or more processing units. The processor 301 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 301. In some embodiments, the processor 301 and the memory 302 can be implemented on the same chip. In some embodiments, they can also be separately implemented on independent chips.
[0137] The processor 301 can be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. The steps of the video segmentation method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0138] The memory 302, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 302 may include at least one type of storage medium, for example, it may include flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disc, and so on. The memory 302 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 302 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.
[0139] By designing and programming the processor 301, the code corresponding to the video segmentation method introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute Figure 1 the steps of the video segmentation method of the embodiment shown. How to design and program the processor 301 is a well-known technology to those skilled in the art and will not be elaborated here.
[0140] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, which, when run on a computer, cause the computer to execute the video segmentation method described above.
[0141] In some possible implementation manners, various aspects of the video segmentation method provided in the present application can also be implemented in the form of a program product, which includes program code that, when the program product runs on a device, is used to cause the control device to execute the steps of the video segmentation method according to various exemplary embodiments of the present application described above in this specification.
[0142] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0143] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0144] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0145] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0146] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these changes and modifications.
Claims
1. A video segmentation method, characterized in that: The method comprises: Acquire video data collected by each image acquisition device, wherein the video data is continuous video within a certain period of time; According to the video segmentation instruction, a priority sequence is determined in the segmentation instruction, wherein the priority sequence includes the priority order of each segmentation method; According to the priority sequence, a first video segmentation method is determined from among the set video segmentation methods, wherein the video segmentation method is at least one method or a combination of segmentation according to scene, segmentation according to time length, and segmentation according to target object; Segment the video data according to the first video segmentation method to obtain multiple short video data; A target video is screened out from the obtained multiple short video data, wherein the target video is one or more combinations including a target scene, a target object, and a target time.
2. The method according to claim 1, characterized in that According to the video segmentation instruction, a priority sequence is determined in the segmentation instruction, including: Determine the segmentation method identifier corresponding to each segmentation method; According to the video segmentation instruction, determining segmentation mode identifiers corresponding to respective video segmentation modes contained in the video segmentation instruction; The determined segmentation method identifiers are arranged in order of priority to determine the priority sequence.
3. The method according to claim 1, characterized in that The step of determining a first video segmentation method from among various set video segmentation methods according to the video segmentation instruction includes: In response to the user starting the video splitting function, displaying a video splitting selection interface; Acquire the segmentation parameters selected by the user for the video data in the video segmentation selection interface, and generate a video segmentation instruction including the segmentation parameters, wherein the segmentation parameters include at least one of a scene, a time length, and a target object; According to the video segmentation instruction, a first video segmentation method including the scene and / or time length and / or target object is determined from among the set video segmentation methods.
4. The method according to claim 1, characterized in that If the first video segmentation method includes scene segmentation and time length segmentation, the video data is segmented according to the first video segmentation method to obtain multiple short video data, including: Retrieve the pre-configured target scene and time length; Based on the pre-configured target scene, the target scene corresponding to the video data is identified, and the video data is segmented according to the scene segmentation to obtain video data segments; The video data segment is divided according to the time length to obtain multiple short video data.
5. The method according to claim 1, characterized in that If the first video segmentation method includes scene segmentation and target object segmentation, the video data is segmented according to the first video segmentation method to obtain multiple short video data, including: Retrieve pre-configured target scenes and target objects; Identifying the target scene corresponding to the video data based on the pre-configured target scene, and segmenting the video data according to the target scene to obtain video data segments; The target object corresponding to the video data segment is identified based on the pre-configured target object, and the video data segment is segmented according to the target object to obtain a plurality of short video data.
6. The method according to claim 1, characterized in that Filter out the target video from the multiple short video data obtained, including: Retrieving configuration conditions, and performing a primary screening on the obtained multiple short video data according to the configuration conditions to obtain short videos to be selected, wherein the configuration conditions at least include an image template and an image parameter; Among the short videos to be selected, target videos are screened out according to screening conditions, wherein the screening conditions include one or more combinations of target scenes, target objects, and target time.
7. The method according to claim 1, characterized in that After obtaining the plurality of short video data, the method further includes: In response to a selection interface showing a video analysis method, obtaining a selection instruction of a user in the selection interface, wherein the video analysis method indicates analysis according to a video start time or analysis according to a video category; Retrieving the corresponding video analysis method according to the selection instruction, and determining the behavior trajectory of the target object according to the video analysis method; The behavior trajectory of the target object is converted into a text description, and the text description is output.
8. The method according to claim 7, characterized in that If the video analysis method is to analyze according to the video start time, determining the behavior trajectory of the target object according to the video analysis method includes: In response to a time setting interface for a start time, obtaining a start time selected by a user in the time setting interface, wherein the start time is a start time point for analyzing the video data specified by the user; According to the start time, the target object in the video data is identified and tracked, and the behavior trajectory of the target object is determined.
9. The method according to claim 7, characterized in that If the video analysis method is analysis according to video category, determining the behavior trajectory of the target object according to the video analysis method includes: Classify the multiple short video data with the same label into one category and output the category; The corresponding short video data is retrieved according to the category instruction, the target object of the short video data is identified and tracked, and the behavior trajectory of the target object is determined.
10. A video segmentation device, characterized in that: The device comprises: An acquisition module is used to acquire video data acquired by each image acquisition device, wherein the video data is a continuous video within a certain period of time; A processing module, configured to determine a priority sequence in the video segmentation instruction according to the video segmentation instruction, determine a first video segmentation method from various set video segmentation methods according to the priority sequence, and segment the video data according to the first video segmentation method to obtain a plurality of short video data; wherein the priority sequence includes the priority order of various segmentation methods; the video segmentation method is at least one method or a combination of segmentation according to scene, segmentation according to time length, and segmentation according to target object; The screening module is used to screen out a target video from a plurality of short video data, wherein the target video is one or more combinations of a target scene, a target object, and a target time.
11. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to implement the method steps of any one of claims 1 to 9 when executing a computer program stored in the memory.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 9 are implemented.
13. A computer program product, characterized in that The computer program product includes: computer program code, when the computer program code is run on a computer, the computer is enabled to execute the above-mentioned video segmentation method.