Dynamic mask generation method and device, storage medium and electronic equipment

By providing a composite graphical interface in the terminal device and updating layer parameters in response to touch operations, generating a target frame sequence of dynamic masks, the problems of low efficiency and poor interactivity in the prior art are solved, and rich visual effects and flexible interface switching are achieved.

CN120339486APending Publication Date: 2025-07-18NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510428801.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-07
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

The prior art is inefficient and costly when generating dynamic masks, and cannot adapt to real-time interactive scenarios, resulting in a single visual effect and poor user interaction.

Method used

The terminal device provides a composite graphical interface, obtains movement parameters in response to touch operations, updates the layer parameters of the mask-associated layer, and generates a target frame sequence of dynamic masks to realize interface switching.

Benefits of technology

It improves the generation efficiency and flexibility of dynamic masks, enriches visual effects, enhances user interaction experience, and adapts to real-time interactive scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339486A_ABST
    Figure CN120339486A_ABST
Patent Text Reader

Abstract

The invention provides a dynamic mask generation method and device, a computer storage medium and electronic equipment, and relates to the technical field of image processing. The method comprises the steps that an initial frame sequence for presenting a composite graphical interface is provided through terminal equipment, the composite graphical interface at least comprises a first graphical interface and a second graphical interface covered by the first graphical interface, and the first graphical interface comprises a plurality of mask associated layers; in response to a touch operation for the composite graphical interface in the initial frame sequence, obtaining a movement parameter of the touch operation, and updating the first layer parameter of each mask associated layer according to the movement parameter to obtain an updated second layer parameter of each mask associated layer; and according to the target layer parameter of each mask associated layer, generating a target frame sequence presenting the dynamic mask, so that the first graphical interface is switched to the second graphical interface based on the dynamic mask. Dynamic mask generation can be performed efficiently and flexibly in real time, and the richness of the dynamic mask effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In interface interaction design, the masking technology is usually adopted to achieve dynamic visual effects, so as to enhance the visual performance and interaction experience in scenarios such as games, videos or others. At present, the dynamic effects are usually implemented by code, but it is only applicable to relatively simple masking effects, and the generated visual effects are single. In addition, the above method requires modifying the code again to adjust or optimize the dynamic masking effect, with low efficiency, high cost and poor user interactivity. Summary of the Invention

[0003] The present disclosure provides a method for generating a dynamic mask, a device for generating a dynamic mask, a computer storage medium and an electronic device, thereby improving the richness and efficiency of the generated visual effects, and at the same time improving user interactivity.

[0004] In a first aspect, an embodiment of the present disclosure provides a method for generating a dynamic mask, the method including: providing an initial frame sequence presenting a composite graphic interface through a terminal device, where the composite graphic interface at least includes a first graphic interface and a second graphic interface covered by the first graphic interface, and the first graphic interface includes multiple mask-related layers; in response to a touch operation on the composite graphic interface in the initial frame sequence, obtaining a movement parameter of the touch operation, and updating a first layer parameter of each mask-related layer according to the movement parameter to obtain a second layer parameter after update of each mask-related layer; generating a target frame sequence presenting a dynamic mask according to the target layer parameter of each mask-related layer, so that the first graphic interface switches to the second graphic interface based on the dynamic mask.

[0005] In a second aspect, an embodiment of the present disclosure provides a device for generating a dynamic mask, the device including: a frame sequence display module, configured to provide an initial frame sequence presenting a composite graphic interface through a terminal device, where the composite graphic interface at least includes a first graphic interface and a second graphic interface covered by the first graphic interface, and the first graphic interface includes multiple mask-related layers; a parameter update module, configured to obtain a movement parameter of the touch operation in response to a touch operation on the composite graphic interface in the initial frame sequence, and update a first layer parameter of each mask-related layer according to the movement parameter to obtain a second layer parameter after update of each mask-related layer; a dynamic mask generation module, configured to generate a target frame sequence presenting a dynamic mask according to the target layer parameter of each mask-related layer, so that the first graphic interface switches to the second graphic interface based on the dynamic mask.

[0006] In a third aspect, an embodiment of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method for generating a dynamic mask as described above is implemented.

[0007] Fourthly, an embodiment of the present disclosure provides an electronic device, including: a processor; and a memory for storing executable instructions of the processor; wherein, the processor is configured to execute the method for generating a dynamic mask as described above by executing the executable instructions.

[0008] Fifthly, an embodiment of the present disclosure provides a computer program product, including a computer program, which is executed by a processor to implement the method for generating a dynamic mask as described above.

[0009] The technical solution of the present disclosure has the following beneficial effects:

[0010] In the above method for generating a dynamic mask, an initial frame sequence for presenting a composite graphical interface is provided by a terminal device. The composite graphical interface at least includes a first graphical interface and a second graphical interface covered by the first graphical interface. The first graphical interface includes a plurality of mask-related layers; in response to a touch operation on the composite graphical interface in the initial frame sequence, a movement parameter of the touch operation is obtained, and the first layer parameter of each mask-related layer is updated according to the movement parameter to obtain a second layer parameter after update of each mask-related layer; according to the target layer parameter of each mask-related layer, a target frame sequence for presenting a dynamic mask is generated, so that the first graphical interface is switched to the second graphical interface based on the dynamic mask. On the one hand, through the touch operation on the composite graphical interface, this method can make rich picture contents generated during interface switching, and then obtain a rich dynamic mask effect, improving the user's visual effect experience, thereby solving the single visual effect implemented by program code in the prior art. On the other hand, this method only needs to update the layer parameters of each mask-related layer in real time according to the user's touch operation, and then rich picture contents can be generated during interface switching. Compared with the related technical solution that requires rewriting program code, the efficiency of generating a dynamic mask is higher, and different interface displays are shown according to different graphic parameters. Users can flexibly adjust the parameters according to their needs, thus realizing different dynamic mask effects and improving the flexibility of dynamic mask generation.

