Dynamic fluid display method, device, electronic device and readable medium

By superimposing fluid in the user display interface and controlling the changes in fluid parameters according to the attribute information of the target object, the problem of single interaction mode on the mobile terminal is solved, dynamic fluid effects are achieved, and the fun and interactivity are enhanced.

CN114757815BActive Publication Date: 2025-09-23BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011565590.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-25
Publication Date
2025-09-23
Estimated Expiration
2041-03-05

AI Technical Summary

Technical Problem

The interactive mode of mobile terminals in the prior art is simple and not very interesting.

Method used

By superimposing the fluid and background image in the user display interface, the fluid parameter changes are controlled according to the attribute information of the target object to achieve a dynamic fluid effect.

Benefits of technology

It enhances the novelty and fun of the interaction method, and drives the background image to flow together through the fluid, providing a more attractive user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114757815B_ABST
    Figure CN114757815B_ABST
Patent Text Reader

Abstract

The present disclosure provides a dynamic fluid display method, device, electronic device and readable medium, which relate to the field of computer technology. The method includes: in response to the user's image input operation, displaying the image corresponding to the image input operation on the user display interface, and superimposing the fluid and the image; when the target object is detected in the user display interface, obtaining the attribute information of the target object; according to the attribute information, determining the change of the parameters of the fluid at each target texture pixel position related to the target object in the image; according to the change of the parameters of the fluid at each target texture pixel position, displaying the dynamic fluid in the image. The technical solution disclosed in the present disclosure can receive the background image input by the user, superimpose the fluid and the background image, and control the parameter change of the fluid in the image according to the attribute information of the target object detected in the user display interface, so as to realize that the fluid drives the background image to flow together, and the interactive method is novel and interesting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a dynamic fluid display method, device, electronic device, and readable medium. Background Art

[0002] With the rapid development of computer and communication technologies, various applications based on terminal devices have become widely used, greatly enriching people's daily lives. Users can use these applications for entertainment, sharing their daily lives with other users, and more. To enhance the fun, interactive features are often added to gaming or video capture applications to improve the user experience.

[0003] However, in the existing technology, the interactive mode applied on the mobile terminal has a single gameplay and is not very interesting. Summary of the Invention

[0004] The present disclosure provides a dynamic fluid display method, device, electronic device and readable medium, which are used to solve the problems existing in the prior art.

[0005] In a first aspect, a dynamic fluid display method is provided, the method comprising:

[0006] In response to the user's image input operation, an image corresponding to the image input operation is displayed on the user display interface, and the fluid is superimposed on the image;

[0007] When a target object is detected in the user display interface, acquiring attribute information of the target object;

[0008] determining, in the image, a change in a parameter of a fluid at each target texture pixel position associated with the target object based on the attribute information;

[0009] According to the change of the parameters of the fluid at each target texture pixel position, the dynamic fluid is displayed in the image.

[0010] In a second aspect, a dynamic fluid display device is provided, the device comprising:

[0011] A first display module is configured to display an image corresponding to the image input operation on the user display interface in response to the user's image input operation, and to superimpose the fluid and the image;

[0012] An acquisition module, configured to acquire attribute information of a target object when a target object is detected in the user display interface;

[0013] a determination module, configured to determine, in the image, a change in a parameter of a fluid at each target texture pixel position associated with the target object based on the attribute information;

[0014] The second display module is configured to display the dynamic fluid in an image according to changes in parameters of the fluid at each target texture pixel position.

[0015] In a third aspect, the present disclosure provides an electronic device, the electronic device comprising:

[0016] one or more processors;

[0017] A memory stores one or more applications, wherein when the one or more applications are executed by one or more processors, the electronic device performs operations corresponding to the dynamic fluid display method shown in the first aspect of the present disclosure.

[0018] In a fourth aspect, the present disclosure provides a computer-readable medium for storing computer instructions. When the computer instructions are executed by a computer, the computer can execute the dynamic fluid display method as shown in the first aspect of the present disclosure.

[0019] In a fifth aspect, the present disclosure provides a computer program product, comprising computer instructions, which, when executed by a computer, implement the dynamic fluid display method as shown in the first aspect of the present disclosure.

[0020] The beneficial effects of the technical solutions provided by this disclosure may include:

