Video processing method and device, electronic equipment, storage medium and program product
The target picture and text are generated through the content generation model, which solves the problem of unreasonable layout of picture and text in video to picture and text, improves the readability and distribution effect of picture and text content, and improves the video processing experience.
Patent Information
- Application Number
- CN202411171700.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-13
AI Technical Summary
In the existing video to graphics and text methods, the layout of the graphics and text content is unreasonable, resulting in poor readability and distribution effects of graphics and text content.
By receiving video processing requests, obtaining target videos, and using the content generation model to generate target graphics and texts based on video content and target prompt information, ensuring the reasonable layout of graphics and texts, improving readability and distribution effects.
Improve the readability and distribution effect of graphic content and improve the video processing experience.
Smart Images

Figure CN119135953A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to computer application technology, and more particularly to a video processing method, device, electronic device, storage medium, and program product. Background Art
[0002] In the current content distribution track, we are facing the trend of accelerating videoization. The production volume of video content has an order of magnitude advantage over graphic content. However, graphic content is highly readable, and the required information can be obtained through quick browsing. In addition, the ability to disseminate knowledge is relatively strong. Graphic content can display complex information and data in detail, and enhance understanding through charts, tables, etc., making it easier to understand and remember. Therefore, for comprehensive content platforms, increasing the supply of graphic content by converting videos to graphics is an important exploration direction for improving the distribution effect of graphic content.
[0003] In the related art, when converting video to text, the image selection is usually based on random frame sampling, and the selected image is randomly added to the text content. Based on the above method, the layout of the image and text content may be unreasonable, which makes the readability of the converted text content poor and the text display effect poor, thus affecting the distribution effect of the text content. Summary of the invention
[0004] The present disclosure provides a video processing method, device, electronic device, storage medium and program product to achieve the effect of converting a video into graphics and text that meet the expected effect based on a content generation model, thereby improving the readability of the graphic content and improving the display and distribution effects of the graphic content.
[0005] In a first aspect, an embodiment of the present disclosure provides a video processing method, the method comprising:
[0006] Receiving a video processing request, and acquiring a target video corresponding to the video processing request, wherein the target video includes at least a plurality of video frames;
[0007] Generate target graphics and text according to the video content of the target video, the content generation model and the target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
[0008] In a second aspect, an embodiment of the present disclosure further provides a video processing device, the device comprising:
[0009] A video acquisition module, configured to receive a video processing request and acquire a target video corresponding to the video processing request, wherein the target video includes at least a plurality of video frames;
[0010] A graphic and text generation module is used to generate target graphics and text according to the video content of the target video, a content generation model and target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
[0011] In a third aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:
[0012] one or more processors;
[0013] a storage device for storing one or more programs,
[0014] When the one or more programs are executed by the one or more processors, the one or more processors implement the video processing method as described in any one of the embodiments of the present disclosure.
[0015] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the video processing method as described in any one of the embodiments of the present disclosure.
[0016] In a fifth aspect, an embodiment of the present disclosure further provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the video processing method described in any embodiment of the present invention is implemented.
[0017] The technical solution of the disclosed embodiment receives a video processing request, obtains a target video including multiple video frames corresponding to the video processing request, and triggers the acquisition of the target video and the execution of subsequent video-to-text conversion operations through simple interaction; further, generates target text and graphics according to the video content of the target video, a content generation model, and target prompt information corresponding to the content generation model, thereby solving the problem of poor readability and distribution effect of graphic and text content due to unreasonable layout of accompanying pictures and text content in related technologies, and realizes the effect of converting videos into graphics and text that meet the expected effect based on the content generation model, thereby improving the readability of graphic and text content, improving the display effect and distribution effect of graphic and text content, and improving the video processing experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.
[0019] Figure 1 A schematic diagram of a flow chart of a video processing method provided by an embodiment of the present disclosure;
[0020] Figure 2 A flowchart of another video processing method provided by an embodiment of the present disclosure;
[0021] Figure 3 A schematic diagram of a video processing flow provided by an embodiment of the present disclosure;
[0022] Figure 4 A schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0024] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0025] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0026] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0027] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0028] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0029] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0030] It is understandable that before using the technical solutions disclosed in the embodiments of the present disclosure, the types, scope of use, usage scenarios, etc. of the personal information involved in the present disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.
[0031] For example, in response to receiving an active request from a user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application, server, or storage medium that performs the operation of the technical solution of the present disclosure according to the prompt message.
[0032] As an optional but non-limiting implementation, in response to receiving an active request from the user, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. In addition, the pop-up window may also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0033] It is understandable that the above notification and the process of obtaining user authorization are merely illustrative and do not constitute a limitation on the implementation of the present disclosure. Other methods that meet the relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0034] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws, regulations and relevant provisions.
[0035] Figure 1 A flow chart of a video processing method provided in an embodiment of the present disclosure is provided. The embodiment of the present disclosure is applicable to the situation of converting a target video into a target image and text. The method can be executed by a video processing device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.
[0036] like Figure 1 As shown, the method of this embodiment may specifically include:
[0037] S110: Receive a video processing request, and obtain a target video corresponding to the video processing request, wherein the target video includes at least a plurality of video frames.
[0038] Among them, the video processing request can be understood as an instruction for requesting video processing. The video processing request can include multiple input methods. Optionally, when a trigger operation for a preset video processing control is detected, it can be determined that the video processing request is received; or, when the received audio information is detected to include a trigger word associated with video processing, it can be determined that the video processing request is received; or, when a preset video processing instruction is received, it can be determined that the video processing request is received. The video processing instruction can be a string consisting of at least one character and / or a key combination consisting of at least one key, etc. The target video can be understood as a video to be processed. The target video can include multiple video frames. Optionally, the target video can be a default template video; or, it can also be a video collected based on a terminal device; or, it can also be a video obtained from a target storage space (such as a video library of an application software, or a local terminal album, etc.) in response to a selected trigger operation; it can also be a video uploaded from an external device, etc. The terminal device can be an electronic device with a video shooting function such as a camera, a smart phone, and a tablet computer.
[0039] It should be noted that, in addition to including multiple video frames, the target video may also include audio data and / or other multimedia data associated with the audio data. Optionally, when the target video includes audio data, the included audio data may be interactive audio data output by the target object included in the target video; or, it may be explanatory audio data for explaining the video frames in the target video; or, it may be background audio data included in the target video, etc. Other multimedia data associated with the audio data may be text information associated with the audio data. For example, when the audio data included in the target video is interactive audio data output by the target object included in the target video, the text information associated with the audio data may be subtitles associated with the interactive audio data.
[0040] In the embodiment of the present disclosure, when a video processing request is received, the video processing request is responded to, and then the target video can be acquired based on the video processing request.
[0041] As an optional implementation of an embodiment of the present disclosure, when a trigger operation for a preset video processing control is detected, it can be determined that a video processing request has been received. Then, in response to the video processing request, a video upload path selection page can be popped up, and the selection page can include at least three video upload paths such as local terminal albums, video libraries, and third-party uploads. Further, when a selection trigger operation for any video upload path is detected, a video display page corresponding to the video upload path can be displayed, and the video display page can include multiple videos to be uploaded associated with the video upload path, and a selection trigger operation can be selected from the displayed multiple videos to be uploaded. Further, when a selection trigger operation for at least one video to be uploaded is detected, the selected at least one video to be uploaded can be used as an uploaded video. Then, when a selection completion operation is detected (for example, triggering a selection confirmation control or clicking a blank area in the terminal device screen, etc.), the uploaded video can be uploaded as a target video.
[0042] As another optional implementation of the disclosed embodiment, when a trigger operation for a preset video processing control is detected, it can be determined that a video processing request has been received. Then, in response to the video processing request, a shooting interface is entered, and at this time, the screen content displayed in the shooting interface is the screen content in the video area of the shooting device. Further, when a video shooting operation is detected, the shooting device can be used to shoot the screen displayed in the current shooting interface, and the captured video is used as the target video.
[0043] S120 , generating target graphics and text according to the video content of the target video, the content generation model, and the target prompt information corresponding to the content generation model.
[0044] Among them, the video content can be understood as the content displayed according to the multimedia information included in the video. Optionally, the video content can include content displayed according to the video frame, content displayed according to the audio data and / or content displayed according to the text information, etc. The video content is a plurality of video frames or a plurality of video frames and audio data. The content generation model can be understood as a model that generates target content that meets the content requirements according to the input object. The target prompt information can be used to guide the model to perform a specific task or generate a corresponding output. The target prompt information can be used to help the model understand the processing intention more accurately and generate an output that is more in line with the expected effect. The target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model. The processing information can be used to indicate the processing requirements for processing the video content. The processing information can be used to guide the model to process the video content according to the corresponding processing requirements. The expected presentation information can be used to indicate the final presentation effect of the content generated by the content generation model. The expected presentation information may include the standards that the content generated by the content generation model must meet. The content generation model is used to process the video content according to the target prompt information to generate content that meets the expected presentation information. The target graphic can be understood as graphic content converted from the information expressed in the target video. It can be understood that graphic refers to a content form that includes images and text, which is very common in various media and interactive platforms. Graphic content can convey information more effectively by combining visual elements (such as images) and text elements. Graphic content is highly readable, which facilitates quick viewing of the displayed information. You can quickly browse the displayed graphic content to quickly obtain the required information. In addition, graphic content has a better knowledge dissemination effect, can display complex information and data in detail, enhance understanding through charts, tables, etc., and facilitate understanding and memory of the content.
[0045] In this embodiment, the content generation model can be obtained by training the deep learning model through sample prompt information and sample video. The content generation model can be a generative deep learning model, such as a diffusion model. It should be noted that before applying the content generation model provided by the embodiment of the present disclosure, the pre-constructed deep learning model can be trained in a supervised or unsupervised manner. Before training the deep learning model, multiple training samples can be constructed to train the model based on the training samples. In order to improve the accuracy of the content generation model, as many and rich training samples as possible can be constructed. Optionally, the training process of the content generation model can be: obtaining multiple training samples; wherein the training samples include sample videos, sample prompt information and expected effect graphics; for each training sample, the sample video and sample prompt information in the training sample are input into the pre-constructed deep learning model, and the actual output graphics are obtained; based on the actual output graphics and the expected effect graphics in the training sample, the loss value is determined; based on the loss value, the model parameters in the deep learning model are corrected, and the convergence of the loss function in the deep learning model is used as the training target, so that the trained deep learning model is used as the content generation model.
[0046] As an optional implementation of the first embodiment of the present disclosure, when a target video is obtained, the processing information of the video content of the target video and / or the expected presentation information of the content generated by the content generation model can be determined, and the target prompt information corresponding to the target video can be determined based on the processing information and / or the expected presentation information. Further, the target video and the target prompt information can be input into the content generation model to process the target video based on the target prompt information based on the content generation model, and output the content generation result. Furthermore, the content generation result can be used as the target graphic.
[0047] The technical solution of the disclosed embodiment, by receiving a video processing request, obtains a target video including multiple video frames corresponding to the video processing request, and triggers the acquisition of the target video and the execution of subsequent video-to-text operations through simple interaction; further, the target text is generated according to the video content of the target video, the content generation model and the target prompt information corresponding to the content generation model, thereby solving the problem of poor readability and distribution effect of the text and image content due to the unreasonable layout of the accompanying pictures and text content in the related art, and realizing the effect of converting the video into text and image that meets the expected effect according to the content generation model, thereby improving the readability of the text and image content, improving the display effect and distribution effect of the text and image content, and improving the video processing experience.
[0048] Figure 2A flowchart of another video processing method provided by an embodiment of the present disclosure. The technical solution of this embodiment is based on the above embodiment, determines the video text according to the video content of the target video, and generates the target graphic according to the video text, the content generation model and the target prompt information corresponding to the content generation model. The specific implementation method can be found in the description of this embodiment. Among them, the technical features that are the same or similar to the above embodiments are not repeated here.
[0049] like Figure 2 As shown, the method of this embodiment may specifically include:
[0050] S210: Receive a video processing request, and obtain a target video corresponding to the video processing request, wherein the target video includes at least a plurality of video frames.
[0051] S220, determining a video text according to the video content of the target video, and generating a target graphic text according to the video text, a content generation model, and target prompt information corresponding to the content generation model.
[0052] Among them, video text can be understood as the original text information directly identified from the target video. Video text can be unstructured text, that is, text data without a fixed format and predefined structure. The text content in the video text may include redundant information that is irrelevant to the substantive content. Exemplarily, the redundant information included in the video text may include frame information and / or duration information, etc. It should be noted that the video text may be text information obtained after text recognition of the video content of the target video. Optionally, in the case where the target video does not include audio data, the video text only includes text determined based on the image content of the target video; and / or, in the case where the target video includes audio data, the video text includes text determined based on the image content of the target video and text determined based on the audio data.
[0053] In the embodiment of the present disclosure, when a target video is acquired, text recognition may be performed on the video content of the target video to obtain a video text corresponding to the video content of the target video.
[0054] In the embodiment of the present disclosure, when the target video includes audio data and when the target video does not include audio data, there are certain differences in the process of determining the corresponding video text, and these two situations will be described separately below.
[0055] Optionally, when the target video does not include audio data, the video text is determined based on image contents of multiple video frames of the target video.
[0056] The image content may be understood as the content included in the video frame. Optionally, the image content may at least include characters in the video frame.
[0057] As an optional implementation of an embodiment of the present disclosure, when the target video does not include audio data, character recognition can be performed on multiple video frames of the target video according to a preset character recognition method. Furthermore, the recognized characters can be used as video text corresponding to the target video. Among them, the character recognition method can be any method that can recognize the characters included in the image, and optionally, it can be an optical character recognition method. The advantage of this setting is that, when the target video does not include audio data, text recognition can be performed on the target video to obtain the effect of video text.
[0058] Optionally, when the target video includes audio data, the first text is determined according to image content of multiple video frames of the target video, the second text is determined according to the audio data, and the video text is determined according to the first text and the second text.
[0059] The first text may be understood as text obtained by recognizing characters included in a plurality of video frames, and the second text may be understood as text obtained by performing speech recognition on audio data.
[0060] As an optional implementation of an embodiment of the present disclosure, when the target video includes audio data, character recognition can be performed on multiple video frames of the target video according to a preset character recognition method, and the recognized characters can be used as the first text. In addition, speech recognition can be performed on the audio data according to a preset audio recognition method, and the recognized text can be used as the second text. Further, the first text and the second text can be combined together, and the combined text can be used as the video text corresponding to the target video. Among them, the audio recognition method can be any method that can convert the voice information in the audio into text information, and optionally, it can be an automatic speech recognition method, etc. The advantage of such a setting is that, when the target video includes audio data, speech recognition and text recognition can be performed on the target video to obtain the effect of video text.
[0061] It should be noted that the benefit of obtaining video text based on corresponding methods in the above two cases is that it enriches the video text acquisition method, expands the range of videos that can be converted into text and pictures, and thus enhances the flexibility of the video to text and picture conversion method.
[0062] In the embodiment of the present disclosure, when a video text is obtained, a target graphic can be generated according to the video text, a content generation model, and target prompt information corresponding to the content generation model.
[0063] It should be noted that the video text obtained after performing text recognition on the video content of the target video may contain redundant information irrelevant to the text content. Furthermore, the video text obtained after recognition can be processed to obtain a text that meets the expected effect.
[0064] In the disclosed embodiment, a text that meets the expected effect can be obtained by structuring the video text. In the case of obtaining a video text corresponding to a target video, the text content in the video text can be structured according to a preset text structuring method to obtain the target text. The advantage of such a setting is that by converting unstructured text into structured text, the effect of facilitating subsequent processing and analysis of the text is achieved, and the target image and text finally obtained can be made more orderly, coherent and easy to understand. Among them, the text structuring method can be any method that can convert unstructured text into structured text, optionally including processing the unstructured text according to a text generation model, text cleaning and preprocessing (including text segmentation), entity and relationship extraction based on predefined structured information, and text semantic recognition.
[0065] Optionally, the content generation model includes a text generation model; generating target graphics and text based on the video text, the content generation model, and target prompt information corresponding to the content generation model, including: determining the target prompt information corresponding to the video text, inputting the target prompt information and the video text into the text generation model to obtain the target text; determining the target image based on the target text, and generating the target graphics and text based on the target text and the target image.
[0066] Among them, the target text can be understood as text information extracted from the target video and having a certain format and structure. The target prompt information can be used to guide the model to perform a specific task or generate a corresponding output. The target prompt information can be used to help the model understand the processing intention more accurately and generate an output that is more in line with the expected effect. The target prompt information is used to prompt the processing information of the video text and / or the expected presentation information of the target text. The processing information can be used to indicate the processing requirements for processing the video text. The processing information can be used to guide the model to perform structural processing on the video text according to the corresponding processing requirements. Exemplarily, the processing information can be "converting the input video text into a structured paragraph format and removing the frame information and duration information therein." The expected presentation information can be used to indicate the final presentation effect of the target text. The expected presentation information can include the standards that the target text must meet. Exemplarily, the expected presentation information can be "clear, easy to read, and keep the original meaning unchanged; have clear structural information, and output structure separators." The text generation model is used to perform structural processing on the text content in the video text according to the target prompt information. The text generation model can be a sub-model integrated in the content generation model.
[0067] In the disclosed embodiment, the target prompt information can be determined according to a plurality of prompt information determination methods. Optionally, determining the target prompt information includes: retrieving preset template prompt information, and using the retrieved template prompt information as the target prompt information; and / or, receiving input processing information of the video text and / or expected presentation information of the target text, and determining the target prompt information according to the processing information and / or the expected presentation information; and / or, generating the target prompt information according to a pre-trained prompt information generation model.
[0068] It should be noted that, in the case where the target prompt information can be used for processing information of the video text and / or expected presentation information of the target text, the target prompt information based on which different video texts are structured can be the same. Furthermore, template prompt information associated with text structure processing can be pre-set, so that when the video text to be processed is structured, the preset template prompt information can be directly called as the target prompt information.
[0069] In the embodiment of the present disclosure, the text generation model can be obtained by training the deep learning model through sample prompt information and sample text. Similarly, the text generation model can be a deep learning model that can be used to generate text data, such as a diffusion model. It should be noted that before applying the text generation model provided by the embodiment of the present disclosure, the pre-constructed deep learning model can be trained in a supervised or unsupervised manner. Before training the deep learning model, multiple training samples can be constructed to train the model based on the training samples. In order to improve the accuracy of the text generation model, as many and rich training samples as possible can be constructed. Optionally, the training process of the text generation model can be: obtaining multiple training samples; wherein the training samples include sample text, sample prompt information and expected effect text; for each training sample, the sample text and sample prompt information in the training sample are input into the pre-constructed deep learning model, and the actual output text is obtained; based on the actual output text and the expected effect text in the training sample, the loss value is determined; based on the loss value, the model parameters in the deep learning model are corrected, and the convergence of the loss function in the deep learning model is used as the training target, so that the trained deep learning model is used as the text generation model.
[0070] As an optional implementation of the first embodiment of the present disclosure, target prompt information can be determined. Furthermore, the target prompt information and the video text can be input into a text generation model. Then, the video text can be structured based on the processing information of the video text in the target prompt information based on the text generation model, and the video text can be processed into a target text that meets the expected presentation effect based on the expected presentation information of the target text in the target prompt information. The advantage of such a setting is that the effect of structuring unstructured text according to the text generation model is achieved, thereby improving the efficiency and accuracy of text structuring processing, and thereby improving the graphic display effect of the target graphic.
[0071] In the embodiment of the present disclosure, when the target text is obtained, a target image can be generated according to the target text. Furthermore, a target graphic can be generated according to the target text and the target image.
[0072] The target image may be a video frame in the target video that can represent at least part of the text content of the corresponding paragraph. It should be noted that the target image may be a video frame extracted according to a preset video frame extraction rule. Optionally, the video frame extraction rule may include random extraction, extraction based on the degree of match between the video frame and the text content of the corresponding paragraph, or extraction based on the video frame quality of the video frame, etc.
[0073] In the disclosed embodiment, a target image can be generated based on the target text according to a preset image generation method. The preset image generation method can be any method that can generate an image based on text. Optionally, the text is processed according to a text generation model to generate a target image; or, video frames are extracted from a target video according to a preset video frame extraction rule and the target text as the target image, etc.
[0074] Optionally, the content generation model may further include an image generation model; determining the target image according to the target text includes: inputting the target text into the image generation model to obtain a target image corresponding to the target text.
[0075] The image generation model may be a neural network model that takes text as an input object to generate a corresponding image based on the text. In the disclosed embodiment, the text generation model and the image generation model may be integrated into the content generation model at the same time. Furthermore, when a target text is generated based on the text generation model, the target text may be input into the image generation model to obtain a target image.
[0076] In this embodiment, the image generation model can be obtained by training the neural network model with sample text and expected effect image. It should be noted that before applying the image generation model provided by the embodiment of the present disclosure, the pre-constructed neural network model can be trained first. Before training the neural network model, multiple training samples can be constructed to train the model based on the training samples. In order to improve the accuracy of the image generation model, as many and rich training samples as possible can be constructed. Optionally, the training process of the content generation model can be: obtaining multiple training samples; wherein the training samples include sample text and expected effect images; for each training sample, the sample text in the training sample is input into the pre-constructed neural network model, and the actual output image is obtained; based on the actual output image and the expected effect image in the training sample, the loss value is determined; based on the loss value, the model parameters in the neural network model are corrected, and the convergence of the loss function in the neural network model is used as the training goal, so that the trained neural network model is used as the image generation model.
[0077] As an optional implementation of the first embodiment of the present disclosure, the target text may be input into the content generation model, and then the target text may be processed based on the content generation model to obtain an output image, and the output image may be used as the target image corresponding to the target text.
[0078] Optionally, the text content in the target text is presented in at least two paragraphs; the target image is determined according to the target text, and the target graphic is generated according to the target text and the target image, including: from multiple video frames of the target video, at least one target image is determined to be displayed in conjunction with the text content of each paragraph; the target graphic is constructed according to the text content in the target text and the target image displayed in conjunction with the text content. The advantage of such a setting is that, since the target graphic includes the text content of at least two paragraphs and the target image corresponding to the text content of each paragraph, the structural processing of the text content extracted from the target video is realized, and the target image is a video frame extracted from the target video and displayed corresponding to the text content of each paragraph, which enhances the correlation between the image and the text content, optimizes the layout of the image and the text in the target image, and realizes the effect that the text content of each paragraph in the graphic obtained by video conversion has a matching picture displayed in conjunction with it, thereby improving the correlation between the text content and the matching picture in the converted graphic, improving the readability of the graphic content, and improving the display effect and distribution effect of the graphic content.
[0079] The target image can be understood as a video frame that matches the text content of the corresponding paragraph. When the target image and the text content of the corresponding paragraph are displayed together, the target image and text can be obtained.
[0080] In practical applications, the target video is converted into text and pictures, usually by parsing the target video to generate corresponding text content according to the video content of the target video, and the text content is a whole paragraph. In addition, at least one video frame is extracted from the target video based on a random frame extraction method, and the extracted video frame is used as a picture of the text content for display. Based on the above method, the video to text and pictures may be converted, and the extracted video frame may not be a key frame or a high-quality video frame, thereby resulting in low picture quality and affecting the readability of the text and pictures. In addition, the generated text content is the text of a whole paragraph. When the video frame is displayed in conjunction with the text content, the video frame can only be displayed at the beginning or end of the paragraph of the text content. There may be a low degree of correlation between the displayed video frame and the text content, which affects the understanding of the text and pictures content, and it is impossible to quickly obtain the required information through the text and pictures content.
[0081] In view of the above situation, in the embodiment of the present disclosure, the target image and text may include the text content of at least two paragraphs and the target image corresponding to the text content of each paragraph, and the target image is a video frame extracted from the target video. That is to say, the text information expressed by the target video can be presented with the text content of at least two paragraphs, and for each paragraph, at least one video frame corresponding to the paragraph in the target video can be determined, and at least one video frame can be extracted from the at least one determined video frame, and the extracted video frame can be used as the target image corresponding to the text content of the paragraph. Further, the target image and text corresponding to the target video can be generated based on the text content of at least two paragraphs and the target image corresponding to the text content of each paragraph. Among them, the target image can be a video frame in the target video that can characterize at least part of the text content of the corresponding paragraph. It should be noted that the target image can be a video frame extracted according to a preset video frame extraction rule. Optionally, the video frame extraction rule can include random extraction, extraction based on the degree of matching between the video frame and the text content of the corresponding paragraph, or extraction based on the video frame quality of the video frame, etc.
[0082] It should be noted that the target images displayed in conjunction with the text content of each paragraph are all video frames extracted from the target video. The target text corresponding to the video content of the target video is the text after structural processing of the video text, and the order of the text content of the video text is not adjusted. Furthermore, the video content order of the target video can be represented according to the text content order in the target text, that is, the video content development order of the target video can be represented according to the arrangement order of the paragraphs in the target text. Furthermore, the text content of each paragraph corresponds to multiple video frames in the target video.
[0083] In the disclosed embodiment, for each paragraph, a video segment corresponding to the text content of the paragraph can be determined from multiple video frames of the target video. Furthermore, at least one target image to be displayed in conjunction with the text content of the paragraph can be determined based on the video segment.
[0084] In actual applications, when converting videos to images and texts, the image selection is usually based on random frame extraction. Based on this method of image selection, it may be impossible to extract key frames and high-quality frames, resulting in low image quality and affecting the distribution effect of image and text content.
[0085] In view of the above situation, in order to improve the quality of matching pictures, in an embodiment of the present disclosure, at least one target image to be displayed in conjunction with the text content of each paragraph is determined from multiple video frames of the target video, including: obtaining multiple candidate frames corresponding to the text content of each paragraph from multiple video frames of the target video; for each candidate frame, determining multiple distribution indicators corresponding to the candidate frame according to multiple image quality parameters corresponding to the candidate frame; and determining at least one target image to be displayed in conjunction with the text content of the paragraph according to the distribution indicators corresponding to the multiple candidate frames corresponding to each paragraph.
[0086] Among them, the candidate frame can be understood as a video frame to be selected for further processing or analysis. The number of candidate frames is less than or equal to the total number of video frames corresponding to the text content of the paragraph in the target video. That is to say, all the video frames corresponding to the text content of the paragraph in the target video can be directly used as multiple candidate frames corresponding to the text content of the paragraph; or, some video frames corresponding to the text content of the paragraph in the target video can be used as multiple candidate frames corresponding to the text content of the paragraph. It should be noted that in order to reduce the amount of data for subsequent processing, reduce computational complexity and improve processing efficiency, multiple video frames can be extracted from all the video frames corresponding to the text content of the paragraph in the target video as candidate frames, so that the number of candidate frames is less than the total number of video frames corresponding to the text content of the paragraph in the target video. Image quality parameters can be an important indicator for evaluating the quality of an image. Image quality parameters can include a variety of indicators for evaluating the quality of an image, optionally including at least one of parameters such as image clarity, area ratio of the target object in the image, and text coverage. It can be understood that image clarity refers to the sharpness of the edge of the image and the distinguishability of details. A clear image can accurately show the outline, texture and details of an object so that the information in the image can be more easily identified and understood. The proportion of the target object in the image can be understood as the ratio of the area corresponding to the target object to the area of the image. The number of target objects in the image can be one or more. The target object can be any main object in the image, optionally, a person, an animal or a building, etc. Exemplarily, the proportion of the target object in the image can be the proportion of portrait information. Generally speaking, the larger the proportion of the target object in the image, the richer the image content represented by the image. Thus, the image quality of the image is higher. Text coverage can be understood as the area ratio occupied by text information in the image. In the image, the length, complexity and importance of the text will affect its coverage in the image. Long text or key text information may require a larger display area, thereby increasing the text coverage. Distribution indicators can be understood as quantitative data for measuring the efficiency, effect and feedback of the distribution process. The efficiency, effect and feedback of the distribution process of the image can be quantified based on the distribution indicators corresponding to the image. It can be understood that for the field of image processing, image distribution can refer to transmitting images from a source end to multiple target ends so that these target ends can receive, view or further process these images. The distribution index can include a variety of indicators for evaluating the image distribution process. The distribution index at least includes a feedback index for the degree of match between the candidate frame and the text content of the paragraph. In other words, the degree of match between the candidate frame and the text content of the paragraph can be evaluated for feedback based on the distribution index. The distribution index can include a variety of indicators for feedback evaluation of the degree of match between the candidate frame and the text content of the paragraph, optionally including at least one of the distribution volume, click-through rate and interactive information. The distribution volume can be understood as the number or scale of images distributed to different channels or platforms.The click-through rate refers to the ratio of the number of times a link or element is clicked to the number of times the link or element is displayed. Interactive information can be understood as information that provides feedback on the image content. For example, the interactive information can be the like rate.
[0087] It should be noted that, for the target image and text, the target image included in the target image and text is the illustration of the text content of the corresponding paragraph. When selecting the target image in the target image and text, in order to make the image quality of the final target image and text better and the content distribution effect better, you can select according to the distribution index corresponding to the candidate frame, and use the candidate frame with a higher distribution index as the illustration of the text content of the corresponding paragraph.
[0088] In an embodiment of the present disclosure, for each paragraph, a video segment corresponding to the text content of the paragraph can be determined based on the target video. Further, multiple candidate frames can be extracted from multiple video frames in the video segment according to a preset extraction number and / or a preset time interval. Further, for each candidate frame, multiple image quality parameters corresponding to the candidate frame can be determined, and multiple distribution indicators corresponding to the candidate frame can be determined based on the multiple image quality parameters corresponding to the candidate frame. Among them, the preset extraction number can be the total number of video frames included in the video segment corresponding to the corresponding paragraph; it can also be any number that is less than the total number of video frames included in the video segment corresponding to the corresponding paragraph.
[0089] It should be noted that, for graphics and text, the quality of the graphics can be verified based on the distribution index, and for images, the quality of the graphics will also affect the graphics effect. Furthermore, there may be a certain correlation between the image quality parameter and the distribution index, and when determining the distribution index corresponding to the candidate frame, it can be determined based on the correlation between the image quality parameter and the distribution index.
[0090] Optionally, multiple distribution indicators corresponding to the candidate frame are determined based on multiple image quality parameters corresponding to the candidate frame, including: determining multiple distribution indicators corresponding to the candidate frame based on multiple image quality parameters corresponding to the candidate frame and the correlation between the multiple image quality parameters and the multiple distribution indicators.
[0091] The association relationship can be used to indicate the degree of association between each image quality parameter and each distribution indicator. For each distribution indicator, a plurality of image quality parameters have a certain association relationship with the distribution indicator. In the embodiment of the present disclosure, the association relationship is determined based on the image quality parameters of a plurality of sample images and the distribution indicators of the sample images and texts corresponding to the sample images; the text contents in the sample images and texts corresponding to the plurality of sample images are the same.
[0092] As an optional implementation of an embodiment of the present disclosure, multiple sample images with the same text content and different sample images can be obtained, and multiple sample images can be obtained based on the multiple sample images. Further, image quality parameters corresponding to the multiple sample images and distribution indicators of the sample images corresponding to the sample images can be obtained. Further, data analysis can be performed on the image quality parameters of the multiple sample images and the distribution indicators of the corresponding sample images to analyze the correlation between the image quality parameters and the distribution indicators, and obtain at least one candidate correlation. Further, in order to improve the accuracy of the correlation finally obtained, at least one candidate correlation can be fitted, and the correlation obtained after fitting is used as the correlation between the image quality parameters and the distribution indicators, and the correlation is stored in the target storage space.
[0093] Specifically, sample images with different image quality parameters can be configured for the same text content to obtain sample images; further, for each sample image, multiple image quality parameters corresponding to the sample image are determined, and an image quality vector is constructed based on the multiple image quality parameters; multiple distribution indicators of the sample image corresponding to the sample image are determined, and a distribution indicator vector is constructed based on the multiple image quality parameters; and a correlation coefficient matrix between the image quality vector and the distribution indicator vector is determined. Then, the correlation coefficient matrices corresponding to the multiple sample images are fitted, and the fitted correlation coefficient matrix is used as the correlation relationship between the image quality parameters and the distribution indicators. Among them, the elements of the correlation coefficient matrix can be used to represent the correlation relationship between a single image quality parameter and a single distribution indicator. A row or a column of the correlation coefficient matrix can represent the correlation coefficient between each image quality parameter and the same distribution indicator.
[0094] When a plurality of candidate frames corresponding to the text content of each paragraph are obtained, a plurality of image quality parameters corresponding to the candidate frames can be obtained for each candidate frame. Furthermore, the association between the image quality parameters and the distribution index can be retrieved. Furthermore, the plurality of distribution indexes corresponding to the candidate frames can be determined based on the plurality of image quality parameters corresponding to the candidate frames and the retrieved association. The advantage of such a setting is that the effect of determining the distribution index of the image based on the image quality parameters is achieved, and thus, the image quality and distribution effect of the target image finally obtained are relatively good.
[0095] In the embodiment of the present disclosure, when multiple distribution indicators corresponding to each candidate frame are determined, at least one target image can be determined from multiple candidate frames according to a preset image selection method according to the multiple distribution indicators corresponding to the candidate frames. The preset image selection method can be to select the candidate frame corresponding to the highest value of each distribution indicator as the target image; or, for each candidate frame, multiple distribution indicators corresponding to the candidate frame can be fused according to a weighted sum operation or an average operation to obtain a target indicator, and then the target image can be determined according to the target indicators corresponding to the multiple candidate frames, etc.
[0096] It should be noted that in order to make the target image finally determined more representative, and the distribution indicators of the target image and text in each dimension are relatively balanced, and the content distribution effect is better, at least one target image to be displayed in conjunction with the text content of the paragraph is determined according to the distribution indicators corresponding to the multiple candidate frames corresponding to each paragraph, including: converting the distribution indicator corresponding to each candidate frame into a target indicator through a weighted sum operation or an averaging operation; determining at least one target image to be displayed in conjunction with the text content of the paragraph according to the target indicators corresponding to the multiple candidate frames corresponding to each paragraph.
[0097] The target indicator may be an indicator obtained by processing multiple distribution indicators through a weighted sum operation; or an indicator obtained by processing multiple distribution indicators through an averaging operation.
[0098] As an optional implementation of the first embodiment of the present disclosure, for each candidate frame, a weighted sum operation may be performed on multiple distribution indicators corresponding to the candidate frame to obtain a target indicator corresponding to the candidate frame. Furthermore, when the target indicators corresponding to multiple candidate frames are obtained, for each paragraph, at least one candidate frame with a relatively high target indicator may be selected from the target indicators corresponding to the multiple candidate frames corresponding to the paragraph. Furthermore, the selected at least one candidate frame may be used as a target image to be displayed in conjunction with the text content of the paragraph.
[0099] As another optional implementation of the disclosed embodiment, for each candidate frame, an average operation may be performed on multiple distribution indicators corresponding to the candidate frame to obtain a target indicator corresponding to the candidate frame. Furthermore, when the target indicators corresponding to multiple candidate frames are obtained, for each paragraph, at least one candidate frame with a relatively high target indicator may be selected from the target indicators corresponding to the multiple candidate frames corresponding to the paragraph. Furthermore, the selected at least one candidate frame may be used as a target image to be displayed in conjunction with the text content of the paragraph.
[0100] In the embodiment of the present disclosure, when a target text including at least two paragraphs of text content and a target image displayed in conjunction with the text content of each paragraph is obtained, for each paragraph, the target image corresponding to the paragraph can be added to a preset position in the text content as a picture of the text content. Furthermore, a graphic content can be obtained in which the corresponding target image is displayed in conjunction with the preset position of the text content of each paragraph, and the graphic content is used as the target graphic content.
[0101] The technical solution of the disclosed embodiment determines the video text according to the video content of the target video, generates the target graphic according to the video text, the content generation model and the target prompt information corresponding to the content generation model, thereby realizing the effect of converting the video into a graphic that meets the expected effect according to the content generation model, thereby improving the readability of the graphic content, improving the display and distribution effects of the graphic content, and improving the video processing experience.
[0102] Figure 3 Schematic diagram of a video processing flow provided by an embodiment of the present disclosure. The present disclosure embodiment is an optional embodiment of the above disclosed embodiments. Figure 3 As shown, the method of the embodiment of the present disclosure may specifically include:
[0103] 1. Perform text recognition on the target video through automatic speech recognition and / or optical character recognition to obtain unstructured video text;
[0104] 2. Performing structural processing on the video text using a structural processing model according to the target prompt information to obtain a target text including text content of at least two paragraphs;
[0105] 3. For each paragraph, extract multiple candidate frames from the text content of the paragraph in the video clip corresponding to the target video according to a preset time interval to obtain a set of extracted frames corresponding to the paragraph;
[0106] For example, P i =[p i,t-mΔt ,…,p i,t-Δt ,p i,t ,p i,t+Δt ,…,p i,t+mΔt ] represents 2m+1 candidate frames uniformly extracted in the i-th paragraph.
[0107] 4. Determine a target image to be displayed in conjunction with the text content of the paragraph from multiple candidate frames;
[0108] Exemplarily, the target image may be determined according to the distribution index corresponding to the candidate frame. The distribution index corresponding to the candidate frame may be determined according to multiple image quality parameters corresponding to the candidate frame and the association relationship between the multiple image quality parameters and the multiple distribution indexes.
[0109] Assuming that there are P dimensions of image quality parameters and Q dimensions of distribution indicators, for a single sample image, the following formula can be satisfied:
[0110]
[0111] Among them, R Q*P A correlation coefficient matrix representing the relationship between image quality parameters and distribution indicators; represents the image quality parameter vector of the jth sample; represents the distribution indicator vector of the jth sample; assuming there are J samples in total, the gradient descent algorithm can be used to solve R Q*P Assume that the fitting result is R′ Q*P .
[0112] Furthermore, the distribution index vector corresponding to each candidate frame in the frame extraction set of the i-th paragraph can be determined based on the following formula:
[0113]
[0114] in, Represents the frame set P i The image quality parameter vector corresponding to the candidate frame pk in; Represents the frame set P i The distribution index vector corresponding to the candidate frame pk in . In order to better compare the distribution effect, a weight vector can be set for each distribution index, and W = [w 1 ,w 2 ,…,w Q ] T , and then, the optimal candidate frame of the i-th paragraph can be determined according to the following formula:
[0115]
[0116] Furthermore, the candidate frames can be sorted in descending order according to the target index corresponding to each candidate frame, and the candidate frames ranked in the first few positions are used as the target images corresponding to the i-th paragraph, and the target images are output. Then, the target images corresponding to each paragraph in the target text are obtained, that is, the target image set is obtained.
[0117] The technical solution of the disclosed embodiment improves the correlation between the text content and the accompanying pictures in the converted image and text, optimizes the layout of the image and text in the target image, improves the readability of the image and text content, and improves the display and distribution effects of the image and text content.
[0118] Figure 4 A schematic diagram of the structure of a video processing device provided by an embodiment of the present disclosure is shown in FIG. Figure 4 As shown, the device includes: a video acquisition module 310 and a graphic and text generation module 320. The video acquisition module 310 is used to receive a video processing request and acquire a target video corresponding to the video processing request, wherein the target video at least includes a plurality of video frames; the graphic and text generation module 320 is used to generate a target graphic and text according to the video content of the target video, a content generation model, and target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
[0119] The technical solution of the disclosed embodiment receives a video processing request through a video acquisition module 310, acquires a target video including multiple video frames corresponding to the video processing request, and triggers the acquisition of the target video and performs subsequent video-to-text conversion operations through simple interaction; further, a target graphic is generated according to the video content of the target video, a content generation model, and target prompt information corresponding to the content generation model through a graphic generation module 320, thereby solving the problem of poor readability and distribution effect of graphic content due to unreasonable layout of accompanying pictures and text content in related technologies, and realizing the effect of converting video into graphic that meets the expected effect according to the content generation model, thereby improving the readability of graphic content, improving the display effect and distribution effect of graphic content, and improving the video processing experience.
[0120] Based on any of the above optional technical solutions, optionally, the image and text generation module 320 is specifically used to: determine the video text according to the video content of the target video, and generate the target image and text according to the video text, the content generation model and the target prompt information corresponding to the content generation model.
[0121] Based on any of the above optional technical solutions, optionally, the graphic and text generation module 320 includes: a first text determination subunit and / or a second text determination subunit. The first text determination subunit is used to determine the video text according to the image content of multiple video frames of the target video when the target video does not include audio data; and / or the second text determination subunit is used to determine the first text according to the image content of multiple video frames of the target video when the target video includes audio data, determine the second text according to the audio data, and determine the video text according to the first text and the second text.
[0122] Based on any of the above optional technical solutions, optionally, the content generation model includes a text generation model; the image and text generation module 320 includes: a prompt information determination submodule and an image and text generation submodule. Among them, the prompt information determination submodule is used to determine the target prompt information corresponding to the video text, and input the target prompt information and the video text into the text generation model to obtain the target text; the image and text generation submodule is used to determine the target image according to the target text, and generate the target image and text according to the target text and the target image.
[0123] Based on any of the above optional technical solutions, optionally, the text content in the target text is presented in at least two paragraphs; the image-text generation submodule includes: a target image determination unit and an image-text generation unit. Among them, the target image determination unit is used to determine at least one target image to be displayed in conjunction with the text content of each paragraph from multiple video frames of the target video; the image-text generation unit is used to construct a target image-text based on the text content in the target text and the target image displayed in conjunction with the text content.
[0124] On the basis of any of the above optional technical solutions, optionally, the target image determination unit includes: a candidate frame acquisition subunit, a distribution index determination subunit and a target image determination subunit. The candidate frame acquisition subunit is used to respectively acquire a plurality of candidate frames corresponding to the text content of each paragraph from a plurality of video frames of the target video, wherein the number of the candidate frames is less than or equal to the total number of video frames corresponding to the text content of the paragraph in the target video; the distribution index determination subunit is used to determine a plurality of distribution indexes corresponding to each candidate frame according to a plurality of image quality parameters corresponding to the candidate frame, wherein the distribution index at least includes a feedback index of the degree of matching between the candidate frame and the text content of the paragraph; the target image determination subunit is used to determine at least one target image to be displayed in conjunction with the text content of the paragraph according to the distribution indexes corresponding to the plurality of candidate frames corresponding to each paragraph.
[0125] On the basis of any of the above-mentioned optional technical solutions, optionally, a distribution indicator determination subunit is specifically used to determine multiple distribution indicators corresponding to the candidate frame according to multiple image quality parameters corresponding to the candidate frame and the association relationship between the multiple image quality parameters and the multiple distribution indicators; wherein the association relationship is determined according to the image quality parameters of multiple sample images and the distribution indicators of the sample images corresponding to the sample images; the text content in the sample images corresponding to the multiple sample images is the same.
[0126] Based on any of the above-mentioned optional technical solutions, optionally, the target image determination subunit is specifically used to convert the distribution index corresponding to each of the candidate frames into a target index through a weighted sum operation or an averaging operation; and determine at least one target image to be displayed in conjunction with the text content of the paragraph based on the target indicators corresponding to the multiple candidate frames corresponding to each of the paragraphs.
[0127] Based on any of the above optional technical solutions, optionally, the image quality parameter includes at least one of parameters such as image clarity, area ratio of the target object in the image, and text coverage; and / or the distribution indicator includes at least one of distribution volume, click-through rate, and interactive information.
[0128] Based on any of the above optional technical solutions, optionally, the content generation model also includes an image generation model; a picture-text generation submodule is specifically used to input the target text into the image generation model to obtain a target image corresponding to the target text.
[0129] The video processing device provided in the embodiments of the present disclosure can execute the video processing method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
[0130] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0131] Figure 5 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 5 , which shows an electronic device (eg, Figure 5 The terminal device in the embodiment of the present disclosure may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 5 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0132] like Figure 5As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic device 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0133] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 5 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0134] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 509, or installed from a storage device 508, or installed from a ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0135] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0136] The electronic device provided by the embodiment of the present disclosure and the video processing method provided by the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0137] The embodiments of the present disclosure provide a computer storage medium on which a computer program is stored. When the program is executed by a processor, the video processing method provided by the above embodiments is implemented.
[0138] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0139] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0140] The computer-readable medium may be included in the electronic device, or may exist independently without being installed in the electronic device.
[0141] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives a video processing request, obtains a target video corresponding to the video processing request, wherein the target video includes at least multiple video frames; generates target graphics according to the video content of the target video, a content generation model and target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
[0142] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0143] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0144] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, a video acquisition module may also be described as a "module for acquiring a target video corresponding to the video processing request".
[0145] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0146] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0147] According to one or more embodiments of the present disclosure, [Example 1] provides a video processing method, including: receiving a video processing request, obtaining a target video corresponding to the video processing request, wherein the target video includes at least multiple video frames; generating target graphics according to the video content of the target video, and displaying the target graphics, wherein the target graphics include text content of at least two paragraphs and a target image corresponding to the text content of each paragraph; the target image is the video frame extracted from the target video.
[0148] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further including: optionally, generating target graphics and text according to the video content of the target video, including: determining a target text corresponding to the video content of the target video, wherein the text content in the target text is presented in at least two paragraphs; determining at least one target image to be displayed in conjunction with the text content of each paragraph from multiple video frames of the target video; and constructing the target graphics and text according to the text content in the target text and the target image displayed in conjunction with the text content.
[0149] According to one or more embodiments of the present disclosure, [Example 1] provides a video processing method, including: receiving a video processing request, obtaining a target video corresponding to the video processing request, wherein the target video includes at least multiple video frames; generating target graphics and text according to the video content of the target video, a content generation model, and target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
[0150] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further including: optionally, generating target graphics and texts according to the video content of the target video, the content generation model, and the target prompt information corresponding to the content generation model, including: determining the video text according to the video content of the target video, and generating the target graphics and texts according to the video text, the content generation model, and the target prompt information corresponding to the content generation model.
[0151] According to one or more embodiments of the present disclosure, [Example Three] provides the method of Example Two, further including: optionally, determining the video text based on the video content of the target video includes: when the target video does not include audio data, determining the video text based on the image content of multiple video frames of the target video; and / or, when the target video includes audio data, determining the first text based on the image content of multiple video frames of the target video, determining the second text based on the audio data, and determining the video text based on the first text and the second text.
[0152] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 2, further including: optionally, the content generation model includes a text generation model; the target graphics and text are generated according to the video text, the content generation model, and the target prompt information corresponding to the content generation model, including: determining the target prompt information corresponding to the video text, inputting the target prompt information and the video text into the text generation model to obtain the target text; determining the target image according to the target text, and generating the target graphics and text according to the target text and the target image.
[0153] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 4, further including: optionally, the text content in the target text is presented in at least two paragraphs; the target image is determined based on the target text, and the target graphic is generated based on the target text and the target image, including: from multiple video frames of the target video, respectively determine at least one target image to be displayed in conjunction with the text content of each paragraph; construct the target graphic based on the text content in the target text and the target image displayed in conjunction with the text content.
[0154] According to one or more embodiments of the present disclosure, [Example Six] provides the method of Example Five, further including: optionally, determining at least one target image to be displayed in conjunction with the text content of each paragraph from the multiple video frames of the target video, including: obtaining a plurality of candidate frames corresponding to the text content of each paragraph from the multiple video frames of the target video, wherein the number of candidate frames is less than or equal to the total number of video frames corresponding to the text content of the paragraph in the target video; for each candidate frame, determining a plurality of distribution indicators corresponding to the candidate frame according to a plurality of image quality parameters corresponding to the candidate frame, wherein the distribution indicator includes at least a feedback indicator of the degree of match between the candidate frame and the text content of the paragraph; determining at least one target image to be displayed in conjunction with the text content of the paragraph according to the distribution indicators corresponding to the multiple candidate frames corresponding to each paragraph.
[0155] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 6, further including: optionally, determining multiple distribution indicators corresponding to the candidate frame based on multiple image quality parameters corresponding to the candidate frame, including: determining multiple distribution indicators corresponding to the candidate frame based on multiple image quality parameters corresponding to the candidate frame and the association relationship between the multiple image quality parameters and the multiple distribution indicators; wherein the association relationship is determined based on the image quality parameters of multiple sample images and the distribution indicators of sample images corresponding to the sample images; the text content in the sample images corresponding to the multiple sample images is the same.
[0156] According to one or more embodiments of the present disclosure, [Example Eight] provides the method of Example Six, further including: optionally, determining at least one target image to be displayed in conjunction with the text content of the paragraph based on the distribution indicators corresponding to the multiple candidate frames corresponding to each of the paragraphs, including: converting the distribution indicator corresponding to each of the candidate frames into a target indicator by a weighted sum operation or an averaging operation; determining at least one target image to be displayed in conjunction with the text content of the paragraph based on the target indicators corresponding to the multiple candidate frames corresponding to each of the paragraphs.
[0157] According to one or more embodiments of the present disclosure, [Example 9] provides the method of Example 6, further including: optionally, the image quality parameters include at least one of parameters such as image clarity, area ratio of the target object in the image, and text coverage; and / or, the distribution indicators include at least one of distribution volume, click-through rate, and interactive information.
[0158] According to one or more embodiments of the present disclosure, [Example 10] provides the method of Example 4, further including: optionally, the content generation model also includes an image generation model; determining the target image based on the target text includes: inputting the target text into the image generation model to obtain a target image corresponding to the target text.
[0159] According to one or more embodiments of the present disclosure, [Example 11] provides a video processing device, including: a video acquisition module, used to receive a video processing request, and acquire a target video corresponding to the video processing request, wherein the target video includes at least multiple video frames; a graphic generation module, used to generate target graphics according to the video content of the target video, a content generation model, and target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
[0160] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0161] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0162] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A video processing method, characterized in that: include: Receiving a video processing request, and acquiring a target video corresponding to the video processing request, wherein the target video includes at least a plurality of video frames; Generate target graphics and text according to the video content of the target video, the content generation model and the target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
2. The video processing method according to claim 1, characterized in that: The generating target graphics and text according to the video content of the target video, the content generation model and the target prompt information corresponding to the content generation model includes: The video text is determined according to the video content of the target video, and the target graphic is generated according to the video text, a content generation model and target prompt information corresponding to the content generation model.
3. The video processing method according to claim 2, characterized in that: The step of determining the video text according to the video content of the target video includes: In the case that the target video does not include audio data, determining the video text according to image contents of a plurality of video frames of the target video; and / or, In the case that the target video includes audio data, a first text is determined according to image content of a plurality of video frames of the target video, a second text is determined according to the audio data, and a video text is determined according to the first text and the second text.
4. The video processing method according to claim 2, characterized in that: The content generation model includes a text generation model; the generating target graphics and text according to the video text, the content generation model and the target prompt information corresponding to the content generation model includes: Determine target prompt information corresponding to the video text, and input the target prompt information and the video text into the text generation model to obtain the target text; A target image is determined according to the target text, and a target graphic is generated according to the target text and the target image.
5. The video processing method according to claim 4, characterized in that: The text content in the target text is presented in at least two paragraphs; the target image is determined according to the target text, and a target graphic is generated according to the target text and the target image, including: Determining at least one target image to be displayed in conjunction with the text content of each of the paragraphs from the plurality of video frames of the target video; A target graphic is constructed according to the text content in the target text and the target image displayed in conjunction with the text content.
6. The video processing method according to claim 5, characterized in that: The step of determining, from the plurality of video frames of the target video, at least one target image to be displayed in conjunction with the text content of each paragraph comprises: Respectively acquiring a plurality of candidate frames corresponding to the text content of each of the paragraphs from the plurality of video frames of the target video, wherein the number of the candidate frames is less than or equal to the total number of video frames corresponding to the text content of the paragraphs in the target video; For each of the candidate frames, determining a plurality of distribution indicators corresponding to the candidate frame according to a plurality of image quality parameters corresponding to the candidate frame, wherein the distribution indicators at least include a feedback indicator of a matching degree between the candidate frame and the text content of the paragraph; At least one target image to be displayed in conjunction with the text content of the paragraph is determined according to the distribution indicators corresponding to the multiple candidate frames corresponding to each of the paragraphs.
7. The video processing method according to claim 6, characterized in that: The determining a plurality of distribution indicators corresponding to the candidate frames according to a plurality of image quality parameters corresponding to the candidate frames comprises: Based on multiple image quality parameters corresponding to the candidate frame and the association relationship between the multiple image quality parameters and multiple distribution indicators, multiple distribution indicators corresponding to the candidate frame are determined; wherein the association relationship is determined based on the image quality parameters of multiple sample images and the distribution indicators of sample images and texts corresponding to the sample images; the text content in the sample images and texts corresponding to the multiple sample images is the same.
8. The video processing method according to claim 6, characterized in that: The step of determining at least one target image to be displayed in conjunction with the text content of the paragraph according to the distribution indicators corresponding to the plurality of candidate frames corresponding to each paragraph includes: The distribution index corresponding to each candidate frame is converted into a target index through a weighted sum operation or an average operation; At least one target image to be displayed in conjunction with the text content of the paragraph is determined according to target indicators corresponding to the plurality of candidate frames corresponding to each paragraph.
9. The video processing method according to claim 6, characterized in that: The image quality parameter includes at least one of parameters such as image clarity, area ratio of the target object in the image, and text coverage; and / or the distribution indicator includes at least one of distribution volume, click-through rate, and interactive information.
10. The video processing method according to claim 4, characterized in that: The content generation model also includes an image generation model; and determining a target image according to the target text includes: The target text is input into an image generation model to obtain a target image corresponding to the target text.
11. A video processing device, characterized in that: include: A video acquisition module, configured to receive a video processing request and acquire a target video corresponding to the video processing request, wherein the target video includes at least a plurality of video frames; A graphic and text generation module is used to generate target graphics and text according to the video content of the target video, a content generation model and target prompt information corresponding to the content generation model; wherein the target prompt information is used to prompt the processing information of the video content and / or the expected presentation information of the content generated by the content generation model.
12. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the video processing method as described in any one of claims 1-10.
13. A storage medium containing computer executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, they are used to perform the video processing method according to any one of claims 1 to 10.
14. A computer program product, characterized in that The computer program product comprises a computer program, which, when executed by a processor, implements the video processing method according to any one of claims 1 to 10.
Citation Information
Patent Citations
Video sorting method and device, server and storage medium
CN112052352A
Information delivery method and device, electronic equipment and storage medium
CN113378002A
Video cover generation method and device and storage medium
CN114491151A
Comment information display method and device, computer equipment and storage medium
CN115734016A
Data processing method and device, equipment and medium
CN116246213A
Cited By
Video processing method and device, electronic equipment and storage medium
CN120472485A