[0011] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. Description of the Drawings

[0012] The drawings here are incorporated into the specification and constitute a part of this specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure. Obviously, the drawings in the following description are only some embodiments of the present disclosure. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0013] Figure 1The architecture diagram of a dynamic mask generation system according to one of the exemplary embodiments is shown;

[0014] Figure 2 The flowchart of a dynamic mask generation method according to one of the exemplary embodiments is shown;

[0015] Figure 3A The schematic diagram of one of the first graphical interfaces according to the exemplary embodiment is shown;

[0016] Figure 3B The schematic diagram of switching a partial area of the first graphical interface to the second graphical interface through a dynamic mask according to one of the exemplary embodiments is shown;

[0017] Figure 4 The schematic diagram of one of the target blueprint frameworks according to the exemplary embodiment is shown;

[0018] Figure 5 The schematic diagram of adding multiple mask associated texture maps to the same target node according to one of the exemplary embodiments is shown;

[0019] Figure 6 The schematic diagram of the layer parameters of a mask edge layer according to one of the exemplary embodiments is shown;

[0020] Figure 7 The schematic diagram of the layer parameters of a dynamic mask layer according to one of the exemplary embodiments is shown;

[0021] Figure 8 The schematic diagram of the structure of a dynamic mask generation device according to one of the exemplary embodiments is schematically shown;

[0022] Figure 9 The schematic diagram of the structure of an electronic device according to one of the exemplary embodiments is schematically shown. Detailed implementation manners

[0023] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, the exemplary embodiments can be implemented in various forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be more complete and comprehensive, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to give a thorough understanding of the embodiments of the present disclosure. However, those skilled in the art will realize that the technical solutions of the present disclosure can be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be used. In other cases, well-known technical solutions are not shown or described in detail to avoid obscuring various aspects of the present disclosure.

[0024] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus repeated descriptions thereof will be omitted. Some of the block diagrams shown in the drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.

[0025] The flowcharts shown in the accompanying drawings are only illustrative and do not necessarily include all steps. For example, some steps can be further decomposed, while some steps can be combined or partially combined. Therefore, the actual execution order may be changed according to the actual situation.

[0026] In interface interaction design, the masking technique is usually adopted to achieve dynamic visual effects, so as to enhance the visual performance and interaction experience in games, videos or other dynamic scenarios. In the interface interaction design of modern games, the dynamicity and interactivity of the user interface become crucial, which can enhance the attractiveness and vividness of the interface display, further enhance the user's sense of participation and immersion during interface operation, and the interactive design can increase the playability and interestingness of the game, making players more engaged in the game.

[0027] In related technical solutions, the following technical solutions mainly exist:

[0028] Firstly, it is a dynamic masking technique based on code implementation.

[0029] The above method is only applicable to relatively simple masking effects, and the visual effects presented by the generated dynamic mask are relatively single. At the same time, when the interface designer needs to adjust or optimize the generated dynamic masking effect, the code must be modified again, which results in low efficiency and high cost in generating dynamic effects. In addition, the above method cannot be adapted to real-time interaction scenarios, thus affecting the user's operation experience.

[0030] Secondly, it is a pre-rendering technique based on video editing tools to generate diverse dynamic masks.

[0031] The video editing software in this method, such as After Effects, Premiere, etc., generates diverse dynamic masks through editing effects. However, this method relies on pre-rendered image sequences, and the generated mask effects need to be pre-rendered as video files in advance. Therefore, it cannot be adapted to real-time interaction scenarios, resulting in poor flexibility and scalability in the process of generating dynamic mask effects. At the same time, the parameters of the above-mentioned pre-rendered masks (such as switching speed, range, etc.) are relatively fixed, and cannot be dynamically adjusted flexibly and conveniently through user input, thus restricting their application in interactive interfaces.

[0032] In summary, the dynamic mask technology implemented by the above existing solutions is difficult to simultaneously consider development efficiency, implementation effect, and real-time interaction. Specifically, the implementation methods of the existing technologies are cumbersome and complex to modify. It is necessary to modify the program code multiple times, which is time-consuming and laborious in effect implementation and optimization, with low development efficiency. Moreover, the implementation of the effect requires frequent modification of code parameters, and designers rely on developers for collaboration, with high complexity. The existing solutions and technologies all have limitations, with single visual performance, low development and implementation efficiency, and inability to adapt to diverse real-time interaction interfaces. These problems not only affect the aesthetics and diversity of the user interface, but also limit the interactivity and flexibility of the user interface, making it difficult to meet the user's requirements for an efficient, convenient, and beautiful user interface.

[0033] In view of the above problems, the present disclosure proposes a method for generating a dynamic mask. The method for generating a dynamic mask provided by this method can be applied to any application scenario that needs to adopt dynamic mask technology to achieve rich dynamic visual effects. For example, in the design of an interactive interface in a game scenario, in order to make the interface visual effect rich and support the user to drive the multi-effect interface change of the dynamic mask in the user interface through gestures, thereby enhancing the user's sense of participation and immersion during interface operation, this method can generate rich screen content when the interface switches through touch operations on the composite graphic interface, and then obtain rich dynamic mask effects, improving the user's visual effect experience, thus solving the single visual effect achieved by using program code in the prior art. In addition, this method only needs to update the layer parameters of each mask-related layer in real time according to the user's touch operation, and then rich screen content can be generated when the interface switches. Compared with the related technical solutions that require re-writing program code, the efficiency of generating dynamic masks is higher, and different interface displays are shown according to different graphic parameters. Users can flexibly adjust the parameters according to their needs to achieve different dynamic mask effects, improving the flexibility of dynamic mask generation.