[0021] The dynamic fluid display method, device, electronic device and readable medium provided in the embodiments of the present disclosure can receive a background image input by the user, and display the fluid and the background image in an overlaid manner. When a target object is detected in the user display interface, the parameter changes of the fluid in the image are controlled according to the attribute information of the target object detected in the user display interface, and the dynamic fluid is displayed, thereby realizing that the fluid drives the background image to flow together. The interactive method is novel and interesting. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following briefly introduces the drawings required for describing the embodiments of the present disclosure.

[0023] Figure 1 A schematic flow chart of a dynamic fluid display method provided in an embodiment of the present disclosure;

[0024] Figure 2 A schematic structural diagram of a dynamic fluid display device provided in an embodiment of the present disclosure;

[0025] Figure 3 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0026] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0027] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0028] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "based, at least in part, on." The term "one embodiment" means "at least one embodiment," the term "another embodiment" means "at least one additional embodiment," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0029] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish devices, modules or units, and are not used to limit these devices, modules or units to be different devices, modules or units, nor are they used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0030] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0031] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0032] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.

[0033] The technical solution disclosed herein can be applied to applications involving the production, application, and use of dynamic fluid effects. The technical solution disclosed herein can be applied to terminal devices, which may include mobile terminals or computer devices. Mobile terminals may include, for example, smartphones, PDAs, tablet computers, wearable devices with displays, and the like; computer devices may include, for example, desktop computers, laptops, all-in-one computers, smart home devices, and the like.

[0034] The technical solution disclosed in the present invention can be implemented by a graphics processing unit (GPU) in a terminal device.

[0035] Figure 1 A flow chart of a dynamic fluid display method provided by an embodiment of the present disclosure is shown as follows: Figure 1 As shown, the method may include:

[0036] Step S101 : In response to an image input operation by a user, an image corresponding to the image input operation is displayed on a user display interface, and the fluid is superimposed on the image.

[0037] Among them, the user display interface can be a display interface in an application. The solution provided by the embodiment of the present disclosure can be implemented as an application or a functional plug-in of the application. When the terminal device detects the user's startup instruction for the application, the application is started and the user display interface is displayed; or, when the terminal device detects the user's trigger instruction for the functional plug-in of the application, the user display interface is displayed.

[0038] The terminal device can receive an image input by the user as a background image, and divide the background image into multiple grids, divided in the horizontal and vertical directions, where the horizontal direction corresponds to the width of the image and the vertical direction corresponds to the height of the image. Each grid corresponds to the position of each texture pixel of the GPU one-to-one. In a two-dimensional plane, the texture pixel corresponds to the position of the screen display pixel of the terminal device one-to-one. When the background image is displayed in the user display interface, each texture pixel corresponds to each pixel in the background image one-to-one, that is, each grid corresponds to each pixel in the background image one-to-one. Fluid is displayed in the background image, and texture pixels are used to save the parameters of the fluid corresponding to each grid, including initial velocity parameters, etc.

[0039] The background image can be any color, either single or multi-colored. The fluid can be any color, either static or in motion, and is displayed superimposed on the user-entered background image. Optionally, the fluid color and the background image can be different, resulting in a better display effect when the fluid and background image are displayed in the user interface.

[0040] In one example, the fluid is in a colorless, transparent, and static state, and the background image is an image composed of multiple colors showing a landscape. The fluid is superimposed on the background image, and a background image superimposed with a layer of transparent fluid is presented in the user display interface.

[0041] Step S102: When a target object is detected in the user display interface, attribute information of the target object is obtained.

[0042] The target object may be a specific object in the video, including but not limited to: the face, head, gesture, finger, etc. of a person or other creature.

[0043] Among them, gestures may include but are not limited to: pointing up, making a fist, making a heart shape, giving a thumbs up, etc.

[0044] The terminal device may activate a video capture device (e.g., a camera) of the terminal device to capture video. The duration of video capture may be a preset time period, or may be determined based on a video capture start instruction and a video capture end instruction, and this disclosure is not limited thereto. During the video capture process, the terminal device detects the target object in the user display interface, i.e., the video screen.

[0045] Optionally, the target object can also be a touch operation object. For example, the user touches the display screen of the terminal device with his finger and slides on the display screen. The terminal device detects the touch operation instruction, and the object that inputs the touch operation instruction is the touch operation object (in this case, the finger is the touch operation object, that is, the target object).

[0046] The target object's attribute information is information indicating specific attributes of the target object, and the specific attributes may include information related to the target object's speed and position.

[0047] Optionally, the position of the target object may be the position of at least one grid corresponding to the target object in the user display interface.

