WO2025130705A1 - 用于生成视频的方法、装置、设备和介质 - Google Patents

用于生成视频的方法、装置、设备和介质 Download PDF

Info

Publication number
WO2025130705A1
WO2025130705A1 PCT/CN2024/138191 CN2024138191W WO2025130705A1 WO 2025130705 A1 WO2025130705 A1 WO 2025130705A1 CN 2024138191 W CN2024138191 W CN 2024138191W WO 2025130705 A1 WO2025130705 A1 WO 2025130705A1
Authority
WO
WIPO (PCT)
Prior art keywords
special effect
loading
interface
response
algorithm
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
PCT/CN2024/138191
Other languages
English (en)
French (fr)
Inventor
程景亮
景运鹏
厉维凯
马佳欣
陈静洁
唐萱
彭浩翔
高国栋
张远铭
王首尧
李爽
邱韦融
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zitiao Network Technology Co Ltd
Lemon Inc Cayman Island
Original Assignee
Beijing Zitiao Network Technology Co Ltd
Lemon Inc Cayman Island
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zitiao Network Technology Co Ltd, Lemon Inc Cayman Island filed Critical Beijing Zitiao Network Technology Co Ltd
Publication of WO2025130705A1 publication Critical patent/WO2025130705A1/zh
Anticipated expiration legal-status Critical
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream or rendering scenes according to encoded video stream scene graphs
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/443OS processes, e.g. booting an STB, implementing a Java virtual machine in an STB or power management in an STB
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/47End-user applications
    • H04N21/472End-user interface for requesting content, additional data or services; End-user interface for interacting with content, e.g. for content reservation or setting reminders, for requesting event notification, for manipulating displayed content

