Image generation methods, apparatus, electronic devices and storage media
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本公开实施例提供一种图像生成方法、装置、电子设备及存储介质,以克服视频图像生成速度慢、响应不及时的问题
[0017]本实施例提供的图像生成方法、装置、电子设备及存储介质,通过接收针对视频数据的第一编辑指令,所述第一编辑指令用于设置所述视频数据的编辑内容;基于所述第一编辑指令,配置目标引擎模组,得到配置后的目标引擎模组,其中,所述目标引擎模组为所述图像生成链路对应的至少两个引擎模组中,用于控制所述编辑内容的引擎模组,所述图像生成链路用于表征生成所述视频数据的视频图像的处理流程,引擎模组用于实现所述处理流程中的至少一个处理步骤;单独调用所述配置后的目标引擎模组,生成所述视频数据的视频图像。通过接收第一编辑指令后,仅对用于控制第一编辑指令对应的编辑内容的目标引擎模组进行配置,实现了各引擎模组功能上的解耦合,此种情况下响应第一编辑指令不会对整个图像生成链路产生影响,因此,减少了生成合成图像的处理步骤,提高了处理效率,提高视频图像的生成速度和响应速度。
Smart Images

Figure CN119729037B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of image processing technology, and in particular to an image generation method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, in video processing scenarios involving editing and compositing audio and video data using video editing software, users typically set media materials on the video editing track, perform corresponding editing, adjustments, and previews, and then combine multiple video editing tracks to generate the final composite image.
[0003] In existing technologies, to achieve better results in synthesized images, video editing software typically responds to user editing operations in real time and displays the edited video image. However, existing solutions suffer from slow video image generation speed and untimely response, which affects video editing efficiency. Summary of the Invention
[0004] This disclosure provides an image generation method, apparatus, electronic device, and storage medium to overcome the problems of slow video image generation speed and untimely response.
[0005] In a first aspect, embodiments of this disclosure provide an image generation method, including:
[0006] The system receives a first editing instruction for video data, which is used to set the editing content of the video data; based on the first editing instruction, it configures a target engine module to obtain a configured target engine module, wherein the target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to characterize the processing flow for generating video images of the video data, and the engine module is used to implement at least one processing step in the processing flow; and it independently calls the configured target engine module to generate video images of the video data.
[0007] In a second aspect, embodiments of this disclosure provide an image generation apparatus, comprising:
[0008] The receiving module is configured to receive a first editing instruction for video data, wherein the first editing instruction is used to set the editing content of the video data;
[0009] The processing module is configured to configure the target engine module based on the first editing instruction to obtain the configured target engine module. The target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link. The image generation link is used to characterize the processing flow of the video image that generates the video data. The engine module is used to implement at least one processing step in the processing flow.
[0010] The generation module is used to independently call the configured target engine module to generate video images of the video data.
[0011] Thirdly, embodiments of this disclosure provide an electronic device, including:
[0012] A processor, and a memory communicatively connected to the processor;
[0013] The memory stores computer-executed instructions;
[0014] The processor executes computer execution instructions stored in the memory to implement the image generation method as described in the first aspect and various possible designs of the first aspect.
[0015] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the image generation method described in the first aspect and various possible designs of the first aspect.
[0016] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the image generation method as described in the first aspect and various possible designs of the first aspect.
[0017] The image generation method, apparatus, electronic device, and storage medium provided in this embodiment receive a first editing instruction for video data, which is used to set the editing content of the video data; based on the first editing instruction, a target engine module is configured to obtain a configured target engine module, wherein the target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to characterize the processing flow of generating video images of the video data, and the engine module is used to implement at least one processing step in the processing flow; the configured target engine module is invoked separately to generate video images of the video data. By configuring only the target engine module used to control the editing content corresponding to the first editing instruction after receiving the first editing instruction, the functions of each engine module are decoupled. In this case, responding to the first editing instruction will not affect the entire image generation link. Therefore, the processing steps for generating composite images are reduced, processing efficiency is improved, and the generation speed and response speed of video images are increased. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a schematic diagram illustrating an application scenario of the image generation method provided in this embodiment of the disclosure;
[0020] Figure 2 Flowchart of the image generation method provided in the embodiments of this disclosure Figure 1 ;
[0021] Figure 3 A schematic diagram of an engine module provided in an embodiment of this disclosure;
[0022] Figure 4 A schematic diagram illustrating the process of generating a first editing instruction provided in an embodiment of this disclosure;
[0023] Figure 5 Flowchart of the image generation method provided in the embodiments of this disclosure Figure 2 ;
[0024] Figure 6 A schematic diagram of an image generation chain based on a text image description language representation provided in this disclosure embodiment;
[0025] Figure 7 for Figure 5 A flowchart illustrating the specific implementation of step S206 in the illustrated embodiment;
[0026] Figure 8 for Figure 7 A flowchart illustrating the specific implementation of step S2063 in the illustrated embodiment;
[0027] Figure 9 This is a schematic diagram illustrating the configuration process of an orbit synthesis module provided in an embodiment of the present disclosure;
[0028] Figure 10 This is a structural block diagram of the image generation apparatus provided in the embodiments of this disclosure;
[0029] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0030] Figure 12 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0033] The application scenarios of the embodiments of this disclosure are explained below:
[0034] The video processing method provided in this disclosure can be applied to video editing scenarios. Specifically, the method provided in this disclosure can be applied to a terminal device or a server. When the execution subject of the method provided in this embodiment is a terminal device, the video processing method can be executed through the terminal device, and the execution result can be displayed on the terminal device. When the execution subject of the method provided in this embodiment is a server, the video processing method can be executed through the server, and the execution result can be sent to the terminal device for display. In this embodiment, the application scenario is introduced using a terminal device as the execution subject. For example, a video editing software for editing videos runs on one side of the terminal device. This video editing software uses the video processing method provided in this embodiment to realize video editing, compositing, previewing, and other functions. Specifically, the method provided in this embodiment is stored in the terminal device in the form of an SDK. The video editing software executes the corresponding functions by calling the SDK corresponding to the method in this embodiment.
[0035] Figure 1 This is a schematic diagram illustrating an application scenario of the image generation method provided in this disclosure embodiment, with reference to... Figure 1 As shown, the video editing software's interface includes a media selection and loading window, a preview window for displaying video previews, and a video editing window. The video editing window contains multiple video editing tracks, each with video clips, music clips, effects, and other media materials. Users can add, delete, and modify these media materials as needed. Each video editing track corresponds to the same timeline. By editing the media materials on each track, the software can design the video content at a specific moment. Furthermore, when the content on a video editing track changes, the software can generate corresponding video images in real time, such as a preview image of the edit, and display them in the preview window. This allows users to observe the preview and further adjust and edit the video data. For example... Figure 1 As shown, video clips #1 and #2 are set on video editing track Track_1, video clip #3 is set on video editing track Track_2, and music clip #4 is set on video editing track Track_3. Then, the user moves video clip #1 from video editing track Track_1 to video editing track Track_2 by inputting editing commands. The content of the video data changes, and at the same time, the video image of the changed video data is displayed in the preview window of the video editing interface.
[0036] In response to the aforementioned application scenarios, the terminal device executes a complete image generation chain during the process of responding to editing instructions and generating video images (via video editing software). This image generation chain consists of multiple processing steps, such as video material decoding, effects positioning, multi-channel media material fusion, and composite image display. In existing technologies, the execution of this image generation chain is fixed. Responding to different editing instructions requires executing the complete image generation chain. For example, the editing operation of moving media material from the first video editing track to the second video editing track requires multiple steps, including decoding, setting, and multi-channel fusion of the moved media material, to generate the final video image. This leads to slow video image generation speed and untimely response, affecting video editing efficiency. This disclosure provides a video processing method to solve the above problems.
[0037] refer to Figure 2 , Figure 2 Flowchart of the image generation method provided in the embodiments of this disclosure Figure 1 The method of this embodiment can be applied in a terminal device. This image generation method includes:
[0038] Step S101: Receive a first editing instruction for the video data. The first editing instruction is used to set the editing content of the video data.
[0039] For example, refer to Figure 1 The illustrated application scenario shows that after the video editing software starts, it creates a new video processing task / project or loads an existing one based on the user's specific actions, thus displaying the video editing interface for the video data. When creating a new processing task / project, the displayed video editing interface may not include video editing tracks, or may only have one or a few empty video editing tracks (empty tracks are those without any media content set on them). Subsequently, based on the user's initial editing command, video editing tracks are further added or removed, or at least one piece of media content is set on a video editing track. When loading an existing video processing task / project, after the video editing software loads the video data, it displays at least one valid video editing track on the video editing page, and each valid video editing track has at least one piece of media content set on it.
[0040] Furthermore, the terminal device receives a first editing instruction input by the user. This first editing instruction refers to an instruction obtained by the terminal device through a human-computer interaction interface, used to set media materials in the video editing track and / or video offset track of the video to be generated. Examples include adding media materials, deleting media materials, setting the position of media materials on the video editing track, and setting the video editing track where the media materials are located. The specific video data setting item indicated by the first editing instruction is the editing content. The specific implementation of the first editing instruction can be configured as needed, and will be described in detail in subsequent embodiments.
[0041] Step S102: Based on the first editing instruction, configure the target engine module to obtain the configured target engine module. The target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link. The image generation link is used to characterize the processing flow of video images that generate video data. The engine module is used to implement at least one processing step in the processing flow.
[0042] Step S103: Call the configured target engine module separately to generate video images of the video data.
[0043] For example, the image generation method provided in this embodiment implements the image generation chain through a preset independent engine module. More specifically, the engine module is provided through a preset image processing engine. The image generation chain represents the processing flow of video images used to generate video data. The view image can refer to one or more frames of preview images generated in real time after the terminal device responds to an editing operation; it can also be the final rendered output video. No specific limitations are imposed here, and it can be set as needed. The engine module is used to implement at least one processing step in the processing flow. By configuring the engine module, the working logic of the engine module can be set, thereby enabling the configuration of the overall image generation chain. Figure 3 This is a schematic diagram of an engine module provided in an embodiment of the present disclosure, such as... Figure 3 As shown, the image processing engine includes a pre-defined image loading module, an image processing module, a track compositing module, and an image display module. The image loading module loads media footage onto the video editing track. The image processing module performs image processing on the media footage. The track compositing module overlaps and merges at least two media footage clips to generate a video image of the video data. The image display module displays the video image of the video data in the preview window. These four engine modules are connected sequentially and execute their respective processing steps to achieve the execution of the image generation chain.
[0044] Furthermore, upon receiving the first editing instruction, based on the setting target represented by the first editing instruction, i.e., the editing content of the video data, an engine module matching the editing content is determined to respond to the first editing instruction. This target engine module is one capable of controlling the editing content. Specifically, for example, if the video data editing content set by the first editing instruction is to set the display layer of each media material constituting the video data, then the target engine module is determined to be a track compositing module capable of controlling the display layer of each media material in the video data; if the video data editing content set by the first editing instruction is to set the position of a certain media material constituting the video data in the image to be composited, then the corresponding target engine module is determined to be an image processing module capable of controlling the image position of the media material. In practical applications, the target engine module matched by the first editing instruction can be determined based on the specific functions implemented by each engine module; specific matching methods will not be elaborated further.
[0045] After determining the target engine module, the target engine module is configured based on the first editing instruction, enabling the target engine model to operate according to the working logic and parameters indicated by the first editing instruction, thereby generating a video image of the image to be synthesized as set by the first editing instruction. The implementation process of step S102 is described below with a more specific embodiment:
[0046] In one possible implementation, at least two media clips are overlaid on the video image of the video data at a target time. A first editing instruction is used to set the display layer of the media clips. Based on the editing content set by the first editing instruction, a matching target engine module is a track compositing module. The track compositing module is used to overlap and merge at least two media clips based on their display layers to generate the video image of the video data. Further, exemplarily, the first editing instruction includes a target parameter, which characterizes the mapping relationship between the sequence values of at least one video editing track and the display layer. The first editing instruction can be implemented based on the user's settings for the video editing tracks within the video editing interface. Figure 4 This is a schematic diagram illustrating a process for generating a first editing instruction, as provided in an embodiment of the present disclosure. Figure 4As shown, the video editing window contains multiple video editing tracks, each corresponding to a sequence value (shown as #1, #2, and #3 in the diagram). The window also includes a first combination and a second component. When the first component is triggered (e.g., by user clicking it), a target parameter para_1 is generated. In this case, the sequence value corresponds inversely to the display level; a smaller sequence value results in a higher display level. When the second component is triggered, a target parameter para_2 is generated. In this case, the sequence value corresponds positively to the display level; a larger sequence value results in a lower display level. Based on the user's specific operation, a first editing instruction is generated, containing either the target parameter para_1 or the target parameter para_2. Then, according to the target parameter in the first editing instruction, the corresponding target engine module is configured. For example, the target parameter para_1 is configured to the track compositing module. This allows the track compositing module to obtain the corresponding display level based on the sequence values of each video editing track, and to overlap and merge media materials on the video editing tracks based on the display level, generating a video image with overlapping media materials.
[0047] Furthermore, after the target engine module is configured, the configured target engine module is obtained. Then, the corresponding engine modules of the image generation link are called sequentially, such as the image loading module, image processing module, and configured track synthesis module, to complete the execution of the image generation link and finally generate the video image of the video data set by the first editing instruction. By decoupling the image generation link through multiple engine modules and configuring only the target engine module corresponding to the first editing instruction, while other non-engine modules do not need to be configured or changed, the rapid updating of the image generation link is achieved, the operational stability of the image generation link is improved, and the rapid generation of video images of video data is realized.
[0048] In this embodiment, the image generation method, apparatus, electronic device, and storage medium receive a first editing instruction for video data, which sets the editing content of the video data; based on the first editing instruction, configure a target engine module to obtain a configured target engine module, wherein the target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to characterize the processing flow of generating video images of video data, and the engine module is used to implement at least one processing step in the processing flow; and the configured target engine module is invoked separately to generate video images of video data. By configuring only the target engine module used to control the editing content corresponding to the first editing instruction after receiving the first editing instruction, the functions of each engine module are decoupled. In this case, responding to the first editing instruction will not affect the entire image generation link. Therefore, the processing steps for generating composite images are reduced, processing efficiency is improved, and the generation speed and response speed of video images are increased.
[0049] refer to Figure 5 , Figure 5 Flowchart of the image generation method provided in the embodiments of this disclosure Figure 2 In this embodiment, Figure 2 Based on the illustrated embodiment, step S102 is further refined, and an image generation chain step is added. This image generation method includes:
[0050] Step S201: Receive a second editing instruction, which includes at least two ordered step identifiers, which are used to identify an engine module.
[0051] Step S202: According to the second editing instruction, generate an image generation link. The image generation link is used to generate video data of at least two media materials that are overlaid and displayed at the target time.
[0052] For example, the second editing instruction is an instruction for generating an image generation chain, that is, an instruction for setting the processing flow of video data. In a specific application scenario, different image generation chains are used when different processing flows are applied to the video data. For example, in the first processing flow, whenever the video to be processed changes in response to the first editing instruction during the editing of video data, the changed video image of the video to be processed is statically displayed only through the preview window; in the second processing flow, whenever the video to be processed changes in response to the first editing instruction during the editing of video data, the video clip of the changed video to be processed is dynamically displayed through the preview window; in the third processing flow, whenever the video to be processed changes in response to the first editing instruction during the editing of video data, the video clip of the changed video to be processed is dynamically displayed through the preview window while the audio material corresponding to the video to be processed is played. The above different processing flows can be implemented through different image generation chains.
[0053] In one possible implementation, the video editing software pre-sets a default image generation chain. If the terminal device does not receive a second editing instruction, the default image generation chain is used to execute subsequent processing. Alternatively, based on a user-input selection instruction, an image generation chain is selected from multiple preset chains, and subsequent processing is executed. In another possible implementation, after receiving the second editing instruction through the video editing software, the terminal device constructs a new, personalized image generation chain based on at least two ordered step identifiers included in the second editing instruction. The step identifiers represent an engine module, which is provided by an image processing engine; its specific usage is not detailed here. In this embodiment, the image generation chain generated by receiving the second editing instruction is used to generate video data of at least two media clips that are overlaid at a target time.
[0054] In this embodiment, by receiving a second editing instruction and constructing a new image processing link based on at least two ordered step identifiers included in the second editing instruction, a personalized image processing and image generation process can be realized, meeting the user's personalized needs and improving the editing efficiency and operation efficiency in the image editing process.
[0055] Furthermore, in one possible implementation, the image generation chain is based on a text-based graphics description language, which provides a simple way to describe graphics and can be understood by both humans and computer programs. Figure 6 This is a schematic diagram of an image generation chain based on a text image description language, as provided in an embodiment of this disclosure. Figure 6As shown, the image generation link L1 is used to implement the video preview function. This is achieved by sequentially calling the image loading module M1, the image processing module M2, and the track compositing module M3. Specifically, after executing these three processing steps, a video image is generated. This image generation link is represented using a text-based image description language as "M1—>M2—>M3". Since the image generation link is generated based on the user-inputted second editing command, representing it using a text-based image description language simplifies the complexity of the second editing command and improves the readability of the generated image generation link, thus increasing the efficiency of users constructing custom image generation links.
[0056] Step S203: Receive a third editing instruction, which includes at least one custom parameter.
[0057] Step S204: Register the configuration parameters of the engine module according to the third editing instruction so that the engine module can be configured based on custom parameters.
[0058] Furthermore, the third editing command is used to register custom parameters. Configuration parameters used by the engine model typically have preset names; for example, the configuration parameters of engine module M1 are para_1, para_2, and para_3. Since the configuration parameters are fixed, it is impossible to customize the parameter names or dynamically load the parameters. In this embodiment, by receiving custom parameters from the user-input third editing command, the configuration parameters of the engine module are registered, establishing a mapping relationship between the custom parameters and the original configuration parameters of the engine model. This allows the engine module to be invoked based on the custom parameters in subsequent calls. More specifically, for example, engine module M1 has a configuration parameter called "brightness" for controlling the brightness of the video. After receiving and responding to the third editing command, the terminal device registers the custom parameter "brightness" with engine module M1. Subsequently, when engine module M1 is invoked, the parameter "brightness" can be used to control the brightness of the video.
[0059] In this embodiment, the configuration parameters of the engine module are registered by using a third editing command, thereby realizing the dynamic registration of the configuration parameters of the engine module. When configuring the target engine module using the first editing command, the efficiency of the user inputting the first editing command can be improved, thus improving the efficiency of human-computer interaction.
[0060] Step S205: Receive a first editing instruction for video data, the first editing instruction including a target parameter, the target parameter being used to characterize the mapping relationship between the sequence values of at least one video editing track and the display layer.
[0061] The specific implementation of step S205 is as follows: Figure 2 Step S102 of the illustrated embodiment has been described accordingly and will not be repeated here.
[0062] Optionally, after step S205, the method further includes:
[0063] Step S206: Perform load detection on the image generation link.
[0064] For example, when a user operates video editing software to edit video data, responding to the first operation command requires corresponding system computing resources. After receiving multiple first editing commands consecutively, the terminal device often needs to respond in a task queue manner to avoid the problem of stopping response (out of memory) due to resource exhaustion. Therefore, in this embodiment, after receiving the first operation command, the execution load of the image generation link corresponding to the first operation command is first detected. For example, as... Figure 7 As shown, the specific implementation of step S206 includes:
[0065] Step S2061: In response to the first editing instruction, a corresponding request token is generated. The request token is used to represent an image generation task for the image generation chain. The request token is released after the image generation task is completed.
[0066] Step S2062: Obtain the preset target number of request tokens.
[0067] Step S2063: Obtain the real-time number of existing request tokens and compare it with the target number.
[0068] Step S2064: If the real-time quantity is less than the preset target quantity, proceed to step S207; otherwise, return to step S2063.
[0069] In the example action, in response to receiving a first editing instruction, a request token for the task corresponding to the first editing instruction is generated. The request token is an identifier representing the requested task and corresponds to certain computing resources. In one possible implementation, generating the request token involves creating a token thread for executing the corresponding image generation chain. Then, the number of token threads currently running in memory, i.e., the real-time number, is calculated. If this real-time number is equal to or greater than a preset target number, it indicates a high load, and the newly generated first editing instruction is not responded to temporarily. Optionally, after waiting for a preset time, the process returns to step S2063 for a new comparison. As other image generation chains execute, the request token is released after each corresponding task is completed, and the real-time number of request tokens decreases until the current real-time number of running request tokens is less than the target number. Then, the first editing instruction is responded to, and subsequent steps are executed.
[0070] In this embodiment, by setting a target number of request tokens, the number of image generation links currently being executed by the system is monitored to avoid the problem of stopping response due to exhaustion of computing resources, thereby improving the real-time performance and stability of image preview frames generated during video editing.
[0071] For example, such as Figure 8 As shown, the specific implementation of step S2062 includes:
[0072] Step S2062A: Obtain the link length of the image generation link. The link length represents the number of processing steps in the processing flow corresponding to the image generation link.
[0073] Step S2062B: Obtain the target quantity based on the link length.
[0074] For example, different image generation chains, i.e., different image processing flows, require and consume different computing resources. Setting a fixed target number to limit the number of request tokens would result in low resource utilization. In this embodiment, the target number is determined by the chain length of the image generation chain. The longer the chain length, the more processing steps and resource consumption there are, and the smaller the corresponding target number, thus limiting the number of request tokens and reducing the number of image generation chains executed at the same time, ensuring system stability. Conversely, the shorter the chain length, the fewer processing steps and resource consumption there are, and the larger the corresponding target number, thus increasing the number of request tokens and the number of image generation chains executed at the same time, improving response speed.
[0075] Step S207: Obtain the track synthesis module corresponding to the first editing instruction. The track synthesis module includes at least two ordered first functional units and one second functional unit.
[0076] Step S208: Based on the target parameters, configure the sequence values corresponding to each first functional unit to obtain the configured orbital synthesis module.
[0077] Step S209: Call the configured track synthesis module to generate video images of the video data.
[0078] For example, the first functional unit is used to obtain media materials on the video editing track corresponding to the sequence value and send the media materials to the first functional unit; the second functional unit is used to merge the corresponding media materials in an orderly manner based on the unit sorting corresponding to the first functional unit to obtain video data.
[0079] In one possible implementation, the engine module can consist of multiple sequentially connected functional units; that is, the engine module also contains a smaller processing chain to achieve its specific functions. During the configuration of the engine module, the configuration of the internal functional units that make up the engine module is achieved by configuring the engine module itself. Figure 9 This is a schematic diagram illustrating the configuration process of an orbit synthesis module provided in an embodiment of this disclosure, as shown below. Figure 9 As shown, the track synthesis module M includes three first functional units, namely functional unit M1_1, functional unit M1_2, and functional unit M1_3; and one second functional unit, functional unit M2. Functional unit M1_1 currently corresponds to sequence value #1 and is used to acquire media material media_1 from the video editing track with sequence value #1. Similarly, functional unit M1_2 currently corresponds to sequence value #2 and is used to acquire media material media_2 from the video editing track with sequence value #2; functional unit M1_3 currently corresponds to sequence value #3 and is used to acquire media material media_3 from the video editing track with sequence value #3. Functional unit M_2, according to the unit order of each first functional unit, namely M1_1, M1_2, and M1_3, sequentially merges the obtained media materials media_1, media_2, and media_3 to generate a video image P1 of the video data. In this video image P1, at the target time, media materials media_1, media_2, and media_3 are displayed in an overlapping manner. For example, media material media_1 is at the highest display level (top layer), media material media_2 is at the middle display level (middle layer), and media material media_3 is at the lowest display level (bottom layer).
[0080] Upon receiving the first editing instruction, based on the target parameters in the first editing instruction, the sequence value corresponding to functional unit M1_1 is configured to be sequence value #2, and the sequence value corresponding to functional unit M1_2 is configured to be sequence value #1. After configuration, functional unit M1_1 is used to obtain media material media_2 on the video editing track with sequence value #2; while functional unit M1_2 is used to obtain media material media_1 on the video editing track with sequence value #1; and functional unit M1_3 is used to obtain media material media_3 on the video editing track with sequence value #3. Then, according to the unit order of each first functional unit, namely M1_1, M1_2, and M1_3, the obtained media material media_2, media material media_1, and media material media_3 are sequentially merged to generate a video image P2 of the video data. In this video image P2, at the target time, the media material media_2, media material media_1, and media material media_3 are displayed in an overlapping manner. For example, media material media_2 is at the highest display level (top layer), media material media_1 is at the middle display level (middle layer), and media material media_3 is at the lowest display level (bottom layer).
[0081] Furthermore, in one possible implementation, prior to step S209, the following steps are also included:
[0082] Step S200: Obtain mode configuration information. The mode configuration information is used to indicate the response mode of each engine module corresponding to the image generation link to the first editing command. The response mode includes data push mode or data pull mode.
[0083] Accordingly, in one possible implementation, step S209 is specifically implemented by: based on the mode configuration information, sequentially calling each engine module corresponding to the image generation link to generate video images of the video data.
[0084] For example, push and pull are two different message processing modes. Push mode refers to starting from an upstream functional unit of the engine module (e.g., ...). Figure 9 In the illustrated embodiment, the second functional unit for acquiring media materials sends the processing results of the upstream functional units to downstream functional units level by level, until the most downstream functional unit, ultimately generating and displaying the video image of the output video. In the data pull mode, starting from the downstream functional unit of the engine module, request information is sent sequentially to the upstream functional units to inform adjacent upstream functional units of the required data, until it reaches the most upstream functional unit of the engine module (e.g., the upstream functional unit). Figure 9In the illustrated embodiment, the second functional unit for acquiring media materials, the upstream functional unit determines the corresponding configuration parameters based on the received request information, and then sends the processing results back to the downstream functional units. For example, the upstream second functional unit in the engine module sends the media data on track_1 and track_3 to the downstream functional units based on the received request information. Afterwards, the downstream functional units sequentially send the processing results downwards, ultimately generating and displaying the video image of the output video. The process is the same as the data push mode and will not be described further.
[0085] In this embodiment, the response modes of each engine module are configured through mode configuration information, thereby enabling a more flexible video editing process and improving video editing efficiency. In particular, in the scheme of using the data pull mode to sequentially call each engine module corresponding to the image generation link to generate video images, the corresponding media materials can be retrieved and displayed according to the specific needs of the final output video image, without having to retrieve all media materials. For example, media materials that are completely obscured in the video image do not need to be processed in the data pull mode. Therefore, it can effectively improve the efficiency of image processing, improve the efficiency of video image generation, and reduce the consumption of computing resources.
[0086] Corresponding to the image generation method in the above embodiments, Figure 10 This is a structural block diagram of an image generation apparatus provided according to embodiments of the present disclosure. For ease of explanation, only the parts relevant to embodiments of the present disclosure are shown. (Refer to...) Figure 10 The image generating device 3 includes:
[0087] The receiving module 31 is used to receive a first editing instruction for video data, which is used to set the editing content of the video data.
[0088] The processing module 32 is used to configure the target engine module based on the first editing instruction to obtain the configured target engine module. The target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link. The image generation link is used to characterize the processing flow of the video image that generates video data. The engine module is used to implement at least one processing step in the processing flow.
[0089] The generation module 33 is used to independently call the configured target engine module to generate video images of video data.
[0090] In one embodiment of this disclosure, the video image of the video data is overlaid and displayed at least two media clips at a target time. The first editing instruction is used to set the display level of the media clips. The target engine module is a track compositing module, which is used to overlap and merge at least two media clips based on the display level of the media clips to generate the video image of the video data.
[0091] In one embodiment of this disclosure, the first editing instruction includes a target parameter, which is used to characterize the mapping relationship between the sequence values of at least one video editing track and the display layer. The track compositing module includes at least two ordered first functional units and a second functional unit. The first functional unit is used to acquire media materials on the video editing track corresponding to the sequence values and send the media materials to the first functional unit. The second functional unit is used to orderly merge the corresponding media materials based on the unit sorting corresponding to the first functional unit to generate a video image of the video data. The processing module 32 is specifically used to: configure the sequence values corresponding to each first functional unit based on the target parameter to obtain the configured track compositing module.
[0092] In one embodiment of this disclosure, after receiving the first editing instruction, the processing module 32 is further configured to: generate a corresponding request token, the request token being used to represent an image generation task for an image generation chain, the request token being released after the image generation task is completed; obtain the real-time number of currently existing request tokens; the processing module 32 is specifically configured to: if the real-time number is less than the preset target number, then based on the first editing instruction, configure the target engine module to obtain the configured target engine module.
[0093] In one embodiment of this disclosure, the processing module 32 is further configured to: obtain the link length of the image generation link, wherein the link length represents the number of processing steps in the processing flow corresponding to the image generation link; and obtain the target number based on the link length.
[0094] In one embodiment of this disclosure, the at least two engine modules corresponding to the image generation link further include an image loading module and an image processing module, wherein the image loading module is used to load media materials onto the video editing track; and the image processing module is used to perform image processing on the media materials.
[0095] In one embodiment of this disclosure, the receiving module 31 is further configured to: receive a second editing instruction, the second editing instruction including at least two ordered step identifiers, the step identifiers being used to characterize an engine module; and generate an image generation link according to the second editing instruction, wherein the image generation link is implemented based on a text-based graphics description language.
[0096] In one embodiment of this disclosure, the receiving module 31 is further configured to: receive a third editing instruction, the third editing instruction including at least one custom parameter; and register configuration parameters of the engine module according to the third editing instruction, so that the engine module can be configured based on the custom parameters.
[0097] In one embodiment of this disclosure, the generation module 33 is further configured to: obtain mode configuration information, the mode configuration information being used to indicate the response mode of each engine module corresponding to the image generation link to the first editing instruction, wherein the response mode includes a data push mode or a data pull mode; the generation module 33 is specifically configured to: based on the mode configuration information, sequentially call each engine module corresponding to the image generation link to generate video images of video data.
[0098] The receiving module 31, processing module 32, and generating module 33 are connected in sequence. The image generating device 3 provided in this embodiment can execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0099] Figure 11 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure, such as... Figure 11 As shown, the electronic device 7 includes:
[0100] Processor 41, and memory 42 communicatively connected to processor 41;
[0101] Memory 42 stores instructions executed by the computer;
[0102] The processor 41 executes computer execution instructions stored in the memory 42 to achieve, for example, Figures 2-9 The image generation method in the illustrated embodiment.
[0103] Optionally, the processor 41 and the memory 42 are connected via a bus 43.
[0104] For relevant instructions, please refer to the corresponding text. Figures 2-9 The relevant descriptions and effects of the steps in the corresponding embodiments are understood, and will not be elaborated on here.
[0105] This disclosure provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement this disclosure. Figures 2-9 The image generation method provided in any of the corresponding embodiments.
[0106] This disclosure provides a computer program product, including a computer program that, when executed by a processor, implements as follows: Figures 2-9 The image generation method in the illustrated embodiment,
[0107] refer to Figure 12 The diagram illustrates a structural schematic of an electronic device 900 suitable for implementing embodiments of the present disclosure. The electronic device 900 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. Figure 12 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0108] like Figure 12 As shown, the electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0109] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 12 An electronic device 900 with various devices is shown; however, 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 alternatively.
[0110] 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 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 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of embodiments of this disclosure.
[0111] 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 can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0112] 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.
[0113] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0114] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and 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).
[0115] 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.
[0116] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0117] 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.
[0118] 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.
[0119] In a first aspect, according to one or more embodiments of the present disclosure, an image generation method is provided, comprising:
[0120] The system receives a first editing instruction for video data, which is used to set the editing content of the video data; based on the first editing instruction, it configures a target engine module to obtain a configured target engine module, wherein the target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to characterize the processing flow for generating video images of the video data, and the engine module is used to implement at least one processing step in the processing flow; and it independently calls the configured target engine module to generate video images of the video data.
[0121] According to one or more embodiments of this disclosure, the video image of the video data overlaps at least two media clips at a target time, the first editing instruction is used to set the display level of the media clips; the target engine module is a track compositing module, which is used to overlap and merge at least two media clips based on the display level of the media clips to generate the video image of the video data.
[0122] According to one or more embodiments of this disclosure, the first editing instruction includes a target parameter, which is used to characterize the mapping relationship between the sequence values of at least one video editing track and the display level. The track compositing module includes at least two ordered first functional units and a second functional unit, wherein the first functional unit is used to acquire media material on the video editing track corresponding to the sequence value and send the media material to the first functional unit; the second functional unit is used to orderly merge the corresponding media material based on the unit sorting corresponding to the first functional unit to generate a video image of the video data; the step of configuring the target engine module based on the first editing instruction to obtain the configured target engine module includes: configuring the sequence values corresponding to each of the first functional units based on the target parameter to obtain the configured track compositing module.
[0123] According to one or more embodiments of this disclosure, after receiving the first editing instruction, the method further includes: generating a corresponding request token, the request token being used to represent an image generation task for the image generation chain, the request token being released after the image generation task is completed; obtaining the real-time number of currently existing request tokens; the step of configuring the target engine module based on the first editing instruction to obtain the configured target engine module includes: if the real-time number is less than a preset target number, then configuring the target engine module based on the first editing instruction to obtain the configured target engine module.
[0124] According to one or more embodiments of this disclosure, the method further includes: obtaining the link length of the image generation link, the link length representing the number of processing steps in the processing flow corresponding to the image generation link; and obtaining the target number based on the link length.
[0125] According to one or more embodiments of this disclosure, the at least two engine modules corresponding to the image generation link further include an image loading module and an image processing module, wherein the image loading module is used to load media materials onto the video editing track; and the image processing module is used to perform image processing on the media materials.
[0126] According to one or more embodiments of this disclosure, the method further includes: receiving a second editing instruction, the second editing instruction including at least two ordered step identifiers, the step identifiers being used to characterize an engine module; and generating an image generation chain according to the second editing instruction, wherein the image generation chain is implemented based on a text-based graphics description language.
[0127] According to one or more embodiments of this disclosure, the method further includes: receiving a third editing instruction, the third editing instruction including at least one custom parameter; and registering configuration parameters of the engine module according to the third editing instruction, so that the engine module can be configured based on the custom parameter.
[0128] According to one or more embodiments of this disclosure, the method further includes: obtaining mode configuration information, the mode configuration information being used to indicate the response mode of each engine module corresponding to the image generation link to the first editing instruction, wherein the response mode includes a data push mode or a data pull mode; the step of individually calling the configured target engine module to generate a video image of the video data includes: based on the mode configuration information, sequentially calling each engine module corresponding to the image generation link to generate a video image of the video data.
[0129] Secondly, according to one or more embodiments of this disclosure, an image generation apparatus is provided, comprising:
[0130] The receiving module is used to receive a first editing instruction for video data, the first editing instruction being used to set the editing content of the video data.
[0131] The processing module is configured to configure a target engine module based on the first editing instruction to obtain the configured target engine module. The target engine module is the engine module used to control the editing content among at least two engine modules corresponding to the image generation link. The image generation link is used to characterize the processing flow of the video image that generates the video data. The engine module is used to implement at least one processing step in the processing flow.
[0132] The generation module is used to independently call the configured target engine module to generate video images of the video data.
[0133] According to one or more embodiments of this disclosure, the video image of the video data overlaps at least two media clips at a target time, the first editing instruction is used to set the display level of the media clips; the target engine module is a track compositing module, which is used to overlap and merge at least two media clips based on the display level of the media clips to generate the video image of the video data.
[0134] According to one or more embodiments of this disclosure, the first editing instruction includes a target parameter, which is used to characterize the mapping relationship between the sequence values of at least one video editing track and the display level. The track compositing module includes at least two ordered first functional units and a second functional unit, wherein the first functional unit is used to acquire media material on the video editing track corresponding to the sequence value and send the media material to the first functional unit; the second functional unit is used to orderly merge the corresponding media material based on the unit sorting corresponding to the first functional unit to generate a video image of the video data; the processing module is specifically used to: configure the sequence values corresponding to each of the first functional units based on the target parameter to obtain the configured track compositing module.
[0135] According to one or more embodiments of this disclosure, after receiving the first editing instruction, the processing module is further configured to: generate a corresponding request token, the request token being used to represent an image generation task for the image generation chain, the request token being released after the image generation task is completed; obtain the real-time number of currently existing request tokens; the processing module 32 is specifically configured to: if the real-time number is less than a preset target number, configure a target engine module based on the first editing instruction to obtain the configured target engine module.
[0136] According to one or more embodiments of this disclosure, the processing module is further configured to: obtain the link length of the image generation link, the link length representing the number of processing steps in the processing flow corresponding to the image generation link; and obtain the target number based on the link length.
[0137] According to one or more embodiments of this disclosure, the at least two engine modules corresponding to the image generation link further include an image loading module and an image processing module, wherein the image loading module is used to load media materials onto the video editing track; and the image processing module is used to perform image processing on the media materials.
[0138] In one embodiment of this disclosure, the receiving module is further configured to: receive a second editing instruction, the second editing instruction including at least two ordered step identifiers, the step identifiers being used to characterize an engine module; and generate an image generation chain according to the second editing instruction, wherein the image generation chain is implemented based on a text-based graphics description language.
[0139] According to one or more embodiments of this disclosure, the receiving module is further configured to: receive a third editing instruction, the third editing instruction including at least one custom parameter; and register configuration parameters of the engine module according to the third editing instruction, so that the engine module can be configured based on the custom parameter.
[0140] According to one or more embodiments of this disclosure, the generation module is further configured to: obtain mode configuration information, the mode configuration information being used to indicate the response mode of each engine module corresponding to the image generation link to the first editing instruction, wherein the response mode includes a data push mode or a data pull mode; the generation module is specifically configured to: based on the mode configuration information, sequentially call each engine module corresponding to the image generation link to generate a video image of the video data.
[0141] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, including: a processor, and a memory communicatively connected to the processor;
[0142] The memory stores computer-executed instructions;
[0143] The processor executes computer execution instructions stored in the memory to implement the image generation method as described in the first aspect and various possible designs of the first aspect.
[0144] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, which, when executed by a processor, implement the image generation method described in the first aspect and various possible designs of the first aspect.
[0145] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the image generation method as described in the first aspect and various possible designs of the first aspect.
[0146] 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.
[0147] 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 a 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.
[0148] 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 examples of implementing the claims.
Claims
1. An image generation method, characterized in that, include: Receive a first editing instruction for video data, the first editing instruction being used to set the editing content of the video data; The target engine module matching the first editing instruction in the image generation chain is determined according to the first editing instruction. The target engine module is configured based on the first editing instruction to obtain the configured target engine module, without configuring other engine modules in the image generation chain. The target engine module is the engine module used to control the edited content among at least two engine modules corresponding to the image generation chain. The image generation chain is used to characterize the processing flow of the video image that generates the video data. The engine module is used to implement at least one processing step in the processing flow. The configured target engine module is invoked separately to generate video images of the video data.
2. The method according to claim 1, characterized in that, The video images of the video data are displayed in an overlapping manner at a target time, with at least two media clips superimposed. The first editing instruction is used to set the display level of the media clips. The target engine module is a track compositing module, which is used to overlap and merge at least two media materials based on the display level of the media materials to generate a video image of the video data.
3. The method according to claim 2, characterized in that, The first editing instruction includes a target parameter, which is used to characterize the mapping relationship between the sequence value of at least one video editing track and the display level. The track synthesis module includes at least two ordered first functional units and a second functional unit. The first functional unit is used to obtain media material on the video editing track with the corresponding sequence value and send the media material to the first functional unit. The second functional unit is used to merge the corresponding media materials in an orderly manner based on the unit sorting corresponding to the first functional unit, and generate the video image of the video data; The step of configuring the target engine module based on the first editing instruction to obtain the configured target engine module includes: Based on the target parameters, the sequence values corresponding to each of the first functional units are configured to obtain the configured orbit synthesis module.
4. The method according to claim 1, characterized in that, After receiving the first editing instruction, the process also includes: A corresponding request token is generated, which is used to represent an image generation task for the image generation chain, and the request token is released after the image generation task is completed. Get the real-time number of currently existing request tokens; The step of configuring the target engine module based on the first editing instruction to obtain the configured target engine module includes: If the real-time quantity is less than the preset target quantity, then based on the first editing instruction, the target engine module is configured to obtain the configured target engine module.
5. The method according to claim 4, characterized in that, The method further includes: Obtain the link length of the image generation link, whereby the link length represents the number of processing steps in the processing flow corresponding to the image generation link; The target quantity is obtained based on the link length.
6. The method according to claim 2, characterized in that, The image generation link includes at least two engine modules, including an image loading module and an image processing module. The image loading module is used to load media materials onto the video editing track, and the image processing module is used to perform image processing on the media materials.
7. The method according to claim 1, characterized in that, The method further includes: Receive a second editing instruction, which includes at least two ordered step identifiers, the step identifiers being used to characterize an engine module; According to the second editing instruction, an image generation chain is generated, wherein the image generation chain is implemented based on a text-based graphics description language.
8. The method according to claim 1, characterized in that, The method further includes: Receive a third editing instruction, wherein the third editing instruction includes at least one custom parameter; According to the third editing instruction, the configuration parameters of the engine module are registered so that the engine module can be configured based on the custom parameters.
9. The method according to claim 1, characterized in that, Also includes: Obtain mode configuration information, which is used to indicate the response mode of each engine module corresponding to the image generation link to the first editing command, wherein the response mode includes data push mode or data pull mode; The step of separately invoking the configured target engine module to generate video images of the video data includes: Based on the mode configuration information, the corresponding engine modules of the image generation link are called sequentially to generate video images of the video data.
10. An image generation apparatus, characterized in that, include: The receiving module is configured to receive a first editing instruction for video data, wherein the first editing instruction is used to set the editing content of the video data; The processing module is configured to determine the target engine module in the image generation chain that matches the first editing instruction according to the first editing instruction, configure the target engine module based on the first editing instruction to obtain the configured target engine module, without configuring other engine modules in the image generation chain. The target engine module is the engine module used to control the edited content among at least two engine modules corresponding to the image generation chain. The image generation chain is used to characterize the processing flow of the video image that generates the video data, and the engine module is used to implement at least one processing step in the processing flow. The generation module is used to independently call the configured target engine module to generate video images of the video data.
11. An electronic device, characterized in that, include: A processor, and a memory communicatively connected to the processor; The memory stores computer-executed instructions; The processor executes computer execution instructions stored in the memory to implement the image generation method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the image generation method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that, It includes a computer program that, when executed by a processor, implements the image generation method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Engine system and rendering method thereof
CN111158866A
Video clip synthesis method and electronic equipment
CN113891113A
System resource allocation method and device
CN116382899A