CN113032072B - Weather state display method and device, electronic equipment and storage medium - Google Patents

Weather state display method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113032072B
CN113032072B CN202110321020.9A CN202110321020A CN113032072B CN 113032072 B CN113032072 B CN 113032072B CN 202110321020 A CN202110321020 A CN 202110321020A CN 113032072 B CN113032072 B CN 113032072B
Authority
CN
China
Prior art keywords
weather
state
projection
rotation
target
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
CN202110321020.9A
Other languages
Chinese (zh)
Other versions
CN113032072A (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN202110321020.9A priority Critical patent/CN113032072B/en
Publication of CN113032072A publication Critical patent/CN113032072A/en
Application granted granted Critical
Publication of CN113032072B publication Critical patent/CN113032072B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • G06F3/04847Interaction techniques to control parameter settings, e.g. interaction with sliders or dials
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/08Projecting images onto non-planar surfaces, e.g. geodetic screens
    • 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)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a weather state display method, a weather state display device, electronic equipment and a storage medium, wherein the weather state display method comprises the following steps: receiving a first operation instruction, wherein the first operation instruction is used for indicating that the displayed weather state is switched; responding to the first operation instruction, and acquiring a target weather state to be displayed; and receiving and displaying real-time projection in the process of changing from the displayed current weather state to the target weather state, wherein the real-time projection is the projection of a pre-established weather element three-dimensional space in the process of moving from the position corresponding to the current weather state to the position corresponding to the target weather state on a display interface, and at least one weather background element is arranged in the weather element three-dimensional space so as to provide an immersive weather state display effect.

Description