Definitions

  • Exemplary implementations of the present disclosure relate generally to video processing, and more particularly to methods, devices, apparatuses, and computer-readable storage media for generating videos.
  • Computer vision technology has been developed rapidly, and a large number of media editing tools have been developed. For example, a user can take a photo and/or a video, and can use a variety of special effects interfaces to perform an editing process at a client device to generate a new image and/or video.
  • the processing power of the client device is relatively limited, so it is desirable to call on the powerful processing power of the server device to generate images and/or videos with better visual effects.
  • a method for generating a video is provided.
  • a processing page for processing an input image is presented at a client device.
  • a special effect interface is loaded, and the special effect interface is used to call a special effect algorithm at a server device corresponding to the client device to generate an output video with a predetermined special effect based on the input image.
  • an editing page for editing the output video is presented.
  • a device for generating a video includes: a first rendering module configured to render a processing page for processing an input image at a client device; a loading module configured to load a special effect interface in response to receiving a loading request for the processing page, the special effect interface being used to call a special effect algorithm at a server device corresponding to the client device to generate an output video with a predetermined special effect based on the input image; and a second rendering module configured to render an editing page for editing the output video in response to determining that the loading status of the special effect interface is successful.
  • an electronic device in a third aspect of the present disclosure, includes: at least one processing unit; and at least one memory, the at least one memory is coupled to the at least one processing unit and stores instructions for execution by the at least one processing unit, and when the instructions are executed by the at least one processing unit, the electronic device executes the method according to the first aspect of the present disclosure.
  • a computer-readable storage medium on which a computer program is stored.
  • the processor implements the method according to the first aspect of the present disclosure.
  • FIG1 shows a block diagram of an application environment according to an exemplary implementation of the present disclosure
  • FIG2 shows a block diagram for generating a video according to some implementations of the present disclosure
  • FIG3 shows a block diagram of a process for loading a special effect interface according to some implementations of the present disclosure
  • FIG4 shows a block diagram of an edit page according to some implementations of the present disclosure
  • FIG5 shows a block diagram of an edit page according to some implementations of the present disclosure
  • FIG6 illustrates a track diagram of an interactive process for generating a video according to some implementations of the present disclosure
  • FIG7 shows a flowchart of a method for generating a video according to some implementations of the present disclosure
  • FIG8 shows a block diagram of an apparatus for generating a video according to some implementations of the present disclosure.
  • FIG. 9 shows a block diagram of a device capable of implementing various implementations of the present disclosure.
  • model can represent the association relationship between various data. For example, the above-mentioned association relationship can be obtained based on a variety of technical solutions currently known and/or to be developed in the future.
  • 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.
  • 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.
  • the prompt information in response to receiving an active request from the user, is sent to the user in a manner such as a pop-up window, in which the prompt information can be presented in text form.
  • the pop-up window can also carry a selection control for the user to choose "agree” or “disagree” to provide personal information to the electronic device.
  • the term "in response to” as used herein refers to a state in which a corresponding event occurs or a condition is satisfied. It will be understood that the timing of executing a subsequent action executed in response to the event or condition is not necessarily strongly related to the time when the event occurs or the condition is satisfied. For example, in some cases, the subsequent action may be executed immediately when the event occurs or the condition is satisfied; while in other cases, the subsequent action may be executed some time after the event occurs or the condition is satisfied.
  • FIG. 1 shows a block diagram 100 of an application environment according to an exemplary implementation of the present disclosure.
  • a media editing tool can be run at a client device, and the tool can, for example, provide a page 110 as shown in FIG. 1.
  • a user can use the tool to process an input image 120.
  • the input image 120 can, for example, be a captured image or an image obtained locally or remotely in other ways.
  • the media editing tool may provide various special effect controls (also referred to as special effect props), for example, a user may use the local special effect controls 130 to locally process an input image to generate a new image and/or video.
  • special effect controls also referred to as special effect props
  • the processing capability of the client device is relatively limited, and thus it is desirable to call upon the powerful processing capability of the server device to generate an image and/or video with better visual effects.
  • FIG. 2 shows a block diagram 200 for generating a video according to some implementations of the present disclosure.
  • a processing page 210 for processing an input image 220 may be presented at a client device.
  • the processing page 210 may include one or more special effects controls, for example, a local special effects control 130 may be provided to process the input image 220 locally.
  • a remote special effects control 230 may be provided to load a special effects interface, thereby calling a special effects algorithm located at a server device to process the input image 220.
  • the special effects interface can be implemented by a variety of programming languages, and represents a process and/or function implemented at a client device, so as to be used as an intermediary between a client device and a server device to call a special effects algorithm provided by a server device at the client device.
  • the special effects interface may include special effects tools, special effects props, or other forms for calling special effects algorithms at a server device.
  • a special effects interface in the case of receiving a load request for a processing page, a special effects interface can be loaded at a client device.
  • a user can click on a remote special effects control 230 to submit a load request, at which time the loaded special effects interface can call a special effects algorithm 242 from a server device 240.
  • the special effects algorithm 242 is specified by a load request and is used to generate an output video with a predetermined special effect based on an input image 220.
  • FIG. 2 schematically shows only one remote special effect control 230
  • the processing page 210 may include one or more remote special effect controls; alternatively and/or additionally, after the user clicks the remote special effect control 230, a panel including multiple special effect controls may pop up for the user to select. Further, when it is determined that the loading status of the special effect interface is successful, an editing page 250 for editing the output video may be presented.
  • the user can perform browsing and various functional editing operations in the editing page 250.
  • the user can drag the progress bar control 254 of the video to change the currently presented image frame.
  • the editing page 250 can support the user to present the switching logic of any image frame. That is, no matter which image frame the user switches to, the presented effect is correct. In this way, it can be ensured that the user can access the visual effects generated by the remote special effects algorithm at the server at the client, thereby providing the user with a richer interactive experience and better visual effects.
  • an edit page 250 may include: a preview area 252 for presenting an output video, and management controls for managing the playback of the output video.
  • the preview area 252 may provide a visual effect of the output video
  • the management controls may include, for example, a progress bar control 254, and a toggle control 256 for controlling the start of playback and the pause of playback.
  • the user may control which image frame is presented in the preview area 252. In this way, it is convenient for the user to check frame by frame whether the visual effect meets expectations, and edit the output video frame by frame.
  • a loading page indicating the loading progress of the special effects interface can be presented. See Figure 3 for more details, which shows a block diagram 300 of the process for loading the special effects interface according to some implementations of the present disclosure.
  • an edit page 310 can be presented in the process of loading the special effects interface, at which time the preview area 252 can present the input image, and a loading page 320 can be presented, which can, for example, indicate the progress of the loading process.
  • the proportion of the loading can be presented to the user in the form of a progress bar and/or percentage, etc., so that the user can easily predict the waiting time and then reasonably arrange the subsequent operations.
  • a prompt message indicating that the loading is successful can be presented.
  • a prompt message indicating that the loading is failed is presented. In this way, the user can be clearly reminded of the current loading status, thereby facilitating the user to determine the subsequent operation steps.
  • a cache area can be created at the client device.
  • the cache area can be used to cache multiple algorithm parameters from the special effects algorithm.
  • a cache directory can be created by the client of the media editing tool, and the directory can be located at a specified location of the client: "*** ⁇ cache" or other location.
  • the client can notify the local software development tool (SDK) to load the special effects interface, and then the SDK will execute the specific process of loading the special effects interface.
  • the client can set the cache path of the algorithm, that is, the path of the cache directory created above.
  • the client can perform the processing of the preprocessing stage, that is, multiple algorithm parameters for generating each image frame in the output video can be obtained one by one from the server device.
  • multiple algorithm parameters can be written into the cache area, and multiple algorithm parameters can be used to generate multiple image frames in the output video.
  • the algorithm parameters can be obtained from the server device using the loaded special effects interface.
  • Each algorithm parameter can be downloaded from the server device.
  • the algorithm parameters here refer to a generalized concept, and the algorithm parameters may include a set of parameters (for example, one or more). It should be understood that for each special effects interface, the length of the output video is fixed. Assuming that the output video includes N image frames, the required algorithm parameters can be downloaded from the server device, and then the corresponding image frames can be generated based on the position of each image frame in the video.
  • the target algorithm parameters among the multiple algorithm parameters can be obtained from the server device via the special effect interface, and then the target algorithm parameters are written into the cache area.
  • it is necessary to call it is only necessary to search from the local cache directory of the client device without downloading from the server. In this way, the subsequent waiting time can be reduced, thereby improving the processing speed of the video editing process.
  • the target algorithm parameters are acquired from the server device only when it is determined that the target algorithm parameters do not exist in the cache area.
  • the cache directory can reduce the frequency of accessing the server device, thereby acquiring various algorithm parameters in a more efficient manner.
  • each image frame in the output video can be edited in the editing page.
  • the target position of the target image frame to be presented in the preview area in the output video can be determined. Then, using multiple algorithm parameters corresponding to the special effects interface that has been loaded locally on the client device, a target image frame corresponding to the target position is generated, and then the target image frame is presented in the preview area 252.
  • FIG. 4 shows a block diagram 400 of an editing page according to some implementations of the present disclosure.
  • an editing page 410 as shown in FIG. 4 may be presented.
  • the preview area 252 presents the initial input image, and the user may interact with the management controls. Specifically, the user may click the switch control 256 to start playing, or may adjust the progress bar control 254 to switch to a certain image frame.
  • the user may use the management controls to conveniently switch to any image frame, and then perform viewing and/or editing operations.
  • one or more editing tools may be presented at the box 420 of the editing page 410.
  • the user may use these editing tools to adjust the output video, for example, to add background music, text, etc. to the output video.
  • one or more other special effect interfaces may be presented at the box 420.
  • the user may select other special effect interfaces. At this time, if the selected special effect interface is a special effect interface on the server side, the special effect interface may be loaded from the server device, and then the special effect interface may be applied to the current input image, thereby generating a new output video.
  • the target image frame can be generated based on the target position of the target image frame. See FIG. 5 for more details, which shows a block diagram 500 of an editing page according to some implementations of the present disclosure.
  • the user can drag the progress bar control 254 to the position shown in FIG. 5 (e.g., the i-th image frame), and the target image frame can be generated based on the input image, the position i, and multiple algorithm parameters in the cache area.
  • the image at the i-th frame can be generated using multiple algorithm parameters obtained from the local cache area.
  • the preview area 252 will present the effect shown in FIG. 5 , where a lightning effect appears around the character.
  • the user can further adjust the progress bar control 254 to the position of the j-th frame.
  • the effect of the image frame 520 e.g., a black and white flip effect
  • a user can save an output video generated by the special effect interface; alternatively and/or additionally, the user can discard the output video.
  • the life cycle of the special effect interface ends and the special effect interface can be removed from the client device. In this way, it is possible to avoid the special effect interface that is no longer used from occupying various resources of the client device.
  • a user can switch the input image currently being processed.
  • the cache area can be cleared. It should be understood that the algorithm parameters in the cache area are dedicated to a specific input image, so when the input image is changed, the algorithm parameters in the cache area are no longer valid, and thus these parameters should be cleared to avoid occupying the local storage space of the client device.
  • the special effects interface is loaded from the server device only when it is determined that the special effects algorithm selected by the user is of a remote type. In this way, multiple types of special effects interfaces can be maintained at the media editing tool, thereby facilitating providing users with richer visual processing effects.
  • FIG6 shows a track diagram 600 of the interactive process for generating a video according to some implementations of the present disclosure.
  • the client 630 can represent a client of a media editing tool installed at a client device
  • the software development kit 632 represents various functions that the client 630 can call
  • the special effects interface 634 represents a conversion tool for converting an input image to an output video with the help of a special effects algorithm at a server
  • the cache target 636 represents a directory at a predetermined location at the client device.
  • the entire interactive process can be divided into a preprocessing stage 640 and a tool use stage 642.
  • the main function of the preprocessing stage 640 is to load the tool, access the server through the tool to obtain the algorithm parameters or read the algorithm parameters that have been cached locally, and send a message to the client to let the client know whether the algorithm parameters required for the normal operation of the tool have been obtained.
  • the user can use the loaded special effects interface normally, move the playback progress bar to any frame and view the effect.
  • a user 638 may load 601 a special effects interface.
  • the client 630 may create 602 a local cache directory based on the loading operation. Then, the client 630 may notify 603 a software development kit 632 to perform the loading process, and the software development kit 632 may load 604 the special effects interface.
  • the client 630 may set 605 a cache directory for caching algorithm parameters, and perform 606 preprocessing.
  • the server device may be accessed 610 and a corresponding plurality of algorithm parameters may be obtained.
  • the obtained algorithm parameters may be written 611 to a cache directory.
  • the cache directory 636 may return 612 a success message to the client 630.
  • the special effects interface 634 will return 613 a failure message and may display 614 the failure message to the user.
  • the special effects interface 634 accesses the server device only if the desired algorithm parameters do not exist in the cache directory. If the desired algorithm parameters exist in the cache directory, the special effects interface 634 can directly read 615 the cache directory. The cache directory 636 can return the stored algorithm parameters to the special effects interface 634, and the special effects interface 634 will return 617 a success message to the client 630. At this point, the pre-processing stage 640 ends, and all the algorithm parameters required for special effects processing have been included in the cache directory.
  • the user can move 620 the progress bar to any position in the target video.
  • the client 630 can find 621 the corresponding video frame (for example, the i-th frame). Then, the required algorithm parameters can be directly obtained from the cache directory, and the i-th image frame can be generated based on the input image and position i. If the user no longer uses the special effects interface loaded 622, the client 630 can notify 623 the software development kit 632 to perform uninstallation, and then the software development kit 632 can uninstall 624 the special effects interface 634. Alternatively and/or additionally, if the user changes 624 the input image, the client 630 can delete 626 the cache directory.
  • the algorithm parameters at the server can be acquired in advance in the preprocessing stage, thereby ensuring the high-speed operation of the special effect interface. Furthermore, the cache directory can reduce the number of accesses to the server device.
  • the cache directory includes the algorithm parameters that are input in the same way, so the user waiting time can be reduced by reusing the algorithm parameters.
  • FIG7 shows a flow chart of a method 700 for generating a video according to some implementations of the present disclosure.
  • a processing page for processing an input image is presented at a client device.
  • a special effect interface is loaded, the special effect interface being used to call a special effect algorithm at a server device corresponding to the client device to generate an output video with a predetermined special effect based on the input image.
  • an editing page for editing the output video is presented.
  • the editing page includes: a preview area for presenting an output video, and a management control for managing playback of the output video.
  • the method further includes: in response to receiving a management request for a management control, determining a target position in the output video of a target image frame to be presented in the preview area; generating a target image frame corresponding to the target position using a special effects interface; and presenting the target image frame in the preview area.
  • the method further includes: presenting a loading page indicating the loading progress of the special effect interface.
  • loading a special effect interface includes: creating a cache area at a client device; and writing a plurality of algorithm parameters generated by the special effect algorithm into the cache area.
  • writing multiple algorithm parameters into the cache area includes: acquiring target algorithm parameters among the multiple algorithm parameters from the server device via the special effect interface; and writing the target algorithm parameters into the cache area.
  • acquiring the target algorithm parameter includes: in response to determining that the target algorithm parameter does not exist in the cache area, acquiring the target algorithm parameter from the server device.
  • generating a target image frame includes: generating the target image frame based on the target position using the multiple algorithm parameters.
  • the method further includes: in response to receiving an exit request for exiting the editing page, removing the special effect interface from the client device.
  • the method further includes: in response to receiving a switching request for switching the input image, clearing the cache area.
  • loading the special effect interface from the server further includes: in response to determining that the special effect algorithm is a remote type, loading the special effect interface from the server device.
  • the method further includes: in response to determining that the loading status of the special effect interface is failed, presenting prompt information indicating the loading failure.
  • the apparatus includes: a first rendering module 810, configured to render a processing page for processing an input image at a client device; a loading module 820, configured to load a special effect interface in response to receiving a loading request for the processing page, the special effect interface being used to call a special effect algorithm at a server device corresponding to the client device to generate an output video with a predetermined special effect based on the input image; and a second rendering module 830, configured to render an editing page for editing the output video in response to determining that the loading status of the special effect interface is successful.
  • the editing page includes: a preview area for presenting an output video, and a management control for managing playback of the output video.
  • the device further includes: a determination module, configured to determine a target position in the output video of a target image frame to be presented in the preview area in response to receiving a management request for a management control; a generation module, configured to generate a target image frame corresponding to the target position using a special effects interface; and an image presentation module, configured to present the target image frame in the preview area.
  • a determination module configured to determine a target position in the output video of a target image frame to be presented in the preview area in response to receiving a management request for a management control
  • a generation module configured to generate a target image frame corresponding to the target position using a special effects interface
  • an image presentation module configured to present the target image frame in the preview area.
  • the apparatus further includes: a third presentation module configured to present a loading page indicating a loading progress of the special effect interface.
  • the loading module includes: a creation module configured to create a cache area at a client device; and a writing module configured to write multiple algorithm parameters generated by the special effect algorithm into the cache area.
  • the writing module includes: a parameter acquisition module, configured to acquire target algorithm parameters among the multiple algorithm parameters from the server device via the special effects interface; and a parameter writing module, configured to write the target algorithm parameters into a cache area.
  • the parameter acquisition module includes: a remote acquisition module configured to acquire the target algorithm parameter from the server device in response to determining that the target algorithm parameter does not exist in the cache area.
  • the generating module includes: a reading module configured to generate the target image frame based on the target position by utilizing the multiple algorithm parameters.
  • the apparatus further includes: a removal module configured to remove the special effect interface from the client device in response to receiving an exit request for exiting the editing page.
  • the apparatus further includes: a switching module configured to clear the cache area in response to receiving a switching request for switching the input image.
  • the loading module includes: a remote loading module configured to load a special effect interface from a server device in response to determining that the special effect algorithm is a remote type.
  • the apparatus further includes: a fourth presentation module configured to present prompt information indicating a loading failure in response to determining that the loading status of the special effect interface is a failure.
  • FIG9 shows a block diagram of a device 900 capable of implementing multiple implementations of the present disclosure. It should be understood that the computing device 900 shown in FIG9 is merely exemplary and should not constitute any limitation on the functionality and scope of the implementations described herein. The computing device 900 shown in FIG9 can be used to implement the methods described above.
  • computing device 900 is in the form of a general-purpose computing device.
  • the components of computing device 900 may include, but are not limited to, one or more processors or processing units 910, memory 920, storage device 930, one or more communication units 940, one or more input devices 950, and one or more output devices 960.
  • Processing unit 910 may be an actual or virtual processor and is capable of performing various processes according to a program stored in memory 920. In a multi-processor system, multiple processing units execute computer executable instructions in parallel to improve the parallel processing capabilities of computing device 900.
  • the computing device 900 typically includes a plurality of computer storage media. Such media may be any available media accessible to the computing device 900, including but not limited to volatile and non-volatile media, removable and non-removable media.
  • the memory 920 may be a volatile memory (e.g., a register, a cache, a random access memory (RAM)), a non-volatile memory (e.g., a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), flash memory), or some combination thereof.
  • the storage device 930 may be a removable or non-removable medium, and may include a machine-readable medium, such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and/or data (e.g., training data for training) and may be accessed within the computing device 900.
  • a machine-readable medium such as a flash drive, a disk, or any other medium, which may be capable of being used to store information and/or data (e.g., training data for training) and may be accessed within the computing device 900.
  • the computing device 900 may further include additional removable/non-removable, volatile/non-volatile storage media.
  • a disk drive for reading or writing from a removable, non-volatile disk e.g., a “floppy disk”
  • an optical drive for reading or writing from a removable, non-volatile optical disk may be provided.
  • each drive may be connected to a bus (not shown) by one or more data media interfaces.
  • the memory 920 may include a computer program product 925 having one or more program modules configured to perform various methods or actions of various implementations of the present disclosure.
  • the communication unit 940 enables communication with other computing devices via a communication medium. Additionally, the functions of the components of the computing device 900 can be implemented in a single computing cluster or multiple computing machines that can communicate via a communication connection. Therefore, the computing device 900 can operate in a networked environment using a logical connection with one or more other servers, a network personal computer (PC), or another network node.
  • PC network personal computer
  • Input device 950 may be one or more input devices, such as a mouse, keyboard, tracking ball, etc.
  • Output device 960 may be one or more output devices, such as a display, a speaker, a printer, etc.
  • Computing device 900 may also communicate with one or more external devices (not shown) through communication unit 940 as needed, such as storage devices, display devices, etc., communicate with one or more devices that allow a user to interact with computing device 900, or communicate with any device that allows computing device 900 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input/output (I/O) interface (not shown).
  • I/O input/output
  • a computer-readable storage medium on which computer-executable instructions are stored, wherein the computer-executable instructions are executed by a processor to implement the method described above.
  • a computer program product is also provided, the computer program product is tangibly stored on a non-transitory computer-readable medium and includes computer-executable instructions, and the computer-executable instructions are executed by a processor to implement the method described above.
  • a computer program product is provided, on which a computer program is stored, and when the program is executed by a processor, the method described above is implemented.
  • These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions/actions specified in one or more boxes in the flowchart and/or block diagram is generated.
  • These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and/or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
  • Computer-readable program instructions can be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable data processing apparatus, or other device implement the functions/actions specified in one or more boxes in the flowchart and/or block diagram.
  • each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of a module, program segment or instruction includes one or more executable instructions for realizing the logical function of the specification.
  • the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved.
  • 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 realized by a special hardware-based system that performs the function or action of the specification, or can be realized by a combination of special hardware and computer instructions.

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Television Signal Processing For Recording (AREA)