[0034] To solve the above problems, the present disclosure proposes a method and device for generating a dynamic mask. The method and device can be applied to Figure 1In the system architecture of the exemplary application environment shown.

[0035] As Figure 1 shown, the system architecture 100 may include one or more of the terminal devices 101, 102, 103, 104, the network 105, and the server 106. The network 105 is used to provide a medium for communication links between the terminal devices 101, 102, 103, 104 and the server 106. The network 105 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc. The terminal devices 101, 102, 103, 104 may be, for example, smart phones, personal digital assistants (PDAs), laptop computers, servers, desktop computers, or any other computing device with networking capabilities, but are not limited thereto.

[0036] It should be understood that Figure 1 the numbers of terminal devices, networks, and servers in are merely illustrative. According to the implementation requirements, there can be any number of terminal devices, networks, and servers. For example, the server 106 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0037] The method for generating a dynamic mask provided by the embodiments of the present disclosure can be executed on the server 106. Correspondingly, the device for generating a dynamic mask is generally set in the server 106. The method for generating a dynamic mask provided by the embodiments of the present disclosure can also be executed on the terminal device. Correspondingly, the device for generating a dynamic mask can also be set in the terminal device. The method for generating a dynamic mask provided by the embodiments of the present disclosure can also be partially executed on the server 106 and partially executed on the terminal device. Correspondingly, some modules of the device for generating a dynamic mask can be set in the server 106, and some modules can be set in the terminal device.

[0038] For example, in an exemplary embodiment, a user may provide a graphical user interface through terminal devices 101, 102, 103, or 104, and provide an initial frame sequence presenting a composite graphical interface through the terminal devices. The composite graphical interface at least includes a first graphical interface and a second graphical interface covered by the first graphical interface. The first graphical interface includes a plurality of mask-associated layers. The terminal device responds to a touch operation on the composite graphical interface in the initial frame sequence, obtains the movement parameters of the touch operation, and stores them in server 106. The terminal device updates the first layer parameters of each mask-associated layer according to the movement parameters to obtain the updated second layer parameters of each mask-associated layer. According to the target layer parameters of each mask-associated layer, a target frame sequence presenting a dynamic mask is generated, so that the first graphical interface switches to the second graphical interface based on the dynamic mask.

[0039] The method for generating a dynamic mask in one of the embodiments of the present disclosure can run on a local terminal device or a server. When the method for generating a dynamic mask runs on the server, the method can be implemented and executed based on a cloud interaction system, where the cloud interaction system includes a server and client devices.

[0040] In an alternative embodiment, various cloud applications can run under the cloud interaction system, such as cloud games. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the running entity of the game program and the presenting entity of the game screen are separated. The storage and operation of the method for generating a dynamic mask are completed on the cloud game server. The role of the client device is for data reception, sending, and presenting the game screen. For example, the client device can be a display device with data transmission function near the user side, such as a mobile terminal, a television, a computer, a palm computer, etc.; however, the information processing is performed by the cloud game server in the cloud. When playing a game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses data such as the game screen, returns it to the client device through the network, and finally, the client device decodes and outputs the game screen.

[0041] In an optional embodiment, taking a game as an example, the local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, conventionally, the game program is downloaded and installed on an electronic device and run. The manner in which the local terminal device provides the graphical user interface to the player can include various methods. For example, it can be rendered and displayed on the display screen of the terminal, or provided to the player through holographic projection. For example, the local terminal device can include a display screen and a processor. The display screen is used to present the graphical user interface, and the graphical user interface includes a game screen. The processor is used to run the game, generate the graphical user interface, and control the display of the graphical user interface on the display screen.

[0042] In a possible implementation manner, an embodiment of the present invention provides a method for generating a dynamic mask. A graphical user interface is provided through a terminal device, where the terminal device can be the aforementioned local terminal device or the client device in the aforementioned cloud interaction system.

[0043] However, those skilled in the art can easily understand that the above application scenarios are only for examples, and the present exemplary embodiment is not limited thereto.

[0044] Taking the above terminal device as the execution subject, the method for generating a dynamic mask is applied to the above terminal device as an example for illustration. A graphical user interface is provided through the above terminal device, where the terminal device can be the aforementioned local terminal device or the client device in the aforementioned cloud interaction system. Figure 2 The flowchart of a method for generating a dynamic mask in this exemplary embodiment is schematically shown. Please refer to Figure 2 , the method for generating a dynamic mask provided by the embodiments of the present disclosure includes the following steps S201-step S203:

[0045] Step S201: Provide an initial frame sequence presenting a composite graphical interface through a terminal device. The composite graphical interface at least includes a first graphical interface and a second graphical interface covered by the first graphical interface. The first graphical interface includes a plurality of mask-related layers.

[0046] Step S202: In response to a touch operation on the composite graphical interface in the initial frame sequence, obtain the movement parameters of the touch operation, and update the first layer parameters of each mask-related layer according to the movement parameters to obtain the updated second layer parameters of each mask-related layer.

[0047] Step S203: Generate a target frame sequence presenting a dynamic mask according to the target layer parameters of each mask-related layer, so that the first graphical interface switches to the second graphical interface based on the dynamic mask.

