Multi-modal video watching point analysis method and device, equipment and medium
By converting the speech in the input video into text and combining it with picture information for multi-modal analysis to predict the location of video highlights and generate an outline, it solves the problems of high labor costs and inconsistent content outlines in the existing technology, and achieves automation and accuracy. video content analysis.
Patent Information
- Application Number
- CN202310214016.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-07
- Publication Date
- 2024-09-10
- Estimated Expiration
- 2043-03-07
AI Technical Summary
Existing multi-modal video point of view analysis methods have problems such as high labor costs, uneven generated video content outlines, and incomplete representation of the input video by single-modal data.
By converting the speech in the input video into text, splicing text sentences according to the timestamp, using a pre-trained language model to predict the starting and ending positions of the highlights, extracting the highlight fragments and summaries, and combining the image information of the picture coding model for splicing and fusion ,generating video content outlines using a single-layer ,linear network.
Automated analysis is realized, labor costs are saved, the generated video content outline is unified and more accurate, and the completeness of the video content is improved through information representation of multi-source data.
Smart Images

Figure CN118632090A
Abstract
Description
Technical Field
[0001] The present application relates to the field of video analysis technology, for example, to a multimodal video highlight analysis method, device, equipment and medium. Background Art
[0002] The number of videos on the Internet is currently growing explosively, and people's demand for quickly browsing the specific content of videos is increasing. In order to help users quickly understand the video content and improve the user experience, video highlights extraction is needed. Video highlights extraction includes extracting the start time of the video highlights and the structured summary of the highlights segment. There are two existing multimodal video highlights analysis methods: the first is the manual analysis method, which observes and slices the video frame by frame by the video uploader to obtain the location of the highlights segment, extract the start time of the segment, and summarize the segment to obtain the highlights summary. The manual analysis method will consume a large amount of labor costs, and different people have different understandings of the video highlights, which will make the generated video content outline uneven. The second method is to generate a video content outline through single-modal data such as text information or image information, and single-modal data is not complete enough to represent the input video.
[0003] In summary, existing multimodal video highlight analysis methods have the problems of high labor costs, uneven generated video content outlines, and / or incomplete representation of single-modal data on the input video. Summary of the invention
[0004] The purpose of the present application is to provide a multimodal video highlight analysis method, device, equipment and medium, which can solve the problems of existing multimodal video highlight analysis methods, such as high labor costs, uneven generated video content outlines, and / or incomplete representation of input videos by single-modal data. To achieve the above purpose, the present application provides a multimodal video highlight analysis method, including:
[0005] Obtaining an input video, converting speech in the input video into text, and obtaining text content;
[0006] Obtaining a timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, and concatenating the text sentences according to the timestamp to obtain a concatenated text; the length of the concatenated sentences of the concatenated text is a first preset length;
[0007] The last character of the i-th concatenated sentence is sequentially slid forward by a second preset length to obtain a starting character; starting from the starting character, characters of a third preset length are intercepted backward, and the video title and the mark symbol are added before the starting character to obtain the i+1-th concatenated sentence; wherein i≥1;
[0008] Inputting each of the concatenated sentences into a pre-trained language model, performing vector representation on the concatenated sentences, and obtaining a concatenated vector;
[0009] Predicting a starting position and an ending position of a highlight according to the splicing vector, and extracting a highlight segment and a segment starting time according to the starting position and the ending position of the highlight;
[0010] Extracting a highlight summary of the highlight segment;
[0011] Obtain a frame image corresponding to the start time of the segment, and encode the frame image using a picture encoding model to obtain image information;
[0012] The highlight summary and the image information are spliced and fused to obtain fused information; a single-layer linear network is used to predict each character in the fused information to obtain a video content outline.
[0013] Preferably, encoding the frame picture using a picture coding model to obtain image information includes:
[0014] The frame image is encoded using the Taiyi model to obtain the image information.
[0015] Preferably, predicting the starting position and the ending position of the viewing point according to the splicing vector includes:
[0016] Input the concatenated vector into the softmax layer of the single-layer pointer network for mapping to obtain a mapping vector;
[0017] Splitting the mapping vector to obtain a starting position vector and an ending position vector;
[0018] The starting position of the viewing point is determined according to the starting position vector, the ending position of the viewing point is determined according to the ending position vector, and the time corresponding to the starting position of the viewing point is used as the starting time of the segment.
[0019] Preferably, the using a single-layer linear network to predict each character in the fusion information to obtain a video content outline includes:
[0020] Inputting the vector corresponding to each character in the fusion information into the sigmoid layer of the single-layer linear network, classifying each character of the fusion information, and obtaining a first classification label and a second classification label;
[0021] Delete the characters corresponding to the second classification label to obtain the video content outline.
[0022] Preferably, obtaining the timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark includes:
[0023] Counting the ending punctuation marks in the text content;
[0024] The timestamp corresponding to the first character of each of the text sentences is obtained according to the end punctuation mark.
[0025] Preferably, converting the speech in the input video into text to obtain text content includes:
[0026] Acquire the voice in the input video;
[0027] The ASR speech recognition tool is used to convert the speech in the input video into text to obtain the text content.
[0028] Preferably, extracting the highlight summary of the highlight segment includes:
[0029] The highlight segment is input into the pre-trained language model, and vector representation is performed on the highlight segment to obtain the highlight summary.
[0030] The present application provides a multi-modal video highlight analysis device, comprising:
[0031] A speech-to-text conversion module is used to obtain an input video, convert the speech in the input video into text, and obtain text content;
[0032] A text sentence splicing module, used for obtaining the timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, splicing each of the text sentences according to the timestamp to obtain a spliced text; the length of the spliced sentence of the spliced text is a first preset length;
[0033] The concatenated sentence sliding module is used to sequentially slide the last character of the i-th concatenated sentence forward by a second preset length to obtain a starting character; taking the starting character as the starting point, intercepting a third preset length of characters backward, adding the video title and the mark symbol before the starting character, to obtain the i+1-th concatenated sentence; wherein i≥1;
[0034] A first vector representation module, used for inputting each of the concatenated sentences into a pre-trained language model, performing vector representation on the concatenated sentences, and obtaining a concatenated vector;
[0035] A highlight segment extraction module is used to predict a highlight start position and a highlight end position according to the splicing vector, and extract a highlight segment and a segment start time according to the highlight start position and the highlight end position;
[0036] A highlight summary extraction module, used to extract a highlight summary of the highlight segment;
[0037] A frame picture encoding module, used for obtaining a frame picture corresponding to the start time of the segment, and encoding the frame picture using a picture encoding model to obtain image information;
[0038] The character prediction module is used to splice and fuse the highlight summary and the image information to obtain fused information; and use a single-layer linear network to predict each character in the fused information to obtain a video content outline.
[0039] The present application also provides a computer device, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, it implements any of the multimodal video highlight analysis methods described above and / or the steps of any of the multimodal video highlight analysis methods described above.
[0040] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the method for analyzing highlights of a multimodal video and / or the steps of the method for analyzing highlights of a multimodal video described in any one of the above items are implemented.
[0041] A multimodal video highlight analysis method of the present application includes obtaining an input video, converting the voice in the input video into text, and obtaining text content. Obtain the timestamp corresponding to the first character of each text sentence in the text content, splice each text sentence according to the timestamp, and obtain a spliced text; the length of the spliced sentence of the spliced text is a first preset length; slide the last character of the i-th spliced sentence forward by the second preset length in sequence to obtain the starting character; take the starting character as the starting point and intercept the third preset length characters backward, add the video title and mark symbol before the starting character, and obtain the i+1-th spliced sentence; wherein, i≥1, the first preset length is equal to the sum of the second preset length and the third preset length; input each spliced sentence into a pre-trained language model, and represent the spliced sentence by vector to obtain a spliced vector. The spliced text is slidably segmented by a fixed step sliding method, so that the spliced text can be encoded by the pre-trained language model, which can prevent the text from being cut beyond the length limit, thereby preventing the loss of a large amount of text information. The starting and ending positions of the highlights are predicted based on the splicing vector, and the highlight segments and the start time of the segments are extracted based on the starting and ending positions of the highlights. The highlight summary of the highlight segment is extracted, and the frame image corresponding to the start time of the segment is obtained. The frame image is encoded using the image coding model to obtain image information; the highlight summary and the image information are spliced and fused to obtain fused information; a single-layer linear network is used to predict each character in the fused information to obtain the video content outline. Automatic calculation can save labor costs, and has a unified analysis standard, which can make the generated video content outline unified. The highlight summary belongs to text information. Compared with using single-modal data to generate a video content outline, splicing and fusing the highlight summary and image information can aggregate information from multiple source data, making the representation of the input video more complete and the generated video content outline more accurate. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a flow chart of a multimodal video highlight analysis method according to an embodiment;
[0043] Figure 2 A schematic diagram of a process for predicting a starting position and an ending position of a viewing point according to an embodiment;
[0044] Figure 3 A schematic diagram of a flow chart of predicting characters of fused information according to an embodiment;
[0045] Figure 4 It is a schematic block diagram of the structure of a multi-modal video highlight analysis device according to an embodiment;
[0046] Figure 5 The present invention is a schematic block diagram of the structure of a computer device according to an embodiment.
[0047] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0048] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] It will be understood by those skilled in the art that, unless expressly stated, the singular forms "a", "an", "above", and "the" used herein may also include plural forms. It should be further understood that the term "comprising" used in the specification of the present invention refers to the presence of features, integers, steps, operations, elements, modules, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It should be understood that when we refer to an element as being "connected" or "coupled" to another element, it may be directly connected or coupled to the other element, or there may be an intermediate element. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The term "and / or" used herein includes all or any module and all combinations of one or more associated listed items.
[0050] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the art to which the present invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as herein.
[0051] In one embodiment, referring to Figure 1 , is a flow chart of a multimodal video highlight analysis method disclosed in the present application, the method comprising:
[0052] S1: Obtain an input video, convert the voice in the input video into text, and obtain text content.
[0053] Acquire the voice in the input video;
[0054] The ASR speech recognition tool is used to convert the speech in the input video into text to obtain the text content.
[0055] The input video includes image data and voice data. The video format of the input video includes one or more of MPEG format, AVI format, ASF format, MOV format and WMV format, which is not limited here.
[0056] The ASR speech recognition tool can be Tencent Cloud ASR or Baidu Cloud ASR, and there is no limitation here.
[0057] S2: Obtain the timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, and concatenate the text sentences according to the timestamp to obtain a concatenated text; the length of the concatenated sentence of the concatenated text is a first preset length.
[0058] Counting the ending punctuation marks in the text content;
[0059] The timestamp corresponding to the first character of each of the text sentences is obtained according to the end punctuation mark.
[0060] The ending punctuation marks include period, question mark and exclamation mark. The first character is the character at the beginning of each text sentence. The timestamp corresponding to the first character is calculated in seconds.
[0061] For example, the text content is (1) Hi, everyone, welcome to watch this episode of horoscopes, (2) I am the host, Mr. Gu. (3) Today we will talk about the three horoscope months in (4) of the 12 horoscopes. The first character of sentence (1) corresponds to the first second, the first character of sentence (2) corresponds to the fourth second, the first character of sentence (3) corresponds to the sixth second, and the first character of sentence (4) corresponds to the eighth second. By splicing the text sentences according to the timestamps, the resulting spliced text is (1) Hi, everyone, welcome to watch this episode of horoscopes, I am the host, Mr. Gu. (2) Today we will talk about the three horoscope months in the 12 horoscopes.
[0062] The first preset length represents the maximum input length of the pre-trained language model. The length of the concatenated text is relatively long, so the concatenated text needs to be divided. The first preset length can be 512 or other lengths.
[0063] S3: Slide the last character of the i-th concatenated sentence forward by the second preset length in sequence to obtain the starting character; take the starting character as the starting point and cut characters of the third preset length backward, add the video title and mark symbol before the starting character, and obtain the i+1-th concatenated sentence; wherein, i≥1.
[0064] The second preset length is fixed and can prevent the spliced text from being split. The video title and the marking symbol are added in sequence before the first character of the spliced text. The video title, the marking symbol, the first character of the spliced text and the third preset length of characters after the first character of the spliced text constitute the first spliced sentence. The last character of the i-1 spliced sentence is slid forward by the second preset length to obtain the corresponding starting character, and the third preset length of characters is intercepted backward from the starting character, and the video title and the marking symbol are added before the starting character. The video title, the marking symbol, the starting character and the third preset length of characters after the starting character constitute the i-th spliced sentence. When the last character of the i-th spliced sentence is the last character of the spliced text, the above process of sliding the last character of the spliced sentence forward is stopped. The sum of the length of the video title and the length of the marking symbol is the first temporary length, the first temporary length plus 1 is the second temporary length, and the first preset length is subtracted from the second temporary length to obtain the third preset length.
[0065] Preferably, the length of the video title is set to 1, the length of the marking symbol is set to 1, the first preset length is set to 512, the second preset length is set to 127, and the third preset length is set to 509.
[0066] For example, when the concatenated text contains a total of 7 characters, the concatenated text is expressed as T=t1, t2, t3, t4, t5, t6, t7. The first preset length is 5, the second preset length is 1, and the third preset length is 2. The first concatenated sentence is expressed as T1=video title, SEP, t1, t2, t3, where SEP represents a marking symbol. Slide the last character of the first concatenated sentence forward by the second preset length of characters to obtain the starting character t2. Take t2 as the starting point and intercept the third preset length of characters backward to obtain t3 and t4. Add the video title and the marking symbol before t2 to obtain the second concatenated sentence, and the second concatenated sentence is expressed as T2=video title, SEP, t2, t3, t4.
[0067] S4: Input each of the concatenated sentences into a pre-trained language model, perform vector representation on the concatenated sentences, and obtain a concatenated vector.
[0068] The pre-trained language model may be a LEBERT model or other models, which is not limited here. The embodiment of the present application takes the pre-trained language model as an example of a LEBERT model optimized for Chinese.
[0069] The LEBERT model uses the entire vocabulary of Chinese sequence labels to enhance the BERT model. External vocabulary information is directly integrated into the BERT model through a full vocabulary adaptation layer. The LEBERT model helps to integrate deep vocabulary knowledge in the lower layers of the BERT model.
[0070] The LEBERT model has two versions, namely the base version and the large version. The base version has 12 layers, a hidden layer size of 768, and a multi-head attention mechanism with 12 heads; the large version has 24 layers, a hidden layer size of 1024, and a multi-head attention mechanism with 16 heads. This application embodiment takes the base version of the LEBERT model as an example.
[0071] The calculation formula of the splicing vector is as follows:
[0072] E i =M(T i );
[0073] Among them, T i represents the i-th concatenated sentence, the first preset length of the i-th concatenated sentence is 512, M represents the base version of the LEBERT model, E i represents the i-th splicing vector, and the dimension of the i-th splicing vector is 512×768.
[0074] S5: predicting a starting position and an ending position of a highlight according to the splicing vector, and extracting a highlight segment and a segment starting time according to the starting position and the ending position of the highlight.
[0075] Input the concatenated vector into the softmax layer of the single-layer pointer network for mapping to obtain a mapping vector;
[0076] Splitting the mapping vector to obtain a starting position vector and an ending position vector;
[0077] The starting position of the viewing point is determined according to the starting position vector, the ending position of the viewing point is determined according to the ending position vector, and the time corresponding to the starting position of the viewing point is used as the starting time of the segment.
[0078] The segment between the highlight start position and the highlight end position is the highlight segment.
[0079] S6: extracting a highlight summary of the highlight segment.
[0080] The highlight segment is input into the pre-trained language model, and vector representation is performed on the highlight segment to obtain the highlight summary.
[0081] The calculation formula of the highlight summary is as follows:
[0082] S i =M(V i );
[0083] Among them, S iis the i-th highlight summary, M represents the base version of the LEBERT model, V i Represents the i-th highlight segment.
[0084] S7: Obtain a frame image corresponding to the start time of the segment, and encode the frame image using a picture encoding model to obtain image information.
[0085] The frame image is encoded using the Taiyi model to obtain the image information.
[0086] The Taiyi model, pre-trained on 123 million image-text pairs, is an open source Chinese CLIP model with strong visual and language representation capabilities.
[0087] S8: splicing and fusing the highlight summary and the image information to obtain fused information; using a single-layer linear network to predict each character in the fused information to obtain a video content outline.
[0088] Inputting the vector corresponding to each character in the fusion information into the sigmoid layer of the single-layer linear network, classifying each character of the fusion information, and obtaining a first classification label and a second classification label;
[0089] Delete the characters corresponding to the second classification label to obtain the video content outline.
[0090] The first classification label corresponds to the characters that need to be retained, and the second classification label corresponds to the characters that need to be deleted.
[0091] A multimodal video highlight analysis method of an embodiment of the present application includes obtaining an input video, converting the voice in the input video into text, and obtaining text content. Obtain the timestamp corresponding to the first character of each text sentence in the text content, splice each text sentence according to the timestamp, and obtain a spliced text; the length of the spliced sentence of the spliced text is a first preset length; slide the last character of the i-th spliced sentence forward by the second preset length in sequence to obtain the starting character; take the starting character as the starting point and intercept the third preset length characters backward, add the video title and mark symbol before the starting character, and obtain the i+1-th spliced sentence; wherein, i≥1, the first preset length is equal to the sum of the second preset length and the third preset length; input each spliced sentence into a pre-trained language model, and represent the spliced sentence by vector to obtain a spliced vector. The spliced text is slidably segmented by a fixed step sliding method, so that the spliced text can be encoded by the pre-trained language model, which can prevent the text from being cut beyond the length limit, thereby preventing the loss of a large amount of text information. The starting and ending positions of the highlights are predicted based on the splicing vector, and the highlight segments and the start time of the segments are extracted based on the starting and ending positions of the highlights. The highlight summary of the highlight segment is extracted, and the frame image corresponding to the start time of the segment is obtained. The frame image is encoded using the image coding model to obtain image information; the highlight summary and the image information are spliced and fused to obtain fused information; a single-layer linear network is used to predict each character in the fused information to obtain the video content outline. Automatic calculation can save labor costs, and has a unified analysis standard, which can make the generated video content outline unified. The highlight summary belongs to text information. Compared with using single-modal data to generate a video content outline, splicing and fusing the highlight summary and image information can aggregate information from multiple source data, making the representation of the input video more complete and the generated video content outline more accurate.
[0092] In one embodiment, referring to Figure 2 , the predicting the starting position and the ending position of the viewing point according to the splicing vector includes:
[0093] S51: Input the concatenated vector into the softmax layer of the single-layer pointer network for mapping to obtain a mapping vector.
[0094] When the first preset length is 512, the dimension of the concatenated vector is 512×768, and the concatenated vector is mapped through the softmax layer of the single-layer pointer network to obtain a mapping vector, and the dimension of the mapping vector is 512×2.
[0095] The formula for mapping the splicing vector is as follows:
[0096] D i =softmax(W e E i+b e );
[0097] Among them, D i is the i-th mapping vector, softmax represents the softmax mapping function, W e represents the weight matrix, b e represents the bias matrix, E i represents the i-th concatenation vector.
[0098] S52: Split the mapping vector to obtain a starting position vector and an ending position vector.
[0099] For the i-th mapping vector D i Split and get the i-th starting position vector and the i-th terminal position vector
[0100] S53: Determine the starting position of the viewing point according to the starting position vector, determine the ending position of the viewing point according to the ending position vector, and use the time corresponding to the starting position of the viewing point as the starting time of the segment.
[0101] The i-th starting position vector and the i-th terminal position vector The segment between is the i-th highlight segment. According to the i-th starting position vector Determine the starting position of the i-th viewing point. The time corresponding to the starting position of the i-th viewing point is the starting time of the i-th segment. Determine the end position of the i-th viewing point.
[0102] As described above, predicting the starting position and the ending position of the viewing point based on the splicing vector includes inputting the splicing vector into the softmax layer of the single-layer pointer network for mapping to obtain a mapping vector. The mapping vector is split to obtain a starting position vector and an ending position vector. The starting position of the viewing point is determined according to the starting position vector, and the ending position of the viewing point is determined according to the ending position vector. The time corresponding to the starting position of the viewing point is used as the starting time of the segment, and the i-th starting position vector is used as the starting time of the segment. and the i-th terminal position vector The segment between is the i-th highlight segment.
[0103] In one embodiment, referring to Figure 3 , the single-layer linear network is used to predict each character in the fusion information to obtain a video content outline, including:
[0104] S81: Input the vector corresponding to each character in the fusion information into the sigmoid layer of the single-layer linear network, classify each character of the fusion information, and obtain a first classification label and a second classification label.
[0105] For example, the i-th fusion information is "many pinyin input software have an associative function", where "pinyin input software", "association" and "function" belong to the first classification label, and "many", "all have" and "of" belong to the second classification label.
[0106] S82: Delete the characters corresponding to the second classification label to obtain the video content outline.
[0107] Delete the characters corresponding to the second category label and retain the characters corresponding to the first category label, and the resulting video content outline is "Pinyin input software association function".
[0108] All fusion information is processed in sequence according to the above steps S81-S82 to obtain the outline of all video content of the input video.
[0109] As described above, a single-layer linear network is used to predict each character in the fusion information to obtain a video content outline, including inputting the vector corresponding to each character in the fusion information into the sigmoid layer of the single-layer linear network, classifying each character of the fusion information, and obtaining a first classification label and a second classification label. The characters corresponding to the second classification label are deleted to obtain a video content outline. All fusion information is classified in turn, and the characters corresponding to the second classification label are deleted, so that all video content outlines of the input video can be obtained.
[0110] Reference Figure 4 , is a schematic structural diagram of a multimodal video highlight analysis device disclosed in the present application, the device comprising:
[0111] The speech-to-text conversion module 10 is used to obtain an input video, convert the speech in the input video into text, and obtain text content;
[0112] A text sentence concatenation module 20 is used to obtain a timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, and concatenate each of the text sentences according to the timestamp to obtain a concatenated text; the length of the concatenated sentences of the concatenated text is a first preset length;
[0113] The concatenated sentence sliding module 30 is used to sequentially slide the last character of the i-th concatenated sentence forward by a second preset length to obtain a starting character; taking the starting character as the starting point, intercepting a third preset length of characters backward, adding the video title and the mark symbol before the starting character, to obtain the i+1-th concatenated sentence; wherein i≥1;
[0114] A first vector representation module 40, configured to input each of the concatenated sentences into a pre-trained language model, perform vector representation on the concatenated sentences, and obtain a concatenated vector;
[0115] A highlight segment extraction module 50 is used to predict a highlight start position and a highlight end position according to the splicing vector, and extract a highlight segment and a segment start time according to the highlight start position and the highlight end position;
[0116] A highlight summary extraction module 60 is used to extract a highlight summary of the highlight segment;
[0117] A frame picture encoding module 70, used to obtain a frame picture corresponding to the start time of the segment, and encode the frame picture using a picture encoding model to obtain image information;
[0118] The character prediction module 80 is used to splice and fuse the highlight summary and the image information to obtain fused information; and use a single-layer linear network to predict each character in the fused information to obtain a video content outline.
[0119] As described above, the multimodal video highlight analysis device can implement the multimodal video highlight analysis method.
[0120] In one embodiment, the frame picture encoding module 70 further includes:
[0121] The frame picture encoding unit is used to use the Taiyi model to perform image encoding on the frame picture to obtain the image information.
[0122] In one embodiment, the highlight segment extraction module 50 further includes:
[0123] A concatenated vector mapping unit, used for inputting the concatenated vector into a softmax layer of a single-layer pointer network for mapping to obtain a mapping vector;
[0124] A mapping vector splitting unit, used for splitting the mapping vector to obtain a starting position vector and an ending position vector;
[0125] A position determination unit is used to determine the starting position of the viewing point according to the starting position vector, determine the ending position of the viewing point according to the ending position vector, and use the time corresponding to the starting position of the viewing point as the starting time of the segment.
[0126] In one embodiment, the character prediction module 80 further includes:
[0127] A character classification unit, used for inputting the vector corresponding to each character in the fusion information into the sigmoid layer of the single-layer linear network, classifying each character of the fusion information, and obtaining a first classification label and a second classification label;
[0128] A character deletion unit is used to delete the characters corresponding to the second classification label to obtain the video content outline.
[0129] In one embodiment, the text sentence splicing module 20 further includes:
[0130] An end punctuation mark counting unit, used for counting the end punctuation marks in the text content;
[0131] A timestamp acquisition unit is used to acquire the timestamp corresponding to the first character of each of the text sentences according to the end punctuation mark.
[0132] In one embodiment, the speech-to-text conversion module 10 further includes:
[0133] A voice acquisition unit, used to acquire the voice in the input video;
[0134] The speech-to-text unit is used to convert the speech in the input video into text using an ASR speech recognition tool to obtain the text content.
[0135] In one embodiment, the highlight summary extraction module 60 further includes:
[0136] A highlight summary extraction unit is used to input the highlight segment into the pre-trained language model, perform vector representation on the highlight segment, and obtain the highlight summary.
[0137] Reference Figure 5 In an embodiment of the present application, a computer device is also provided, the internal structure of which can be as follows: Figure 5As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor designed for the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store splicing vectors, etc. The network interface of the computer device is used to communicate with an external terminal through a network connection. Furthermore, the above-mentioned computer device can also be provided with an input device and a display screen, etc. When the computer program is executed by a processor, the method for analyzing the highlights of a multimodal video is implemented, and the method comprises the following steps: obtaining an input video, converting the voice in the input video into text, and obtaining text content; obtaining the timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, and splicing each text sentence according to the timestamp to obtain a spliced text; the length of the spliced sentence of the spliced text is a first preset length; sliding the last character of the ith spliced sentence forward by a second preset length in sequence to obtain a starting character; taking the starting character as the starting point, intercepting characters of a third preset length backward, adding the video title and the mark symbol before the starting character, and obtaining the ith spliced sentence; i+1 of the spliced sentences; where i≥1; input each of the spliced sentences into a pre-trained language model, represent the spliced sentences with vectors, and obtain a spliced vector; predict the starting position and the ending position of the highlights according to the spliced vector, extract the highlight segments and the segment start time according to the highlight starting position and the highlight ending position; extract the highlight summary of the highlight segment; obtain the frame image corresponding to the segment start time, and use the image coding model to encode the frame image to obtain image information; splice and fuse the highlight summary and the image information to obtain fused information; use a single-layer linear network to predict each character in the fused information to obtain the video content outline. Those skilled in the art can understand that Figure 5 The structure shown in is merely a block diagram of a portion of the structure related to the present application solution and does not constitute a limitation on the computer device to which the present application solution is applied.
[0138] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, a multimodal video highlight analysis method is implemented, comprising the following steps: obtaining an input video, converting the voice in the input video into text, and obtaining text content; obtaining a timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, and splicing each of the text sentences according to the timestamp to obtain a spliced text; the length of the spliced sentence of the spliced text is a first preset length; sliding the last character of the i-th spliced sentence forward by a second preset length in sequence to obtain a starting character; taking the starting character as the starting point and cutting back characters of a third preset length, and converting the video title and the mark symbol Add before the starting character to obtain the i+1th concatenated sentence; wherein, i≥1; input each of the concatenated sentences into a pre-trained language model, perform vector representation on the concatenated sentences, and obtain a concatenated vector; predict the starting position and the ending position of the highlights according to the concatenated vector, extract the highlight segment and the segment starting time according to the highlight starting position and the highlight ending position; extract the highlight summary of the highlight segment; obtain the frame picture corresponding to the segment starting time, use the picture coding model to encode the frame picture, and obtain image information; concatenate and fuse the highlight summary and the image information to obtain fused information; use a single-layer linear network to predict each character in the fused information to obtain a video content outline.
[0139] It can be understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0140] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media provided in this application and used in the embodiments may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0141] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0142] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made by using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A multimodal video highlight analysis method, characterized in that: include: Obtaining an input video, converting speech in the input video into text, and obtaining text content; Obtaining a timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, and concatenating the text sentences according to the timestamp to obtain a concatenated text; the length of the concatenated sentences of the concatenated text is a first preset length; The last character of the i-th concatenated sentence is sequentially slid forward by a second preset length to obtain a starting character; starting from the starting character, characters of a third preset length are intercepted backward, and the video title and the mark symbol are added before the starting character to obtain the i+1-th concatenated sentence; wherein i≥1; Inputting each of the concatenated sentences into a pre-trained language model, performing vector representation on the concatenated sentences, and obtaining a concatenated vector; Predicting a starting position and an ending position of a highlight according to the splicing vector, and extracting a highlight segment and a segment starting time according to the starting position and the ending position of the highlight; Extracting a highlight summary of the highlight segment; Obtain a frame image corresponding to the start time of the segment, and encode the frame image using a picture encoding model to obtain image information; The highlight summary and the image information are spliced and fused to obtain fused information; a single-layer linear network is used to predict each character in the fused information to obtain a video content outline.
2. The multimodal video highlight analysis method according to claim 1, characterized in that: The using the picture coding model to encode the frame picture to obtain image information includes: The frame image is encoded using the Taiyi model to obtain the image information.
3. The multimodal video highlight analysis method according to claim 1, characterized in that: The predicting the starting position and the ending position of the viewing point according to the splicing vector includes: Input the concatenated vector into the softmax layer of the single-layer pointer network for mapping to obtain a mapping vector; Splitting the mapping vector to obtain a starting position vector and an ending position vector; The starting position of the viewing point is determined according to the starting position vector, the ending position of the viewing point is determined according to the ending position vector, and the time corresponding to the starting position of the viewing point is used as the starting time of the segment.
4. The multimodal video highlight analysis method according to claim 1, characterized in that: The single-layer linear network is used to predict each character in the fusion information to obtain a video content outline, including: Inputting the vector corresponding to each character in the fusion information into the sigmoid layer of the single-layer linear network, classifying each character of the fusion information, and obtaining a first classification label and a second classification label; Delete the characters corresponding to the second classification label to obtain the video content outline.
5. The multimodal video highlight analysis method according to claim 1, characterized in that: The obtaining, according to the end punctuation mark, a timestamp corresponding to the first character of each text sentence in the text content includes: Counting the ending punctuation marks in the text content; The timestamp corresponding to the first character of each of the text sentences is obtained according to the end punctuation mark.
6. The multimodal video highlight analysis method according to claim 1, characterized in that: The step of converting the voice in the input video into text to obtain text content includes: Acquire the voice in the input video; The ASR speech recognition tool is used to convert the speech in the input video into text to obtain the text content.
7. The multimodal video highlight analysis method according to claim 1, characterized in that: The step of extracting a highlight summary of the highlight segment includes: The highlight segment is input into the pre-trained language model, and vector representation is performed on the highlight segment to obtain the highlight summary.
8. A multi-modal video highlight analysis device, characterized in that: include: A speech-to-text conversion module is used to obtain an input video, convert the speech in the input video into text, and obtain text content; A text sentence splicing module, used for obtaining the timestamp corresponding to the first character of each text sentence in the text content according to the end punctuation mark, splicing each of the text sentences according to the timestamp to obtain a spliced text; the length of the spliced sentence of the spliced text is a first preset length; The concatenated sentence sliding module is used to sequentially slide the last character of the i-th concatenated sentence forward by a second preset length to obtain a starting character; taking the starting character as the starting point, intercepting a third preset length of characters backward, adding the video title and the mark symbol before the starting character, to obtain the i+1-th concatenated sentence; wherein i≥1; A first vector representation module, used for inputting each of the concatenated sentences into a pre-trained language model, performing vector representation on the concatenated sentences, and obtaining a concatenated vector; A highlight segment extraction module is used to predict a highlight start position and a highlight end position according to the splicing vector, and extract a highlight segment and a segment start time according to the highlight start position and the highlight end position; A highlight summary extraction module, used to extract a highlight summary of the highlight segment; A frame picture encoding module, used for obtaining a frame picture corresponding to the start time of the segment, and encoding the frame picture using a picture encoding model to obtain image information; The character prediction module is used to splice and fuse the highlight summary and the image information to obtain fused information; and use a single-layer linear network to predict each character in the fused information to obtain a video content outline.
9. A computer device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the processor executes the computer program, the steps of the multimodal video highlight analysis method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the multimodal video highlight analysis method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Multi-mode voice endpoint detection method and device
CN111768760A
Video description text generation method based on multi-modal fusion
CN112069361A
Outtake video editing method and system
CN112423115A
Video dotting method and device
CN112804580A
Information obtaining method and device, electronic equipment and storage medium
CN113792166A