Weather state display method and device, electronic equipment and storage medium
Technical Field
The disclosure relates generally to the technical field of terminal display, and in particular relates to a weather state display method, a weather state display device, electronic equipment and a storage medium.
Background
Mobile terminals typically have weather status display functionality. However, in the related art, a display method of a 2D paging structure is generally adopted, as shown in fig. 1, which has a serious sense of splitting during weather conversion, so as to affect the user experience.
Disclosure of Invention
In view of the foregoing drawbacks or shortcomings of the prior art, it is desirable to provide a weather state display method, apparatus, electronic device, and storage medium that provide an immersive weather state display effect.
In a first aspect, the present application provides a weather status display method, including the steps of:
receiving a first operation instruction, wherein the first operation instruction is used for indicating that the displayed weather state is switched;
Responding to the first operation instruction, and acquiring a target weather state to be displayed;
And receiving and displaying real-time projection in the process of changing from the displayed current weather state to the target weather state, wherein the real-time projection is the projection of a pre-established weather element three-dimensional space on a display interface in the process of moving from the position corresponding to the current weather state to the position corresponding to the target weather state, and at least one weather background element is arranged in the weather element three-dimensional space.
In some embodiments, the weather background elements have a plurality of positions which are relatively fixed, and the weather background elements move in the weather element three-dimensional space according to a preset rule relative to the weather element three-dimensional space.
In some embodiments, the transparency of the real-time projection is inversely related to the distance between the weather background element and the display interface.
In some embodiments, weather state elements corresponding to weather states are provided in the weather element three-dimensional space by regions, and when the target weather state is different from the current weather state, the method further includes:
When the weather element three-dimensional space is positioned at the position corresponding to the current weather state, calculating and displaying a first state projection of the weather state element corresponding to the current weather state, wherein the first state projection is a projection formed by the weather state element positioned at the position corresponding to the current weather state;
And when the weather element three-dimensional space is positioned at the position corresponding to the target weather state, calculating and displaying a second state projection of the weather state element corresponding to the target weather state, wherein the second state projection is a projection formed by the weather state element positioned at the position corresponding to the target weather state.
In some embodiments, a weather information data component is displayed, the weather information data component comprising a transparent panel and information parameters generated from a currently projected weather state within the display interface.
In some embodiments, a second operation instruction is received, wherein the second operation instruction is used to rotate the real-time projection; and responding to the second operation instruction, acquiring and displaying a rotation projection, wherein the rotation projection is generated according to the second operation instruction and the real-time projection.
In some embodiments, before the acquiring and displaying the rotational projection, further comprising:
Acquiring an initial position of a weather element, and identifying the type of the weather element, wherein the weather element comprises the weather background element and a weather state element;
Acquiring rotation parameters of the weather element according to the initial position and the type of the weather element, wherein the rotation parameters comprise a rotation angle, a rotation radius and a rotation direction;
extracting a target rotation angle in the second operation instruction;
And acquiring the rotation projection according to the target rotation angle and the rotation parameter.
In some embodiments, when the weather element is of a first weather type, the acquiring the rotation projection according to the target rotation angle and the rotation parameter comprises:
controlling the weather element to rotate the target rotation angle according to the rotation angle and the rotation radius to obtain the rotation projection;
when the weather element is of the second weather type, the obtaining the rotation projection according to the target rotation angle and the rotation parameter includes:
and controlling the weather element to rotate the target rotation angle according to the rotation angle and the rotation direction, so as to obtain the rotation projection.
In some embodiments, when the weather element is of a first weather type, the rotation axis of the weather element is in the z-axis plane of the display interface, a track of the weather element rotating by the target rotation angle around the rotation axis according to the rotation angle and the rotation radius is generated according to the rotation angle and the rotation radius, and the rotation of the weather element according to the rotation track is controlled to obtain a rotation projection of the weather element;
When the weather element is of a second weather type, randomly generating a rotation angle of the weather element on a y axis, acquiring a vector matrix according to initial coordinates of the weather element, establishing an inverse matrix according to the rotation angle and the vector matrix, determining original coordinates according to the vector matrix and the inverse matrix, determining a rotation direction of the weather element according to the original coordinates and the initial coordinates, determining a track of the weather element rotating by the target rotation angle according to the rotation direction, and controlling the weather element to rotate according to the rotation track so as to obtain rotation projection of the weather element.
In some embodiments, the weather element three-dimensional space is rendered using an android native system.
In a second aspect, the present application provides a weather condition display device comprising:
The receiving module is used for receiving a first operation instruction, wherein the first operation instruction is used for indicating the weather state to be displayed to be switched;
the response module is used for responding to the first operation instruction and acquiring a target weather state to be displayed;
the display module is used for receiving and displaying real-time projection in the process of changing from the current weather state to the target weather state, wherein the real-time projection is projection on a display interface in the process that a weather element three-dimensional space moves from a position corresponding to the current weather state to a position corresponding to the target weather state, and at least one weather element is arranged in the weather element three-dimensional space.
In a third aspect, the present application provides a computer program comprising a memory, a processor and a program stored on the memory and executable on the processor, characterized in that the processor, when executing the program, implements a weather status display method as described above.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program, characterized in that the program, when executed by a processor, implements a weather state display method as described above.
Drawings
Other features, objects and advantages of the present application will become more apparent upon reading of the detailed description of non-limiting embodiments, made with reference to the accompanying drawings in which:
FIG. 1 is a diagram showing the effect of the related art according to the present application;
FIG. 2 is a flow chart of a weather status display method according to an embodiment of the application;
Fig. 3 is a schematic structural diagram of a three-dimensional space of a weather element according to an embodiment of the present application, where a dashed box is a display interface;
FIG. 4 is a schematic view showing the transparency of the interface distance according to the present application;
FIG. 5 is a flowchart of a weather status display method according to another embodiment of the present application;
FIG. 6 is a flowchart of a weather status display method according to another embodiment of the present application;
FIG. 7 is a graph showing the effect of rotation of a first air element in a spatial coordinate system according to the present application;
FIG. 8 is a schematic block diagram of a weather status display device according to an embodiment of the application;
Fig. 9 is a schematic diagram of a computer system suitable for use in implementing an electronic device or server of an embodiment of the application.
Detailed Description
Embodiments of the present invention are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present invention and should not be construed as limiting the invention.
Further, while embodiments of the present application provide method operational instruction steps as illustrated in the following embodiments or figures, more or fewer operational instruction steps may be included in the method, either on a regular basis or without inventive effort. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present application. The methods may be performed sequentially or in parallel as shown in the embodiments or the drawings when the actual processing or the apparatus is performed.
Referring to fig. 2, fig. 2 is a flowchart of a weather status display method according to an embodiment of the application. The weather state display device in this embodiment may be configured in an electronic device or may be configured in a server for controlling the electronic device, and the server communicates with the electronic device to control the electronic device.
The electronic device in this embodiment may include, but is not limited to, an electronic device with a display interface, such as a personal computer, a platform computer, and a smart phone, and the embodiment is not particularly limited to the electronic device.
As shown in fig. 2 and 3, the weather status display method includes the steps of:
Step 101, receiving a first operation instruction, wherein the first operation instruction is used for indicating that the displayed weather state is switched.
Step 102, in response to the first operation instruction, obtaining a target weather state to be displayed.
And step 103, receiving and displaying real-time projection in the process of changing from the current weather state to the target weather state, wherein the real-time projection is projection on a display interface in the process of moving the pre-established weather element three-dimensional space from the current weather state position to the target weather state position, and at least one weather background element is arranged in the weather element three-dimensional space.
It should be noted that, the first operation instruction is an instruction input by the user through the interactive interface, for example, a touch instruction. Weather switches may include, but are not limited to, weather switches for different time periods in the same region and switches between different regions in the same region.
For example, in the weather application program, the user may implement the input of the first operation instruction by selecting different dates in the current region in the display interface, so as to perform weather switching in different time periods in the same region, or implement the input of the first operation instruction by performing lateral sliding switching on the display interface, so as to perform switching between different regions in the same time period.
Then, according to the first operation instruction, the target weather state to be displayed, namely, the target weather state to be displayed after switching is obtained. The target weather state can acquire official real-time weather through the China weather network, and specifically, the application program can call the network connection function of the mobile terminal to establish network connection with the China weather network so as to acquire the target weather state.
The weather element three-dimensional space is constructed by utilizing the Android native system drawing technology, and three-dimensional weather elements such as clouds, raindrops, snowflakes and the like are arranged in the weather element three-dimensional space.
As one possible embodiment, the weather background elements have a plurality of positions which are relatively fixed, and the weather background elements move in the weather element three-dimensional space according to a preset rule relative to the weather element three-dimensional space.
The weather background element may be a cloud, that is, the cloud may be uniformly and dispersedly configured in the weather element three-dimensional space, and the cloud circularly flutters in the weather element three-dimensional space according to a preset direction and a preset speed relative to the weather element three-dimensional space.
It is understood that the android native system is utilized to draw the three-dimensional space of the weather element, a developer does not need to master a cross-platform drawing technology of third-party development software, meanwhile, the memory occupied by the display of the weather state is greatly reduced, and the landing cost of the product is effectively reduced.
Specifically, a space coordinate system may be preset in advance, and a display interface with a projection surface is provided in the space coordinate system, where the display interface is an expression of an interactive interface of a user terminal in the space coordinate system, and a projection effect of a weather element on the display interface is an actual display effect in the user interactive interface, and the display interface is fixed at a specific position in the space coordinate system, where the position may be determined according to a size, an aspect ratio, and the like of the display interface.
It should be noted that, the space coordinate system further includes coordinate points corresponding to multiple weather states one by one, when the weather element three-dimensional space moves to the corresponding coordinate point, the weather element corresponding to the weather state stored in the weather element three-dimensional space can be projected onto the projection surface of the display interface, so that the weather state displayed on the display interface is the target weather state. Wherein the weather elements conforming to the weather state include a weather background element and a weather state element corresponding to the weather state.
As a possible embodiment, weather state elements corresponding to the weather states are arranged in the weather element three-dimensional space according to the areas, when the target weather state is different from the current weather state, when the weather element three-dimensional space is positioned at a position corresponding to the current weather state, a first state projection of the weather state elements corresponding to the current weather state is calculated and displayed, and the first state projection is a projection formed by the weather state elements positioned at the position corresponding to the current weather state; and when the weather element three-dimensional space is positioned at the position corresponding to the target weather state, calculating and displaying second state projection of the weather state element corresponding to the target weather state, wherein the second state projection is a projection formed by the weather state element positioned at the position corresponding to the target weather state.
That is, before and after the weather status shuttle (transition from the current weather status to the target weather status) is performed, the projection of the weather status element is also displayed on the display interface, wherein the weather status element may be a raindrop, a snowflake, or the like, that is, the weather status element may be an added element corresponding to the weather status, for example, when the weather status is a light rain, a small amount of raindrop elements are provided in the position area corresponding to the light rain, when the weather status is a heavy rain, a large amount of raindrop elements are provided in the position area corresponding to the heavy rain, when the weather status is a light snow, a small amount of snowflake elements are provided in the position area corresponding to the light snow, and when the weather status is a heavy snow, a large amount of snowflake elements are provided in the position area corresponding to the heavy snow. And when the weather element three-dimensional space moves to the position corresponding to the weather state, the weather state elements corresponding to other weather states are not projected onto the display interface.
Specifically, when the weather element three-dimensional space is at the position corresponding to the current weather state, the weather background element and the weather state element corresponding to the current weather state can be projected onto the display interface at the same time, so that a user can see complete weather information corresponding to the current weather state through the interactive interface, after the weather element three-dimensional space moves according to the first operation instruction of the user, the weather element three-dimensional space reaches the position corresponding to the target weather state, and meanwhile, the weather background element and the weather state element corresponding to the target weather state are projected onto the display interface at the same time, so that the user can see complete weather information corresponding to the target weather state through the interactive interface.
Therefore, the application can also project the weather state elements onto the display interface, and can effectively improve the expression effect of the weather state information by combining the projection of the weather background elements, so that a user can accurately know the weather condition by reading the projection information, and the user experience is improved.
According to the method and the device for displaying the weather information, the weather elements (including the weather background elements and the weather state elements) passing through the display interface can be projected onto the display interface in real time in the moving process of the weather elements in the three-dimensional space, so that the weather state displayed on the display interface shows the effect of shuttling from the current weather state to the target weather state in the cloud layer, the cracking sense during weather switching is effectively reduced, and the user experience is improved.
Therefore, when the weather state is converted, the weather elements in the weather element three-dimensional space are projected to the display interface in real time, so that the display interface can bring immersive weather conversion experience for a user, and the user experience is improved.
Further, the real-time projection is a gesture projection of a weather element having a distance from the display interface less than or equal to a preset distance.
It should be understood that, the display interface is a projection plane of the foregoing display interface, that is, when projecting to the display interface, it is necessary to acquire the position information of each weather element first, then compare the position information of the weather element with the coordinate point of the display interface, if the distance between the two is less than or equal to the preset distance, project the posture of the weather element onto the display interface, and if the distance between the two is greater than the preset distance, not project the posture of the weather element onto the display interface.
Still further, as shown in FIG. 4, the transparency of the real-time projection is inversely related to the distance between the weather element and the display interface. Wherein, the position of z=0 is the position of the display interface in the mobile phone coordinate system, and alpha is transparency.
That is, since the optical principle generates a projection effect of near and far, that is, the smaller the distance from the display interface, the larger the projection on the display interface, and the larger the distance from the display interface, the smaller the projection on the display interface, so that the weather element projection on the display interface can generate a three-dimensional imaging effect visually.
For example, as shown in fig. 3, with z=0 as a center position, the transparency corresponding to the z e (-86, 86) region is 1, which indicates that all weather elements in the region are not blurred at all on the display interface, the transparency corresponding to the z e (-286, -86) and z e (86,286) regions is 1-0, which indicates that the weather elements in the region are gradually blurred as the distance from the display interface increases until the weather elements are completely blurred, the transparency corresponding to the z e (- ≡, -86) and z e (286 ++) regions is 0, which indicates that the projection of the weather elements in the region on the display interface is completely transparent, i.e., the weather elements in the region cannot be displayed in the display interface. Therefore, in this embodiment, the preset distance may be 286, that is, when the distance between the weather element and the display interface is less than 286, the weather element may be projected onto the display interface, and the corresponding transparency is determined according to the distance between the weather element and the display interface, and when the distance between the weather element and the display interface is greater than 286, the weather element may not be projected onto the display interface, and the transparency on the display interface may be set to 0 in terms of parameters. Preferably, the length of each weather state in the three-dimensional space of the weather element is greater than 572 (286×2) units of distance, so as to ensure that the projection of the current weather state is not affected by the weather state elements corresponding to other weather states.
Therefore, in order to further increase the visual effect of three-dimensional imaging, the transparency of the projected color of the weather element is adjusted so that the larger the distance from the display interface is, the lower the projected transparency is, i.e. the weaker the projection effect is, and the visual sense that the sight is not right due to the too far distance is presented to the user.
As a possible embodiment, the weather status display method further includes: and displaying a weather information data component, wherein the weather information data component comprises a transparent panel and information parameters, and the information parameters are generated according to the currently projected weather state in the display interface.
It should be appreciated that the information parameters are displayed opaque and that, when the weather state is switched, the weather information component only changes information based on the weather state currently projected within the display interface, i.e., the weather information data component does not shuttle based on the weather state switch.
Specifically, the information parameters can adopt white or black font colors, when the weather element three-dimensional space is at the position corresponding to the current weather state, the weather element corresponding to the current weather state is projected on the display interface, and weather numerical information corresponding to the current weather state, such as weather fine, 18 ℃ and the like, is displayed in the weather information data component. When the weather element three-dimensional space moves according to a first operation instruction of a user, the display interface displays projection of a weather background element in a midway area in the moving process of the weather element three-dimensional space in real time, and when the weather element three-dimensional space reaches a position corresponding to a target weather state, the display interface displays weather elements (including the weather background element and the weather state element) corresponding to the target weather state, at the moment, weather information corresponding to the target weather state, such as light rain, 12 ℃, is also acquired, information parameters are generated according to the numerical information, and then the information parameters are displayed on a weather information data assembly to replace weather numerical information corresponding to the current weather state.
Optionally, the information parameters may further include, but are not limited to, geographic location information, time information, weather information of a future preset time, etc. corresponding to the target weather state, which is not limited by the present application.
Further, as shown in fig. 5, the weather status display method further includes:
step 201, receiving a second operation instruction, where the second operation instruction is used to rotate the real-time projection.
And step 202, responding to a second operation instruction, and acquiring and displaying a rotation projection, wherein the rotation projection is generated according to the second operation instruction and the real-time projection.
That is, in order to further increase the interest and interactive experience of the weather status display function, the application further increases the interactive weather special effect, that is, according to the second operation instruction applied on the interactive interface by the user, the weather element is controlled to present a rotation effect conforming to the natural law on the display interface, for example, the bullet moment of the raindrop, the snowflake flying on the snow, and the like.
As a possible embodiment, as shown in fig. 6, before receiving and displaying the rotational projection, further includes:
Step 301, obtaining an initial position of a weather element, and identifying a type of the weather element, wherein the weather element comprises a weather background element and a weather state element.
Step 302, according to the initial position and type of the weather element, obtaining the rotation parameters of the weather element, wherein the rotation parameters comprise a rotation angle, a rotation radius and a rotation direction.
Step 303, extracting the target rotation angle in the second operation instruction.
Step 304, acquiring a rotation projection according to the target rotation angle and the rotation parameter.
The first weather type can be cloud or rain, the second weather type can be snow, namely, the weather elements are classified according to the rotation morphological characteristics when naturally falling, and according to natural knowledge, natural weather elements which can be seen in rainy days can be seen, besides the falling raindrops, cloud layers containing a large amount of water are also arranged, so that the same rotation strategy can be adopted for the cloud weather effect and the rain weather effect.
Specifically, the application essentially plans the rotating path of the weather element, controls the weather element to rotate according to the planned rotating path, forms dynamic rotating projection and projects the dynamic rotating projection to the display interface. Therefore, the application assumes that the real-time projection is obtained by naturally rotating the weather element from the position of the last moment, that is, the initial coordinate of the real-time projection of the weather element is obtained by naturally rotating the coordinate of the last moment according to the rule (rotation angle).
In one aspect, when the weather element is of the first weather type, obtaining the rotational projection according to the target rotation angle and the rotation parameter includes: and controlling the weather element to rotate the target rotation angle according to the rotation angle and the rotation radius to obtain rotation projection.
Further, when the weather element is of the first weather type, the rotation axis of the weather element is in the z-axis plane of the display interface, a track of the weather element rotating around the rotation axis by the rotation angle and the rotation radius according to the rotation target rotation angle is generated according to the rotation angle and the rotation radius, and the weather element is controlled to rotate according to the rotation track, so that the rotation projection of the weather element is obtained.
In the application, the display special effect displayed by the rotary projection is set as the effect of raindrops falling on a window of a user viewing rain, and the effect can be named as bullet time of the raindrops, namely, the raindrops fly to a display interface under the action of gravity.
Therefore, when the weather element is of the first weather type, the weather background element and the weather state element in the three-dimensional space of the weather element can be regarded as a whole, the rotation angle of the weather element is obtained according to the initial coordinates, in the embodiment of the application, the first rotation angle of the weather element of the first weather type is obtained by calculation through an arctangent algorithm, or the second rotation angle of the weather element of the second weather type is obtained through a random number generation method, then, for the weather element of the first weather type, as the rotation axis of the weather element is in the z-axis plane of the display interface, the rotation radius of the weather element, namely, the rotation capacity of the weather element, is calculated according to the first rotation angle by utilizing the circular parameter property, then, the target rotation angle in the second operation instruction, namely, the rotation track of the weather element can be obtained according to the target rotation angle and the rotation radius, the weather element is controlled to rotate according to the planned rotation path, so that the dynamic rotation projection is formed and projected to the display interface.
It should be appreciated that, to create the effect of a raindrop striking a window, as shown in fig. 7, the mapping of the rotational trajectory of the weather element of the first weather type in the spatial coordinate system is the rotation of the first weather element in the vertical direction about a point in the display interface. The first air element is a black square frame and rotates from a position parallel to the plane of the bottom surface to the current position.
On the other hand, when the weather element is of the second weather type, according to the target rotation angle and the rotation parameter, acquiring the rotation projection includes: and controlling the weather element to rotate the target rotation angle according to the rotation angle and the rotation direction to obtain a rotation projection.
Further, when the weather element is of the second weather type, randomly generating a rotation angle of the weather state element on a y axis, acquiring a vector matrix according to initial coordinates of the weather state element, establishing an inverse matrix according to the rotation angle and the vector matrix, determining original coordinates according to the vector matrix and the inverse matrix, determining a rotation direction of the weather state element according to the original coordinates and the initial coordinates, determining a track of the rotation angle of the weather state element according to the rotation direction, rotating the weather state element according to the rotation track, and obtaining a rotation projection of the weather state element.
The second weather type is snow, and according to natural knowledge, the snow usually slowly flies in the air according to wind power and gravity, so that the display special effect displayed on the rotary projection of the snow elements in the application is the effect that the snow naturally flies in the air under the wind power. It should be understood that, because the snowflakes have smaller mass and slow descending speed, slight environmental changes in the air and even the acting forces among the plurality of snowflakes can influence the drifting direction of the snowflakes, so that the drifting direction of each snowflake is not necessarily the same.
Specifically, a vector matrix of the weather element is obtained according to an initial coordinate of the weather element of the second weather type, wherein the vector matrix is a vector array, an inverse matrix is established according to a rotation angle of the weather element on a y axis and the vector matrix, then the original coordinate before the rotation of the weather element is obtained according to multiplication of the vector matrix and the inverse matrix, namely, the rotation path planning of the weather element is understood as that the weather element rotates to a current position (initial coordinate) from the original coordinate according to a randomly generated rotation angle on the y axis, and continuously rotates from the current position according to the current rotation angle, therefore, the rotation direction of the weather element is continuously determined according to the original coordinate and the initial coordinate, a track of the rotation angle of the weather element according to the rotation direction is determined according to the rotation direction, then the weather element is controlled to rotate according to the rotation track, and the rotation projection of the weather element is obtained.
As one possible embodiment, the target rotation angle may be determined according to the pressing time period or the sliding angle in the second operation instruction.
For example, when the user presses the terminal screen, the target rotation angle may be related to the length of time and/or the force with which the user presses the terminal screen, i.e., the longer the length of time, the greater the force the greater the target rotation angle; when the user slides the terminal screen, the target rotation angle may be related to the user sliding speed, i.e., the faster the sliding speed, the greater the target rotation angle.
Further, in order to simultaneously satisfy the three-dimensional space display effect when the weather element is rotated, the application further comprises: when the weather elements are of the second weather type, acquiring the height coordinates of the rotation projection of each weather element; and scaling and adjusting the gesture of the rotary projection according to the height coordinates.
That is, the size of the weather element displayed in the display interface is further defined according to the height of the weather element, and the size of the weather element is maximized when the height of the weather element matches the height of the human body, and gradually decreases as the weather element is away from the height of the human body.
In summary, in the embodiment of the application, when the weather state is converted, the weather elements in the three-dimensional space of the weather elements are projected to the display interface in real time, so that the display interface can bring immersive weather conversion experience to the user, and the user experience is improved.
In order to achieve the above purpose, the application also provides a weather state display device.
Fig. 8 is a block diagram of a weather status display device according to an embodiment of the application. As shown in fig. 8, the weather condition display device 10 includes:
A receiving module 11, configured to receive a first operation instruction, where the first operation instruction is used to instruct to switch the displayed weather status;
a response module 12, configured to obtain a target weather state to be displayed in response to the first operation instruction;
The display module 13 is configured to receive and display a real-time projection in a process of changing from a current weather state to a target weather state, where the real-time projection is a projection on a display interface in a process of moving a pre-established weather element three-dimensional space from a position corresponding to the current weather state to a position corresponding to the target weather state, and at least one weather background element is set in the weather element three-dimensional space.
In some embodiments, the weather background elements have a plurality of positions which are relatively fixed, and the weather background elements move in the weather element three-dimensional space according to a preset rule relative to the weather element three-dimensional space.
In some embodiments, the transparency of the real-time projection is inversely related to the distance between the weather background element and the display interface.
In some embodiments, weather status elements corresponding to weather status are provided in the weather element three-dimensional space by area, and when the target weather status is different from the current weather status, the display module 13 is further configured to:
When the three-dimensional space of the weather element is positioned at a position corresponding to the current weather state, calculating and displaying a first state projection of the weather state element corresponding to the current weather state, wherein the first state projection is a projection formed by the weather state element positioned at the position corresponding to the current weather state;
And when the weather element three-dimensional space is positioned at the position corresponding to the target weather state, calculating and displaying second state projection of the weather state element corresponding to the target weather state, wherein the second state projection is a projection formed by the weather state element positioned at the position corresponding to the target weather state.
In some embodiments, the display module 13 is further configured to:
And displaying a weather information data component, wherein the weather information data component comprises a transparent panel and information parameters, and the information parameters are generated according to the currently projected weather state in the display interface.
In some embodiments, the receiving module 11 is further configured to:
receiving a second operation instruction, wherein the second operation instruction is used for rotating the real-time projection;
And responding to the second operation instruction, acquiring and displaying a rotation projection, wherein the rotation projection is generated according to the second operation instruction and the real-time projection.
In some embodiments, the receiving module 11 is further configured to:
Acquiring an initial position of a weather element, and identifying the type of the weather element, wherein the weather element comprises a weather background element and a weather state element;
Acquiring rotation parameters of the weather element according to the initial position and the type of the weather element, wherein the rotation parameters comprise a rotation angle, a rotation radius and a rotation direction;
Extracting a target rotation angle in the second operation instruction;
And acquiring rotation projection according to the target rotation angle and the rotation parameter. In some embodiments, the receiving module 11 is further configured to:
when the weather element is of the first weather type, according to the target rotation angle and the rotation parameter, obtaining the rotation projection comprises:
Controlling the weather element to rotate the rotation angle of the target according to the rotation angle and the rotation radius to obtain a rotation projection;
When the weather element is of the second weather type, according to the target rotation angle and the rotation parameter, obtaining the rotation projection includes:
and controlling the weather element to rotate the target rotation angle according to the rotation angle and the rotation direction to obtain a rotation projection.
In some embodiments, the receiving module 11 is further configured to:
when the weather element is of a first weather type, a rotating shaft of the weather element is arranged in a z-axis plane of a display interface, a track of the weather element rotating around a rotating shaft by a target rotating angle according to the rotating angle and the rotating radius is generated according to the rotating angle and the rotating radius, and the weather element is controlled to rotate according to the rotating track, so that a rotating projection of the weather element is obtained;
When the weather element is of the second weather type, randomly generating a rotation angle of the weather element on a y axis, acquiring a vector matrix according to the initial coordinates of the weather element, establishing an inverse matrix according to the rotation angle and the vector matrix, determining the initial coordinates according to the vector matrix and the inverse matrix, determining a rotation direction of the weather element according to the initial coordinates and the initial coordinates, determining a track of the weather element rotating a target rotation angle according to the rotation direction, and controlling the weather element to rotate according to the rotation track so as to obtain a rotation projection of the weather element.
In some embodiments, the weather element three-dimensional space is drawn using an android native system.
It should be understood that the elements or modules described in the weather state display device 10 correspond to the various steps in the weather state display method described with reference to fig. 2. Thus, the operations and features described above with respect to the weather state display method are equally applicable to the weather state display device 10 and the modules contained therein, and are not described in detail herein. The weather status display device 10 may be implemented in a browser of the electronic device or other security application in advance, or may be loaded into the browser of the electronic device or security application thereof by downloading or the like. The corresponding elements in the weather status display device 10 may cooperate with elements in the electronic device to implement aspects of embodiments of the present application.
Referring now to FIG. 9, there is shown a schematic diagram of a computer system suitable for use in implementing a terminal device or server in accordance with an embodiment of the present application.
As shown in fig. 9, the computer system includes a Central Processing Unit (CPU) 801 that can execute various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 802, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, according to embodiments of the present disclosure, the process described above with reference to fig. X may be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program tangibly embodied on a machine-readable medium, the computer program comprising program code for performing the weather status display method of fig. 2. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules involved in the embodiments of the present application may be implemented in software or in hardware. The described units or modules may also be provided in a processor, for example, as: a processor includes a receiving module, a responding module, and a display module. The names of these units or modules do not in any way limit the units or modules themselves, and the receiving module may also be described as "a module for receiving a first operation instruction for performing a weather switch", for example.
As another aspect, the present application also provides a computer-readable storage medium, which may be a computer-readable storage medium contained in the apparatus described in the above embodiment; or may be a computer-readable storage medium, alone, that is not assembled into a device. The computer-readable storage medium stores one or more programs for use by one or more processors in performing the weather status display method described in the present application.
The above description is only illustrative of the preferred embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the application referred to in the present application is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the inventive concept. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.