Abstract

提供了用于生成视频的方法、装置、设备和介质。在一种方法中,在客户端设备处呈现用于处理输入图像的处理页面。响应于接收到针对处理页面的加载请求,加载特效接口,特效接口用于调用在与客户端设备相对应的服务器设备处的特效算法,来基于输入图像来生成具有预定特效的输出视频。响应于确定特效接口的加载状态为成功,呈现用于编辑输出视频的编辑页面。利用本公开的示例性实现方式,可以从服务器设备处预先加载具有强大视频编辑能力的特效接口,进而在客户端设备处获得更为丰富的视觉效果。

Description

用于生成视频的方法、装置、设备和介质
本申请要求2023年12月22日递交的、标题为“用于生成视频的方法、装置、设备和介质”、申请号为202311785540.0的中国发明专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本公开的示例性实现方式总体涉及视频处理,特别地涉及用于生成视频的方法、装置、设备和计算机可读存储介质。
背景技术
计算机视觉技术已经得到了飞速发展,目前已经开发出了大量媒体编辑工具。例如,用户可以拍摄照片和/或视频,并且可以使用多种特效接口来在客户端设备处执行编辑过程,以便生成新的图像和/或视频。然而,客户端设备的处理能力较为有限,因而期望调用服务器设备的强大处理能力来生成具有更好视觉效果的图像和/或视频。
发明内容
在本公开的第一方面,提供了一种用于生成视频的方法。在该方法中,在客户端设备处呈现用于处理输入图像的处理页面。响应于接收到针对处理页面的加载请求,加载特效接口,特效接口用于调用在与客户端设备相对应的服务器设备处的特效算法,来基于输入图像来生成具有预定特效的输出视频。响应于确定特效接口的加载状态为成功,呈现用于编辑输出视频的编辑页面。
在本公开的第二方面,提供了一种用于生成视频的装置。该装置包括:第一呈现模块,被配置用于在客户端设备处呈现用于处理输入图像的处理页面;加载模块,被配置用于响应于接收到针对处理页面的加载请求,加载特效接口,特效接口用于调用在与客户端设备相对应的服务器设备处的特效算法,来基于输入图像来生成具有预定特效的输出视频;以及第二呈现模块,被配置用于响应于确定特效接口的加载状态为成功,呈现用于编辑输出视频的编辑页面。
在本公开的第三方面,提供了一种电子设备。该电子设备包括:至少一个处理单元;以及至少一个存储器,至少一个存储器被耦合到至少一个处理单元并且存储用于由至少一个处理单元执行的指令,指令在由至少一个处理单元执行时使电子设备执行根据本公开第一方面的方法。
在本公开的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序在被处理器执行时使处理器实现根据本公开第一方面的方法。
应当理解,本内容部分中所描述的内容并非旨在限定本公开的实现方式的关键特征或重要特征,也不用于限制本公开的范围。本公开的其它特征将通过以下的描述而变得容易理解。
附图说明
在下文中,结合附图并参考以下详细说明,本公开各实现方式的上述和其他特征、优点及方面将变得更加明显。在附图中,相同或相似的附图标注表示相同或相似的元素,其中:
图1示出了根据本公开的一个示例性实现方式的应用环境的框图;
图2示出了根据本公开的一些实现方式的用于生成视频的框图;
图3示出了根据本公开的一些实现方式的用于加载特效接口的过程的框图;
图4示出了根据本公开的一些实现方式的编辑页面的框图;
图5示出了根据本公开的一些实现方式的编辑页面的框图;
图6示出了根据本公开的一些实现方式的用于生成视频的交互过程的轨道图;
图7示出了根据本公开的一些实现方式的用于生成视频的方法的流程图;
图8示出了根据本公开的一些实现方式的用于生成视频的装置的框图;以及
图9示出了能够实施本公开的多个实现方式的设备的框图。
具体实施方式
下面将参照附图更详细地描述本公开的实现方式。虽然附图中示出了本公开的某些实现方式,然而应当理解的是,本公开可以通过各种形式来实现,而且不应该被解释为限于这里阐述的实现方式,相反,提供这些实现方式是为了更加透彻和完整地理解本公开。应当理解的是,本公开的附图及实现方式仅用于示例性作用,并非用于限制本公开的保护范围。
在本公开的实现方式的描述中,术语“包括”及其类似用语应当理解为开放性包含,即“包括但不限于”。术语“基于”应当理解为“至少部分地基于”。术语“一个实现方式”或“该实现方式”应当理解为“至少一个实现方式”。术语“一些实现方式”应当理解为“至少一些实现方式”。下文还可能包括其他明确的和隐含的定义。如本文中所使用的,术语“模型”可以表示各个数据之间的关联关系。例如,可以基于目前已知的和/或将在未来开发的多种技术方案来获取上述关联关系。
可以理解的是,本技术方案所涉及的数据(包括但不限于数据本身、数据的获取或使用)应当遵循相应法律法规及相关规定的要求。
可以理解的是,在使用本公开各实施例公开的技术方案之前,均应当根据相关法律法规通过适当的方式对本公开所涉及个人信息的类型、使用范围、使用场景等告知用户并获得用户的授权。
例如,在响应于接收到用户的主动请求时,向用户发送提示信息,以明确地提示用户,其请求执行的操作将需要获取和使用到用户的个人信息。从而,使得用户可以根据提示信息来自主地选择是否向执行本公开技术方案的操作的电子设备、应用程序、服务器或存储介质等软件或硬件提供个人信息。
作为一种可选的但非限制性的实现方式,响应于接收到用户的主动请求,向用户发送提示信息的方式,例如可以是弹出窗口的方式,弹出窗口中可以以文字的方式呈现提示信息。此外,弹出窗口中还可以承载供用户选择“同意”或“不同意”向电子设备提供个人信息的选择控件。
可以理解的是,上述通知和获取用户授权过程仅是示意性的,不对本公开的实现方式构成限定,其他满足相关法律法规的方式也可应用于本公开的实现方式中。
在此使用的术语“响应于”表示相应的事件发生或者条件得以满足的状态。将会理解,响应于该事件或者条件而被执行的后续动作的执行时机,与该事件发生或者条件成立的时间,二者之间未必是强关联的。例如,在某些情况下,后续动作可在事件发生或者条件成立时立即被执行;而在另一些情况下,后续动作可在事件发生或者条件成立后经过一段时间才被执行。
示例环境
计算机视觉技术已经得到了飞速发展,目前已经开发出了大量媒体编辑工具。参见图1描述根据本公开的一个示例实现方式的应用环境,该图1示出了根据本公开的一个示例性实现方式的应用环境的框图100。可以在客户端设备处运行媒体编辑工具,该工具例如可以提供如图1所示的页面110。用户可以利用该工具来处理输入图像120。在此,输入图像120例如可以是拍摄的图像或者以其他方式从本地或者远程获取的图像。
媒体编辑工具可以提供各种特效控件(也称为特效道具),例如,用户可以使用本地特效控件130来在本地处理输入图像,以便生成新的图像和/或视频。然而,客户端设备的处理能力较为有限,因而期望调用服务器设备的强大处理能力来生成具有更好视觉效果的图像和/或视频。
生成视频的概要
为了至少部分地解决现有技术中的不足,根据本公开的一个示例性实现方式,提出了一种用于生成视频的方法。参见图2描述根据本公开的一个示例性实现方式的概要,图2示出了根据本公开的一些实现方式的用于生成视频的框图200。如图2所示,可以在客户端设备处呈现用于处理输入图像220的处理页面210。处理页面210可以包括一个或者多个特效控件,例如,可以提供本地特效控件130来以本地方式处理输入图像220。备选地和/或附加地,可以提供远程特效控件230来加载特效接口,从而调用位于服务器设备处的特效算法来处理输入图像220。
在本公开的上下文中,特效接口可以由多种编程语言来实现,并且表示在客户端设备处实现的过程和/或函数,以便用于作为客户端设备和服务器设备之间的中介,来在客户端设备处调用由服务器设备提供的特效算法。具体地,特效接口可以包括特效工具、特效道具、或者用于调用服务器设备处的特效算法的其他形式。根据本公开的一个示例实现方式,在接收到针对处理页面的加载请求的情况下,可以在客户端设备处加载特效接口。具体地,用户可以点击远程特效控件230来提交加载请求,此时所加载的特效接口可以从服务器设备240处调用特效算法242。该特效算法242是由加载请求指定的、并且用于基于输入图像220来生成具有预定特效的输出视频。
应当理解,尽管图2仅仅示意性示出了一个远程特效控件230,处理页面210可以包括一个或者多个远程特效控件;备选地和/或附加地,在用户点击远程特效控件230之后,还可以弹出包括多个特效控件的面板以便用户选择。进一步,在确定特效接口的加载状态为成功的情况下,可以呈现用于编辑输出视频的编辑页面250。
此时,用户可以在编辑页面250中执行浏览和各种功能编辑操作。例如,用户可以拖动视频的进度条控件254来改变当前所呈现的图像帧。在编辑页面250中可以支持用户呈现任意图像帧的切换逻辑。也即,无论用户切换至任何图像帧,所呈现的效果都是正确的。以此方式,可以确保用户在客户端处能够访问由服务器处的远程特效算法产生的视觉效果,由此向用户提供更为丰富的交互体验和更为优秀的视觉效果。
生成视频的详细过程
已经参见图2描述了根据本公开的一个示例实现方式的概要,在下文中,将提供有关生成视频的更多细节。根据本公开的一个示例实现方式,编辑页面250可以包括:用于呈现输出视频的预览区域252、以及用于管理输出视频的播放的管理控件。具体地,如图2所示,预览区域252可以提供输出视频的视觉效果,并且管理控件例如可以包括进度条控件254、以及用于控制启动播放和暂停播放的切换控件256。用户可以控制在预览区域252中呈现哪个图像帧。以此方式,可以便于用户逐帧查看视觉效果是否符合预期,并且逐帧编辑输出视频。
根据本公开的一个示例实现方式,在加载特效接口的过程中,可以呈现指示特效接口的加载进度的加载页面。参见图3描述更多细节,该图3示出了根据本公开的一些实现方式的用于加载特效接口的过程的框图300。如图3所示,在加载特效接口的过程中可以呈现编辑页面310,此时预览区域252可以呈现输入图像,并且可以呈现加载页面320,加载页面320例如可以指示加载过程的进度。可以以进度条和/或百分比等方式来向用户呈现已经加载的比例,以此方式,可以便于用户预测等待时间进而合理安排后续的操作。
根据本公开的一个示例实现方式,在确定特效接口的加载状态为成功的情况下,可以呈现指示加载成功的提示信息。类似地,在确定特效接口的加载状态为失败的情况下,呈现指示加载失败的提示信息。以此方式,可以明确地提醒用户当前的加载状态,从而便于用户确定后续的操作步骤。
根据本公开的一个示例实现方式,在加载特效接口的过程中,可以在客户端设备处创建缓存区域。该缓存区域可以用于缓存来自特效算法的多个算法参数。例如,在客户端设备处,可以由媒体编辑工具的客户端来创建缓存目录,该目录可以位于客户端的指定位置处:“***\cache”或者其他位置。进一步,客户端可以通知本地的软件开发工具(SDK)来加载特效接口,继而,SDK将会执行加载特效接口的具体过程。进一步,客户端可以设置算法的缓存路径,也即上文所创建的缓存目录的路径。进一步,客户端可以执行预处理阶段的处理过程,也即,可以从服务器设备处逐一获取用于生成输出视频中的每个图像帧的多个算法参数。
具体地,可以向缓存区域中写入多个算法参数,可以利用多个算法参数来生成输出视频中的多个图像帧。具体地,可以利用已经加载的特效接口来从服务器设备处获取算法参数。可以从服务器设备处下载各个算法参数。应当理解,在此的算法参数是指概括的概念,算法参数可以包括一组参数(例如,一个或者多个)。应当理解,对于每个特效接口而言,输出视频的长度是固定的,假设输出视频包括N个图像帧,则可以从服务器设备下载所需的算法参数,进而基于各个图像帧的在视频中的位置生成相应的图像帧。
根据本公开的一个示例实现方式,在向缓存区域中写入多个算法参数的过程中,可以经由特效接口来从服务器设备获取多个算法参数中的目标算法参数,进而向缓存区域中写入目标算法参数。在需要调用时,只需从客户端设备处本地的缓存目录中查找,而不必从服务器处下载。以此方式,可以减少后续等待时间,进而提高视频编辑过程的处理速度。
应当理解,在访问服务器来获取某个目标算法参数之前,可以首先查看在缓存目录中是否存在已经下载的算法参数,并且仅在缓存目录中不存在该算法参数的情况下,才访问服务器设备来获取期望的算法参数;否则,可以直接使用被缓存的算法参数。
根据本公开的一个示例实现方式,在获取目标算法参数期间,仅在确定在缓存区域中不存在目标算法参数的情况下,才从服务器设备获取目标算法参数。利用本公开的示例实现方式,缓存目录可以降低访问服务器设备的频率,进而以更为高效的方式获取各个算法参数。
根据本公开的一个示例实现方式,在已经将特效接口成功加载到本地的情况下,可以在编辑页面中编辑输出视频中的各个图像帧。在接收到针对管理控件的管理请求的情况下,可以确定将被呈现在预览区域中的目标图像帧在输出视频中的目标位置。进而利用已经加载到客户端设备本地的特效接口所对应的多个算法参数,生成对应于目标位置的目标图像帧,进而在预览区域252中呈现目标图像帧。
参见图4描述更多细节,该图4示出了根据本公开的一些实现方式的编辑页面的框图400。在特效接口加载成功的初始阶段,可以呈现如图4所示的编辑页面410。此时,预览区域252呈现最初的输入图像,用户可以与管理控件进行交互。具体地,用户可以点击切换控件256来开始播放,或者可以调整进度条控件254来切换至某个图像帧。利用本公开的示例实现方式,用户可以使用管理控件来方便地切换至任意图像帧,进而执行查看和/或编辑操作。
应当理解,在编辑页面410的框420处,可以呈现一个或者多个编辑工具。用户可以使用这些编辑工具来调整输出视频,例如,可以向输出视频中添加背景音乐、添加文字,等等。备选地和/或附加地,可以在框420处呈现一个或者多个其他特效接口。用户可以选择其他特效接口,此时,如果被选择的特效接口为服务器端的特效接口,则可以从服务器设备处加载该特效接口,进而向当前的输入图像应用该特效接口,进而生成新的输出视频。
根据本公开的一个示例实现方式,假设用户选择播放某个目标图像帧,则可以基于该目标图像帧的目标位置来生成目标图像帧。参见图5描述更多细节,该图5示出了根据本公开的一些实现方式的编辑页面的框图500。在编辑页面510中,用户可以将进度条控件254拖动至图5所示的位置(例如,第i个图像帧),可以基于输入图像、位置i、以及缓存区域中的多个算法参数来生成目标图像帧。
如图5所示,可以利用从本地缓存区域中获取的多个算法参数来生成第i帧处的图像。预览区域252将呈现如图5所示的效果,此时在人物周围出现闪电效果。备选地和/或附加地,用户可以将进度条控件254进一步调整至第j帧的位置。此时,在预览区域中可以呈现图像帧520的效果(例如,黑白翻转效果)。利用本公开的示例实现方式,不必从服务器设备处下载期望的算法参数,而是可以直接从本地获取算法参数进而生成目标图像帧。以此方式,可以提高图像生成效率并且降低用户等待时间。
根据本公开的一个示例实现方式,用户可以保存由特效接口生成的输出视频;备选地和/或附加地,用户可以丢弃该输出视频。在接收到用于退出编辑页面的退出请求的情况下,特效接口的生命周期结束因而可以从客户端设备处移除特效接口。以此方式,可以避免不再使用的特效接口占用客户端设备的各种资源。
根据本公开的一个示例实现方式,用户可以切换当前正在处理的输入图像。在接收到用于切换输入图像的切换请求的情况下,可以清除缓存区域。应当理解,缓存区域中的算法参数专用于特定的输入图像,因而当输入图像被改变的情况下,缓存区域中的算法参数不再有效,因而应当清除这些参数以避免占用客户端设备的本地存储空间。
根据本公开的一个示例实现方式,仅在确定用户选择的特效算法为远程类型的情况下,才从服务器设备加载特效接口。以此方式,可以在媒体编辑工具处维护多种类型的特效接口,从而便于向用户提供更为丰富的视觉处理效果。
已经描述了利用特效接口生成视频的前端操作页面,在下文中,参见图6描述在生成视频过程中的各个模块之间的后台交互过程。图6示出了根据本公开的一些实现方式的用于生成视频的交互过程的轨道图600。如图6所示,客户端630可以表示被安装在客户端设备处的媒体编辑工具的客户端,软件开发工具包632表示客户端630能够调用的各种功能,特效接口634表示用于借助于服务器处的特效算法来将输入图像转换至输出视频的转换工具,缓存目标636表示在客户端设备处的预定位置的目录。
如图6所示,整个交互过程可以划分为预处理阶段640和工具使用阶段642。预处理阶段640的主要功能为加载工具,通过工具访问服务端获得算法参数或者读取已经缓存在本地的算法参数,并且发送消息给客户端,使客户端了解是否获得工具正常运行所需要的算法参数。在工具使用阶段642,用户可以正常使用已经加载的特效接口,可以将播放进度条移动到任意一帧并且查看效果。
在初始阶段,用户638可以加载601特效接口。客户端630可以基于该加载操作来创建602本地的缓存目录。继而,客户端630可以通知603软件开发工具包632来执行加载过程,并且软件开发工具包632可以加载604特效接口。客户端630可以设置605用于缓存算法参数的缓存目录,并且执行606预处理。
在预处理过程中,可以访问610服务器设备,并且获取相应的多个算法参数。可以将获取的算法参数写入611缓存目录。在写入成功的情况下,缓存目录636可以向客户端630返回612成功消息。备选地和/或附加地,可以存在访问失败的情况,此时特效接口634将返回613失败消息,并且可以向用户显示614失败消息。
应当理解,特效接口634仅在缓存目录中不存在期望的算法参数的情况下,才访问服务器设备。如果在缓存目录中存在期望的算法参数,则特效接口634可以直接读取615缓存目录。缓存目录636可以向特效接口634返回已经存储的算法参数,并且特效接口634将向客户端630返回617成功消息。至此,预处理阶段640结束,并且在缓存目录中已经包括特效处理所需的全部算法参数。
在用户使用阶段642中,用户可以将进度条移动620至目标视频中的任何位置。此时,客户端630可以查找621相应的视频帧(例如,第i帧)。继而,可以直接从缓存目录中获取所需的算法参数,并基于输入图像和位置i来生成第i个图像帧。如果用户不再使用622加载的特效接口,客户端630可以通知623软件开发工具包632来执行卸载,继而软件开发工具包632可以卸载624特效接口634。备选地和/或附加地,如果用户更换624输入图像,则客户端630可以删除626缓存目录。
利用本公开的示例实现方式,在编辑页场景下,预处理阶段可以预先获取服务端处的算法参数,从而确保特效接口的高速运行。进一步,缓存目录可以减少对服务器设备的访问次数。缓存目录中包括同样输入的算法参数,因而可以通过重用算法参数来降低用户等待时间。
示例过程
图7示出了根据本公开的一些实现方式的用于生成视频的方法700的流程图。在框710处,在客户端设备处呈现用于处理输入图像的处理页面。在框720处,响应于接收到针对所述处理页面的加载请求,加载特效接口,所述特效接口用于调用在与所述客户端设备相对应的服务器设备处的特效算法,来基于所述输入图像来生成具有预定特效的输出视频。在框730处,响应于确定特效接口的加载状态为成功,呈现用于编辑输出视频的编辑页面。
根据本公开的一个示例实现方式,编辑页面包括:用于呈现输出视频的预览区域、以及用于管理输出视频的播放的管理控件。
根据本公开的一个示例实现方式,该方法进一步包括:响应于接收到针对管理控件的管理请求,确定将被呈现在预览区域中的目标图像帧在输出视频中的目标位置;利用特效接口,生成对应于目标位置的目标图像帧;以及在预览区域中呈现目标图像帧。
根据本公开的一个示例实现方式,该方法进一步包括:呈现指示特效接口的加载进度的加载页面。
根据本公开的一个示例实现方式,加载特效接口包括:在客户端设备处创建缓存区域;以及向所述缓存区域中写入由所述特效算法生成的多个算法参数。
根据本公开的一个示例实现方式,向缓存区域中写入多个算法参数包括:经由所述特效接口来从所述服务器设备获取所述多个算法参数中的目标算法参数;以及向缓存区域中写入目标算法参数。
根据本公开的一个示例实现方式,获取目标算法参数包括:响应于确定在缓存区域中不存在目标算法参数,从服务器设备获取目标算法参数。
根据本公开的一个示例实现方式,生成目标图像帧包括:利用所述多个算法参数,基于所述目标位置来生成所述目标图像帧。
根据本公开的一个示例实现方式,该方法进一步包括:响应于接收到用于退出编辑页面的退出请求,从客户端设备处移除特效接口。
根据本公开的一个示例实现方式,该方法进一步包括:响应于接收到用于切换输入图像的切换请求,清除缓存区域。
根据本公开的一个示例实现方式,从服务器处加载特效接口进一步包括:响应于确定特效算法为远程类型,从服务器设备加载特效接口。
根据本公开的一个示例实现方式,该方法进一步包括:响应于确定特效接口的加载状态为失败,呈现指示加载失败的提示信息。
示例装置和设备
图8示出了根据本公开的一些实现方式的用于生成视频的装置800的框图。该装置包括:第一呈现模块810,被配置用于在客户端设备处呈现用于处理输入图像的处理页面;加载模块820,被配置用于响应于接收到针对所述处理页面的加载请求,加载特效接口,所述特效接口用于调用在与所述客户端设备相对应的服务器设备处的特效算法,来基于所述输入图像来生成具有预定特效的输出视频;以及第二呈现模块830,被配置用于响应于确定特效接口的加载状态为成功,呈现用于编辑输出视频的编辑页面。
根据本公开的一个示例实现方式,编辑页面包括:用于呈现输出视频的预览区域、以及用于管理输出视频的播放的管理控件。
根据本公开的一个示例实现方式,该装置进一步包括:确定模块,被配置用于响应于接收到针对管理控件的管理请求,确定将被呈现在预览区域中的目标图像帧在输出视频中的目标位置;生成模块,被配置用于利用特效接口,生成对应于目标位置的目标图像帧;以及图像呈现模块,被配置用于在预览区域中呈现目标图像帧。
根据本公开的一个示例实现方式,该装置进一步包括:第三呈现模块,被配置用于呈现指示特效接口的加载进度的加载页面。
根据本公开的一个示例实现方式,加载模块包括:创建模块,被配置用于在客户端设备处创建缓存区域;以及写入模块,被配置用于向所述缓存区域中写入由所述特效算法生成的多个算法参数。
根据本公开的一个示例实现方式,写入模块包括:参数获取模块,被配置用于经由所述特效接口来从所述服务器设备获取所述多个算法参数中的目标算法参数;以及参数写入模块,被配置用于向缓存区域中写入目标算法参数。
根据本公开的一个示例实现方式,参数获取模块包括:远程获取模块,被配置用于响应于确定在缓存区域中不存在目标算法参数,从服务器设备获取目标算法参数。
根据本公开的一个示例实现方式,生成模块包括:读取模块,被配置用于利用所述多个算法参数,基于所述目标位置来生成所述目标图像帧。
根据本公开的一个示例实现方式,该装置进一步包括:移除模块,被配置用于响应于接收到用于退出编辑页面的退出请求,从客户端设备处移除特效接口。
根据本公开的一个示例实现方式,该装置进一步包括:切换模块,被配置用于响应于接收到用于切换输入图像的切换请求,清除缓存区域。
根据本公开的一个示例实现方式,加载模块包括:远程加载模块,被配置用于响应于确定特效算法为远程类型,从服务器设备加载特效接口。
根据本公开的一个示例实现方式,该装置进一步包括:第四呈现模块,被配置用于响应于确定特效接口的加载状态为失败,呈现指示加载失败的提示信息。
图9示出了能够实施本公开的多个实现方式的设备900的框图。应当理解,图9所示出的计算设备900仅仅是示例性的,而不应当构成对本文所描述的实现方式的功能和范围的任何限制。图9所示出的计算设备900可以用于实现上文描述的方法。
如图9所示,计算设备900是通用计算设备的形式。计算设备900的组件可以包括但不限于一个或多个处理器或处理单元910、存储器920、存储设备930、一个或多个通信单元940、一个或多个输入设备950以及一个或多个输出设备960。处理单元910可以是实际或虚拟处理器并且能够根据存储器920中存储的程序来执行各种处理。在多处理器系统中,多个处理单元并行执行计算机可执行指令,以提高计算设备900的并行处理能力。
计算设备900通常包括多个计算机存储介质。这样的介质可以是计算设备900可访问的任何可以获得的介质,包括但不限于易失性和非易失性介质、可拆卸和不可拆卸介质。存储器920可以是易失性存储器(例如寄存器、高速缓存、随机访问存储器(RAM))、非易失性存储器(例如,只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、闪存)或它们的某种组合。存储设备930可以是可拆卸或不可拆卸的介质,并且可以包括机器可读介质,诸如闪存驱动、磁盘或者任何其他介质,其可以能够用于存储信息和/或数据(例如用于训练的训练数据)并且可以在计算设备900内被访问。
计算设备900可以进一步包括另外的可拆卸/不可拆卸、易失性/非易失性存储介质。尽管未在图9中示出,可以提供用于从可拆卸、非易失性磁盘(例如“软盘”)进行读取或写入的磁盘驱动和用于从可拆卸、非易失性光盘进行读取或写入的光盘驱动。在这些情况中,每个驱动可以由一个或多个数据介质接口被连接至总线(未示出)。存储器920可以包括计算机程序产品925,其具有一个或多个程序模块,这些程序模块被配置为执行本公开的各种实现方式的各种方法或动作。
通信单元940实现通过通信介质与其他计算设备进行通信。附加地,计算设备900的组件的功能可以以单个计算集群或多个计算机器来实现,这些计算机器能够通过通信连接进行通信。因此,计算设备900可以使用与一个或多个其他服务器、网络个人计算机(PC)或者另一个网络节点的逻辑连接来在联网环境中进行操作。
输入设备950可以是一个或多个输入设备,例如鼠标、键盘、追踪球等。输出设备960可以是一个或多个输出设备,例如显示器、扬声器、打印机等。计算设备900还可以根据需要通过通信单元940与一个或多个外部设备(未示出)进行通信,外部设备诸如存储设备、显示设备等,与一个或多个使得用户与计算设备900交互的设备进行通信,或者与使得计算设备900与一个或多个其他计算设备通信的任何设备(例如,网卡、调制解调器等)进行通信。这样的通信可以经由输入/输出(I/O)接口(未示出)来执行。
根据本公开的示例性实现方式,提供了一种计算机可读存储介质,其上存储有计算机可执行指令,其中计算机可执行指令被处理器执行以实现上文描述的方法。根据本公开的示例性实现方式,还提供了一种计算机程序产品,计算机程序产品被有形地存储在非瞬态计算机可读介质上并且包括计算机可执行指令,而计算机可执行指令被处理器执行以实现上文描述的方法。根据本公开的示例性实现方式,提供了一种计算机程序产品,其上存储有计算机程序,程序被处理器执行时实现上文描述的方法。
这里参照根据本公开实现的方法、装置、设备和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其他可编程数据处理装置的处理单元,从而生产出一种机器,使得这些指令在通过计算机或其他可编程数据处理装置的处理单元执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
可以把计算机可读程序指令加载到计算机、其他可编程数据处理装置、或其他设备上,使得在计算机、其他可编程数据处理装置或其他设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其他可编程数据处理装置、或其他设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实现的系统、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或指令的一部分,模块、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
以上已经描述了本公开的各实现,上述说明是示例性的,并非穷尽性的,并且也不限于所公开的各实现。在不偏离所说明的各实现的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实现的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其他普通技术人员能理解本文公开的各个实现方式。