[0048] InFigure 2 In the provided technical solution, an initial frame sequence presenting a composite graphical interface is provided by a terminal device. The composite graphical interface includes at least a first graphical interface and a second graphical interface covered by the first graphical interface. The first graphical interface includes multiple mask-related layers; in response to a touch operation on the composite graphical interface in the initial frame sequence, movement parameters of the touch operation are obtained, and first layer parameters of each mask-related layer are updated according to the movement parameters to obtain second layer parameters after update of each mask-related layer; according to the target layer parameters of each mask-related layer, a target frame sequence presenting a dynamic mask is generated, so that the first graphical interface is switched to the second graphical interface based on the dynamic mask. On the one hand, through the touch operation on the composite graphical interface, rich picture content can be generated during interface switching, and then a rich dynamic mask effect can be obtained, improving the user's visual effect experience, thereby solving the single visual effect implemented by program code in the prior art. On the other hand, this method only needs to update the layer parameters of each mask-related layer in real time according to the user's touch operation, and rich picture content can be generated during interface switching. Compared with the related technical solutions that require rewriting program code, the efficiency of generating a dynamic mask is higher, and different interface displays are shown according to different graphic parameters. Users can flexibly adjust the parameters according to their needs, thus realizing different dynamic mask effects and improving the flexibility of dynamic mask generation.

[0049] The following will combine specific embodiments to Figure 2 elaborate in detail on the specific implementation manners of each step in the

[0050] In step S201, an initial frame sequence presenting a composite graphical interface is provided by a terminal device. The composite graphical interface includes at least a first graphical interface and a second graphical interface covered by the first graphical interface. The first graphical interface includes multiple mask-related layers.

[0051] Among them, the composite graphical interface includes a first graphical interface and a second graphical interface covered by the first graphical interface. That is, the first graphical interface is located on the top layer, and the second graphical interface is located below the first graphical interface. By processing the dynamic mask, the first graphical interface can be switched to the second graphical interface.

[0052] For the sake of easy understanding, the following will combine Figure 3A 、 Figure 3B the shown dust wiping effect to illustrate the above composite graphical interface.

[0053] Figure 3A shows a schematic diagram of one of the first graphical interfaces in this exemplary embodiment; referring to Figure 3AThe initial frame sequence shown includes a first graphical interface before dust removal, and at this time, the first graphical interface is displayed as a dust effect. When the dynamic mask for removing dust is used, the pattern in the Figure 3B second graphical interface shown can be switched and displayed from the first graphical interface.

[0054] Through Figure 3A 、 Figure 3B it can be known that the composite graphical interface includes a first graphical interface and a second graphical interface. The first graphical interface is located on the top layer and covers the second graphical interface. Through the processing of the mask texture, the second graphical interface can be displayed from the first graphical interface.

[0055] Exemplarily, the picture in the initial sequence of frames provided by the terminal device presents a composite graphical interface, and the first graphical interface covers the second graphical interface. That is to say, before the dynamic mask is displayed, only the first graphical interface is displayed in the composite graphical interface.

[0056] In one embodiment, a composite graphical interface can be connected and generated in the user interface environment by using a blueprint shader to encode with blueprint nodes. It can be understood that, in addition to the above embodiments, other tools can also be used to generate the composite graphical interface, and the embodiments of the present disclosure do not impose any special restrictions on this.

[0057] Among them, the first graphical interface includes multiple mask-related layers.

[0058] Exemplarily, the first graphical interface is obtained by superimposing multiple mask-related layers.

[0059] In an optional embodiment of the present disclosure, the multiple mask-related layers include at least two of the first mask layer, the second mask layer, the bottom layer, the mask edge layer, the mask display layer, and the dynamic mask layer.

[0060] Among them, the first mask layer is a layer representing the mask texture, the second mask layer is a layer representing the area in the mask texture that does not include the dynamic mask area, the bottom layer is a layer representing the second graphical interface displayed after removing the mask, the mask edge layer is a layer representing the dynamic mask edge area, the mask display layer is a layer representing the display control layer of the mask texture, and the dynamic mask layer is a layer representing the dynamic mask area determined based on the touch operation.

[0061] Exemplarily, the first graphical interface can be obtained by superimposing two or more of the first mask layer, the second mask layer, the bottom layer, the mask edge layer, the mask display layer, and the dynamic mask layer. The first mask layer is simply referred to as the mask layer and is used to display the used mask texture. For example Figure 3AUse a dust mask texture map; the underlying layer is a layer that represents the second graphical interface after the mask is removed, for example Figure 3B The pattern displayed after removing the dust mask; the mask edge layer, which can also be called the mask edge control layer, for example Figure 3B The edge area at the connection between the first graphical interface and the second graphical interface in Figure 3B ; the mask display layer is a layer used to represent the display control of the entire mask texture map, and the dynamic mask layer is a layer that represents the dynamic mask area determined based on touch operations.

[0062] In an optional embodiment of the present disclosure, the first mask layer, the underlying layer, and the mask display layer are all layer sets composed of multiple layers.

[0063] In related technical solutions, usually a single picture is used as the mask texture map. For example, if the mask texture map shows a cloud effect, then a picture containing the cloud effect is used as the mask texture map. However, the above technical solutions result in poor richness and flexibility of the cloud effect displayed on the ground.

[0064] For the richness of the dynamic mask texture map, the embodiments of the present disclosure can design the first mask layer, the underlying layer, and the mask display layer as layer sets composed of multiple layers. Taking the mask texture map corresponding to the first mask layer as a cloud as an example, after the clouds of multiple layers are superimposed, the finally displayed cloud effect can be made more rich and diverse, and subsequently, when performing step S202, the cloud parameters can be modified to adapt to the corresponding cloud effect.

