Sticker template image generation method, device, anchor terminal device and storage medium
By obtaining and applying target sticker template information from the server to generate preset layer pictures, the problem of anchors needing to edit stickers for a long time in the existing technology is solved, and the aesthetics of live broadcast images and the audience experience is improved.
Patent Information
- Application Number
- CN202011575610.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-28
- Publication Date
- 2025-04-22
- Estimated Expiration
- 2040-12-28
AI Technical Summary
The existing sticker editing plan requires the anchor to spend a lot of time and have a certain artistic foundation to obtain better sticker setting effects, resulting in insufficient aesthetics of the live broadcast picture.
By obtaining the target sticker template information from the server, including the target configuration file and the target map, a layer picture of the preset layer is generated. The size and position of the target map are determined according to the configuration file, and used to synthesize the live broadcast screen with the image frame to be displayed.
You can get better sticker settings without the anchor editing for a long time, improving the beautification effect of the live broadcast screen and the audience's live viewing experience.
Smart Images

Figure CN112712575B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of Internet technology, and more specifically, to a sticker template image generation method, device, anchor terminal device and storage medium. Background Art
[0002] Currently, a sticker editing solution is provided on the anchor side. In this solution, the anchor can add stickers to the live broadcast screen through manual editing to increase the aesthetics of the live broadcast screen. Among them, the specific pattern, size, position, etc. of the sticker are all set by the anchor. However, this sticker editing solution requires the anchor to spend a lot of time and have a certain level of artistic skills to obtain a slightly good-looking sticker design solution, and then get a good-looking live broadcast screen. As a result, when using the sticker editing solution, the sticker setting effect is generally not good, which in turn fails to increase the aesthetics of the live broadcast screen. Summary of the invention
[0003] In view of this, the purpose of the present application is to provide a sticker template image generation method, device, anchor-end device and storage medium, which can quickly obtain pictures with better sticker setting effects without the need for the anchor to perform long-term sticker editing.
[0004] In order to achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0005] In a first aspect, an embodiment of the present application provides a method for generating a sticker template image, which is applied to a host terminal device, and the method includes:
[0006] Obtain target sticker template information from a server, wherein the target sticker template information includes a target configuration file and a target map, and the target configuration file includes size information and position information of each target map;
[0007] A layer picture of a preset layer is generated according to the target sticker template information, wherein the layer picture of the preset layer includes the target sticker, and the size and position of the target sticker in the layer picture of the preset layer are determined according to the size information and position information of the target sticker, and the layer picture of the preset layer is used to be synthesized with the image frame to be displayed into a live screen.
[0008] In a second aspect, an embodiment of the present application provides a sticker template image generation device, which is applied to a host terminal device, and the device includes:
[0009] An acquisition module, used to obtain target sticker template information from a server, wherein the target sticker template information includes a target configuration file and a target map, and the target configuration file includes size information and position information of each target map;
[0010] A processing module is used to generate a layer image of a preset layer according to the target sticker template information, wherein the layer image of the preset layer includes the target map, the size and position of the target map in the layer image of the preset layer are determined according to the size information and position information of the target map, and the layer image of the preset layer is used to be synthesized with the image frame to be displayed into a live screen.
[0011] In a third aspect, an embodiment of the present application provides a host-end device, including a processor and a memory, wherein the memory stores machine-executable instructions that can be executed by the processor, and the processor can execute the machine-executable instructions to implement the sticker template image generation method described in any one of the aforementioned embodiments.
[0012] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for generating a sticker template image as described in any one of the aforementioned embodiments is implemented.
[0013] The sticker template image generation method, device, anchor-end device and storage medium provided in the embodiments of the present application obtain target sticker template information from a server, and then generate a layer image of a preset layer according to the target sticker template information. Among them, the target sticker template information includes a target configuration file and a target map, and the target configuration file includes the size information and position information of each target map. The layer image of the preset layer includes the target map. The size and position of the target map in the preset layer are determined according to the size information and position information of the target map. The layer image of the preset layer can be used to synthesize with the layer frame to be displayed into a live broadcast screen. As a result, the anchor does not need to perform long-term sticker editing, and can obtain a layer image with a better sticker setting effect based on the target sticker template information, so as to enhance the beautification effect of the live broadcast screen, and at the same time facilitate improving the live broadcast viewing experience of users on the audience side. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0015] Figure 1 A block diagram of a host terminal device provided in an embodiment of the present application;
[0016] Figure 2 One of the flowcharts of the sticker template image generation method provided in the embodiment of the present application;
[0017] Figure 3 This is one of the diagrams of the definition document of the configuration file;
[0018] Figure 4 This is the second diagram of the definition document of the configuration file;
[0019] Figure 5 for Figure 2 A schematic flow chart of the sub-steps included in step S120;
[0020] Figure 6 The second flowchart of the sticker template image generation method provided in the embodiment of the present application;
[0021] Figure 7 A block diagram of a sticker template image generating device provided in an embodiment of the present application.
[0022] Icons: 100 - host end device; 110 - memory; 120 - processor; 130 - communication unit; 200 - sticker template image generating device; 210 - acquisition module; 220 - processing module. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings here can be arranged and designed in various different configurations.
[0024] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention claimed for protection, but merely represents selected embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0026] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear to indicate an orientation or position relationship, they are based on the orientation or position relationship shown in the accompanying drawings, or are the orientation or position relationship in which the product of the invention is usually placed when used. They are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0027] In addition, the terms “first”, “second”, etc., if used, are merely used to distinguish between the descriptions and should not be understood as indicating or implying relative importance.
[0028] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0029] Please refer to Figure 1 , Figure 1 A block diagram of a host terminal device 100 provided in an embodiment of the present application. The host terminal device 100 may be, but is not limited to, a smart phone, a desktop computer, a tablet computer, etc. The host terminal device 100 includes a memory 110, a processor 120, and a communication unit 130. The memory 110, the processor 120, and the communication unit 130 are electrically connected to each other directly or indirectly to achieve data transmission or interaction. For example, these components can be electrically connected to each other through one or more communication buses or signal lines.
[0030] The memory 110 is used to store programs or data. The memory 110 may be, but is not limited to, a random access memory (RAM), a read only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), etc.
[0031] The processor 120 is used to read / write data or programs stored in the memory 110 and execute corresponding functions. For example, the memory 110 stores a sticker template image generating device 200, and the sticker template image generating device 200 includes at least one software function module that can be stored in the memory 110 in the form of software or firmware. The processor 120 executes various functional applications and data processing by running software programs and modules stored in the memory 110, such as the sticker template image generating device 200 in the embodiment of the present application, that is, realizing the sticker template image method in the embodiment of the present application.
[0032] The communication unit 130 is used to establish a communication connection between the anchor terminal device 100 and other communication terminals through the network, and to send and receive data through the network.
[0033] It should be understood that Figure 1 The structure shown is only a schematic diagram of the structure of the host terminal device 100. The host terminal device 100 may also include Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown. Figure 1 Each component shown in the figure can be implemented by hardware, software or a combination thereof.
[0034] Please refer to Figure 2 , Figure 2 This is one of the flowcharts of the method for generating a sticker template image provided in the embodiment of the present application. The method can be applied to the anchor terminal device 100. The specific process of the method for generating a sticker template image is described in detail below. The method includes step S110 and step S120.
[0035] Step S110, obtaining target sticker template information from the server.
[0036] Step S120, generating a layer image of a preset layer according to the target sticker template information.
[0037] In this embodiment, the server may store at least one sticker template information. The sticker template information stored in the server is obtained according to a template image with a better beautification effect designed by a designer, and the template image includes at least one sticker, that is, the template image includes a sticker with a set size, position and specific pattern.
[0038] Optionally, the server may proactively send the stored sticker template information to the host terminal device 100 so that the host terminal device 100 can obtain a new template image in a timely manner. The server may also send the requested sticker template information to the host terminal device 100 upon receiving a request from the host terminal device 100.
[0039] Optionally, when the server actively sends the information, the anchor-end device 100 can determine the sticker template information selected by the anchor from the obtained sticker template information according to the anchor's selection operation, and use the selected sticker template information as the target sticker template information. The anchor-end device 100 can also directly obtain a sticker template information from the server according to the anchor's selection operation, and use the sticker template information as the target sticker template information. Of course, it can be understood that the above is only an example, and the target sticker template information can also be obtained by other methods based on the sticker template information corresponding to the template image stored in the server.
[0040] The target sticker template information may include a target configuration file and a target map. The target configuration file includes the size information and location information of each target map. Figure 3 and Figure 4 , Figure 3 This is one of the diagrams of the definition document of the configuration file. Figure 4 This is the second diagram of the definition document of the configuration file. The target configuration file is composed of Figure 3 and Figure 4 The configuration file shown is defined by a document schematic and a corresponding template image.
[0041] A layer image of a preset layer can be generated according to the target sticker template information, and the generated layer image of the preset layer includes the target map in the target sticker template information, and the size of each target map included in the layer image of the preset layer is determined according to the size information corresponding to the target map, and the position of each target map in the layer image of the preset layer is determined by the position information corresponding to the target map. The generated preset layer image can be used to synthesize with the image frame to be displayed into a live screen.
[0042] Among them, the specific layer corresponding to the preset layer is determined by the template image designed by the corresponding designer. For example, if in a template image designed by the designer, the sticker is only located in the background layer, then the layer image generated based on the target sticker template information corresponding to the template image includes the layer image of the background layer.
[0043] The embodiment of the present application can directly generate a layer image of a preset layer with a better sticker setting effect according to the target sticker template information corresponding to the template image designed by the designer. The layer image can be used to synthesize the image frame to be displayed into a live screen, thereby improving the beautification effect of the live screen, improving the live broadcaster's activity, enriching the live broadcast experience of the anchor, and improving the live broadcast viewing experience of users on the live broadcast audience side. This method does not require the anchor to edit stickers for a long time, nor does it require the anchor to have a certain artistic foundation, and at the same time can ensure the beauty of the sticker setting effect.
[0044] Optionally, as an optional implementation method, the layer image that meets the needs of the anchor can be obtained in the following way. Figure 5 , Figure 5 for Figure 2 Schematic diagram of the flow of sub-steps included in step S120. Step S120 may include sub-steps S121 to S123.
[0045] Sub-step S121, generating an initial sticker template image according to the target sticker template information.
[0046] When the target sticker template information is determined, the anchor end device 100 draws and displays an initial sticker template image corresponding to the target sticker template information according to the target sticker template information, so that the anchor can view the sticker display effect in the target sticker template information. The initial sticker template image includes all target stickers included in the target sticker template information.
[0047] Optionally, since the device corresponding to the template image designed by the designer is different from the anchor-end device 100, an initial sticker template image adapted to the anchor-end device can be generated according to the target sticker template information to avoid poor beautification effect of the generated initial sticker template image due to incompatibility.
[0048] Optionally, an initial sticker template image adapted to the host terminal device 100 may be generated according to the display size and resolution requirements of the host terminal device 100 and the target sticker template information.
[0049] After the anchor end device 100 displays the initial sticker template image, if the anchor does not perform any modification operation, the layer image of the preset layer can be determined based on the initial sticker template image. Optionally, the initial sticker template image can be obtained by taking screenshots according to the background layer and the foreground layer to obtain the layer image of the foreground layer and the layer image of the foreground layer. Of course, it is understandable that if the initial sticker template image only includes the background layer or the foreground layer, only one layer image can be obtained by taking screenshots. If the anchor does not make any modification, the layer image of the preset layer is determined when the template image designed by the designer is adapted to the anchor end device 100, and other aspects (such as the specific pattern of the sticker) are not modified.
[0050] Sub-step S122, in response to the received modification operation on the elements in the initial sticker template image, adjusting the initial sticker template image to obtain an adjusted initial sticker template image.
[0051] When the anchor terminal device 100 displays the initial sticker template image, if the anchor performs a modification operation on an element in the initial sticker template image, the anchor can respond to the modification operation and modify the corresponding element to obtain an adjusted initial sticker template image. The element in the initial sticker template image includes the target sticker.
[0052] Optionally, as an optional implementation, in order to meet the host's operational requirements as much as possible, the modification operation may include a position modification operation, a size modification operation, an element replacement operation, etc. Among them, the element replacement operation refers to replacing an element. For example, if a sticker is originally a sun pattern, the sticker can be replaced with a moon pattern through the element replacement operation, but other aspects such as size and position are not modified. The host can replace the sticker corresponding to the host's avatar in the initial sticker template image with the sticker used as the avatar.
[0053] Optionally, in order to ensure that a better texture setting effect is presented in the live broadcast screen as much as possible, the modification operation may only include a replacement operation on the element, that is, the position, size, etc. of the element cannot be changed.
[0054] Sub-step S123, obtaining a layer image of the preset layer according to the adjusted initial sticker template image.
[0055] After the anchor has completed the modification and obtained the adjusted initial sticker template image, the layer image of the foreground layer and the layer image of the foreground layer can be obtained by screenshot according to the background layer and the foreground layer. Of course, it is understandable that if the initial sticker template image only includes the background layer or the foreground layer, only one layer image can be obtained by screenshot.
[0056] Optionally, in this embodiment, the target configuration file may further include the size information and position information of the preset layer. When generating the initial sticker template image, the setting mode of the preset layer in the initial sticker template image may be determined according to the size information and position information of the preset layer. Thus, the anchor can view the sticker setting effect under the setting mode of the preset layer.
[0057] Please refer to Figure 6 , Figure 6 This is a second flow chart of the method for generating a sticker template image provided in an embodiment of the present application. The method may further include step S130 and step S140.
[0058] Step S130, collecting image frames to be displayed, and using the image frames as video layer pictures.
[0059] Step S140, generating a live broadcast screen according to the size information and position information of the preset layer, the layer image of the preset layer, and the video layer image.
[0060] When the layer image of the preset layer, the size information and the position information of the preset layer have been obtained, they can be saved in the sandbox folder. The size information and the position information of the preset layer saved in the sandbox folder can be the size information and the position information of the preset layer originally included in the target sticker template information, or the size information and the position information of the preset layer adapted to the anchor terminal device 100 and confirmed by the anchor. In an optional implementation, in order to reduce the adaptation calculation, the size information and the position information of the preset layer adapted to the anchor terminal device 100 and confirmed by the anchor can be saved in the sandbox folder.
[0061] When the live broadcast starts, the layer images, size information and position information of the preset layers saved in the sandbox folder can be read out from the sandbox folder and saved in the memory so that they can be used directly later.
[0062] The image frame to be displayed is the content mainly used for display in the live screen. For example, if a mobile game is being broadcast live, the image frame to be displayed is a frame of the game screen that has been collected. For another example, if the anchor is broadcasting himself live, the image frame to be displayed is a frame of image obtained by a camera device, etc. After obtaining the image frame to be displayed, it can be used as a video layer picture. Then, based on the video layer picture, the size information and position information of the preset layer in the memory, and the layer picture of the preset layer, a live screen is generated. In this way, a more beautiful live screen can be obtained. Among them, the size and position of the video layer picture can be the default size and position in the live APP, or it can be a size and position set by other means.
[0063] As an optional implementation, the target sticker template information may also include size information and position information of the video layer. The size of the video layer image may be processed according to the size information of the video layer to obtain a processed video layer image. The size processing may include scaling. Then, according to the processed video layer image, the position information of the video layer, the size information and position information of the preset layer, and the layer image of the preset layer, the processed video layer image and the layer image of the preset layer are drawn on the same canvas to generate the live screen. The position of the processed video layer image in the live screen is determined according to the position information of the video layer. Thus, the position and size of the video layer may also be set to further ensure the aesthetics of the live screen and avoid the limitations caused by the inability to adjust the position and size of the video layer. At the same time, the anchor terminal device 100 has the ability to edit live layers.
[0064] Optionally, before processing the video layer image, the size information and position information of the video layer can be processed to match the size information and position information of the anchor terminal device 100 and confirmed by the anchor, so that the video layer image can be directly processed later. Alternatively, the live screen including the video layer image can be generated directly based on the size information and position information of the video layer included in the target sticker template information, combined with the display size and resolution requirements of the anchor terminal device 100.
[0065] When the live broadcast image is obtained, the anchor end device 100 can push the live broadcast image to the server end, and the live broadcast image is pushed to the viewer end through the processing of the server end. It can be understood that during the live broadcast process, step S140 will be executed for each frame of the image collected, and the live broadcast image obtained through step S140 will be pushed to the server end.
[0066] Optionally, in this embodiment, the target configuration file may further include text configuration information, and the layer image of the preset layer may further include text corresponding to the text configuration information. Thus, the aesthetics of the pattern image and the aesthetics of the live broadcast screen may be further improved.
[0067] The following is a brief description of the process of generating sticker template information.
[0068] First, the designer designs a template image with good beautification effect. Then, the template image is decomposed into three layers: background layer, video layer and foreground layer. The video layer is located between the background layer and the foreground layer. The background layer is the farthest part of the image from the viewer, and the foreground layer is the closest part of the image to the viewer.
[0069] In one embodiment, the video layer is the layer that displays the captured screen, that is, during live broadcast, the content displayed by the video layer is dynamically captured. For example, when broadcasting a game, the video layer displays the captured game screen. The background layer is a layer used to display the background. Generally, the background layer contains a background image, which is static. The combination of elements below the video layer and the part that can be blocked by the video layer are included in the background layer. The foreground layer is a layer used to display the foreground. The combination of elements above the video layer and the elements that cannot be blocked by the video layer are included in the foreground layer. The foreground layer generally includes introduction text, avatars, video frames and other elements.
[0070] By disassembling, the picture of the background layer, the picture of the foreground layer, the size information and position information of the background layer, the size information and position information of the foreground layer, and the size information and position information of the video layer designed by the designer can be obtained. Among them, the designed template image may include the picture of the video layer, or it may not include it, which can be determined according to actual needs. In the case where the template image includes the picture of the video layer, since the picture of the video layer is not the picture used in the subsequent live broadcast, when the template image is disassembled, the picture of the video layer may be obtained, or it may not be obtained. If the video layer picture is not obtained, when the initial template image is displayed to the anchor, the video layer picture in the initial template image may be empty.
[0071] Then, the images of each layer after the splitting are further refined into independent elements. Among them, all elements can be abstracted into two types: pictures and texts. At the same time, the total element information of each element is obtained, and the total element information of each element may include the location information, size information and own attribute information of the element. Among them, if the type of an element is a picture, the own attribute information of the element may include the corresponding picture information, such as the path where the picture resource is located. If the type of an element is text, the own attribute information of the element may include the corresponding text, font, color, etc. Based on the above information, a configuration file can be generated, which includes the size information and location information of each layer (including background layer, video layer, foreground layer), as well as the total attribute information of each element.
[0072] You can also output the cut image for the layer image, so as to export the texture used by the element, and package the obtained texture with the configuration file as sticker template information, and save it in the server. The specific information types included in the configuration file can be as follows: Figure 3 and Figure 4 shown.
[0073] When the anchor device 100 obtains sticker template information, it can use native UI controls to draw a sticker template image based on the sticker template information, and the user can replace the text or picture in the drawing template image.
[0074] It can be seen that the template images corresponding to each sticker template information are carefully designed and beautified by the designer, which can ensure the beautification effect of the pictures generated based on the sticker template information. When broadcasting games, special game templates can also be designed based on popular games. After the sticker template information is generated, the server can dynamically send it to the anchor-end device 100, so that the new template can be used without the anchor-end device 100 updating the live broadcast APP. At the same time, the designer can also continuously improve the template based on the anchor's feedback, and then generate the sticker template information corresponding to the improved template, and the server can send the newly generated sticker template information to the anchor-end device 100.
[0075] In the above solution provided by the embodiment of the present application, the sticker template information includes the information corresponding to the sticker combination and text prepared by the designer. The anchor only needs to perform a simple editing and replacement operation to quickly obtain a good-looking template for generating a live broadcast screen with the image frame to be displayed. Therefore, the anchor can edit the live broadcast screen layer by layer. Even if the anchor does not have a good artistic foundation, he can quickly and conveniently edit a beautiful and cool live broadcast screen.
[0076] In order to execute the corresponding steps in the above embodiments and various possible methods, a method for implementing a sticker template image generating device 200 is given below. Optionally, the sticker template image generating device 200 can adopt the above Figure 1 The device structure of the anchor terminal device 100 is shown. Figure 7 , Figure 7 A block diagram of a sticker template image generating device 200 provided in an embodiment of the present application. It should be noted that the basic principle and technical effects of the sticker template image generating device 200 provided in this embodiment are the same as those of the above-mentioned embodiments. For the sake of brief description, for parts not mentioned in this embodiment, reference may be made to the corresponding contents in the above-mentioned embodiments. The sticker template image generating device 200 can be applied to the anchor terminal device 100, and the sticker template image generating device 200 can include: an obtaining module 210 and a processing module 220.
[0077] The acquisition module 210 is used to obtain target sticker template information from the server, wherein the target sticker template information includes a target configuration file and a target map, and the target configuration file includes size information and position information of each target map.
[0078] The processing module 220 is used to generate a layer image of a preset layer according to the target sticker template information. The layer image of the preset layer includes the target sticker, and the size and position of the target sticker in the layer image of the preset layer are determined according to the size information and position information of the target sticker. The layer image of the preset layer is used to be synthesized with the image frame to be displayed into a live screen.
[0079] Optionally, in this embodiment, the preset layer includes a background layer and / or a foreground layer, and the target sticker template information also includes size information and position information of the preset layer. The processing module 220 is also used to: collect image frames to be displayed, and use the image frames as video layer pictures; generate a live screen according to the size information and position information of the preset layer, the layer picture of the preset layer, and the video layer picture.
[0080] Optionally, the above modules can be stored in the form of software or firmware. Figure 1 The memory 110 shown in the figure may be solidified in the operating system (OS) of the anchor terminal device 100 and may be Figure 1 Meanwhile, the data and program codes required for executing the above modules may be stored in the memory 110.
[0081] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the sticker template image generating method is implemented.
[0082] In summary, the embodiments of the present application provide a sticker template image generation method, device, anchor-end device and storage medium, which obtain target sticker template information from a server, and then generate a layer image of a preset layer according to the target sticker template information. Among them, the target sticker template information includes a target configuration file and a target map, and the target configuration file includes the size information and position information of each target map. The layer image of the preset layer includes the target map. The size and position of the target map in the preset layer are determined according to the size information and position information of the target map. The layer image of the preset layer can be used to synthesize with the layer frame to be displayed into a live broadcast screen. As a result, the anchor does not need to perform long-term sticker editing, and can obtain a layer image with a better sticker setting effect based on the target sticker template information, so as to enhance the beautification effect of the live broadcast screen, and at the same time facilitate improving the live viewing experience of users on the audience side.
[0083] In several embodiments provided in the present application, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device embodiments described above are merely schematic. For example, the flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the devices, methods and computer program products according to multiple embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of a code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0084] In addition, the functional modules in the various embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
[0085] If the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0086] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A sticker template image generation method, characterized in that: Applied to the anchor terminal device, the method includes: Obtain target sticker template information from a server, wherein the target sticker template information includes a target configuration file and a target map, and the target configuration file includes size information and position information of each target map; Generate a layer picture of a preset layer according to the target sticker template information, wherein the layer picture of the preset layer includes the target sticker, the size and position of the target sticker in the layer picture of the preset layer are determined according to the size information and position information of the target sticker, and the layer picture of the preset layer is used to be synthesized with the image frame to be displayed into a live screen; Wherein, generating a layer image of a preset layer according to the target sticker template information includes: Generate an initial sticker template image according to the target sticker template information; In response to the received modification operation on the element in the initial sticker template image, adjusting the initial sticker template image to obtain an adjusted initial sticker template image, wherein the element includes the target sticker; The layer image of the preset layer is obtained according to the adjusted initial sticker template image.
2. The method according to claim 1, characterized in that: The modification operation includes a replacement operation on the element.
3. The method according to claim 1, characterized in that The step of generating an initial sticker template image according to the target sticker template information comprises: According to the target sticker template information, an initial sticker template image adapted to the anchor terminal device is generated.
4. The method according to claim 3, characterized in that The step of generating an initial sticker template image adapted to the anchor terminal device according to the target sticker template information includes: According to the display size and resolution requirements of the anchor terminal device and the target sticker template information, an initial sticker template image adapted to the anchor terminal device is generated.
5. The method according to any one of claims 1 to 4, characterized in that: The preset layer includes a background layer and / or a foreground layer, the target sticker template information also includes size information and position information of the preset layer, and the method further includes: Collecting image frames to be displayed and using the image frames as video layer pictures; A live broadcast screen is generated according to the size information and position information of the preset layer, the layer image of the preset layer, and the video layer image.
6. The method according to claim 5, characterized in that The target sticker template information also includes size information and position information of the video layer. The generating of the live screen according to the size information and position information of the preset layer, the layer image of the preset layer, and the video layer image includes: Processing the size of the video layer picture according to the size information of the video layer to obtain a processed video layer picture; According to the processed video layer picture, the position information of the video layer, the size information and position information of the preset layer, and the layer picture of the preset layer, the processed video layer picture and the layer picture of the preset layer are drawn on the same canvas to generate the live broadcast screen, wherein the position of the processed video layer picture in the live broadcast screen is determined according to the position information of the video layer.
7. The method according to any one of claims 1 to 4, characterized in that: The target configuration file also includes text configuration information, and the layer image of the preset layer also includes text corresponding to the text configuration information.
8. A sticker template image generating device, characterized in that: Applied to the anchor terminal device, the device includes: An acquisition module, used to obtain target sticker template information from a server, wherein the target sticker template information includes a target configuration file and a target map, and the target configuration file includes size information and position information of each target map; A processing module, configured to generate a layer image of a preset layer according to the target sticker template information, wherein the layer image of the preset layer includes the target sticker, the size and position of the target sticker in the layer image of the preset layer are determined according to the size information and position information of the target sticker, and the layer image of the preset layer is used to be synthesized with the image frame to be displayed into a live screen; Wherein, the processing module is specifically used for: Generate an initial sticker template image according to the target sticker template information; In response to the received modification operation on the element in the initial sticker template image, adjusting the initial sticker template image to obtain an adjusted initial sticker template image, wherein the element includes the target sticker; The layer image of the preset layer is obtained according to the adjusted initial sticker template image.
9. A host terminal device, characterized in that: It comprises a processor and a memory, wherein the memory stores machine executable instructions that can be executed by the processor, and the processor can execute the machine executable instructions to implement the sticker template image generation method described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the sticker template image generating method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Live broadcast image rendering method and device in mobile terminal and storage medium
CN109302618A