Video generation method and apparatus, and device, medium and program product
By extracting and matching features from the input data, target video features are generated, solving the problem of inaccurate modality matching in multimodal video generation and improving the accuracy of video generation and user experience.
Patent Information
- Application Number
- PCT/CN2024/097380
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-13
- Filing Date
- 2024-06-04
- Publication Date
- 2024-12-19
AI Technical Summary
In existing multimodal video generation technologies, the matching accuracy between modalities is not high, resulting in low accuracy in video generation and affecting user experience.
By extracting features from the input data, the target video features are determined, and the target video is generated based on these features, thereby improving the accuracy of modality matching.
It improves the accuracy of video generation, ensures the matching of video with input data, and enhances the user experience.
Smart Images

Figure CN2024097380_19122024_PF_FP_ABST
Abstract
Description
Video generation method, device, equipment, medium and program product
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on June 13, 2023, with application number 202310701132.6 and invention name “Video Generation Method, Device, Equipment, Medium and Program Product”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present disclosure relates to the field of computer technology, and in particular to a video generation method, apparatus, device, medium, and program product. Background Art
[0003] Multi-modal-to-video generation (MMVG) technology can guide video generation using data from other modalities, such as text and voice. However, existing MTVG technologies lack high matching accuracy between different modalities, resulting in low video generation accuracy and a reduced user experience.
[0004] Summary of the Invention
[0005] The present disclosure proposes a video generation method, apparatus, device, storage medium and program product to solve the technical problem of low accuracy of video generation to a certain extent.
[0006] In a first aspect, the present disclosure provides a video generation method, comprising:
[0007] Acquiring input data, wherein the input data includes at least one of audio data or text data;
[0008] Performing feature extraction on the input data to obtain input features of the input data;
[0009] determining target video features based on the input features;
[0010] A target video is generated based on the target video features.
[0011] In a second aspect of the present disclosure, a video generation device is provided, comprising:
[0012] An acquisition module, configured to acquire input data, wherein the input data includes audio data or text data;
[0013] An extraction module, configured to extract features from the input data to obtain input features of the input data;
[0014] A matching module, configured to determine target video features based on the input features;
[0015] A generating module is used to generate a target video based on the target video features.
[0016] In a third aspect of the present disclosure, an electronic device is provided, characterized in that it includes one or more processors, a memory; and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, and the programs include instructions for executing the method according to the first aspect or the second aspect.
[0017] According to a fourth aspect of the present disclosure, a non-volatile computer-readable storage medium containing a computer program is provided. When the computer program is executed by one or more processors, the processors execute the method described in the first aspect or the second aspect.
[0018] In a fifth aspect of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed on a computer, cause the computer to execute the method described in the first aspect.
[0019] As can be seen from the above description, the present disclosure provides a video generation method, apparatus, device, medium, and program product, which generates a target video by determining corresponding target video features based on input features of input data. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] FIG1 is a schematic diagram of a video generation architecture according to an embodiment of the present disclosure.
[0022] FIG2 is a schematic diagram of the hardware structure of an exemplary electronic device according to an embodiment of the present disclosure.
[0023] FIG3 is a schematic flowchart of a video generation method according to an embodiment of the present disclosure.
[0024] FIG4 is a schematic diagram of the video generation method according to an embodiment of the present disclosure.
[0025] FIG5 is a schematic diagram of a video generating device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
[0027] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should have the usual meanings understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Include" or "comprise" and similar words mean that the elements or objects appearing before the word include the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative position relationships. When the absolute position of the described object changes, the relative position relationship may also change accordingly.
[0028] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this 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.
[0029] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.
[0030] As an optional but non-limiting implementation, in response to receiving a user's active request, 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. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.
[0031] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.
[0032] FIG1 shows a schematic diagram of a video generation architecture according to an embodiment of the present disclosure. Referring to FIG1 , the video generation architecture 100 may include a server 110, a terminal 120, and a network 130 providing a communication link. The server 110 and the terminal 120 may be connected via a wired or wireless network 130. The server 110 may be an independent physical server, a server cluster or a distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, security services, and CDN.
[0033] Terminal 120 can be implemented in hardware or software. For example, when implemented in hardware, terminal 120 can be any electronic device with a display screen that supports page display, including but not limited to smartphones, tablet computers, e-book readers, laptop computers, and desktop computers. When terminal 120 is implemented in software, it can be installed in the electronic devices listed above; it can be implemented as multiple software or software modules (such as software or software modules used to provide distributed services), or it can be implemented as a single software or software module, and no specific limitations are given here.
[0034] It should be noted that the video generation method provided in the embodiments of the present application can be executed by the terminal 120 or by the server 110. It should be understood that the number of terminals, networks, and servers in FIG1 is for illustration only and is not intended to limit the number thereof. Any number of terminals, networks, and servers can be used as required.
[0035] Figure 2 shows a schematic diagram of the hardware structure of an exemplary electronic device 200 provided by an embodiment of the present disclosure. As shown in Figure 2, electronic device 200 may include: a processor 202, a memory 204, a network module 206, a peripheral interface 208, and a bus 210. The processor 202, memory 204, network module 206, and peripheral interface 208 are communicatively connected to each other within electronic device 200 via bus 210.
[0036] The processor 202 may be a central processing unit (CPU), a video generator, a neural network processor (NPU), a microcontroller (MCU), a programmable logic device (PLD), a digital signal processor (DSP), an application-specific integrated circuit (ASIC), or one or more integrated circuits. The processor 202 may be configured to perform functions related to the technology described in this disclosure. In some embodiments, the processor 202 may also include multiple processors integrated into a single logical component. For example, as shown in FIG2 , the processor 202 may include multiple processors 202 a, 202 b, and 202 c.
[0037] The memory 204 can be configured to store data (e.g., instructions, computer codes, etc.). As shown in Figure 2, the data stored in the memory 204 can include program instructions (e.g., program instructions for implementing the video generation method of the disclosed embodiment) and data to be processed (e.g., the memory can store configuration files of other modules, etc.). The processor 202 can also access the program instructions and data stored in the memory 204, and execute the program instructions to operate on the data to be processed. The memory 204 can include a volatile storage device or a non-volatile storage device. In some embodiments, the memory 204 can include a random access memory (RAM), a read-only memory (ROM), an optical disc, a magnetic disk, a hard disk, a solid-state drive (SSD), a flash memory, a memory stick, etc.
[0038] The network module 206 can be configured to provide the electronic device 200 with communication with other external devices via a network. The network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, near field communication (NFC)), a cellular network, the Internet, or a combination thereof. It will be appreciated that the type of network is not limited to the specific examples above. In some embodiments, the network module 306 can include any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, and the like.
[0039] The peripheral interface 208 can be configured to connect the electronic device 200 to one or more peripheral devices to implement information input and output. For example, the peripheral devices can include input devices such as a keyboard, a mouse, a touchpad, a touch screen, a microphone, and various sensors, and output devices such as a display, a speaker, a vibrator, and an indicator light.
[0040] The bus 210 can be configured to transmit information between the various components of the electronic device 200 (e.g., the processor 202, the memory 204, the network module 206, and the peripheral interface 208), such as an internal bus (e.g., a processor-memory bus), an external bus (USB port, PCI-E bus), etc.
[0041] It should be noted that although the architecture of the electronic device 200 shown above only includes the processor 202, the memory 204, the network module 206, the peripheral interface 208, and the bus 210, in a specific implementation, the architecture of the electronic device 200 may also include other components necessary for normal operation. In addition, those skilled in the art will understand that the architecture of the electronic device 200 may also include only the components necessary to implement the embodiments of the present disclosure, and does not necessarily include all the components shown in the figure.
[0042] Existing video generation technologies generally rely on cross-modal matching techniques to solve the matching problem between different modal data, such as video, audio, text, and compressed codecs. However, the matching accuracy between different modalities in existing technologies is not high, resulting in low accuracy of videos generated based on user input, which cannot meet user needs. Therefore, how to improve the accuracy of video generation has become a pressing technical problem.
[0043] In view of this, embodiments of the present disclosure provide a video generation method, apparatus, device, storage medium, and program product. These methods generate a target video by determining corresponding target video features based on input data features. Regardless of the input data modality, these methods can accurately match the video features and generate the target video, thereby improving the accuracy of video generation.
[0044] Specifically, a user can input a piece of text data, such as a lyric, and hope to generate a video corresponding to the lyric, such as an MV. Based on the video generation method of the embodiment of the present disclosure, feature extraction can be performed on the text data to obtain text features. Then, based on the text features, target video features that match the text features are determined. Then, generating a corresponding target video based on the target video features can improve the accuracy of cross-modal matching between the text modality and the video modality, thereby improving the accuracy of the generated target video.
[0045] Referring to Figure 3, Figure 3 shows a schematic flow chart of a video generation method according to an embodiment of the present disclosure. In Figure 3, the video generation method 300 may further include the following steps.
[0046] In step S310 , input data is acquired, where the input data includes at least one of audio data and text data.
[0047] The input data may be data directly input or determined by a user through user operations on an interactive interface. For example, a user may directly input text data, audio data, or video data, or may select text data, audio data, or video data and then retrieve it via a network. In the case of video data, the audio data or text data contained in the video data may be retrieved. In some embodiments, the input data may come from the same data source, such as the same audio and video data, or from different data sources.
[0048] In step S320, feature extraction is performed on the input data to obtain input features of the input data.
[0049] In some embodiments, the input data may include at least one input data slice. The input data slice is a process of dividing the text data, audio data, or video data input by the user into segments. The segments may include single-semantic data with a single semantic characteristic. On the one hand, the input data slice can divide long input data into short input data, thereby providing a basis for parallelization acceleration. On the other hand, the input data slice divides the input data into segments with a single semantic meaning, avoiding semantic confusion caused by data segments containing multiple semantic meanings in the same data segment during feature matching.
[0050] In some embodiments, performing feature extraction on the input data to obtain input features of the input data includes:
[0051] Segmenting the input data to obtain single semantic data;
[0052] A plurality of input features corresponding to the input data are obtained based on the single semantic data.
[0053] Input data often includes multiple semantic segments. Directly extracting features from these segments can lead to semantic confusion, reducing the quality of the resulting video. For example, for the text data "text1, text2," each has its own semantic meaning. Extracting features from these segments as a single data set can lead to semantic confusion. To address this semantic confusion, multi-semantic data can be split into multiple single-semantic data. For example, the text data "text1, text2" can be split into two single-semantic data sets, "text1" and "text2," and feature extraction can be performed on each of these data sets to generate two input features, F_text1 and F_text2. Subsequent feature matching based on these input features, F_text1 and F_text2, can avoid semantic confusion caused by overlapping semantics and effectively improve the quality of semantic matching. For example, the sentence "The sun shines on the incense burner, producing purple smoke; a distant view of the waterfall hangs over the river ahead," can be split into "The sun shines on the incense burner, producing purple smoke" and "a distant view of the waterfall hangs over the river ahead." It should be understood that the above-mentioned segmentation of input data is only an example and is not intended to limit the modality of the input features and the number of monosemantic data obtained by segmentation. The input data may include at least one of text data, audio data or video data, and may include less or more monosemantic data after segmentation, which is not limited here.
[0054] In some embodiments, obtaining a plurality of input features corresponding to the input data based on the single semantic data further includes:
[0055] The multimodal feature extraction process is performed on the single semantic data to obtain the input feature.
[0056] Specifically, see Figure 4, which shows a schematic diagram of a video generation method according to an embodiment of the present disclosure. In Figure 4, when extracting features from the input data, the feature extraction process used is consistent with that used when obtaining the video feature library. For example, a feature extraction network that extracts video features from the video feature library can be used to extract features from the input data. Feature extraction extracts a feature vector from a single semantic data segment, effectively reducing the dimensionality of the data.
[0057] In step S330 , target video features are determined based on the input features.
[0058] The input features can be features of a textual or audio modality. Based on the input features, feature matching can be performed in a video feature library to determine matching target video features, as shown in Figure 4. The video feature library can include multiple video features, each of which can have corresponding semantic properties. The input features can be matched against the semantics of the video features to determine the target video features within the video features. Furthermore, the video feature library can also include text features corresponding to the video features.
[0059] In some embodiments, determining target video features based on the input features includes:
[0060] Calculating semantic relevance between the input feature and video features in a video feature library;
[0061] The video feature with the highest semantic relevance is determined as the target video feature.
[0062] Specifically, the cosine distance can be calculated based on the input feature and all video features in the video feature library to obtain the semantic relevance, and the video feature corresponding to the minimum cosine distance is selected as the matching result.
[0063] In some embodiments, method 300 may further include:
[0064] Multimodal feature extraction processing is performed based on multiple video data to obtain multiple video features with semantic characteristics.
[0065] Among them, multiple video features form a video feature library. Video data can also be pre-classified based on attributes such as themes and styles, which can provide a data basis for generating videos with different themes and styles when subsequent target videos are generated. Multimodal feature extraction can be performed on each video data. For example, feature extraction of video data can be performed based on a multimodal feature extraction network to obtain semantic video features. Because it is necessary to retrieve and match with data in other modalities such as text and audio in the future, it is not possible to obtain a single modal feature set like the single modal video feature extractor used in the prior art. The multimodal feature set can be continuously updated in subsequent use, and there is no need to recreate the database for each feature match. It should be understood that the method of extracting features from input data is consistent with the method of extracting features to obtain multimodal features.
[0066] In step S340, a target video is generated based on the target video features.
[0067] The target video feature has a corresponding video clip, and the corresponding target video can be generated based on the target video feature.
[0068] In some embodiments, generating a target video based on the target video features includes:
[0069] Determining a corresponding target video slice based on the target video feature;
[0070] Aligning a target timestamp of the target video slice with a source timestamp of the input data to obtain an aligned target video slice;
[0071] The aligned target video slices are spliced based on the source timestamps to obtain the target video.
[0072] The target video feature corresponds to each input feature, that is, to each input data slice (i.e., single semantic data). After retrieving the corresponding target video slice for each input data slice, these target video slices need to be combined into a complete video. However, the timestamps of the input data and the matched target video slices are not always aligned, so it is necessary to align the timestamps of the two and then splice the target video slices to obtain the final target video.
[0073] In some embodiments, when the input data is text data, the source timestamp of the text data may be set based on a preset playback speed.
[0074] Among them, for input data that has a timestamp itself, such as audio data, its own timestamp can be used as the source timestamp. For input data that does not have a timestamp itself, such as text data, a corresponding timestamp can be set for it. Specifically, for text data text, the text data can be played based on a preset playback speed v. For example, the text data text includes multiple text data segments text1, text2, ...texti, ..., and the corresponding data lengths are L1, L2, ...Li, ..., then the starting timestamp of the text data segment text1 is 0, and the ending timestamp is L1 / v. The starting timestamp of the text data segment text2 is L1 / v, and the ending timestamp is (L1+L2) / v. And so on, a timestamp can be set for the text data text. It should be understood that the above timestamps are only examples and are not intended to limit the timestamps. The set timestamps may include or exclude the starting timestamp and / or the ending timestamp, and may also include timestamps at other locations, which are not limited here.
[0075] In some embodiments, aligning the target timestamp of the target video slice with the source timestamp of the input data to obtain an aligned target video slice further includes:
[0076] Obtaining a target duration of the target video slice based on the target timestamp, and obtaining a source duration of the input data slice based on the source timestamp;
[0077] The target timestamp is aligned with the source timestamp based on the target duration and the source duration to obtain an aligned target video slice.
[0078] In some embodiments, aligning the target timestamp with the source timestamp based on the target duration and the source duration to obtain an aligned target video slice includes:
[0079] The target video slice whose target duration is equal to the source duration is directly used as the aligned target video slice;
[0080] Cropping the target video slices whose target duration is longer than the source duration to obtain aligned target video slices;
[0081] Frame insertion and extension are performed on the target video slice whose target duration is shorter than the source duration to obtain aligned target video slices.
[0082] Specifically, each target video slice can be processed one by one to align the timestamps of the target video slice with the input data slice. Take the start timestamp s1 and end timestamp s2 of the input data slice S and the start timestamp t1 and end timestamp t2 of the target video slice T as an example:
[0083] If the source duration s2-s1=target duration t2-t1, the target video slice T is used as the matching result to fill in the time period s1s2 corresponding to the input data slice S.
[0084] If the source duration s2-s1 is less than the target duration t2-t1, the target video slice T is cropped so that the duration t2'-t1' of the cropped target video slice T' is equal to the source duration s2-s1, and the cropped target video slice T' is used as the matching result to fill in the time period s1s2 corresponding to the input data slice S.
[0085] If the source duration s2-s1>target duration t2-t1, the target video slice T is extended by interpolation, so that the duration t2'-t1' of the target video slice T' after interpolation and extension is =s2-s1, and the target video slice T' after interpolation and extension is used as the matching result to fill in the time period s1s2 corresponding to the input data slice S.
[0086] Specifically, after completing the matching and timestamp adjustment alignment of all target video slices, all target video slices can be arranged in the order of the timestamps of the input data, and these target video slices can be rendered into the final target video.
[0087] In some embodiments, the input data may further include indication information for indicating the attributes of the target video. In some embodiments, determining the target video features based on the input features includes:
[0088] Based on matching the input feature with video features having the attribute in a video feature library, a target video feature in the video features is determined.
[0089] Attributes may include style, theme, etc. For example, style may include comedy style, classical style, etc.; theme may include nature theme, animal theme, etc. The user may input data to indicate the style or theme of the target video to be generated. For example, if the user inputs a video data A with style F1 and indicates that the style of the target video is F2, the target video generated according to the embodiment of the present disclosure is a video data A with the style changed to F2.
[0090] It should be noted that the method of the embodiments of the present disclosure can be performed by a single device, such as a computer or server. The method of the embodiments of the present disclosure can also be applied in a distributed scenario, where multiple devices cooperate to perform the method. In such a distributed scenario, one of the multiple devices may only perform one or more steps of the method of the embodiments of the present disclosure, and the multiple devices will interact with each other to complete the method.
[0091] It should be noted that the above description is limited to some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in an order different from that described in the above embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order or sequential order shown to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0092] Based on the same technical concept, corresponding to any of the above embodiments and methods, the present disclosure further provides a video generation device, as shown in FIG5 , comprising:
[0093] An acquisition module, configured to acquire input data, wherein the input data includes at least one of audio data and text data;
[0094] An extraction module, configured to extract features from the input data to obtain input features of the input data;
[0095] A matching module, configured to determine target video features based on the input features;
[0096] A generating module is used to generate a target video based on the target video features.
[0097] For the convenience of description, the above devices are described as being functionally divided into various modules. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0098] The apparatus of the above embodiment is used to implement the corresponding video generation method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0099] Based on the same technical concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions are used to enable the computer to execute the video generation method described in any of the above embodiments.
[0100] The computer-readable media of this embodiment include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0101] The computer instructions stored in the storage medium of the above embodiment are used to enable the computer to execute the video generation method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0102] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Within the scope of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0103] In addition, to simplify the description and discussion, and so as not to obscure the embodiments of the present disclosure, known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, devices may be shown in the form of block diagrams to avoid obscuring the embodiments of the present disclosure, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure are to be implemented (i.e., these details should be fully within the purview of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it will be apparent to those skilled in the art that the embodiments of the present disclosure may be implemented without these specific details or with variations in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0104] Although the present disclosure has been described in conjunction with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those skilled in the art based on the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0105] The embodiments of the present disclosure are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A video generation method, comprising: Acquire input data, wherein the input data includes at least one of audio data or text data; Performing feature extraction on the input data to obtain input features of the input data; Determining target video features based on the input features; A target video is generated based on the target video features.
2. The method according to claim 1, wherein Performing feature extraction on the input data to obtain input features of the input data includes: Segmenting the input data to obtain single semantic data; Based on the single semantic data, a plurality of input features corresponding to the input data are obtained.
3. The method according to claim 1, wherein The determining the target video feature based on the input feature comprises: Calculating the semantic relevance between the input feature and the video features in the video feature library; The video feature with the highest semantic relevance is determined as the target video feature.
4. The method according to claim 1, wherein Generating a target video based on the target video feature includes: Determine a corresponding target video slice based on the target video feature; Aligning the target timestamp of the target video slice with the source timestamp of the input data to obtain an aligned target video slice; The aligned target video slices are spliced based on the source timestamp to obtain the target video.
5. The method according to claim 4, wherein: The input data includes at least one single semantic data; Aligning the target timestamp of the target video slice with the source timestamp of the input data to obtain an aligned target video slice further comprises: Obtaining a target duration of the target video slice based on the target timestamp, and obtaining a source duration of the single semantic data based on the source timestamp; The target timestamp and the source timestamp are compared based on the target duration and the source duration. Align to obtain the aligned target video slice.
6. The method according to claim 5, wherein: Aligning the target timestamp with the source timestamp based on the target duration and the source duration to obtain an aligned target video slice includes: The target video slice whose target duration is equal to the source duration is directly used as the aligned target video slice; Cropping the target video slice whose target duration is longer than the source duration to obtain aligned target video slices; The target video slice whose target duration is shorter than the source duration is extended by inserting frames to obtain aligned target video slices.
7. The method according to claim 1, wherein: The input data also includes indication information for indicating the attributes of the target video; Then determining the target video features based on the input features includes: Based on matching the input feature with a video feature having the attribute in a video feature library, a target video feature in the video features is determined.
8. The method according to claim 1, wherein: The input data is text data, and the method further includes: setting a source timestamp of the text data based on a preset play speed.
9. A video generating device, comprising: An acquisition module, used for acquiring input data, wherein the input data includes audio data or text data; An extraction module, used to extract features from the input data to obtain input features of the input data; A matching module, configured to determine target video features based on the input features; A generating module is used to generate a target video based on the target video features.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 8 when executing the program.
11. A non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to any one of claims 1 to 8.
12. A computer program product, comprising computer program instructions, which, when executed on a computer, enable the computer to execute the method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Video generation method and device, equipment and storage medium
CN114242070A
Virtual object display method and device, equipment, storage medium and program product
CN115237248A
Video processing method and device, equipment, medium and program product
CN115952317A
Video generation method and device, equipment and storage medium
CN115967833A
Video processing method and device, computer equipment and computer readable storage medium
CN116012753A