[0065] Furthermore, for multiple mask-related layers displayed on the first graphical interface, the following embodiments can be implemented:

[0066] In an optional embodiment of the present disclosure, a target blueprint framework is constructed; multiple mask-related layers included in the first graphical interface are added to the same target node in the target blueprint framework in a preset order.

[0067] Among them, the blueprint framework is a framework generated using the blueprint node encoding mechanism, that is, the blueprint framework contains multiple nodes.

[0068] In related technical solutions, usually program code is used to implement the dynamic mask effect, which results in a relatively high coupling degree between each functional module. When it is necessary to update the dynamic mask, it is necessary to rewrite the program code, which will greatly increase the complexity of the work and affect the generation efficiency of the dynamic mask effect.

[0069] To solve the problem of strong coupling between the above-mentioned functional modules, the embodiments of the present disclosure adopt the method of constructing a target blueprint framework. For example, a target blueprint framework is constructed in the Turbo engine, which adopts an event-driven method. That is, each node in the target blueprint framework takes the execution event as the main node, and the event parameters corresponding to the execution event and the parameter values corresponding to the event parameters are used as slave nodes, thereby constructing the corresponding relationship between the above-mentioned execution event, event parameters, and event parameter values.

[0070] The following will be combined with Figure 4 to give an exemplary description of the target blueprint framework.

[0071] Referring to Figure 4 , it is the constructed target blueprint framework, which contains multiple execution event nodes. For example, it contains a node for the blueprint tick event, and this event contains Splendor parameter 1 and Splendor parameter 2. Taking Splendor parameter 2 as an example, the parameter name passed is bUpdata, and the parameter value is 0.000.

[0072] Through Figure 4 the shown target blueprint framework, the corresponding relationship between each execution event, event parameters, and event parameter values can be constructed through the nodes in the blueprint framework. This blueprint structure is convenient for driving with execution events, taking each execution event as an independent event, which can reduce the coupling degree between each event module, and thus can flexibly and efficiently process dynamic masks.

[0073] On the basis of constructing the target blueprint framework, the picture file can be divided into multiple sub-nodes according to the layer effect, which respectively correspond to multiple mask-related layers included in the first graphic interface, and can be added to the same target node in the target blueprint framework according to the preset order.

[0074] Taking the six layers of multiple mask-related layers as the first mask layer, the second mask layer, the bottom layer, the mask edge layer, the mask display layer, and the dynamic mask layer as an example, the above six layers are respectively used as sub-nodes to add them to the same target node in the target blueprint framework, so that the mask texture and the masked layer elements are placed in the same node, which is convenient for subsequent connection to the corresponding blueprint recognition operation through the node, and helps to better control the picture information in the subsequent rendering and synthesis process.

[0075] Referring to Figure 5 , in the process of adding the above six layers to the same target node, the arrangement order between the six layers can be determined according to the relationship of the dynamic mask. For example, for the above six layers, according to the first mask layer (layer 1, corresponding to Figure 5 the top layer in Figure 5the underlying layer), the mask edge layer (layer 3, corresponding to Figure 5 the edge effect control layer in), the second mask layer (layer 4, corresponding to Figure 5 the UI information layer in), the mask display layer (layer 5, corresponding to Figure 5 the mask display control layer in), the dynamic mask layer (layer 6, corresponding to Figure 5 the dynamic mask shape control layer in) in the order.

[0076] Based on the structure built in the above embodiment, when it is necessary to modify or add each mask-related layer, it is necessary to ensure that the original layer order remains unchanged.

[0077] When adding a mask-related layer, in some exemplary embodiments of the present disclosure, in response to adding a target mask-related layer, the target mask-related layer is added to the last position in the target node.

[0078] Exemplarily, that is, the target mask-related layer is added to the last position in the target node. For example, on the basis of Figure 5 , the newly added target mask-related layer can be added to the 7th sub-node, that is, after the dynamic mask shape control layer in the 6th layer.

[0079] In step S202, in response to a touch operation on the composite graphical interface in the initial frame sequence, the movement parameters of the touch operation are obtained, and the first layer parameters of each mask-related layer are updated according to the movement parameters to obtain the updated second layer parameters of each mask-related layer.

[0080] Among them, the touch operation can be a sliding operation, or a dragging operation triggered by a long-press operation and dragging the touch point to move. The movement parameters include parameters such as the movement distance, movement coordinates, and the movement range and movement trajectory formed based on the movement coordinates.

[0081] It should be noted that for a touch screen terminal (such as a mobile phone), the touch operation can be a sliding operation performed by touching the screen; while for a non-touch screen terminal (such as a laptop computer, a desktop computer, etc.), it can be that the user long-presses the mouse and drags the mouse to move the mouse point on the screen. The embodiments of the present disclosure do not make any special restrictions on this.

[0082] Exemplarily, when the terminal device detects a touch operation on the composite graphical interface in the initial frame sequence, it can obtain the movement parameters of the touch operation in real time. Taking the target blueprint framework running environment in the Turbo engine as an example, the contact state of the input device can be captured in real time and the corresponding movement parameters can be generated in the target blueprint framework.

[0083] Based on the movement parameters obtained from the touch operations on the composite graphical interface, the first layer parameters of each mask-associated layer are updated, and the terminal device generates the movement parameters of the current operation based on continuous operations. A single continuous operation can be regarded as a rendering cycle.

[0084] In an alternative embodiment of the present disclosure, a continuous trajectory for the touch operation is constructed based on the movement parameters; a quadratic Bezier approximation model of the continuous trajectory is constructed.

