Multi-modal video understanding method based on large language model
Through the multi-modal video understanding method based on the large language model, the multi-modal data features of the video are extracted and integrated to generate structured output, which solves the problem of insufficient comprehensive and accurate video understanding in the existing technology and improves the efficiency of video content analysis. Efficiency and precision.
Patent Information
- Application Number
- CN202411147293.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-09-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing technology mainly compares the characteristic information of different modal data in video understanding, and fails to effectively comprehensively analyze the data of different modalities, resulting in insufficient comprehensive and accurate understanding of video content.
Using a multi-modal video understanding method based on a large language model, by obtaining the multi-modal data of the video (video frames, text, audio), extracting features and aligning the timestamps, integrating them into structured data, and using the large language model to generate understanding The results are combined with user questions and prompt word output.
It achieves a more comprehensive and accurate understanding of video content, overcomes the limitations of single-modal information processing, ensures the temporal consistency of multi-modal data and structured output of understanding results, and improves scenarios such as video search, recommendation and monitoring. Intelligent practicality.
Smart Images

Figure CN118675092A
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer vision technology, and in particular to a multimodal video understanding method, device, electronic device and storage medium based on a large language model. Background Art
[0002] With the rapid development of natural language processing technology and computer vision technology, video understanding has become a new hot topic. Video understanding is usually based on the recognition of four different modalities of data in the video: image, text, voice, and video, to obtain the description text of the video.
[0003] In related technologies, the speech in the video is recognized and converted into text, and then the text is searched and combined with the video title text to calculate the cosine similarity to achieve high-level semantic understanding of the short video. Although this solution combines video and text information, it mainly compares the feature information of different modal data, and does not conduct a comprehensive analysis of different modal data. Summary of the invention
[0004] In order to solve or partially solve the problems existing in the related art, the present application provides a multimodal video understanding method, device, electronic device and storage medium based on a large language model, which can integrate the multimodal data of the video and understand the video content more comprehensively and accurately, overcoming the limitations of single modal information processing. At the same time, it aligns and integrates data based on timestamps to ensure the temporal consistency of multimodal data and the structured output of understanding results. It has higher practicality and is more intelligent in scenarios such as video search, recommendation and monitoring.
[0005] The first aspect of the present application provides a multimodal video understanding method based on a large language model, comprising: Obtain a video to be understood containing multimodal data; Performing feature extraction on the multimodal data of the video to be understood respectively, to obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into data in a preset format; the data in the preset format is structured information; The preset large language model generates and outputs the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt word.
[0006] Preferably, the extracting features of the multimodal data of the video to be understood comprises: Extracting key video frames of the video to be understood; A preset visual model is used to extract a first feature of a key video frame; the first feature includes a key object label, an action label, and a video frame description in the key video frame; Using a preset text recognition model to recognize text in the key video frame to obtain text information; Information extraction is performed on the text information to obtain a second feature.
[0007] Preferably, the extracting features from the multimodal data of the video to be understood further comprises: Extracting audio information of the video to be understood; Separating voice information from the audio information; A preset speech recognition model is used to perform dialogue role recognition and speech-to-text conversion on the speech information to obtain a third feature.
[0008] Preferably, the preset large language model generates the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt word, and outputs the result including: Inputting the preset format data into a preset large language model; Understanding the preset format data to generate a semantic representation of the video to be understood; Based on the semantic representation, the preset user question and the preset prompt words, the understanding result of the video to be understood is generated and outputted.
[0009] Preferably, the preset large language model is obtained by fine-tuning a pre-trained model based on preset instructions.
[0010] Preferably, the steps after the preset large language model generates the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt word and outputs it include: The understanding results are verified and optimized.
[0011] Preferably, the steps after obtaining the video to be understood containing multimodal data include: Verify the integrity of the video file to be understood and the correctness of the format.
[0012] A second aspect of the present application provides a multimodal video understanding device based on a large language model, comprising: An acquisition module, used for acquiring a video to be understood containing multimodal data; An extraction module is used to extract features of the video to be understood, and obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; an integration module, used for aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into data in a preset format; the data in the preset format is structured information; A result module is used to preset a large language model to generate and output the understanding result of the video to be understood according to the preset format data, preset user questions and preset prompt words.
[0013] A third aspect of the present application provides an electronic device, including: Processor; and The memory stores executable codes thereon, and when the executable codes are executed by the processor, the processor is caused to execute the method as described above.
[0014] A fourth aspect of the present application provides a computer-readable storage medium having executable code stored thereon. When the executable code is executed by a processor of an electronic device, the processor is caused to execute the method as described above.
[0015] The technical solution provided by the present application may include the following beneficial effects: The embodiment of the present application discloses a multimodal video understanding method based on a large language model, including: obtaining a video to be understood containing multimodal data; performing feature extraction on the multimodal data of the video to be understood respectively, to obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into preset format data; the preset format data is structured information, and a preset large language model is preset to generate and output an understanding result of the video to be understood according to the preset format data, preset user questions, and preset prompt words, which can fuse the multimodal data of the video, understand the video content more comprehensively and accurately, overcome the limitations of single modal information processing, and at the same time align and integrate the data based on timestamps to ensure the temporal consistency of the multimodal data and the structured output of the understanding result, which has higher practicality and is more intelligent in scenarios such as video search, recommendation, and monitoring.
[0016] The technical solution of the present application can also: combine with a large language model to perform deep semantic understanding and reasoning, convert video-related descriptions or embeddings into understandable text, and improve the efficiency and accuracy of video content analysis.
[0017] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other objects, features and advantages of the present application will become more apparent by describing in more detail the exemplary embodiments of the present application in conjunction with the accompanying drawings, wherein the same reference numerals generally represent the same components in the exemplary embodiments of the present application.
[0019] Figure 1 It is a flowchart of a multimodal video understanding method based on a large language model shown in an embodiment of the present application; Figure 2 is another flow chart of a multimodal video understanding method based on a large language model shown in an embodiment of the present application; Figure 3 is a flowchart of a multimodal video understanding method based on a large language model shown in an embodiment of the present application; Figure 4 is a structural diagram of a multimodal video understanding device based on a large language model shown in an embodiment of the present application; Figure 5 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0020] The embodiments of the present application will be described in more detail below with reference to the accompanying drawings. Although the embodiments of the present application are shown in the accompanying drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to fully convey the scope of the present application to those skilled in the art.
[0021] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.
[0022] It should be understood that although the terms "first", "second", "third", etc. may be used in this application to describe various information, this information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of this application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Thus, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of this application, the meaning of "multiple" is two or more, unless otherwise clearly and specifically defined.
[0023] In related technologies, the speech in the video is recognized and converted into text, and then the text is searched and combined with the video title text to calculate the cosine similarity to achieve high-level semantic understanding of the short video. Although this solution combines video and text information, it mainly compares the feature information of different modal data, and does not conduct a comprehensive analysis of different modal data.
[0024] In response to the above problems, the embodiments of the present application provide a multimodal video understanding method based on a large language model, which can integrate the multimodal data of the video to understand the video content more comprehensively and accurately, overcome the limitations of single modal information processing, and at the same time align and integrate data based on timestamps to ensure the temporal consistency of multimodal data and the structured output of the understanding results.
[0025] The technical solution of the embodiments of the present application is described in detail below with reference to the accompanying drawings.
[0026] Figure 1 It is a flowchart of a multimodal video understanding method based on a large language model shown in an embodiment of the present application.
[0027] See also Figure 1 , the method comprising: Step 101, obtaining a video to be understood containing multimodal data; Video understanding is a basic research problem in the field of computer vision, which aims to automatically identify and analyze the content in videos through intelligent technologies such as deep learning. It can be widely used in scenarios such as video content understanding, video search and recommendation, video analysis and monitoring.
[0028] In the embodiment of the present application, a video to be understood containing multimodal data is first obtained, and the multimodal data may include data in modes such as video, image, voice, and text. The format of the video to be understood may include multiple formats, such as MP4 (Moving Picture Experts Group 4), AVI (Audio Video Interleaved), MKV format, etc. The MIME (Multipurpose Internet Mail Extensions) type can be used to check the format of the video file.
[0029] Step 102, feature extraction is performed on the multimodal data of the video to be understood, to obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; By extracting the data of each modality in the video to be understood, the data of the video frame, text, audio and other modalities of the video to be understood can be obtained. The data of each modality is subjected to feature extraction, thereby obtaining the first feature of the video frame of the video to be understood, the second feature of the text of the video to be understood, and the third feature of the audio of the video to be understood. The first feature, the second feature, and the third feature have their own corresponding timestamps, which facilitates the subsequent integration of the data of each modality.
[0030] Step 103, aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into a preset format data; the preset format data is structured information; The Dynamic Time Warping (DTW) algorithm can be used to align the timestamps of the first, second, and third features. To facilitate subsequent data analysis and processing, after aligning the timestamps of each modal data feature, the first, second, and third features can be integrated into a preset format: JSON format data. JSON format data is a lightweight data exchange format that is easy for technicians to read and write, and is also easy for machines to parse and generate, and effectively improves network transmission efficiency.
[0031] Among them, the preset format data is structured information, including recognition data of video frames, audio, and text of the video to be understood. In one example, the preset format data may include the following information: Video title: Natural scenery travel; Video duration: 5 minutes; Key video frame 1 caption: People next to the waterfall; Key video frame 1 timestamp: 00:00:10; Audio transcription: Welcome to our natural scenery travel; Recognition text 1: Nature reserve-entrance; Recognition text 1 timestamp: 00:01:45; Background music: Classical instrumental music. The content of the preset format data in the above examples is only an example, and this application does not limit this. The content of the preset format data can be set according to the needs of the application scenario, thereby improving the efficiency of video content analysis.
[0032] Step 104 , the preset large language model generates and outputs the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt words.
[0033] Based on the preset format data, preset user questions and preset prompt words, the preset large language model can generate corresponding understanding results according to the application scenario and output the understanding results. This process adopts the form of multiple rounds of questions and answers and can be repeated. Among them, the preset prompt words can be obtained through fine-tuning or prompt engineering, and the preset user questions can be selected according to the actual needs of the user. The understanding result is the answer corresponding to the preset user question, and its output format may include text summary, question answer, event detection result, etc.
[0034] The embodiment of the present application discloses a multimodal video understanding method based on a large language model, comprising: obtaining a video to be understood containing multimodal data; performing feature extraction on the multimodal data of the video to be understood respectively, to obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into preset format data, wherein the preset format data is structured information; presetting a large language model to generate and output an understanding result of the video to be understood according to the preset format data, preset user questions, and preset prompt words, which can fuse the multimodal data of the video, understand the video content more comprehensively and accurately, overcome the limitations of single modal information processing, and at the same time align and integrate the data based on timestamps to ensure the temporal consistency of the multimodal data and the structured output of the understanding result, which has higher practicality and is more intelligent in scenarios such as video search, recommendation, and monitoring.
[0035] Figure 2This is another flow chart of a multimodal video understanding method based on a large language model shown in an embodiment of the present application.
[0036] See also Figure 2 , the method comprising: Step 201, obtaining a video to be understood containing multimodal data; In the embodiment of the present application, a video to be understood containing multimodal data is first obtained. The multimodal data may include data in the modes of video, image, voice, text, etc. The video to be understood can be obtained by formula (1): (1) in, For video, is the video frame, ,N is the number of video frames in the video to be understood.
[0037] In an optional embodiment of the present application, the steps after step 201 include: Step S1, verifying the integrity of the video file to be understood and the correctness of the format.
[0038] After obtaining the video to be understood, you can also verify the integrity of the video file and the correctness of the format. You can check the header information of the video file to determine the file format. When the file format is not supported, use the tool to convert the unsupported format to a supported format. Re-encapsulate the video stream into a different container, such as encapsulating AVI into MP4. You can also detect the file type, limit the file size, and handle exceptions such as file damage and unrecognizable file types.
[0039] Step 202, extracting key video frames of the video to be understood; In order to ensure the representativeness of the video content, video processing tools can be used to extract representative single-frame images from the video as key video frames based on the inter-frame difference method or key frame extraction technology. The extracted key video frames can be expressed by formula (2): (2) in, is a set of key frames, is a key frame, .
[0040] Step 203, using a preset visual model to extract a first feature of the key video frame; the first feature includes a key object label, an action label, and a video frame description in the key video frame; The preset visual model can be a pre-trained convolutional neural network, such as ResNet (residual network model), EfficientNet (efficiency network model), etc. The preset visual model is used to extract the first feature of the key video frame, identify and mark the key objects, scene types and actions of people or objects in the key video frame, and further generate video frame descriptions related to the content of the key video frame, which helps to provide richer semantic information for subsequent processing. First feature It can be extracted by formula (3): (3) in, The default visual model.
[0041] Step 204, using a preset text recognition model to recognize text in the key video frame to obtain text information; The preset text recognition model can be Tesseract (an open source optical character recognition engine), EAST (Efficient and Accurate Scene Text Detector), PaddleOCR (a Chinese OCR (optical character recognition) tool based on deep learning), etc. The preset text recognition model can detect text areas in key video frames, recognize them, and transcribe them into text information.
[0042] Step 205: extract information from the text information to obtain a second feature.
[0043] The preset text recognition model can process texts in different languages and fonts through OCR (Optical Character Recognition), extract important information from the text information, and thus obtain the second feature. It can be extracted by formula (4): (4) Among them, OCRModel is a text recognition model. In the process of extracting the second feature, image preprocessing technology, such as denoising and contrast enhancement, can also be combined to further improve the accuracy and efficiency of OCR recognition.
[0044] Step 206, extracting audio information of the video to be understood; Extracting the audio track channel from the video to be understood can obtain the audio information in the video to be understood.
[0045] Step 207, separating the voice information from the audio information; After obtaining the audio information, audio separation technology can be used to extract the audio spectrum information or mathematical features such as time-frequency diagram from the audio information, and separation algorithms such as independent component analysis (ICA) or deep learning models can be applied to decompose the mixed audio represented by the features into background music and voice information. After separating the background music and voice information, post-processing can also be performed to improve the sound quality and clarity.
[0046] Step 208, using a preset speech recognition model to perform dialogue role recognition and speech-to-text conversion on the speech information to obtain a third feature, wherein the first feature, the second feature, and the third feature have corresponding timestamps; The preset speech recognition model may be DeepSpeech (deep speech recognition model), wav2vec (deep learning model for automatic speech recognition), whisper (multilingual speech recognition model), etc. The preset speech recognition model can transcribe speech information into text, can handle multiple languages and accents, and has good noise resistance. During the speech recognition process, speaker diarization technology can also be used to identify and distinguish speech segments of different dialogue characters in the video, thereby improving the accuracy and readability of text transcription. By using the preset speech recognition model to perform dialogue role recognition and speech-to-text conversion on the speech information, a third feature can be obtained. The third feature contains dialogue role information and speech-to-text recognition results. The first feature, the second feature, and the third feature each have their corresponding timestamps. The third feature It can be extracted by formula (5): (5) in, The audio information of the video. A speech recognition model.
[0047] Step 209, aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into data in a preset format; The dynamic time warping (DTW) algorithm can be used to align the timestamps of the first feature, the second feature, and the third feature. In order to facilitate the subsequent analysis and processing of the data, after aligning the timestamps of the features of each modal data, the first feature, the second feature, and the third feature can be integrated into a preset format data: JSON format data. JSON format data is a lightweight data exchange format that is easy for people to read and write, and is also easy for machines to parse and generate, and effectively improves network transmission efficiency. The preset format data T can be extracted using formula (6): (6) Among them, DataIntegration is the data integration module.
[0048] The preset format data obtained after integration is structured information, including recognition data of video frames, audio, and text of the video to be understood. In one example, the preset format data may include the following information: Video title: Natural scenery travel; Video duration: 5 minutes; Key video frame 1 caption: People next to the waterfall; Key video frame 1 timestamp: 00:00:10; Audio transcription: Welcome to our natural scenery travel; Recognition text 1: Nature reserve-entrance; Recognition text 1 timestamp: 00:01:45; Background music: Classical instrumental music. The content of the preset format data in the above examples is only an example, and this application does not limit this. The content of the preset format data can be set according to the needs of the application scenario, thereby improving the efficiency of video content analysis.
[0049] Step 2010, inputting the preset format data into the preset large language model; The preset large language model may be a pre-trained large language model such as GPT-4o, Claude3, BERT (Bidirectional Encoder Representations from Transformers, bidirectional encoder representation model), etc. After the preset format data is integrated, the preset format data may be input into the preset large language model.
[0050] Step 211, understanding the preset format data and generating a semantic representation of the video to be understood; The preset large language model performs deep understanding and reasoning on the preset format data, and can generate a semantic representation of the video to be understood. In one example, if the video to be understood is a video about a basketball game, its semantic representation may include identifying the players, baskets, and basketballs on the basketball court, analyzing the players' movement trajectories and actions, detecting scoring events, inferring the audience's emotional reactions, and so on.
[0051] In an optional embodiment of the present application, the preset large language model is obtained by fine-tuning the pre-trained model based on preset instructions.
[0052] The preset instructions can be manually annotated or an existing open source instruction data set. During the training phase, according to the user's task requirements, the preset instructions can be used to fine-tune the pre-trained model, fine-tune the parameters or structure of the model, such as adding a specific input layer or adjusting the output layer, so as to obtain a preset large language model. When fine-tuning the pre-trained model, the weights of the pre-trained model are used as a starting point for additional training on the new data set. The back propagation algorithm can be used to adjust the weights of the model to make it more suitable for new tasks. Pre-trained models are usually trained on large-scale data and have a wide range of language understanding capabilities. However, each specific task may have its own specific data patterns and task requirements. Fine-tuning can help the model better adapt to these specific data and task backgrounds. Through fine-tuning, the model can learn how to use video instruction data more effectively, thereby improving the reasoning ability and accuracy on specific video tasks (such as question answering and event detection), and ensuring the accuracy and practicality of the output results.
[0053] Step 2012: Generate and output the understanding result of the video to be understood based on the semantic representation, the preset user question and the preset prompt words.
[0054] Based on semantic representation, preset user questions and preset prompt words, the corresponding understanding results can be generated according to the application scenario and output. This process adopts the form of multiple rounds of questions and answers and can be repeated. The understanding result is the answer corresponding to the preset user question, and its output format may include text summary, question answer, event detection result, etc. The understanding result O can be generated by formula (7): (7) in A large language model fine-tuned for instructions, where Q is the preset user question and P is the preset prompt word.
[0055] In an optional embodiment of the present application, the steps after step 2012 include: Step S2, verifying and optimizing the understanding results.
[0056] The generated understanding results can be verified and optimized. When verifying, cross-validation can be used to deploy multiple models and process the same data set to analyze and compare the output results. Or external data sources can be introduced for comparative verification. When optimizing, rule-based post-processing steps can be introduced to correct obvious errors or integrate the outputs of multiple algorithms and models.
[0057] Figure 3 This is a flowchart of a multimodal video understanding method based on a large language model shown in an embodiment of the present application.
[0058] See also Figure 3 , the method comprising: Step 301, input video; Videos include multimodal data such as video frames, audio, text, and video.
[0059] Step 302, extracting key video frames; Video processing tools are used to extract representative single-frame images from the video as key video frames based on the inter-frame difference method or key frame extraction technology.
[0060] Step 303, using a preset visual model to identify key video frames; Step 304, key object detection; Perform key object detection on key video frames; Step 305, generating key object identification tags: timestamp-object coordinates-object category; Step 306, performing action recognition on the key video frames; Perform action recognition on key video frames; Step 307, generating an action tag: timestamp-action category; Step 308, video frame description; Performing video frame description on key video frames; Step 309, generating a video frame description: timestamp-video frame description; Step 3010, a preset text recognition model recognizes text in a key video frame; Step 3011, text detection; Perform text detection on the text; Step 3012, text recognition; Perform text recognition on the text; Step 3013, generating text recognition results: timestamp-text box coordinates-text recognition results; Step 3014, extracting the audio information and separating the voice information from the audio information; Step 3015, the preset speech recognition model recognizes the speech information; Step 3016, voice to text conversion; Convert voice information into text; Step 3017, generating a speech recognition result: timestamp-speech recognition result; Step 3018, identifying dialogue roles; Conduct dialogue role recognition on voice information; Step 3019, generating a dialogue role recognition result: timestamp-dialogue role; Step 3020, integrating the recognition results to generate data in a preset format; The recognition results are integrated by using the methods of timestamp alignment and data format conversion; Step 3021, inputting the preset format data, the preset user question and the preset prompt word into the preset large language model; Step 3022, generate understanding results.
[0061] Generate understanding results based on preset format data, preset user questions and preset prompt words.
[0062] Step 3023, output the understanding result.
[0063] The embodiment of the present application discloses a multimodal video understanding method based on a large language model, including: obtaining a video to be understood containing multimodal data, extracting key video frames of the video to be understood, and using a preset visual model to extract a first feature of the key video frame; the first feature includes key object labels, action labels, and video frame descriptions in the key video frame, using a preset text recognition model to recognize text in the key video frame to obtain text information, performing information extraction on the text information to obtain a second feature, extracting audio information of the video to be understood, separating voice information from the audio information, using a preset voice recognition model to perform dialogue role recognition and voice-to-text conversion on the voice information to obtain a third feature, wherein the first feature, the second feature, and the third feature have corresponding timestamps, aligning the timestamps of the first feature, the second feature, and the third feature, and converting the first feature, the second feature, and the third feature into text. The second feature and the third feature are integrated into preset format data, which is structured information. The preset format data is input into a preset large language model, and the preset format data is understood to generate a semantic representation of the video to be understood. Based on the semantic representation, preset user questions and preset prompt words, the understanding result of the video to be understood is generated and output. The multimodal data of the video can be integrated to understand the video content more comprehensively and accurately, overcoming the limitations of single modal information processing. At the same time, the data is aligned and integrated based on timestamps to ensure the temporal consistency of multimodal data and the structured output of the understanding results. It has higher practicality and is more intelligent in scenarios such as video search, recommendation and monitoring. It combines a large language model for deep semantic understanding and reasoning, and converts video-related descriptions or embeddings into understandable text, thereby improving the efficiency and accuracy of video content analysis.
[0064] Corresponding to the aforementioned application function implementation method embodiment, the present application also provides a multimodal video understanding device, electronic device and corresponding embodiments based on a large language model.
[0065] Figure 4 It is a structural diagram of a multimodal video understanding device based on a large language model shown in an embodiment of the present application.
[0066] See also Figure 4 , the device comprises: An acquisition module 401 is used to acquire a video to be understood containing multimodal data; An extraction module 402 is used to extract features of the video to be understood, and obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; An integration module 403 is used to align the timestamps of the first feature, the second feature, and the third feature, and integrate the first feature, the second feature, and the third feature into a preset format data; the preset format data is structured information; The result module 404 is used to preset a large language model to generate and output the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt words.
[0067] In an optional embodiment of the present application, the extraction module 402 includes: A first extraction submodule is used to extract key video frames of the video to be understood; A first feature submodule is used to extract a first feature of a key video frame using a preset visual model; the first feature includes a key object label, an action label, and a video frame description in the key video frame; A text recognition submodule is used to recognize text in key video frames using a preset text recognition model to obtain text information; The second feature submodule is used to extract information from the text information to obtain the second feature.
[0068] In an optional embodiment of the present application, the extraction module 402 further includes: The second extraction submodule is used to extract the audio information of the video to be understood; A separation submodule, used to separate voice information from audio information; The third feature submodule is used to use a preset speech recognition model to perform dialogue role recognition and speech-to-text conversion on the speech information to obtain the third feature.
[0069] In an optional embodiment of the present application, the result module 404 includes: An input submodule, used to input data in a preset format into a preset large language model; The semantic submodule is used to understand the preset format data and generate the semantic representation of the video to be understood; The result submodule is used to generate and output the understanding result of the video to be understood based on the semantic representation, preset user questions and preset prompt words.
[0070] In an optional embodiment of the present application, the device further includes: The optimization submodule is used to verify and optimize the understanding results.
[0071] In an optional embodiment of the present application, the device further includes: The verification submodule is used to verify the integrity of the video file to be understood and the correctness of the format.
[0072] The embodiment of the present application discloses a multimodal video understanding device based on a large language model, which can integrate the multimodal data of a video, understand the video content more comprehensively and accurately, overcome the limitations of single-modal information processing, and at the same time align and integrate data based on timestamps to ensure the temporal consistency of multimodal data and the structured output of understanding results. It has higher practicality and is more intelligent in scenarios such as video search, recommendation, and monitoring. It combines a large language model for deep semantic understanding and reasoning, converts video-related descriptions or embeddings into understandable text, and improves the efficiency and accuracy of video content analysis.
[0073] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated again here.
[0074] Figure 5 It is a schematic diagram of the structure of an electronic device shown in an embodiment of the present application.
[0075] See also Figure 5 , the electronic device 500 includes a memory 510 and a processor 520 .
[0076] The processor 520 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc.
[0077] The memory 510 may include various types of storage units, such as system memory, read-only memory (ROM), and permanent storage devices. Among them, ROM can store static data or instructions required by the processor 520 or other modules of the computer. The permanent storage device may be a readable and writable storage device. The permanent storage device may be a non-volatile storage device that does not lose the stored instructions and data even after the computer is powered off. In some embodiments, the permanent storage device uses a large-capacity storage device (such as a magnetic or optical disk, flash memory) as a permanent storage device. In some other embodiments, the permanent storage device may be a removable storage device (such as a floppy disk, optical drive). The system memory may be a readable and writable storage device or a volatile readable and writable storage device, such as a dynamic random access memory. The system memory may store some or all instructions and data required by the processor at runtime. In addition, the memory 510 may include any combination of computer-readable storage media, including various types of semiconductor storage chips (such as DRAM, SRAM, SDRAM, flash memory, programmable read-only memory), and disks and / or optical disks may also be used. In some embodiments, the memory 510 may include a readable and / or writable removable storage device, such as a laser disc (CD), a read-only digital versatile disc (such as a DVD-ROM, a double-layer DVD-ROM), a read-only Blu-ray disc, an ultra-density optical disc, a flash memory card (such as an SD card, a mini SD card, a Micro-SD card, etc.), a magnetic floppy disk, etc. Computer-readable storage media do not include carrier waves and transient electronic signals transmitted wirelessly or wired.
[0078] The memory 510 stores executable codes, and when the executable codes are processed by the processor 520 , the processor 520 can execute part or all of the methods described above.
[0079] In addition, the method according to the present application may also be implemented as a computer program or a computer program product, which includes computer program code instructions for executing some or all of the steps in the above method of the present application.
[0080] Alternatively, the present application can also be implemented as a computer-readable storage medium (or non-transitory machine-readable storage medium or machine-readable storage medium) on which executable code (or computer program or computer instruction code) is stored. When the executable code (or computer program or computer instruction code) is executed by a processor of an electronic device (or server, etc.), the processor executes part or all of the steps of the above-mentioned method according to the present application.
[0081] The embodiments of the present application have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A multimodal video understanding method based on a large language model, characterized by: Obtain a video to be understood containing multimodal data; Performing feature extraction on the multimodal data of the video to be understood respectively, to obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into data in a preset format; the data in the preset format is structured information; The preset large language model generates and outputs the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt word.
2. The method according to claim 1, characterized in that The extracting features of the multimodal data of the video to be understood comprises: Extracting key video frames of the video to be understood; A preset visual model is used to extract a first feature of a key video frame; the first feature includes a key object label, an action label, and a video frame description in the key video frame; Using a preset text recognition model to recognize text in the key video frame to obtain text information; Information extraction is performed on the text information to obtain a second feature.
3. The method according to claim 1, characterized in that The extracting features of the multimodal data of the video to be understood also includes: Extracting audio information of the video to be understood; Separating voice information from the audio information; A preset speech recognition model is used to perform dialogue role recognition and speech-to-text conversion on the speech information to obtain a third feature.
4. The method according to claim 1, characterized in that The preset large language model generates the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt word, and outputs the result including: Inputting the preset format data into the preset large language model; Understanding the preset format data to generate a semantic representation of the video to be understood; Based on the semantic representation, the preset user question and the preset prompt words, the understanding result of the video to be understood is generated and outputted.
5. The method according to claim 1 or 4, characterized in that: The preset large language model is obtained by fine-tuning the pre-trained model based on preset instructions.
6. The method according to claim 1, characterized in that The steps after the preset large language model generates and outputs the understanding result of the video to be understood according to the preset format data, the preset user question and the preset prompt word include: The understanding results are verified and optimized.
7. The method according to claim 1, characterized in that The steps after obtaining the video to be understood containing multimodal data include: Verify the integrity of the video file to be understood and the correctness of the format.
8. A multimodal video understanding device based on a large language model, characterized in that: An acquisition module, used for acquiring a video to be understood containing multimodal data; An extraction module is used to extract features of the video to be understood, and obtain a first feature of a video frame of the video to be understood, a second feature of a text of the video to be understood, and a third feature of an audio of the video to be understood; wherein the first feature, the second feature, and the third feature have corresponding timestamps; an integration module, used for aligning the timestamps of the first feature, the second feature, and the third feature, and integrating the first feature, the second feature, and the third feature into data in a preset format; the data in the preset format is structured information; A result module is used to preset a large language model to generate and output the understanding result of the video to be understood according to the preset format data, preset user questions and preset prompt words.
9. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having executable codes stored thereon, which, when executed by a processor of an electronic device, causes the processor to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Question and answer method and device for knowledge in field of literature and blog, equipment and medium
CN117216194A
Video analysis method and device based on time boundary perception and large language model
CN117636217A
Multi-modal video question answering method and device and computer equipment
CN118194230A
Intelligent cataloging method for all-media news based on multi-modal information fusion understanding
US20220270369A1
Multimodal heterogeneous feature fusion-based compact video event description method
WO2023050295A1
Cited By
Athletic contest commentary generation method based on large language model
CN119421013A
Video content analysis method based on self-supervised learning and related device
CN119600519A
A video content analysis method based on self-supervised learning and related device
CN119600519B
Video content understanding method of multi-mode advertisement inventory intelligent matching system
CN120388324A
Video content understanding method for multimodal advertising inventory intelligent matching system
CN120388324B
