Special effect generation method and device, electronic equipment and storage medium
By automatically generating special effects text and materials that match the theme of the special effects using a natural language processing model, and then automatically splicing them together, the problem of low generation efficiency caused by manual reliance in existing technologies is solved, and efficient special effects generation is achieved.
Patent Information
- Application Number
- CN202510928353.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-04
- Publication Date
- 2025-11-14
AI Technical Summary
Existing technologies rely heavily on manpower, time, and effort in the special effects generation process, resulting in low efficiency and difficulty in producing special effects on a large scale quickly.
By acquiring the special effects theme, initial special effects text, and prompt words, a natural language processing model is used to generate target special effects text that matches the special effects theme. Based on these texts, multiple types of special effects materials are automatically generated, and finally, multiple special effects are obtained by splicing them together. The entire process requires no manual intervention.
It enables the rapid generation of a large number of special effects without manual processing, saving time and costs and improving the efficiency of special effects generation.
Smart Images

Figure CN120953436A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, electronic device, and storage medium for generating special effects. Background Technology
[0002] With the development of computer technology, shooting or video applications often offer users a variety of special effects for selection and application. Currently, in the process of creating these effects, technicians typically create or select some effect materials, and then arrange and assemble these materials to ultimately obtain the effect. However, this method relies on a large amount of manpower, consumes a lot of time and energy, and is difficult to produce effects quickly and on a large scale, resulting in very low efficiency in effect generation. Summary of the Invention
[0003] This disclosure provides a method, apparatus, electronic device, and storage medium for generating special effects. This solution can quickly generate a large number of special effects, improving the efficiency of special effects generation. The technical solution of this disclosure is as follows:
[0004] According to one aspect of the embodiments of this disclosure, a method for generating special effects is provided, the method comprising:
[0005] Obtain the special effects theme, initial special effects text, and prompt words, wherein the initial special effects text matches the special effects theme, and the prompt words indicate the constraints when the natural language processing model generates text;
[0006] The special effects theme, the initial special effects text, and the prompt words are input into the natural language processing model to generate text, resulting in multiple target special effects texts that match the special effects theme.
[0007] Based on the special effects theme and the multiple target special effects texts, generate multiple types of special effects materials that match the special effects theme;
[0008] Multiple target effect texts and multiple types of effect materials are spliced together to obtain multiple effects, each of which includes at least one target effect text and at least one effect material.
[0009] In some embodiments, the various special effects materials include special effects background images;
[0010] The process of generating multiple types of special effects materials that match the special effects theme based on the special effects theme and the multiple target special effects texts includes:
[0011] The special effects theme and the multiple target special effects texts are input into the text-based image model to generate an image, thereby obtaining a special effects background image that matches the special effects theme.
[0012] In some embodiments, the various special effects materials include special effects background images;
[0013] The process of splicing together the multiple target special effects texts and the multiple types of special effects materials yields multiple special effects, including:
[0014] For any special effects background image among the multiple types of special effects materials, determine the special effects material that matches the special effects background image from each type of special effects material, and determine the target special effects text that matches the special effects background image;
[0015] The special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image are spliced together to obtain a first special effect. The first special effect includes the special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image.
[0016] In some embodiments, determining the special effects material that matches the special effects background image from each type of special effects material includes:
[0017] Based on the proportion of each color in the special effects background image, the theme color of the special effects background image is determined, and the proportion of the theme color is greater than the proportion of other colors among the colors.
[0018] From each type of special effects material, identify the special effects material that matches the theme color to obtain the special effects material that matches the special effects background image.
[0019] In some embodiments, the process of splicing together the multiple target effect texts and the multiple types of effect materials to obtain multiple effects includes:
[0020] For any target special effects text, based on the keywords in the target special effects text, special effects materials that match the keywords are determined from each type of special effects materials;
[0021] The target special effects text and the special effects material matching the keyword are spliced together to obtain a second special effects, the second special effects including the target special effects text and the special effects material matching the keyword.
[0022] In some embodiments, the process of splicing together the multiple target effect texts and the multiple types of effect materials to obtain multiple effects includes:
[0023] Obtain a material mapping table from the storage device. The material mapping table is used to record the mapping relationship between the multiple target special effects texts and various special effects materials.
[0024] For any unprocessed mapping relationship in the material mapping table, retrieve the target special effects text and each type of special effects material indicated by the mapping relationship from the storage device;
[0025] The target effect text indicated by the mapping relationship and each type of effect material are concatenated to obtain the effect indicated by the mapping relationship. The effect indicated by the mapping relationship includes the target effect text indicated by the mapping relationship and each type of effect material.
[0026] In some embodiments, the method further includes:
[0027] Based on the multiple target special effects texts and the multiple types of special effects materials, a material mapping table is determined. The material mapping table is used to record the mapping relationship between the multiple target special effects texts and various types of special effects materials.
[0028] The multiple target special effects texts, the multiple types of special effects materials, and the material mapping table are stored in a storage device.
[0029] In some embodiments, the process of splicing together the multiple target effect texts and the multiple types of effect materials to obtain multiple effects includes:
[0030] Determine multiple layers for special effects, and assign each layer at least one of the multiple target special effect texts and the multiple types of special effect materials;
[0031] Each layer is stitched together to obtain the layer effect for each layer. The layer effect of any layer includes the target effect text and effect material corresponding to that layer.
[0032] The special effect is obtained by combining the layer effects of the multiple layers.
[0033] According to another aspect of the present disclosure, a special effects generation apparatus is provided, the apparatus comprising:
[0034] The acquisition unit is configured to acquire the special effects theme, the initial special effects text, and the prompt words, wherein the initial special effects text matches the special effects theme, and the prompt words indicate the constraints when the natural language processing model generates text.
[0035] The text generation unit is configured to input the special effects theme, the initial special effects text, and the prompt words into the natural language processing model to generate text, thereby obtaining multiple target special effects texts that match the special effects theme.
[0036] The material generation unit is configured to generate multiple types of special effects materials that match the special effects theme, based on the special effects theme and the multiple target special effects texts.
[0037] The splicing unit is configured to splice the multiple target effect texts and the multiple types of effect materials to obtain multiple effects, each effect including at least one target effect text and at least one effect material.
[0038] In some embodiments, the various special effects materials include special effects background images;
[0039] The material generation unit is configured to input the special effects theme and the multiple target special effects texts into the text-to-image model to generate an image, thereby obtaining a special effects background image that matches the special effects theme.
[0040] In some embodiments, the various special effects materials include special effects background images;
[0041] The splicing unit includes:
[0042] The determination subunit is configured to perform the following actions for any special effects background image among the multiple types of special effects materials: determine the special effects material that matches the special effects background image from each type of special effects material, and determine the target special effects text that matches the special effects background image.
[0043] The splicing subunit is configured to splice the special effects background image, special effects material matching the special effects background image, and target special effects text matching the special effects background image to obtain a first special effect, wherein the first special effect includes the special effects background image, special effects material matching the special effects background image, and target special effects text matching the special effects background image.
[0044] In some embodiments, the determining subunit is configured to perform the following: determining the theme color of the special effects background image based on the proportion of each color in the special effects background image, wherein the proportion of the theme color is greater than the proportion of other colors among the colors; determining special effects materials that match the theme color from each type of special effects material, thereby obtaining special effects materials that match the special effects background image.
[0045] In some embodiments, the splicing unit is further configured to perform the following actions for any target effect text: determining, based on keywords in the target effect text, special effect materials matching the keywords from each type of special effect material; splicing the target effect text and the special effect materials matching the keywords to obtain a second effect, the second effect including the target effect text and the special effect materials matching the keywords.
[0046] In some embodiments, the splicing unit is further configured to perform the following: retrieve a material mapping table from a storage device, the material mapping table being used to record the mapping relationships between the multiple target effect texts and various types of effect materials; for any unprocessed mapping relationship in the material mapping table, retrieve the target effect text indicated by the mapping relationship and each type of effect material from the storage device; splice the target effect text indicated by the mapping relationship and each type of effect material to obtain the effect indicated by the mapping relationship, the effect indicated by the mapping relationship including the target effect text indicated by the mapping relationship and each type of effect material.
[0047] In some embodiments, the apparatus further includes:
[0048] The determining unit is configured to perform an action based on the multiple target special effects texts and the multiple types of special effects materials to determine a material mapping table, wherein the material mapping table is used to record the mapping relationship between the multiple target special effects texts and the various types of special effects materials;
[0049] The storage unit is configured to store the multiple target special effects texts, the multiple types of special effects materials, and the material mapping table into a storage device.
[0050] In some embodiments, the splicing unit is further configured to perform multiple layers for a defined effect, assigning each layer at least one of the multiple target effect texts and the multiple types of effect materials; splicing each layer separately to obtain a layer effect for each layer, wherein the layer effect of any layer includes the target effect text and effect material corresponding to the layer; and splicing the layer effects of the multiple layers to obtain the effect.
[0051] According to another aspect of the embodiments of this disclosure, an electronic device is provided, the electronic device comprising:
[0052] One or more processors;
[0053] Memory used to store the executable program code of the processor;
[0054] The processor is configured to execute the program code to implement the aforementioned special effects generation method.
[0055] According to another aspect of the present disclosure, a computer-readable storage medium is provided that, when the instructions in the computer-readable storage medium are executed by a processor of an electronic device, enables the electronic device to perform the above-described special effects generation method.
[0056] According to another aspect of the present disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described special effects generation method.
[0057] This disclosure provides a method for generating special effects. Based on information such as a special effects theme and initial special effects text, it can automatically generate target special effects text and various special effects materials that match the theme, and automatically splice these texts and materials to obtain multiple special effects. This process does not rely on manual production and assembly of special effects materials, and can efficiently generate a large number of special effects without manual processing, saving time and costs and improving the efficiency of special effects generation.
[0058] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0059] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0060] Figure 1 This is a schematic diagram illustrating the implementation environment of a special effects generation method according to an exemplary embodiment.
[0061] Figure 2 This is a flowchart illustrating a special effects generation method according to an exemplary embodiment.
[0062] Figure 3 This is a flowchart illustrating another method for generating special effects according to an exemplary embodiment.
[0063] Figure 4 This is a schematic diagram illustrating a special effects generation process according to an exemplary embodiment.
[0064] Figure 5 This is a schematic diagram illustrating a special effects layer according to an exemplary embodiment.
[0065] Figure 6 This is a schematic diagram illustrating another special effects generation process according to an exemplary embodiment.
[0066] Figure 7 This is a block diagram illustrating a special effects generation apparatus according to an exemplary embodiment.
[0067] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation
[0068] To enable those skilled in the art to better understand the technical solutions of this disclosure, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings.
[0069] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0070] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this disclosure are authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the special effects themes, initial special effects text, and prompts involved in this disclosure were all obtained with full authorization.
[0071] Figure 1 This is a schematic diagram illustrating the implementation environment of a special effects generation method according to an exemplary embodiment. See also Figure 1 The implementation environment specifically includes: terminal 101 and server 102. Terminal 101 can be connected to server 102 via wireless network or wired network.
[0072] In some embodiments, terminal 101 can be at least one of devices such as a smartphone, smartwatch, desktop computer, laptop, and tablet computer. An application with data processing capabilities can be installed and run on terminal 101. Users can log in to the application through terminal 101 to access the services provided by the application. The application is associated with server 102, which provides background services to terminal 101. Terminal 101 can refer to one of multiple terminals; the following exemplary embodiments use terminal 101 as an example. Those skilled in the art will understand that the number of terminals can be more or less. For example, there may be several terminals, or dozens or hundreds of terminals, or even more. This disclosure does not limit the number or type of terminals.
[0073] In some embodiments, server 102 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. That is, server 102 can be at least one of a single server, multiple servers, a cloud computing platform, and a virtualization center. Optionally, the number of servers can be more or fewer, and this disclosure does not limit this. Of course, server 102 may also include other functional servers to provide more comprehensive and diversified services.
[0074] In some embodiments, server 102 undertakes the primary computing task, and terminal 101 undertakes the secondary computing task; or, server 102 undertakes the secondary computing task, and terminal 101 undertakes the primary computing task; or, server 102 and terminal 101 collaborate on computing using a distributed computing architecture. Server 102 can be connected to terminal 101 and other terminals via a wireless network or a wired network. Optionally, the number of servers can be more or less, and this disclosure does not limit this.
[0075] Figure 2 This is a flowchart illustrating a special effects generation method according to an exemplary embodiment, such as... Figure 2 As shown, the method is performed by an electronic device and includes the following steps:
[0076] In step S201, the electronic device acquires the special effects theme, the initial special effects text, and the prompt words. The initial special effects text matches the special effects theme, and the prompt words indicate the constraints when the natural language processing model generates the text.
[0077] In this embodiment, the special effects theme takes the form of a keyword, which defines the content of the special effects. For example, the special effects theme may indicate a festival theme, a seasonal theme, or one of the twenty-four solar terms, such as "Mid-Autumn Festival," "Spring Outing," or "Qingming Festival." The initial special effects text is a preset text content that matches the special effects theme, i.e., text content that conforms to the theme's intent, and is used for subsequent text expansion. For example, if the special effects theme is "birthday," the initial special effects text could be "Happy Birthday." Optionally, the initial special effects text can be manually input or generated by a model; this embodiment does not limit the method of generating the initial special effects text. The number of initial special effects texts can be one or multiple; this embodiment does not limit the number of initial special effects texts input to the natural language processing model. Prompt words are used to guide the natural language processing model to generate text according to constraints. Prompt words can define the content, format, style, or emotional tone of the text, which will not be elaborated further here. Natural Language Processing (NLP) models refer to artificial intelligence (AI) models with text understanding and generation capabilities. Examples of NLP models include Generative Pre-trained Transformers (GPT), Large Language Models (LLM), and Bidirectional Encoder Representations from Transformers (BERT). This disclosure does not limit the specific NLP model used. By acquiring information such as the special effects theme, initial special effects text, and prompts, a basis is provided for the subsequent generation of special effects text and materials.
[0078] In step S202, the electronic device inputs the special effects theme, initial special effects text, and prompt words into the natural language processing model to generate text, thereby obtaining multiple target special effects texts that match the special effects theme.
[0079] In this embodiment, the natural language processing model expands the initial input special effects text. The expanded target special effects text matches the special effects theme. This expansion process is guided by prompts, ensuring the expanded target special effects text meets the prompts' requirements. The number of target special effects texts is greater than the number of initial special effects texts, thus achieving text expansion. For example, if the special effects theme is "birthday," the initial special effects text is "Happy Birthday," and the prompt is "Generate 5 humorous birthday wishes containing specific blessing scenarios, each no more than 30 characters," then the target special effects text could be "Wishing you many happy returns of the day, and may you receive red envelopes every year."
[0080] In step S203, the electronic device generates multiple types of special effects materials that match the special effects theme based on the special effects theme and multiple target special effects texts.
[0081] In this embodiment of the disclosure, special effects materials refer to various visual or auditory materials that match the theme of the special effects. These materials encompass images, animations, sound effects, and text within the special effects. For example, special effects materials matching the theme of "birthday" include various types of special effects materials such as balloon images, candle animations, cheerful music, and birthday makeup.
[0082] The process of generating various special effects materials based on a special effects theme and multiple target special effects texts can be implemented by different large models or by different functional modules within a multimodal generation model; this disclosure does not impose any limitations on this. For example, the special effects theme and target special effects text can be input into a text-to-image model to obtain a special effects background image; or, the special effects theme and target special effects text can be input into a speech synthesis model to generate emotionally charged special effects audio; or, based on the special effects theme and target special effects text, an animation generation model can automatically generate dynamic elements that conform to the description. Another example is that the special effects theme and target special effects text can be input into a multimodal generation model, which simultaneously outputs adapted special effects background images, special effects music, and dynamic elements.
[0083] In step S204, the electronic device splices multiple target effect texts and multiple types of effect materials to obtain multiple effects, each of which includes at least one target effect text and at least one effect material.
[0084] In this embodiment of the disclosure, splicing refers to the operation of combining each type of special effects material with the target special effects text. Splicing is performed according to preset rules, such as rules for color matching or rules for corresponding keywords. The corresponding target special effects text and special effects materials are selected according to these rules, thereby obtaining the special effects after splicing.
[0085] This disclosure provides a method for generating special effects. Based on information such as a special effects theme and initial special effects text, it can automatically generate target special effects text and various special effects materials that match the theme, and automatically splice these texts and materials to obtain multiple special effects. This process does not rely on manual production and assembly of special effects materials, and can efficiently generate a large number of special effects without manual processing, saving time and costs and improving the efficiency of special effects generation.
[0086] In some embodiments, various special effects materials include special effects background images;
[0087] Based on the special effects theme and multiple target special effects texts, generate various types of special effects materials that match the special effects theme, including:
[0088] The special effects theme and multiple target special effects texts are input into the text-based image model to generate an image, resulting in a special effects background image that matches the special effects theme.
[0089] In this embodiment of the disclosure, the text descriptions such as the special effects theme and the target special effects text are transformed into visual materials such as special effects background images through the text-based image model. Without the need for manual processing, the special effects background images are automatically generated, which improves the efficiency of special effects generation. Furthermore, the automatically generated special effects background images are consistent with the special effects theme and the target special effects text, ensuring the quality of the special effects background images.
[0090] In some embodiments, various special effects materials include special effects background images;
[0091] Multiple target effect texts and various effect materials are spliced together to obtain multiple effects, including:
[0092] For any special effects background image among multiple special effects materials, determine the special effects material that matches the special effects background image from each type of special effects material, and determine the target special effects text that matches the special effects background image;
[0093] The special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image are spliced together to obtain the first special effect. The first special effect includes the special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image.
[0094] In this embodiment of the disclosure, the visual features of the special effects background image are matched in each type of special effects material, which ensures the coordination and consistency between the special effects background image and other special effects materials and target special effects text, improves the quality of special effects generation, and this process does not require manual matching. It can automatically retrieve suitable resources from multiple target special effects texts and multiple types of special effects materials, saving time and costs and improving the efficiency of special effects generation.
[0095] In some embodiments, determining special effects materials that match the special effects background image from each type of special effects materials includes:
[0096] Based on the proportion of each color in the special effects background image, determine the theme color of the special effects background image, and the proportion of the theme color is greater than the proportion of other colors.
[0097] From each type of special effects material, identify the special effects material that matches the theme color, and obtain the special effects material that matches the special effects background image.
[0098] In this embodiment of the disclosure, by analyzing the proportion of each color in the special effects background image, the main color tone of the special effects background image, i.e. the theme color, is determined, and then the special effects materials with color coordination can be determined, ensuring the visual coordination between the special effects materials and special effects text in the special effects, and improving the quality of the generated special effects.
[0099] In some embodiments, multiple target effect texts and multiple types of effect materials are spliced together to obtain multiple effects, including:
[0100] For any target special effects text, based on the keywords in the target special effects text, determine the special effects materials that match the keywords from each type of special effects material;
[0101] The target effect text and the effect material matching the keyword are spliced together to obtain the second effect, which includes the target effect text and the effect material matching the keyword.
[0102] In this embodiment of the disclosure, by extracting the special effects materials corresponding to the keywords in the target special effects text, the coordination and consistency between the text and the image are ensured. Furthermore, the corresponding special effects materials are automatically matched based on the keywords, without relying on manual selection and matching, which saves labor costs and time and improves the efficiency of special effects generation.
[0103] In some embodiments, multiple target effect texts and multiple types of effect materials are spliced together to obtain multiple effects, including:
[0104] Retrieve the material mapping table from the storage device. The material mapping table is used to record the mapping relationship between multiple target special effects texts and various special effects materials.
[0105] For any unprocessed mapping relationship in the material mapping table, retrieve the target effect text indicating the mapping relationship and the material for each type of effect from the storage device;
[0106] The target effect text and each type of effect material are spliced together to obtain the effect indicating the mapping relationship. The effect indicating the mapping relationship includes the target effect text and each type of effect material.
[0107] In this embodiment of the disclosure, the mapping relationship indicates the matching relationship. By looking up a table, the mapping relationship between each type of special effect material and between each type of special effect material and the target special effect text can be quickly determined. This enables the rapid identification of mutually matching target special effect text and each special effect material, thereby quickly assembling the special effects and achieving efficient batch generation of special effects. This improves the generation efficiency of special effects. Furthermore, this process does not rely on manual selection for assembly, saving labor costs and time, and further improving the generation efficiency of special effects.
[0108] In some embodiments, the method further includes:
[0109] Based on multiple target special effects texts and multiple types of special effects materials, a material mapping table is determined. The material mapping table is used to record the mapping relationship between multiple target special effects texts and various types of special effects materials.
[0110] Store multiple target special effects texts, various special effects materials, and material mapping tables to the storage device.
[0111] In this embodiment of the disclosure, a material mapping table is determined and stored based on the mapping relationship between multiple target special effect texts and multiple types of special effect texts. This enables each electronic device connected to the storage device to obtain the material mapping table, and then special effects are generated based on the material mapping table, that is, the target special effect texts and various special effect materials are spliced together. This facilitates the generation of special effects through a distributed system, expands the scope of special effect generation, and improves the efficiency of special effect generation.
[0112] In some embodiments, multiple target effect texts and multiple types of effect materials are spliced together to obtain multiple effects, including:
[0113] Define multiple layers for the special effects, and assign each layer multiple target special effects texts and at least one of multiple types of special effects materials;
[0114] Each layer is stitched together to obtain the layer effect for each layer. The layer effect of any layer includes the target effect text and effect material corresponding to the layer.
[0115] The special effect is created by combining the layer effects of multiple layers.
[0116] In this embodiment of the disclosure, special effects materials are spliced separately for each layer, so that the assembly within different layers is carried out independently, which improves the generation efficiency of layer special effects and thus improves the generation efficiency of special effects.
[0117] The above Figure 2 The diagram shown is a flowchart of a special effects generation method disclosed herein. The special effects generation scheme provided herein will be further elaborated below. Figure 3This is a flowchart illustrating another method for generating special effects according to an exemplary embodiment; see also... Figure 3 This method is performed by an electronic device and includes the following steps:
[0118] In step S301, the electronic device acquires the special effects theme, the initial special effects text, and the prompt words. The initial special effects text matches the special effects theme, and the prompt words indicate the constraints when the natural language processing model generates the text.
[0119] In this embodiment of the disclosure, the principle by which the electronic device acquires the special effects theme, the initial special effects text, and the prompt words is the same as in step S201, and will not be repeated here.
[0120] In step S302, the electronic device inputs the special effects theme, initial special effects text, and prompt words into the natural language processing model to generate text, thereby obtaining multiple target special effects texts that match the special effects theme.
[0121] In this embodiment of the disclosure, the principle by which the electronic device obtains multiple target special effects texts that match the special effects theme is the same as step S202, and will not be repeated here.
[0122] In some embodiments, a multi-round iterative approach is used to generate the target special effects text. Accordingly, for the i-th iteration, the electronic device inputs the intermediate special effects text and the special effects topic from the (i-1)-th iteration into a natural language processing model for processing, obtaining the intermediate special effects text for the i-th iteration, where i is a positive integer not less than 1. If the iteration termination condition is met, the special effects text output by the natural language processing model in the current round is determined as multiple target special effects texts. The iteration termination condition is either that the number of iterations reaches a preset threshold, or that the total number of special effects texts output by the natural language model in the current round reaches a preset threshold. For example, after the first iteration using the natural language processing model, 10 intermediate special effects texts are obtained from 1 initial special effects text; after the second iteration using the natural language processing model, each of the 10 intermediate special effects texts is used to obtain 10 special effects texts, meaning the total number of special effects texts output by the natural language model in the current round is 100. These 100 special effects texts are then determined as the target special effects texts. This method solves the problem of limited computing power preventing the acquisition of large amounts of special effects text at once, ensuring the orderly expansion of special effects text and providing a data foundation for the subsequent generation of special effects materials.
[0123] In some embodiments, prompt words are automatically extracted from the intermediate special effects text. Accordingly, during any iteration, the electronic device extracts prompt words from the special effects text output by the natural language model to indicate the constraints for text generation in the next iteration of the natural language processing model. This method ensures the orderly progress of the text augmentation process and guarantees the quality of the augmented text.
[0124] For ease of description, see Figure 4 As shown, Figure 4 This is a schematic diagram illustrating a special effects generation process according to an exemplary embodiment. In the text expansion process, multiple initial special effects texts are provided for a specific special effects theme. These initial special effects texts and the special effects theme are input into a natural language processing model for processing, resulting in multiple expanded target special effects texts. After obtaining the special effects text in each iteration, prompt words are extracted from the special effects text output by the natural language processing model to continue subsequent iterations.
[0125] In step S303, the electronic device generates multiple types of special effects materials that match the special effects theme based on the special effects theme and multiple target special effects texts.
[0126] In this embodiment of the disclosure, the principle of the electronic device generating multiple types of special effects materials that match the special effects theme is the same as step S202, and will not be repeated here.
[0127] In some embodiments, the various special effects materials include special effects background images. Accordingly, the electronic device generates various special effects materials matching the special effects theme based on the special effects theme and multiple target special effects texts. This includes: the electronic device inputting the special effects theme and multiple target special effects texts into a text-based image generation model to generate an image, obtaining a special effects background image matching the special effects theme. By using a text-based image generation model to transform text descriptions such as the special effects theme and target special effects texts into visual materials such as special effects background images, the automatic generation of special effects background images is achieved without manual processing, improving the efficiency of special effects generation. Furthermore, the automatically generated special effects background images maintain consistency with the special effects theme and target special effects texts, ensuring the quality of the special effects background images.
[0128] In some embodiments, the various special effects materials also include icons, such as button icons, entry icons, or material icons. The generation method for icons is the same as that for the special effects background images described above, and will not be repeated here. Optionally, the various special effects materials also include text formats, dynamic elements, music materials, text styles, text animations, character enhancements, makeup effects, splicing templates, and layout templates. Among these, character enhancements are used to adjust the human body, makeup effects are used to add makeup to a portrait, splicing templates indicate the splicing method between special effects materials, and layout templates indicate the spatial relationship of the special effects materials.
[0129] For ease of description, see Figure 4 As shown. After text expansion, based on the obtained target effect text, the effect background image and icon are obtained through a text graph model, that is, these types of effect materials are generated. In addition, the above-mentioned various types of effect materials were also obtained, which will not be described in detail here.
[0130] After obtaining the target special effects text and multiple types of special effects materials, they are spliced together according to preset material matching rules to obtain a large number of special effects. Optionally, the splicing between special effects materials and between special effects materials and special effects text can be achieved by using the methods corresponding to steps S304 and S305 below or by using the methods corresponding to steps S306 and S307 below.
[0131] In step S304, for any special effects background image among multiple special effects materials, the electronic device determines the special effects material that matches the special effects background image from each type of special effects material, and determines the target special effects text that matches the special effects background image.
[0132] In this embodiment of the disclosure, special effects materials matching the special effects background image are determined from each type of special effects material based on the visual characteristics of the special effects background image. The visual characteristics can be at least one of color, element, or style. Accordingly, special effects materials matching the special effects background image refer to special effects materials whose colors are coordinated with the special effects background image. For example, if the special effects theme is "Qingming Festival" and the special effects background image is green, then yellow-toned special effects materials are preferred as matching special effects materials, rather than red-toned special effects materials. Alternatively, special effects materials matching the special effects background image refer to special effects materials corresponding to elements in the special effects background image. For example, if the special effects theme is "Qingming Festival" and the special effects background image contains willow trees, then special effects materials such as willow branch-shaped borders and willow leaf fluttering animations are preferred, rather than irrelevant rockets, cars, etc. Alternatively, special effects materials that match the background image refer to special effects materials that coordinate with the style of the background image. For example, if the theme of the special effects is "Qingming Festival" and the background image adopts the style of ink wash painting, then it is preferable to choose text effects or icons with the same ink wash brushstrokes, and avoid using special effects materials with a technological feel.
[0133] In some embodiments, the electronic device determines special effects materials that match the special effects background image from each category of special effects materials based on a theme color. Accordingly, the electronic device determines the theme color of the special effects background image based on the proportion of each color in the special effects background image, where the proportion of the theme color is greater than the proportion of other colors. Special effects materials matching the theme color are then determined from each category of special effects materials to obtain special effects materials that match the special effects background image. The theme color is the single color or color group with the highest proportion in the special effects background image. For example, the theme color of a special effects background image with the theme "Qingming" is green, and the proportion of other colors in the special effects background image is lower than the proportion of green; or, the theme color of a special effects background image with the theme "Qingming" is a color group composed of green and yellow, and the proportion of other colors in the special effects background image is lower than the total proportion of green and yellow. Each theme color corresponds to its own special effects materials, and different theme colors correspond to different special effects materials. For example, the special effects materials matched with yellow or red are different for these two single theme colors; or, the special effects materials matched with blue and green and blue and pink are different for these two color groups.
[0134] By analyzing the proportion of each color in the background image of the special effects, the main color tone of the background image of the special effects was determined. This enabled the identification of special effects materials with coordinated color tones, ensuring the visual harmony between various special effects materials and special effects text in the special effects, and improving the quality of the generated special effects.
[0135] For ease of description, see Figure 4 As shown. Based on preset material matching rules, the matching relationship between the special effects background image, other types of special effects materials, and the target special effects text is determined to guide the subsequent material splicing process.
[0136] In step S305, the electronic device splices together the special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image to obtain a first special effect. The first special effect includes the special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image.
[0137] In the embodiments of the present disclosure, after determining the matching relationship among the special effect background image, other types of special effect materials, and the target special effect text, the electronic device can splice them in real time on the current device. The above steps S304 and S305 are an exemplary way to splice multiple target special effect texts and multiple types of special effect materials to obtain multiple special effects. In this way, matching is performed in each type of special effect material based on the visual features of the special effect background image, ensuring the coordination and consistency among the special effect background image, other special effect materials, and the target special effect text, improving the quality of special effect generation. Moreover, in this process, there is no need for manual matching, and the appropriate resources can be automatically retrieved from multiple target special effect texts and multiple types of special effect materials, saving time and cost and improving the generation efficiency of special effects.
[0138] In step S306, for any target special effect text, based on the keywords in the target special effect text, the electronic device determines the special effect materials that match the keywords from each type of special effect material.
[0139] In the embodiments of the present disclosure, by extracting the keywords in the target special effect text and analyzing their semantics, the special effect materials that match the keywords are determined. Among them, keyword extraction can adopt natural language processing technologies, such as methods of词性标注 or named entity recognition. Correspondingly, the special effect materials that match the keywords refer to the special effect materials whose semantics coincide with the keywords. For example, for the keyword "rain" in the target special effect text "A drizzling rain falls during the Tomb-Sweeping Festival", it is preferable to select the animation and sound effects of raindrops falling. Or, the special effect materials that match the keywords refer to the special effect materials that can concretely express the keywords. For example, based on the keyword "qingtuan" in the target special effect text, it is preferable to select the icon in the shape of qingtuan. Or, the special effect materials that match the keywords refer to the special effect materials whose emotional tone conforms to the keywords. For example, based on the keywords "cherish the memory of the martyrs" and "mourning" in the target special effect text "Cherish the memory of the martyrs and express our mourning", it is preferable to select the special effect background image with a dark color system and avoid using bright and lively special effect materials.
[0140] In step S307, the electronic device splices the target special effect text and the special effect materials that match the keywords to obtain the second special effect, and the second special effect includes the target special effect text and the special effect materials that match the keywords.
[0141] In this embodiment, the electronic device can, after determining the matching relationship between the special effects background image, other types of special effects materials, and the target special effects text, splice them together in real time on the current device. Steps S306 and S307 described above are another exemplary method for splicing multiple target special effects texts and multiple types of special effects materials to obtain multiple special effects. In this method, by extracting the special effects materials corresponding to the keywords in the target special effects text, the coordination and consistency between the text and the image are ensured. Furthermore, the corresponding special effects materials are automatically matched based on the keywords, without relying on manual selection and matching, saving labor costs and time, and improving the efficiency of special effects generation.
[0142] The steps S304 to S307 above are illustrated by taking the example of the electronic device itself determining the matching relationship between multiple target special effects texts and multiple types of special effects materials and then splicing them together.
[0143] In some embodiments, the electronic device assembles and generates special effects based on a material mapping table obtained from a storage device. Accordingly, the electronic device obtains a material mapping table from the storage device, which records the mapping relationships between multiple target special effect texts and various types of special effect materials. For any unprocessed mapping relationship in the material mapping table, the target special effect text and each type of special effect material indicated by the mapping relationship are obtained from the storage device. The target special effect text and each type of special effect material indicated by the mapping relationship are concatenated to obtain the special effect indicated by the mapping relationship. The special effect indicated by the mapping relationship includes the target special effect text and each type of special effect material indicated by the mapping relationship. The mapping relationship indicates a matching relationship. By quickly determining the mapping relationships between each type of special effect material and between each type of special effect material and the target special effect text through table lookup, the matching target special effect texts and each special effect material can be quickly identified, thereby quickly assembling the special effects. This achieves efficient batch generation of special effects, improving the generation efficiency of special effects. Furthermore, this process does not rely on manual selection for assembly, saving labor costs and time, and further improving the generation efficiency of special effects.
[0144] In some embodiments, the electronic device determines and stores a material mapping table. Accordingly, the electronic device determines the material mapping table based on multiple target effect texts and multiple types of effect materials. The material mapping table records the mapping relationships between the multiple target effect texts and various effect materials. The multiple target effect texts, multiple types of effect materials, and the material mapping table are stored in a storage device. In this approach, by determining and storing the material mapping table based on the mapping relationships between multiple target effect texts and multiple types of effect texts, each electronic device connected to the storage device can access the material mapping table and then generate effects based on it, i.e., splicing the target effect texts and various effect materials. This facilitates the generation of effects through a distributed system, expands the scope of effect generation, and improves the efficiency of effect generation.
[0145] The storage devices described in the above embodiments are merely illustrative. Optionally, a cloud-based storage and retrieval material mapping table can be used. The cloud can also store target special effects text and all or part of the content from various special effects materials; this disclosure does not impose any limitations on this.
[0146] For ease of description, see Figure 4 As shown. The first device, upon obtaining the target special effects text, special effects background image, and other types of special effects materials, determines the matching relationship between the special effects background image, other types of special effects materials, and the target special effects text based on preset material matching rules. It then performs data splicing and serialization to obtain a special effects mapping table. Data splicing refers to recording the matching relationship between the special effects background image, other types of special effects materials, and the target special effects text. Serialization refers to converting the recorded data into a preset format, such as CSV format, to obtain a standard special effects mapping table for easy storage on a storage platform. The second device retrieves the special effects mapping table from the storage platform and deserializes it, such as generating JSON format line by line from a CSV file. It downloads and organizes the special effects materials (including special effects text) it depends on from the storage platform and assembles and splices them according to their type, such as assembling and splicing special effects materials of corresponding types based on layout strategies, text strategies, etc. This process is implemented by the main control module in the second device. The production module in the second device automatically stitches together the visual effects and exports and renders them. These processes can be achieved by the generation module calling various applications to obtain multiple special effects. After multiple special effects have been generated, the generation module in the second device sends the data of the multiple special effects to the upload module. After receiving the data of the multiple special effects, the upload module uploads them to the target platform for review and launch, making them available to users.
[0147] Optionally, the first device and the second device can be the same electronic device or different electronic devices; this disclosure does not impose any limitations on this. Optionally, the upload module transmits special effects data between the production module and the target platform in real time; alternatively, the upload module periodically or at fixed time intervals retrieves newly generated special effects data from the production module and uploads it to the target platform; or alternatively, the upload module temporarily stores the special effects data received from the production module and periodically or at fixed time intervals uploads it to the target platform; this disclosure does not impose any limitations on this.
[0148] In some embodiments, the special effect includes multiple layers, and each layer is processed separately. Accordingly, the electronic device determines multiple layers of the special effect, assigns each layer to at least one of multiple target special effect texts and multiple types of special effect materials; each layer is spliced separately to obtain a layer effect for each layer, where the layer effect of any layer includes the target special effect text and special effect material corresponding to the layer; the layer effects of multiple layers are spliced together to obtain the special effect. Each layer may correspond only to the target special effect text, only to special effect materials, or a combination of both; this disclosure does not impose any limitations. In this approach, splicing the special effect materials separately for each layer allows for independent assembly within different layers, improving the generation efficiency of layer effects and thus improving the overall special effect generation efficiency.
[0149] The aforementioned effects involving multiple layers are also known as background segmentation effects. For example, a background segmentation effect might include three layers: the first layer is above the second layer, and the second layer is above the third layer. The first layer, also called the foreground layer, includes foreground motion elements, title text, copy text, and foreground ambient elements; the title text and copy text are determined based on the effect text. The second layer, also called the portrait motion layer, includes a portrait and visual effects. The third layer, also called the background layer, includes the effect background image and motion effects. AIGC is used to automatically generate the effect materials (including effect text) for each layer, and then assembles these generated materials together. Because each layer contains various types of effect materials, a rich variety of effects can be achieved through various combinations, greatly improving the efficiency of generating large batches of effects.
[0150] For a clearer description of the various layers in the special effects, see [link / reference]. Figure 5 As shown, Figure 5 This is a schematic diagram illustrating a special effects layer according to an exemplary embodiment. The first layer 501 includes foreground motion effect elements 501, foreground atmosphere elements 5012, title text 5013, copy text 5014, etc.; the second layer includes a portrait 5021 and visual effects; the third layer includes a special effects background image 5031 and motion effects.
[0151] This disclosure provides a special effects generation method. Based on information such as a special effects theme and initial special effects text, it can automatically generate target special effects text and various special effects materials that match the theme. Then, based on the special effects background image or target special effects text in the special effects materials, it automatically matches and splices the materials to obtain multiple special effects. This process does not rely on manual production and assembly of special effects materials, and can efficiently generate a large number of special effects without manual processing, saving time and costs and improving the efficiency of special effects generation. Specifically, matching the visual features of the special effects background image in each type of special effects material ensures the coordination and consistency between the special effects background image and other special effects materials and the target special effects text, improving the quality of special effects generation. By extracting special effects materials corresponding to keywords in the target special effects text, the coordination and consistency between the text and the visuals are guaranteed.
[0152] The above embodiments implement the special effects generation method using a single electronic device or based on a single electronic device and a storage device or storage platform. To further improve the efficiency of automated special effects generation, some embodiments employ a distributed system to implement the special effects generation method. The distributed system includes multiple electronic devices, including those described in the above embodiments, which are connected via wired or wireless means for data transmission. See also... Figure 6 As shown, Figure 6 This is a schematic diagram illustrating another special effects generation process according to an exemplary embodiment. For ease of description, special effects text is considered as a type of special effects material, that is, the following special effects materials include special effects text, special effects background images, etc.
[0153] In some embodiments, an electronic device in a distributed system splits the task group for generating special effects, and distributes the resulting tasks to electronic devices deployed in the production environment. This allows multiple distributed electronic devices to collaboratively implement the special effects generation method. Each task can instruct the generation of special effects materials for different themes, or for generating different types of special effects materials for the same theme. It can also instruct the acquisition of corresponding special effects materials based on different mapping relationships in a special effects mapping table, or the splicing of special effects materials. This embodiment does not limit the task splitting method. The splicing of special effects materials is completed through the mutual cooperation between the various distributed electronic devices.
[0154] On each electronic device, task result data, such as data for corresponding special effects, is obtained through processing by the main control module and the production module. Each electronic device uploads its own task result data to a management platform (such as GitLab). The electronic device responsible for task recycling pulls task result data from the management platform in real time or periodically, and uploads it to the target platform via a distributed stream processing platform (such as Kafka) for user use. The electronic device responsible for task recycling can be the same as the electronic device responsible for task group splitting.
[0155] For any given electronic device's main control module, the device iterates through each piece of data in the task group, downloading the required special effects materials from the storage device or platform. After acquiring the special effects materials, the device organizes them, i.e., deserializes them, and generates JSON format data as required by the production module. The device then calls the generation module to assemble the special effects materials and obtain the effects. The results are then written to the special effects, resulting in task outcome data, which is then uploaded.
[0156] For any production module of an electronic device, in response to the main control module's call command, the production module acquires the screen rules, which are the layout rules for the screen content, such as text layout, screen matching, and material calling. The electronic device uses the production pipeline to stitch together special effects materials. In application 1 (such as Adobe After Effects), layer stitching is completed using a corresponding automation scripting language (such as Extend Script), while simultaneously calling tools (such as AEGC Tool Kit) to reference special effects dependencies. That is, based on the script library, special effects library, and tool library, and using preset templates, the special effects materials are automatically assembled, completing automated engineering projects for icons, foreground, and background respectively. For the special effects data in each automated engineering project, special effects are burned into the application 2 (such as MV Creator). That is, the special effects-related data or programs are written to a specific storage medium or device, thereby exporting the generated special effects data. Optionally, an auxiliary tool (such as ffmpeg) is used to burn the foreground into video by burning the sequence frames, and this video is used as a component of the special effects data.
[0157] By using the above method, based on the main control module and production module on each electronic device in the distributed system, the automatic splicing of special effects materials is realized. A large number of special effects can be generated efficiently without manual processing, saving time and costs and improving the generation efficiency of special effects.
[0158] All of the above-mentioned optional technical solutions can be combined in any way to form optional embodiments of this disclosure, and will not be described in detail here.
[0159] Figure 7 This is a block diagram illustrating a special effects generation apparatus according to an exemplary embodiment. Figure 7 As shown, the device includes: an acquisition unit 701, a text generation unit 702, a material generation unit 703, and a splicing unit 704.
[0160] The acquisition unit 701 is configured to acquire the special effects theme, the initial special effects text and the prompt words, wherein the initial special effects text matches the special effects theme and the prompt words indicate the constraints when the natural language processing model generates text.
[0161] The text generation unit 702 is configured to perform text generation by inputting the special effects theme, initial special effects text and prompt words into a natural language processing model to obtain multiple target special effects texts that match the special effects theme.
[0162] The material generation unit 703 is configured to generate multiple types of special effects materials that match the special effects theme, based on the special effects theme and multiple target special effects texts.
[0163] The splicing unit 704 is configured to splice multiple target effect texts and multiple types of effect materials to obtain multiple effects, each of which includes at least one target effect text and at least one effect material.
[0164] In some embodiments, various special effects materials include special effects background images;
[0165] The material generation unit 703 is configured to input the special effects theme and multiple target special effects texts into the text-to-image model to generate an image, thereby obtaining a special effects background image that matches the special effects theme.
[0166] In some embodiments, various special effects materials include special effects background images;
[0167] Splicing unit 704 includes:
[0168] The determination subunit is configured to perform the following actions for any special effects background image in multiple special effects materials: determine the special effects material that matches the special effects background image from each special effects material category, and determine the target special effects text that matches the special effects background image.
[0169] The splicing subunit is configured to splice a special effects background image, special effects material matching the special effects background image, and target special effects text matching the special effects background image to obtain a first special effect. The first special effect includes a special effects background image, special effects material matching the special effects background image, and target special effects text matching the special effects background image.
[0170] In some embodiments, the determining subunit is configured to perform the following: determining the theme color of the special effects background image based on the proportion of each color in the special effects background image, wherein the proportion of the theme color is greater than the proportion of other colors; determining special effects materials that match the theme color from each type of special effects material, thereby obtaining special effects materials that match the special effects background image.
[0171] In some embodiments, the splicing unit 704 is further configured to perform the following actions for any target effect text: determining, based on keywords in the target effect text, effect materials matching keywords from each type of effect material; splicing the target effect text and the effect materials matching keywords to obtain a second effect, the second effect including the target effect text and the effect materials matching keywords.
[0172] In some embodiments, the splicing unit 704 is further configured to perform the following: retrieve a material mapping table from a storage device, the material mapping table being used to record the mapping relationships between multiple target effect texts and various types of effect materials; for any unprocessed mapping relationship in the material mapping table, retrieve the target effect text indicated by the mapping relationship and each type of effect material from the storage device; splice the target effect text indicated by the mapping relationship and each type of effect material to obtain the effect indicated by the mapping relationship, the effect indicated by the mapping relationship including the target effect text indicated by the mapping relationship and each type of effect material.
[0173] In some embodiments, the apparatus further includes:
[0174] The determination unit is configured to perform the determination of a material mapping table based on multiple target special effects texts and multiple types of special effects materials. The material mapping table is used to record the mapping relationship between multiple target special effects texts and various types of special effects materials.
[0175] The storage unit is configured to store multiple target effect texts, multiple types of effect materials, and material mapping tables to the storage device.
[0176] In some embodiments, the splicing unit 704 is further configured to perform multiple layers for a defined effect, assigning each layer multiple target effect texts and at least one of multiple types of effect materials; splicing each layer separately to obtain a layer effect for each layer, wherein the layer effect of any layer includes the target effect text and effect material corresponding to the layer; and splicing the layer effects of multiple layers to obtain an effect.
[0177] This disclosure provides a special effects generation device that, based on information such as a special effects theme and initial special effects text, can automatically generate target special effects text and various special effects materials that match the theme, and automatically splice these texts and materials to obtain multiple special effects. This process does not rely on manual production and assembly of special effects materials, and can efficiently generate a large number of special effects without manual processing, saving time and costs and improving the efficiency of special effects generation.
[0178] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0179] It should be noted that the special effects generation device provided in the above embodiments is only an example of the division of the above functional units. In practical applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the electronic device can be divided into different functional units to complete all or part of the functions described above. In addition, the special effects generation device and the special effects generation method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.
[0180] Regarding the special effects generation device in the above embodiments, the specific methods by which each module performs its operations have been described in detail in the embodiments related to the method, and will not be elaborated here.
[0181] Figure 8 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Typically, the electronic device 800 includes a processor 801 and a memory 802.
[0182] Processor 801 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 801 may be implemented using at least one hardware method selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 801 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 801 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 801 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0183] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 802 are used to store at least one program code, which is executed by the processor 801 to implement the special effects generation method provided in the method embodiments of this disclosure.
[0184] In some embodiments, the electronic device 800 may optionally include a peripheral device interface 803 and at least one peripheral device. The processor 801, memory 802, and peripheral device interface 803 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 803 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, and a power supply 808.
[0185] Peripheral device interface 803 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 801 and memory 802. In some embodiments, processor 801, memory 802 and peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 801, memory 802 and peripheral device interface 803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.
[0186] The radio frequency (RF) circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 804 can communicate with other electronic devices via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: metropolitan area networks (MANs), various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks (WLANs), and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 804 may also include circuitry related to NFC (Near Field Communication), which is not limited herein.
[0187] Display screen 805 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 805 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 801 for processing. In this case, display screen 805 can also be used to provide virtual controls and / or a virtual keyboard, also known as soft controls and / or a soft keyboard. In some embodiments, there may be one display screen 805, which serves as the front panel of the electronic device 800; in other embodiments, there may be at least two display screens, respectively disposed on different surfaces of the electronic device 800 or in a folded design; in still other embodiments, display screen 805 may be a flexible display screen, disposed on a curved or folded surface of the electronic device 800. Furthermore, display screen 805 may be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. Display screen 805 may be made of materials such as LCD (Liquid Crystal Display) or OLED (Organic Light-Emitting Diode).
[0188] The camera assembly 806 is used to acquire images or videos. Optionally, the camera assembly 806 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the electronic device, and the rear-facing camera is located on the back of the electronic device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.
[0189] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting the sound waves into electrical signals that are input to the processor 801 for processing, or input to the radio frequency circuit 804 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, each located in a different part of the electronic device 800. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert the electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 807 may also include a headphone jack.
[0190] Power supply 808 is used to supply power to various components in electronic device 800. Power supply 808 can be AC power, DC power, a disposable battery, or a rechargeable battery. When power supply 808 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.
[0191] Those skilled in the art will understand that Figure 8 The structure shown does not constitute a limitation on the electronic device 800, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0192] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 802 including instructions, which can be executed by a processor 801 of an electronic device 800 to complete the aforementioned special effects generation method. Optionally, the computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.
[0193] A computer program product includes a computer program that, when executed by a processor, implements the aforementioned special effects generation method.
[0194] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This disclosure is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.
[0195] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.
Claims
1. A method for generating special effects, characterized in that, The method includes: Obtain the special effects theme, initial special effects text, and prompt words, wherein the initial special effects text matches the special effects theme, and the prompt words indicate the constraints when the natural language processing model generates text; The special effects theme, the initial special effects text, and the prompt words are input into the natural language processing model to generate text, resulting in multiple target special effects texts that match the special effects theme. Based on the special effects theme and the multiple target special effects texts, generate multiple types of special effects materials that match the special effects theme; Multiple target effect texts and multiple types of effect materials are spliced together to obtain multiple effects, each of which includes at least one target effect text and at least one effect material.
2. The special effects generation method according to claim 1, characterized in that, The various special effects materials include special effects background images; The process of generating multiple types of special effects materials that match the special effects theme based on the special effects theme and the multiple target special effects texts includes: The special effects theme and the multiple target special effects texts are input into the text-based image model to generate an image, thereby obtaining a special effects background image that matches the special effects theme.
3. The special effects generation method according to claim 1, characterized in that, The various special effects materials include special effects background images; The process of splicing together the multiple target special effects texts and the multiple types of special effects materials yields multiple special effects, including: For any special effects background image among the multiple types of special effects materials, determine the special effects material that matches the special effects background image from each type of special effects material, and determine the target special effects text that matches the special effects background image; The special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image are spliced together to obtain a first special effect. The first special effect includes the special effects background image, the special effects material matching the special effects background image, and the target special effects text matching the special effects background image.
4. The special effects generation method according to claim 3, characterized in that, The step of determining the special effects material that matches the special effects background image from each type of special effects material includes: Based on the proportion of each color in the special effects background image, the theme color of the special effects background image is determined, and the proportion of the theme color is greater than the proportion of other colors among the colors. From each type of special effects material, identify the special effects material that matches the theme color to obtain the special effects material that matches the special effects background image.
5. The special effects generation method according to claim 1, characterized in that, The process of splicing together the multiple target special effects texts and the multiple types of special effects materials yields multiple special effects, including: For any target special effects text, based on the keywords in the target special effects text, special effects materials that match the keywords are determined from each type of special effects materials; The target special effects text and the special effects material matching the keyword are spliced together to obtain a second special effects, the second special effects including the target special effects text and the special effects material matching the keyword.
6. The special effects generation method according to claim 1, characterized in that, The process of splicing together the multiple target special effects texts and the multiple types of special effects materials yields multiple special effects, including: Obtain a material mapping table from the storage device. The material mapping table is used to record the mapping relationship between the multiple target special effects texts and various special effects materials. For any unprocessed mapping relationship in the material mapping table, retrieve the target special effects text and each type of special effects material indicated by the mapping relationship from the storage device; The target effect text indicated by the mapping relationship and each type of effect material are concatenated to obtain the effect indicated by the mapping relationship. The effect indicated by the mapping relationship includes the target effect text indicated by the mapping relationship and each type of effect material.
7. The special effects generation method according to claim 1, characterized in that, The method further includes: Based on the multiple target special effects texts and the multiple types of special effects materials, a material mapping table is determined. The material mapping table is used to record the mapping relationship between the multiple target special effects texts and various types of special effects materials. The multiple target special effects texts, the multiple types of special effects materials, and the material mapping table are stored in a storage device.
8. The special effects generation method according to claim 1, characterized in that, The process of splicing together the multiple target special effects texts and the multiple types of special effects materials yields multiple special effects, including: Determine multiple layers for special effects, and assign each layer at least one of the multiple target special effect texts and the multiple types of special effect materials; Each layer is stitched together to obtain the layer effect for each layer. The layer effect of any layer includes the target effect text and effect material corresponding to that layer. The special effect is obtained by combining the layer effects of the multiple layers.
9. A special effects generation device, characterized in that, The device includes: The acquisition unit is configured to acquire the special effects theme, the initial special effects text, and the prompt words, wherein the initial special effects text matches the special effects theme, and the prompt words indicate the constraints when the natural language processing model generates text. The text generation unit is configured to input the special effects theme, the initial special effects text, and the prompt words into the natural language processing model to generate text, thereby obtaining multiple target special effects texts that match the special effects theme. The material generation unit is configured to generate multiple types of special effects materials that match the special effects theme, based on the special effects theme and the multiple target special effects texts. The splicing unit is configured to splice the multiple target effect texts and the multiple types of effect materials to obtain multiple effects, each effect including at least one target effect text and at least one effect material.
10. An electronic device, characterized in that, The electronic device includes: One or more processors; Memory used to store the executable program code of the processor; The processor is configured to execute the program code to implement the special effects generation method as described in any one of claims 1 to 8.
11. A computer-readable storage medium, characterized in that, When the instructions in the computer-readable storage medium are executed by the processor of the electronic device, the electronic device is able to perform the special effects generation method as described in any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the special effects generation method as described in any one of claims 1 to 8.