Special effect generation method and device, equipment and storage medium
Through interaction between the terminal device and the server, using the guidance problem and the special effect element resource package to generate special effects that meet user needs, solving the problems of limited special effects selection and large data volume in the existing technology, and realizing the special effects generation of personalized customization and efficient rendering.
Patent Information
- Application Number
- CN202510157076.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-12
- Publication Date
- 2025-06-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the special effects functions in short video applications cannot meet the user's personalized customization needs, and the existing solutions have problems such as limited material selection and excessive data volume.
The terminal device obtains the special effect description data input by the user, outputs the guidance problem to guide the user to input the next description data, and generates a special effect element resource package from the server for rendering, including target materials and animation scripts, and combines AI algorithms to generate special effect generation.
It realizes the need for users to personalize special effects, reduces the performance overhead of terminal devices, optimizes the data transmission volume, improves the dynamic effects and intelligent display of special effects.
Smart Images

Figure CN120151585A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of special effect processing technologies, and in particular, to a method, apparatus, device, and storage medium for generating special effects. Background Art
[0002] Most short video applications provide special effect functions. Using these functions, users can process the captured images or videos to enhance the visual expressiveness and interactive fun of the images or short videos. In the related art, the special effects used by users are often manually selected from preset special effects, which cannot meet the needs of users for personalized customization of special effects. Summary of the Invention
[0003] This application provides a method, apparatus, device, and storage medium for generating special effects, which can meet the needs of users for personalized customization of special effects.
[0004] In a first aspect of an embodiment of this application, a method for generating special effects is provided. The method is applied to a terminal device and includes:
[0005] Obtain multiple pieces of special effect description data input by a user, and output guiding questions for each piece of special effect description data input by the user, where the guiding questions are used to guide the user to input the next piece of special effect description data;
[0006] According to the multiple pieces of special effect description data, obtain a special effect element resource package, where the special effect element resource package includes special effect elements generated by a server according to the multiple pieces of special effect description data;
[0007] Render a special effect based on the special effect element resource package.
[0008] In the above technical solution, in the above technical solution, the terminal device can guide the user to accurately express their special effect requirements by outputting guiding questions. The special effect element resource package obtained based on this special effect requirement can better meet the user's expectations, and thus meet the needs of users for personalized customization of special effects.
[0009] In a possible embodiment, the special effect elements include target materials and animation scripts corresponding to the target materials. The obtaining of the special effect element resource package according to the multiple pieces of special effect description data includes:
[0010] Send the multiple pieces of special effect description data to obtain the target materials and the animation scripts corresponding to the target materials from the server;
[0011] Package the target materials and the animation scripts corresponding to the target materials to obtain the special effect element resource package.
[0012] In the above technical solution, the terminal device can obtain not only the target material from the server side, but also the animation effect script corresponding to the target material, which is beneficial to enhancing the dynamic effect of the special effect.
[0013] In a possible embodiment, the special effect is obtained by rendering the target material and the animation effect script corresponding to the target material. The method further includes:
[0014] Obtain the AI algorithm corresponding to the target material from the server;
[0015] Obtain the user's captured content, and locate the display position of the target material in the captured content according to the AI algorithm corresponding to the target material to obtain the captured content with the special effect.
[0016] In the above technical solution, the terminal device can also obtain the AI algorithm for positioning the display position of the material from the server side, which can make the display of the special effect more intelligent.
[0017] In a possible embodiment, the method further includes:
[0018] Receive the indication information input by the user for instructing to terminate the output of the guiding question, and stop outputting the guiding question;
[0019] Or,
[0020] If the special effect description data input by the user for the most recent guiding question is not received within the preset duration, stop outputting the guiding question.
[0021] In the above technical solution, when the terminal device receives the indication information input by the user for instructing to terminate the output of the guiding question, or does not receive the special effect description data input by the user for the last guiding question within the preset duration, it stops outputting the guiding question, which can intelligently control the output of the guiding question.
[0022] The second aspect of the embodiments of the present application provides a method for generating a special effect. The method is applied to a server, and the method includes:
[0023] Receive multiple special effect description data sent by the user, generate guiding questions for each piece of special effect description data input by the user and send them;
[0024] Generate special effect elements according to the multiple special effect description data;
[0025] Send the special effect elements.
[0026] In the above technical solution, the server generates guiding questions for the special effect description data input by the user each time and sends them, and then generates special effect elements based on the multiple special effect description data sent by the user, which helps to reduce the performance overhead of the terminal device.
[0027] In a possible embodiment, the special effect element includes a target material, and generating the target material according to the multiple special effect description data includes:
[0028] Obtain the content attribute information and display information corresponding to the material from the multiple special effect description data; wherein, the content attribute information corresponding to the material is used to indicate the content characteristics of the material, and the display information is used to indicate the display parameters of the material;
[0029] Generate an intermediate material according to the content attribute information corresponding to the material;
[0030] Adjust the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material.
[0031] In the above technical solution, during the process of generating the target material, the server can also automatically adjust the display parameters of the material according to the display information of the material, which helps to improve the display effect of the target material.
[0032] In a possible embodiment, adjusting the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material includes:
[0033] When the display information corresponding to the material indicates that the material is applied to the background position, adjust the transparency parameter of the intermediate material to obtain the target material;
[0034] When the display information corresponding to the material indicates that the material is applied to the foreground position, adjust the size and resolution of the intermediate material according to the resolution and screen size of the terminal device to obtain the
[0035] In the above technical solution, when the material is applied to the background position, the server automatically adjusts the transparency parameter of the intermediate material, which can make the generated target material more meet the requirements of the background picture; adjusting the size and resolution of the intermediate material based on the resolution and screen size of the device applying the special effect can reduce the performance consumption of the terminal device while ensuring the display effect of the target material.
[0036] In a possible embodiment, generating the intermediate material according to the content attribute information corresponding to the material includes:
[0037] Generate an initial material according to the content attribute information corresponding to the material;
[0038] After detecting sensitive content in the initial material, the intermediate material is obtained, and the intermediate material is a material that does not contain sensitive content.
[0039] In the above technical solution, the server performs sensitive content detection during the process of generating the target material, and can generate a target material with sensitive content.
[0040] In a possible embodiment, the special effect element further includes an animation script corresponding to the target material. Generating the animation script corresponding to the target material according to the multiple special effect description data includes:
[0041] Obtain the motion attribute information corresponding to the target material from the multiple special effect description data; wherein, the motion attribute information is used to indicate the motion characteristics of the target material;
[0042] Obtain the animation script of the target material according to the motion attribute information corresponding to the target material.
[0043] In the above technical solution, the server can automatically generate the animation script of the target material based on the motion attribute information corresponding to the target material, which is beneficial to improving the dynamic effect of the special effect.
[0044] The third aspect of the embodiments of the present application provides a special effect generation device, which is located in a terminal device, and the device includes:
[0045] The first acquisition unit is used to acquire multiple special effect description data input by the user, and output a guiding question for each special effect description data input by the user, wherein the guiding question is used to guide the user to input the next special effect description data;
[0046] The first acquisition unit is further used to acquire a special effect element resource package according to the multiple special effect description data, wherein the special effect element resource package includes special effect elements generated by the server according to the multiple special effect description data;
[0047] The first generation unit is used to render and generate a special effect based on the special effect element resource package.
[0048] In a possible embodiment, the special effect element includes a target material and an animation script corresponding to the target material. The specific manner in which the first acquisition unit is used to acquire the special effect element resource package according to the multiple special effect description data includes:
[0049] The first acquisition unit is used to send the multiple special effect description data to obtain the target material and the animation script corresponding to the target material from the server; and package the target material and the animation script corresponding to the target material to obtain the special effect element resource package.
[0050] In a possible embodiment, the special effect is obtained by rendering the target material and the animation effect script corresponding to the target material. The first acquisition unit is further configured to acquire the AI algorithm corresponding to the target material from the server; and acquire the user's captured content, and locate the display position of the target material in the captured content according to the AI algorithm corresponding to the target material to obtain the captured content with the special effect.
[0051] In a possible embodiment, the first acquisition unit is further configured to stop outputting the guiding question when receiving the indication information input by the user for indicating the termination of the output of the guiding question; or stop outputting the guiding question if the special effect description data for the most recent guiding question is not received from the user within a preset time period.
[0052] A fourth aspect of the embodiments of the present application provides a special effect generation device, which is located in a server, and the device includes:
[0053] A second acquisition unit, configured to receive multiple special effect description data sent by a terminal device, generate a guiding question for each piece of special effect description data input by the user and send it, where the guiding question is used to guide the user to input the next special effect description data;
[0054] A second generation unit, configured to generate special effect elements according to the multiple special effect description data;
[0055] A sending unit, configured to send the special effect elements.
[0056] In a possible embodiment, the special effect elements include a target material. The specific manner in which the second generation unit generates the target material according to the multiple special effect description data includes:
[0057] The second generation unit is configured to obtain the content attribute information and display information corresponding to the material from the multiple special effect description data; where the content attribute information corresponding to the material is used to indicate the content characteristics of the material, and the display information is used to indicate the display parameters of the material; and generate an intermediate material according to the content attribute information corresponding to the material; and adjust the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material.
[0058] In a possible embodiment, the specific manner in which the second generation unit adjusts the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material includes:
[0059] A second generation unit, configured to, when the display information corresponding to the material indicates that the material is applied to the background position, adjust the transparency parameter of the intermediate material to obtain the target material; and, when the display information corresponding to the material indicates that the material is applied to the foreground position, adjust the size and resolution of the intermediate material according to the resolution and screen size of the terminal device to obtain the target material.
[0060] In a possible embodiment, the manner in which the second generation unit generates the intermediate material according to the content attribute information corresponding to the material specifically includes: The second generation unit is configured to generate an initial material according to the content attribute information corresponding to the material; and, after performing sensitive content detection on the initial material, obtain the intermediate material, where the intermediate material is a material that does not contain sensitive content.
[0061] In a possible embodiment, the special effect element further includes an animation script corresponding to the target material. The manner in which the second generation unit generates the animation script corresponding to the target material according to the multiple special effect description data specifically includes:
[0062] The second generation unit is configured to obtain, from the multiple special effect description data, motion attribute information corresponding to the target material; where the motion attribute information is used to indicate the motion characteristics of the target material; and, obtain the animation script of the target material according to the motion attribute information corresponding to the target material.
[0063] A fifth aspect of the embodiments of the present application provides an electronic device,
[0064] A memory storing executable program code;
[0065] And a processor coupled to the memory;
[0066] The processor calls the executable program code stored in the memory, and when the executable program code is executed by the processor, the processor is caused to implement the method disclosed in the first aspect or the second aspect of the embodiments of the present application.
[0067] A sixth aspect of the embodiments of the present application provides a computer-readable storage medium, on which executable program code is stored, and when the executable program code is executed by a processor, the method disclosed in the first aspect or the second aspect of the embodiments of the present application is implemented.
[0068] A seventh aspect of the embodiments of the present application discloses a computer program product, and when the computer program product runs on a computer, the computer is caused to execute the method disclosed in the first aspect or the second aspect of the embodiments of the present application.
[0069] The eighth aspect of the embodiments of the present application discloses an application release platform for releasing computer program products. When the computer program product runs on a computer, the computer is caused to execute the methods disclosed in the first aspect or the second aspect of the embodiments of the present application.
[0070] As can be seen from the above technical solutions, the embodiments of the present application have at least the following advantages:
[0071] Obtain multiple pieces of special effect description data input by the user, and output guiding questions for each piece of special effect description data input by the user, where the guiding questions are used to guide the user to input the next piece of special effect description data; according to the multiple pieces of special effect description data input by the user, obtain a special effect element resource package, where the special effect element resource package includes special effect elements generated by the server according to the multiple pieces of special effect description data; perform rendering based on the special effect element resource package to generate a special effect.
[0072] By implementing this method, the output of the guiding questions can guide the user to accurately express their special effect requirements. The special effect element resource package obtained based on this special effect requirement can better meet the user's expectations, thereby meeting the user's need for personalized special effect customization. Description of the Drawings
[0073] Figure 1 is a schematic diagram of the application scenario disclosed in the embodiments of the present application;
[0074] Figure 2 is a flowchart of a method for generating a special effect disclosed in the embodiments of the present application;
[0075] Figure 3 is an interface diagram of a streaming conversation interaction disclosed in the embodiments of the present application;
[0076] Figure 4 is another flowchart of a method for generating a special effect disclosed in the embodiments of the present application;
[0077] Figure 5A is yet another flowchart of a method for generating a special effect disclosed in the embodiments of the present application;
[0078] Figure 5B is a diagram showing the display of the target material located by the AI algorithm disclosed in the embodiments of the present application;
[0079] Figure 6 is another schematic diagram of the application scenario disclosed in the embodiments of the present application;
[0080] Figure 7 is a structural diagram of a device for generating a special effect disclosed in the embodiments of the present application;
[0081] Figure 8It is another structural diagram of the special effect generation device disclosed in the embodiments of the present application;
[0082] Figure 9 It is a structural diagram of a terminal device disclosed in the embodiments of the present application;
[0083] Figure 10 It is a structural diagram of a server disclosed in the embodiments of the present application. Detailed implementation manners
[0084] The present application provides a special effect generation method, device, equipment and storage medium, which can meet the needs of users for personalized customization of special effects.
[0085] In order to enable those skilled in the art to better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all should belong to the scope protected by the present application.
[0086] It should be noted that in the present application, words such as "exemplarily" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplarily" or "for example" in the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplarily" or "for example" aims to present relevant concepts in a specific way.
[0087] "At least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression below refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, at least one (item) of a, b and c can represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b and c can be single or multiple.
[0088] Most short video applications provide special effect functions. Users can use the special effect functions to process the captured images or videos to enhance the visual expressiveness and interactive interest of the images or short videos. In the related art, the special effects used by users are often manually selected by users from the preset special effects, which cannot meet the needs of users for personalized customization of special effects.
[0089] To solve this problem, currently, terminal devices usually obtain special effects in the following ways.
[0090] Solution 1: The terminal device generates special effects. Specifically, the technical implementation is that the terminal device integrates and packages multiple replaceable small materials and provides a selection interface on the terminal device, so as to enable different material selections for the same special effect. For example, for the glasses special effect, there can be round glasses, square glasses, or glasses of various patterns. Then, based on the materials selected by the user, the special effect is generated. Although it can meet the diverse needs to a certain extent, there are still two problems: 1. The available materials are limited. Even if a small range of material selections are provided, it still cannot meet the differentiated needs of users with different preferences. 2. The material resource package is too large. Because multiple candidate small materials need to be packaged in advance, it will inevitably increase the additional data volume overhead.
[0091] Solution 2: The server AI generates special effects. Specifically, the technical implementation is to upload the video / image on the terminal device to the server. The server combines its AI capabilities to perform special effect rendering and sends the video / image with the added special effect to the terminal device for output on the terminal device. This solution can alleviate problems such as limited options in Solution 1, but it still cannot meet the needs of users for personalized customized special effects. In addition, this solution also has problems such as excessive data volume transmission and long AI rendering latency on the service side, which cannot continuously perform dynamic effect rendering output.
[0092] To solve the above problems, the embodiments of the present application provide a method, device, equipment, and storage medium for generating special effects, which can meet the needs of users for personalized customized special effects.
[0093] The method for generating special effects disclosed in the embodiments of the present application can be applicable to Figure 1 the application scenarios shown in Figure 1 The application scenarios shown in include a terminal device 10 and a server 20. Among them, the terminal device 10 can interact with the server 20. Optionally, the interaction process is as follows: The terminal device 10 can obtain the special effect description data input by the user and send the special effect description data input by the user each time to the server 20. The server 20 can generate guiding questions for the feature description data input by the user each time and send the guiding questions to the terminal device 10. The terminal device 10 can output the guiding questions to guide the user to input the next special effect description data. Then, the server 20 can generate special effect elements based on the special effect description data input by the user multiple times and send the generated special effect elements to the terminal device 10. The terminal device 10 can obtain a special effect element resource package based on the special effect elements sent by the server 20, and then render and generate special effects based on this special effect element resource package.
[0094] The output of guiding questions by the terminal device can guide the user to accurately express their special effect requirements. The special effect element resource package obtained based on this special effect requirement can better meet the user's expectations, thereby satisfying the user's need for personalized special effect customization. In addition, the terminal device obtains special effect elements from the server side based on the special effect description data input by the user, and then obtains the special effect element resource package based on the special effect elements, which can effectively reduce the performance overhead of the terminal device. The data interaction between the server and the terminal device does not involve the transmission of videos or images, which is also conducive to reducing the amount of data transmitted.
[0095] It should be noted that the terminal device 10 may include general handheld screen electronic devices, such as mobile phones, smart phones, portable terminals, terminals, personal digital assistants (PDAs), portable multimedia player (PMP) devices, laptop computers, notebooks, wireless broadband (Wibro) terminals, tablet computers (PCs), and smart PCs.
[0096] The terminal device 10 may also include wearable devices. Wearable devices can be directly worn on the user's body or integrated into the user's clothes or accessories as a kind of portable electronic device. Wearable devices are not only a kind of hardware device, but can also achieve powerful intelligent functions through software support, data interaction, and cloud server interaction, such as computing functions, positioning functions, and alarm functions. At the same time, they can also be connected to mobile phones and various terminals. Wearable devices may include, but are not limited to, watch - type devices supported by the wrist (such as watches, wrists, etc.), shoes - type devices supported by the feet (such as shoes, socks, or other products worn on the legs), glass - type devices supported by the head (such as glasses, helmets, headbands, etc.), and smart clothing, as well as various non - mainstream product forms such as schoolbags, crutches, and accessories. The following will introduce the method for generating special effects disclosed in the embodiments of the present application in combination with specific implementation manners.
[0097] Please refer to Figure 2 , Figure 2 which is a flowchart of a method for generating special effects disclosed in the embodiments of the present application. As Figure 2 shown, the method for generating special effects may include the following steps:
[0098] 201. The terminal device obtains multiple pieces of special effect description data input by the user.
[0099] Among them, the multiple special effect description data may include two special effect description data. The special effect description data may refer to the data used to describe the user's special effect requirements. The way for the user to input the special effect description data may be voice input or manual input, which is not limited in the embodiments of the present application.
[0100] In some embodiments, when the terminal device obtains the special effect description data input by the user, it may also display the special effect description data on the display screen of the terminal device.
[0101] 202. The terminal device sends the multiple special effect description data input by the user to the server.
[0102] It should be noted that each time the terminal device obtains the special effect description data input by the user, it sends the special effect description data input by the user this time to the server. The server may generate a guiding question according to the special effect description data input by the user this time and send the guiding question to the terminal device. The terminal device outputs the guiding question to guide the user to input the next special effect description data.
[0103] Optionally, the way for the terminal device to output the guiding question may be to output the guiding question through the speaker of the terminal device and / or to display the guiding question through the display screen of the terminal device, which is not limited in the embodiments of the present application.
[0104] In some embodiments, a special effect understanding model may be deployed on the server. The special effect understanding model may be composed of a large language model and a first base model. The server may understand the special effect description data input by the user each time through the large language model, send the understood special effect description data to the first base model, and then generate a guiding question through the first base model according to the understood special effect description data.
[0105] Among them, both the large language model (Large Language Model, LLM) and the first base model are retrained based on the collected corpus in the special effect field. Optionally, the first base model may include but is not limited to Llama or ChatGLM, etc.
[0106] It can be understood that the user conducts a streaming conversation interaction on the terminal device. Exemplarily, the interface diagram of the streaming conversation interaction can be seen in the following Figure 3 . Such as Figure 3 The shown conversation interaction interface includes the feature description data input by the user for the first time, the first guiding question for the feature description data input for the first time, the feature description data input by the user for the second time, and the second guiding question for the feature description data input for the second time.
[0107] It should be noted that Figure 3The feature description data and the number of guides in the shown dialogue interaction interface are only examples and do not limit this solution.
[0108] In some embodiments, the conditions for the terminal device to stop outputting guiding questions may include but are not limited to any of the following:
[0109] The terminal device receives indication information input by the user for indicating to terminate the output of guiding questions and stops outputting guiding questions;
[0110] Or,
[0111] The terminal device does not receive the special effect description data input by the user for the most recent guiding question within a preset duration and stops outputting guiding questions.
[0112] Exemplarily, the indication information for indicating to terminate the output of guiding questions may be texts such as "end", "dialogue terminated", or "prohibit outputting questions", etc., which are not limited in the embodiments of this application.
[0113] Exemplarily, the preset time may be a duration such as 1 minute, 2 minutes, or 3 minutes, etc., which is not limited in the embodiments of this application.
[0114] It should be noted that when the terminal device stops outputting guiding questions, that is, the server stops generating guiding questions.
[0115] It can be understood that when the terminal device receives the indication information input by the user for indicating to terminate the output of guiding questions, or does not receive the special effect description data input by the user for the last guiding question within the preset duration, it stops outputting guiding questions, which can intelligently control the output of guiding questions.
[0116] 203. The server generates special effect elements according to multiple special effect description data input by the user.
[0117] Among them, the special effect elements may include target materials.
[0118] Optionally, the server generates target materials according to multiple special effect description data input by the user, which may include:
[0119] The server obtains the content attributes corresponding to each material according to multiple special effect description data input by the user, and the content attributes corresponding to the material are used to indicate the content characteristics corresponding to the material;
[0120] The server generates the target material corresponding to each material according to the content attributes corresponding to each material.
[0121] In the embodiments of this application, the types of materials may include but are not limited to at least one of the following: two-dimensional images, three-dimensional models, texts, audios, videos, background lights, and beauty effects, etc.
[0122] Exemplarily, the content attributes corresponding to the two-dimensional image may include information such as the content and color of the two-dimensional image. The content attributes corresponding to the three-dimensional model may include geometric data, texture mapping information, material attributes, and other information. The content attributes corresponding to the text may include text information and text formats (font, font size, color), etc. The content attributes corresponding to the audio may include audio content, audio quality, and audio type, etc. The content attributes corresponding to the video may include picture content, subtitle information, and timeline information, etc. The content attributes corresponding to the background light may include the nature, direction, color, and brightness of the light, etc. The content attributes corresponding to beauty enhancement may include whitening, skin smoothing, blushing, face slimming, and eye enlargement, etc.
[0123] Optionally, the server obtains the content attributes corresponding to the material according to the multiple special effect description data input by the user, which may include: The server can use the large model for special effect understanding deployed on it to obtain the content attributes corresponding to each material according to the multiple special effect description data input by the user.
[0124] In some embodiments, the server generates the target material corresponding to each material according to the content attributes corresponding to each material, which may include: The server can use the material generation model to generate the target material corresponding to each material according to the content attributes corresponding to each material.
[0125] Among them, the material generation models corresponding to different types of materials may be different.
[0126] Exemplarily, when the type of the material includes a two-dimensional image, a two-dimensional image generation model can be deployed on the server. When the type of the material includes a three-dimensional model, a three-dimensional model generation model can be deployed on the server. When the type of the material includes text, a text generation model can be deployed on the server. When the type of the material includes audio, an audio generation model can be deployed on the server. When the type of the material includes video, a video generation model can be deployed on the server. When the type of the material includes background light, a background light generation model can be deployed on the server. When the type of the material includes beauty enhancement, a beauty enhancement generation model can be deployed on the server.
[0127] It should be noted that the material generation model can be an existing model or can be obtained by retraining an existing model. The embodiments of the present application do not make any limitations. Among them, the corpus for retraining the existing model may include the materials in the original special effect package.
[0128] Exemplarily, the retraining corpus of the two-dimensional image generation model may include 2D images in the original special effect package. Optionally, the two-dimensional image generation model can be retrained by using the open-source Stable Diffusion (SD) technology combined with the Local Implicit Representation (LoRA) technology.
[0129] The retraining corpus of the three-dimensional model generation model may include 3D images in the original special effect package and 3D images obtained from an external asset library or asset market. Optionally, the three-dimensional model generation model can be retrained by retraining models such as open-source DreamFusion3D, TripoSR, or Unique3D.
[0130] By implementing this method, the server generates target materials in real time through the material generation model according to the content attributes corresponding to the materials, which is beneficial to improving the generation efficiency of the target materials.
[0131] In some embodiments, in the case where the server does not receive the special effect description data for the last guiding question input by the user, the server can also obtain the special effect description data of other users for the last guiding question and generate target special effect description data according to the special effect description data of other users for the last guiding question.
[0132] Based on this, the server generating special effect elements according to multiple special effect description data input by the user may include: the server generating special effect elements according to multiple special effect description data input by the user and the target special effect description data.
[0133] Optionally, the server generating target special effect description data according to the special effect description data of other users for the last guiding question may include, but is not limited to, the following methods:
[0134] The server uses the special effect description data with the most occurrences in the special effect description data of other users for the last guiding question as the target special effect description data;
[0135] Or,
[0136] The server determines target users similar to the user information of the above user from other users and uses the special effect description data of the target users for the last guiding question as the target special effect description data.
[0137] Among them, the user information may include, but is not limited to, the user's gender, age, occupation, etc.
[0138] It can be understood that in the case where the special effect description data for the last guiding question input by the user is not received, the server can generate target special effect description data based on the special effect description data of other users for the last guiding question, and then generate special effect elements based on the target special effect description data and the multiple special effect description data input by the user, realizing the automatic supplement of the special effect description data, which can make the generated special effect elements more perfect.
[0139] 204. The server sends the special effect elements to the terminal device.
[0140] In the case where the special effect elements include the target materials corresponding to multiple materials, the server sending the special effect elements to the terminal device may include: the server sending the target material corresponding to each material to the terminal device.
[0141] 205. The terminal device obtains a special effect element resource package according to the special effect elements.
[0142] In some embodiments, the terminal device obtaining a special effect element resource package according to the special effect elements may include: the terminal device using a special effect engine tool to package the target material corresponding to each material into a special effect element resource package.
[0143] Optionally, the special effect engine tool in the embodiments of the present application may include, but is not limited to, Unity or Unreal Engine, etc.
[0144] 206. The terminal device renders based on the special effect element resource package to generate a special effect.
[0145] In some embodiments, the terminal device rendering based on the special effect element resource package to generate a special effect may include: the terminal device using the resources in the special effect element resource package to construct a scene, and performing real-time rendering according to information such as textures, models, textures, and materials in the scene to obtain a special effect.
[0146] By implementing Figure 2 the method shown, the terminal device can guide the user to accurately express their special effect requirements through the output of the guiding question. The special effect element resource package obtained based on this special effect requirement can better meet the user's expectations, and thus meet the user's need for personalized special effect customization.
[0147] In the embodiments of the present application, in addition to including target materials, the special effect elements may also include an animation script corresponding to the target material. For example, in the case where the type of the target material includes at least one of text, two-dimensional image, three-dimensional model, and background light, the special effect elements also include a dynamic script corresponding to the target material. The corresponding method for generating the special effect will be introduced in combination with the following Figure 4 for description.
[0148] Please refer to Figure 4 ,Figure 4 It is another flowchart of the method for generating special effects disclosed in the embodiments of the present application. As Figure 4 shown, the method for generating special effects may include the following steps:
[0149] 401. The terminal device obtains multiple pieces of special effect description data input by the user.
[0150] 402. The terminal device sends the multiple pieces of special effect description data input by the user to the server.
[0151] For the introduction of steps 401 - 402, reference can be made to the description of steps 201 - 202 above, which will not be elaborated here.
[0152] 403. The server generates a target material and a dynamic effect script corresponding to the target material according to the multiple pieces of special effect description data input by the user.
[0153] For the manner in which the server generates the target material according to the multiple pieces of special effect description data input by the user, reference can be made to the relevant introduction in the above embodiments, which will not be elaborated here.
[0154] In some embodiments, when the server generates a target material according to at least one piece of special effect description data input by the user, it may include:
[0155] The server obtains the content attribute information and display information corresponding to the material from the multiple pieces of special effect description data, where the display information corresponding to the material is used to indicate the display parameters of the material;
[0156] The server generates an intermediate material according to the content attribute information corresponding to the material;
[0157] The server adjusts the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material.
[0158] Optionally, the display information corresponding to the material is used to indicate whether the material is applied to the foreground position or the background position, or the display information corresponding to the material is further used to indicate other parameters such as the contrast and saturation of the material. The embodiments of the present application do not make limitations.
[0159] It should be noted that the material being applied to the foreground position may mean that the material is placed in the foreground position of the screen, and this material is a sticker - type material. The material being applied to the background position may mean that the material is placed in the background position of the screen, and the background position may be a position in the screen that is farther from the observer and behind the foreground screen, and this material is a background - type material.
[0160] It can be understood that during the process of the server generating the target material, the display parameters of the material can also be automatically adjusted according to the display information of the material, which is beneficial to improving the display effect of the target material.
[0161] In the embodiments of the present application, the server adjusts the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material, which may include:
[0162] When the display information corresponding to the material indicates that the material is applied to the background position, the server adjusts the transparency parameter of the intermediate material to obtain the target material;
[0163] When the display information corresponding to the material indicates that the material is applied to the foreground position, the server adjusts the size and resolution of the intermediate material according to the resolution and screen size of the terminal device to obtain the target material.
[0164] It should be noted that when the material is applied to the background position, the server automatically adjusts the transparency parameter of the intermediate material, which can make the generated target material more meet the requirements of the background picture. Based on the resolution and screen size of the device with applied special effects, adjusting the size and resolution of the intermediate material can reduce the performance consumption of the terminal device while ensuring the display effect of the target material.
[0165] In some implementations, the server generates an intermediate material according to the content attribute information corresponding to the material, which may include:
[0166] The server generates an initial material according to the content attribute information corresponding to the material;
[0167] After the server performs sensitive content detection on the initial material, the intermediate material is obtained, and the intermediate material is a material that does not contain sensitive content.
[0168] It can be understood that the above detection of sensitive content in the material is performed during the generation process of the target material, that is, the server completes the entire process of generating the target material through the material generation model.
[0169] In some implementations, the detection of sensitive content in the material can also be performed after the target material is generated. In this case, a risk control and security model can be connected downstream of the material generation model, and the server can perform sensitive content detection on the target material through this risk control and security model.
[0170] It should be noted that the server performs sensitive content detection during or after the generation process of the target material, which can avoid sending the target material with sensitive content to the terminal device.
[0171] In the embodiments of the present application, the server generates an animation script corresponding to the target material according to multiple special effect description data input by the user, which may include: the server obtains the motion attribute information corresponding to the target material from the multiple special effect description data input by the user; wherein, the motion attribute information is used to indicate the motion characteristics of the target material; the server obtains the animation script of the target material according to the motion attribute information corresponding to the target material.
[0172] The motion attribute information corresponding to the target material may include, but is not limited to, at least one of the motion mode information, motion trajectory information, deformation information, and particle effect information corresponding to the target material. Among them, the motion mode information can be used to indicate the motion state and form of the target material, the motion trajectory information can be used to indicate the motion path of the target material, the deformation information can be used to indicate the shape change of the target material, and the particle effect information can be used to indicate the particle effect corresponding to the target material.
[0173] Optionally, the server can obtain the motion attribute information corresponding to the target material through a special effect understanding model according to the multiple special effect description data input by the user.
[0174] In some embodiments, the server obtains the animation script of the target material according to the motion attribute information corresponding to the target material, which may include: the server determines the basic animation parameters according to the motion attribute information corresponding to the target material, and generates animation effect information according to the basic animation parameters and the target material, and, generates the animation script corresponding to the target material according to the animation effect information.
[0175] Among them, the basic animation parameters may include at least one of a motion mode parameter, a motion trajectory parameter, a deformation parameter, and a particle parameter.
[0176] Optionally, an animation generation model can be deployed on the server, and the server can obtain the animation script of the target material through the animation generation model according to the motion attribute information corresponding to the target material.
[0177] In the embodiments of the present application, the animation generation model can be obtained by retraining a second base model, where the second base model may include, but is not limited to, Unixcoder, CodeGemma, or Code Llama, etc. The retraining process of the second base model can be: collecting various AE animation scripts from existing special effect resources, adding annotations to these AE animation scripts, and collecting and annotating TypeScript scripts related to AE animations from existing special effect resources, and using the annotated AE animation scripts and the annotated TypeScript scripts to retrain the second base model.
[0178] 404. The server sends the target material and the animation script corresponding to the target material to the terminal device.
[0179] 405. The terminal device packs the target material and the animation effect script corresponding to the target material to obtain a special effect element resource package.
[0180] In some embodiments, for the terminal device to obtain the special effect element resource package based on the special effect elements, it may include: the terminal device uses a special effect engine tool to pack the target material corresponding to each material and the corresponding animation effect script into a special effect element resource package.
[0181] 406. The terminal device renders based on the special effect element resource package to generate a special effect.
[0182] By implementing Figure 4 the shown special effect generation method, the terminal device can guide the user to accurately express their special effect requirements through the output of guiding questions. The special effect element resource package obtained based on this special effect requirement can be more in line with the user's expectations, thereby meeting the user's need for personalized special effect customization. In addition, the terminal device can obtain not only the target material from the server side but also the animation effect script corresponding to the target material, which is beneficial to enhancing the dynamic effect of the special effect.
[0183] In some embodiments, the target material may change with the position change of the target object in the image. For example, when the content of the target material is a hat, if the special effect is to put the hat on the head, it is necessary to identify the head position of the target object and put the hat on the head of the target object. At the same time, it changes with the change of the head position of the target object. Therefore, in addition to obtaining the target material and the animation effect script corresponding to the target material from the server side, the terminal device can also obtain the AI algorithm corresponding to the target material, and the AI algorithm is used to locate the display position of the target material. For example, when the type of the target material includes at least one of text, two-dimensional image, and three-dimensional model, the terminal device can also obtain the AI algorithm corresponding to the target material from the server side. The corresponding special effect generation method will be introduced in combination with the following Figure 5A for introduction.
[0184] 501. The terminal device obtains multiple special effect description data input by the user.
[0185] 502. The terminal device sends the multiple special effect description data input by the user to the server.
[0186] For the introduction of steps 501 - 502, reference can be made to the description of steps 201 - 202 above, and details will not be elaborated here.
[0187] 503. The server generates the target material and the animation effect script corresponding to the target material according to the multiple special effect description data input by the user.
[0188] Among them, for the generation of the target material and the dynamic effect script corresponding to the target material, reference can be made to the relevant introduction in the above embodiments, which will not be elaborated here.
[0189] 504. The server generates an AI algorithm corresponding to the target material according to the content of the target material.
[0190] It should be noted that the AI algorithm corresponding to the target material is used to locate the display position of the target material.
[0191] Optionally, the server generating the AI algorithm corresponding to the target material according to the content of the target material may include: the server determines the type of the shooting object according to multiple special effect description data input by the user; and, according to the type of the shooting object and the content of the target material, determines the spatial position relationship between the target material and the shooting object; and, generates the AI algorithm corresponding to the target material according to the spatial position relationship.
[0192] Among them, the type of the shooting object may refer to the type of the entity recorded during photography or videography. Exemplarily, the type of the shooting object may include, but is not limited to, any one of the following: people, scenery, animals, still lifes, etc. The spatial position relationship between the target material and the shooting object is used to indicate the position relationship of the target material relative to the shooting object in the image frame.
[0193] Exemplarily, when the type of the shooting object is people and the content of the target material is a hat, the AI algorithm corresponding to the target material may be an AI algorithm for locating the user's head; when the type of the shooting object is people and the content of the target material is glasses, the AI algorithm corresponding to the target material may be an AI algorithm for locating the user's eyes; when some special effects of the target material need to be set, for example, the target material is a magic wand, and the magic wand needs to follow the user's hand, and when the position of the hand changes, the magic wand needs to change simultaneously with the changing position of the hand.
[0194] Among them, when the content of the target material is a hat and the corresponding AI algorithm is an AI algorithm for locating the user's head, the corresponding schematic diagram can be seen in Figure 5B , where, in Figure 5B In the leftmost picture, the user's head is not tilted, and the hat is displayed directly above the user's head. In Figure 5B In the middle picture, the user's head tilts to the right, and the hat follows the movement of the user's head to continue to be displayed directly above the user's head. In Figure 5B In the picture shown on the right, the user's head tilts to the left, and the hat follows the movement of the user's head to continue to be displayed directly above the user's head.
[0195] In some embodiments, an AI algorithm generation model can be deployed on the server. The server can generate an AI algorithm corresponding to the target material according to the content of the target material through the AI algorithm generation model, which is beneficial to improving the generation efficiency of the AI algorithm corresponding to the target material.
[0196] 505. The server sends the target material, the dynamic effect script corresponding to the target material, and the AI algorithm corresponding to the target material to the terminal device.
[0197] 506. The terminal device renders the target material and the dynamic effect script corresponding to the target material to generate special effects.
[0198] Regarding the relevant introduction of steps 505 - 506, reference can be made to the relevant descriptions in the above embodiments, which will not be elaborated here.
[0199] It can be understood that the terminal device obtains special effects by rendering the target material and the dynamic effect script.
[0200] 507. The terminal device acquires the user's captured content, and locates the display position of the target material in the captured content according to the AI algorithm corresponding to the target material, to obtain the captured content with special effects.
[0201] Among them, the user's captured content can be the user's current captured content or the user's previous captured content, which is not limited in the embodiments of the present application. It can be understood that when the user's captured content is the current captured content, the special effects are added during the user's shooting process; when the user's captured content is the user's previous captured content, the special effects are added during the process of the user editing the image or video.
[0202] It should be noted that the terminal device can record the captured content with special effects to obtain the captured content with special effects.
[0203] Exemplarily, Figure 5A the shown method for generating special effects can be applicable to Figure 6 the shown scenarios. As Figure 6 shown in the scenario diagram, it includes a terminal device 10, a server 20, and a user 30. Among them, a special effect understanding model, a 2D image generation model, a 3D model generation model, a text generation model, a dynamic effect generation model, and an AI algorithm generation model are deployed on the server 20.
[0204] Among them, user 30 can initiate a multi-round guided session with the special effect understanding model on the server 20 on the terminal device 10, so that the server 20 can obtain the user's special effect requirements through the special effect understanding model. The special effect requirements may include information such as the type of material, content attributes, and motion attributes. When the type of material includes a two-dimensional image, the server 20 can generate a target two-dimensional image according to the content attributes of the two-dimensional image through the 2D image generation model on it and send it to the terminal device 10; when the type of material includes a three-dimensional model, the server 20 can generate a target three-dimensional model according to the content attributes of the three-dimensional model through the 3D model generation model on it and send it to the terminal device 10; when the type of material includes text, the server 20 can generate a target text according to the content attributes of the text through the text generation model on it and send it to the terminal device 10. In addition, the server 20 can also generate a dynamic effect script corresponding to the material according to the motion attribute information of the material through the dynamic effect generation model on it and send it to the terminal device 10, and the server 20 can also generate an AI algorithm matching the material according to the content of the material through the AI algorithm generation model on it and send it to the terminal device 10. The terminal device 10 can render based on the generated material and the corresponding dynamic effect script to obtain a special effect, and obtain the user's captured content, and locate the display position of the material in the captured content according to the AI algorithm corresponding to the material, and obtain and output the captured content with the special effect.
[0205] By implementing Figure 5A the method shown, the output of the guiding problem of the terminal device can guide the user to accurately express their special effect requirements. The special effect element resource package obtained based on this special effect requirement can better meet the user's expectations, thereby meeting the user's need for personalized special effect customization. In addition, the terminal device can obtain not only the target material from the server side, but also the dynamic effect script corresponding to the target material, which is beneficial to enhancing the dynamic effect of the special effect. In addition, the terminal device can also obtain the AI algorithm for positioning the display position of the material from the server side, which can make the display of the special effect more intelligent.
[0206] Please refer to Figure 7 , Figure 7 which is a structural diagram of a special effect generation device disclosed in an embodiment of the present application. As Figure 7 shown, the special effect generation device may include a first acquisition unit 701 and a first generation unit 702, where:
[0207] The first acquisition unit 701 is configured to acquire multiple pieces of special effect description data input by the user, and output a guiding problem for each piece of special effect description data input by the user, where the guiding problem is used to guide the user to input the next piece of special effect description data;
[0208] The first acquisition unit 701 is further configured to obtain a special effect element resource package according to the multiple special effect description data, where the special effect element resource package includes special effect elements generated by the server according to the multiple special effect description data;
[0209] The first generation unit 702 is configured to render and generate a special effect based on the special effect element resource package.
[0210] In some embodiments, the special effect elements include target materials and animation scripts corresponding to the target materials. The specific manner in which the first acquisition unit 701 is configured to obtain a special effect element resource package according to the multiple special effect description data includes:
[0211] The first acquisition unit 701 is configured to send the multiple special effect description data to obtain the target material and the animation script corresponding to the target material from the server; and package the target material and the animation script corresponding to the target material to obtain the special effect element resource package.
[0212] In some embodiments, the special effect is obtained by rendering the target material and the animation script corresponding to the target material. The first acquisition unit 701 is further configured to obtain the AI algorithm corresponding to the target material from the server; and obtain the user's captured content, and locate the display position of the target material in the captured content according to the AI algorithm corresponding to the target material to obtain the captured content with the special effect.
[0213] In some embodiments, the first acquisition unit 701 is further configured to stop outputting guiding questions when receiving indication information input by the user for indicating the termination of guiding question output; or, stop outputting the guiding questions if no special effect description data input by the user for the most recent guiding question is received within a preset duration.
[0214] Please refer to Figure 8 , Figure 8 which is another structural diagram of the special effect generation device disclosed in the embodiments of the present application. As Figure 8 shown, the special effect generation device may include a second acquisition unit 801, a second generation unit 802, and a sending unit 803, where:
[0215] The second acquisition unit 801 is configured to receive multiple special effect description data sent by the user, generate guiding questions for each piece of special effect description data input by the user and send them, where the guiding questions are used to guide the user to input the next special effect description data;
[0216] The second generation unit 802 is configured to generate special effect elements according to the multiple special effect description data;
[0217] A sending unit 803, configured to send the special effect elements.
[0218] In a possible embodiment, the special effect elements include target materials. The specific manner in which the second generating unit 802 is configured to generate the target materials according to the multiple special effect description data may include:
[0219] A second generating unit 802, configured to obtain content attribute information and display information corresponding to the materials from the multiple special effect description data; wherein, the content attribute information corresponding to the materials is used to indicate the content characteristics of the materials, and the display information is used to indicate the display parameters of the materials; and, generate intermediate materials according to the content attribute information corresponding to the materials; and, adjust the target display parameters of the intermediate materials according to the display information corresponding to the materials to obtain the target materials.
[0220] In a possible embodiment, the specific manner in which the second generating unit 802 is configured to adjust the target display parameters of the intermediate materials according to the display information corresponding to the materials to obtain the target materials may include:
[0221] A second generating unit 802, configured to adjust the transparency parameter of the intermediate materials to obtain the target materials when the display information corresponding to the materials indicates that the materials are applied to the background position; and, adjust the size and resolution of the intermediate materials according to the resolution and screen size of the terminal device to obtain the target materials when the display information corresponding to the materials indicates that the materials are applied to the foreground position.
[0222] In a possible embodiment, the specific manner in which the second generating unit 802 is configured to generate intermediate materials according to the content attribute information corresponding to the materials may include: The second generating unit 802 is configured to generate initial materials according to the content attribute information corresponding to the materials; and, after performing sensitive content detection on the initial materials, obtain the intermediate materials, where the intermediate materials are materials that do not contain sensitive content.
[0223] In a possible embodiment, the special effect elements further include an animation script corresponding to the target materials. The specific manner in which the second generating unit 802 is configured to generate the animation script corresponding to the target materials according to the multiple special effect description data may include:
[0224] A second generating unit 802, configured to obtain motion attribute information corresponding to the target materials from the multiple special effect description data; wherein, the motion attribute information is used to indicate the motion characteristics of the target materials; and, obtain the animation script of the target materials according to the motion attribute information corresponding to the target materials.
[0225] Please refer to Figure 9 ,Figure 9 This is a structural diagram of a terminal device disclosed in an embodiment of the present application. As Figure 9 shown, the terminal device may include components such as a processor 901, a memory 902, a display unit 903, an input unit 904, a sensor 905, and an audio circuit 906.
[0226] Among them, the processor 901 is the control center of the terminal device, connecting various parts of the entire terminal device through various interfaces and lines. By running or executing software programs and / or modules stored in the memory 902, and by calling data stored in the memory 902, it executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 901 may include one or more processing units; optionally, the processor 901 may integrate an application processor, which mainly processes operating systems, user interfaces, and application programs, etc. Of course, it may also include other processors, which will not be listed one by one here.
[0227] The memory 902 can be used to store software programs and modules. The processor 901 executes various functional applications and data processing of the terminal device by running the software programs and modules stored in the memory 902. The memory 902 may mainly include a program storage area and a data storage area. Among them, the program storage area can store operating systems, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the terminal device (such as audio data, phone books, etc.). In addition, the memory 902 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0228] The display unit 903 can be used to display information input by the user, information provided to the user, and various menus of the terminal device. The display unit 903 may include a display panel. Optionally, a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc. may be used to configure the display panel. Further, a touch panel may cover the display panel. When the touch panel detects a touch operation on or near it, it transmits it to the processor 901 to determine the type of touch event. Subsequently, the processor 901 provides a corresponding visual output on the display panel according to the type of touch event. Among them, the touch panel and the display panel are not Figure 9 shown. The touch panel and the display panel can be implemented as two independent components to realize the input and input functions of the terminal device, or the touch panel and the display panel can be integrated to realize the input and output functions of the terminal device.
[0229] The input unit 904 can be used to receive input numerical or character information, and generate key signal inputs related to the user settings and function controls of the terminal device. Specifically, the input unit 904 can include a touch panel and other input devices. The touch panel, also known as a touch screen, can collect touch operations of a user thereon or nearby (such as operations of the user using any suitable object or accessory such as a finger or a stylus on or near the touch panel), and drive corresponding connection devices according to a preset program. In addition, multiple types such as resistive, capacitive, infrared, and surface acoustic wave can be used to implement the touch panel. Besides the touch panel, the input unit 904 can also include other input devices. Specifically, the other input devices can include, but are not limited to, one or more of function keys (such as volume control buttons, switch buttons, etc.), trackballs, joysticks, etc.
[0230] The terminal device can also include at least one sensor 905, such as a magnetometer, a gyroscope sensor, a motion sensor, and other sensors. Specifically, the magnetometer is used to determine the orientation of the terminal device, and the gyroscope sensor can be used to determine the motion posture of the terminal device, can be used for anti-shake during shooting, and can also be used for navigation and somatosensory game scenarios. As a type of motion sensor, the acceleration sensor can detect the magnitude of acceleration in all directions, and can detect the magnitude and direction of gravity when stationary, and can be used for applications that identify the posture of the terminal device, such as landscape / portrait screen switching, related games, and magnetometer posture calibration, etc.; as for other sensors such as a pressure gauge, a barometer, a hygrometer, a thermometer, an infrared sensor, etc. that the terminal device can also be configured with, they will not be elaborated here.
[0231] The audio circuit 906 can include a speaker and a microphone, and can provide an audio interface between the user and the terminal device. The audio circuit 906 can transmit the electrical signal after converting the received audio data to the speaker, and the speaker converts it into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 906 and then converted into audio data. After the audio data is output to the processor 901 for processing, it is sent through the video circuit to, for example, another device, or the audio data is output to the memory 902 for further processing.
[0232] Although not shown, the terminal device can also include a power supply and a camera. Optionally, the position of the camera on the terminal device can be front-facing or rear-facing, and the embodiments of the present application do not limit this.
[0233] It can be understood that the structure illustrated in the embodiments of the present application does not constitute a specific limitation on the terminal device. In other embodiments of the present application, the terminal device may include more or fewer components than those illustrated, or combine certain components, or split certain components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
[0234] In the embodiments of the present application, the processor 901 further has the following functions:
[0235] Obtain multiple pieces of special effect description data input by the user, and output guiding questions for each piece of special effect description data input by the user, where the guiding questions are used to guide the user to input the next piece of special effect description data;
[0236] According to the multiple pieces of special effect description data, obtain a special effect element resource package, where the special effect element resource package includes special effect elements generated by the server according to the multiple pieces of special effect description data;
[0237] Render based on the special effect element resource package to generate a special effect.
[0238] In the embodiments of the present application, the special effect elements include target materials and animation effect scripts corresponding to the target materials. The processor 901 further has the following functions:
[0239] Send the multiple pieces of special effect description data to obtain the target materials and the animation effect scripts corresponding to the target materials from the server;
[0240] Package the target materials and the animation effect scripts corresponding to the target materials to obtain the special effect element resource package.
[0241] In the embodiments of the present application, the special effect is obtained by rendering the target materials and the animation effect scripts corresponding to the target materials. The processor 901 further has the following functions:
[0242] Obtain the AI algorithm corresponding to the target materials from the server;
[0243] Obtain the content shot by the user, and locate the display position of the target materials in the shot content according to the AI algorithm corresponding to the target materials to obtain the shot content with the special effect.
[0244] In the embodiments of the present application, the processor 901 further has the following functions:
[0245] When receiving the indication information input by the user for indicating the termination of the output of the guiding questions, stop outputting the guiding questions;
[0246] Or,
[0247] If the special effect description data input by the user for the most recent guiding question is not received within the preset duration, stop outputting the guiding question.
[0248] Please refer to Figure 10 , Figure 10 which is a structural diagram of a server disclosed in an embodiment of the present application. As Figure 10 shown, the server includes a processor 1001 and a memory 1002; among them, for the introduction of the processor 1001 and the memory 1002, reference can be made to the above description of the processor 901 and the memory 902, which will not be elaborated here.
[0249] In the embodiment of the present application, the processor 1001 further has the following functions:
[0250] Receive multiple pieces of special effect description data input by the user sent by the terminal device, generate a guiding question for each piece of special effect description data input by the user and send it, where the guiding question is used to guide the user to input the next piece of special effect description data;
[0251] Generate special effect elements according to the multiple pieces of special effect description data;
[0252] Send the special effect elements.
[0253] In the embodiment of the present application, the processor 1001 further has the following functions:
[0254] Obtain the content attribute information and display information corresponding to the material from the multiple pieces of special effect description data; among them, the content attribute information corresponding to the material is used to indicate the content characteristics of the material, and the display information is used to indicate the display parameters of the material;
[0255] Generate an intermediate material according to the content attribute information corresponding to the material;
[0256] Adjust the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material.
[0257] In the embodiment of the present application, the processor 1001 further has the following functions:
[0258] When the display information corresponding to the material indicates that the material is applied to the background position, adjust the transparency parameter of the intermediate material to obtain the target material;
[0259] When the display information corresponding to the material indicates that the material is applied to the foreground position, adjust the size and resolution of the intermediate material according to the resolution and screen size of the terminal device to obtain the target material.
[0260] In the embodiment of the present application, the processor 1001 further has the following functions:
[0261] Generate an initial material according to the content attribute information corresponding to the said material;
[0262] After detecting sensitive content in the said initial material, obtain the said intermediate material, where the intermediate material is a material that does not contain sensitive content.
[0263] In the embodiments of the present application, the special effect element further includes an animation script corresponding to the target material, and the processor 1001 further has the following functions:
[0264] Obtain the motion attribute information corresponding to the target material from the said multiple special effect description data; where the motion attribute information is used to indicate the motion characteristics of the target material;
[0265] Obtain the animation script of the target material according to the motion attribute information corresponding to the target material.
[0266] The embodiments of the present application disclose a computer-readable storage medium, on which executable program code is stored. When the executable program code is executed by a processor, the method executed by the terminal device or server in the embodiments of the present application is implemented.
[0267] The embodiments of the present application disclose a computer program product. When the computer program product runs on a computer, the computer is enabled to implement the method executed by the terminal device or server in the embodiments of the present application.
[0268] The embodiments of the present application disclose an application publishing platform, which is used to publish a computer program product. Wherein, when the computer program product runs on a computer, the computer is enabled to implement the method executed by the terminal device or server in the embodiments of the present application.
[0269] It should be pointed out here that: the descriptions of the above storage medium and device embodiments are similar to the descriptions of the above method embodiments, and have beneficial effects similar to those of the method embodiments. For the technical details not disclosed in the storage medium, storage medium and device embodiments of the present application, please refer to the descriptions of the method embodiments of the present application for understanding.
[0270] It should be understood that the "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that the specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, the "in one embodiment" or "in an embodiment" or "in some embodiments" that appear throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the magnitude of the serial numbers of the above processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application. The serial numbers of the embodiments of the present application above are only for description and do not represent the advantages or disadvantages of the embodiments. The descriptions of the above embodiments tend to emphasize the differences between the embodiments, and their similarities or similarities can be referred to each other. For the sake of brevity, they will not be repeated herein.
[0271] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships, for example, object A and / or object B can represent: object A exists alone, object A and object B exist simultaneously, and object B exists alone. These three situations.
[0272] It should be noted that in this article, the term "comprise", "include" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, the element defined by the statement "including one..." does not exclude the existence of additional identical elements in the process, method, article or device including the element.
[0273] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only illustrative. For example, the division of the modules is only a logical function division, and there can be other division methods in actual implementation. For example, multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed with each other can be through some interfaces, and the indirect coupling or communication connection of the devices or modules can be electrical, mechanical or other forms.
[0274] The modules described above as separate components may or may not be physically separated, and the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network elements; some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0275] In addition, in each embodiment of this application, all the functional modules may be integrated in one processing unit, or each module may be a separate unit alone, or two or more modules may be integrated in one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of a combination of hardware and software functional units.
[0276] Those of ordinary skill in the art can understand that all or part of the steps of implementing the above method embodiments can be completed by hardware related to program instructions. The foregoing program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps including the above method embodiments; and the foregoing storage medium includes: removable storage devices, read-only memory (ROM), magnetic disks, or optical disks and other various media that can store program codes.
[0277] Alternatively, if the above-mentioned integrated unit of this application is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiments of this application essentially or the part that contributes to the related technology can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing an electronic device to execute all or part of the methods described in the various embodiments of this application. And the foregoing storage medium includes: removable storage devices, ROM, magnetic disks, or optical disks and other various media that can store program codes.
[0278] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0279] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0280] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0281] As described above, it is only the implementation mode of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should all be covered within the protection scope of this application. Therefore, the protection scope of this application shall be subject to the protection scope of the claimed rights.
Claims
1. A method for generating special effects, characterized in that: The method is applied to a terminal device, and the method comprises: Acquire multiple special effect description data input by the user, and output a guiding question for each special effect description data input by the user, wherein the guiding question is used to guide the user to input the special effect description data for the next time; According to the multiple special effect description data, a special effect element resource package is acquired, wherein the special effect element resource package includes special effect elements generated by the server according to the multiple special effect description data; Rendering is performed based on the special effect element resource package to generate special effects.
2. The method according to claim 1, characterized in that The special effect element includes a target material and an animation script corresponding to the target material, and obtaining a special effect element resource package according to the multiple special effect description data includes: Sending the multiple special effect description data to obtain a target material and a motion effect script corresponding to the target material from the server; The target material and the motion effect script corresponding to the target material are packaged to obtain the special effect element resource package.
3. The method according to claim 2, characterized in that The special effect is obtained by rendering the target material and the dynamic effect script corresponding to the target material, and the method further includes: Acquire the AI algorithm corresponding to the target material from the server; The user's shot content is obtained, and the target material is positioned at the display position of the shot content according to the AI algorithm corresponding to the target material to obtain the shot content with the special effects.
4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: receiving instruction information input by a user for instructing to terminate the output of the guidance question, and stopping the output of the guidance question; or, If the special effect description data for the most recent guidance question input by the user is not received within a preset time period, the output of the guidance question is stopped.
5. A method for generating special effects, characterized in that: The method is applied to a server, and the method comprises: Receive multiple special effect description data input by the user sent by the terminal device, generate and send a guiding question for each special effect description data input by the user, and the guiding question is used to guide the user to input the special effect description data for the next time; Generate special effect elements according to the multiple special effect description data; Send the special effect element.
6. The method according to claim 5, characterized in that The special effect element includes a target material, and generating the target material according to the multiple special effect description data includes: Acquire content attribute information and display information corresponding to the material from the multiple special effect description data; wherein the content attribute information corresponding to the material is used to indicate the content characteristics of the material, and the display information is used to indicate the display parameters of the material; generating intermediate material according to content attribute information corresponding to the material; According to the display information corresponding to the material, the target display parameters of the intermediate material are adjusted to obtain the target material.
7. The method according to claim 6, characterized in that The step of adjusting the target display parameters of the intermediate material according to the display information corresponding to the material to obtain the target material includes: In a case where the display information corresponding to the material indicates that the material is applied to a background position, adjusting a transparency parameter of the intermediate material to obtain the target material; In a case where the display information corresponding to the material indicates that the material is applied to the foreground position, the size and resolution of the intermediate material are adjusted according to the resolution and screen size of the terminal device to obtain the target material.
8. The method according to claim 6, characterized in that: The step of generating the intermediate material according to the content attribute information corresponding to the material includes: generating an initial material according to content attribute information corresponding to the material; After the initial material is subjected to sensitive content detection, the intermediate material is obtained, and the intermediate material is material that does not contain sensitive content.
9. The method according to claim 6, characterized in that The special effect element also includes a motion effect script corresponding to the target material, and the motion effect script corresponding to the target material is generated according to the multiple special effect description data, including: Acquire motion attribute information corresponding to the target material from the multiple special effect description data; wherein the motion attribute information is used to indicate the motion characteristics of the target material; According to the motion attribute information corresponding to the target material, the motion effect script of the target material is obtained.
10. A device for generating special effects, characterized in that: The device is in a terminal device, and includes: A first acquisition unit is used to acquire multiple special effect description data input by the user, and output a guiding question for each special effect description data input by the user, wherein the guiding question is used to guide the user to input the special effect description data for the next time; The first acquisition unit is further configured to acquire a special effect element resource package according to the multiple special effect description data, wherein the special effect element resource package includes special effect elements generated by the server according to the multiple special effect description data; The first generating unit is used to generate special effects by rendering based on the special effect element resource package.
11. A device for generating special effects, characterized in that: The device is located in a server, and comprises: A second acquisition unit is used to receive multiple special effect description data sent by the user, generate and send a guiding question for each special effect description data input by the user, and the guiding question is used to guide the user to input the special effect description data next time; A second generating unit, configured to generate special effect elements according to the multiple special effect description data; A sending unit is used to send the special effect element.
12. An electronic device, characterized in that: include: A memory storing executable program code; and a processor coupled to the memory; The processor calls the executable program code stored in the memory, and when the executable program code is executed by the processor, the processor implements the method according to any one of claims 1-4 or 5-9.
13. A computer-readable storage medium having executable program code stored thereon, characterized in that: When the executable program code is executed by a processor, the method described in any one of claims 1-4 or 5-9 is implemented.
Citation Information
Patent Citations
Special effect generation method and device, electronic equipment and storage medium
CN117041674A
Special effect processing method and device, electronic equipment and storage medium
CN117440206A
Text generation method, electronic equipment and storage medium
CN118095220A
Special effect video generation method and device, electronic equipment and readable storage medium
CN118138830A
Special effect editing method and device, equipment and storage medium
CN118172443A