Image generation method and device, electronic equipment and storage medium
By configuring the target engine module and calling it separately to generate video images, the problems of slow video image generation speed and untimely response are solved, and efficient video image processing and fast response are achieved.
Patent Information
- Application Number
- CN202311266396.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-27
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2043-09-27
AI Technical Summary
In the prior art, video image generation speed is slow and response is not timely, which affects video editing efficiency.
By receiving the first editing instruction for video data, the target engine module is configured, and the configured target engine module is called separately to generate video images, so as to achieve rapid update and efficient processing of the image generation link.
The generation speed and response speed of video images are improved, the processing steps for generating synthetic images are reduced, and the processing efficiency is improved.
Smart Images

Figure CN119729037A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present disclosure relate to the field of image processing technology, and in particular to an image generating method, device, electronic device and storage medium. Background Art
[0002] Currently, in video processing scenarios such as editing and synthesizing audio and video data based on video editing software, users usually set media materials on video editing tracks, perform corresponding editing, adjustments and previews, and then synthesize multiple video editing tracks to generate a final synthesized image.
[0003] In the prior art, in order to achieve better effects in synthesizing pictures, video editing software usually responds to the user's editing operations in real time and displays the video image after video editing. However, the solutions in the prior art have problems such as slow video image generation speed and untimely response, which affects the efficiency of video editing. Summary of the invention
[0004] The embodiments of the present disclosure provide an image generation method, device, electronic device and storage medium to overcome the problems of slow video image generation and untimely response.
[0005] In a first aspect, an embodiment of the present disclosure provides an image generation method, including:
[0006] A first editing instruction for video data is received, wherein the first editing instruction 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 an engine module for controlling the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to characterize a processing flow for generating a video image 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 called separately to generate a video image of the video data.
[0007] In a second aspect, an embodiment of the present disclosure provides an image generating device, including:
[0008] A receiving module, used for receiving a first editing instruction for video data, wherein the first editing instruction is used for setting editing content of the video data;
[0009] a processing module, configured to configure a target engine module based on the first editing instruction to obtain a configured target engine module, wherein the target engine module is an engine module for controlling the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to represent a processing flow for generating a video image of the video data, and the engine module is used to implement at least one processing step in the processing flow;
[0010] A generation module is used to separately call the configured target engine module to generate a video image of the video data.
[0011] In a third aspect, an embodiment of the present disclosure provides an electronic device, including:
[0012] A processor, and a memory communicatively connected to the processor;
[0013] The memory stores computer-executable instructions;
[0014] The processor executes the computer-executable instructions stored in the memory to implement the image generating method as described in the first aspect and various possible designs of the first aspect.
[0015] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the image generation method described in the first aspect and various possible designs of the first aspect is implemented.
[0016] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image generation method described in the first aspect and various possible designs of the first aspect.
[0017] The image generation method, device, electronic device and storage medium provided in this embodiment receive a first editing instruction for video data, wherein the first editing instruction is used to set the editing content of the video data; based on the first editing instruction, configure the target engine module to obtain the configured target engine module, wherein the target engine module is an engine module for controlling 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 the video image of the 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 called separately to generate the video image of the video data. After receiving the first editing instruction, only the target engine module for controlling the editing content corresponding to the first editing instruction is configured, thereby realizing the functional decoupling of each engine module. In this case, responding to the first editing instruction will not affect the entire image generation link, thereby reducing the processing steps for generating the composite image, improving the processing efficiency, and improving the generation speed and response speed of the video image. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0019] Figure 1 A schematic diagram of an application scenario of the image generation method provided by an embodiment of the present disclosure;
[0020] Figure 2 Schematic diagram of the image generation method provided in the embodiment of the present disclosure Figure 1 ;
[0021] Figure 3 A schematic diagram of an engine module provided by an embodiment of the present disclosure;
[0022] Figure 4 A schematic diagram of a process for generating a first editing instruction provided by an embodiment of the present disclosure;
[0023] Figure 5 A schematic diagram of the process of the image generation method provided in the embodiment of the present disclosure Figure 2 ;
[0024] Figure 6 A schematic diagram of an image generation link represented by a text image description language provided in an embodiment of the present disclosure;
[0025] Figure 7 for Figure 5 A flowchart of a specific implementation method of step S206 in the illustrated embodiment;
[0026] Figure 8 for Figure 7 A flowchart of a specific implementation method of step S2063 in the illustrated embodiment;
[0027] Fig. 9 A schematic diagram of a configuration process of a track synthesis module provided in an embodiment of the present disclosure;
[0028] Fig.10 A structural block diagram of an image generating device provided in an embodiment of the present disclosure;
[0029] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure;
[0030] Fig.12 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present disclosure clearer, the technical solution in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present 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, stored data, displayed data, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0033] The application scenarios of the embodiments of the present disclosure are explained below:
[0034] The video processing method provided by the embodiment of the present disclosure can be applied to the application scenario of video editing. Specifically, the method provided by the embodiment of the present disclosure can be applied to a terminal device or a server, wherein, when the execution subject of the method provided by the present embodiment is a terminal device, the video processing method can be executed by the terminal device, and the execution result can be displayed on the terminal device; when the execution subject of the method provided by the present embodiment is a server, it can be based on executing the video processing method by the server, and sending the execution result to the terminal device for display. In this embodiment, the application scenario is introduced with the terminal device as the execution subject. Exemplarily, a video editing software for editing videos is running on one side of the terminal device, and the video editing software uses the video processing method provided by the present embodiment to implement functions such as video editing, synthesis, and preview. Specifically, the method provided by the present embodiment is stored in the terminal device in the form of an SDK, and the video editing software executes the corresponding function by calling the SDK corresponding to the method of the present embodiment.
[0035] Figure 1 A schematic diagram of an application scenario of the image generation method provided by the embodiment of the present disclosure, referring to Figure 1 As shown, in the video editing interface of the video editing software, there is a material window for selecting and loading media materials, a preview window for displaying preview videos, and a video editing window, wherein there are multiple video editing tracks in the video editing window, and on each video editing track, there are media materials such as video clips, music clips, special effects, etc. The user can perform editing operations such as adding, deleting, and modifying the media materials on the video editing track based on needs. Each video editing track corresponds to the same timeline, and by editing the media materials on each video editing track, the design of the screen content of the video data at a specific moment can be realized; at the same time, after the content on the video editing track changes, the video editing software can generate the corresponding video image in real time, such as the preview image corresponding to the editing operation; and display it in the preview window to realize the display of the editing results, so that the operating user can further adjust and edit the video data based on the preview results. For example Figure 1 As shown in, video clip #1 and video clip #2 are set on the video editing track Track_1, video clip #3 is set on the video editing track Track_2, and music clip #4 is set on the video editing track Track_3. Afterwards, the user moves the video clip #1 on the video editing track Track_1 to the video editing track Track_2 by inputting editing instructions, and the content of the video data changes. At the same time, the video image of the changed video data is displayed in the preview window of the video editing interface.
[0036] For the above application scenarios, when the terminal device responds to the above editing instructions and generates video images (through video editing software), it will execute a complete image generation chain. The image generation chain consists of multiple processing steps, such as: video material decoding, special effect position setting, multi-channel media material fusion, and synthetic image display. In the prior art, the execution of the above image generation chain is fixed, and in response to different editing instructions, it is necessary to execute the complete image generation chain. For example, the editing operation of moving the media material of the first video editing track to the second video editing track requires the execution of multiple steps such as decoding, setting, and multi-channel synthesis of the moved media material to generate the final video image. This leads to problems such as slow video image generation speed and untimely response, which affects the efficiency of video editing. The disclosed embodiments provide a video processing method to solve the above problems.
[0037] refer to Figure 2 , Figure 2 Schematic diagram of the image generation method provided in the embodiment of the present disclosure Figure 1 The method of this embodiment can be applied in a terminal device. The image generation method includes:
[0038] Step S101: receiving a first editing instruction for video data, where the first editing instruction is used to set editing content of the video data.
[0039] For example, reference Figure 1 The schematic diagram of the application scenario shown in the figure shows that after the video editing software is started, based on the specific operation of the user, a new video processing task / project is created, or an existing video processing task / project is loaded, so as to display a video editing interface for the video data. Wherein, in the case of a new processing task / project, the displayed video editing interface may not include a video editing track, or may only have one or a few empty video editing tracks, where an empty video editing track refers to a video editing track on which no media material is set. Afterwards, based on the first editing instruction input by the user, the video editing track is further increased or decreased, or at least one media material is set on the video editing track; and in the case of loading an existing video processing task / project, after the video editing software loads the video processing task / project of the video data, at least one valid video editing track of the video data is displayed in the video editing page, and at least one media material is set on the valid video editing track.
[0040] Furthermore, the terminal device receives a first editing instruction input by the user, wherein the first editing instruction refers to an instruction obtained by the terminal device through the human-computer interaction interface to convert the user operation, and is used to set the media material in the video editing track and / or the video bias track of the above-mentioned video to be generated, for example, adding media material, deleting media material, setting the position of media material on the video editing track, setting the video editing track where the media material is located, etc. The setting items of the video data specifically indicated by the first editing instruction are the editing contents. The specific implementation method of the first editing instruction can be set as needed, which will be described in detail in the subsequent embodiments.
[0041] Step S102: Based on the first editing instruction, configure the target engine module to obtain the configured target engine module, wherein the target engine module is an engine module for controlling 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 a video image of video data, and the engine module is used to implement at least one processing step in the processing flow.
[0042] Step S103: calling the configured target engine module separately to generate a video image of the video data.
[0043] Exemplarily, the image generation method provided in this embodiment implements the image generation link through a preset independent engine module. More specifically, the engine module is provided by a preset image processing engine, wherein the image generation link is used to characterize the processing flow of generating video images of video data, wherein the view image may refer to one or more preview images generated in real time after the terminal device responds to the editing operation; or it may be the output video generated by the final rendering. There is no specific restriction here, and it can be set based on needs. 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 realizing the configuration of the overall image generation link. Figure 3 A schematic diagram of an engine module provided by an embodiment of the present disclosure, such as Figure 3 As shown, the image processing engine is preset with an image loading module, an image processing module, a track synthesis module and an image display module, wherein the image loading module is used to load media materials onto the video editing track. The image processing module is used to perform image processing on the media materials, the track synthesis module is used to overlap and merge at least two media materials to generate a video image of the video data, and the image display module is used to display the video image of the video data in the preview window. The above four engine modules are connected in sequence, and after executing the corresponding processing steps respectively, the execution of the image generation link is realized.
[0044] Furthermore, after receiving the first editing instruction, according to the setting target represented by the first editing instruction, that is, the editing content of the video data, an engine module that matches the editing content, that is, a target engine module, is determined to respond to the first editing instruction, and the target engine module is an engine module that can control the editing content. Specifically, for example, when the video data editing content set by the first editing instruction is to set the display level of each media material constituting the video data, the opposite target engine module is determined to be a track synthesis module that can control the display level of each media material in the video data; when 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 synthesized, the corresponding target engine module is determined to be an image processing module that can control the image position of the media material. In actual applications, the target engine module matched by the first editing instruction can be determined according to the functions specifically implemented by each engine module, and the specific matching method will not be repeated one by one.
[0045] After determining the target engine module, the target engine module is configured based on the first editing instruction, so that the target engine model can work based on the working logic and parameters indicated by the first editing instruction, thereby generating a video image of the image to be synthesized set by the first editing instruction. The following is a more specific embodiment to introduce the implementation process of step S102:
[0046] In a possible implementation, the video image of the video data overlaps and displays at least two media materials at a target moment. The first editing instruction is used to set the display level of the media material. According to the editing content set by the first editing instruction, the target engine module that matches it is a track synthesis module. The track synthesis module is used to overlap and merge at least two media materials based on the display level of the media material to generate a video image of the video data. Further, exemplarily, the first editing instruction includes a target parameter, and the target parameter is used to characterize the mapping relationship between the sequence value and the display level of at least one video editing track. The first editing instruction can be implemented based on the user's setting operation of the video editing track in the video editing interface. Figure 4 A schematic diagram of a process for generating a first editing instruction provided by an embodiment of the present disclosure is shown in FIG. Figure 4As shown, in the video editing window, multiple video editing tracks are set, and each level of video editing track corresponds to a sequence value (shown as #1, #2 and #3 in the figure). The video editing window is also provided with a first combination and a second component. When the first component is triggered (for example, the user clicks the first component, the same below), a target parameter para_1 is generated. At this time, the sequence value corresponds to the display level in reverse, that is, the smaller the sequence value, the higher the display level; when the second component is triggered, a target parameter para_2 is generated. At this time, the sequence value corresponds to the display level in a positive direction, that is, the larger the sequence value, the lower the display level. Based on the specific operation of the user, the first editing instruction is generated to include the above-mentioned target parameter para_1 or target parameter para_2. Afterwards, 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 synthesis module, so that the track synthesis module can obtain the corresponding display level based on the sequence values corresponding to each level of video editing track, and overlap and merge the media materials on the video editing track based on the display level to generate a video image of overlapping display media materials.
[0047] Furthermore, after the configuration of the target engine module is completed, the configured target engine module is obtained, and then the engine modules corresponding to the image generation link are called in sequence, for example, the image loading module, the image processing module and the configured track synthesis module are called in sequence 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. The image generation link is decoupled through multiple engine modules, and only the target engine module corresponding to the first editing instruction is configured, while other non-engine modules do not need to be configured or changed, so that the image generation link is quickly updated, the operation stability of the image generation link is improved, and the video image of the video data is quickly generated.
[0048] In this embodiment, the image generation method, device, electronic device and storage medium receive a first editing instruction for video data, the first editing instruction is used to set the editing content of the video data; based on the first editing instruction, configure the target engine module to obtain the configured target engine module, wherein the target engine module is an engine module for controlling 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 the video image of the video data, and the engine module is used to implement at least one processing step in the processing flow; and call the configured target engine module separately to generate the video image of the video data. After receiving the first editing instruction, only the target engine module for controlling the editing content corresponding to the first editing instruction is configured, so as to achieve the decoupling of the functions of each engine module. In this case, responding to the first editing instruction will not affect the entire image generation link, thereby reducing the processing steps for generating the composite image, improving the processing efficiency, and improving the generation speed and response speed of the video image.
[0049] refer to Figure 5 , Figure 5 A schematic diagram of the process of the image generation method provided in the embodiment of the present disclosure Figure 2 In this embodiment, Figure 2 On the basis of the illustrated embodiment, step S102 is further refined, and a step of generating an image generation link is added. The image generation method includes:
[0050] Step S201: receiving a second editing instruction, wherein the second editing instruction includes at least two ordered step identifiers, and the step identifier is used to represent an engine module.
[0051] Step S202: Generate an image generation link according to the second editing instruction, where the image generation link is used to generate at least two segments of media material video data for overlapping display at a target time.
[0052] Exemplarily, the second editing instruction is an instruction for generating an image generation link, that is, an instruction for setting a processing flow of video data. In a specific application scenario, when different processing flows are used for video data, different image generation links are used. For example, under the first processing flow, in the process of editing video data, whenever the video to be processed changes in response to the first editing instruction, only the video image of the changed video to be processed is statically displayed through the preview window; under the second processing flow, in the process of editing video data, whenever the video to be processed changes in response to the first editing instruction, the video clip of the changed video to be processed is dynamically displayed through the preview window; under the third processing flow, in the process of editing video data, whenever the video to be processed changes in response to the first editing instruction, the video clip of the changed video to be processed is dynamically displayed through the preview window, and the audio material corresponding to the video to be processed is played. The above-mentioned different processing flows can be realized by different image generation links.
[0053] In one possible implementation, the video editing software pre-sets a default image generation link, and when the terminal device does not receive the second editing instruction, the default image generation link is used to execute the subsequent processing flow; or, based on the selection instruction input by the user, an image generation link is selected from a plurality of preset image generation links to execute the subsequent processing flow. In another possible implementation, after the terminal device receives the second editing instruction through the video editing software, it constructs a new, personalized image generation link based on at least two ordered step identifiers included in the second editing instruction, wherein the step identifier is used to characterize an engine module, and the engine module is provided by the image processing engine, and the specific usage is not repeated. In this embodiment, by receiving the second editing instruction, the generated image generation link is used to generate at least two segments of media material video data that are displayed overlappingly at the target time.
[0054] In this embodiment, by receiving the second editing instruction, a new image processing link is constructed according to at least two ordered step identifiers included in the second editing instruction, thereby realizing personalized image processing and image generation processing steps, meeting the personalized needs of users, and improving the editing efficiency and operation efficiency in the image editing process.
[0055] Furthermore, in a possible implementation, the image generation link is implemented based on a textual image description language, wherein the textual image description language provides a simple method for describing graphics and can be understood by humans and computer programs. Figure 6 A schematic diagram of an image generation link based on a text image description language representation provided by an embodiment of the present disclosure, such as Figure 6As shown, the image generation link L1 is used to realize the video preview function, which is realized by calling the image loading module M1, the image processing module M2 and the track synthesis module M3 in sequence, that is, calling the image loading module M1, the image processing module M2 and the track synthesis module M3 in sequence, and after executing three processing steps, a video image is generated. The image generation link is represented as "M1—>M2—>M3" based on the text image description language. Since the image generation link is generated based on the second editing instruction input by the user, the image generation link is represented by the text image description language, which can simplify the instruction complexity of the second editing instruction, and make the generated image generation link more readable, thereby improving the efficiency of users in constructing customized image generation links.
[0056] Step S203: receiving a third editing instruction, wherein the third editing instruction includes at least one custom parameter.
[0057] Step S204: registering the 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.
[0058] Further, the third editing instruction is an instruction for registering custom parameters. For the configuration parameters used by the engine model, they usually have preset names, such as the configuration parameters of the 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 and dynamically load the parameters. In this embodiment, by receiving the custom parameters in the third editing instruction input by the user, the configuration parameters of the engine module are registered, that is, a mapping relationship between the custom parameters and the original configuration parameters of the engine model is established, so that when the engine module is subsequently called, it can be called based on the custom parameters. More specifically, for example, the engine module M1 has a configuration parameter called "brightness" for controlling the brightness of the video. After receiving the third editing instruction and responding, the terminal device registers the custom parameter "bright" to the engine module M1. Later, when calling the engine module M1, the parameter "bright" 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 the third editing instruction, thereby realizing dynamic registration of the configuration parameters of the engine module. When the first editing instruction is used to configure the target engine module, the efficiency of the user inputting the first editing instruction can be improved, thereby improving the efficiency of human-computer interaction.
[0060] Step S205: receiving a first editing instruction for video data, wherein the first editing instruction includes a target parameter, and the target parameter is used to characterize a mapping relationship between a sequence value of at least one video editing track and a display level.
[0061] The specific implementation of step S205 is as follows: Figure 2 In step S102 of the illustrated embodiment, corresponding introduction has been made 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, since responding to the first operation instruction requires consuming corresponding system computing resources, the terminal device often needs to respond in a task queue after receiving multiple first editing instructions in succession, thereby avoiding the problem of stopping response (out of memory) due to resource exhaustion. Therefore, in this embodiment, after receiving the first operation instruction, the execution load of the image generation link corresponding to the first operation instruction is first detected. For example, 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, where the request token is used to represent an image generation task for an image generation link, and the request token is released after the image generation task is completed.
[0066] Step S2062: Obtain the preset target quantity of the request token.
[0067] Step S2063: Obtain the real-time number of currently 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, execute step S207; otherwise, return to step S2063.
[0069] Example action, in response to receiving the first editing instruction, generating a request token for the task corresponding to the first editing instruction, the request token is an identification information that characterizes the request task, corresponding to a certain computing resource. In a possible implementation, generating a request token means creating a token thread for executing the corresponding image generation link. Afterwards, the number of token threads currently running in the memory is calculated, that is, the real-time number. If the real-time number is equal to or greater than the preset target number, indicating that the load is large at this time, then the newly generated first editing instruction will not be responded to for the time being. Optionally, after waiting for a preset period of time, return to step S2063 and re-compare. With the execution of other image generation links, each time the corresponding task is executed, the request token will be released, and the real-time number of the request token will decrease until the real-time number of the currently running request token is less than the target number, then start to respond to the first editing instruction and execute subsequent steps.
[0070] In the steps of this embodiment, by setting a target number of request tokens, the number of image generation links currently executed by the system is controlled, thereby avoiding the problem of stopping response due to exhaustion of computing resources and improving the real-time and stability of generating image preview frames during video editing.
[0071] Among them, for example, Figure 8 As shown, the specific implementation of step S2062 includes:
[0072] Step S2062A: obtaining the link length of the image generation link, where 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 according to the link length.
[0074] Exemplarily, for different image generation links, that is, different image processing flows, the computing resources required and consumed are different. Setting a fixed target number to limit the number of request tokens will result in low resource utilization. In this embodiment, the corresponding target number is determined by the link length of the image generation link. The longer the link length of the image generation link, the more processing steps there are and the more resources are consumed, and the corresponding target number is smaller, so as to limit the number of request tokens and reduce the number of image generation links executed at the same time to ensure system stability. The shorter the link length of the image generation link, the fewer processing steps there are and the less resources are consumed, and the corresponding target number is larger, so as to increase the number of request tokens and the number of image generation links executed at the same time to improve response speed.
[0075] Step S207: obtaining a track synthesis module corresponding to the first editing instruction, wherein the track synthesis module includes at least two first functional units arranged in order and one second functional unit.
[0076] Step S208: Based on the target parameters, the sequence values corresponding to the first functional units are configured to obtain a configured track synthesis module.
[0077] Step S209: calling the configured track synthesis module to generate a video image of the video data.
[0078] Exemplarily, the first functional unit is used to obtain media materials on a video editing track corresponding to a sequence value and send the media materials to the first functional unit; the second functional unit is used to orderly merge corresponding media materials based on the unit sorting corresponding to the first functional unit to obtain video data.
[0079] In a possible implementation, the engine module may be composed of a plurality of orderly connected functional units, that is, the engine module also contains a smaller processing link inside, so as to realize the specific functions of the engine module. In the process of configuring the engine module, the configuration of the engine module is realized by configuring the internal functional units constituting the engine module. Fig. 9 A schematic diagram of a configuration process of a track synthesis module provided in an embodiment of the present disclosure is shown in FIG. Fig. 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 a second functional unit, namely, functional unit M2. Among them, the sequence value currently corresponding to the functional unit M1_1 is #1, and the functional unit M1_1 currently obtains the media material media_1 on the video editing track with the sequence value #1; similarly, the sequence value currently corresponding to the functional unit M1_2 is #2, which is used to obtain the media material media_2 on the video editing track with the sequence value #2; the sequence value currently corresponding to the functional unit M1_3 is #3, which is used to obtain the media material media_3 on the video editing track with the sequence value #3. The functional unit M_2 sequentially merges the obtained media materials media_1, media material media_2, and media material media_3 according to the unit sorting of each first functional unit, i.e., the order of M1_1, M1_2, and M1_3, to generate a video image P1 of the video data. In the video image P1, at the target moment, the media materials media_1, media material media_2, and media material media_3 are sequentially displayed overlappingly, for example, the media material media_1 is at the highest display level (top level), the media material media_2 is at the middle display level (middle level), and the media material media_3 is at the lowest display level (bottom level).
[0080] After receiving the first editing instruction, according to the target parameters in the first editing instruction, the sequence value corresponding to the function unit M1_1 is configured to be a sequence value of #2, and the sequence value corresponding to the function unit M1_2 is configured to be a sequence value of #1. After configuration, the function unit M1_1 is used to obtain the media material media_2 on the video editing track with a sequence value of #2; and the function unit M1_2 is used to obtain the media material media_1 on the video editing track with a sequence value of #1, and the function unit M1_3 is used to obtain the media material media_3 on the video editing track with a sequence value of #3. Afterwards, the functional unit M_2 sequentially merges the obtained media materials media_2, media material media_1, and media material media_3 according to the unit sorting of each first functional unit, i.e., the order of M1_1, M1_2, and M1_3, to generate a video image P2 of the video data. In the video image P2, at the target moment, the media materials media_2, media material media_1, and media material media_3 are displayed overlappingly in sequence, for example, the media material media_2 is at the highest display level (top level), the media material media_1 is at the middle display level (middle level), and the media material media_3 is at the lowest display level (bottom level).
[0081] Furthermore, in a possible implementation, before step S209, the method further includes:
[0082] Step S200: Acquire mode configuration information, where 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 instruction, wherein the response mode includes a data push mode or a data pull mode.
[0083] Accordingly, in a possible implementation, a specific implementation of step S209 includes: based on the mode configuration information, calling each engine module corresponding to the image generation link in sequence to generate a video image of the video data.
[0084] For example, data push mode and data pull mode are two different message processing modes. The data push mode refers to starting from the upstream functional unit of the engine module (for example Fig. 9 In the data pull mode, the processing result of the upstream functional unit is sent to the downstream functional unit step by step until the most downstream functional unit, and finally the video image of the output video is generated and displayed. In the data pull mode, the downstream functional unit of the engine module sends the request information to the upstream functional unit in turn to inform the adjacent upstream functional unit of the required data until the most upstream functional unit of the engine module (for example) is reached. Fig. 9In the embodiment shown, the second functional unit for obtaining media materials) determines the corresponding configuration parameters based on the obtained request information, and then sends the processing results to the downstream functional units in reverse. For example, the second functional unit at the most upstream in the engine module sends the media data on track_1 and track_3 to the downstream functional units based on the obtained request information. After that, the downstream functional units send the processing results downward in turn, and finally realize the generation and display of the video image of the output video. The process is the same as the data push mode and will not be repeated.
[0085] In this embodiment, the response mode of each engine module is configured through mode configuration information, so as to achieve a more flexible video editing process and improve the video editing efficiency. In particular, in the scheme of using the data pull mode to sequentially call the engine modules corresponding to the image generation link to generate a video image of the video data, the corresponding media material can be reversely acquired for display according to the specific needs of the final output video image without acquiring all the 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, the efficiency of image processing can be effectively improved, the efficiency of video image generation can be improved, and the consumption of computing resources can be reduced.
[0086] Corresponding to the image generation method of the above embodiment, Fig.10 This is a structural block diagram of an image generation device provided by an embodiment of the present disclosure. For ease of explanation, only the parts related to the embodiment of the present disclosure are shown. Fig.10 , the image generating device 3 comprises:
[0087] The receiving module 31 is used to receive a first editing instruction for video data, where the first editing instruction is used to set 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, wherein the target engine module is an engine module for controlling 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 a video image of video data, and the engine module is used to implement at least one processing step in the processing flow.
[0089] The generating module 33 is used to separately call the configured target engine module to generate a video image of the video data.
[0090] In one embodiment of the present disclosure, a video image of video data overlaps and displays at least two media materials at a target moment, and a first editing instruction is used to set a display level of the media material; a target engine module is a track synthesis module, and the track synthesis module is used to overlap and merge at least two media materials based on the display level of the media material to generate a video image of the video data.
[0091] In one embodiment of the present disclosure, 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 orderly arranged first functional units and one second functional unit, wherein the first functional unit is used to obtain the 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 32 is specifically used to: based on the target parameter, configure the sequence value corresponding to each first functional unit to obtain the configured track synthesis module.
[0092] In one embodiment of the present disclosure, after receiving the first editing instruction, the processing module 32 is also used to: generate a corresponding request token, the request token is used to represent an image generation task for an image generation link, and the request token is released after the image generation task is completed; obtain the real-time number of currently existing request tokens; the processing module 32 is specifically used 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 the present disclosure, the processing module 32 is further used to: obtain the link length of the image generation link, where the link length represents the number of processing steps in the processing flow corresponding to the image generation link; and obtain the target number according to the link length.
[0094] In one embodiment of the present disclosure, at least two engine modules corresponding to the image generation link also 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 the present disclosure, the receiving module 31 is further used to: receive a second editing instruction, the second editing instruction includes at least two ordered step identifiers, and the step identifier is used to characterize an engine module; according to the second editing instruction, generate an image generation link, wherein the image generation link is implemented based on a text graphic description language.
[0096] In one embodiment of the present disclosure, the receiving module 31 is further used to: receive a third editing instruction, the third editing instruction including at least one custom parameter; and register the 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 the present disclosure, the generation module 33 is further used to: 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 instruction, wherein the response mode includes a data push mode or a data pull mode; the generation module 33 is specifically used 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.
[0098] The receiving module 31, the processing module 32 and the generating module 33 are connected in sequence. The image generating device 3 provided in this embodiment can implement the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0099] Fig.11 A schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure is shown in FIG. Fig.11 As shown, the electronic device 7 includes:
[0100] A processor 41, and a memory 42 communicatively connected to the processor 41;
[0101] The memory 42 stores computer executable instructions;
[0102] The processor 41 executes the computer execution instructions stored in the memory 42 to implement the following Figure 2-Figure 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 related instructions, please refer to Figure 2-Figure 9 The relevant descriptions and effects corresponding to the steps in the corresponding embodiments can be understood, and no further elaboration is made here.
[0105] The present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are used to implement the present invention when executed by a processor. Figure 2-Figure 9 The image generation method provided by any one of the corresponding embodiments.
[0106] The present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements Figure 2-Figure 9 The image generation method in the illustrated embodiment,
[0107] refer to Fig.12 , which shows a schematic diagram of the structure of an electronic device 900 suitable for implementing the embodiment of the present disclosure, and the electronic device 900 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Fig.12 The electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0108] like Fig.12 As shown, the electronic device 900 may include a processing device (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 to a random access memory (RAM) 903. In the RAM 903, various programs and data required for the operation of the electronic device 900 are also stored. The processing device 901, the ROM 902, and the RAM 903 are connected to each other via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0109] Typically, the following devices may be connected to the I / O interface 905: input devices 906 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 907 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 908 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 909. The communication device 909 may allow the electronic device 900 to communicate with other devices wirelessly or by wire to exchange data. Although Fig.12 The electronic device 900 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0110] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by the processing device 901, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0111] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0112] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0113] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.
[0114] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may 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 may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0115] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0116] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware. The name of a unit does not limit the unit itself in some cases. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses".
[0117] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0118] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0119] In a first aspect, according to one or more embodiments of the present disclosure, there is provided an image generation method, comprising:
[0120] A first editing instruction for video data is received, wherein the first editing instruction 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 an engine module for controlling the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to characterize a processing flow for generating a video image 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 called separately to generate a video image of the video data.
[0121] According to one or more embodiments of the present disclosure, the video image of the video data overlaps and displays at least two media materials at a target moment, and the first editing instruction is used to set a display level of the media material; the target engine module is a track synthesis module, and the track synthesis module is used to overlap and merge at least two of the media materials based on the display level of the media material to generate a video image of the video data.
[0122] According to one or more embodiments of the present disclosure, the first editing instruction includes a target parameter, and the target parameter 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 orderly arranged first functional units and one second functional unit, wherein the first functional unit is used to obtain the 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 target engine module is configured based on the first editing instruction to obtain the configured target engine module, including: configuring the sequence value corresponding to each of the first functional units based on the target parameter to obtain the configured track synthesis module.
[0123] According to one or more embodiments of the present disclosure, after receiving the first editing instruction, it also includes: generating a corresponding request token, the request token is used to represent an image generation task for the image generation link, and the request token is released after the image generation task is completed; obtaining the real-time number of currently existing request tokens; configuring the target engine module based on the first editing instruction to obtain the configured target engine module, including: if the real-time number is less than the 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 the present disclosure, the method further includes: obtaining a link length of the image generation link, the link length representing the number of processing steps of 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 the present disclosure, 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 a 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 the present 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; generating an image generation link according to the second editing instruction, wherein the image generation link is implemented based on a text graphics description language.
[0127] According to one or more embodiments of the present disclosure, the method further includes: receiving a third editing instruction, wherein the third editing instruction includes 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 parameters.
[0128] According to one or more embodiments of the present disclosure, it also includes: obtaining mode configuration information, wherein 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 instruction, wherein the response mode includes a data push mode or a data pull mode; and the separately 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] In a second aspect, according to one or more embodiments of the present disclosure, there is provided an image generating device, comprising:
[0130] The receiving module is used to receive a first editing instruction for video data, where the first editing instruction is used to set the editing content of the video data.
[0131] A processing module is used to configure a target engine module based on the first editing instruction to obtain a configured target engine module, wherein the target engine module is an engine module for controlling the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to represent a processing flow for generating a video image of the video data, and the engine module is used to implement at least one processing step in the processing flow.
[0132] A generation module is used to separately call the configured target engine module to generate a video image of the video data.
[0133] According to one or more embodiments of the present disclosure, the video image of the video data overlaps and displays at least two media materials at a target moment, and the first editing instruction is used to set a display level of the media material; the target engine module is a track synthesis module, and the track synthesis module is used to overlap and merge at least two of the media materials based on the display level of the media material to generate a video image of the video data.
[0134] According to one or more embodiments of the present disclosure, the first editing instruction includes a target parameter, and the target parameter 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 orderly arranged first functional units and one second functional unit, wherein the first functional unit is used to obtain the 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, and generate a video image of the video data; the processing module is specifically used to: based on the target parameter, configure the sequence value corresponding to each of the first functional units to obtain the configured track synthesis module.
[0135] According to one or more embodiments of the present disclosure, after receiving the first editing instruction, the processing module is further used to: generate a corresponding request token, the request token is used to represent an image generation task for the image generation link, and the request token is released after the image generation task is completed; obtain the real-time number of currently existing request tokens; the processing module 32 is specifically used 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.
[0136] According to one or more embodiments of the present disclosure, the processing module is further used to: obtain the link length of the image generation link, the link length representing the number of processing steps of 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 the present disclosure, 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 a video editing track; and the image processing module is used to perform image processing on the media materials.
[0138] In one embodiment of the present disclosure, the receiving module is further used to: receive a second editing instruction, the second editing instruction includes at least two ordered step identifiers, and the step identifier is used to characterize an engine module; according to the second editing instruction, generate an image generation link, wherein the image generation link is implemented based on a text graphics description language.
[0139] According to one or more embodiments of the present disclosure, the receiving module is further used to: receive a third editing instruction, wherein the third editing instruction includes at least one custom parameter; and register the 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.
[0140] According to one or more embodiments of the present disclosure, the generation module is further used to: obtain mode configuration information, wherein the mode configuration information is used to indicate a 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 used 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] In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0142] The memory stores computer-executable instructions;
[0143] The processor executes the computer-executable instructions stored in the memory to implement the image generating method as described in the first aspect and various possible designs of the first aspect.
[0144] In a fourth aspect, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer execution instructions. When a processor executes the computer execution instructions, the image generation method described in the first aspect and various possible designs of the first aspect is implemented.
[0145] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the image generation method described in the first aspect and various possible designs of the first aspect.
[0146] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0147] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0148] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. An image generation method, characterized in that: include: receiving a first editing instruction for video data, wherein the first editing instruction is used to set 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 an engine module for controlling the editing content among at least two engine modules corresponding to an image generation link, the image generation link is used to represent a processing flow for generating a video image 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 called separately to generate a video image of the video data.
2. The method according to claim 1, characterized in that The video image of the video data overlaps and displays at least two media materials at a target time, and the first editing instruction is used to set a display level of the media materials; The target engine module is a track synthesis module, which is used to overlap and merge at least two of the 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, and the target parameter is used to represent a mapping relationship between a sequence value of at least one video editing track and a display level. The track synthesis module includes at least two ordered first functional units and one second functional unit, wherein the first functional unit is used to obtain a media material on a 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 sequentially merge corresponding media materials based on the unit sequence 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: Based on the target parameters, the sequence values corresponding to the first functional units are configured to obtain a configured track synthesis module.
4. The method according to claim 1, characterized in that: After receiving the first editing instruction, the method further includes: Generate a corresponding request token, where the request token is used to represent an image generation task for the image generation link, and the request token is released after the image generation task is completed; Get the real-time number of 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 the preset target number, a target engine module is configured based on the first editing instruction to obtain a configured target engine module.
5. The method according to claim 4, characterized in that The method further comprises: Acquire a link length of the image generation link, where the link length represents the number of processing steps of the processing flow corresponding to the image generation link; The target quantity is obtained according to the link length.
6. The method according to claim 2, characterized in that The at least two engine modules corresponding to the image generation link also 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.
7. The method according to claim 1, characterized in that The method further comprises: receiving a second editing instruction, wherein the second editing instruction includes at least two ordered step identifiers, and the step identifiers are used to represent an engine module; According to the second editing instruction, an image generation link is generated, wherein the image generation link is implemented based on a text graphic description language.
8. The method according to claim 1, characterized in that The method further comprises: receiving 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: Acquire mode configuration information, where the mode configuration information is used to indicate a 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 separately calling the configured target engine module to generate a video image of the video data includes: Based on the mode configuration information, each engine module corresponding to the image generation link is called in sequence to generate a video image of the video data.
10. An image generating device, characterized in that: include: A receiving module, used for receiving a first editing instruction for video data, wherein the first editing instruction is used for setting editing content of the video data; a processing module, configured to configure a target engine module based on the first editing instruction to obtain a configured target engine module, wherein the target engine module is an engine module for controlling the editing content among at least two engine modules corresponding to the image generation link, the image generation link is used to represent a processing flow for generating a video image of the video data, and the engine module is used to implement at least one processing step in the processing flow; A generation module is used to separately call the configured target engine module to generate a video image 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-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the image generation method according to 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, and when the processor executes the computer-executable instructions, the image generation method according to any one of claims 1 to 9 is implemented.
13. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the image generating method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Engine system and rendering method thereof
CN111158866A
Efficient editable video special effect output method and device and electronic equipment
CN112911388A
Video generation method and device, equipment and storage medium
CN113518160A
Video coding method in game engine and related equipment
CN113794887A
Video clip synthesis method and electronic equipment
CN113891113A