Video generation method, device, medium and electronic device
By extracting the visual and semantic features of web page elements, automatically matching video materials and generating videos, it solves the high cost and complex problems of converting web content into videos in the existing technology, achieves fast and automatic video generation, and improves video quality and efficiency. .
Patent Information
- Application Number
- CN202210432243.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2042-04-22
AI Technical Summary
At this stage, the process of converting web content into videos relies on manual or semi-automatic methods of human-computer interaction, which results in high cost, long cycle and high complexity, and cannot meet the needs of a large number of content conversions.
By obtaining the webpage elements of the target webpage, extracting its visual features and semantic features, determining the video material that matches the webpage, and generating the target video based on the material and elements, it achieves rapid and automatic generation of webpage content to video.
It greatly reduces user operation costs and video production costs, realizes automatic recall of video materials, improves the quality of video generation, can quickly and automatically generate web content into videos, reduces manual participation, and improves the efficiency and quality of video generation.
Smart Images

Figure CN114786069B
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of data processing technology, and more specifically, to a video generation method, apparatus, medium, and electronic device. Background Technology
[0002] Currently, information on the internet typically exists in the form of text, images, audio, and video. Among these, video information, with its rich content presentation, visualization, and intuitiveness, is often used by users as the primary way to understand things. Therefore, users want to convert traditional web page content into short videos to meet their promotional and conversion goals in the short video field. At present, for web page content, video generation is mainly done manually or through semi-automated methods of human-computer interaction, which is costly, time-consuming, and complex. Summary of the Invention
[0003] This summary section is provided to briefly introduce the concepts, which will be described in detail in the detailed description section below. This summary section is not intended to identify key or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0004] In a first aspect, this disclosure provides a video generation method, comprising: acquiring web page elements of a target web page; extracting visual and semantic features of the web page elements; determining video material matching the target web page based on the web page elements, the visual features, and the semantic features; and generating a target video based on the video material and the web page elements.
[0005] Secondly, this disclosure provides a video generation apparatus, comprising: an acquisition module for acquiring web page elements of a target web page; an extraction module for extracting visual and semantic features of the web page elements acquired by the acquisition module; a determination module for determining video material matching the target web page based on the web page elements, visual features, and semantic features extracted by the extraction module; and a generation module for generating a target video based on the video material determined by the determination module and the web page elements extracted by the extraction module.
[0006] Thirdly, this disclosure provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the video generation method provided in the first aspect of this disclosure.
[0007] Fourthly, this disclosure provides an electronic device, comprising: a storage device having a computer program stored thereon; and a processing device for executing the computer program in the storage device to implement the steps of the video generation method provided in the first aspect of this disclosure.
[0008] In the above technical solution, after obtaining the web page elements of the target webpage, the visual and semantic features of the webpage elements are extracted. Then, based on the webpage elements, visual features, and semantic features, video materials matching the target webpage are determined. Finally, the target video is generated based on the video materials and webpage elements. This enables rapid and automatic generation from webpage content to video, greatly reducing user operational costs and saving video production costs. Furthermore, it allows for automatic retrieval of video materials without the need for manual collection, saving time and effort. Moreover, when determining the video materials for video generation, not only the webpage elements themselves and their visual features are considered, but also their deep semantic features, thereby extracting richer and more relevant video materials and improving the quality of the generated video.
[0009] Other features and advantages of this disclosure will be described in detail in the following detailed description section. Attached Figure Description
[0010] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote 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. In the drawings:
[0011] Figure 1 This is a flowchart illustrating a video generation method according to an exemplary embodiment.
[0012] Figure 2 This is a flowchart illustrating a method for generating a target video based on video footage and web page elements, according to an exemplary embodiment.
[0013] Figure 3 This is a flowchart illustrating a method for generating a target video based on video footage, web page elements, and a target video template, according to an exemplary embodiment.
[0014] Figure 4 This is a block diagram illustrating a video generation apparatus according to an exemplary embodiment.
[0015] Figure 5 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0016] As discussed in the background section, currently, web content is primarily generated into videos through manual or semi-automated methods involving human-computer interaction. Manual production is costly, time-consuming, and the quality of videos generated by different designers varies greatly, making it difficult to control and unable to meet the demand for converting large amounts of web content into videos. While semi-automated generation methods involving human-computer interaction can solve the efficiency problem to some extent, they still require human intervention, such as filtering content extracted from web pages, selecting video templates, and performing post-production video editing. Therefore, the production cost remains high.
[0017] In view of this, the present disclosure provides a video generation method, apparatus, medium and electronic device.
[0018] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0019] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.
[0020] The term "comprising" and its variations as used herein are open-ended inclusions, meaning "including but not limited to". The term "based on" means "at least partially based 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". Definitions of other terms will be given in the description below.
[0021] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0022] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0023] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0024] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.
[0025] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation 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 software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.
[0026] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.
[0027] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.
[0028] Meanwhile, it is understood 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 related provisions.
[0029] Figure 1 This is a flowchart illustrating a video generation method according to an exemplary embodiment. Figure 1 As shown, the method may include the following S101 to S104.
[0030] In S101, obtain the web page elements of the target web page.
[0031] In this disclosure, the target webpage can be any type of webpage, such as a blog, news site, or forum. Webpage elements can include static elements such as fonts, text, images, and links, as well as dynamic elements such as videos, special effects, and animated GIFs.
[0032] In S102, visual and semantic features of web page elements are extracted.
[0033] In this disclosure, visual features refer to the explicit attribute features of web page elements that can be directly obtained from the web page elements themselves, such as the color, visual size, and spatial coordinates of the web page elements. Specifically, the visual features of web page elements can be obtained by parsing the target web page.
[0034] Semantic features refer to the deeper semantic features obtained through further processing and mining of web page elements. Specifically, semantic features can include at least one of the following: the web page type of the target web page, the category of web page elements, the implicit attribute features of web page elements (e.g., the semantic representation of text), the spatial layout of the target web page, and the positional relationships between different elements in the web page.
[0035] For example, for text-based web page elements, categories such as action points and prices can be included; for image-based web page elements, categories such as images of people, animals, and landscapes can be included.
[0036] The spatial layout of a target webpage can include centered layout, grid layout, etc.; the positional relationships between different elements within the webpage can include parallel relationships, overlapping relationships, etc. Specifically, the spatial layout of the target webpage and the positional relationships between different elements within the webpage can be determined based on the spatial coordinates of the webpage elements.
[0037] In S103, video materials that match the target webpage are determined based on webpage elements, visual features, and semantic features.
[0038] In this disclosure, video materials matching a target webpage can be selected from a video material library based on webpage elements, visual features, and semantic features through feature matching. These video materials may include font files, stickers, music, images, etc.
[0039] In S104, the target video is generated based on the video footage and web page elements.
[0040] In the above technical solution, after obtaining the web page elements of the target webpage, the visual and semantic features of the webpage elements are extracted. Then, based on the webpage elements, visual features, and semantic features, video materials matching the target webpage are determined. Finally, the target video is generated based on the video materials and webpage elements. This enables rapid and automatic generation from webpage content to video, greatly reducing user operational costs and saving video production costs. Furthermore, it allows for automatic retrieval of video materials without the need for manual collection, saving time and effort. Moreover, when determining the video materials for video generation, not only the webpage elements themselves and their visual features are considered, but also their deep semantic features, thereby extracting richer and more relevant video materials and improving the quality of the generated video.
[0041] The following is a detailed description of the specific implementation method for obtaining webpage elements of the target webpage in S101 above. Specifically, it can be implemented in various ways. In one implementation, in response to receiving a page image containing the target webpage, image recognition technology is used to obtain the webpage content of the target webpage; then, webpage elements are extracted from the webpage content. In this way, users only need to input a screenshot of the webpage to automatically and quickly generate the corresponding video, which is convenient and fast, greatly reducing the user's operating costs.
[0042] In another implementation, in response to receiving a webpage link to a target webpage, the webpage content of the target webpage is obtained based on the webpage link; then, webpage elements are extracted from the webpage content. In this way, users only need to enter a webpage link to automatically and quickly generate the corresponding video, which is convenient, fast, and greatly reduces the user's operational costs.
[0043] Specifically, based on webpage links, the content of a target webpage can be obtained in the following way: First, the webpage corresponding to the webpage link of the target webpage is loaded and rendered; then, the content of the webpage is crawled using headless browser technology or web crawling technology.
[0044] The following is a detailed explanation of how to determine the webpage type of the target webpage mentioned above. Specifically, this can be achieved in the following ways:
[0045] First, based on natural language processing and visual understanding, the implicit attribute features of web page elements are extracted, and the categories of web page elements are determined; then, based on the categories and implicit attribute features of web page elements, the web page type of the target web page is determined.
[0046] Furthermore, when the target webpage includes video, the aforementioned semantic features can also include highlight segments from the video. This allows highlight segments to be used for feature matching when identifying video materials that match the target webpage, improving the efficiency, richness, and accuracy of video material selection.
[0047] The following provides a detailed explanation of the specific implementation method for generating the target video based on video materials and web page elements in S104 above. Specifically, it can be achieved through... Figure 2 This is achieved through S201 and S202 shown in the diagram.
[0048] In S201, obtain the target video template.
[0049] In one implementation, a preset video template can be used as the target video template.
[0050] In another implementation, a target video template matching the target webpage can be determined from a video template library based on webpage elements, visual features, and semantic features. This allows for a better match between the target video template and the webpage content, improving the quality of subsequent video generation.
[0051] Additionally, it should be noted that one or more target video templates can be obtained; this disclosure does not impose any specific limitations.
[0052] In S202, the target video is generated based on the video footage, web page elements, and the target video template.
[0053] In one implementation, step S201 obtains a target video template. Web page materials and elements are then filled into the target video template. Following this, temporal and spatial rendering of the video is performed to generate the target video. In the temporal domain, the independent variable is time; that is, the horizontal axis represents time, and the vertical axis represents signal change. The spatial domain, also known as the pixel domain, involves pixel-level processing, such as pixel-level image overlay.
[0054] In another implementation, multiple candidate videos can be generated based on video footage, web page elements, and a target video template, and these candidate videos can be directly used as the target video. This ensures the diversity of generated videos to meet the needs of different users.
[0055] In yet another implementation, it can be achieved by... Figure 3 The target video is generated using steps S301 to S304 as shown.
[0056] In S301, multiple candidate videos are generated based on video footage, web page elements, and the target video template.
[0057] In S302, the video description information for each candidate video is obtained.
[0058] In this disclosure, for each candidate video, a target number of image frames and audio information in the candidate video can be obtained; then, the target number of image frames and audio information in the candidate video are analyzed to obtain video description information of the candidate video.
[0059] The video description information can be a text used to describe the candidate video. For example, if the candidate video is a video of visiting West Lake, the video description information can be "West Lake Tourism".
[0060] The video description information can also be text for describing the characteristics of the video. For example, when the candidate video matches the currently popular online language, for example, when online languages such as "panta" appear in the candidate video, the video description information can be "panta".
[0061] In S303, for each candidate video, based on the candidate video and its video description information, predict the aesthetic quality and / or placement effect of the candidate video to obtain the prediction result of the candidate video.
[0062] In the present disclosure, aesthetic quality is a discipline with the study of the essence and meaning of beauty as the theme and is an important branch of philosophy.
[0063] In S304, based on the prediction result of each candidate video, determine N candidate videos from multiple candidate videos as the target videos.
[0064] In the present disclosure, N≥1.
[0065] In the above embodiment, screening multiple candidate videos based on aesthetic quality can make the target videos meet visual aesthetics. In addition, screening multiple candidate videos based on the placement effect (i.e., placement performance) can make the target videos achieve better placement effects.
[0066] The following details the specific implementation manner of generating multiple candidate videos according to the video material, web page elements, and target video template above. Specifically, it can be implemented in multiple ways. In one implementation manner, when the above S201 obtains multiple target video templates, for each target video template, fill the web page material and web page elements into the target video template, and then perform the rendering generation in the time domain and space domain of the video to obtain multiple candidate videos.
[0067] In another implementation manner, when the above S201 obtains one target video template, different web page materials and web page elements can be filled into the target video template each time, and then perform the rendering generation in the time domain and space domain of the video to obtain multiple candidate videos.
[0068] The following details the specific implementation manner of predicting the aesthetic quality and / or placement effect of the candidate video based on the candidate video and its video description information in S303 above to obtain the prediction result of the candidate video.
[0069] In one implementation, the aesthetic quality of the candidate video can be predicted based on the candidate video and its video description information to obtain an aesthetic quality score, which is then used as the prediction result for the candidate video. Specifically, the candidate video and its video description information can be input into a pre-trained aesthetic quality prediction model to obtain the aesthetic quality score corresponding to the candidate video.
[0070] In another implementation, the delivery performance of the candidate video can be predicted based on the candidate video and its video description information to obtain a delivery performance score, which is then used as the prediction result for the candidate video. Specifically, the candidate video and its video description information can be input into a pre-trained delivery performance prediction model to obtain the delivery performance score corresponding to the candidate video.
[0071] In another embodiment, the aesthetic quality and delivery effect of the candidate video can be predicted based on the candidate video and its video description information, respectively, to obtain the aesthetic quality score and delivery effect score corresponding to the candidate video. Then, the sum of the aesthetic quality score and the delivery effect score corresponding to the candidate video is taken as the prediction result of the candidate video.
[0072] Figure 4 This is a block diagram illustrating a video generation apparatus according to an exemplary embodiment. Figure 4 As shown, the device 400 may include:
[0073] Module 401 is used to obtain web page elements of the target web page;
[0074] Extraction module 402 is used to extract the visual and semantic features of the web page elements obtained by acquisition module 401;
[0075] The determining module 403 is used to determine video material that matches the target webpage based on the webpage elements, visual features, and semantic features extracted by the extraction module 402.
[0076] The generation module 403 is used to generate a target video based on the video material determined by the determining module 403 and the web page elements extracted by the extraction module 402.
[0077] In the above technical solution, after obtaining the web page elements of the target webpage, the visual and semantic features of the webpage elements are extracted. Then, based on the webpage elements, visual features, and semantic features, video materials matching the target webpage are determined. Finally, the target video is generated based on the video materials and webpage elements. This enables rapid and automatic generation from webpage content to video, greatly reducing user operational costs and saving video production costs. Furthermore, it allows for automatic retrieval of video materials without the need for manual collection, saving time and effort. Moreover, when determining the video materials for video generation, not only the webpage elements themselves and their visual features are considered, but also their deep semantic features, thereby extracting richer and more relevant video materials and improving the quality of the generated video.
[0078] Optionally, the semantic features include at least one of the following: the webpage type of the target webpage, the category of the webpage elements, the implicit attribute features of the webpage elements, the spatial layout of the target webpage, and the positional relationship between different elements in the webpage.
[0079] Optionally, if the target webpage includes a video, the semantic feature also includes highlight segments of the video.
[0080] Optionally, the semantic features include the webpage type of the target webpage;
[0081] The extraction module 401 includes:
[0082] The first determination submodule is used to extract the latent attribute features of the web page elements and determine the category of the web page elements based on natural language processing and visual understanding.
[0083] The second determining submodule is used to determine the webpage type of the target webpage based on the category and the implicit attribute features.
[0084] Optionally, the generation module 404 includes:
[0085] The first acquisition submodule is used to acquire the target video template;
[0086] The first generation submodule is used to generate a target video based on the video material, the web page elements, and the target video template.
[0087] Optionally, the first acquisition submodule is used to determine a target video template that matches the target webpage based on the webpage elements, the visual features, and the semantic features.
[0088] Optionally, the first generation submodule includes:
[0089] The second generation submodule is used to generate multiple candidate videos based on the video material, the web page elements, and the target video template;
[0090] The second acquisition submodule is used to acquire video description information for each of the candidate videos;
[0091] The prediction submodule is used to predict the aesthetic quality and / or delivery effect of each candidate video based on the candidate video and its video description information, and to obtain the prediction result of the candidate video.
[0092] The third determining submodule is used to determine N candidate videos from the plurality of candidate videos as target videos based on the prediction results of each candidate video, where N≥1.
[0093] Optionally, the acquisition module 401 includes:
[0094] The third acquisition submodule is used to acquire the webpage content of the target webpage based on the webpage link received in response to receiving the webpage link of the target webpage.
[0095] The extraction submodule is used to extract web page elements from the web page content.
[0096] This disclosure also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processing device, implements the steps of the video generation method described above.
[0097] The following is for reference. Figure 5 The diagram illustrates a structural schematic of an electronic device (e.g., a terminal device or a server) 600 suitable for implementing embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0098] like Figure 5As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0099] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 The electronic device 600 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0100] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined in the methods of embodiments of this disclosure.
[0101] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport 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 thereof.
[0102] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0103] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0104] The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: acquire web page elements of a target web page; extract visual and semantic features of the web page elements; determine video material matching the target web page based on the web page elements, the visual features, and the semantic features; and generate a target video based on the video material and the web page elements.
[0105] Computer program code for performing the operations of this disclosure can 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, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone 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 remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0106] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0107] The modules described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a module does not necessarily limit the module itself; for example, an acquisition module can also be described as "a module for acquiring web page elements of a target web page".
[0108] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0109] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0110] According to one or more embodiments of this disclosure, Example 1 provides a video generation method, including: acquiring web page elements of a target web page; extracting visual and semantic features of the web page elements; determining video material matching the target web page based on the web page elements, the visual features, and the semantic features; and generating a target video based on the video material and the web page elements.
[0111] According to one or more embodiments of this disclosure, Example 2 provides the method of Example 1, wherein the semantic features include at least one of the following: the webpage type of the target webpage, the category of the webpage element, the implicit attribute features of the webpage element, the spatial layout of the target webpage, and the positional relationship between different elements in the webpage element.
[0112] According to one or more embodiments of this disclosure, Example 3 provides the method of Example 2, wherein, when the target webpage includes a video, the semantic feature further includes highlight segments of the video.
[0113] According to one or more embodiments of this disclosure, Example 4 provides the method of Example 2, wherein the semantic features include the webpage type of the target webpage; the webpage type is determined by: extracting the latent attribute features of the webpage elements based on natural language processing and visual understanding, and determining the category of the webpage elements; and determining the webpage type of the target webpage according to the category and the latent attribute features.
[0114] According to one or more embodiments of this disclosure, Example 5 provides a method described in any one of Examples 1-4, wherein generating a target video based on the video material and the web page elements includes: obtaining a target video template; and generating a target video based on the video material, the web page elements, and the target video template.
[0115] According to one or more embodiments of this disclosure, Example 6 provides the method of Example 5, wherein obtaining the target video template includes: determining a target video template that matches the target webpage based on the webpage elements, the visual features, and the semantic features.
[0116] According to one or more embodiments of this disclosure, Example 7 provides the method of Example 5, wherein generating a target video based on the video material, the web page elements, and the target video template includes: generating a plurality of candidate videos based on the video material, the web page elements, and the target video template; obtaining video description information for each candidate video; for each candidate video, predicting the aesthetic quality and / or delivery effect based on the candidate video and the video description information of the candidate video, and obtaining a prediction result for the candidate video; and determining N candidate videos from the plurality of candidate videos as target videos based on the prediction results of each candidate video, wherein N≥1.
[0117] According to one or more embodiments of this disclosure, Example 8 provides a method according to any one of Examples 1-4, wherein obtaining web page elements of a target web page includes: in response to receiving a web page link of a target web page, obtaining web page content of the target web page according to the web page link; and extracting web page elements from the web page content.
[0118] According to one or more embodiments of this disclosure, Example 9 provides a video generation apparatus, comprising: an acquisition module for acquiring web page elements of a target web page; an extraction module for extracting visual and semantic features of the web page elements acquired by the acquisition module; a determination module for determining video material matching the target web page based on the web page elements, the visual features, and the semantic features extracted by the extraction module; and a generation module for generating a target video based on the video material determined by the determination module and the web page elements extracted by the extraction module.
[0119] According to one or more embodiments of the present disclosure, Example 10 provides a computer-readable medium having a computer program stored thereon that, when executed by a processing device, implements the steps of the method described in any one of Examples 1-8.
[0120] According to one or more embodiments of this disclosure, Example 11 provides an electronic device including: a storage device having a computer program stored thereon; and a processing device for executing the computer program in the storage device to implement the steps of any one of Examples 1-8.
[0121] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0122] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0123] Although the subject matter has been described using language specific to structural features and / or methodological logic, 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. Rather, the specific features and actions described above are merely illustrative forms of implementing the claims. Regarding the apparatus in the above embodiments, the specific manner in which the various modules perform their operations has been described in detail in the embodiments relating to the method, and will not be elaborated upon here.
Claims
1. A video generation method, characterized in that: include: Get the web page elements of the target web page; Extracting visual features and semantic features of the web page elements, wherein the semantic features refer to deep semantic features obtained by further processing and mining the web page elements, and the semantic features include at least one of the web page type of the target web page, the category of the web page elements, the latent attribute features of the web page elements, the spatial layout of the target web page, and the positional relationship between different elements in the web page elements; According to the web page elements, the visual features and the semantic features, the video material matching the target web page is selected from the video material library by feature matching; Get the target video template; Generate multiple candidate videos according to the video material, the web page element and the target video template; Obtaining video description information of each of the candidate videos; For each of the candidate videos, predict the aesthetic quality and / or delivery effect of the candidate video according to the candidate video and the video description information of the candidate video to obtain a prediction result of the candidate video; According to the prediction result of each of the candidate videos, N candidate videos are determined from the multiple candidate videos as target videos, where N≥1.
2. The method according to claim 1, characterized in that In the case that the target webpage includes a video, the semantic feature further includes a highlight segment of the video.
3. The method according to claim 1, characterized in that The semantic feature includes the webpage type of the target webpage; The web page type is determined by: Based on natural language processing and visual understanding, extract the latent attribute features of the web page elements and determine the categories of the web page elements; The webpage type of the target webpage is determined according to the category and the latent attribute feature.
4. The method according to claim 1, characterized in that: The step of obtaining a target video template includes: A target video template matching the target web page is determined according to the web page elements, the visual features, and the semantic features.
5. The method according to any one of claims 1 to 3, characterized in that: The step of obtaining the webpage elements of the target webpage includes: In response to receiving a webpage link of a target webpage, acquiring webpage content of the target webpage according to the webpage link; Extracting web page elements from the web page content.
6. A video generating device, characterized in that: include: An acquisition module, used to acquire web page elements of a target web page; An extraction module, used to extract visual features and semantic features of the web page elements acquired by the acquisition module, wherein the semantic features refer to deep semantic features obtained by further processing and mining the web page elements, and the semantic features include at least one of the web page type of the target web page, the category of the web page elements, the latent attribute features of the web page elements, the spatial layout of the target web page, and the positional relationship between different elements in the web page elements; A determination module, configured to select video materials matching the target web page from a video material library by feature matching according to the web page elements, the visual features and the semantic features extracted by the extraction module; A generating module, configured to generate a target video according to the video material determined by the determining module and the web page element extracted by the extracting module; Wherein, the generating module comprises: The first acquisition submodule is used to acquire a target video template; A first generating submodule, used for generating a target video according to the video material, the web page element and the target video template; The first generation submodule comprises: A second generation submodule, used to generate a plurality of candidate videos according to the video material, the web page element and the target video template; A second acquisition submodule is used to acquire video description information of each candidate video; A prediction submodule, for predicting the aesthetic quality and / or delivery effect of each candidate video according to the candidate video and video description information of the candidate video, to obtain a prediction result of the candidate video; The third determination submodule is used to determine N candidate videos from the multiple candidate videos as target videos according to the prediction result of each candidate video, where N≥1.
7. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processing device, the steps of the method described in any one of claims 1 to 5 are implemented.
8. An electronic device, characterized in that: include: a storage device having a computer program stored thereon; A processing device, configured to execute the computer program in the storage device to implement the steps of the method according to any one of claims 1 to 5.