Claims (15)

  1. 一种用于生成视频的方法,包括:
    在客户端设备处呈现用于处理输入图像的处理页面;
    响应于接收到针对所述处理页面的加载请求,加载特效接口,所述特效接口用于调用在与所述客户端设备相对应的服务器设备处的特效算法,来基于所述输入图像来生成具有预定特效的输出视频;以及
    响应于确定所述特效接口的加载状态为成功,呈现用于编辑所述输出视频的编辑页面。
  2. 根据权利要求1所述的方法,其中所述编辑页面包括:用于呈现所述输出视频的预览区域、以及用于管理所述输出视频的播放的管理控件。
  3. 根据权利要求2所述的方法,进一步包括:
    响应于接收到针对所述管理控件的管理请求,确定将被呈现在所述预览区域中的目标图像帧在所述输出视频中的目标位置;
    利用所述特效接口,生成对应于所述目标位置的所述目标图像帧;以及
    在所述预览区域中呈现所述目标图像帧。
  4. 根据权利要求1所述的方法,进一步包括:呈现指示所述特效接口的加载进度的加载页面。
  5. 根据权利要求3所述的方法,其中加载所述特效接口包括:
    在所述客户端设备处创建缓存区域;以及
    向所述缓存区域中写入由所述特效算法生成的多个算法参数。
  6. 根据权利要求5所述的方法,其中向所述缓存区域中写入所述多个算法参数包括:
    经由所述特效接口来从所述服务器设备获取所述多个算法参数中的目标算法参数;以及
    向所述缓存区域中写入所述目标算法参数。
  7. 根据权利要求6所述的方法,其中获取所述目标算法参数包括:响应于确定在所述缓存区域中不存在所述目标算法参数,从所述服务器设备获取所述目标算法参数。
  8. 根据权利要求3所述的方法,其中生成所述目标图像帧包括:利用所述多个算法参数,基于所述目标位置来生成所述目标图像帧。
  9. 根据权利要求1所述的方法,进一步包括:响应于接收到用于退出所述编辑页面的退出请求,从客户端设备处移除所述特效接口。
  10. 根据权利要求5所述的方法,进一步包括:响应于接收到用于切换所述输入图像的切换请求,清除所述缓存区域。
  11. 根据权利要求1所述的方法,其中从服务器处加载所述特效接口进一步包括:响应于确定所述特效算法为远程类型,从所述服务器设备加载所述特效接口。
  12. 根据权利要求1所述的方法,进一步包括:响应于确定所述特效接口的所述加载状态为失败,呈现指示加载失败的提示信息。
  13. 一种用于生成视频的装置,包括:
    第一呈现模块,被配置用于在客户端设备处呈现用于处理输入图像的处理页面;
    加载模块,被配置用于响应于接收到针对所述处理页面的加载请求,加载特效接口,所述特效接口用于调用在与所述客户端设备相对应的服务器设备处的特效算法,来基于所述输入图像来生成具有预定特效的输出视频;以及
    第二呈现模块,被配置用于响应于确定所述特效接口的加载状态为成功,呈现用于编辑所述输出视频的编辑页面。
  14. 一种电子设备,包括:
    至少一个处理单元;以及
    至少一个存储器,所述至少一个存储器被耦合到所述至少一个处理单元并且存储用于由所述至少一个处理单元执行的指令,所述指令在由所述至少一个处理单元执行时使所述电子设备执行根据权利要求1至12中任一项所述的方法。
  15. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序在被处理器执行时使所述处理器实现根据权利要求1至12中任一项所述的方法。