[0048] The specific implementation method of obtaining attribute information varies depending on the type of the target object.

[0049] In a possible implementation, the target object includes a target object in a video, the attribute information of the target object includes a speed change of the target object, and obtaining the attribute information of the target object includes:

[0050] Get the position of the target object in each frame of the video;

[0051] Determine the distance the target object moves from one frame to the next based on the position of the target object in each frame of the video;

[0052] Get the moving time of the target object from one frame image to the next frame image;

[0053] Determine the target object's moving speed at each moment based on the moving distance and moving time;

[0054] The speed change of the target object from the current moment to the next moment is determined based on the moving speed of the target object at each moment.

[0055] In practical applications, the target object can be a target object in a video, for example, a gesture in the video. After detecting a gesture in the video, the position of the gesture in each frame of the video is obtained. Based on the position of the gesture in each frame, the movement distance of the gesture in adjacent frames can be obtained. The movement time of the gesture in adjacent frames can be obtained. The movement speed of the gesture can be determined based on the movement distance and movement time. Based on the movement speed of the gesture at each moment, the speed change of the gesture can be determined.

[0056] In a possible implementation, the target object includes a touch operation object, the attribute information of the target object includes a speed change of the target object, and obtaining the attribute information of the target object includes:

[0057] Detecting the sliding operation speed of the touch operation object in the user display interface at each moment;

[0058] Based on the sliding operation speed, a speed change of the touch operation object from a current moment to a next moment is determined.

[0059] In actual applications, the target object can be a touch operation object, for example, a finger touches the screen and slides. The terminal device detects the corresponding position of the sliding operation at each moment, determines the moving distance from the current moment to the next moment based on the corresponding position at each moment, and determines the time interval from the current moment to the next moment. Based on the moving distance and time interval, the sliding operation speed at each moment can be calculated, and based on the sliding operation speed at each moment, the speed change of the finger sliding can be obtained.

[0060] Step S103 : determining changes in parameters of the fluid at each target texture pixel position related to the target object in the image according to the attribute information.

[0061] Based on changes in the target object's position, velocity, and other factors, changes in fluid parameters at target texel locations related to the target object can be determined in the image, thereby enabling interaction between the user and the terminal device. The target texels are texels related to the target object in the image, i.e., texels corresponding to the target object's range of action. There can be at least one target texel. The fluid parameters can be parameters related to the fluid's motion state, display state, and other factors.

[0062] Step S104 : displaying the dynamic fluid in the image according to the change of the parameters of the fluid at each target texture pixel position.

[0063] Specifically, according to the changes in relevant parameters such as the fluid's movement state and display state, the effect image after fluid simulation is displayed in the image, thereby showing that the fluid flow drives the background image to move together. When showing the dynamic effect of the fluid, it can be displayed in the form of video or dynamic graphics.

[0064] In a possible implementation, the fluid parameter includes a velocity parameter, and for each target texture pixel, the method further includes:

[0065] Get the time step for speed parameter update;

[0066] Get the velocity parameter of the fluid at the target texture pixel position at the current moment;

[0067] Determining a first texture pixel position at a current moment according to a time step, a velocity parameter of a fluid at a target texture pixel position at a current moment, and a position of the target texture pixel at a current moment;

[0068] The color at the first texture pixel position at the current moment is determined as the color of the fluid at the target texture pixel position at the next moment.

[0069] In practical applications, the time step for updating the velocity parameter can be preconfigured, and the velocity parameter of the fluid at each target texture pixel position is updated according to the time step. As the velocity parameter is updated, the color of the fluid at each target texture pixel position is also updated.

[0070] In one example, the color of the fluid at each target texture pixel position is updated by formula (1):

[0071]

[0072] Where x is the position of the grid corresponding to the target texture pixel; represents the color of the fluid at position x at time t+1; dt represents the time step; is the velocity parameter of the fluid at position x at time t; represents the first texture pixel position at time t; Represents the color of the fluid at the first texture pixel position at time t.

[0073] In a possible implementation, determining, based on the attribute information of the target object, a change in a parameter of a fluid at each target texture pixel position related to the target object in the image includes:

[0074] According to the velocity change of the target object, the change of the velocity parameter of the fluid at each target texture pixel position is determined.

[0075] In practical applications, the velocity parameters of the fluid at each target texture pixel position can be adjusted according to the velocity change of the target object, so that the fluid changes in velocity according to the velocity change of the target object. The velocity change of the fluid may include at least one of a change in velocity magnitude or a change in velocity direction.