Claims (11)

1.A weather condition display method, comprising the steps of:
receiving a first operation instruction, wherein the first operation instruction is used for indicating that the displayed weather state is switched;
Responding to the first operation instruction, and acquiring a target weather state to be displayed;
And receiving and displaying a real-time projection in the process of changing from the displayed current weather state to the target weather state, wherein the real-time projection is a projection on a display interface in the process of moving a pre-established weather element three-dimensional space from a position corresponding to the current weather state to a position corresponding to the target weather state, the weather element three-dimensional space is provided with at least one weather background element, and the transparency of the real-time projection is inversely related to the distance between the weather background element and the display interface.
2. The weather state display method according to claim 1, wherein the weather background elements are a plurality of, positions among the weather background elements are relatively fixed, and the weather background elements are moved in the weather element three-dimensional space according to a preset rule relative to the weather element three-dimensional space.
3. The weather state display method according to claim 1, wherein weather state elements corresponding to weather states are provided per region in the weather element three-dimensional space, and when the target weather state is different from the current weather state, the method further comprises:
When the weather element three-dimensional space is positioned at the position corresponding to the current weather state, calculating and displaying a first state projection of the weather state element corresponding to the current weather state, wherein the first state projection is a projection formed by the weather state element positioned at the position corresponding to the current weather state;
And when the weather element three-dimensional space is positioned at the position corresponding to the target weather state, calculating and displaying a second state projection of the weather state element corresponding to the target weather state, wherein the second state projection is a projection formed by the weather state element positioned at the position corresponding to the target weather state.
4. The weather status display method as claimed in claim 1, wherein the method further comprises:
and displaying a weather information data component, wherein the weather information data component comprises a transparent panel and information parameters, and the information parameters are generated according to the weather state of the current projection in the display interface.
5. The weather status display method as claimed in claim 1, wherein the method further comprises:
Receiving a second operation instruction, wherein the second operation instruction is used for rotating the real-time projection;
And responding to the second operation instruction, acquiring and displaying a rotation projection, wherein the rotation projection is generated according to the second operation instruction and the real-time projection.
6. The weather status display method as claimed in claim 5, further comprising, before the acquiring and displaying the rotational projection:
Acquiring an initial position of a weather element, and identifying the type of the weather element, wherein the weather element comprises the weather background element and a weather state element;
Acquiring rotation parameters of the weather state element according to the initial position and the type of the weather state element, wherein the rotation parameters comprise a rotation angle, a rotation radius and a rotation direction;
extracting a target rotation angle in the second operation instruction;
And acquiring the rotation projection according to the target rotation angle and the rotation parameter.
7. The weather status display method as claimed in claim 6, wherein the obtaining the rotation projection according to the target rotation angle and the rotation parameter when the weather status element is of a first weather type comprises:
controlling the weather element to rotate the target rotation angle according to the rotation angle and the rotation radius to obtain the rotation projection;
when the weather element is of the second weather type, the obtaining the rotation projection according to the target rotation angle and the rotation parameter includes:
And controlling the weather state element to rotate the target rotation angle according to the rotation angle and the rotation direction, so as to obtain the rotation projection.
8. The weather condition display method as claimed in claim 7, further comprising:
When the weather element is of a first weather type, a rotating shaft of the weather element is in a z-axis plane of the display interface, a track of the weather element rotating the target rotating angle around the rotating shaft according to the rotating angle and the rotating radius is generated according to the rotating angle and the rotating radius, and the weather element is controlled to rotate according to the rotating track so as to obtain a rotating projection of the weather element;
When the weather element is of a second weather type, randomly generating a rotation angle of the weather state element on a y axis, acquiring a vector matrix according to initial coordinates of the weather state element, establishing an inverse matrix according to the rotation angle and the vector matrix, determining an original coordinate according to the vector matrix and the inverse matrix, determining a rotation direction of the weather state element according to the original coordinate and the initial coordinate, determining a track of the weather state element rotating by the target rotation angle according to the rotation direction, and controlling the weather state element to rotate according to the rotation track so as to obtain a rotation projection of the weather element.
9. A weather condition display device, comprising:
The receiving module is used for receiving a first operation instruction, wherein the first operation instruction is used for indicating the weather state to be displayed to be switched;
the response module is used for responding to the first operation instruction and acquiring a target weather state to be displayed;
The display module is used for receiving and displaying real-time projection in the process of changing from a current weather state to the target weather state, wherein the real-time projection is projection on a display interface in the process that a pre-established weather element three-dimensional space moves from a position corresponding to the current weather state to a position corresponding to the target weather state, the weather element three-dimensional space is provided with at least one weather background element, and the transparency of the real-time projection is inversely related to the distance between the weather background element and the display interface.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the weather state display method of any of claims 1-8 when the program is executed by the processor.
11. A computer-readable storage medium, on which a computer program is stored, characterized in that the program, when being executed by a processor, implements a weather status display method according to any one of claims 1-8.
CN202110321020.9A 2021-03-25 2021-03-25 Weather state display method and device, electronic equipment and storage medium Active CN113032072B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110321020.9A CN113032072B (en) 2021-03-25 2021-03-25 Weather state display method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110321020.9A CN113032072B (en) 2021-03-25 2021-03-25 Weather state display method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113032072A CN113032072A (en) 2021-06-25
CN113032072B true CN113032072B (en) 2024-05-24

Family

ID=76473797

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110321020.9A Active CN113032072B (en) 2021-03-25 2021-03-25 Weather state display method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113032072B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117793239A (en) * 2022-09-29 2024-03-29 荣耀终端有限公司 Weather dynamic effect display method, computer storage medium and electronic equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5379215A (en) * 1991-02-25 1995-01-03 Douglas P. Kruhoeffer Method for creating a 3-D image of terrain and associated weather
CN108132712A (en) * 2018-01-12 2018-06-08 网易(杭州)网络有限公司 The rendering method of state of weather, device and storage medium and terminal in virtual scene
CN109241465A (en) * 2018-07-19 2019-01-18 华为技术有限公司 interface display method, device, terminal and storage medium
CN111538451A (en) * 2020-03-31 2020-08-14 北京小米移动软件有限公司 Weather element display method and device and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9613270B2 (en) * 2014-08-12 2017-04-04 Xiaomi Inc. Weather displaying method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5379215A (en) * 1991-02-25 1995-01-03 Douglas P. Kruhoeffer Method for creating a 3-D image of terrain and associated weather
CN108132712A (en) * 2018-01-12 2018-06-08 网易(杭州)网络有限公司 The rendering method of state of weather, device and storage medium and terminal in virtual scene
CN109241465A (en) * 2018-07-19 2019-01-18 华为技术有限公司 interface display method, device, terminal and storage medium
CN111538451A (en) * 2020-03-31 2020-08-14 北京小米移动软件有限公司 Weather element display method and device and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CINRAD三维拼图产品显示系统;张志强;刘黎平;谢明元;王红艳;肖艳娇;;气象(第09期);全文 *
天气雷达数据三维可视化技术及应用;刘岩;刘建朝;孙海燕;;气象灾害防御(第04期);全文 *