PCT/CN2024/138191 2023-12-22 2024-12-10 用于生成视频的方法、装置、设备和介质 Pending WO2025130705A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202311785540.0A CN117768735A (zh) 2023-12-22 2023-12-22 用于生成视频的方法、装置、设备和介质
CN202311785540.0 2023-12-22

Publications (1)

Publication Number Publication Date
WO2025130705A1 true WO2025130705A1 (zh) 2025-06-26

Family

ID=90323381

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2024/138191 Pending WO2025130705A1 (zh) 2023-12-22 2024-12-10 用于生成视频的方法、装置、设备和介质

Country Status (2)

Country Link
CN (1) CN117768735A (zh)
WO (1) WO2025130705A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117768735A (zh) * 2023-12-22 2024-03-26 北京字跳网络技术有限公司 用于生成视频的方法、装置、设备和介质
CN119850788A (zh) * 2024-12-24 2025-04-18 北京字跳网络技术有限公司 内容生成方法、装置、电子设备及存储介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108022279A (zh) * 2017-11-30 2018-05-11 广州市百果园信息技术有限公司 视频特效添加方法、装置及智能移动终端
WO2021196890A1 (zh) * 2020-04-02 2021-10-07 腾讯科技(深圳)有限公司 多媒体处理方法、装置、电子设备、存储介质
CN114125551A (zh) * 2020-08-31 2022-03-01 北京字节跳动网络技术有限公司 视频生成方法、装置、电子设备及计算机可读介质
CN116471450A (zh) * 2022-01-11 2023-07-21 腾讯科技(深圳)有限公司 一种视频内容生成方法、装置、电子设备和存储介质
CN116934887A (zh) * 2022-03-31 2023-10-24 脸萌有限公司 基于端云协同的图像处理方法、装置、设备及存储介质
CN117768735A (zh) * 2023-12-22 2024-03-26 北京字跳网络技术有限公司 用于生成视频的方法、装置、设备和介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108022279A (zh) * 2017-11-30 2018-05-11 广州市百果园信息技术有限公司 视频特效添加方法、装置及智能移动终端
WO2021196890A1 (zh) * 2020-04-02 2021-10-07 腾讯科技(深圳)有限公司 多媒体处理方法、装置、电子设备、存储介质
CN114125551A (zh) * 2020-08-31 2022-03-01 北京字节跳动网络技术有限公司 视频生成方法、装置、电子设备及计算机可读介质
CN116471450A (zh) * 2022-01-11 2023-07-21 腾讯科技(深圳)有限公司 一种视频内容生成方法、装置、电子设备和存储介质
CN116934887A (zh) * 2022-03-31 2023-10-24 脸萌有限公司 基于端云协同的图像处理方法、装置、设备及存储介质
CN117768735A (zh) * 2023-12-22 2024-03-26 北京字跳网络技术有限公司 用于生成视频的方法、装置、设备和介质