[0076] In a possible implementation, the attribute information of the target object further includes initial position information of the target object and an effective radius of the target object. The change in velocity parameter of the fluid at each target texture pixel position is determined based on the velocity change of the target object, including:

[0077] For each target texture pixel, obtaining position information corresponding to the target texture pixel;

[0078] For each target texture pixel, the velocity parameter of the fluid at the target texture pixel position at the next moment is determined based on the velocity change of the target object, the initial position information of the target object, the effective radius of the target object, the position information corresponding to the target texture pixel, and the velocity parameter of the fluid at the target texture pixel position at the current moment.

[0079] In practical applications, the attribute information of the target object also includes the initial position information of the target object and the effective radius of the target object. The initial position information of the target object is the position of the target object when it first appears in the user display interface, and can be the position of at least one grid corresponding to the target object when it first appears in the user display interface. The effective radius of the target object represents the effective range of the target object in the user display interface. The effective radius can be pre-configured according to specific needs. The larger the effective radius, the larger the effective range of the target object in the user display interface. The position of the target object in the user display interface corresponds to the position of each target texture pixel. The position of each target texture pixel can be determined based on the position of the target object. The speed of the fluid at the target texture pixel position at the next moment is determined based on the speed change of the target object, the initial position information of the target object, the effective radius of the target object, the position information corresponding to the target texture pixel, and the speed of the fluid at the target texture pixel position at the current moment.

[0080] In one example, the velocity of the fluid at the target texture pixel position is updated according to formula (2):

[0081]

[0082] in, represents the velocity parameter of the fluid at the target texture pixel position x at time t+1, represents the velocity parameter of the fluid at the target texture pixel position x at time t, x represents the grid position corresponding to the target texture pixel, i.e., the target texture pixel position, p represents the initial position of the target object, r represents the effective radius, and Δv represents the velocity change of the target object from time t to time t+1.

[0083] In one possible implementation, if the target object is not detected in the user display interface, for each target texture pixel, the method further includes:

[0084] Determining a second texture pixel position at a current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at a current moment, and the position of the target texture pixel at a current moment;

[0085] The velocity parameter of the fluid at the second texture pixel position at the current moment is determined as the velocity parameter of the fluid at the target texture pixel position at the next moment.

[0086] In practical applications, if the initial state of the fluid is static, after the target object is detected, the parameters of the fluid at each target texture pixel position in the image change according to the attribute information of the target object, so that the fluid drives the image to start flowing. If at a certain moment, the user stops the interactive action, that is, the target object is no longer detected in the user display interface, then the fluid continues to flow according to inertia at this moment. The specific processing method is: for each target texture pixel in the image, according to the pre-configured speed update time step, the velocity parameter of the fluid at the target texture pixel position at the current moment, and the position of the target texture pixel at the current moment, determine the second texture pixel position at the current moment; determine the velocity parameter of the fluid at the second texture pixel position at the current moment as the velocity parameter of the fluid at the target texture pixel position at the next moment, and use the velocity parameter to update the color of the fluid. The color of the fluid can be updated according to the method shown in formula (1), so that the image flows with the inertia of the fluid.

[0087] In one example, the velocity of the fluid at each target texture pixel position is updated by formula (3):

[0088]

[0089] Where x is the position of the grid corresponding to the target texture pixel; represents the velocity parameter of the fluid at position x at time t+1; dt represents the time step; is the velocity parameter of the fluid at position x at time t; represents the second texture pixel position corresponding to the target texture pixel at position x at time t; Represents the velocity parameter of the fluid at the second texture pixel position at time t.

[0090] The dynamic fluid display method provided in the embodiment of the present disclosure can receive a background image input by the user, and display the fluid and the background image in an overlaid manner. When a target object is detected in the user display interface, the parameter changes of the fluid in the image are controlled according to the attribute information of the target object detected in the user display interface, and the dynamic fluid is displayed, thereby realizing that the fluid drives the background image to flow together. The interactive method is novel and interesting.

[0091] Based on Figure 1 Based on the same principle as the method shown in , the embodiment of the present disclosure further provides a dynamic fluid display device 20, such as Figure 2 As shown, the dynamic fluid display device 20 may include:

[0092] The first display module 21 is configured to display an image corresponding to the image input operation on the user display interface in response to the user's image input operation, and to superimpose the fluid and the image;

