CN115578504B - Image rendering method, terminal device and medium - Google Patents

Image rendering method, terminal device and medium Download PDF

Info

Publication number
CN115578504B
CN115578504B CN202211154815.6A CN202211154815A CN115578504B CN 115578504 B CN115578504 B CN 115578504B CN 202211154815 A CN202211154815 A CN 202211154815A CN 115578504 B CN115578504 B CN 115578504B
Authority
CN
China
Prior art keywords
particle
dynamic
image frame
current image
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211154815.6A
Other languages
Chinese (zh)
Other versions
CN115578504A (en
Inventor
计登科
肖林鸿
陈焕盛
王文丁
秦东明
吴剑斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
3Clear Technology Co Ltd
Original Assignee
3Clear Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 3Clear Technology Co Ltd filed Critical 3Clear Technology Co Ltd
Priority to CN202211154815.6A priority Critical patent/CN115578504B/en
Publication of CN115578504A publication Critical patent/CN115578504A/en
Application granted granted Critical
Publication of CN115578504B publication Critical patent/CN115578504B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T15/003D [Three Dimensional] image rendering
    • G06T15/10Geometric effects
    • G06T15/20Perspective computation
    • G06T15/205Image-based rendering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/20Analysis of motion
    • G06T7/246Analysis of motion using feature-based methods, e.g. the tracking of corners or segments
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02ATECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
    • Y02A90/00Technologies having an indirect contribution to adaptation to climate change
    • Y02A90/10Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Processing Or Creating Images (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application provides an image rendering method, terminal equipment and a medium, and relates to the technical field of image processing. The method comprises the following steps: transmitting a data acquisition request carrying the data acquisition time to a server; receiving first particle data corresponding to the data acquisition time returned by a server, and generating a particle array corresponding to the current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle; determining second particle coordinates of each dynamic particle in the current image frame in a preset number of image frames before the current image frame, wherein the second particle coordinates are generated according to second particle data corresponding to the last data acquisition moment; and generating a running track of the dynamic particles according to the first particle coordinates and each second particle coordinate so as to complete the rendering of the current image frame. According to the method, the display effect of the dynamic particles after the user changes the data acquisition time is improved.

Description

Image rendering method, terminal device and medium
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to an image rendering method, a terminal device, and a medium.
Background
With the development of economy and the progress of society, the requirements of people on weather forecast are higher and higher. When the weather forecast result is displayed, a video or moving picture mode is generally adopted for the display effect, so that people can see the weather change at a glance.
In the existing weather forecast results, the area where land and the like cannot change along with time is fixed, elements such as wind, ocean current, ocean wave and the like which can change along with time are generally represented by corresponding dynamic particles, and the changes of various elements, such as wind flow and the like, are represented by the running track of the dynamic particles in a period of time through image rendering. When a user views the weather forecast result, the moving track of the dynamic particles at a plurality of time points may need to be viewed, for example, a fishermen needs to know the change of offshore wind, ocean current, ocean wave and the like at different times when going out of the sea. Thus, the user may click multiple times on the desired point in time in the climate forecast video. In the prior art, after a user clicks a new query time on a terminal device, the terminal device deletes all dynamic particles at the previous query time on a display interface, and requests particle data corresponding to the query time from a server. After receiving the particle data sent by the server, the terminal device renders the image according to the particle data, and generates a new running track of the dynamic particles.
However, in the existing image rendering method, after the query time is changed, the user may cause screen blocking, and the newly generated image frame only can display the moving track of the dynamic particles after the query time, so that the display effect is poor.
Disclosure of Invention
The application provides an image rendering method, terminal equipment and a medium, which are used for solving the technical problem that a newly generated image frame has poor display effect on dynamic particles after a user changes query time in the existing image rendering method.
In a first aspect, the present application provides an image rendering method, including:
the method comprises the steps that terminal equipment sends a data acquisition request carrying data acquisition time to a server, so that the server acquires first particle data corresponding to the data acquisition time according to the data acquisition request;
the terminal equipment receives the first particle data returned by the server and generates a particle array corresponding to the current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle;
the terminal equipment determines second particle coordinates of each dynamic particle in the current image frame in a preset number of image frames before the current image frame, wherein the second particle coordinates are generated according to second particle data corresponding to the last data acquisition time of the data acquisition time;
And the terminal equipment generates a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates so as to complete the rendering of the current image frame.
In a possible implementation manner, the generating the particle array corresponding to the current image frame according to the first particle data specifically includes:
determining whether the number of current dynamic particles in the current image frame reaches a preset number threshold value, wherein the number threshold value is determined according to the density of particles in a display interface of the terminal equipment;
if not, randomly determining a first number of third particle coordinates in a coordinate system corresponding to a display interface of the terminal equipment, wherein the first number is a difference value between the number threshold and the number of the current dynamic particles;
determining a first dynamic particle corresponding to each third particle coordinate in the first particle data;
adding the first dynamic particles to the current image frame according to the third particle coordinates corresponding to each first dynamic particle;
determining dynamic particles in the current image frame according to the first dynamic particles and the current dynamic particles;
Determining a first particle coordinate corresponding to each dynamic particle in the current image frame according to a third particle coordinate corresponding to each first dynamic particle and a fourth particle coordinate corresponding to each current dynamic particle;
and generating a particle array corresponding to the current image frame according to each dynamic particle in the current image frame and the first particle coordinate corresponding to the dynamic particle.
In one possible embodiment, the particle array further includes: a particle lifetime value corresponding to each of the dynamic particles;
correspondingly, the current dynamic particle obtaining mode includes:
determining a second dynamic particle in a previous image frame to the current image frame;
determining a particle life value of each second dynamic particle in the current image frame according to the difference between the particle life value corresponding to each second dynamic particle and a preset life value;
deleting the dynamic particles with the particle life value of 0 in the second dynamic particles, and determining the current dynamic particles in the current image frame according to the remaining dynamic particles in the second dynamic particles;
the particle life value corresponding to the second dynamic particle in the previous image frame is determined according to the particle life value randomly set when the second dynamic particle appears on the display interface of the terminal device for the first time and a preset life value.
In a possible implementation manner, the obtaining manner of the fourth particle coordinate corresponding to the current dynamic particle includes:
determining a fifth particle coordinate of the current dynamic particle in an image frame previous to the current image frame;
determining the motion direction and the motion speed of the current dynamic particle according to grid interpolation corresponding to the current dynamic particle;
determining a fourth particle coordinate corresponding to the current dynamic particle according to the fifth particle coordinate, the movement direction and the movement speed;
the fifth particle coordinate in the previous image frame is obtained according to an initial coordinate set randomly when the current dynamic particle appears on the display interface of the terminal device for the first time, and the initial coordinate is obtained according to an initial direction and an initial speed determined by grid interpolation.
In one possible embodiment, the method further comprises: storing a particle array corresponding to each image frame;
accordingly, the determining the second particle coordinates of the dynamic particle in the preset number of image frames before the current image frame includes:
determining a first particle array corresponding to a preset number of image frames before the current image frame;
And determining a second particle coordinate corresponding to the dynamic particle in each first particle array.
In one possible implementation manner, the generating the moving track of the dynamic particle according to the first particle coordinate and each second particle coordinate specifically includes:
sequencing the first particle coordinates and each second particle coordinate according to the sequence of coordinate generation;
generating connecting lines between two adjacent particle coordinates in sequence;
determining the transparency of each connecting line according to the sequence of the connecting line generation;
and generating the running track of the dynamic particles according to the connecting lines and the transparency of each connecting line.
In a possible implementation manner, the determining the transparency of each connection line according to the generated sequence of the connection lines specifically includes:
determining the initial transparency corresponding to each connecting line according to the sequence of the connecting line generation;
determining a first particle life value corresponding to a particle coordinate which appears first in each connecting line;
judging whether the life value of the first particle is larger than a life value threshold value or not;
if not, determining the transparent proportion of the connecting line corresponding to the first particle life value according to the corresponding relation between the preset particle life value and the transparent proportion;
And for each connecting line, determining the transparency corresponding to the connecting line according to the initial transparency and the transparency proportion.
In one possible implementation manner, before the terminal device generates the moving track of the dynamic particle according to the first particle coordinate and each second particle coordinate for each dynamic particle in the current image frame, the method further includes:
deleting connecting lines among the particle coordinates in the image frame above the current image frame;
correspondingly, the terminal device generates a running track of each dynamic particle in the current image frame according to the first particle coordinate and each second particle coordinate, and the running track comprises the following steps:
after deleting the connecting line between the particle coordinates in the previous image frame of the current image frame, the terminal device generates the moving track of each dynamic particle in the current image frame according to the first particle coordinate and each second particle coordinate.
In a possible implementation manner, the first particle data and the second particle data are determined according to a data acquisition time in a data acquisition request sent by the terminal device after the server periodically acquires mapping data and parses the mapping data into readable data;
Wherein the map drawing data is all drawing related data of a map corresponding to the image.
In one possible implementation manner, after the terminal device sends the data acquisition request carrying the data acquisition time to the server, the method further includes:
and rendering each image frame before the current image frame according to the second particle data corresponding to the last data acquisition time of the data acquisition time until the terminal equipment receives the first particle data returned by the server.
In a second aspect, the present application provides a terminal device, including:
the receiving and transmitting module is used for transmitting a data acquisition request carrying a data acquisition time to a server so that the server can acquire first particle data corresponding to the data acquisition time according to the data acquisition request;
the execution module is used for receiving the first particle data returned by the server and generating a particle array corresponding to a current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle; for each dynamic particle in the current image frame, determining a second particle coordinate of the dynamic particle in a preset number of image frames before the current image frame, wherein the second particle coordinate is generated according to second particle data corresponding to the last data acquisition time of the data acquisition time; and generating a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates so as to finish the rendering of the current image frame.
In a third aspect, the present application provides another terminal device, including: a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions stored in the memory to implement the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium having stored therein computer-executable instructions for performing the method described above when executed by a processor.
According to the image rendering method, the terminal device and the medium, the terminal device can send the data acquisition request carrying the data acquisition time to the server so that the server can acquire first particle data corresponding to the data acquisition time according to the data acquisition request; the method comprises the steps that terminal equipment receives first particle data returned by a server and generates a particle array corresponding to a current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle; determining second particle coordinates of each dynamic particle in the current image frame in a preset number of image frames before the current image frame, wherein the second particle coordinates are generated according to second particle data corresponding to the last data acquisition time of the data acquisition time; and generating a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates to finish the rendering of the current image frame. According to the method, after a user inputs a new data acquisition time to the terminal equipment, when the terminal equipment renders a current image frame, the first particle coordinates corresponding to the data acquisition time are not only utilized to obtain the motion track of the dynamic particles, but also utilized to simultaneously obtain the first particle coordinates corresponding to the data acquisition time and the preset number of second particle coordinates corresponding to the last data acquisition time of the data acquisition time, and meanwhile, the motion track of the dynamic particles is generated, so that the rendering of the current image frame is completed. Through the arrangement, when a user inputs a new data acquisition time to the terminal device, the user can see the moving track of the dynamic particles at the new data acquisition time and the moving track of the dynamic particles at the last data acquisition time, so that the display effect of the dynamic particles is improved. When a user wants to compare or display the running tracks of the dynamic particles at two moments, the user does not need to respectively screen the running tracks of the dynamic particles at two moments and then combine the running tracks, and only needs to screen the running tracks of the dynamic particles at the moment after inputting a new data acquisition moment, so that the user experience is improved;
Further, when the image frame is rendered, a particle array including dynamic particles and particle coordinates of the image frame may be first generated, and then a moving track of the dynamic particles may be generated by using the particle coordinates, thereby completing image rendering. Through the arrangement, the image rendering efficiency can be improved, incontinuous recorded content caused by screen blocking during video recording is avoided, the display effect of dynamic particles is further improved, and the user experience is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
FIG. 1 is a schematic diagram of a result of rendering an image according to the prior art;
FIG. 2 is a schematic diagram illustrating the result of image rendering according to an embodiment of the present application;
FIG. 3 is a flow chart of an image rendering method according to an embodiment of the present application;
FIG. 4 is a flow chart of an image rendering method according to another embodiment of the present application;
FIG. 5 is a schematic diagram of particle coordinate calculation according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a terminal device according to another embodiment of the present application.
Reference numerals: 1. a terminal device; 2. a server; 3. dynamic particles; 61. a transceiver module; 62. and executing the module.
Specific embodiments thereof have been shown by way of example in the drawings and will herein be described in more detail. These drawings and the written description are not intended to limit the scope of the inventive concepts in any way, but to illustrate the concepts of the present application to those skilled in the art by reference to specific embodiments.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present application as detailed in the accompanying claims.
The method and the device can be applied to various image processing scenes related to the display of dynamic particles such as wind, ocean currents, ocean waves and the like, such as a wind forecast scene, an air pollution forecast scene, an ocean current forecast scene, an ocean wave forecast scene and the like, and are not limited in any way.
In the existing weather forecast results, the area where land and the like cannot change along with time is fixed, elements such as wind, ocean current, ocean wave and the like which can change along with time are generally represented by corresponding dynamic particles, and the changes of various elements, such as wind flow and the like, are represented by the running track of the dynamic particles in a period of time through image rendering. When a user views the weather forecast result, the moving track of the dynamic particles at a plurality of time points may need to be viewed, for example, a fishermen needs to know the change of offshore wind, ocean current, ocean wave and the like at different times when going out of the sea. Thus, the user may click multiple times on the desired point in time in the climate forecast video. In the prior art, after a user clicks a new query time on a terminal device, the terminal device deletes all dynamic particles at the previous query time on a display interface, and requests particle data corresponding to the query time from a server. After receiving the particle data sent by the server, the terminal device renders the image according to the particle data, and generates a new running track of the dynamic particles.
Fig. 1 is a schematic diagram of a result of rendering an image in the prior art, as shown in fig. 1, (a) shows an image rendering result at time 1, (b) shows an image rendering result at time 2, 1 shows a terminal device, 2 shows a server, and 3 shows a dynamic particle. Since the dynamic particles are actually displayed as time changes, the change of the dynamic particles with time is indicated by an arrow in fig. 2. When a user wants to display the running track of the dynamic particle at the time 1 and the running track of the dynamic particle at the time 2, firstly, the running track of the dynamic particle at the time 1 needs to be queried, the terminal device 1 sends a data acquisition request carrying the time 1 to the server 2, the server 2 sends the particle data corresponding to the time 1 to the terminal device 1, and the terminal device 1 performs image rendering according to the particle data corresponding to the time 1 to obtain (a). As can be seen from fig. 1 (a), at time 1, the dynamic particle 1 moves in the east direction. And then the user needs to inquire the running track of the dynamic particles at the time 2, the terminal equipment 1 sends a data acquisition request carrying the time 2 to the server 2, the server 2 sends the particle data corresponding to the time 2 to the terminal equipment 1, and the terminal equipment 1 performs image rendering according to the particle data corresponding to the time 2 to obtain (b). As can be seen from fig. 1 (b), at time 2, the dynamic particle 1 moves north. The user can capture a screen of the terminal device 1 to obtain (a) and (b) respectively so as to display the running track of the dynamic particles at the time 1 and the time 2 simultaneously.
In the existing image rendering method, after the query time is changed by a user, a screen is blocked, and a newly generated image frame only can display the running track of dynamic particles after the query time, so that the display effect is poor. When a user records video, screen blocking occurs, recorded content is incoherent, and the user wants to obtain two running tracks and can only capture the screen respectively, so that the user experience is poor.
Based on the technical problem, the invention concept of the application is as follows: how to provide an image rendering method with better dynamic particle running track display effect.
Specifically, the terminal device may send a data acquisition request carrying a data acquisition time to the server, so that the server acquires first particle data corresponding to the data acquisition time according to the data acquisition request; the method comprises the steps that terminal equipment receives first particle data returned by a server and generates a particle array corresponding to a current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle; determining second particle coordinates of each dynamic particle in the current image frame in a preset number of image frames before the current image frame, wherein the second particle coordinates are generated according to second particle data corresponding to the last data acquisition time of the data acquisition time; and generating a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates to finish the rendering of the current image frame. According to the method, after a user inputs a new data acquisition time to the terminal equipment, when the terminal equipment renders a current image frame, the first particle coordinates corresponding to the data acquisition time are not only utilized to obtain the motion track of the dynamic particles, but also utilized to simultaneously obtain the first particle coordinates corresponding to the data acquisition time and the preset number of second particle coordinates corresponding to the last data acquisition time of the data acquisition time, and meanwhile, the motion track of the dynamic particles is generated, so that the rendering of the current image frame is completed. Through the arrangement, when a user inputs a new data acquisition time to the terminal device, the user can see the moving track of the dynamic particles at the new data acquisition time and the moving track of the dynamic particles at the last data acquisition time, so that the display effect of the dynamic particles is improved. When a user wants to compare or display the running tracks of the dynamic particles at two moments, the user does not need to respectively screen the running tracks of the dynamic particles at two moments and then combine the running tracks, and only needs to screen the running tracks of the dynamic particles at the moment after inputting a new data acquisition moment, so that the user experience is improved;
Further, when the image frame is rendered, a particle array including dynamic particles and particle coordinates of the image frame may be first generated, and then a moving track of the dynamic particles may be generated by using the particle coordinates, thereby completing image rendering. Through the arrangement, the image rendering efficiency can be improved, incontinuous recorded content caused by screen blocking during video recording is avoided, the display effect of dynamic particles is further improved, and the user experience is improved.
The following describes the technical solutions of the present application and how the technical solutions of the present application solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic diagram of the result of image rendering according to an embodiment of the present application, as shown in fig. 2, fig. 2 (c) shows the result of image rendering when the data acquisition time of the present application is changed from time 1 to time 2, 1 shows a terminal device, 2 shows a server, and 3 shows a dynamic particle. Since the dynamic particles are actually displayed as time changes, the change of the dynamic particles with time is indicated by an arrow in fig. 2. When a user wants to display the running track of the dynamic particle at the time 1 and the time 2 at the same time, firstly, the running track of the dynamic particle at the time 1 needs to be queried, the terminal equipment 1 sends a data acquisition request carrying the time 1 to the server 2, the server 2 sends the particle data corresponding to the time 1 to the terminal equipment 1, and the terminal equipment 1 performs image rendering according to the particle data corresponding to the time 1. After that, the user needs to query the running track of the dynamic particle at the time 2, the terminal device 1 sends a data acquisition request carrying the time 2 to the server 2, the server 2 sends the particle data corresponding to the time 2 to the terminal device 1, the terminal device 1 obtains the corresponding first particle coordinates according to the particle data corresponding to the time 2, and obtains the second particle coordinates obtained according to the particle data corresponding to the time 1 in the preset number of image frames. Then, the moving track of the dynamic particle is generated according to the first particle coordinates and the second particle coordinates, namely (c) in fig. 2. As can be seen from fig. 2 (c), when the data acquisition time is changed from time 1 to time 2, the dynamic particles 3 are changed from the easter movement to the north movement. The user can directly screen-capture the terminal device 1 to obtain (c) so as to display the running track of the dynamic particles at the time 1 and the time 2 at the same time.
Example 1
Fig. 3 is a flowchart of an image rendering method according to an embodiment of the present application, where an execution subject is used as a terminal device to describe the image rendering method. As shown in fig. 3, the image rendering method may include the steps of:
s101: the terminal equipment sends a data acquisition request carrying the data acquisition time to the server so that the server acquires first particle data corresponding to the data acquisition time according to the data acquisition request.
In this embodiment, after the user inputs a new data acquisition time, the terminal device may send a data acquisition request carrying the data acquisition time to the server, and the server sends the first particle data corresponding to the data acquisition time to the terminal device.
In one possible implementation manner, after the terminal device sends the data acquisition request carrying the data acquisition time to the server, the method may further include: and rendering each image frame before the current image frame according to the second particle data corresponding to the last data acquisition time of the data acquisition time until the terminal equipment receives the first particle data returned by the server.
In this embodiment, the terminal device sends a data acquisition request carrying a data acquisition time to the server, and because the first particle data returned by the server is not received at this time, in order to avoid screen blocking or dynamic particle disappearance, before the first particle data returned by the server is received, an image frame may be rendered according to the second particle data corresponding to the previous data acquisition time, so as to obtain a running track of the dynamic particle, thereby improving a display effect of the dynamic particle.
S102: the terminal equipment receives first particle data returned by the server and generates a particle array corresponding to the current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle.
In this embodiment, the current image frame refers to a first image frame rendered according to the first particle data after the terminal device receives the first particle data returned by the server.
In this embodiment, the specific implementation of generating the particle array corresponding to the current image frame according to the first particle data in the step S102 is shown in the second embodiment.
S103: the terminal equipment determines second particle coordinates of each dynamic particle in the current image frame in a preset number of image frames before the current image frame, wherein the second particle coordinates are generated according to second particle data corresponding to the last data acquisition time of the data acquisition time.
In this embodiment, the preset number of image frames before the current image frame refers to an image frame rendered according to the second particle data corresponding to the previous data acquisition time before the current image frame. The specific values of the preset number can be flexibly set by a person skilled in the art, without any limitation.
For example, the particle coordinates of the dynamic particle a in the 5 image frames before the current image frame are A1, A2, A3, A4, and A5, respectively, and then A1, A2, A3, A4, and A5 are the second particle coordinates of the dynamic particle a.
In one possible implementation manner, the first particle data and the second particle data may be determined according to a data acquisition time in a data acquisition request sent by the terminal device after the server periodically acquires the map drawing data and parses the map drawing data into readable data; wherein the map drawing data is all drawing-related data of the map corresponding to the image.
In the prior art, each time a user zooms or drags a screen of a terminal device or inputs a data acquisition time, the terminal device sends a data acquisition request to a server. After receiving the data acquisition request, the server firstly analyzes the map drawing data into readable data, and then searches the readable data for particle data corresponding to the moment or the coordinate range in the data acquisition request. Data read-write and data transmission are frequently carried out between the terminal equipment and the server, and the server receives a data acquisition request once and analyzes map drawing data once, so that the data analysis amount is large.
In this embodiment, the server may periodically acquire the map drawing data and parse the map drawing data into readable data. After receiving the data acquisition request sent by the terminal device, the server determines the corresponding particle data in the readable data according to the data acquisition time. That is, in one mapping data acquisition cycle, the server only needs to analyze the mapping data once. With such a configuration, the data analysis amount can be reduced.
In addition, the server may compress the mapping data and then transmit it to the terminal device after acquiring the mapping data and parsing the mapping data into readable data. Because the map drawing data are all drawing related data of the map corresponding to the image, when a user zooms or drags a screen of the terminal equipment, the terminal equipment does not need to request data from the server, so that data reading and writing and data transmission between the terminal equipment and the server are greatly reduced, and the pressure of the server is lightened.
In one possible embodiment, the method may further include: storing a particle array corresponding to each image frame; accordingly, determining the second particle coordinates of the dynamic particles in a preset number of image frames preceding the current image frame may include: determining a first particle array corresponding to a preset number of image frames before the current image frame; and determining a second particle coordinate corresponding to the dynamic particle in each first particle array.
In this embodiment, after determining the particle array corresponding to each image frame, the particle array may also be stored. When the second particle coordinates of the dynamic particles in a certain image frame before the current image frame are needed to be determined later, the particle coordinates in the particle array stored in the image frame are directly searched, and recalculation is not needed. By the arrangement, the second particle coordinates do not need to be recalculated, and the rendering efficiency of the current image frame is improved.
S104: and the terminal equipment generates a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates so as to complete the rendering of the current image frame.
In this embodiment, the image rendering process is a process of generating a moving track of the dynamic particles.
In a possible implementation manner, before the terminal device in the step S104 generates the moving track of the dynamic particle according to the first particle coordinate and each second particle coordinate for each dynamic particle in the current image frame, the method may further include: deleting connecting lines among the particle coordinates in the image frame above the current image frame;
Correspondingly, the generating, by the terminal device in step S104, the moving track of the dynamic particle according to the first particle coordinate and each second particle coordinate for each dynamic particle in the current image frame, may include: after deleting the connecting line between the particle coordinates in the previous image frame of the current image frame, the terminal device generates the running track of the dynamic particles according to the first particle coordinates and the second particle coordinates for each dynamic particle in the current image frame.
In the prior art, when a current image frame is rendered to generate a running track of dynamic particles, connecting lines among all particle coordinates in the previous image frame are reserved, and new connecting lines are generated only according to the newly generated particle coordinates, so that the running track of the dynamic particles of the current image frame is generated. When the particle coordinates of the previous image frame exist for a long time, the particle coordinates are not deleted, but the transparency of the connecting lines related to the particle coordinates is adjusted. However, only adjusting the transparency of the connection lines can leave a large amount of connection lines, which causes interference to newly generated connection lines and affects the display effect of the dynamic particles.
In this embodiment, before the current image frame is rendered to generate the moving track of the dynamic particle, the connecting line between the coordinates of each particle in the previous image frame of the current image frame may be deleted first, that is, the canvas is emptied, so as to delete the historical moving track of the dynamic particle, so as to avoid the interference of the historical moving track on the new moving track, and improve the display effect of the dynamic particle.
In a possible embodiment, the generating the moving track of the dynamic particle in step S104 according to the first particle coordinates and each second particle coordinates may include: sequencing the first particle coordinates and each second particle coordinate according to the sequence of coordinate generation; generating connecting lines between two adjacent particle coordinates in sequence; determining the transparency of each connecting line according to the sequence of the connecting line generation; and generating the running track of the dynamic particles according to the connecting lines and the transparency of each connecting line.
In this embodiment, since the connection lines between the particle coordinates in the previous image frame of the current image frame are deleted, the first particle coordinates and each second particle coordinate need to be ordered according to the order of generating the coordinates, so as to determine the generation order between the connection lines and the transparency of each connection line. With such an arrangement, the trajectory of the dynamic particles can be simply and accurately generated. Further, the transparency of each connecting wire is determined by utilizing the sequence of the connecting wire generation, so that the connecting wires with different generation times have different transparency, the finally generated running track is smoother, the running sequence of the dynamic particles can be embodied, and the display effect of the dynamic particles is improved.
In one possible embodiment, determining the transparency of each connection line according to the order in which the connection lines are generated may include: determining the initial transparency corresponding to each connecting wire according to the sequence of the connecting wire generation; determining a first particle lifetime value corresponding to a particle coordinate which appears first in each connecting line; judging whether the life value of the first particle is larger than a life value threshold value or not; if not, determining the transparent proportion of the connecting line corresponding to the first particle life value according to the corresponding relation between the preset particle life value and the transparent proportion; for each connecting line, determining the transparency corresponding to the connecting line according to the initial transparency and the transparency proportion.
In this embodiment, the lifetime threshold may be flexibly set by those skilled in the art, for example, the lifetime threshold may be 5 or 10, which is not limited in this regard.
In this embodiment, after determining the initial transparency corresponding to each connection line according to the sequence of connection line generation, the initial transparency may be adjusted according to the particle lifetime value corresponding to the particle coordinate that appears first in each connection line, and if the particle lifetime value corresponding to a certain particle coordinate is less than or equal to the lifetime value threshold, it is indicated that the particle coordinate is about to disappear, and it is necessary to further reduce the transparency of the connection line corresponding to the particle coordinate by using the transparency ratio. By such arrangement, the effect of the dynamic particle display can be further improved.
According to the method, after a user inputs a new data acquisition time to the terminal equipment, when the terminal equipment renders a current image frame, the first particle coordinates corresponding to the data acquisition time are not only utilized to obtain the motion track of the dynamic particles, but also utilized to simultaneously obtain the first particle coordinates corresponding to the data acquisition time and the preset number of second particle coordinates corresponding to the last data acquisition time of the data acquisition time, and meanwhile, the motion track of the dynamic particles is generated, so that the rendering of the current image frame is completed. Through the arrangement, when a user inputs a new data acquisition time to the terminal device, the user can see the moving track of the dynamic particles at the new data acquisition time and the moving track of the dynamic particles at the last data acquisition time, so that the display effect of the dynamic particles is improved. When a user wants to compare or display the running tracks of the dynamic particles at two moments, the user does not need to respectively screen the running tracks of the dynamic particles at two moments and then combine the running tracks, and only needs to screen the running tracks of the dynamic particles at the moment after inputting a new data acquisition moment, so that the user experience is improved;
Further, when the image frame is rendered, a particle array including dynamic particles and particle coordinates of the image frame may be first generated, and then a moving track of the dynamic particles may be generated by using the particle coordinates, thereby completing image rendering. Through the arrangement, the image rendering efficiency can be improved, incontinuous recorded content caused by screen blocking during video recording is avoided, the display effect of dynamic particles is further improved, and the user experience is improved.
A specific implementation manner of generating the particle array corresponding to the current image frame according to the first particle data in step S102 in the first embodiment is described in detail below with reference to the second embodiment.
Example two
Fig. 4 is a flowchart of an image rendering method according to another embodiment of the present application, where an execution subject is used as a terminal device to describe the image rendering method. As shown in fig. 4, the image rendering method may include the steps of:
s201: determining whether the number of current dynamic particles in the current image frame reaches a preset number threshold, wherein the number threshold is determined according to the density of the particles in a display interface of the terminal equipment.
In this embodiment, the number threshold may be flexibly set by a person skilled in the art according to the density of the particles in the display interface of the terminal device, and no limitation is made here.
In one possible embodiment, the particle array may further include: a particle lifetime value corresponding to each dynamic particle; accordingly, the current dynamic particle acquisition mode may include: determining a second dynamic particle in a previous image frame of the current image frame; determining a particle life value of each second dynamic particle in the current image frame according to the difference between the particle life value corresponding to each second dynamic particle and the preset life value; deleting the dynamic particles with the particle life value of 0 in the second dynamic particles, and determining the current dynamic particles in the current image frame according to the remaining dynamic particles in the second dynamic particles; the particle life value corresponding to the second dynamic particle in the previous image frame is determined according to the particle life value randomly set when the second dynamic particle appears on the display interface of the terminal device for the first time and the preset life value.
In this embodiment, the unit of the particle lifetime value is a frame, and the particle lifetime value of the dynamic particle is subtracted from the preset lifetime value every time the display interface of the terminal device plays a frame. The preset lifetime value may be flexibly set by those skilled in the art, for example, the preset lifetime value may be 1 or 2, which is not limited herein.
Illustratively, dynamic particles B, C and D are present in the previous image frame of the current image frame, where in the previous image frame, the particle lifetime value of B is 2, C is 1, and D is 5, then in the current image frame, the particle lifetime value of B is 1, C is 0, D is 4, and since the particle lifetime value of C is 0, C is deleted in the current image frame, and its current dynamic particles are B and D.
In the embodiment, by adding the particle lifetime value to the dynamic particles, the dynamic particles can be continuously updated and supplemented, and the display effect of the dynamic particles can be improved. In addition, the particle life value of each dynamic particle is randomly set when the dynamic particle appears on the display interface of the terminal equipment for the first time, so that the dynamic particle cannot die in a large amount at the same time to cause uneven particle distribution in a page.
S202: if not, randomly determining a first number of third particle coordinates in a coordinate system corresponding to a display interface of the terminal equipment, wherein the first number is the difference between a number threshold and the number of current dynamic particles.
S203: and determining a first dynamic particle corresponding to each third particle coordinate in the first particle data.
In this embodiment, after the third particle coordinates are determined, the corresponding first dynamic particles in the first particle data, that is, the dynamic particles to be added, may be determined according to the third particle coordinates.
S204: and adding the first dynamic particles into the current image frame according to the third particle coordinates corresponding to each first dynamic particle.
S205: and determining the dynamic particles in the current image frame according to the first dynamic particles and the current dynamic particles.
S206: and determining the first particle coordinates corresponding to each dynamic particle in the current image frame according to the third particle coordinates corresponding to each first dynamic particle and the fourth particle coordinates corresponding to each current dynamic particle.
In one possible implementation manner, the obtaining manner of the fourth particle coordinate corresponding to the current dynamic particle may include: determining a fifth particle coordinate of the current dynamic particle in an image frame previous to the current image frame; determining the motion direction and the motion speed of the current dynamic particles according to grid interpolation corresponding to the current dynamic particles; according to the fifth particle coordinates, the movement direction and the movement speed, determining fourth particle coordinates corresponding to the current dynamic particles; the fifth particle coordinate in the previous image frame is obtained according to an initial coordinate set randomly when the current dynamic particle appears on the display interface of the terminal device for the first time, and the initial coordinate is obtained according to an initial direction and an initial speed determined by grid interpolation.
In the present embodiment, the grid interpolation refers to particle data corresponding to the current dynamic particle. The particle data includes the motion direction and motion speed of the dynamic particles at different positions, and the particle data exists in the image frame in the form of grid interpolation. Therefore, the motion direction and the motion speed of the current dynamic particle can be determined according to the grid interpolation corresponding to the current dynamic particle, namely according to the particle data corresponding to the current dynamic particle.
FIG. 5 is a schematic diagram of calculating particle coordinates according to an embodiment of the present application, as shown in FIG. 5, p1 (x 1, y 1) is the particle coordinates of the dynamic particles in the previous image frame of the current image frame, and p2 (x 2, y 2) is the particle coordinates of the dynamic particles in the current image frame;
Figure 666097DEST_PATH_IMAGE001
for the direction of motion of the dynamic particles at p1, and (2)>
Figure 779415DEST_PATH_IMAGE001
The method can be obtained by interpolation calculation according to dynamic particles and grids; c is the motion speed of the dynamic particle at p1, and c can be obtained by interpolation calculation according to the dynamic particle and the grid. Since the switching time per frame is short, the motion speed c can be regarded as the distance between p1 and p2, and then the horizontal distance b and the vertical distance c between p1 and p2 can be determined by using a trigonometric function calculation formula, and p2 (x 2, y 2) can be determined based on the horizontal distance b and the vertical distance c, and p1 (x 1, y 1).
In this embodiment, the initial coordinates of each dynamic particle are known, and the motion direction and motion speed of the dynamic particle can be determined according to the data contained in the dynamic particle and the grid interpolation, so that the particle coordinates of the dynamic particle in each image frame can be simply and accurately determined through the dynamic particle and the initial coordinates thereof. In addition, the particle coordinates of each dynamic particle are randomly set when the dynamic particle appears on the display interface of the terminal equipment for the first time, so that the dynamic particles can be randomly distributed at various positions of the display interface.
S207: and generating a particle array corresponding to the current image frame according to each dynamic particle in the current image frame and the first particle coordinate corresponding to the dynamic particle.
In this embodiment, when generating the particle array, the number of current dynamic particles in the current image frame may not reach the number threshold, and new dynamic particles need to be added to make the number of dynamic particles in the screen reach the number threshold. Through the arrangement, the number of the dynamic particles in the display interface can be ensured to be stable all the time, and the display effect of the dynamic particles is further improved. In addition, when new dynamic particles are added, the dynamic particles can be randomly added into a coordinate system corresponding to a display interface of the terminal equipment, so that the unordered distribution of the dynamic particles at each position of the display interface is ensured.
The image rendering method of the present application is described below in a specific embodiment.
Example III
In a specific embodiment, a user wants to show the change of the running track of the wind on a day 8:00 and 18:00, the user logs in a weather forecast website on the terminal device, searches the weather forecast display video of the day, and the image rendering process of the weather forecast display video is as follows:
in the first step, a user clicks a progress point corresponding to 8:00 on a terminal device, the terminal device sends a data acquisition request carrying the data acquisition time of 8:00 to a server, and the server searches second particle data corresponding to 8:00 and sends the second particle data to the terminal device.
And secondly, randomly determining 1000 particle coordinates and corresponding particle life values on a display interface by the terminal equipment, determining corresponding dynamic particles from second particle data according to the particle coordinates, and generating a particle array according to the dynamic particles, the particle coordinates and the particle life values.
And thirdly, the terminal equipment determines the particle coordinates of the dynamic particles in the next image frame according to the particle coordinates, determines the particle life value of the dynamic particles in the next image frame according to the particle life value, and finishes rendering of the next image frame according to the particle coordinates and the particle life value of the dynamic particles in the next image frame.
And step four, the terminal equipment circularly performs the step three, and the rendering of each image frame is completed.
And fifthly, clicking a progress point corresponding to 18:00 on the terminal equipment by the user, sending a data acquisition request carrying the data acquisition time of 18:00 to the server by the terminal equipment, searching first particle data corresponding to 8:00 by the server, and sending the first particle data to the terminal equipment.
And step six, the terminal equipment continues to circularly perform the step three before receiving the first particle data, and the rendering of each image frame is completed.
And seventhly, after receiving the first particle data, the terminal equipment generates a particle array corresponding to the current image frame according to the first particle data, and determines a first particle coordinate corresponding to each dynamic particle.
Eighth, the terminal device determines a second particle coordinate of the dynamic particle in a preset number of image frames before the current image frame.
And ninth, the terminal equipment generates a running track of the dynamic particles according to the first particle coordinates and each second particle coordinate so as to complete the rendering of the current image frame.
And tenth, after clicking the progress point corresponding to 18:00 on the terminal equipment, the user can screen capture to obtain the change of the running track of the wind at 8:00 and 18:00.
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application, as shown in fig. 6, where the terminal device includes: the transceiver module 61 is configured to send a data acquisition request carrying a data acquisition time to the server, so that the server acquires first particle data corresponding to the data acquisition time according to the data acquisition request; the execution module 62 is configured to receive first particle data returned by the server, and generate a particle array corresponding to the current image frame according to the first particle data, where the particle array includes dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle; determining second particle coordinates of each dynamic particle in the current image frame in a preset number of image frames before the current image frame, wherein the second particle coordinates are generated according to second particle data corresponding to the last data acquisition time of the data acquisition time; and generating a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates to finish the rendering of the current image frame. In one embodiment, the specific implementation function of the terminal device may be described with reference to steps S101 to S104 in the first embodiment and steps S201 to S207 in the second embodiment, which are not described herein.
Fig. 7 is a schematic structural diagram of a terminal device according to another embodiment of the present application, as shown in fig. 7, where the terminal device includes: a processor 101, and a memory 102 communicatively coupled to the processor 101; memory 102 stores computer-executable instructions; the processor 101 executes computer-executable instructions stored in the memory 102 to implement the steps of the image rendering method in the above-described method embodiments.
In the above terminal device, the memory 102 and the processor 101 are electrically connected directly or indirectly to realize transmission or interaction of data. For example, the elements may be electrically connected to each other via one or more communication buses or signal lines, such as through a bus connection. The memory 102 stores therein computer-executable instructions for implementing a data access control method, including at least one software functional module that may be stored in the memory 102 in the form of software or firmware, and the processor 101 executes the software programs and modules stored in the memory 102 to thereby perform various functional applications and data processing.
The Memory 102 may be, but is not limited to, random access Memory (Random Access Memory, RAM), read Only Memory (ROM), programmable Read Only Memory (PROM), erasable Read Only Memory (Erasable Programmable Read-Only Memory, EPROM), electrically erasable Read Only Memory (Electric Erasable Programmable Read-Only Memory, EEPROM), etc. The memory 102 is used for storing a program, and the processor 101 executes the program after receiving an execution instruction. Further, the software programs and modules within the memory 102 may also include an operating system, which may include various software components and/or drivers for managing system tasks (e.g., memory management, storage device control, power management, etc.), and may communicate with various hardware or software components to provide an operating environment for other software components.
The processor 101 may be an integrated circuit chip with signal processing capabilities. The processor 101 may be a general-purpose processor, including a central processing unit (Central Processing Unit, abbreviated as CPU), a network processor (Network Processor, abbreviated as NP), and the like. The disclosed methods, steps, and logic blocks in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
An embodiment of the present application further provides a computer-readable storage medium, where computer-executable instructions are stored, where the computer-executable instructions, when executed by a processor, are configured to implement the steps of the method embodiments of the present application.
An embodiment of the present application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of the method embodiments of the present application.
Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice within the art to which the application pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the application being indicated by the following claims.
It is to be understood that the present application is not limited to the precise arrangements and instrumentalities shown in the drawings, which have been described above, and that various modifications and changes may be effected without departing from the scope thereof. The scope of the application is limited only by the appended claims.

Claims (11)

1. An image rendering method, comprising:
the method comprises the steps that terminal equipment sends a data acquisition request carrying data acquisition time to a server, so that the server acquires first particle data corresponding to the data acquisition time according to the data acquisition request;
the terminal equipment receives the first particle data returned by the server and generates a particle array corresponding to a current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle;
the terminal equipment determines second particle coordinates of each dynamic particle in the current image frame in a preset number of image frames before the current image frame, wherein the second particle coordinates are generated according to second particle data corresponding to the last data acquisition time of the data acquisition time;
The terminal equipment generates a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates so as to complete rendering of the current image frame;
generating a particle array corresponding to the current image frame according to the first particle data specifically includes:
determining whether the number of current dynamic particles in the current image frame reaches a preset number threshold value, wherein the number threshold value is determined according to the density of particles in a display interface of the terminal equipment;
if not, randomly determining a first number of third particle coordinates in a coordinate system corresponding to a display interface of the terminal equipment, wherein the first number is a difference value between the number threshold and the number of the current dynamic particles;
determining a first dynamic particle corresponding to each third particle coordinate in the first particle data;
adding the first dynamic particles to the current image frame according to the third particle coordinates corresponding to each first dynamic particle;
determining dynamic particles in the current image frame according to the first dynamic particles and the current dynamic particles;
Determining a first particle coordinate corresponding to each dynamic particle in the current image frame according to a third particle coordinate corresponding to each first dynamic particle and a fourth particle coordinate corresponding to each current dynamic particle;
generating a particle array corresponding to the current image frame according to each dynamic particle in the current image frame and a first particle coordinate corresponding to the dynamic particle;
further comprises: storing a particle array corresponding to each image frame;
accordingly, the determining the second particle coordinates of the dynamic particle in the preset number of image frames before the current image frame includes:
determining a first particle array corresponding to a preset number of image frames before the current image frame;
and determining a second particle coordinate corresponding to the dynamic particle in each first particle array.
2. The method of claim 1, wherein the array of particles further comprises: a particle lifetime value corresponding to each of the dynamic particles;
correspondingly, the current dynamic particle obtaining mode includes:
determining a second dynamic particle in a previous image frame to the current image frame;
Determining a particle life value of each second dynamic particle in the current image frame according to the difference between the particle life value corresponding to each second dynamic particle and a preset life value;
deleting the dynamic particles with the particle life value of 0 in the second dynamic particles, and determining the current dynamic particles in the current image frame according to the remaining dynamic particles in the second dynamic particles;
the particle life value corresponding to the second dynamic particle in the previous image frame is determined according to the particle life value randomly set when the second dynamic particle appears on the display interface of the terminal device for the first time and a preset life value.
3. The method according to claim 2, wherein the obtaining manner of the fourth particle coordinates corresponding to the current dynamic particle includes:
determining a fifth particle coordinate of the current dynamic particle in an image frame previous to the current image frame;
determining the motion direction and the motion speed of the current dynamic particle according to grid interpolation corresponding to the current dynamic particle;
determining a fourth particle coordinate corresponding to the current dynamic particle according to the fifth particle coordinate, the movement direction and the movement speed;
The fifth particle coordinate in the previous image frame is obtained according to an initial coordinate set randomly when the current dynamic particle appears on the display interface of the terminal device for the first time, and the initial coordinate is obtained according to an initial direction and an initial speed determined by grid interpolation.
4. The method according to claim 1, wherein the generating the moving track of the dynamic particle according to the first particle coordinate and each of the second particle coordinates specifically includes:
sequencing the first particle coordinates and each second particle coordinate according to the sequence of coordinate generation;
generating connecting lines between two adjacent particle coordinates in sequence;
determining the transparency of each connecting line according to the sequence of the connecting line generation;
and generating the running track of the dynamic particles according to the connecting lines and the transparency of each connecting line.
5. The method according to claim 4, wherein determining the transparency of each connection line according to the order in which the connection lines were generated comprises:
determining the initial transparency corresponding to each connecting line according to the sequence of the connecting line generation;
Determining a first particle life value corresponding to a particle coordinate which appears first in each connecting line;
judging whether the life value of the first particle is larger than a life value threshold value or not;
if not, determining the transparent proportion of the connecting line corresponding to the first particle life value according to the corresponding relation between the preset particle life value and the transparent proportion;
and for each connecting line, determining the transparency corresponding to the connecting line according to the initial transparency and the transparency proportion.
6. The method of claim 5, further comprising, before the terminal device generates a trajectory of the dynamic particles from the first particle coordinates and each of the second particle coordinates for each dynamic particle in the current image frame, respectively:
deleting connecting lines among the particle coordinates in the image frame above the current image frame;
correspondingly, the terminal device generates a running track of each dynamic particle in the current image frame according to the first particle coordinate and each second particle coordinate, and the running track comprises the following steps:
after deleting the connecting line between the particle coordinates in the previous image frame of the current image frame, the terminal device generates the moving track of each dynamic particle in the current image frame according to the first particle coordinate and each second particle coordinate.
7. A method according to any one of claims 1-3, wherein the first particle data and the second particle data are determined according to a data acquisition time in a data acquisition request sent by the terminal device after the server periodically acquires map drawing data and parses the map drawing data into readable data;
wherein the map drawing data is all drawing data of a map corresponding to the image.
8. A method according to any one of claims 1-3, characterized in that after the terminal device sends a data acquisition request carrying a data acquisition time to a server, it further comprises:
and rendering each image frame before the current image frame according to the second particle data corresponding to the last data acquisition time of the data acquisition time until the terminal equipment receives the first particle data returned by the server.
9. A terminal device, comprising:
the receiving and transmitting module is used for transmitting a data acquisition request carrying a data acquisition time to a server so that the server can acquire first particle data corresponding to the data acquisition time according to the data acquisition request;
The execution module is used for receiving the first particle data returned by the server and generating a particle array corresponding to a current image frame according to the first particle data, wherein the particle array comprises dynamic particles in the current image frame and first particle coordinates corresponding to each dynamic particle; for each dynamic particle in the current image frame, determining a second particle coordinate of the dynamic particle in a preset number of image frames before the current image frame, wherein the second particle coordinate is generated according to second particle data corresponding to the last data acquisition time of the data acquisition time; generating a running track of each dynamic particle in the current image frame according to the first particle coordinates and each second particle coordinates so as to finish rendering of the current image frame;
the execution module is specifically configured to, when generating the particle array corresponding to the current image frame according to the first particle data: determining whether the number of current dynamic particles in the current image frame reaches a preset number threshold value, wherein the number threshold value is determined according to the density of particles in a display interface of the terminal equipment;
If not, randomly determining a first number of third particle coordinates in a coordinate system corresponding to a display interface of the terminal equipment, wherein the first number is a difference value between the number threshold and the number of the current dynamic particles;
determining a first dynamic particle corresponding to each third particle coordinate in the first particle data;
adding the first dynamic particles to the current image frame according to the third particle coordinates corresponding to each first dynamic particle;
determining dynamic particles in the current image frame according to the first dynamic particles and the current dynamic particles;
determining a first particle coordinate corresponding to each dynamic particle in the current image frame according to a third particle coordinate corresponding to each first dynamic particle and a fourth particle coordinate corresponding to each current dynamic particle;
generating a particle array corresponding to the current image frame according to each dynamic particle in the current image frame and a first particle coordinate corresponding to the dynamic particle;
the execution module is further used for storing a particle array corresponding to each image frame; determining a first particle array corresponding to a preset number of image frames before the current image frame; and determining a second particle coordinate corresponding to the dynamic particle in each first particle array.
10. A terminal device comprising a processor, and a memory communicatively coupled to the processor;
the memory stores computer-executable instructions;
the processor executes computer-executable instructions stored in the memory to implement the method of any one of claims 1 to 8.
11. A computer readable storage medium having stored therein computer executable instructions which when executed by a processor are adapted to carry out the method of any one of claims 1 to 8.
CN202211154815.6A 2022-09-22 2022-09-22 Image rendering method, terminal device and medium Active CN115578504B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211154815.6A CN115578504B (en) 2022-09-22 2022-09-22 Image rendering method, terminal device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211154815.6A CN115578504B (en) 2022-09-22 2022-09-22 Image rendering method, terminal device and medium

Publications (2)

Publication Number Publication Date
CN115578504A CN115578504A (en) 2023-01-06
CN115578504B true CN115578504B (en) 2023-05-30

Family

ID=84580909

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211154815.6A Active CN115578504B (en) 2022-09-22 2022-09-22 Image rendering method, terminal device and medium

Country Status (1)

Country Link
CN (1) CN115578504B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063279A (en) * 2018-07-16 2018-12-21 南京信息工程大学 Three-dimensional space wind field Dynamic Simulation Method based on particle flux trajectory track algorithm

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10134179B2 (en) * 2015-09-30 2018-11-20 Visual Music Systems, Inc. Visual music synthesizer
CN106056660A (en) * 2016-05-31 2016-10-26 深圳铂睿智恒科技有限公司 Mobile terminal simulation particle system method
CN113223122B (en) * 2021-05-13 2022-06-17 广州光锥元信息科技有限公司 Method and device for realizing scene-entering and scene-exiting animation through particles
CN114219884A (en) * 2021-12-22 2022-03-22 脸萌有限公司 Particle special effect rendering method, device and equipment and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109063279A (en) * 2018-07-16 2018-12-21 南京信息工程大学 Three-dimensional space wind field Dynamic Simulation Method based on particle flux trajectory track algorithm

Also Published As

Publication number Publication date
CN115578504A (en) 2023-01-06

Similar Documents

Publication Publication Date Title
US10593110B2 (en) Method and device for computing a path in a game scene
CN110059151B (en) Map rendering method, map rendering device, map server, and storage medium
CN114359758A (en) Power transmission line detection method and device, computer equipment and storage medium
CN111090712A (en) Data processing method, device and equipment and computer storage medium
CN112270736B (en) Augmented reality processing method and device, storage medium and electronic equipment
CN110457407B (en) Method and apparatus for processing point cloud data
CN111870953B (en) Altitude map generation method, device, equipment and storage medium
CN112505652B (en) Target detection method, device and storage medium
CN115794414B (en) Satellite earth-to-earth view analysis method, device and equipment based on parallel computing
CN111652961A (en) Meteorological data volume rendering method based on GPU
CN112798004A (en) Vehicle positioning method, device, equipment and storage medium
CN111046117A (en) Method, system, device and medium for displaying route travelling position on map in real time
CN114119850A (en) Virtual and actual laser radar point cloud fusion method and device
CN114937081A (en) Internet vehicle position estimation method and device based on independent non-uniform incremental sampling
CN116109657A (en) Geographic information data acquisition processing method, system, electronic equipment and storage medium
CN114877893A (en) Map generation method and device, electronic equipment and storage medium
CN114859938A (en) Robot, dynamic obstacle state estimation method and device and computer equipment
CN115016435A (en) Automatic driving vehicle test method, device, system, equipment and medium
CN115578504B (en) Image rendering method, terminal device and medium
CN112215952B (en) Curve drawing method, computer storage medium and electronic device
CN110887490B (en) Key frame selection method, medium, terminal and device for laser positioning navigation
CN113034582A (en) Pose optimization device and method, electronic device and computer readable storage medium
CN112614207A (en) Contour line drawing method, device and equipment
CN112184539A (en) Point cloud data processing method and device
CN115810086A (en) Three-dimensional scene reconstruction method and device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant