Special effect display method and device, electronic equipment and storage medium
By acquiring custom asset files and loading a list of relationships, video effects images based on relationship information are generated, solving the problems of high development costs and poor flexibility in existing technologies, and realizing the diversity and flexibility of target effects.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING ZITIAO NETWORK TECH CO LTD
- Filing Date
- 2023-08-18
- Publication Date
- 2026-05-01
AI Technical Summary
Existing technologies for video effects based on relational information require obtaining relevant information from the server, resulting in high development costs and poor flexibility of use, making it impossible for general users to personalize their designs.
By obtaining custom asset files, loading a list of relationships using a resource reference interface, and retrieving relationship information from the server to generate special effects images, the steps of obtaining user information are decoupled, reducing design difficulty and cost.
It achieves diversity and flexibility in target effects, reduces development costs, and increases the possibility of user-customized designs.
Smart Images

Figure CN119496959B_ABST
Abstract
Description
Special effects display methods, devices, electronic equipment and storage media Technical Field
[0001] This disclosure relates to the field of Internet technology, and in particular to a special effects display method, apparatus, electronic device, and storage medium. Background Technology
[0002] Currently, adding virtual objects, pre-shot photos, and other virtual elements to videos is a common video effects feature in video applications and platforms. Building upon this, by invoking relational information during the video effects implementation process to generate video effects based on those relationships, the social attributes of video effects can be further enhanced.
[0003] In existing technologies, video effects based on relational information require obtaining the corresponding relational information from the server to be implemented. Therefore, video effects based on relational information need to bind the relational information acquisition interface on the server side at the code level. This means that such video effects based on relational information can only be designed by video application and platform developers, and cannot be customized by general users. Consequently, such video effects suffer from high development costs and poor flexibility of use. Summary of the Invention
[0004] This disclosure provides a special effects display method, apparatus, electronic device, and storage medium to overcome the problems of high development costs and poor usage flexibility in video special effects based on correlation information.
[0005] In a first aspect, embodiments of this disclosure provide a method for displaying special effects, including:
[0006] In response to the triggering of a target effect, a corresponding custom asset file is retrieved. The target effect is used to display at least one frame of an effect image, which is generated based on the current user's association information. This association information represents the user identifiers of associated users who are related to the current user. The custom asset file is loaded through the resource reference interface of the target effect to obtain a list of associations corresponding to the target effect. Based on this list, corresponding association information is retrieved from the server, and a corresponding effect image is generated based on this association information.
[0007] Secondly, embodiments of this disclosure provide a special effects display device, including:
[0008] The acquisition module is used to acquire the corresponding custom asset file in response to the triggering of the target effect. The target effect is used to display at least one frame of effect image. The effect image is an image generated based on the association information of the current user. The association information represents the user identifier of the associated user who has an association relationship with the current user.
[0009] The loading module is used to load the custom asset file through the resource reference interface of the target effect and obtain the list of associations corresponding to the target effect;
[0010] The generation module is used to obtain the corresponding association information from the server according to the association list, and generate the corresponding special effects image based on the association information.
[0011] Thirdly, embodiments of this disclosure provide an electronic device, including: a processor and a memory;
[0012] The memory stores computer-executed instructions;
[0013] The processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the special effects display method as described in the first aspect and various possible designs of the first aspect.
[0014] Fourthly, embodiments of this disclosure provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the special effects display method described in the first aspect and various possible designs of the first aspect.
[0015] Fifthly, embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the special effects display method described in the first aspect and various possible designs of the first aspect.
[0016] The special effects display method, apparatus, electronic device, and storage medium provided in this embodiment obtain a corresponding custom asset file in response to the triggering of a target special effect. The target special effect displays at least one frame of special effect image, which is generated based on the current user's association relationship information. The association relationship information represents the user identifiers of associated users related to the current user. The custom asset file is loaded through the resource reference interface of the target special effect to obtain a list of association relationships corresponding to the target special effect. Based on the list of association relationships, corresponding association relationship information is obtained from the server, and a corresponding special effect image is generated based on the association relationship information. After triggering the target special effect based on the association relationship information, the custom asset file is loaded, and its capabilities are used to obtain the list of association relationships corresponding to the target special effect. User information is then obtained from the server based on the association relationship list, thereby generating the special effect image corresponding to the target special effect based on the user information. Because the use of a custom asset file decouples the step of obtaining user information, the target special effect does not need to consider the specific implementation method of obtaining association relationship information during the design phase. This reduces the design difficulty and development cost of target special effects based on association relationship information, and improves the diversity and flexibility of target special effects. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 is an application scenario diagram of the special effects display method provided in the embodiments of this disclosure;
[0019] Figure 2 is a flowchart illustrating the special effects display method provided in this embodiment of the present disclosure;
[0020] Figure 3 is a flowchart of the specific implementation steps for obtaining the corresponding association information from the server based on the association list;
[0021] Figure 4 is a schematic flowchart of the special effects display method provided in the embodiments of this disclosure.
[0022] Figure 5 is a schematic diagram of the mapping relationship between a custom asset file and a special effects image provided in an embodiment of this disclosure;
[0023] Figure 6 is a flowchart of the specific implementation steps of step S203 in the embodiment shown in Figure 4;
[0024] Figure 7 is a schematic diagram of a first relational data provided in an embodiment of this disclosure;
[0025] Figure 8 is a schematic diagram of another type of first relational data provided in an embodiment of this disclosure;
[0026] Figure 9 is a flowchart of the specific implementation steps of step S205 in the embodiment shown in Figure 4;
[0027] Figure 10 is a schematic diagram of target association information provided in an embodiment of this disclosure;
[0028] Figure 11 is a structural block diagram of the special effects display device provided in the embodiments of this disclosure;
[0029] Figure 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure;
[0030] Figure 13 is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this disclosure, and not all embodiments. Based on the embodiments of this disclosure, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this disclosure.
[0032] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this disclosure are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0033] The application scenarios of the embodiments of this disclosure are explained below:
[0034] Figure 1 illustrates an application scenario of the special effects display method provided in this embodiment. This method can be applied to applications with video effects editing capabilities, and more specifically, to the editing and use of video effects based on relational information. The executing entity in this embodiment can be a terminal device running the aforementioned application with video effects editing capabilities, a server running the server corresponding to the aforementioned application, or other electronic devices performing similar functions. Referring to Figure 1, taking a terminal device as an example, the terminal device loads a video effect within the application based on the user's operation. This video effect can be a custom effect created through other applications or platforms. Then, the terminal device triggers the video effect, inserting the effect image into the initial video, thereby generating a video with the effect image. The effect image generated by the video effect is based on the relational information of the current user (e.g., a user logged into the current application). Specifically, the effect image is generated, for example, based on related images and identifiers of related users followed by the current user. This relational information needs to be downloaded from the server side based on the user's request and permission during the process of triggering the custom effect.
[0035] In existing technologies, video effects based on relationship information require obtaining the corresponding relationship information from the server. Therefore, these effects necessitate binding a server-side relationship information retrieval interface to the code, allowing the necessary user information to be retrieved when the effect is triggered. However, binding this interface to the video effect at the code level is complex and has a high operational barrier. Consequently, such video effects are typically designed only by developers of video editing applications and platforms, rather than by general users, leading to high development costs and poor flexibility in their use.
[0036] This disclosure provides a special effects display method to solve the above problems.
[0037] Referring to Figure 2, which is a flowchart illustrating a special effects display method provided in this embodiment, the method can be applied to a terminal device. The special effects display method includes:
[0038] Step S101: In response to the triggering of the target effect, obtain the corresponding custom asset file, wherein the target effect is used to display at least one frame of effect image, the effect image is an image generated based on the current user's association relationship information, and the association relationship information represents the user identifier of the associated user who has an association relationship with the current user.
[0039] For example, referring to the application scenario diagram shown in Figure 1, after the terminal device runs an application with video editing functions, it first loads the original video to be processed. Then, based on user instructions, it selects the corresponding target effect to load the target effect into the original video, generating a video containing the effect (i.e., the target video referred to in the following part of this embodiment). In this embodiment, the target effect is used to display at least one frame of effect image in the original video. Specifically, this includes displaying a single frame image in the original video, such as a PNG image, or displaying a dynamic image in the original video, such as a sequence of frames. Further, the effect image generated by the target effect is generated based on the current user's association information, where the association information represents the user identifiers of associated users who are related to the current user. Here, the current user is, for example, a user logged into the aforementioned application or platform. The associated users are users who are related to the current user, such as users who have registered on the aforementioned application or platform and follow the current user; users who have registered on the aforementioned application or platform and are followed by the current user; or users who have registered on the aforementioned application or platform and become followers of the current user. Besides the above implementation methods, the specific definition and implementation of associated users can also include other methods, which can be set according to business needs and are not specifically limited here. The user identifiers of associated users include, for example, the associated user's (on the aforementioned application or platform) registered name, registration ID, user identification code, nickname, and avatar.
[0040] Furthermore, after the target effect is triggered, in order to generate the aforementioned effect image based on the current user's association information, the terminal device needs to obtain the association information corresponding to the current user. The terminal device achieves this by identifying and obtaining the custom asset file corresponding to the target effect. Specifically, the terminal device can determine the corresponding effect file or folder based on the name (unique identifier) of the target effect, and then obtain the custom asset file corresponding to the target effect from the effect file or folder. This custom asset file is a data format obtained by encapsulating it based on a specific framework. It has a specific data structure and file extension. By loading and running this custom asset file, the purpose of obtaining user information can be achieved. The compilation method and data structure of the custom asset file are not specifically limited in this embodiment. The application running on the terminal device, after executing the target effect (corresponding program script), can load and utilize the custom asset file, thereby achieving the purpose of obtaining user information.
[0041] In one possible implementation, the target effect is a user-defined effect. This means that the effect developer can use other effects creation software to create effect templates with custom styles and effects, tailored to their needs and preferences. During the development of this target effect, the developer sets the pre-generated custom asset file in the target effect's project file, thus binding the target effect to the custom asset file. This ensures that when the target effect is triggered subsequently, the terminal device accurately obtains and calls the corresponding custom asset file. This custom asset file essentially encapsulates the "acquiring relationship information function." Because the effect developer can generate the target effect image based on relationship information simply by setting the custom asset file, without needing to implement the "acquiring relationship information function" at the code level, the development difficulty of target effects that generate effect images based on relationship information is greatly reduced. This results in "social relationship effects" (i.e., target effects) with this program structure and implemented based on it having greater diversity and flexibility.
[0042] Step S102: Load the custom asset file through the resource reference interface of the target effect, obtain the list of associations corresponding to the target effect, and obtain the corresponding association information from the server based on the list of associations.
[0043] For example, after obtaining the custom asset file, the resource reference interface of the target effect is used to load the custom asset file, thereby enabling its utilization. Specifically, this involves obtaining data from the custom asset file, executing the processing logic within the custom asset file, obtaining a list of relationships corresponding to the target effect, and retrieving relevant relationship information from the server based on this list, such as the nicknames and avatars of associated users. The relationship list is a collection of relationship information corresponding to multiple associated users. The number of relationships in the relationship list is determined after loading the custom asset file, using the data contained within it; that is, the number of relationships in the relationship list is determined based on the custom asset file.
[0044] In one possible implementation, as shown in Figure 3, the specific implementation of obtaining the corresponding association information from the server based on the association list in step S102 includes:
[0045] Step S1021: Obtain the target association type.
[0046] Step S1022: Determine the target association list from at least two association lists.
[0047] Step S1023: Based on the target association list, obtain the corresponding association information from the server.
[0048] For example, the association type represents the category of the relationship between the current user and its corresponding associated users. For example, it includes "following user", which means that the associated user corresponding to the association information in the association list follows the current user; it also includes "followed user", which means that the associated user corresponding to the association information in the association list is followed by the current user; and it also includes "fan user", which means that the associated user corresponding to the association information in the association list is a fan of the current user.
[0049] Correspondingly, different association types have corresponding association lists. For example, for "following users," there is an association list list_1, and for "followed users," there is an association list list_2. The list type (i.e., information that corresponds one-to-one with the association type) can be obtained by reading the type attribute of the association list. Further, in one possible implementation, the association type can be fixed to the target effect. For example, target effect A corresponds to the association type "followed users," and target effect B corresponds to the association type "followers." In another possible implementation, the association type can be set by the user before triggering the target effect. Regardless of the implementation method, after the target effect is triggered, the terminal device can obtain a type identifier representing the association type, and then determine the target association type based on this type identifier. Then, from the multiple association lists obtained by loading custom asset files through the resource reference interface, the target association list corresponding to the target association type is obtained. Finally, based on the record data in the target association list, the corresponding association information is retrieved from the corresponding storage location on the server. In one possible implementation, the record data in the target association list contains the server address and storage location of the corresponding association information. By downloading the data using the server address and storage location of the association information in the record data, the association information can be obtained.
[0050] Step S103: Generate the corresponding special effects image based on the correlation information.
[0051] For example, after obtaining the association information, corresponding processing can be performed based on the association information to generate the corresponding special effects image. Specifically, for example, if the association information is an associated user avatar, processing steps such as downsampling, blurring, or adding virtual item stickers can be performed on the associated user avatar to generate the special effects image. As another example, if the association information is a username (characters), the username can be rendered as a nickname image, and then the nickname image can be preliminarily processed as described above to generate the special effects image. The above two implementation methods can be executed individually or simultaneously, and this embodiment does not impose specific limitations.
[0052] Optionally, the generated special effects image can then be rendered into the original video to preview the special effects of the target video, or the target video containing the aforementioned special effects image can be output, thus adding the target special effects to the original video. Optionally, the generated target video can then be further processed, such as being published to a server (i.e., published to an application or platform), or being saved or shared.
[0053] In this embodiment, in response to the triggering of a target effect, a corresponding custom asset file is obtained. The target effect displays at least one frame of an effect image, which is generated based on the current user's association information. The association information represents the user identifiers of associated users related to the current user. The custom asset file is loaded through the target effect's resource reference interface to obtain a list of associations corresponding to the target effect. Based on this list, the corresponding association information is retrieved from the server, and the corresponding effect image is generated. After triggering a target effect based on association information, the custom asset file is loaded, and its capabilities are used to obtain the list of associations corresponding to the target effect. User information is then retrieved from the server based on this list, and the effect image is generated based on the user information. Because the use of a custom asset file decouples the user information retrieval step, the target effect does not need to consider the specific implementation of retrieving association information during the design phase. This reduces the design difficulty and development cost of target effects based on association information, and increases the diversity and flexibility of target effects.
[0054] Referring to Figure 4, which is a flowchart illustrating the special effects display method provided in this embodiment, this embodiment further refines step S102 based on the embodiment shown in Figure 2. The special effects display method includes:
[0055] Step S201: In response to the triggering of the target effect, obtain the corresponding custom asset file, wherein the target effect is used to display at least one frame of effect image, the effect image is an image generated based on the current user's association relationship information, and the association relationship information represents the user identifier of the associated user who has an association relationship with the current user.
[0056] Step S202: Through the resource reference interface of the target effect, load the custom asset file from the project file corresponding to the target effect to obtain at least one associated resource object and the image style corresponding to the associated resource object. The associated resource object is used to provide associated information for the effect image of the corresponding image style.
[0057] For example, a target effect corresponds to a project containing multiple project files. A custom asset file is pre-installed within this project. After the target effect is triggered, the custom asset file is loaded from the project files through the target effect's resource reference interface. That is, in the target effect's program structure, the execution program of the target effect and the program that obtains user information are decoupled. The target effect loads the custom asset file through the resource reference interface, thereby obtaining the association information required for subsequently generating the effect image. Specifically, after loading the custom asset file, an association resource object is generated within the terminal device. This association resource object can be an instantiation of a class from the custom asset file. This association resource object corresponds to image style attributes. By using this association resource object, the purpose of providing association information for the effect image of the corresponding image style is ultimately achieved. Then, based on the association resource object and the corresponding image style, a list of associations corresponding to the target effect is obtained.
[0058] For example, the image styles corresponding to the associated resource objects include at least single-frame images and dynamic images, where a single-frame image is, for example, a PNG image, and a dynamic image is, for example, a sequence of frames. That is, through the associated resource objects corresponding to the above image styles, corresponding types of special effects images can be generated. Figure 5 is a schematic diagram of the mapping relationship between a custom asset file and a special effects image provided in an embodiment of this disclosure. As shown in Figure 5, after the custom asset file A is loaded, an associated resource object A_1 and a corresponding image style mod_1 (shown as mod_1 in the figure) are obtained. The image style mod_1 represents a single-frame image. Then, based on the associated resource object A_1 and the corresponding image style mod_1, a corresponding association list list_1 is generated. Finally, based on the association list list_1, association information info_1 that meets the generation requirements of a single-frame image is obtained from the server. The system generates a single-frame image P1 (P1.png), which is the special effects image corresponding to custom asset file A. Meanwhile, after custom asset file B is loaded, it obtains a relational resource object B_1 and a corresponding image style mod_2. This image style mod_2 represents a sequence frame (i.e., a dynamic image containing multiple frames). Then, based on the relational resource object B_1 and the corresponding image style mod_2, a corresponding relational list list_2 is generated. Next, based on this relational list list_2, the system retrieves the relational information info_2 that meets the generation requirements of the sequence frame from the server and generates the corresponding sequence frame P2 (png-seq, i.e., a collection of multiple png images), which is the special effects image corresponding to custom asset file B. The single-frame image P1 and the sequence frame P2 are the special effects images corresponding to the target special effects.
[0059] Furthermore, the image style corresponding to the associated resource object can be determined based on the file extension of the custom asset file when loading it. The following section details the specific steps for obtaining the list of relationships corresponding to the target effect based on the associated resource object and its corresponding image style.
[0060] Step S203: When the image style is a single-frame image, access the first attribute of the associated resource object to obtain the first relationship data indicating the associated user. The first relationship data includes a first identifier and a corresponding second identifier, wherein the first identifier represents the associated user name of the associated user and the second identifier represents the associated user avatar of the associated user.
[0061] For example, the associated resource object has multiple accessible attributes, which can be accessed through corresponding preset interfaces. When the image style is a single-frame image, accessing the first attribute of the associated resource object yields first relationship data representing the association information. This first relationship data is the user information required to generate the special effects image of the single-frame image class. Specifically, the first relationship data includes a first identifier and a corresponding second identifier, wherein the first identifier represents the associated user's associated user name, and the second identifier represents the associated user's associated user avatar.
[0062] For example, as shown in FIG6, the specific implementation of step S203 includes:
[0063] Step S2031: Obtain at least one first identifier and at least one second identifier by accessing the first attribute of the associated resource object.
[0064] Step S2032: Pair and store the first and second identifiers with the same identification information to obtain a pairing table containing at least one pairing record.
[0065] Figure 7 is a schematic diagram of a first relationship data provided in an embodiment of this disclosure. As shown in Figure 7, the first relationship data consists of a pairing table containing N pairing records, namely pairing records rec_1 to rec_N. Each pairing record includes a first identifier and a corresponding second identifier. The first identifier is the nickname of the associated user (e.g., User_1 and User_2 shown in the figure), and the second identifier is the avatar of the associated user. Each pairing record corresponds to a unique identification information to represent a user. When accessing the first attribute of the associated relationship resource object, the associated relationship resource object obtains at least one first identifier and at least one second identifier by accessing the server. Then, it is paired based on the identification information corresponding to the first identifier and the identification information corresponding to the second identifier. Those with the same identification information are grouped into a pairing record, thereby generating the above-mentioned pairing table.
[0066] For example, in one possible implementation, after obtaining the pairing table, the first relationship data can be directly generated based on the pairing table. That is, the first relationship data only includes paired first and second identifiers. Subsequently, when generating special effects images based on the first relationship data, special effects images that simultaneously possess both the first identifier (user nickname) and the second identifier (associated user avatar) can be generated. In another possible implementation, a non-pairing table can be further obtained, and the first relationship data can be generated jointly based on both the pairing table and the non-pairing table.
[0067] Step S2033: Store the first identifier or the second identifier that do not have the same identification information independently to obtain a non-pairing table.
[0068] Step S2034: Generate the first relation data based on the paired table and the unpaired table.
[0069] For example, similarly, based on the identification information, while obtaining paired first and second identifiers, unpaired first or second identifiers are converted into paired records containing only one identifier (first or second identifier), thus obtaining a non-paired table. Then, the paired and non-paired tables are combined to generate first relationship data. When generating special effects images based on the first relationship data, special effects images containing only the first identifier (user nickname) or the second identifier (associated user avatar) can be generated. Figure 8 is a schematic diagram of another type of first relationship data provided in this embodiment. As shown in Figure 8, the first relationship data consists of a paired table and a non-paired table. The specific meaning of the paired table has been described in the embodiment shown in Figure 7 and will not be repeated here. The non-paired table includes paired records n_rec_1 to n_rec_M, each paired record containing only the first identifier (user nickname) or the second identifier (associated user avatar). For example, as shown in the figure, pairing record n_rec_1 contains the user nickname User_3 but not the associated user avatar (represented by NULL, the same below); while pairing record n_rec_2 contains the associated user avatar but not the user nickname.
[0070] Subsequently, in one possible implementation, the combination of the paired table and the unpaired table constitutes the first relationship data. Based on each paired record in this first relationship data, a list of relationships corresponding to the target effect can be generated.
[0071] Step S204: When the image style is a dynamic image, access the second attribute of the associated resource object to obtain the second relationship data indicating the associated user. The second relationship data includes a preset number of third identifiers, the third identifiers correspond to the user information of the associated user, and the preset number is the number of image frames of the dynamic image.
[0072] For example, in another possible implementation, when the image style of the associated resource object is a dynamic image, such as a sequence of frames, the associated resource object has a second attribute. Accessing the second attribute of the associated resource object yields second relationship data. The second relationship data includes a preset number of third identifiers representing the number of image frames of the dynamic image. For example, the third identifier represents an image containing the associated user name and the associated user avatar; that is, each third identifier corresponds to one relationship information. The number of third identifiers in the second relationship data (the preset number) is the number of image frames corresponding to the dynamic image (the sequence length in the sequence of frames). The specific implementation of accessing the second attribute of the associated resource object to obtain the second relationship data is similar to the specific implementation of accessing the first attribute of the associated resource object to obtain the first relationship data, and can be referred to the previous section for details, which will not be repeated here.
[0073] Furthermore, in one possible implementation, after obtaining the second relationship data, a list of related relationships corresponding to the target effect can be generated based on the second relationship data. The specific implementation method is similar to the method of generating a list of related relationships based on the first relationship data, and will not be elaborated here.
[0074] Step S205: Determine the list of relationships based on the first relationship data and / or the second relationship data.
[0075] For example, based on the above description, the association list can be generated independently based on the first relationship data or the second relationship data. The specific implementation depends on the custom asset file corresponding to the target effect. Specifically, for example, if the target effect corresponds to (generates) only one effect image, then the corresponding first relationship data or second relationship data is obtained according to the image type of that effect image, i.e., the image style (single frame image or sequence frame) corresponding to the association resource object. Then, based on the obtained first relationship data or second relationship data, the corresponding association list is obtained to realize the corresponding type of effect image.
[0076] For example, in another possible implementation, when the target effect corresponds to (generates) more than one effect image, and the image styles corresponding to the effect images are different, the association list can be jointly determined based on the first relationship data and the second relationship data.
[0077] For example, as shown in FIG9, the specific implementation of step S205 includes:
[0078] Step S2051: Determine the number of target associated users based on the first relationship data and the second relationship data.
[0079] Step S2052: Based on the number of users associated with the target, obtain a list of relationships corresponding to the target effect.
[0080] First, based on the first and second relationship data, the target number of associated users is determined. This target number of associated users is the number of users set in the relationship list. For example, if the current user, User_1, has 100 associated users, based on the first and second relationship data, 10 of these associated users are identified, generating the corresponding relationship list. Subsequently, the relevant user information is retrieved, and a special effects image is generated. In the example above, 10 represents the target number of associated users. Then, based on the determined target number of associated users, the target number of associated users is selected from all the current user's associated users in a specific way, generating the relationship list corresponding to the target special effects.
[0081] For example, the specific implementation of step S2051 includes:
[0082] Step S2051A: Obtain the first number of associated users. The first number of associated users is the larger of the capacity of the pairing table corresponding to the first relationship data and the preset number corresponding to the second relationship data.
[0083] Step S2051B: Determine the target number of associated users based on the sum of the number of first associated users and the capacity of the non-paired table corresponding to the first relationship data.
[0084] The pairing table corresponding to the first relationship data includes paired records where user names and associated user avatars are stored together. The capacity of this pairing table is the number of paired records where user names and associated user avatars are stored together. The preset quantity corresponding to the first relationship data is the number of image frames corresponding to the dynamic image. The capacity of the pairing table and the preset quantity are the number of associated users corresponding to each of the two image styles, containing complete relationship information (user name plus associated user avatar). The larger of the two is determined as the first associated user quantity, thus obtaining the amount of relationship information required to cover the generation of special effects images corresponding to the two image styles. Then, the capacity of the non-pairing table corresponding to the first relationship data is obtained, for example, the second associated user quantity. Finally, the sum of the first and second associated user quantities is calculated to obtain the target associated user quantity. Among them, the non-pairing table corresponding to the first relationship data contains non-paired user information (i.e., individual user names or associated user avatars). The above-mentioned non-paired user information needs to be used when generating special effects images of the single-frame image type. Therefore, the final target associated user quantity (generated relationship list) needs to be able to cover this part of the user information.
[0085] The target number of associated users obtained in this embodiment is equivalent to the minimum number of associated users required to create a special effects image that can achieve the two image styles. Compared to generating an association list using all associated users of the current user, the association list generated based on the target number of associated users occupies less memory and system resources, and improves the loading speed of the special effects image.
[0086] It should be noted that, based on the previous introduction, since the first relation data and the second relation data are determined according to the associated resource objects and the corresponding image styles, the above steps S203-S205 are the specific implementation methods for determining the corresponding target associated user number based on the associated resource objects and the corresponding image styles.
[0087] For example, after obtaining the target number of associated users, from all associated users, the associated users of the target number of associated users are selected randomly or in other specific ways, such as parameters such as the intimacy (between the current user and the associated user) and the frequency of communication, to obtain a list of association relationships. The specific implementation method has been introduced in the previous embodiment section and will not be repeated here.
[0088] Step S206: Obtain the corresponding association information from the server based on the association list.
[0089] Step S207: Generate the corresponding special effects image based on the correlation information.
[0090] For example, after obtaining the list of association relationships, the server downloads the corresponding association relationship information for the associated users represented by the association relationship list, and then generates the corresponding special effects image based on the association relationship information. The specific implementation method has been described in the previous embodiment section and will not be repeated here. In one possible implementation method, if a valid image is not obtained using the custom asset file after the above steps, for example, if the current user has no associated users, or the total number of associated users of the current user is too small, then a preset fallback image is used to replace and generate the corresponding special effects image. The specific implementation steps are described in detail.
[0091] Optionally, after generating the corresponding special effects image, the following may also be included:
[0092] Step S208: Generate the target video based on the special effects image and publish the target video.
[0093] Step S209: After the target video is published, obtain at least one target association information. The target association information is the association information corresponding to the target special effects image displayed in the target display pose in the target video.
[0094] For example, after obtaining the special effects image based on the above steps, rendering the special effects image onto the original video yields the corresponding target video. The specific implementation process is existing technology and will not be elaborated further. Subsequently, in response to user instructions or pre-defined logic of the application, the target video can be further published, that is, published to the application or platform, allowing other users to view the target video. Then, the terminal device obtains a target special effects image from the special effects images displayed in the target video. The target special effects image is the special effects image displayed in a specific target display pose, and the association information corresponding to the target special effects image is the target association information.
[0095] Specifically, the steps of the above embodiments can be applied to the following specific application scenarios:
[0096] In scenarios such as platform user lotteries and random selection of lucky fans, based on the aforementioned target special effects, it is possible to dynamically display multiple single-frame images or a sequence of frames within the target video. Specifically, special effect images generated from the association information of different associated users (e.g., images containing associated user avatars and nicknames) will move and / or rotate within the target video. Finally, from among the multiple special effect images within the target video, a target special effect image is randomly selected and displayed in a specific position and posture, indicating that the special effect image (corresponding to the associated user) has been selected. This enables activities such as platform user lotteries and random selection of lucky fans. The "randomly selected" associated user is the target associated user, and the corresponding association information of the target associated user is the target association information.
[0097] Figure 10 is a schematic diagram of target association information provided in an embodiment of this disclosure. As shown in Figure 9, when target effects are added to the original video, the generated target video contains a cube-shaped virtual prop. Simultaneously, the effect images generated based on the association information include the avatars of six associated users, respectively set on the six faces of the virtual prop (only three faces are shown in the figure, corresponding to the association information User_1, User_2, and User_3). When the above target effect is triggered, the virtual prop appears in the video and randomly rolls and moves, simulating real physical collision laws. The effect images on the six faces of the virtual prop also rotate and move accordingly until the virtual prop stops. The association information corresponding to the effect image facing the camera (shown as User_3 in the figure) is then determined as the target association information. The above process is a graphical random extraction process; the specific implementation principle and method will not be elaborated further.
[0098] It should be noted that in the above-mentioned scenarios of random selection activities such as platform user lottery and random selection of lucky fans, there are various specific implementation processes for randomly selecting one target platform user (target associated user) from multiple platform users (associated users). For example, the random selection process and special effects styles can all be set as needed. The above embodiments are only used to illustrate the method of determining target association information.
[0099] Step S210: Send hit information to the server based on the target association information. The hit information is used to enable the server to send a notification message to the target associated user corresponding to the target association information.
[0100] For example, the randomly selected result, i.e. the target user information determined in the above steps, is then notified to the corresponding target associated user. Specifically, the terminal device sends hit information to the server, and the hit information contains an identifier indicating the target user information. The server sends a notification message to the corresponding target associated user based on the hit information. After receiving the notification message, the target associated user displays or broadcasts it to achieve the purpose of hit notification.
[0101] For example, the hit information includes at least one of the following: the current user's identification identifier, the target effect's identification identifier, and the target video's release time.
[0102] In this embodiment, in a randomly selected scenario, by sending the random selection result based on the target effect to the hit user (target-related user), the social attributes of the target effect are improved, thus enhancing the social effect.
[0103] Alternatively, in another possible implementation, after step S202, the following steps are also included:
[0104] Step S208A: Obtain the notification switch status by loading the custom asset file.
[0105] Step S208B: When the switch state is the target state, execute step S209.
[0106] For example, on the other hand, by loading a custom asset file, the notification switch status can be obtained. The notification switch is a switch module used to set whether to send a notification to the target associated user (hit user) in the above steps. In one possible implementation, the notification switch has a first state and a second state, where the first state indicates that the function is on and the second state indicates that the function is off. In this case, the first state is the target state. When the switch state is the first state, step S210 is executed, that is, the hit information is sent to the server based on the target association information; otherwise, when the switch state is the second state, the process ends and no more hit messages are sent.
[0107] The notification switch status can be a parameter set based on user instructions. After loading the custom asset file, the notification switch status can be obtained through the interface provided by the associated resource unit, and the above judgment steps can be executed. That is, the custom asset file provides the ability to obtain the notification switch status, enabling the terminal device to obtain the notification switch status by loading the custom asset file. The specific implementation process will not be described in detail.
[0108] In this embodiment, the implementation of step S201 is the same as that of step SS101 in the embodiment shown in FIG2 of this disclosure, and will not be described in detail here.
[0109] Corresponding to the special effects display method in the above embodiments, Figure 11 is a structural block diagram of the special effects display device provided in the embodiments of this disclosure. For ease of explanation, only the parts related to the embodiments of this disclosure are shown. Referring to Figure 10, the special effects display device 3 includes:
[0110] The acquisition module 31 is used to acquire the corresponding custom asset file in response to the triggering of the target effect. The target effect is used to display at least one frame of effect image. The effect image is an image generated based on the association information of the current user. The association information represents the user identifier of the associated user who has an association with the current user.
[0111] Loading module 32 is used to load custom asset files through the resource reference interface of the target effect, obtain the list of associations corresponding to the target effect, and obtain the corresponding association information from the server based on the list of associations.
[0112] The generation module 33 is used to generate corresponding special effects images based on the correlation information.
[0113] In one embodiment of this disclosure, when the loading module 32 loads a custom asset file through the resource reference interface of the target effect to obtain the association list corresponding to the target effect, it is specifically used to: load a custom asset file from the project file corresponding to the target effect through the resource reference interface of the target effect to obtain at least one association resource object and an image style corresponding to the association resource object, wherein the association resource object is used to provide association information for the effect image of the corresponding image style; and obtain the association list corresponding to the target effect based on the association resource object and the corresponding image style.
[0114] In one embodiment of this disclosure, when the loading module 32 obtains the association list corresponding to the target effect based on the association resource object and the corresponding image style, it is specifically used to: when the image style is a single-frame image, access the first attribute of the association resource object to obtain first relationship data indicating the associated user, the first relationship data including a first identifier and a corresponding second identifier, wherein the first identifier represents the associated user name of the associated user and the second identifier represents the associated user avatar of the associated user; and generate the association list corresponding to the target effect based on the first relationship data.
[0115] In one embodiment of this disclosure, when the loading module 32 accesses the first attribute of the associated resource object to obtain the first relationship data indicating the associated user, it is specifically used to: obtain at least one first identifier and at least one second identifier by accessing the first attribute of the associated resource object; pair and store the first identifier and the second identifier with the same identification information to obtain a pairing table containing at least one pairing record; and generate the first relationship data according to the pairing table.
[0116] In one embodiment of this disclosure, the loading module 32 is further configured to: independently store a first identifier or a second identifier that does not have the same identification information to obtain a non-pairing table; when the loading module 32 generates the first relationship data according to the pairing table, it is specifically configured to: generate the first relationship data according to the pairing table and the non-pairing table.
[0117] In one embodiment of this disclosure, when the loading module 32 obtains the association list corresponding to the target effect based on the association resource object and the corresponding image style, it is specifically used to: when the image style is a dynamic image, access the second attribute of the association resource object to obtain second relationship data indicating the associated user, the second relationship data including a preset number of third identifiers, the third identifiers corresponding to the user information of the associated user, the preset number being the number of image frames of the dynamic image; and generate the association list corresponding to the target effect based on the second relationship data.
[0118] In one embodiment of this disclosure, when the loading module 32 obtains the list of associations corresponding to the target effect based on the associated resource objects and the corresponding image styles, it is specifically used to: determine the number of target associated users based on the associated resource objects and the corresponding image styles; and obtain the list of associations corresponding to the target effect based on the number of target associated users.
[0119] In one embodiment of this disclosure, when the loading module 32 determines the target number of associated users based on the associated resource object and the corresponding image style, it is specifically used to: obtain a first number of associated users, wherein the first number of associated users is the larger of the capacity of the pairing table corresponding to the first relationship data and the preset number corresponding to the second relationship data; and determine the target number of associated users based on the sum of the first number of associated users and the capacity of the non-pairing table corresponding to the first relationship data.
[0120] In one embodiment of this disclosure, when the loading module 32 obtains the corresponding association information from the server based on the association list, it is specifically used to: obtain the target association type, determine the target association list from at least two association lists, and obtain the corresponding association information from the server based on the target association list.
[0121] In one embodiment of this disclosure, after generating the corresponding special effects image based on the association information, the generation module 33 further includes: generating a target video based on the special effects image; after the target video is published, obtaining at least one target association information, wherein the target association information is the association information corresponding to the target special effects image displayed in the target display pose in the target video; and sending hit information to the server based on the target association information, wherein the hit information is used to enable the server to send a notification message to the target associated user corresponding to the target association information.
[0122] In one embodiment of this disclosure, the loading module 32 is further configured to: obtain the notification switch status by loading a custom asset file; when the generation module 33 sends hit information to the server based on the target association information, it is specifically configured to: send hit information to the server based on the target association information when the switch status is the target status.
[0123] In one embodiment of this disclosure, the hit information includes at least one of the following: the current user's identification identifier, the target effect's identification identifier, and the target video's publication time.
[0124] The acquisition module 31, loading module 32, and generation module 33 are connected sequentially. The special effects display device 3 provided in this embodiment can execute the technical solution of the above method embodiment, and its implementation principle and technical effect are similar, so it will not be described again here.
[0125] Figure 12 is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. As shown in Figure 12, the electronic device 4 includes:
[0126] Processor 41, and memory 42 communicatively connected to processor 41;
[0127] Memory 42 stores instructions executed by the computer;
[0128] The processor 41 executes computer execution instructions stored in the memory 42 to implement the special effects display method in the embodiments shown in Figures 2-10.
[0129] Optionally, the processor 41 and the memory 42 are connected via a bus 43.
[0130] The relevant explanations can be understood by referring to the descriptions and effects of the steps in the embodiments corresponding to Figures 2-10, which will not be elaborated on here.
[0131] This disclosure provides a computer-readable storage medium storing computer-executable instructions. When executed by a processor, these instructions are used to implement the special effects display method provided in any of the embodiments corresponding to Figures 2-10 of this disclosure.
[0132] To implement the above embodiments, this disclosure also provides an electronic device.
[0133] Referring to Figure 13, a schematic diagram of the structure of an electronic device 900 suitable for implementing embodiments of the present disclosure is shown. The electronic device 900 can be a terminal device or a server. The terminal device can include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, personal digital assistants (PDAs), portable Android devices (PADs), portable media players (PMPs), and in-vehicle terminals (e.g., in-vehicle navigation terminals), as well as fixed terminals such as digital TVs and desktop computers. The electronic device shown in Figure 13 is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present disclosure.
[0134] As shown in Figure 13, the electronic device 900 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 901, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 902 or a program loaded from a storage device 908 into a random access memory (RAM) 903. The RAM 903 also stores various programs and data required for the operation of the electronic device 900. The processing unit 901, ROM 902, and RAM 903 are interconnected via a bus 904. An input / output (I / O) interface 905 is also connected to the bus 904.
[0135] Typically, the following devices can be connected to I / O interface 905: input devices 906 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 907 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 908 including, for example, magnetic tapes, hard disks, etc.; and communication devices 909. Communication device 909 allows electronic device 900 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 13 shows electronic device 900 with various devices, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0136] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 909, or installed from a storage device 908, or installed from a ROM 902. When the computer program is executed by a processing device 901, it performs the functions defined in the methods of embodiments of this disclosure.
[0137] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0138] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0139] The aforementioned computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above embodiments.
[0140] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0141] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0142] The units described in the embodiments of this disclosure can be implemented in software or in hardware. The name of a unit does not necessarily limit the unit itself; for example, the first acquisition unit can also be described as "a unit that acquires at least two Internet Protocol addresses".
[0143] The functions described above in this document can be performed at least in part by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), and so on.
[0144] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0145] In a first aspect, according to one or more embodiments of this disclosure, a special effects display method is provided, comprising:
[0146] In response to the triggering of a target effect, a corresponding custom asset file is obtained. The target effect is used to display at least one frame of effect image, which is an image generated based on the current user's association relationship information. The association relationship information represents the user identifiers of associated users who are associated with the current user. The custom asset file is loaded through the resource reference interface of the target effect to obtain the association relationship list corresponding to the target effect, and the corresponding association relationship information is obtained from the server based on the association relationship list. The corresponding effect image is generated based on the association relationship information.
[0147] According to one or more embodiments of this disclosure, loading the custom asset file through the resource reference interface of the target effect to obtain the association list corresponding to the target effect includes: loading the custom asset file from the project file corresponding to the target effect through the resource reference interface of the target effect to obtain at least one association resource object and an image style corresponding to the association resource object, wherein the association resource object is used to provide association information for the effect image of the corresponding image style; and obtaining the association list corresponding to the target effect based on the association resource object and the corresponding image style.
[0148] According to one or more embodiments of this disclosure, obtaining the association list corresponding to the target effect based on the association resource object and the corresponding image style includes: when the image style is a single-frame image, accessing a first attribute of the association resource object to obtain first relationship data indicating the associated user, the first relationship data including a first identifier and a corresponding second identifier, wherein the first identifier represents the associated user name of the associated user, and the second identifier represents the associated user avatar of the associated user; generating the association list corresponding to the target effect based on the first relationship data.
[0149] According to one or more embodiments of this disclosure, accessing the first attribute of the associated resource object to obtain first relationship data indicating the associated user includes: obtaining at least one first identifier and at least one second identifier by accessing the first attribute of the associated resource object; pairing and storing the first identifier and the second identifier with the same identification information to obtain a pairing table containing at least one pairing record; and generating the first relationship data according to the pairing table.
[0150] According to one or more embodiments of this disclosure, the method further includes: storing a first identifier or a second identifier that does not have the same identification information independently to obtain a non-pairing table; the step of generating first relationship data based on the pairing table includes: generating first relationship data based on the pairing table and the non-pairing table.
[0151] According to one or more embodiments of this disclosure, obtaining the association list corresponding to the target effect based on the association resource object and the corresponding image style includes: when the image style is a dynamic image, accessing the second attribute of the association resource object to obtain second relationship data indicating the associated user, the second relationship data including a preset number of third identifiers, the third identifiers corresponding to the user information of the associated user, the preset number being the number of image frames of the dynamic image; and generating the association list corresponding to the target effect based on the second relationship data.
[0152] According to one or more embodiments of this disclosure, obtaining the association list corresponding to the target effect based on the associated resource object and the corresponding image style includes: determining the corresponding number of target associated users based on the associated resource object and the corresponding image style; and obtaining the association list corresponding to the target effect based on the number of target associated users.
[0153] According to one or more embodiments of this disclosure, determining the corresponding target number of associated users based on the associated resource object and the corresponding image style includes: obtaining a first number of associated users, wherein the first number of associated users is the larger of the capacity of the pairing table corresponding to the first relationship data and the preset number corresponding to the second relationship data; and determining the target number of associated users based on the sum of the first number of associated users and the capacity of the non-pairing table corresponding to the first relationship data.
[0154] According to one or more embodiments of this disclosure, obtaining the corresponding association information from the server based on the association list includes: obtaining a target association type; determining a target association list from at least two association lists; and obtaining the corresponding association information from the server based on the target association list.
[0155] According to one or more embodiments of this disclosure, after generating a corresponding special effects image based on the association information, the method further includes: generating a target video based on the special effects image; after the target video is published, obtaining at least one target association information, wherein the target association information is the association information corresponding to the target special effects image displayed in the target video at a target display pose; and sending hit information to a server based on the target association information, wherein the hit information is used to enable the server to send a notification message to the target associated user corresponding to the target association information.
[0156] According to one or more embodiments of this disclosure, it further includes: obtaining a notification switch state by loading the custom asset file; the step of sending hit information to the server based on the target association information includes: sending hit information to the server based on the target association information when the switch state is a target state.
[0157] According to one or more embodiments of this disclosure, the hit information includes at least one of the following: the identification identifier of the current user, the identification identifier of the target effect, and the publication time of the target video.
[0158] Secondly, according to one or more embodiments of this disclosure, a special effects display device is provided, comprising:
[0159] The acquisition module is used to acquire the corresponding custom asset file in response to the triggering of the target effect. The target effect is used to display at least one frame of effect image. The effect image is an image generated based on the association information of the current user. The association information represents the user identifier of the associated user who has an association relationship with the current user.
[0160] The loading module is used to load the custom asset file through the resource reference interface of the target effect, obtain the association list corresponding to the target effect, and obtain the corresponding association information from the server based on the association list;
[0161] The generation module is used to generate corresponding special effects images based on the association information.
[0162] According to one or more embodiments of this disclosure, when the loading module loads the custom asset file through the resource reference interface of the target effect to obtain the association list corresponding to the target effect, it is specifically used to: load the custom asset file from the project file corresponding to the target effect through the resource reference interface of the target effect to obtain at least one association resource object and the image style corresponding to the association resource object, wherein the association resource object is used to provide association information for the effect image of the corresponding image style; and obtain the association list corresponding to the target effect based on the association resource object and the corresponding image style.
[0163] According to one or more embodiments of this disclosure, when the loading module obtains the association list corresponding to the target effect based on the association resource object and the corresponding image style, it is specifically configured to: when the image style is a single-frame image, access the first attribute of the association resource object to obtain first relationship data indicating the associated user, wherein the first relationship data includes a first identifier and a corresponding second identifier, wherein the first identifier represents the associated user name of the associated user and the second identifier represents the associated user avatar of the associated user; and generate the association list corresponding to the target effect based on the first relationship data.
[0164] According to one or more embodiments of this disclosure, when the loading module accesses the first attribute of the associated resource object to obtain first relationship data indicating the associated user, it is specifically configured to: obtain at least one first identifier and at least one second identifier by accessing the first attribute of the associated resource object; pair and store the first identifier and the second identifier with the same identification information to obtain a pairing table containing at least one pairing record; and generate the first relationship data according to the pairing table.
[0165] According to one or more embodiments of this disclosure, the loading module is further configured to: independently store a first identifier or a second identifier that does not have the same identification information to obtain a non-pairing table; when the loading module generates first relationship data based on the pairing table, it is specifically configured to: generate first relationship data based on the pairing table and the non-pairing table.
[0166] According to one or more embodiments of this disclosure, when the loading module obtains the association list corresponding to the target effect based on the association resource object and the corresponding image style, it is specifically configured to: when the image style is a dynamic image, access the second attribute of the association resource object to obtain second relationship data indicating the associated user, wherein the second relationship data includes a preset number of third identifiers, the third identifiers corresponding to the user information of the associated user, and the preset number being the number of image frames of the dynamic image; and generate the association list corresponding to the target effect based on the second relationship data.
[0167] According to one or more embodiments of this disclosure, when the loading module obtains the association list corresponding to the target effect based on the association resource object and the corresponding image style, it is specifically used to: determine the corresponding number of target associated users based on the association resource object and the corresponding image style; and obtain the association list corresponding to the target effect based on the number of target associated users.
[0168] According to one or more embodiments of this disclosure, when the loading module determines the corresponding target number of associated users based on the associated resource object and the corresponding image style, it is specifically configured to: obtain a first number of associated users, wherein the first number of associated users is the larger of the capacity of the pairing table corresponding to the first relationship data and the preset number corresponding to the second relationship data; and determine the target number of associated users based on the sum of the first number of associated users and the capacity of the non-pairing table corresponding to the first relationship data.
[0169] According to one or more embodiments of this disclosure, when the loading module obtains corresponding association information from the server based on the association list, it is specifically configured to: obtain the target association type; determine the target association list from at least two association lists; and obtain the corresponding association information from the server based on the target association list.
[0170] According to one or more embodiments of this disclosure, after generating a corresponding special effects image based on the association information, the generation module further includes: generating a target video based on the special effects image; after the target video is published, obtaining at least one target association information, wherein the target association information is the association information corresponding to the target special effects image displayed in the target display pose in the target video; and sending hit information to a server based on the target association information, wherein the hit information is used to enable the server to send a notification message to the target associated user corresponding to the target association information.
[0171] According to one or more embodiments of this disclosure, the loading module is further configured to: obtain the notification switch status by loading the custom asset file; when the generation module sends hit information to the server based on the target association information, it is specifically configured to: send hit information to the server based on the target association information when the switch status is the target status.
[0172] According to one or more embodiments of this disclosure, the hit information includes at least one of the following: the identification identifier of the current user, the identification identifier of the target effect, and the publication time of the target video.
[0173] Thirdly, according to one or more embodiments of the present disclosure, an electronic device is provided, comprising: at least one processor and a memory;
[0174] The memory stores computer-executed instructions;
[0175] The at least one processor executes computer execution instructions stored in the memory, causing the at least one processor to perform the special effects display method as described in the first aspect and various possible designs of the first aspect.
[0176] Fourthly, according to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein computer-executable instructions are stored therein, and when a processor executes the computer-executable instructions, the special effects display method described in the first aspect and various possible designs of the first aspect is implemented.
[0177] Fifthly, according to one or more embodiments of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements the special effects display method described in the first aspect and various possible designs of the first aspect.
[0178] The above description is merely a preferred embodiment of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described concept. For example, technical solutions formed by substituting the above features with (but not limited to) technical features disclosed in this disclosure that have similar functions.
[0179] Furthermore, while the operations are described in a specific order, this should not be construed as requiring these operations to be performed in the specific order shown or in a sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this disclosure. Certain features described in the context of individual embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented individually or in any suitable sub-combination in multiple embodiments.
[0180] Although the subject matter has been described using language specific to structural features and / or methodological logic, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. Rather, the specific features and actions described above are merely illustrative examples of implementing the claims.
Claims
1. A method for displaying special effects, characterized in that, include: In response to the triggering of a target effect, a corresponding custom asset file is retrieved. The target effect is used to display at least one frame of an effect image, which is generated based on the current user's association information. This association information represents the user identifiers of associated users who are related to the current user. The custom asset file is loaded through the resource reference interface of the target effect to obtain a list of associations corresponding to the target effect. Based on this list, corresponding association information is retrieved from the server. The custom asset file encapsulates the function of retrieving associations. A corresponding effect image is generated based on the association information.
2. The method according to claim 1, characterized in that, The step of loading the custom asset file through the resource reference interface of the target effect to obtain the association list corresponding to the target effect includes: loading the custom asset file from the project file corresponding to the target effect through the resource reference interface of the target effect to obtain at least one association resource object and the image style corresponding to the association resource object, wherein the association resource object is used to provide association information for the effect image of the corresponding image style; and obtaining the association list corresponding to the target effect based on the association resource object and the corresponding image style.
3. The method according to claim 2, characterized in that, The step of obtaining the association list corresponding to the target effect based on the association resource object and the corresponding image style includes: when the image style is a single-frame image, accessing the first attribute of the association resource object to obtain first relationship data indicating the associated user, wherein the first relationship data includes a first identifier and a corresponding second identifier, wherein the first identifier represents the associated user name of the associated user and the second identifier represents the associated user avatar of the associated user; and generating the association list corresponding to the target effect based on the first relationship data.
4. The method according to claim 3, characterized in that, The step of accessing the first attribute of the associated resource object to obtain first relationship data indicating the associated user includes: obtaining at least one first identifier and at least one second identifier by accessing the first attribute of the associated resource object; pairing and storing the first identifier and the second identifier with the same identification information to obtain a pairing table containing at least one pairing record; and generating the first relationship data based on the pairing table.
5. The method according to claim 4, characterized in that, The method further includes: storing a first identifier or a second identifier that does not have the same identification information independently to obtain a non-pairing table; generating first relationship data based on the pairing table includes: generating first relationship data based on the pairing table and the non-pairing table.
6. The method according to claim 2, characterized in that, The step of obtaining the association list corresponding to the target effect based on the association resource object and the corresponding image style includes: when the image style is a dynamic image, accessing the second attribute of the association resource object to obtain second relationship data indicating the associated user, the second relationship data including a preset number of third identifiers, the third identifiers corresponding to the user information of the associated user, the preset number being the number of image frames of the dynamic image; and generating the association list corresponding to the target effect based on the second relationship data.
7. The method according to claim 2, characterized in that, The step of obtaining the association list corresponding to the target effect based on the associated resource object and the corresponding image style includes: determining the number of target associated users based on the associated resource object and the corresponding image style; and obtaining the association list corresponding to the target effect based on the number of target associated users.
8. The method according to claim 7, characterized in that, The step of determining the target number of associated users based on the associated resource object and the corresponding image style includes: obtaining a first number of associated users, wherein the first number of associated users is the larger of the capacity of the pairing table corresponding to the first relationship data and the preset number corresponding to the second relationship data; and determining the target number of associated users based on the sum of the first number of associated users and the capacity of the non-pairing table corresponding to the first relationship data.
9. The method according to claim 1, characterized in that, The step of obtaining the corresponding association information from the server based on the association list includes: obtaining the target association type; determining the target association list from at least two association lists; and obtaining the corresponding association information from the server based on the target association list.
10. The method according to claim 1, characterized in that, After generating the corresponding special effects image based on the association information, the method further includes: generating a target video based on the special effects image; after the target video is published, obtaining at least one target association information, wherein the target association information is the association information corresponding to the target special effects image displayed in the target display pose in the target video; and sending hit information to the server based on the target association information, wherein the hit information is used to enable the server to send a notification message to the target associated user corresponding to the target association information.
11. The method according to claim 10, characterized in that, Also includes: The notification switch status is obtained by loading the custom asset file; Sending hit information to the server based on the target association information includes: when the switch state is the target state, sending hit information to the server based on the target association information.
12. The method according to claim 10, characterized in that, The hit information includes at least one of the following: the current user's identification identifier, the target effect's identification identifier, and the target video's release time.
13. A special effects display device, characterized in that, include: The acquisition module is used to acquire the corresponding custom asset file in response to the triggering of the target effect, wherein the target effect is used to display at least one frame of effect image, and the effect image is an image generated based on the association information of the current user, wherein the association information represents the user identifiers of associated users who are associated with the current user; the loading module is used to load the custom asset file through the resource reference interface of the target effect, obtain the association list corresponding to the target effect, and obtain the corresponding association information from the server based on the association list; the custom asset file encapsulates the function of acquiring associations; the generation module is used to generate the corresponding effect image based on the association information.
14. An electronic device, characterized in that, include: Processor and memory; The memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory, causing the processor to perform the special effects display method as described in any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the special effects display method as described in any one of claims 1 to 12.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the special effects display method as described in any one of claims 1 to 12.
Citation Information
Patent Citations
Fluid effect rendering method and device
CN115120966A
Special effect generation method and device, electronic equipment and storage medium
CN115988255A