[0093] An acquisition module 22 is configured to acquire attribute information of a target object when the target object is detected in the user display interface;

[0094] a determination module 23 for determining, in the image, a change in a parameter of a fluid at each target texture pixel position associated with the target object based on the attribute information;

[0095] The second display module 24 is configured to display the dynamic fluid in an image according to changes in parameters of the fluid at each target texture pixel position.

[0096] In a possible implementation, the fluid parameter includes a velocity parameter, and the dynamic fluid display device 20 further includes a color updating module configured to:

[0097] Get the time step for speed parameter update;

[0098] For each target texture pixel, obtain the velocity parameter of the fluid at the target texture pixel position at the current moment;

[0099] For each target texture pixel, determining a first texture pixel position at the current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at the current moment, and the position of the target texture pixel at the current moment;

[0100] The color at the first texture pixel position at the current moment is determined as the color of the fluid at the target texture pixel position at the next moment.

[0101] In a possible implementation, the target object includes a target object in a video, and the attribute information of the target object includes a speed change of the target object. The acquisition module 22 is configured to:

[0102] Get the position of the target object in each frame of the video;

[0103] Determine the distance the target object moves from one frame to the next based on the position of the target object in each frame of the video;

[0104] Get the moving time of the target object from one frame image to the next frame image;

[0105] Determine the target object's moving speed at each moment based on the moving distance and moving time;

[0106] The speed change of the target object from the current moment to the next moment is determined based on the moving speed of the target object at each moment.

[0107] In a possible implementation, the target object includes a touch operation object, and the attribute information of the target object includes a speed change of the target object. The acquisition module 22 is configured to:

[0108] Detecting the sliding operation speed of the touch operation object in the user display interface at each moment;

[0109] Based on the sliding operation speed, a speed change of the touch operation object from a current moment to a next moment is determined.

[0110] In a possible implementation, based on the attribute information of the target object, the determination module 23 is configured to:

[0111] According to the velocity change of the target object, the change of the velocity parameter of the fluid at each target texture pixel position is determined.

[0112] In a possible implementation, the attribute information of the target object further includes initial position information of the target object and an effective radius of the target object. When determining the change in velocity parameter of the fluid at each target texture pixel position based on the velocity change of the target object, the determination module 23 is configured to:

[0113] For each target texture pixel, obtaining position information corresponding to the target texture pixel;

[0114] For each target texture pixel, the velocity parameter of the fluid at the target texture pixel position at the next moment is determined based on the velocity change of the target object, the initial position information of the target object, the effective radius of the target object, the position information corresponding to the target texture pixel, and the velocity parameter of the fluid at the target texture pixel position at the current moment.

[0115] In a possible implementation, if the target object is not detected in the user display interface, the dynamic fluid display device 20 further includes a speed updating module configured to:

[0116] For each target texture pixel, determining a second texture pixel position at the current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at the current moment, and the position of the target texture pixel at the current moment;

[0117] For each target texture pixel, the velocity parameter of the fluid at the second texture pixel position at the current moment is determined as the velocity parameter of the fluid at the target texture pixel position at the next moment.

[0118] The dynamic fluid display device of the embodiment of the present disclosure can execute the dynamic fluid display method provided by the embodiment of the present disclosure, and its implementation principle is similar. The actions performed by each module in the dynamic fluid display device in each embodiment of the present disclosure correspond to the steps in the dynamic fluid display method in each embodiment of the present disclosure. For the detailed functional description of each module of the dynamic fluid display device, please refer to the description of the corresponding dynamic fluid display method shown in the previous text, and will not be repeated here.

[0119] The dynamic fluid display device provided by the embodiment of the present disclosure can receive a background image input by the user, and display the fluid and the background image in an overlaid manner. When a target object is detected in the user display interface, the parameter changes of the fluid in the image are controlled according to the attribute information of the target object detected in the user display interface, and the dynamic fluid is displayed, thereby realizing that the fluid drives the background image to flow together. The interactive method is novel and interesting.

[0120] Reference below Figure 3 , which shows a schematic structural diagram of an electronic device 300 suitable for implementing the embodiments of the present disclosure. The execution subject of the technical solution of the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), wearable electronic devices, etc., as well as fixed terminals such as digital TVs, desktop computers, smart home devices, etc. Figure 3 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0121] The electronic device includes: a memory and a processor, wherein the processor here may be referred to as the processing device 301 described below, and the memory may include at least one of the read-only memory (ROM) 302, the random access memory (RAM) 303, and the storage device 308 described below, as shown below:

[0122] like Figure 3As shown, the electronic device 300 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 301, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 302 or a program loaded from a storage device 308 into a random access memory (RAM) 303, for example, to perform the above-mentioned functions defined in the method of the embodiment of the present disclosure. In the RAM 303, various programs and data required for the operation of the electronic device 300 are also stored. The processing device 301, the ROM 302, and the RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0123] Typically, the following devices may be connected to the I / O interface 305: an input device 306 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 307 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 308 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 309. The communication device 309 may allow the electronic device 300 to communicate with other devices wirelessly or by wire to exchange data. Figure 3 The electronic device 300 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0124] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 309, or installed from the storage device 308, or installed from the ROM 302. When the computer program is executed by the processing device 301, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0125] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-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, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0126] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0127] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0128] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device performs the functions defined in the method of the embodiment of the present disclosure. For example, when the one or more programs are executed by the electronic device, the electronic device performs the following operations: in response to the user's image input operation, the image corresponding to the image input operation is displayed on the user display interface, and the fluid is superimposed on the image; when a target object is detected in the user display interface, the attribute information of the target object is obtained; based on the attribute information, the change of the parameters of the fluid at each target texture pixel position related to the target object is determined in the image; based on the change of the parameters of the fluid at each target texture pixel position, a dynamic fluid is displayed in the image.

[0129] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing 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 than that marked in the accompanying drawings. For example, two boxes represented in succession 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 the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The modules or units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a module or unit does not, in some cases, limit the unit itself.

[0132] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0133] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0134] According to one or more embodiments of the present disclosure, the present disclosure provides a dynamic fluid display method, the method comprising:

[0135] In response to an image input operation by a user, an image corresponding to the image input operation is displayed on a user display interface, and the fluid is superimposed on the image;

[0136] When a target object is detected in the user display interface, acquiring attribute information of the target object;

[0137] determining, in the image, a change in a parameter of a fluid at each target texture pixel position associated with the target object based on the attribute information;

[0138] Dynamic fluid is displayed in the image according to the change of the parameter of the fluid at the position of each target texture pixel.

[0139] In a possible implementation, the fluid parameter includes a velocity parameter, and for each target texture pixel, the method further includes:

[0140] Obtaining a time step for updating the speed parameter;

[0141] Obtaining a velocity parameter of the fluid at the target texture pixel position at the current moment;

[0142] determining a first texture pixel position at a current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at a current moment, and the position of the target texture pixel at a current moment;

[0143] The color at the first texture pixel position at a current moment is determined as the color of the fluid at the target texture pixel position at a next moment.

[0144] In a possible implementation, the target object includes a target object in a video, the attribute information of the target object includes a speed change of the target object, and obtaining the attribute information of the target object includes:

[0145] Obtaining the position of the target object in each frame of the video;

[0146] Determining a moving distance of the target object from one frame to the next frame according to the position of the target object in each frame of the video;

[0147] Obtaining the movement time of the target object from one frame of image to the next frame of image;

[0148] determining a moving speed of the target object at each moment according to the moving distance and the moving time;

[0149] A speed change of the target object from a current moment to a next moment is determined according to the moving speed of the target object at each moment.

[0150] In a possible implementation, the target object includes a touch operation object, the attribute information of the target object includes a speed change of the target object, and obtaining the attribute information of the target object includes:

[0151] Detecting the sliding operation speed of the touch operation object in the user display interface at each moment;

[0152] Based on the sliding operation speed, a speed change of the touch operation object from a current moment to a next moment is determined.

[0153] In a possible implementation, determining, in the image, a change in a parameter of a fluid at each target texture pixel position related to the target object based on the attribute information of the target object includes:

[0154] According to the velocity change of the target object, the change of the velocity parameter of the fluid at each target texture pixel position is determined.

[0155] In a possible implementation, the attribute information of the target object further includes initial position information of the target object and an effective radius of the target object, and determining the change in the velocity parameter of the fluid at each target texture pixel position according to the velocity change of the target object includes:

[0156] For each target texture pixel, obtaining position information corresponding to the target texture pixel;

[0157] For each target texture pixel, the velocity parameter of the fluid at the target texture pixel position at the next moment is determined based on the velocity change of the target object, the initial position information of the target object, the effective radius of the target object, the position information corresponding to the target texture pixel, and the velocity parameter of the fluid at the target texture pixel position at the current moment.