Also Published As

Publication number Publication date
CN117768735A (zh) 2024-03-26

Similar Documents

Publication Publication Date Title
WO2025130705A1 (zh) 用于生成视频的方法、装置、设备和介质
CN113703893B (zh) 一种页面渲染方法、装置、终端及存储介质
JP7013466B2 (ja) アプリケーションデータ処理方法、装置、及びコンピュータプログラム
CN110502487A (zh) 一种缓存管理方法与装置
WO2025130246A1 (zh) 提示词扩充的方法、装置、计算机设备及存储介质
CN113961298A (zh) 一种页面切换方法、装置、设备及介质
CN110162563B (zh) 一种数据入库方法、系统及电子设备和存储介质
WO2026051838A1 (zh) 用于媒体编辑方法、装置、设备和存储介质
WO2025082248A1 (zh) 用于处理媒体数据的方法、装置、设备和介质
US11755534B2 (en) Data caching method and node based on hyper-converged infrastructure
WO2025176213A1 (zh) 媒体资源输入方法、装置、设备和存储介质
WO2025124385A1 (zh) 虚拟机系统的还原方法、装置、存储介质及电子设备
CN119621163B (zh) 服务部署方法、系统、设备及存储介质
CN118863069A (zh) 一种基于人工智能的模型推理方法、装置以及设备
CN114281422B (zh) 一种云电脑控制方法、装置、介质
CN114880143B (zh) 一种基于物联网平台的数据处理方法和数据处理系统
CN119848375A (zh) 页面生成方法、装置、设备及可读存储介质
CN114443580A (zh) 一种数据清理方法、装置、介质及计算设备
CN113613044A (zh) 视频播放方法、装置、存储介质及电子设备
US20260086857A1 (en) Method, apparatus, device, and medium for managing tool in application
CN121300867A (zh) 小游戏启动方法、装置、设备、介质及产品
WO2025139735A1 (zh) 视频编辑方法、装置、设备和介质
CN118444999A (zh) 用于管理应用的方法、装置、设备和存储介质
CN116628382A (zh) 用于生成页面的图像的方法、装置、设备和介质
WO2025086526A1 (zh) 用于处理用户任务的方法、装置、设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 24906188

Country of ref document: EP

Kind code of ref document: A1