[0085] Exemplarily, a single continuous touch operation of an evaporation machine can correspondingly generate a continuous trajectory of the touch operation. In this embodiment, a motion trajectory prediction algorithm based on frame interpolation is adopted to construct a quadratic Bezier approximation model of the continuous trajectory within each rendering cycle.

[0086] Through the above embodiments, by constructing a quadratic Bezier approximation model of the continuous trajectory, the problem of path breakage caused by the input sampling interval can be effectively eliminated, thereby facilitating the determination of the dynamic mask range through continuous touch operations, and then the interface switching effect can be realized according to the user's operations, improving the user's interaction perception, and further enhancing the user's operation experience.

[0087] Furthermore, since the above embodiments require the terminal device to obtain the operation parameters of the touch operation in real time, resulting in a large amount of operation parameters being obtained. To improve the efficiency between data processing and transmission and avoid blocking due to the large amount of data, in an alternative embodiment of the present disclosure, the movement parameters of the touch operation are stored based on a double-buffer caching mechanism.

[0088] Among them, the double-buffer caching mechanism, also known as the ping-pong mechanism (Ping-Pong Buffering or Double Buffering), stores data alternately using two buffers.

[0089] After determining the movement parameters in the above steps, the first layer parameters of each mask-associated layer can be updated according to the movement parameters to obtain the updated second layer parameters of each mask-associated layer.

[0090] Among them, according to the mask effect, the content of nodes 1, 2, and 4 in Figure 5 can be modified and replaced. For nodes 3, 5, and 6 in Figure 5 , the first layer parameters of the mask edge layer, the mask display layer, and the dynamic mask layer need to be updated according to the movement parameters, and the updated second layer parameters of the mask edge layer, the mask display layer, and the dynamic mask layer are updated to the node information corresponding to the target node; the target blueprint framework is controlled to perform the screen rendering of the target frame sequence of the dynamic mask based on the node information corresponding to the target node.

[0091] Exemplarily, whenFigure 5 After the layer parameters of nodes 3, 5, and 6 in are updated, the modified second layer parameters need to update the node information at the corresponding target nodes in the blueprint. The node links in the blueprint framework to the corresponding blueprint recognition operations, which can help to better control the picture information in the subsequent rendering and synthesis processes.

[0092] The following will describe the layer parameters of the mask edge layer and the layer parameters of the dynamic mask layer in conjunction with specific embodiments.

[0093] In an optional embodiment of the present disclosure, the layer parameters of the mask edge layer include: one or more of mask edge map information, mask edge glow information, texture edge stretch information, texture edge repeat information, mask edge coordinate offset parameter, and mask edge coordinate texture speed parameter; the layer parameters of the dynamic mask layer include: one or more of dynamic mask shape map information, rendering map information, dynamic mask shape coordinate scaling parameter, dynamic mask shape coordinate offset parameter, and dynamic mask shape intensity parameter.

[0094] Refer to Figure 6 As shown in the layer parameters of the mask edge layer, it can be seen from Figure 6 that it can include mask edge map information, which can be multiple mask edge maps for selection or superposition. Whether to make the edge glow can be selected through the mask edge glow information, and parameters such as texture edge stretch information, texture edge repeat information, mask edge coordinate offset parameter, and mask edge coordinate texture speed parameter are provided for the user to flexibly select.

[0095] Figure 7 As shown in the layer parameters of the dynamic mask layer, the main shape map of the dynamic mask and the rendering map used are determined according to the user's touch operation. Parameters such as the X / Y axis scaling of the mask shape, the X / Y offset values of the mask shape, and the dynamic intensity of the mask shape can also be recognized according to the user's touch operation.

[0096] In step S203, according to the target layer parameters of each mask-related layer, a target frame sequence presenting the dynamic mask is generated, so that the first graphical interface switches to the second graphical interface based on the dynamic mask.

[0097] Exemplarily, after determining the target layer parameters of each mask-related layer, a target frame sequence presenting the dynamic mask effect can be generated, so that the first graphical interface switches to the second graphical interface through the dynamic mask. For example, the interface switching process between Figure 3A - Figure 3B can be referred to.

[0098] To implement the above method for generating a dynamic mask, an embodiment of the present disclosure provides a device for generating a dynamic mask. Figure 8A schematic architecture diagram of a dynamic mask generation device is schematically shown.

[0099] Among them, the dynamic mask generation device 800 includes a frame sequence display module 801, a parameter update module 802, and a dynamic mask generation module 803.

[0100] The frame sequence display module 801 is used to provide an initial frame sequence for presenting a composite graphical interface through a terminal device. The composite graphical interface at least includes a first graphical interface and a second graphical interface covered by the first graphical interface. The first graphical interface includes multiple mask-related layers. The parameter update module 802 is used to obtain the movement parameters of a touch operation in response to a touch operation on the composite graphical interface in the initial frame sequence, and update the first layer parameters of each mask-related layer according to the movement parameters to obtain the updated second layer parameters of each mask-related layer. The dynamic mask generation module 803 is used to generate a target frame sequence for presenting a dynamic mask based on the target layer parameters of each mask-related layer, so that the first graphical interface switches to the second graphical interface based on the dynamic mask.

[0101] In an optional embodiment of the present disclosure, the multiple mask-related layers include at least two of a first mask layer, a second mask layer, a bottom layer, a mask edge layer, a mask display layer, and a dynamic mask layer. Among them, the first mask layer is a layer representing a mask map, the second mask layer is a layer representing the area in the mask map that does not include the dynamic mask area, the bottom layer is a layer representing the second graphical interface after removing the mask, the mask edge layer is a layer representing the dynamic mask edge area, the mask display layer is a display control layer of the mask map, and the dynamic mask layer is a layer representing the dynamic mask area determined based on the touch operation.