Also Published As

Publication number Publication date
CN113032072A (en) 2021-06-25

Similar Documents

Publication Publication Date Title
CN108805979B (en) Three-dimensional reconstruction method, device, equipment and storage medium for dynamic model
JPH09504388A (en) Weather simulation system
CN112313713A (en) Generating synthetic images and/or training machine learning model(s) based on synthetic images
CA2834575A1 (en) Method of rendering a terrain stored in a massive database
US11893081B2 (en) Map display method and apparatus
CN109448137A (en) Exchange method, interactive device, electronic equipment and storage medium
CN106570926B (en) Efficient particle cloud layer method for drafting in a kind of Flight Scene Simulation
CN114756937A (en) Visualization system and method based on UE4 engine and Cesium framework
CN111739142A (en) Scene rendering method and device, electronic equipment and computer readable storage medium
CN115375828B (en) Model shadow generation method, device, equipment and medium
CN113032072B (en) Weather state display method and device, electronic equipment and storage medium
CN115578433A (en) Image processing method, image processing device, electronic equipment and storage medium
CN115690344A (en) Sponge city sand table and weather simulation system
CN110400366B (en) Real-time flood disaster visualization simulation method based on OpenGL
CN111754431A (en) Image area replacement method, device, equipment and storage medium
CN113368496B (en) Weather rendering method and device for game scene and electronic equipment
US20210209833A1 (en) Unsupervised learning of three dimensional visual alphabet
CN112190941A (en) Shadow processing method and device
CN110827400B (en) Method and device for generating model of object in three-dimensional scene and terminal
CN114283267A (en) Shadow map determination method and device
Puig-Centelles et al. Creation and control of rain in virtual environments
CN114996374A (en) Online data visualization implementation method, system, device and medium
CN114245907A (en) Auto-exposure ray tracing
CN115035231A (en) Shadow baking method, shadow baking device, electronic apparatus, and storage medium
CN102375325B (en) True three-dimensional simulation angle description and direct projection display method

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