Video splitting method and device, electronic equipment and storage medium
By clustering and topic extraction of video barrage data and combining video time information for video stripping processing, the problems of low video stripping efficiency and high resource consumption in the existing technology are solved, and a more efficient and accurate video stripping effect is achieved.
Patent Information
- Application Number
- CN202411485297.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-02-25
AI Technical Summary
The existing video stripping technology is inefficient and has high resource consumption, mainly because the video content needs to be analyzed in detail to obtain labels.
By obtaining multiple barrage data of the video, clustering is performed based on similar characteristics between barrage data, the topic corresponding to the cluster cluster is extracted, and the target plot and classification label are determined based on the start and end time of the topic, thereby intercepting the corresponding video clip.
It reduces the calculation amount of video stripping processing, improves video stripping efficiency, reduces resource consumption, and makes the video classification after stripping more accurate, which can better reflect the user's interests.
Smart Images

Figure CN119520931A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of video processing technology, and in particular to a video stripping method, device, electronic equipment and storage medium. Background Art
[0002] Video stripping is to split a complete video into multiple video clips according to specific needs. In the prior art, the video is generally stripped by analyzing the content of the video through video understanding technology. This method mainly gives labels within the visual category to the stripped video, such as primary labels such as character actions (hug, handshake...), video atmosphere (funny, intense...), or simple descriptions of the video content (such as: a person is about to attack another person) and other labels. This kind of label within the visual category requires the identification of the video content, and the amount of data processed is relatively large, consuming more resources, resulting in low efficiency of video stripping. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a video stripping method, device, electronic device and storage medium to improve the efficiency of video stripping and reduce resource consumption. The specific technical solution is as follows:
[0004] In a first aspect of the present invention, a video stripping method is provided, comprising:
[0005] Get multiple bullet comment data of the video to be processed;
[0006] Clustering the plurality of barrage data according to similar features between each two barrage data to obtain a plurality of barrage clusters;
[0007] For each of the bullet chat clusters, extract the topic corresponding to the bullet chat cluster, and determine the start and end time corresponding to the topic;
[0008] Determine the target plot corresponding to the topic according to the start and end time, and determine the topic classification label corresponding to the topic according to the topic and the target plot, wherein the topic classification label includes a target primary label and a target secondary label under the target primary label;
[0009] According to the start and end time and the video information of the video to be processed, a video segment corresponding to the topic is intercepted from the video to be processed, and the topic classification label is used as the classification label corresponding to the video segment.
[0010] In a second aspect of the present invention, a video stripping device is provided, comprising:
[0011] A bullet comment acquisition module is used to obtain multiple bullet comment data of the video to be processed;
[0012] A barrage clustering module, used for clustering the plurality of barrage data according to similar features between each two barrage data, to obtain a plurality of barrage clusters;
[0013] A topic determination module, for extracting the topic corresponding to each of the bullet chat clusters, and determining the start and end time corresponding to the topic;
[0014] A topic classification module, used to determine the target plot corresponding to the topic according to the start and end time, and determine the topic classification label corresponding to the topic according to the topic and the target plot, wherein the topic classification label includes a target primary label and a target secondary label under the target primary label;
[0015] The video stripping module is used to extract the video segment corresponding to the topic from the video to be processed according to the start and end time and the video information of the video to be processed, and use the topic classification label as the classification label corresponding to the video segment.
[0016] In another aspect of the present invention, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and when the computer-readable storage medium is run on a computer, the computer executes any of the above-mentioned video stripping methods.
[0017] In another aspect of the present invention, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the above-mentioned video stripping methods.
[0018] The video stripping method, device, electronic device and storage medium provided by the embodiments of the present invention cluster multiple barrage data according to the similar features between each two barrage data to obtain multiple barrage clustering clusters, extract the topic corresponding to the barrage clustering cluster for each barrage clustering cluster, and determine the start and end times corresponding to the topic, determine the target plot corresponding to the topic according to the start and end times, and determine the topic classification label corresponding to the topic according to the topic and the target plot, and extract the video clip corresponding to the topic from the video to be processed according to the start and end times and the video information of the video to be processed, and use the topic classification label as the classification label corresponding to the video clip. Since the topic for video stripping can be determined by analyzing the barrage data, and then the video to be processed is stripped based on the start and end times of the topic to obtain the stripped video, the stripping process can be completed without analyzing the video content, thereby reducing the computational complexity of the video stripping process, improving the efficiency of video stripping, and reducing the resource consumption of video stripping. Moreover, the classification label of the video after stripping includes two-level labels, so that the classification of the video after stripping is more accurate and can better reflect the user's interest points in the video to be processed. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0020] Figure 1 is a flow chart of a video stripping method provided by an embodiment of the present invention;
[0021] Figure 2a It is a schematic diagram of determining the calculation amount of text similarity features of bullet comment data according to the full amount calculation in an embodiment of the present invention;
[0022] Figure 2b It is a schematic diagram of determining the calculation amount of text similarity features of bullet comment data according to partition grouping in an embodiment of the present invention;
[0023] Figure 2c is a schematic diagram of determining the calculation amount of text similarity features of bullet screen data according to continuous grouping in an embodiment of the present invention;
[0024] Figure 3 is a flow chart of clustering multiple bullet chat data according to similar features between every two bullet chat data in an embodiment of the present invention;
[0025] Figure 4 Schematic diagram of the video stripping process in an embodiment of the present invention;
[0026] Figure 5 It is a structural schematic diagram of a video stripping device provided by an embodiment of the present invention;
[0027] Figure 6 It is a structural schematic diagram of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0029] Figure 1 FIG. 1 is a flow chart of a video stripping method provided by an embodiment of the present invention. The video stripping method can be applied to electronic devices such as computers and mobile phones. Figure 1 As shown, the video stripping method comprises the following steps:
[0030] Step 110, obtaining multiple bullet comment data of the video to be processed.
[0031] The video to be processed is a video to be stripped, which is generally a long video, for example, an episode of a TV series, or a movie, etc. Barrage refers to commentary subtitles that pop up when watching a video on the Internet.
[0032] When the embodiment of the present invention performs strip-splitting processing on the video to be processed, the topic of strip-splitting is determined based on all the bullet comment data of the video to be processed, and then the video strip-splitting processing corresponding to the topic is performed.
[0033] Step 120: clustering the plurality of barrage data according to similar features between each two barrage data to obtain a plurality of barrage clusters.
[0034] Determine the similarity feature between each two barrage data. The similarity feature is a feature that can indicate that there is a certain correlation between the barrage data, so as to find the correlation between different barrage data and then extract the common topic. For example, the similarity feature can be a text similarity feature.
[0035] According to the similar features between every two barrage data, all barrage data are clustered to cluster barrage data with similar features into one category to obtain a barrage clustering cluster, and barrage data with different features are divided into different categories to obtain multiple barrage clustering clusters.
[0036] Step 130: for each of the bullet chat clusters, extract the topic corresponding to the bullet chat cluster, and determine the start and end time corresponding to the topic.
[0037] The topic extraction process is performed for each barrage cluster. For the currently processed barrage cluster, the barrage data in the barrage cluster can be summarized by text processing to summarize the topics targeted by all the barrage data in the barrage cluster, and obtain the topics corresponding to the barrage cluster. When summarizing the topics corresponding to the barrage cluster, a general text processing model (such as a summary production model) can be used for summarization, or a large model can be used for summarization.
[0038] After extracting the topic corresponding to the bullet screen cluster, the start and end time of the topic corresponding to the bullet screen cluster can be determined based on the time points corresponding to all the bullet screen data in the bullet screen cluster (the time points are the time points corresponding to the appearance of the bullet screen data in the video to be processed). For example, the time point corresponding to the earliest bullet screen data in the bullet screen cluster can be used as the start time of the topic, and the time point corresponding to the latest bullet screen data can be used as the end time of the topic; or, the median time can be selected from the time points of all the bullet screen data as the start and end time of the topic.
[0039] Step 140, determining the target plot corresponding to the topic based on the start and end time, and determining the topic classification label corresponding to the topic based on the topic and the target plot, wherein the topic classification label includes a target first-level label and a target second-level label under the target first-level label.
[0040] Among them, the target first-level tag is a first-level tag that best matches the topic and the target plot among all the first-level tags. The first-level tag is a closed-set tag, which means that all the first-level tags are predetermined tags. The target second-level tag is a second-level tag that matches the topic and the target plot, determined based on the examples of all the second-level tags under the target first-level tag. The target second-level tag is an open tag, which can be a second-level tag in the examples of all the second-level tags under the target first-level tag, or other second-level tags determined based on the examples of all the second-level tags under the target first-level tag. An open tag means that the second-level tag can be a tag in the given second-level tag set, or other second-level tags determined using the tags in the second-level tag set as examples.
[0041] According to the start and end time of the topic, the target plot of the video to be processed within the start and end time is determined. The target plot can be determined by analyzing the video content of the video to be processed within the start and end time, or the plot data of the video to be processed within the start and end time can be directly obtained from an external site or pre-generated by an algorithm, and then the target plot is determined based on the plot data.
[0042] Analyze the topic and target plot to determine the target first-level label to which the topic belongs and the target second-level label under the target first-level label. For example, the topic classification label can be "Exciting Plot-Poisoning and Assassination", where "Exciting Plot" is the target first-level label and "Poisoning and Assassination" is the target second-level label.
[0043] Step 150, based on the start and end time and the video information of the video to be processed, a video segment corresponding to the topic is captured from the video to be processed, and the topic classification label is used as the classification label corresponding to the video segment.
[0044] The video information is information that represents the integrity of the video, such as continuous shot information.
[0045] Determine the videos to be processed within the start and end time, and based on the video information of the video to be processed, perform integrity expansion on the videos within the start and end time to obtain a video clip corresponding to the topic, and extract the video clip from the video to be processed, thereby realizing the video stripping process based on the topic, and using the topic classification label as the classification label corresponding to the video clip, so as to facilitate the subsequent publicity and promotion of the video. The video clips (short videos) obtained after stripping are associated with the topic, and can be provided to various business parties for generation, search, etc. For example, if a business party wants to generate relevant videos of "character highlights", it can first find the topic corresponding to "character highlights" based on the needs of the business party, initiate the generation task after manual inspection, and generate short videos with relevant labels.
[0046] The video stripping method provided by the embodiment of the present invention clusters multiple barrage data according to the similar features between every two barrage data to obtain multiple barrage clustering clusters, extracts the topic corresponding to the barrage clustering cluster for each barrage clustering cluster, and determines the start and end time corresponding to the topic, determines the target plot corresponding to the topic according to the start and end time, and determines the topic classification label corresponding to the topic according to the topic and the target plot, and extracts the video clip corresponding to the topic from the video to be processed according to the start and end time and the video information of the video to be processed, and uses the topic classification label as the classification label corresponding to the video clip. Since the topic for video stripping can be determined by analyzing the barrage data, and then the video to be processed is stripped based on the start and end time of the topic to obtain the stripped video, the stripping process can be completed without analyzing the video content, thereby reducing the computational amount of video stripping, improving the efficiency of video stripping, and reducing the resource consumption of video stripping. Moreover, the classification label of the video after stripping includes two-level labels, so that the classification of the video after stripping is more accurate and can better reflect the user's interest points in the video to be processed.
[0047] Based on the above technical solution, the similarity feature includes at least one of a text similarity feature, a time interval similarity feature and a name similarity feature;
[0048] The method further comprises at least one of the following:
[0049] Extracting text features of each barrage data, determining the similarity between the text features of every two barrage data, and if the similarity is greater than or equal to a similarity threshold, determining that the two barrage data corresponding to the similarity have text similarity features;
[0050] For each two pieces of the plurality of pieces of barrage data, if the time interval between the two pieces of barrage data is less than or equal to a preset time interval, determining that the two pieces of barrage data have a time interval similarity feature;
[0051] When two barrage data have similar time interval features, name recognition is performed on each of the two barrage data respectively. If there are no inconsistent names in the two barrage data, it is determined that the two barrage data have similar name features.
[0052] Among them, the text similarity feature refers to the text similarity between two barrage data being greater than or equal to the similarity threshold. The time interval similarity feature refers to the time interval between two barrage data being less than or equal to the preset time interval. The name similarity feature refers to the fact that the names targeted by the two barrage data are not contradictory to each other, that is, there are no inconsistent names in the two barrage data. If the names in the two barrage data are not exactly the same, but are for the same character, it is considered that the names in the two barrage data are consistent. For example, if the names in the two barrage data are any two of the actor name, actor nickname, character name and character nickname, it is determined that the names in the two barrage data are consistent.
[0053] Use a text feature extraction model to extract the text features of each barrage data. The text feature extraction model can be, for example, a BERT model, or a bge-large-zh model of the Sentence-BERT architecture. When using a text feature extraction model to extract the text features of the barrage data, the barrage data can be first segmented, and then the segmented words are encoded based on the position and number of occurrences of each segmented word in the barrage data to obtain the text features of the barrage data. Calculate the similarity between the text features of each two barrage data, which can be a cosine similarity, and determine whether the similarity is greater than or equal to a similarity threshold. If the similarity is greater than or equal to the similarity threshold, determine that the two barrage data corresponding to the similarity have text similarity features. If the similarity is less than the similarity threshold, determine that the two barrage data corresponding to the similarity do not have text similarity features.
[0054] For every two barrage data of all barrage data of the video to be processed, based on the time point corresponding to each barrage data of the two barrage data, determine the time interval between the two barrage data. If the time interval is less than or equal to the preset time interval, determine that the two barrage data have similar time interval characteristics. If the time interval is greater than the preset time interval, determine that the two barrage data do not have similar time interval characteristics. Among them, the preset time interval is a configurable parameter, which can be configured according to needs, and can generally be several minutes. For example, one barrage data appears in the 2nd minute of the video to be processed, and another barrage data appears in the 4th minute of the video to be processed. The time interval between the two barrage data is 120s. If the preset time interval is 4 minutes, the two barrage data have similar time interval characteristics.
[0055] When the time interval between two barrage data is less than the preset time interval, name recognition is performed on the two barrage data respectively, that is, word segmentation processing is performed on each barrage data, and each word is identified as a name. If the names in the two barrage data are the same, or one of the two barrage data has a name and the other does not, or there are names for the same character but not completely the same in the two barrage data, it is determined that the names in the two barrage data are not contradictory, that is, it is determined that there are no inconsistent names in the two barrage data. At this time, it is determined that the two barrage data have similar name features. If the names in the two barrage data are different, it is determined that the names in the two barrage data are contradictory. At this time, it is determined that the two barrage data do not have similar name features. For example, one barrage data is "Zhang San is so handsome", and another barrage data is "so handsome", these two barrage data have similar name characteristics; one barrage data is "Zhang San is so handsome", and another barrage data is "Zhang San has good acting skills", these two barrage data are directed at the same name, and have similar name characteristics; one barrage data is "Zhang San is so handsome", and another barrage data is "Li Si is so handsome", the names in these two barrage data are not directed at the same character, the names they are directed at are inconsistent, and do not have similar name characteristics.
[0056] It should be noted that when the similarity features include text similarity features, time interval similarity features and name similarity features at the same time, the determined topic is more accurate. At this time, we can first determine whether there is a time interval similarity feature between the two barrage data. When there is a time interval similarity feature, determine whether there is a name similarity feature between the two barrage data. When there is a time interval similarity feature and a name similarity feature between the two barrage data, then determine whether there is a text similarity feature between the two barrage data. This can reduce the amount of data processing and improve processing efficiency.
[0057] On the basis of the above technical solution, the method of determining the similarity between the text features of every two barrage data includes: dividing the multiple barrage data into multiple groups according to the time point and grouping parameters corresponding to each barrage data, and the grouping parameters represent the amount of barrage data included in each group; for each group, determining the similarity between the text features of every two barrage data in the group.
[0058] Assuming that the amount of barrage data in the video to be processed is n, then n barrage data need to generate n×n text similarity features, which requires n×n storage space and computing power, such as Figure 2a As shown, when n is relatively large, more resources will be consumed. The embodiment of the present invention pays attention to the fact that it is useless for bullet-screen data with different time to have text similarity features, so the bullet-screen data can be sorted by time point and then grouped to reduce the amount of calculation.
[0059] After sorting the bullet chat data according to the time point corresponding to each bullet chat data, all the bullet chat data can be grouped in a partitioned grouping or a continuous grouping method. Figure 2b As shown, according to the time sequence of each bullet chat data, the bullet chat data of each grouping parameter is taken as a group, that is, the bullet chat data of the grouping parameter starting from the beginning is taken as a group, and then the bullet chat data of the grouping parameter is obtained from the next bullet chat data after the group as the next group, and so on, until all the bullet chat data are grouped and multiple groups are obtained. The method of continuous grouping is as follows Figure 2c As shown, according to the time sequence of each bullet chat data, the bullet chat data of the grouping parameter starting from the beginning is first regarded as a group, and then after moving according to the moving step length (a preset number of bullet chat data or a preset proportion of bullet chat data, the preset number is less than the grouping parameter, and the preset proportion is the proportion in the grouping parameter), the bullet chat data of the grouping parameter starting from the moved position is regarded as another group, and is moved and grouped again according to the moving step length until all the bullet chat data are grouped to obtain multiple groups. Among them, Figure 2a , Figure 2b , Figure 2c The medium gray part represents the amount of calculation required to calculate the similarity between text features, and the horizontal and vertical axes represent the number of bullet comment data respectively.
[0060] After grouping multiple bullet comment data, for each group, the similarity between the text features of every two bullet comment data in the group is determined respectively. There is no need to determine the similarity between the bullet comment data in one group and the bullet comment data in another group, which can greatly reduce the amount of calculation.
[0061] Regarding the amount of calculation, if the calculation is performed according to the partition group, the amount of calculation and storage space can be reduced from n×n to Where k is the grouping parameter, which is much smaller than n. Considering the temporal continuity of topics, the continuous grouping calculation method with grouping parameter k can be used in practice. Figure 2c , when the amount of barrage data is large, more than 90% of the resources can be optimized.
[0062] For example, assuming 12 bullet comments, the full calculation requires 12×12=144 storage and computing power. With the partition grouping method, when the grouping parameter k=4, the computing power becomes 4×12=48, which is a 67% reduction. When the bullet comment data volume n=100,000, the grouping parameter k=1,000, then the full parameter computing power C1=10e5*10e5=10e10, and the partition grouping computing power C2=10e5*10e3=10e8, which can save 99% of computing power and storage. The number of about 1k can be similar and basically does not affect the clustering effect, which significantly improves the computing power and storage optimization.
[0063] Continuous group calculation is also performed by windowing. Since direct group calculation (interval grouping) will produce breakpoints and affect the temporal continuity of the topic, k groups can be used to perform windowing to obtain continuous group calculation, which can obtain continuous topics. When the amount of barrage data is large, the resource saving is similar to that of the interval group calculation, both above 90%.
[0064] Figure 3 is a flow chart of clustering multiple bullet-screen data according to similar features between each two bullet-screen data (i.e., the above-mentioned step 120) in an embodiment of the present invention, as shown in FIG. Figure 3 As shown, the above step 120 includes the following steps:
[0065] Step 121, taking each of the barrage data as a barrage node, and establishing an edge connection between two barrage nodes with similar features based on similar features between each two barrage data, to obtain a barrage similarity network.
[0066] Each barrage data is taken as a barrage node. When two barrage data have similar features, an edge connection is established between the barrage nodes corresponding to the two barrage data, and a barrage similarity network is obtained with barrage data as barrage nodes and similar features as edge connections. When the similar features include text similarity features, time interval similarity features and name similarity features at the same time, when two barrage data have text similarity features, time interval similarity features and name similarity features at the same time, an edge connection is established between the barrage nodes corresponding to the two barrage data.
[0067] Step 122, clustering the bullet-screen nodes in the bullet-screen similarity network to obtain the multiple bullet-screen clusters.
[0068] The preset clustering algorithm is a preset clustering algorithm, which can be pre-configured according to requirements. For example, the preset clustering algorithm can be a community discovery algorithm, such as Infomap in the community discovery algorithm.
[0069] The preset clustering algorithm is used to cluster the bullet-screen nodes in the bullet-screen similarity network. The clustering steps may include: (1) initialization, treating each bullet-screen node as an independent group; (2) randomly sampling a sequence of the bullet-screen nodes in the bullet-screen similarity network, and sequentially trying to assign each bullet-screen node to the community where the neighboring node is located, and assigning the community with the largest average bit drop to the bullet-screen node. If there is no drop, the community of the bullet-screen node remains unchanged; (3) repeating step 2 until convergence. After clustering the bullet-screen nodes in the bullet-screen similarity network using the preset clustering algorithm, all the bullet-screen nodes can be clustered into multiple bullet-screen clusters, and each bullet-screen cluster includes multiple bullet-screen nodes.
[0070] By establishing an edge connection between two barrage nodes with similar features, a barrage similarity network is obtained, and then the barrage similarity network is clustered using a preset clustering algorithm. The obtained multiple barrage clustering clusters are clustered by combining similar features between different barrage data. Therefore, the barrage data with similar features can be clustered into a barrage clustering cluster, which is convenient for extracting common topics for the barrage clustering clusters.
[0071] On the basis of the above technical scheme, for each of the barrage clustering clusters, the topic corresponding to the barrage clustering cluster is extracted, including: for each of the barrage clustering clusters, the central barrage of the barrage clustering cluster is determined according to the text features of each barrage data in the barrage clustering cluster; the central barrage and each barrage data in the barrage clustering cluster are input into a large model, and the topic of the central barrage and each barrage data is extracted based on the topic extraction prompt information by the large model to obtain the topic corresponding to the barrage clustering cluster.
[0072] For each barrage cluster, the corresponding topic is extracted respectively. For the currently processed barrage cluster, the text features of each barrage data are extracted through the text feature extraction model. Based on the text features of each barrage data in the barrage cluster, the center of gravity of the barrage cluster is determined, and then the barrage data closest to the center of gravity is determined as the central barrage of the barrage cluster. The central barrage and each barrage data in the barrage cluster as well as the topic extraction prompt information are input into the big model, and the big model performs topic extraction processing on the central barrage and each barrage data based on the topic extraction prompt information to obtain the topic corresponding to the barrage cluster. Among them, the big model can be the closed-source ChatGPT, or the open-source ChatGLM, Baichuan, LLaMA, etc.
[0073] By determining the central barrage of the barrage cluster, and then using a large model to summarize the topics of the central barrage and all the barrage data in the barrage cluster, the obtained topics can accurately reflect the information expressed by all the barrage data in the barrage cluster.
[0074] In one embodiment of the present application, determining the central barrage of the barrage clustering cluster based on the text features of each barrage data in the barrage clustering cluster includes: determining the average features of the text features of each barrage data in the barrage clustering cluster; respectively determining the distance between each barrage data in the barrage clustering cluster and the average features; and determining the barrage data with the smallest distance as the central barrage of the barrage clustering cluster.
[0075] The text features of all barrage data in the barrage cluster are averaged to obtain the average feature, which is the center of gravity of the barrage cluster. The distance between each barrage data in the barrage cluster and the average feature is calculated, and the distances corresponding to each barrage data are compared to determine the barrage data with the smallest distance, and the barrage data is used as the central barrage of the barrage cluster.
[0076] On the basis of the above technical solution, the determination of the start and end time corresponding to the topic includes: determining the earliest time point and the latest time point of the barrage in the barrage cluster according to the time point of each barrage data in the barrage cluster; using the time point corresponding to the first preset proportion position between the earliest time point of the barrage and the latest time point of the barrage as the start time of the topic, and using the time point corresponding to the second preset proportion position between the earliest time of the barrage and the latest time of the barrage as the end time of the topic, the first preset proportion being less than the second preset proportion.
[0077] The earliest time point among the time points of each barrage data in the barrage cluster is counted to obtain the earliest time point of the barrage in the barrage cluster, and the latest time point among the time points of each barrage data in the barrage cluster is counted to obtain the latest time point of the barrage in the barrage cluster, and the time point corresponding to the first preset ratio position between the earliest time point of the barrage and the latest time point of the barrage is determined, and the time point is used as the start time of the topic, and the time point corresponding to the second preset ratio position between the earliest time point of the barrage and the latest time point of the barrage is determined, and the time point is used as the end time of the topic. The first preset ratio and the second preset ratio can be adjusted according to the time in the actual barrage data. For example, the first preset ratio can be 1 / 4, and the second preset ratio can be 3 / 4.
[0078] For example, the topic contains bullet comments at about 10 minutes into the video to be processed, and the time points of each bullet comment are [bullet comment 1 (10:01), bullet comment 2 (10:02), ..., bullet comment 40 (10:40)]. If the time at the 1 / 4 and 3 / 4 positions is taken as the start and end time, the start time of the topic is 10:10 and the end time is 10:30.
[0079] By using the time point corresponding to the first preset proportional position between the earliest time point and the latest time point of the barrage as the start time of the topic, and using the time point corresponding to the second preset proportional position between the earliest time point and the latest time point of the barrage as the end time of the topic, the problem of barrage data appearing early or late relative to the video content can be avoided, the matching of barrage data and video content can be improved, and the accuracy of video strip splitting can be improved.
[0080] On the basis of the above technical solution, the target plot corresponding to the topic is determined according to the start and end time, including: extending the first preset time length before and after the start and end time respectively to obtain a first extended time period; obtaining multiple candidate plots of the video to be processed within the first extended time period; respectively determining the text matching degree between the topic and each of the candidate plots; and selecting a preset number of candidate plots from the multiple candidate plots in order of the text matching degree from large to small as the target plot.
[0081] The first preset duration is a preset extended duration parameter for obtaining candidate plots, which can be set specifically according to requirements.
[0082] The start and end time include the start time and the end time, and the start and end time are respectively extended by the first preset time length, that is, the first preset time length is extended before the start time, and the first preset time length is extended after the end time, to obtain the first extended time period. For example, the start and end time corresponding to the topic "Ning Yuanzhou, you wait" is: 34:00-37:00, the first preset time length is 3 minutes, then the first extended time period is 31:00-41:00.
[0083] The candidate plots can be minute-level and can be captured by external sites or generated by algorithms. The video to be processed can correspond to multiple candidate plots within the first extended time period. The multiple candidate plots can be represented as follows:
[0084] Plot 1 31:10-35:30 Yu Shisan comforts Ning Yuanzhou in a humorous way, trying to solve the problems between Ning Yuanzhou and Ruyi, while also showing his understanding of feelings and concern for Ruyi.
[0085] Plot 2 35:30~38:30xxx
[0086] Plot 3 38:30~41:30xxxxx
[0087] A text matching model can be used to determine the text matching degree between the topic and each candidate plot, and a preset number of candidate plots are selected from multiple candidate plots in order of text matching degree from large to small as target plots. Among them, the text matching model can be, for example, Sentence-BERT, the input includes topics and candidate plots, and the output is the matching degree between the topic and the subsequent plot. The preset number can be set according to demand, for example, the preset number can be 1, 2, etc. For example, the matching degree of each candidate plot is: the matching degree of candidate plot 1 is 0.91, the matching degree of candidate plot 2 is 0.8, the matching degree of candidate plot 3 is 0.6, and the preset number is 2, then candidate plot 1 and candidate plot 2 are selected as target plots.
[0088] Since the start and end times correspond to the barrage clusters, and the barrage data in the barrage clusters may appear before or after the video plot, by extending the start and end times, the extended time period can fully include all candidate plots corresponding to the barrage clusters, and the target plot can be selected from the candidate plots corresponding to the extended time period, thereby improving the accuracy of determining the target plot.
[0089] On the basis of the above technical solution, the topic classification label corresponding to the topic is determined according to the topic and the target plot, including: inputting the topic, the title of the video to be processed and the target plot into a large model, and determining the topic classification label corresponding to the topic based on category definition prompt information through the large model, wherein the category definition prompt information includes multiple first-level labels and second-level label examples corresponding to each first-level label.
[0090] The category definition prompt information is, for example, as follows:
[0091] The first-level tags include [wonderful plot, emotional resonance, character highlights, social issues, visual highlights, other], and the second-level tags are as follows:
[0092] 1) Wonderful plot: including conflict, sweet interaction, jealousy, character counterattack, victory, heroic rescue, decryption, victimization, injury, etc., tags are open
[0093] 2) Emotional resonance: including [CP high sweetness, angry, touching, funny, nervous, sympathetic, sad, relieved, admired, scared, happy, surprised], closed label
[0094] 3) Character highlights: including [appearance, dubbing, acting skills, clothing and makeup, personality, skills and actions, overall evaluation], closed label
[0095] 4) Social issues: including life, law, education, etc., with open tags
[0096] 5) Visual highlights: including special effects, shots, transitions, images, etc., with open tags
[0097] …
[0098] In the above category definition prompt information, if the secondary label is open, it means that the given secondary label is only an example, and the final secondary label can be the secondary label given in the secondary label example, or it can be a related secondary label determined based on these secondary label examples; if the secondary label is a closed set, it means that you need to select a secondary label from these secondary label examples as the final secondary label.
[0099] The topic, the title and target plot of the video to be processed, and the category definition prompt information are input into the big model together, and the big model analyzes the topic, title, and target plot based on the category definition prompt information to determine the topic classification label corresponding to the topic. When the topic, title, target plot, and category definition prompt information are input into the big model, format output prompt information can also be input together. The format output prompt information is used to prompt the format of the output data of the big model. For example, the format output prompt information can specify the reason and the topic classification label, and can also include examples of the reason and the topic classification label, and the reason is the reason for obtaining the topic classification label.
[0100] By using large model technology to determine topic classification labels, we obtain open domain classification, which can achieve the effect of both the stability of most categories within the expected product design and the creativity of a small number of categories (open secondary labels) outside the definition.
[0101] On the basis of the above technical solution, the step of extracting a video segment corresponding to the topic from the video to be processed according to the start and end time and the video information of the video to be processed includes:
[0102] Extending the start and end times by a second preset time length respectively to obtain a second extended time period;
[0103] Obtaining the face label and the shot label corresponding to the video to be processed within the start and end time, wherein the face label represents the time period in which the same face appears, and the shot label represents the time period corresponding to the continuous shots;
[0104] According to the face tag and the lens tag, the second extended time period is extended to obtain a cut-off time period;
[0105] A video segment within the interception time period is intercepted from the video to be processed as a video segment corresponding to the topic.
[0106] The second preset duration is a preset extension duration parameter for splitting the video strips, and can be specifically set according to requirements.
[0107] The start and end time of the topic includes a start time and an end time. The start and end time are respectively extended by a second preset time length, that is, the second preset time length is extended before the start time, and the second preset time length is extended after the end time to obtain a second extended time period.
[0108] The second extended time period is extended again by combining face tags and shot tags and tags generated in advance by other algorithms to obtain a cut-off time period. The characters in the video clips of the video to be processed within the cut-off time period are complete and the shots are complete. The video clips within the cut-off time period are cut from the video to be processed. The video clips corresponding to the topic obtained in this way can ensure the integrity of the characters and the integrity of the shots.
[0109] For example, the topic is "It's really hard for Ning Yuanzhou to retire", and the start and end time of the topic is 3:30-4:00. First, the second preset time length is extended before and after the start and end time, such as 30 seconds, to obtain the second extended time period of 3:00-4:30. Secondly, according to the face label and the shot label, the time is extended before and after according to the shot continuity and face integrity, such as 2:53-5:11, so a short video (video clip) is successfully obtained.
[0110] On the basis of the above technical solution, after extracting the topic corresponding to the barrage clustering cluster, it also includes: obtaining the total number of likes and the total number of replies of all barrage data in the barrage clustering cluster corresponding to the topic, and determining the total number of barrages of all barrage data in the barrage clustering cluster; performing weighted summation of the total number of likes, the total number of replies and the total number of barrages to obtain the popularity corresponding to the topic.
[0111] Based on the first weight of the total number of likes, the second weight of the total number of replies, and the third weight of the total number of barrages, the total number of likes, the total number of replies, and the total number of barrages are weighted and summed to obtain the popularity corresponding to the topic. That is, the popularity corresponding to the topic can be calculated by the formula:
[0112] H=α1×N1+α2×N2+α3×N3
[0113] Among them, α1 represents the first weight, N1 represents the total number of likes, α2 represents the second weight, N2 represents the total number of replies, α3 represents the third weight, and N3 represents the total number of barrages.
[0114] The popularity of the topic can be saved together with the video clips and topics obtained from the final stripping, so as to serve as reference data for subsequent video publicity and promotion.
[0115] Figure 4 FIG. 4 is a schematic diagram of a video stripping process according to an embodiment of the present invention. Figure 4As shown, text similarity features, time interval similarity features, and name similarity features are extracted from the barrage data of the video to be processed (long video); a clustering algorithm is used to cluster all barrage data based on similar features to obtain multiple barrage clustering clusters; a large model is used to summarize the barrage data in the barrage clustering clusters to obtain topics; based on the episode plot of the video to be processed, relevant minute-level candidate plots are obtained, and topic classification labels are determined based on the episode title (title of the video to be processed), candidate plots and topics; based on the start and end time of the topic, face labels and lens labels, the video to be processed is stripped to obtain video clips corresponding to the topic; and video clips and topic classification labels are saved accordingly.
[0116] The embodiment of the present invention combines the clustering scheme and the large model technology to obtain the topics discussed by users, the time corresponding to the topics, and the popularity corresponding to the topics. It uses a combination of large and small models, optimizes the bullet screen with the small model, uses the clustering algorithm for rough analysis, and the large model for precise analysis, saving the amount of calculation and ensuring the effect. After practice, it can achieve a speed of 100,000 bullet screens per episode, 8 CPU, and two minutes of analysis on a machine without GPU, and the topic availability rate is more than 90% in various business operation evaluations. Moreover, by splitting the video based on the topic and open domain classification, the effect of secondary labels with thousands of faces can be obtained, which can be used for external site publicity and promotion of long videos.
[0117] Figure 5 FIG. 1 is a schematic diagram of the structure of a video stripping device provided by an embodiment of the present invention. Figure 5 As shown, the video stripping device may include:
[0118] A bullet comment acquisition module 510 is used to acquire multiple bullet comment data of the video to be processed;
[0119] A bullet chat clustering module 520, configured to cluster the plurality of bullet chat data according to similar features between each two pieces of the bullet chat data, to obtain a plurality of bullet chat clusters;
[0120] The topic determination module 530 is used to extract the topic corresponding to each of the bullet chat clusters, and determine the start and end time corresponding to the topic;
[0121] A topic classification module 540 is used to determine the target plot corresponding to the topic according to the start and end time, and determine the topic classification label corresponding to the topic according to the topic and the target plot, wherein the topic classification label includes a target primary label and a target secondary label under the target primary label;
[0122] The video stripping module 550 is used to extract the video segment corresponding to the topic from the video to be processed according to the start and end time and the video information of the video to be processed, and use the topic classification label as the classification label corresponding to the video segment.
[0123] Optionally, the similarity feature includes at least one of a text similarity feature, a time interval similarity feature, and a name similarity feature;
[0124] The device further comprises at least one of the following:
[0125] A text similarity feature determination module is used to extract the text feature of each barrage data, determine the similarity between the text features of every two barrage data, and if the similarity is greater than or equal to a similarity threshold, determine that the two barrage data corresponding to the similarity have text similarity features;
[0126] A time similarity feature determination module, for determining, for each two pieces of the plurality of barrage data, that the two pieces of barrage data have a time interval similarity feature if the time interval between the two pieces of barrage data is less than or equal to a preset time interval;
[0127] The module for determining similar features of names is used to perform name recognition on each of the two barrage data when two barrage data have similar features in time interval, and to determine that the two barrage data have similar features of names when there are no inconsistent names in the two barrage data.
[0128] Optionally, the text similarity feature determination module includes:
[0129] A grouping unit, used to divide the plurality of barrage data into a plurality of groups according to a time point corresponding to each barrage data and a grouping parameter, wherein the grouping parameter represents an amount of barrage data included in each group;
[0130] The similarity determination unit is used to determine, for each group, the similarity between the text features of each two bullet comment data in the group.
[0131] Optionally, the bullet screen clustering module includes:
[0132] A network construction unit, used to use each of the barrage data as a barrage node, and establish an edge connection between two barrage nodes with similar features according to similar features between each two barrage data, so as to obtain a barrage similarity network;
[0133] The clustering unit is used to cluster the bullet-screen nodes in the bullet-screen similarity network to obtain the multiple bullet-screen clusters.
[0134] Optionally, the topic determination module includes:
[0135] A central bullet discussion determining unit, configured to determine, for each of the bullet discussion clusters, a central bullet discussion of the bullet discussion cluster according to text features of each bullet discussion data in the bullet discussion cluster;
[0136] A topic extraction unit is used to input the central barrage and each barrage data in the barrage cluster into a large model, and perform topic extraction on the central barrage and each barrage data based on topic extraction prompt information through the large model to obtain the topic corresponding to the barrage cluster.
[0137] Optionally, the central bullet screen determination unit is specifically used to:
[0138] Determine the average feature of the text features of each barrage data in the barrage cluster;
[0139] Respectively determine the distance between each barrage data in the barrage cluster and the average feature;
[0140] The bullet chat data with the smallest distance is determined as the central bullet chat of the bullet chat cluster.
[0141] Optionally, the topic determination module includes:
[0142] A barrage time determination unit, used to determine the earliest time point and the latest time point of the barrage in the barrage cluster according to the time point of each barrage data in the barrage cluster;
[0143] A start and end time determination unit is used to use the time point corresponding to the first preset ratio position between the earliest time point of the barrage and the latest time point of the barrage as the start time of the topic, and use the time point corresponding to the second preset ratio position between the earliest time of the barrage and the latest time of the barrage as the end time of the topic, and the first preset ratio is smaller than the second preset ratio.
[0144] Optionally, the topic classification module includes:
[0145] A first extension unit, configured to extend the start and end times by a first preset time length to obtain a first extended time period;
[0146] A candidate plot acquisition unit, configured to acquire a plurality of candidate plots of the video to be processed within the first extended time period;
[0147] A text matching degree determining unit, used to respectively determine the text matching degree between the topic and each of the candidate plots;
[0148] The target plot determination unit is used to select a preset number of candidate plots from the multiple candidate plots in descending order of the text matching degree as the target plot.
[0149] Optionally, the topic classification module includes:
[0150] A classification label determination unit is used to input the topic, the title of the video to be processed and the target plot into a large model, and determine the topic classification label corresponding to the topic based on the category definition prompt information through the large model, wherein the category definition prompt information includes multiple first-level labels and second-level label examples corresponding to each first-level label.
[0151] Optionally, the video stripping module includes:
[0152] A second extension unit, configured to extend the start and end times by a second preset time length to obtain a second extended time period;
[0153] A label acquisition unit, used to acquire a face label and a shot label corresponding to the video to be processed within the start and end time, wherein the face label represents a time period in which the same face appears, and the shot label represents a time period corresponding to continuous shots;
[0154] a third extension unit, configured to extend the second extension time period according to the face tag and the lens tag to obtain a cut-off time period;
[0155] The video stripping unit is used to extract video segments within the extraction time period from the video to be processed as video segments corresponding to the topic.
[0156] Optionally, the device further includes a topic popularity determination module, and the topic popularity determination module is used to:
[0157] Obtain the total number of likes and the total number of replies of all the barrage data in the barrage cluster corresponding to the topic, and determine the total number of barrages of all the barrage data in the barrage cluster;
[0158] The total number of likes, the total number of replies and the total number of barrages are weighted and summed to obtain the popularity corresponding to the topic.
[0159] The video stripping device provided by the embodiment of the present invention clusters multiple barrage data according to the similar features between every two barrage data to obtain multiple barrage clustering clusters, extracts the topic corresponding to the barrage clustering cluster for each barrage clustering cluster, and determines the start and end times corresponding to the topic, determines the target plot corresponding to the topic according to the start and end times, and determines the topic classification label corresponding to the topic according to the topic and the target plot, and extracts the video clip corresponding to the topic from the video to be processed according to the start and end times and the video information of the video to be processed, and uses the topic classification label as the classification label corresponding to the video clip. Since the topic for video stripping can be determined by analyzing the barrage data, and then the video to be processed is stripped based on the start and end times of the topic to obtain the stripped video, the stripping process can be completed without analyzing the video content, thereby reducing the computational complexity of the video stripping process, improving the efficiency of video stripping, and reducing the resource consumption of video stripping. Moreover, the classification label of the video after stripping includes two-level labels, so that the classification of the video after stripping is more accurate and can better reflect the user's interest points in the video to be processed.
[0160] The embodiment of the present invention further provides an electronic device, such as Figure 6 As shown, it includes a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.
[0161] Memory 603, used for storing computer programs;
[0162] The processor 601 is used to execute the program stored in the memory 603 to implement the following steps:
[0163] Get multiple bullet comment data of the video to be processed;
[0164] Clustering the plurality of barrage data according to similar features between each two barrage data to obtain a plurality of barrage clusters;
[0165] For each of the bullet chat clusters, extract the topic corresponding to the bullet chat cluster, and determine the start and end time corresponding to the topic;
[0166] Determine the target plot corresponding to the topic according to the start and end time, and determine the topic classification label corresponding to the topic according to the topic and the target plot, wherein the topic classification label includes a target primary label and a target secondary label under the target primary label;
[0167] According to the start and end time and the video information of the video to be processed, a video segment corresponding to the topic is intercepted from the video to be processed, and the topic classification label is used as the classification label corresponding to the video segment.
[0168] Optionally, the similarity feature includes at least one of a text similarity feature, a time interval similarity feature, and a name similarity feature;
[0169] The method further comprises at least one of the following:
[0170] Extracting text features of each barrage data, determining the similarity between the text features of every two barrage data, and if the similarity is greater than or equal to a similarity threshold, determining that the two barrage data corresponding to the similarity have text similarity features;
[0171] For each two pieces of the plurality of pieces of barrage data, if the time interval between the two pieces of barrage data is less than or equal to a preset time interval, determining that the two pieces of barrage data have a time interval similarity feature;
[0172] When two barrage data have similar time interval features, name recognition is performed on each of the two barrage data respectively. If there are no inconsistent names in the two barrage data, it is determined that the two barrage data have similar name features.
[0173] Optionally, determining the similarity between the text features of each two bullet comment data includes:
[0174] Dividing the plurality of barrage data into a plurality of groups according to a time point and a grouping parameter corresponding to each barrage data, wherein the grouping parameter represents an amount of barrage data included in each group;
[0175] For each group, the similarity between the text features of each two bullet comment data in the group is determined.
[0176] Optionally, clustering the plurality of barrage data according to similar features between every two barrage data to obtain a plurality of barrage clusters includes:
[0177] Taking each of the barrage data as a barrage node, and establishing an edge connection between two barrage nodes with similar features according to similar features between each two barrage data, to obtain a barrage similarity network;
[0178] The bullet-screen nodes in the bullet-screen similarity network are clustered to obtain the multiple bullet-screen clusters.
[0179] Optionally, for each of the bullet chat clusters, extracting a topic corresponding to the bullet chat cluster includes:
[0180] For each of the barrage clusters, determining the central barrage of the barrage cluster according to the text features of each barrage data in the barrage cluster;
[0181] The central barrage and each barrage data in the barrage cluster are input into a large model, and the central barrage and each barrage data are subjected to topic extraction based on topic extraction prompt information by the large model to obtain the topic corresponding to the barrage cluster.
[0182] Optionally, determining the central bullet chat of the bullet chat cluster according to the text feature of each bullet chat data in the bullet chat cluster includes:
[0183] Determine the average feature of the text features of each barrage data in the barrage cluster;
[0184] Respectively determine the distance between each barrage data in the barrage cluster and the average feature;
[0185] The bullet chat data with the smallest distance is determined as the central bullet chat of the bullet chat cluster.
[0186] Optionally, determining the start and end time corresponding to the topic includes:
[0187] According to the time point of each barrage data in the barrage cluster, determine the earliest time point and the latest time point of the barrage in the barrage cluster;
[0188] The time point corresponding to the first preset ratio position between the earliest time point of the barrage and the latest time point of the barrage is used as the start time of the topic, and the time point corresponding to the second preset ratio position between the earliest time of the barrage and the latest time of the barrage is used as the end time of the topic, and the first preset ratio is smaller than the second preset ratio.
[0189] Optionally, determining a target plot corresponding to the topic according to the start and end times includes:
[0190] Extending the start and end times by a first preset time length respectively to obtain a first extended time period;
[0191] Acquire multiple candidate plots of the video to be processed within the first extended time period;
[0192] Determining the text matching degree between the topic and each of the candidate plots respectively;
[0193] A preset number of candidate plots are selected from the plurality of candidate plots in descending order of the text matching degree as the target plots.
[0194] Optionally, determining a topic classification label corresponding to the topic according to the topic and the target plot includes:
[0195] The topic, the title of the video to be processed and the target plot are input into a large model, and the large model determines the topic classification label corresponding to the topic based on category definition prompt information, wherein the category definition prompt information includes multiple first-level labels and second-level label examples corresponding to each first-level label.
[0196] Optionally, the extracting a video segment corresponding to the topic from the video to be processed according to the start and end times and the video information of the video to be processed includes:
[0197] Extending the start and end times by a second preset time length respectively to obtain a second extended time period;
[0198] Obtaining the face label and the shot label corresponding to the video to be processed within the start and end time, wherein the face label represents the time period in which the same face appears, and the shot label represents the time period corresponding to the continuous shots;
[0199] According to the face tag and the lens tag, the second extended time period is extended to obtain a cut-off time period;
[0200] A video segment within the interception time period is intercepted from the video to be processed as a video segment corresponding to the topic.
[0201] Optionally, after extracting the topic corresponding to the bullet screen cluster, the method further includes:
[0202] Obtain the total number of likes and the total number of replies of all the barrage data in the barrage cluster corresponding to the topic, and determine the total number of barrages of all the barrage data in the barrage cluster;
[0203] The total number of likes, the total number of replies and the total number of barrages are weighted and summed to obtain the popularity corresponding to the topic.
[0204] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0205] The communication interface is used for communication between the above electronic device and other devices.
[0206] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0207] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0208] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores instructions. When the computer-readable storage medium is run on a computer, the computer executes the video stripping method described in any one of the above embodiments.
[0209] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes the video stripping method described in any one of the above embodiments.
[0210] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0211] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0212] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0213] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A video stripping method, characterized in that: include: Get multiple bullet comment data of the video to be processed; Clustering the plurality of barrage data according to similar features between each two barrage data to obtain a plurality of barrage clusters; For each of the bullet chat clusters, extract the topic corresponding to the bullet chat cluster, and determine the start and end time corresponding to the topic; Determine the target plot corresponding to the topic according to the start and end time, and determine the topic classification label corresponding to the topic according to the topic and the target plot, wherein the topic classification label includes a target primary label and a target secondary label under the target primary label; According to the start and end time and the video information of the video to be processed, a video segment corresponding to the topic is intercepted from the video to be processed, and the topic classification label is used as the classification label corresponding to the video segment.
2. The method according to claim 1, characterized in that The similarity feature includes at least one of a text similarity feature, a time interval similarity feature and a name similarity feature; The method further comprises at least one of the following: Extracting text features of each barrage data, determining the similarity between the text features of every two barrage data, and if the similarity is greater than or equal to a similarity threshold, determining that the two barrage data corresponding to the similarity have text similarity features; For each two pieces of the plurality of pieces of barrage data, if the time interval between the two pieces of barrage data is less than or equal to a preset time interval, determining that the two pieces of barrage data have a time interval similarity feature; When two barrage data have similar time interval features, name recognition is performed on each of the two barrage data respectively. If there are no inconsistent names in the two barrage data, it is determined that the two barrage data have similar name features.
3. The method according to claim 2, characterized in that The determining the similarity between the text features of each two bullet comment data includes: Dividing the plurality of barrage data into a plurality of groups according to a time point and a grouping parameter corresponding to each barrage data, wherein the grouping parameter represents an amount of barrage data included in each group; For each group, the similarity between the text features of each two bullet comment data in the group is determined.
4. The method according to any one of claims 1 to 3, characterized in that: The clustering of the plurality of barrage data according to the similar features between each two barrage data to obtain a plurality of barrage clusters includes: Taking each of the barrage data as a barrage node, and establishing an edge connection between two barrage nodes with similar features according to similar features between each two barrage data, to obtain a barrage similarity network; The bullet-screen nodes in the bullet-screen similarity network are clustered to obtain the multiple bullet-screen clusters.
5. The method according to any one of claims 1 to 3, characterized in that: For each of the bullet screen clusters, extracting a topic corresponding to the bullet screen cluster includes: For each of the barrage clusters, determining the central barrage of the barrage cluster according to the text features of each barrage data in the barrage cluster; The central barrage and each barrage data in the barrage cluster are input into a large model, and the central barrage and each barrage data are subjected to topic extraction based on topic extraction prompt information by the large model to obtain the topic corresponding to the barrage cluster.
6. The method according to claim 5, characterized in that The step of determining the central bullet chat of the bullet chat cluster according to the text features of each bullet chat data in the bullet chat cluster includes: Determine the average feature of the text features of each barrage data in the barrage cluster; Respectively determine the distance between each barrage data in the barrage cluster and the average feature; The bullet chat data with the smallest distance is determined as the central bullet chat of the bullet chat cluster.
7. The method according to any one of claims 1 to 3, characterized in that: Determining the start and end time corresponding to the topic includes: According to the time point of each barrage data in the barrage cluster, determine the earliest time point and the latest time point of the barrage in the barrage cluster; The time point corresponding to the first preset ratio position between the earliest time point of the barrage and the latest time point of the barrage is used as the start time of the topic, and the time point corresponding to the second preset ratio position between the earliest time of the barrage and the latest time of the barrage is used as the end time of the topic, and the first preset ratio is smaller than the second preset ratio.
8. The method according to any one of claims 1 to 3, characterized in that: Determining the target plot corresponding to the topic according to the start and end time includes: Extending the start and end times by a first preset time length respectively to obtain a first extended time period; Acquire multiple candidate plots of the video to be processed within the first extended time period; Determining the text matching degree between the topic and each of the candidate plots respectively; A preset number of candidate plots are selected from the plurality of candidate plots in descending order of the text matching degree as the target plots.
9. The method according to any one of claims 1 to 3, characterized in that: Determining a topic classification label corresponding to the topic according to the topic and the target plot includes: The topic, the title of the video to be processed and the target plot are input into a large model, and the large model determines the topic classification label corresponding to the topic based on category definition prompt information, wherein the category definition prompt information includes multiple first-level labels and second-level label examples corresponding to each first-level label.
10. The method according to any one of claims 1 to 3, characterized in that: The step of extracting a video segment corresponding to the topic from the video to be processed according to the start and end time and the video information of the video to be processed includes: Extending the start and end times by a second preset time length respectively to obtain a second extended time period; Obtaining the face label and the shot label corresponding to the video to be processed within the start and end time, wherein the face label represents the time period in which the same face appears, and the shot label represents the time period corresponding to the continuous shots; According to the face tag and the lens tag, the second extended time period is extended to obtain a cut-off time period; A video segment within the interception time period is intercepted from the video to be processed as a video segment corresponding to the topic.
11. The method according to any one of claims 1 to 3, characterized in that: After extracting the topic corresponding to the bullet screen cluster, the method further includes: Obtain the total number of likes and the total number of replies of all the barrage data in the barrage cluster corresponding to the topic, and determine the total number of barrages of all the barrage data in the barrage cluster; The total number of likes, the total number of replies and the total number of barrages are weighted and summed to obtain the popularity corresponding to the topic.
12. A video stripping device, characterized in that: include: A bullet comment acquisition module is used to obtain multiple bullet comment data of the video to be processed; A barrage clustering module, used for clustering the plurality of barrage data according to similar features between each two barrage data, to obtain a plurality of barrage clusters; A topic determination module, for extracting the topic corresponding to each of the bullet chat clusters, and determining the start and end time corresponding to the topic; A topic classification module, used to determine the target plot corresponding to the topic according to the start and end time, and determine the topic classification label corresponding to the topic according to the topic and the target plot, wherein the topic classification label includes a target primary label and a target secondary label under the target primary label; The video stripping module is used to extract the video segment corresponding to the topic from the video to be processed according to the start and end time and the video information of the video to be processed, and use the topic classification label as the classification label corresponding to the video segment.
13. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method steps described in any one of claims 1-11 when executing a program stored in a memory.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 11 is implemented.
Citation Information
Cited By
Hierarchical classification method based on large language model, electronic equipment and computer readable storage medium
CN120179821A