[0102] In an optional embodiment of the present disclosure, the first mask layer, the bottom layer, and the mask display layer are all layer sets composed of multiple layers.

[0103] In an optional embodiment of the present disclosure, the device further includes a blueprint framework construction module and a layer addition module. The blueprint framework construction module is used to construct a target blueprint framework. Among them, the target blueprint framework is an event-driven blueprint framework, and each node of the target blueprint framework is each execution event, the event parameters corresponding to each execution event, and the parameter values corresponding to each event parameter. The layer addition module is used to add the multiple mask-related layers included in the first graphical interface to the same target node in the target blueprint framework in a preset order.

[0104] In an optional embodiment of the present disclosure, the layer addition module is further used to add a target mask-related layer to the last position in the target node in response to adding a target mask-related layer.

[0105] In an optional embodiment of the present disclosure, the parameter update module 802 is specifically configured to update the first layer parameters of the mask edge layer, the mask display layer, and the dynamic mask layer according to the movement parameters, and update the updated second layer parameters of the mask edge layer, the mask display layer, and the dynamic mask layer to the node information corresponding to the target node; control the target blueprint framework to perform the screen rendering of the target frame sequence of the dynamic mask based on the node information corresponding to the target node.

[0106] In an optional embodiment of the present disclosure, the layer parameters of the mask edge layer include one or more of: mask edge texture map information, mask edge glow information, texture edge stretching information, texture edge repeating information, mask edge coordinate offset parameter, mask edge coordinate texture speed parameter; the layer parameters of the dynamic mask layer include one or more of: shape texture map information of the dynamic mask, rendering texture map information, dynamic mask shape coordinate scaling parameter, dynamic mask shape coordinate offset parameter, intensity parameter of the dynamic mask shape.

[0107] In an optional embodiment of the present disclosure, the device further includes a trajectory construction module and a model construction module. The trajectory construction module is configured to construct a continuous trajectory for the touch operation based on the movement parameters; the model construction module is configured to construct a quadratic Bezier approximation model of the continuous trajectory.

[0108] In an optional embodiment of the present disclosure, the device further includes a storage module, and the storage module is configured to store the movement parameters of the touch operation based on the double-buffer caching mechanism.

[0109] The dynamic mask generation device 800 provided by the embodiments of the present disclosure can execute the technical solutions of the dynamic mask generation method in any of the above embodiments. The implementation principle and the beneficial effects are similar to those of the dynamic mask generation method. For details, reference can be made to the implementation principle and the beneficial effects of the dynamic mask generation method, which will not be elaborated here.

[0110] In an exemplary embodiment of the present disclosure, there is also provided a computer-readable storage medium, on which a program product capable of implementing the methods described in this specification is stored. In some possible implementations, various aspects of the present invention can also be implemented in the form of a program product, which includes program code. When the program product runs on a terminal device, the program code is used to cause the terminal device to execute the steps according to various exemplary embodiments of the present invention described in the "Exemplary Methods" section of this specification.

[0111] A program product for implementing the above method according to an embodiment of the present invention may be a portable compact disc read-only memory (CD-ROM) and includes program code, and may run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited thereto. In this document, a readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0112] The program product may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, but not be limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0113] The computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries the readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable signal medium may also be any readable medium other than the readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0114] The program code contained on the readable medium may be transmitted by any appropriate medium, including but not limited to wireless, wired, optical fiber, radio frequency (RF), etc., or any suitable combination of the above.

[0115] The program code for performing the operations of the present invention can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and also including conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computing device, partially on the user's device, executed as a stand-alone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user's computing device through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or can be connected to an external computing device (e.g., by connecting through the Internet using an Internet service provider).

[0116] In an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above method is also provided.

[0117] Those skilled in the art can understand that various aspects of the present invention can be implemented as a system, method, or program product. Therefore, various aspects of the present invention can be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which can be collectively referred to as "circuitry", "module", or "system" here.

[0118] The following refers to Figure 9 to describe the electronic device 900 according to this embodiment of the present invention. Figure 9 The electronic device 900 shown is merely an example and should not impose any limitations on the functions and usage scope of the embodiments of the present invention.

[0119] As Figure 9 shown, the electronic device 900 is presented in the form of a general-purpose computing device. The components of the electronic device 900 may include, but are not limited to: the at least one processing unit 910 described above, the at least one storage unit 920 described above, a bus 930 connecting different system components (including the storage unit 920 and the processing unit 910), and a display unit 940.

[0120] Among them, the storage unit stores program code, and the program code can be executed by the processing unit 910, so that the processing unit 910 executes the steps according to various exemplary embodiments of the present invention described in the above "Exemplary Method" section of this specification. For example, the processing unit 910 can execute steps S201 to S203 as Figure 2 shown.

[0121] The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 9201 and / or a cache storage unit 9202, and may further include a read-only storage unit (ROM) 9203.

[0122] The storage unit 920 may also include a program / utilities 9204 having a set (at least one) of program modules 9205. Such program modules 9205 include, but are not limited to: an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment.

[0123] The bus 930 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus structures.