[0158] In a possible implementation, if the target object is not detected in the user display interface, the method further includes, for each target texture pixel:

[0159] determining a second texture pixel position at a current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at a current moment, and the position of the target texture pixel at a current moment;

[0160] The velocity parameter of the fluid at the second texture pixel position at the current moment is determined as the velocity parameter of the fluid at the target texture pixel position at the next moment.

[0161] According to one or more embodiments of the present disclosure, the present disclosure provides a dynamic fluid display device, the device comprising:

[0162] a first display module, configured to respond to an image input operation by a user, display an image corresponding to the image input operation on a user display interface, and to superimpose the fluid on the image;

[0163] an acquisition module, configured to acquire attribute information of a target object when a target object is detected in the user display interface;

[0164] a determination module, configured to determine, in the image, a change in a parameter of a fluid at each target texture pixel position related to the target object based on the attribute information;

[0165] The second display module is configured to display the dynamic fluid in the image according to changes in parameters of the fluid at the locations of the target texture pixels.

[0166] In a possible implementation, the fluid parameter includes a velocity parameter, and the dynamic fluid display device further includes a color updating module configured to:

[0167] Obtaining a time step for updating the speed parameter;

[0168] For each target texture pixel, obtaining a velocity parameter of the fluid at the target texture pixel position at a current moment;

[0169] For each target texture pixel, determining a first texture pixel position at a current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at a current moment, and the position of the target texture pixel at a current moment;

[0170] The color at the first texture pixel position at a current moment is determined as the color of the fluid at the target texture pixel position at a next moment.

[0171] In a possible implementation, the target object includes a target object in a video, the attribute information of the target object includes a speed change of the target object, and the acquisition module is configured to:

[0172] Obtaining the position of the target object in each frame of the video;

[0173] Determining a moving distance of the target object from one frame to the next frame according to the position of the target object in each frame of the video;

[0174] Obtaining the movement time of the target object from one frame of image to the next frame of image;

[0175] determining a moving speed of the target object at each moment according to the moving distance and the moving time;

[0176] A speed change of the target object from a current moment to a next moment is determined according to the moving speed of the target object at each moment.

[0177] In a possible implementation, the target object includes a touch operation object, the attribute information of the target object includes a speed change of the target object, and the acquisition module is configured to:

[0178] Detecting the sliding operation speed of the touch operation object in the user display interface at each moment;

[0179] Based on the sliding operation speed, a speed change of the touch operation object from a current moment to a next moment is determined.

[0180] In a possible implementation, the determining module is configured to:

[0181] According to the velocity change of the target object, the change of the velocity parameter of the fluid at each target texture pixel position is determined.

[0182] In a possible implementation, the attribute information of the target object further includes initial position information of the target object and an effective radius of the target object. When determining the change in velocity parameter of the fluid at each target texture pixel position based on the velocity change of the target object, the determination module is configured to:

[0183] For each target texture pixel, obtaining position information corresponding to the target texture pixel;

[0184] For each target texture pixel, the velocity parameter of the fluid at the target texture pixel position at the next moment is determined based on the velocity change of the target object, the initial position information of the target object, the effective radius of the target object, the position information corresponding to the target texture pixel, and the velocity parameter of the fluid at the target texture pixel position at the current moment.

[0185] In a possible implementation, if the target object is not detected in the user display interface, the dynamic fluid display device further includes a speed update module for each target texture pixel, configured to:

[0186] For each target texture pixel, determining a second texture pixel position at a current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at a current moment, and the position of the target texture pixel at a current moment;

[0187] For each target texture pixel, the velocity parameter of the fluid at the second texture pixel position at the current moment is determined as the velocity parameter of the fluid at the target texture pixel position at the next moment.

[0188] According to one or more embodiments of the present disclosure, the present disclosure provides an electronic device, including:

[0189] one or more processors;

[0190] A memory stores one or more applications, wherein when the one or more applications are executed by the one or more processors, the electronic device executes the dynamic fluid display method.

[0191] According to one or more embodiments of the present disclosure, the present disclosure provides a computer-readable medium for storing computer instructions. When the computer instructions are executed by a computer, the computer is caused to perform the above-mentioned dynamic fluid display method.

[0192] According to one or more embodiments of the present disclosure, the present disclosure provides a computer program product, including computer instructions, which implement the above-mentioned dynamic fluid display method when executed by a computer.