[0124] The electronic device 900 may also communicate with one or more external devices 1000 (such as a keyboard, a pointing device, a Bluetooth device, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 900, and / or may communicate with any device that enables the electronic device 900 to communicate with one or more other computing devices (such as a router, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 950. Moreover, the electronic device 900 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 960. As shown in the figure, the network adapter 960 communicates with other modules of the electronic device 900 through the bus 930. It should be understood that although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, redundant arrays of independent disks (RAID) systems, magnetic tape drives, and data backup storage systems, etc.

[0125] Through the description of the above embodiments, those skilled in the art can easily understand that the example embodiments described herein can be implemented by software, or can be implemented by a combination of software and necessary hardware. Therefore, the technical solutions according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which may be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which may be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.

[0126] In addition, the above-mentioned drawings are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present invention, rather than for limiting purposes. It is easily understood that the processes shown in the above-mentioned drawings do not indicate or limit the chronological order of these processes. Additionally, it is also easily understood that these processes can be executed, for example, synchronously or asynchronously in multiple modules.

[0127] It should be noted that although several modules or units of the device for action execution are mentioned in the above detailed description, such a division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more of the above-mentioned modules or units can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0128] Those skilled in the art will readily conceive of other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include well-known knowledge or conventional technical means in the technical field not disclosed in the present disclosure. The specification and embodiments are only regarded as exemplary, and the true scope and spirit of the present disclosure are pointed out by the claims.

[0129] It should be understood that the present disclosure is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present disclosure is only defined by the appended claims.

Claims

1. A method for generating a dynamic mask, characterized in that, Including: Providing an initial frame sequence for presenting a composite graphical interface through a terminal device, where the composite graphical interface at least includes a first graphical interface and a second graphical interface covered by the first graphical interface, and the first graphical interface includes multiple mask-related layers; In response to a touch operation on the composite graphical interface in the initial frame sequence, obtaining the movement parameters of the touch operation, and updating the first layer parameters of each mask-related layer according to the movement parameters to obtain the updated second layer parameters of each mask-related layer; Generating a target frame sequence for presenting a dynamic mask according to the target layer parameters of each mask-related layer, so that the first graphical interface switches to the second graphical interface based on the dynamic mask.

2. The method according to claim 1, wherein The multiple mask-related layers include at least two of a first mask layer, a second mask layer, a bottom layer, a mask edge layer, a mask display layer, and a dynamic mask layer; Wherein, the first mask layer is a layer representing a mask texture map, the second mask layer is a layer representing the area in the mask texture map that does not include the dynamic mask area, the bottom layer is a layer representing the second graphical interface displayed after removing the mask, the mask edge layer is a layer representing the edge area of the dynamic mask, the mask display layer is a display control layer of the mask texture map, and the dynamic mask layer is a layer representing the dynamic mask area determined based on the touch operation.

3. The method according to claim 2, wherein The first mask layer, the bottom layer, and the mask display layer are all layer sets composed of multiple layers.

4. The method according to claim 1 or 2, characterized in that, The method further includes: Constructing a target blueprint framework; wherein, the target blueprint framework is an event-driven blueprint framework, and each node of the target blueprint framework is each execution event, the event parameters corresponding to each execution event, and the parameter values corresponding to each event parameter; Adding the multiple mask-related layers included in the first graphical interface to the same target node in the target blueprint framework in a preset order.

5. The method according to claim 4, wherein The method further includes: In response to adding a target mask-related layer, adding the target mask-related layer to the last position in the target node.

6. The method according to claim 4, wherein The updating the first layer parameters of each mask-related layer according to the movement parameters to obtain the updated second layer parameters of each mask-related layer includes: Updating the first layer parameters of the mask edge layer, the mask display layer, and the dynamic mask layer according to the movement parameters, and updating the updated second layer parameters of the mask edge layer, the mask display layer, and the dynamic mask layer to the node information corresponding to the target node; Controlling the target blueprint framework to perform the screen rendering of the target frame sequence of the dynamic mask based on the node information corresponding to the target node.

7. The method according to claim 6, characterized in that The layer parameters of the mask edge layer include one or more of: mask edge map information, mask edge glow information, texture edge stretching information, texture edge repeating information, mask edge coordinate offset parameters, and mask edge coordinate texture speed parameters; the layer parameters of the dynamic mask layer include one or more of: shape map information of the dynamic mask, rendering map information, dynamic mask shape coordinate scaling parameters, dynamic mask shape coordinate offset parameters, and intensity parameters of the dynamic mask shape.

8. The method according to claim 1, wherein The method further includes: Constructing a continuous trajectory for the touch operation based on the movement parameters; Constructing a quadratic Bezier approximation model of the continuous trajectory.

9. The method according to claim 1, wherein The method further includes: Storing the movement parameters of the touch operation based on a double-buffer caching mechanism.

10. A device for generating a dynamic mask, characterized in that, The device includes: A frame sequence display module, configured to provide an initial frame sequence for presenting a composite graphical interface through a terminal device, where the composite graphical interface at least includes a first graphical interface and a second graphical interface covered by the first graphical interface, and the first graphical interface includes a plurality of mask-related layers; A parameter update module, configured to, in response to a touch operation on the composite graphical interface in the initial frame sequence, obtain the movement parameters of the touch operation, and update the first layer parameters of each mask-related layer according to the movement parameters to obtain the updated second layer parameters of each mask-related layer; A dynamic mask generation module, configured to generate a target frame sequence presenting a dynamic mask according to the target layer parameters of each mask-related layer, so that the first graphical interface switches to the second graphical interface based on the dynamic mask.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method for generating a dynamic mask according to any one of claims 1 to 9.

12. An electronic device, characterized in that, Including: A processor; And A memory, configured to store executable instructions of the processor; Wherein, the processor is configured to execute the method for generating a dynamic mask according to any one of claims 1 to 9 by executing the executable instructions.