[0193] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0194] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0195] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A dynamic fluid display method, characterized in that: The method comprises: In response to an image input operation by a user, an image corresponding to the image input operation is displayed on a user display interface, and the fluid is superimposed on the image; When a target object is detected in the user display interface, acquiring attribute information of the target object; the attribute information of the target object includes a speed change of the target object; Determining, based on the attribute information, changes in parameters of a fluid at each target texture pixel position associated with the target object in the image; the parameters of the fluid include a velocity parameter; Dynamic fluid is displayed in the image according to the change of the parameter of the fluid at the position of each target texture pixel.

2. The dynamic fluid display method according to claim 1, characterized in that: For each target texture pixel, the method further comprises: Obtaining a time step for updating the speed parameter; Obtaining a velocity parameter of the fluid at the target texture pixel position at the current moment; determining a first texture pixel position at a current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at a current moment, and the position of the target texture pixel at a current moment; The color at the first texture pixel position at a current moment is determined as the color of the fluid at the target texture pixel position at a next moment.

3. The dynamic fluid display method according to claim 1, characterized in that: The target object includes a target object in a video, and obtaining attribute information of the target object includes: Obtaining the position of the target object in each frame of the video; Determining a moving distance of the target object from one frame to the next frame according to the position of the target object in each frame of the video; Obtaining the movement time of the target object from one frame of image to the next frame of image; determining a moving speed of the target object at each moment according to the moving distance and the moving time; A speed change of the target object from a current moment to a next moment is determined according to the moving speed of the target object at each moment.

4. The dynamic fluid display method according to claim 1, characterized in that: The target object includes a touch operation object, and obtaining attribute information of the target object includes: Detecting the sliding operation speed of the touch operation object in the user display interface at each moment; Based on the sliding operation speed, a speed change of the touch operation object from a current moment to a next moment is determined.

5. The dynamic fluid display method according to claim 3 or 4, characterized in that: The step of determining, in the image, a change in a parameter of a fluid at each target texture pixel position related to the target object based on the attribute information of the target object comprises: According to the velocity change of the target object, the change of the velocity parameter of the fluid at each target texture pixel position is determined.

6. The dynamic fluid display method according to claim 5, characterized in that: The attribute information of the target object further includes initial position information of the target object and an effective radius of the target object. Determining a change in the velocity parameter of the fluid at each target texture pixel position according to a velocity change of the target object includes: For each target texture pixel, obtaining position information corresponding to the target texture pixel; For each target texture pixel, the velocity parameter of the fluid at the target texture pixel position at the next moment is determined based on the velocity change of the target object, the initial position information of the target object, the effective radius of the target object, the position information corresponding to the target texture pixel, and the velocity parameter of the fluid at the target texture pixel position at the current moment.

7. The dynamic fluid display method according to claim 2, characterized in that: If no target object is detected in the user display interface, the method further includes, for each target texture pixel: determining a second texture pixel position at a current moment according to the time step, a velocity parameter of the fluid at the target texture pixel position at a current moment, and the position of the target texture pixel at a current moment; The velocity parameter of the fluid at the second texture pixel position at the current moment is determined as the velocity parameter of the fluid at the target texture pixel position at the next moment.

8. A dynamic fluid display device, characterized in that: The device comprises: a first display module, configured to respond to an image input operation by a user, display an image corresponding to the image input operation on a user display interface, and to superimpose the fluid on the image; an acquisition module, configured to acquire attribute information of the target object when a target object is detected in the user display interface; the attribute information of the target object includes a speed change of the target object; a determination module, configured to determine, in the image, a change in a parameter of a fluid at each target texture pixel position related to the target object based on the attribute information; the fluid parameter including a velocity parameter; The second display module is configured to display the dynamic fluid in the image according to changes in parameters of the fluid at the locations of the target texture pixels.

9. An electronic device, characterized in that: include: one or more processors; A memory storing one or more applications, wherein when the one or more applications are executed by the one or more processors, the electronic device executes the dynamic fluid display method according to any one of claims 1-7.

10. A computer-readable medium, characterized in that The computer-readable medium is used to store computer instructions. When the computer instructions are executed by a computer, the computer is enabled to execute the dynamic fluid display method according to any one of claims 1 to 7.

11. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a computer, the dynamic fluid display method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Method for producing three-dimensional water-and-ink animation

    CN102496177A

  • Animation realization method and device

    CN110930487A