A data visualization method and related apparatus

By generating color bands and textures, the problem of slow rendering of large amounts of NetCDF format data on web pages was solved, achieving fast rendering and efficient display, and improving user experience and data understanding capabilities.

CN121542524BActive Publication Date: 2026-04-14GUANGZHOU MARINE GEOLOGICAL SURVEY SANYA SOUTH CHINA SEA INST OF GEOLOGY
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
GUANGZHOU MARINE GEOLOGICAL SURVEY SANYA SOUTH CHINA SEA INST OF GEOLOGY
Filing Date
2026-01-15
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Current mainstream visualization solutions struggle to support fast rendering of large volumes of NetCDF format data on web pages, resulting in slow rendering and impacting data understanding and user experience for professional analysts.

Method used

The process involves extracting scalar data from the original multidimensional data to generate color band textures, extracting vector data to generate latitudinal and longitudinal textures, calculating velocity vectors and rendering them as velocity textures, combining particle positions to generate post-processed position textures, and finally performing rendering processing on screen coordinates to achieve frame caching.

Benefits of technology

It enables rapid rendering of large amounts of data, improves visualization rendering efficiency in low-bandwidth environments, enhances the user experience on web pages, and helps professional analysts better understand data content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121542524B_ABST
    Figure CN121542524B_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of data visualization method and related equipment, belong to data processing technical field.The method comprises: extracting the scalar data of original multidimensional data, color band texture is generated according to scalar data;Extract the vector data of original multidimensional data, generate latitude texture and longitude texture based on vector data;Current particle position is obtained, and speed vector is calculated based on current particle position, latitude texture and longitude texture, and speed vector is rendered into speed texture;Next particle position texture is calculated and rendered based on current particle position and speed texture;Post-processing position texture is generated and rendered based on next particle position texture and speed texture;Last particle position is obtained, and screen coordinates are calculated based on last particle position, current particle position, post-processing position texture and color band texture, screen coordinates are rendered and handled, and frame buffer is obtained.The embodiment of the application can realize the fast rendering of large amount of NC data in web end.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and in particular to a data visualization method and related equipment. Background Technology

[0002] In related technologies, the NetCDF (NC) format, due to its multidimensional data structure (such as longitude, latitude, time, and depth) and self-describing characteristics, has become a universal storage standard for scientific observation and forecasting model data in the fields of oceanography, hydrology, and meteorology. This type of data contains key environmental parameters such as ocean currents, temperature, salinity, and precipitation, which are crucial for professional analysts to understand ocean dynamic processes, extreme weather evolution, and hydrological cycle mechanisms. Current mainstream visualization solutions have significant limitations, making it difficult to support the rapid rendering of large volumes of NC data on web pages.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0004] The main objective of this application is to propose a data visualization method and related equipment to achieve rapid rendering of large amounts of NC data on a webpage.

[0005] To achieve the above objectives, one aspect of this application proposes a data visualization method, the method comprising:

[0006] Obtain raw multidimensional data, which includes dimensions, variables, attributes, and data, and the variables include longitudinal velocity components and latitudinal velocity components.

[0007] Extract scalar data from the original multidimensional data, and generate a color band texture based on the scalar data. The color band texture corresponds to the time axis.

[0008] Extract vector data from the original multidimensional data, and generate latitudinal and longitudinal textures based on the vector data;

[0009] Obtain the current particle position, calculate the velocity vector based on the current particle position, the latitudinal texture and the longitudinal texture, and render the velocity vector into a velocity texture;

[0010] The next particle position texture is calculated and rendered based on the current particle position and the velocity texture.

[0011] A post-processed position texture is generated and rendered based on the next particle position texture and the velocity texture.

[0012] Obtain the position of the previous particle, calculate the screen coordinates using the previous particle position, the current particle position, the post-processing position texture, and the color band texture, and perform rendering processing on the screen coordinates to obtain the frame buffer.

[0013] In some embodiments, the method further includes:

[0014] The current particle position is taken as the previous particle position, and the next particle position is taken as the current particle position. The process returns to the step of obtaining the current particle position, calculating the velocity vector based on the current particle position, the latitudinal texture and the longitudinal texture, and rendering the velocity vector into a velocity texture.

[0015] In some embodiments, extracting scalar data from the original multidimensional data and generating a color band texture based on the scalar data includes:

[0016] A scalar field is generated based on the meridional velocity component and the zonal velocity component, and the scalar field includes a scalar value at each position;

[0017] The scalar field is normalized and mapped to a grayscale range of 0-255 to generate a grayscale image;

[0018] Obtain the maximum and minimum scalar values ​​of the scalar field;

[0019] Get the gradient color mapping texture;

[0020] The grayscale image is sampled and normalized. The normalized grayscale image is then sampled using the maximum scalar value and the minimum scalar value to obtain the color mapping texture, thus obtaining the color banding texture.

[0021] In some embodiments, obtaining the current particle position, calculating a velocity vector based on the current particle position, the latitudinal texture, and the longitudinal texture, and rendering the velocity vector as a velocity texture includes:

[0022] Determine if the current particle position exists; if it exists, obtain the current particle position.

[0023] If the current particle position does not exist, a random particle position grid is generated according to a preset latitude and longitude range, and the generated random particle position grid is used as the current particle position;

[0024] The true velocity in the meridional direction and the true velocity in the latitudinal direction are calculated using the formula for restoring the original data, based on the current particle position, the latitudinal texture, and the longitudinal texture. The expression for the formula for restoring the original data is as follows:

[0025] ,

[0026] ,

[0027] in, The true meridional velocity, This is the original value of the current particle position. The maximum value of the meridional texture. This is the minimum value of the radial texture. The true latitudinal velocity, The maximum value of the latitudinal texture. This is the minimum value of the latitudinal texture;

[0028] A velocity vector is obtained by combining the true meridional velocity and the true latitudinal velocity, and the velocity vector is rendered into a velocity texture.

[0029] In some embodiments, calculating and rendering the next particle position texture based on the current particle position and the velocity texture includes:

[0030] The next particle position is calculated based on the current particle position and the velocity texture, and the expression for the next particle position is as follows;

[0031] nextPoint=coordinate(x0,y0)+speed(x1,y1) ,

[0032] Where nextPoint is the next particle position, x0 is the X-axis coordinate of the current particle position in the coordinate system, y0 is the Y-axis coordinate of the current particle position in the coordinate system, x1 is the velocity component of the current particle position in the X-axis direction, and y1 is the velocity component of the current particle position in the Y-axis direction. To obtain the current particle coordinates, To obtain the velocity of a particle and convert it to coordinates with consistent units;

[0033] The next particle position is rendered as a next particle position texture.

[0034] In some embodiments, obtaining the previous particle position, calculating screen coordinates using the previous particle position, the current particle position, the post-processed position texture, and the color stripe texture, and performing rendering processing on the screen coordinates to obtain a frame buffer includes:

[0035] Determine if the position of the previous particle exists; if it exists, obtain the position of the previous particle.

[0036] If the previous particle position does not exist, a random particle position grid is generated according to a preset latitude and longitude range, and the generated random particle position grid is used as the current particle position.

[0037] Calculate screen coordinates based on the previous particle position, the current particle position, the post-processed position texture, and the color band texture;

[0038] The rendering result is obtained by sampling the color stripe texture and assigning path color to the screen coordinates;

[0039] The rendering result is output to the frame buffer.

[0040] To achieve the above objectives, another aspect of this application provides a data visualization apparatus, the apparatus comprising:

[0041] The data acquisition module is used to acquire raw multidimensional data, which includes dimensions, variables, attributes and data, and the variables include longitudinal velocity components and latitudinal velocity components.

[0042] A color band generation module is used to extract scalar data from the original multidimensional data and generate a color band texture based on the scalar data. The color band texture corresponds to the time axis.

[0043] The vector processing module is used to extract vector data from the original multidimensional data and generate latitudinal and longitudinal textures based on the vector data.

[0044] The velocity calculation module is used to obtain the current particle position, calculate the velocity vector based on the current particle position, the latitudinal texture and the longitudinal texture, and render the velocity vector into a velocity texture;

[0045] The prediction module is used to calculate and render the next particle position texture based on the current particle position and the velocity texture;

[0046] The post-processing generation module is used to generate and render a post-processed position texture based on the next particle position texture and the velocity texture.

[0047] The display generation module is used to obtain the position of the previous particle, calculate the screen coordinates of the previous particle position, the current particle position, the post-processing position texture and the color band texture, and perform rendering processing on the screen coordinates to obtain the frame buffer.

[0048] To achieve the above objectives, another aspect of this application provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the method described above.

[0049] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the methods described above.

[0050] To achieve the above objectives, another aspect of the embodiments of this application proposes a computer program product, including a computer program that, when executed by a processor, implements the aforementioned method.

[0051] The embodiments of this application include at least the following beneficial effects: This application provides a data visualization method, device, electronic device, storage medium, and program product. This solution extracts scalar data from the original multidimensional data and generates a color band texture based on the scalar data; extracts vector data from the original multidimensional data and generates latitudinal and longitudinal textures based on the vector data; obtains the current particle position, calculates a velocity vector based on the current particle position, latitudinal and longitudinal textures, and renders the velocity vector as a velocity texture; calculates and renders the next particle position texture based on the current particle position and velocity texture; generates and renders a post-processed position texture based on the next particle position texture and velocity texture; obtains the previous particle position, calculates screen coordinates based on the previous particle position, current particle position, post-processed position texture, and color band texture, performs rendering processing on the screen coordinates, obtains a frame buffer, and realizes data visualization rendering. This is beneficial for the rapid rendering of large amounts of data, effectively solves the problem of slow rendering during the rendering of large amounts of data, can meet the visualization rendering of large amounts of data in low-bandwidth environments, improves data processing and display efficiency, improves the user experience on web pages, and is also beneficial for professional analysts to understand data content. Attached Figure Description

[0052] Figure 1 This is a flowchart of the data visualization method provided in the embodiments of this application;

[0053] Figure 2 yes Figure 1 The flowchart of step S102 in the document;

[0054] Figure 3 yes Figure 1 The flowchart of step S104 in the process;

[0055] Figure 4 yes Figure 1 The flowchart of step S107 in the process;

[0056] Figure 5 This is a flowchart illustrating a specific implementation of the data visualization method provided in this application when applied to a large-scale NetCDF data format processing and WebGL visualization system.

[0057] Figure 6 This is a flowchart of the large-scale NetCDF data format processing and WebGL visualization system provided in the embodiments of this application;

[0058] Figure 7This is a schematic diagram of the scalar field rendering effect using sea surface temperature as an example, provided in an embodiment of this application.

[0059] Figure 8 This is a schematic diagram of scalar + vector field rendering effect using ocean currents as an example, provided in an embodiment of this application;

[0060] Figure 9 This is a schematic diagram of the structure of the data visualization device provided in the embodiments of this application;

[0061] Figure 10 This is a schematic diagram of the hardware structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0062] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit it. In the following description, when referring to the accompanying drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with those of this application; they are merely examples of apparatuses and methods consistent with some aspects of the embodiments of this application as detailed in the appended claims.

[0063] It is understood that the terms “first,” “second,” etc., used in this application may be used herein to describe various concepts, but unless otherwise stated, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another. For example, without departing from the scope of the embodiments of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the words “if,” “when,” or “in response to a determination” as used herein may be interpreted as “when…” or “when…” or “in response to a determination.”

[0064] As used in this application, the terms "at least one", "multiple", "each", "any", etc., "at least one" includes one, two or more, "multiple" includes two or more, "each" refers to each of the corresponding multiples, and "any" refers to any one of the multiples.

[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0066] Before providing a detailed description of the embodiments of this application, some of the nouns and terms involved in the embodiments of this application will be explained first. The nouns and terms involved in the embodiments of this application are subject to the following interpretations.

[0067] 1) NetCDF (NC, Network Common Data Format) is a storage structure for multidimensional data, commonly used in meteorology, oceanography, earth sciences, and other fields. Its core data structures include:

[0068] (1) Dimension: Defines the coordinates and dimensional range of the data, such as latitude and longitude, time, and altitude;

[0069] (2) Variables store actual data, such as temperature, precipitation, salinity, humidity, and speed in both UV (latitude and longitude) directions;

[0070] (3) Attributes, which describe the unit and data source of each variable;

[0071] 5) Data, the actual stored multidimensional array values.

[0072] 2) Scalar field: The field distribution of a single physical data, such as temperature, water level, salinity, humidity, rainfall, etc., is stored in NC format through a two-dimensional array at daily or hourly time intervals.

[0073] 3) Vector Fields: For common vector fields, such as wind fields and ocean current fields, the NC format is used to store them in the UV direction at daily or hourly time intervals.

[0074] 4) WebGL: Web Graphics Library, is a JavaScript application programming interface that can render high-performance interactive 3D and 2D graphics in any compatible web browser without the need for plugins.

[0075] 5) CPU: Central Processing Unit.

[0076] 6) GPU: Graphics Processing Unit.

[0077] 7) HTMLCanvasElement: This is a new tag added in HTML5 used to generate images in real time on a webpage and to manipulate the image content. It is a bitmap that can be manipulated using JavaScript.

[0078] 8) CanvasRenderingContext2D: This is a JavaScript drawing API object, a drawing context provided by the HTMLCanvasElement element, specifically used for 2D drawing.

[0079] 9) JSON: A lightweight data exchange format widely used in web development, especially for data exchange between the front-end and back-end.

[0080] 10) Cesium: is an open-source 3D mapping framework based on the JavaScript programming language, used for the visualization of 3D globes and maps.

[0081] In related technologies, the NetCDF (NC) format, due to its multidimensional data structure (such as longitude, latitude, time, and depth) and self-describing characteristics, has become a universal storage standard for scientific observation and forecasting model data in the fields of oceanography, hydrology, and meteorology. This type of data contains key environmental parameters such as ocean currents, temperature, salinity, and precipitation, which are crucial for professional analysts to understand ocean dynamic processes, extreme weather evolution, and hydrological cycle mechanisms. Current mainstream visualization solutions have significant limitations, making it difficult to support the rapid rendering of large volumes of NC data on web pages.

[0082] In summary, the technical problems existing in the relevant technologies need to be improved.

[0083] In view of this, this application provides a data visualization method and related device. This solution extracts scalar data from the original multidimensional data and generates a color band texture based on the scalar data; extracts vector data from the original multidimensional data and generates latitudinal and longitudinal textures based on the vector data; obtains the current particle position, calculates a velocity vector based on the current particle position, latitudinal and longitudinal textures, and renders the velocity vector as a velocity texture; calculates and renders the next particle position texture based on the current particle position and velocity texture; generates and renders a post-processed position texture based on the next particle position texture and velocity texture; obtains the previous particle position, calculates screen coordinates based on the previous particle position, current particle position, post-processed position texture, and color band texture, and renders the screen coordinates to obtain a frame buffer, thereby realizing the visualization rendering of data. This is beneficial for the rapid rendering of large amounts of data, effectively solves the problem of slow rendering during the rendering of large amounts of data, can meet the visualization rendering of large amounts of data in low-bandwidth environments, improves data processing and display efficiency, improves the user experience on web pages, and is also beneficial for professional analysts to understand the data content.

[0084] The data visualization method provided in this application relates to the field of data processing technology. The data visualization method provided in this application can be applied to a terminal, a server, or software running on a terminal or server. In some embodiments, the terminal can be a smartphone, tablet, laptop, desktop computer, smart speaker, smartwatch, or in-vehicle terminal, but is not limited to these. The server can be configured as an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The server can also be a node server in a blockchain network. The software can be an application that implements the data visualization method, but is not limited to the above forms.

[0085] This application can be used in a wide variety of general-purpose or special-purpose computer system environments or configurations. Examples include: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above systems or devices. This application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform specific tasks or implement specific abstract data types. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0086] It should be noted that in all specific embodiments of this application, when processing data related to user identity or characteristics, such as user information, user behavior data, user historical data, and user location information, user permission or consent is obtained first. Furthermore, the collection, use, and processing of this data comply with relevant laws, regulations, and standards. In addition, when embodiments of this application require access to sensitive personal information of users, separate permission or consent from the user is obtained through pop-ups or redirection to confirmation pages. Only after obtaining the user's separate permission or consent is the necessary user-related data required for the proper functioning of these embodiments acquired.

[0087] Figure 1 This is an optional flowchart of the data visualization method provided in the embodiments of this application. Figure 1The method may include, but is not limited to, steps S101 to S106.

[0088] Step S101: Obtain the raw multidimensional data.

[0089] Specifically, the original multidimensional data includes dimensions, variables, attributes, and data. The variables include the meridional velocity component and the latitudinal velocity component.

[0090] It should be noted that the original multidimensional data can be in NetCDF format, HDF format, or GRIB format.

[0091] It is understandable that the meridional velocity components and the zonal velocity components can be represented in a two-dimensional array format.

[0092] In this embodiment, the original multidimensional data is obtained, which prepares for the subsequent manual color strip texture and frame buffer.

[0093] Step S102: Extract scalar data from the original multidimensional data and generate color band texture based on the scalar data.

[0094] Specifically, the color band texture corresponds to the timeline.

[0095] In some embodiments, a scalar field is generated based on the meridional velocity component and the latitudinal velocity component, the scalar field including a scalar value at each position; the scalar field is normalized and mapped to a grayscale range of 0-255 to generate a grayscale image; the maximum and minimum scalar values ​​of the scalar field are obtained; a gradient color mapping texture is obtained; the grayscale image is sampled and normalized, and the normalized grayscale image is sampled using the maximum and minimum scalar values ​​to obtain a color banding texture.

[0096] In some embodiments, a new scalar field is generated by calculating the scalar values ​​of all array elements based on the two two-dimensional arrays of UV (i.e., the meridional velocity component and the zonal velocity component).

[0097] In this embodiment, scalar data of the original multidimensional data is extracted, and color band texture is generated based on the scalar data, which helps users to intuitively view the data level and improves the readability of the data.

[0098] Step S103: Extract vector data from the original multidimensional data, and generate latitudinal and longitudinal textures based on the vector data.

[0099] Specifically, the vector data includes meridional velocity components and zonal velocity components.

[0100] In some embodiments, the meridional velocity component and the zonal velocity component of the original multidimensional data are extracted.

[0101] Optionally, a meridional texture is generated based on the meridional velocity component, and a latitudinal texture is generated based on the latitudinal velocity component.

[0102] In this embodiment, vector data of the original multidimensional data is extracted, and latitudinal and longitudinal textures are generated based on the vector data, which prepares for the subsequent generation of frame buffers.

[0103] Step S104: Obtain the current particle position, calculate the velocity vector based on the current particle position, latitudinal texture and longitudinal texture, and render the velocity vector into a velocity texture.

[0104] In some embodiments, it is determined whether the current particle position exists. If it exists, the current particle position is obtained. If the current particle position does not exist, a random particle position grid is generated according to a preset latitude and longitude range, and the generated random particle position grid is used as the current particle position.

[0105] Furthermore, the true velocity in the meridional direction and the true velocity in the latitudinal direction are calculated by restoring the original data formula based on the current particle position, latitudinal texture, and longitudinal texture; the velocity vector is obtained from the true velocity in the meridional direction and the true velocity in the latitudinal direction, and the velocity vector is rendered into a velocity texture.

[0106] In some embodiments, the current particle position is obtained, a velocity vector is calculated based on the current particle position, the latitudinal texture, and the longitudinal texture, and the velocity vector is rendered as a velocity texture.

[0107] In this embodiment, the current particle position is obtained, and a velocity vector is calculated based on the current particle position, latitudinal texture, and longitudinal texture. The velocity vector is then rendered into a velocity texture, which prepares for generating the next particle position texture.

[0108] Step S105: Calculate and render the texture of the next particle position based on the current particle position and velocity texture.

[0109] In some embodiments, the next particle position is calculated based on the current particle position and velocity texture.

[0110] It should be noted that the expression for the position of the next particle is as follows;

[0111] ,

[0112] in, The position of the next particle. Let X be the X-axis coordinate of the current particle position in the coordinate system. The Y-coordinate of the current particle position in the coordinate system. This represents the velocity component of the particle's current position along the X-axis. This represents the velocity component of the particle's current position along the Y-axis. To obtain the current particle coordinates, To obtain the velocity of a particle, convert it to coordinates with consistent units.

[0113] Furthermore, the position of the next particle is rendered as a texture of the position of the next particle.

[0114] In this embodiment, the texture of the next particle position is calculated and rendered based on the current particle position and velocity texture, which prepares for the generation of the next particle in the next cycle.

[0115] Step S106: Generate and render a post-processed position texture based on the next particle position texture and velocity texture.

[0116] In some embodiments, the positions of random particles within a preset latitude and longitude range are generated based on the next particle position texture combined with the velocity texture, and then rendered as a post-processed position texture.

[0117] Specifically, the next particle position texture is passed to the last calculation instruction, and the position of random particles within a certain latitude and longitude range is generated based on the next particle position texture and the velocity texture. Finally, it is rendered into a post-processed position texture.

[0118] In this embodiment, a post-processed position texture is generated and rendered based on the next particle position texture and velocity texture, which prepares for the subsequent generation of frame buffer.

[0119] Step S107: Obtain the position of the previous particle, calculate the screen coordinates of the previous particle position, the current particle position, the post-processing position texture and the color band texture, and perform rendering processing on the screen coordinates to obtain the frame buffer.

[0120] It is understandable that the frame buffer also corresponds to the timeline, meaning that the frame buffer and the color strip texture are related in time along the timeline.

[0121] In some embodiments, it is determined whether the position of the previous particle exists. If it exists, the position of the previous particle is obtained. If the position of the previous particle does not exist, a random particle position grid is generated according to a preset latitude and longitude range, and the generated random particle position grid is used as the current particle position. The screen coordinates are calculated based on the previous particle position, the current particle position, the post-processed position texture, and the color band texture. The screen coordinates are assigned a path color by sampling the color band texture to obtain the rendering result. The rendering result is output to the frame buffer.

[0122] Understandably, the process involves taking the current particle position as the previous particle position, taking the next particle position as the current particle position, returning to get the current particle position, calculating the velocity vector based on the current particle position, the latitudinal texture, and the longitudinal texture, and then rendering the velocity vector into a velocity texture.

[0123] The termination conditions of the above loop include, but are not limited to, reaching the time limit, the particle reaching the designated position, and the particle velocity approaching zero.

[0124] In this embodiment, the position of the previous particle is obtained, and the screen coordinates are calculated using the previous particle position, the current particle position, the post-processed position texture, and the color band texture. The screen coordinates are then rendered to obtain a frame buffer, enabling the visualization rendering of the data. This facilitates the rapid rendering of large amounts of data, effectively solves the problem of slow rendering during the rendering of large amounts of data, and can meet the visualization rendering needs of large amounts of data in low-bandwidth environments. This improves data processing and display efficiency, enhances the user experience on the web page, and also helps professional analysts understand the data content.

[0125] Steps S101 to S107 of this embodiment involve: extracting scalar data from the original multidimensional data; generating a color band texture based on the scalar data; extracting vector data from the original multidimensional data; generating latitudinal and longitudinal textures based on the vector data; obtaining the current particle position; calculating a velocity vector based on the current particle position, latitudinal and longitudinal textures; rendering the velocity vector as a velocity texture; calculating and rendering the next particle position texture based on the current particle position and velocity texture; generating and rendering a post-processed position texture based on the next particle position texture and velocity texture; obtaining the previous particle position; calculating screen coordinates based on the previous particle position, current particle position, post-processed position texture, and color band texture; rendering the screen coordinates to obtain a frame buffer; and realizing data visualization rendering. This facilitates rapid rendering of large amounts of data, effectively solves the problem of slow rendering during the rendering of large amounts of data, meets the visualization rendering requirements of large amounts of data in low-bandwidth environments, improves data processing and display efficiency, enhances the user experience on web pages, and helps professional analysts understand the data content.

[0126] Please see Figure 2 In some embodiments, step S102 may include, but is not limited to, steps S201 to S205:

[0127] Step S201: Generate a scalar field based on the meridional velocity component and the zonal velocity component.

[0128] Specifically, the scalar field includes a scalar value at each location.

[0129] In step S201 of some embodiments, a scalar value for each location of the scalar field is generated based on the meridional velocity component and the zonal velocity component.

[0130] The formula for calculating the scalar value is as follows:

[0131] ,

[0132] In the formula, For a single scalar value at that location, For the meridional velocity component, For the latitudinal velocity component, and These are grid indices for longitude and latitude, respectively.

[0133] Step S202: Normalize the scalar field and map the scalar field to the grayscale range of 0-255 to generate a grayscale image.

[0134] In step S202 of some embodiments, the scalar field is normalized and mapped to a grayscale range of 0-255 to generate a grayscale image.

[0135] The quantization formula for converting a scalar field into a grayscale image is as follows:

[0136] ,

[0137] In the formula, It is a grayscale image. For scalar fields OK The column's numerical values ​​(i.e., scalar values). For the maximum value of the scalar field, This is the minimum value of the scalar field.

[0138] Step S203: Obtain the maximum and minimum scalar values ​​of the scalar field.

[0139] In step S203 of some embodiments, the maximum scalar value and the minimum scalar value are obtained from the scalar field.

[0140] It should be noted that the maximum and minimum scalar values ​​represent the range of the grayscale image, which can map the range of the grayscale image to the color band texture.

[0141] Step S204: Obtain the gradient color mapping texture.

[0142] Specifically, color mapping textures are used to map the range of a grayscale image to a color band texture.

[0143] In step S204 of some embodiments, the color mapping texture may be a default gradient color strip image, or it may be a long gradient color strip image uploaded by the user or generated according to the user's needs.

[0144] For example, lower scalar values ​​can correspond to cool colors, while higher scalar values ​​can correspond to warm colors.

[0145] Step S205: Sample and normalize the grayscale image, and sample the color mapping texture using the maximum and minimum scalar values ​​of the normalized grayscale image to obtain the color banding texture.

[0146] In step S205 of some embodiments, the pixel values ​​(i.e., the values ​​of the scalar field) of the grayscale image are normalized to map them to the range [0,1].

[0147] Furthermore, the color of each pixel value in the normalized grayscale image is obtained by looking up a color mapping texture.

[0148] Understandably, the original values ​​are first stretched to 0-255. If PNG format is used, PNG is an 8-bit numerical range. The texture passed to the GPU has already normalized the pixels between 0-255 to [0,1] by default. Based on [0,1], it is mapped to a long gradient color strip image of the rendering scheme used.

[0149] For example, if a pixel has a normalized value of 0.5, then the color of the middle part of the color-mapped texture will be sampled as the color of that pixel.

[0150] Understandably, through sampling, each pixel in a grayscale image is assigned a color, thus creating a color banding texture.

[0151] Please see Figure 3 In some embodiments, step S103 may include, but is not limited to, steps S301 to S304:

[0152] Step S301: Determine if the current particle position exists. If it exists, obtain the current particle position.

[0153] It is understandable that as the particles continue to move, the texture of the current particle position is constantly updated. In the previous loop, the current particle position of the previous loop is used as the previous particle position, and the next particle position of the previous loop is used as the current particle position.

[0154] In step S301 of some embodiments, it is determined whether the current particle position exists; if it exists, the current particle position is obtained.

[0155] Step S302: If the current particle position does not exist, a random particle position grid is generated according to the preset latitude and longitude range, and the generated random particle position grid is used as the current particle position.

[0156] In step S302 of some embodiments, if the current particle position does not exist, the initial particle position texture is a random particle position grid generated within a certain limited latitude and longitude range.

[0157] Optionally, the preset latitude and longitude range can use a default value or be manually entered by the user.

[0158] Step S303: The current particle position, latitudinal texture, and longitudinal texture are used to calculate the true longitudinal velocity and latitudinal velocity using the formula for restoring the original data.

[0159] In step S303 of some embodiments, the velocity vector is calculated in the calculation instruction using the formula for restoring the original data.

[0160] Optionally, the actual speed of the latitudinal and longitudinal textures entering the GPU is calculated and the speed is normalized.

[0161] Specifically, the expression for restoring the original data formula is as follows:

[0162] ,

[0163] ,

[0164] in, For the true speed of the meridian, This is the original value of the current particle position. This represents the maximum value of the warp texture. This is the minimum value of the warp texture. This represents the true latitudinal velocity. This represents the maximum value of the latitudinal texture. This represents the minimum value of the latitudinal texture.

[0165] Step S304: Obtain the velocity vector by using the true meridional velocity and the true latitudinal velocity, and render the velocity vector into a velocity texture.

[0166] In step S304 of some embodiments, the meridional true velocity and the latitudinal true velocity are converted into velocity vectors, and the velocity vectors are rendered into velocity textures.

[0167] Please see Figure 4 In some embodiments, step S107 may include, but is not limited to, steps S401 to S405:

[0168] Step S401: Determine if the position of the previous particle exists. If it exists, obtain the position of the previous particle.

[0169] It is understandable that as the particles continue to move, the texture of the current particle position is constantly updated. In the previous loop, the current particle position of the previous loop is used as the previous particle position, and the next particle position of the previous loop is used as the current particle position.

[0170] In step S401 of some embodiments, it is determined whether the position of the previous particle exists, and if it exists, the position of the previous particle is obtained.

[0171] Step S402: If the previous particle position does not exist, a random particle position grid is generated according to the preset latitude and longitude range, and the generated random particle position grid is used as the current particle position.

[0172] In step S402 of some embodiments, if the previous particle position does not exist, a random particle position grid is generated within a certain limited latitude and longitude range, and the generated random particle position grid is used as the current particle position.

[0173] Optionally, the preset latitude and longitude range can use a default value or be manually entered by the user.

[0174] Step S403: Calculate screen coordinates based on the previous particle position, the current particle position, the post-processed position texture, and the color band texture.

[0175] In step S403 of some embodiments, the previous particle position texture, the current particle position texture, the post-processing position texture, and the color band texture are passed into the first drawing instruction to calculate the screen coordinates projected into WebGL.

[0176] Specifically, latitude and longitude are converted into a spatial rectangular coordinate system.

[0177] Furthermore, projecting the Cartesian three-dimensional spatial coordinates onto screen coordinates involves the following steps:

[0178] The first step is to convert world coordinates to camera coordinates.

[0179] The second step is to convert the camera coordinates into projected (cropped) coordinates and normalize them.

[0180] The third step is to transform the calculated normalized projection (clipping) coordinates to screen coordinates for viewport transformation. This transformation maps the projection (clipping) coordinate domain [-1,1] to the pixel coordinate system of the HTMLCanvasElement.

[0181] Step S404: Assign path color to screen coordinates by sampling color strip texture to obtain rendering result.

[0182] In step S404 of some embodiments, the path color is assigned by sampling the color band texture after speed normalization.

[0183] Step S405: Output the rendering result to the frame buffer.

[0184] Understandably, the rendering results are output to the frame buffer.

[0185] In step S405 of some embodiments, the color band texture of the frame buffer is passed to the second drawing instruction to process the effect of the particle path gradually darkening and becoming transparent from head to tail, and then rendered back into the frame buffer.

[0186] Furthermore, the velocity banding texture of the frame buffer is finally passed to the final drawing command, and after being drawn onto the screen, it presents the effect of a dynamic particle flow field.

[0187] Figure 5 This is a flowchart illustrating a specific implementation of the data visualization method provided in this application when applied to a large-scale NetCDF data format processing and WebGL visualization system. The flowchart of the large-scale NetCDF data format processing and WebGL visualization system is as follows: Figure 6 As shown, Figure 5 The methods may include, but are not limited to, the following steps:

[0188] Step 1, scalar field data processing.

[0189] It should be noted that the quantization formula for converting raw multidimensional data (i.e., raw NC data) into images is:

[0190] ,

[0191] The formula for restoring the original data in WebGL GPU is:

[0192] ,

[0193] In the formula, For the original two-dimensional array OK The values ​​in the column, , These are the maximum and minimum values ​​of the image, respectively. For PNG images OK The values ​​in the column.

[0194] In some embodiments, a two-dimensional array is extracted at hourly or daily time intervals. The maximum and minimum values ​​(maxValue and minValue) of the two-dimensional array at that moment are obtained. The two-dimensional array is then quantized into a PNG image format with a grayscale value of 0-255 according to the quantization formula and stored. Finally, the series of image addresses, maximum and minimum values, time, latitude and longitude range, image width and height, and other information are stored in JSON format and sent to the front-end for calling. The specific structure is shown in Table 1 below:

[0195]

[0196] It is understandable that the xxxx in http: / / examples / xxxx / temperature_2025-04-15.PNG is a placeholder for illustration and can be replaced with letters or numbers in actual applications.

[0197] Step 2, front-end WebGL scalar field rendering.

[0198] In some embodiments, front-end WebGL scalar field rendering includes the following steps:

[0199] 1) Utilize the front-end HTMLCanvasElement to generate a gradient color mapping texture, which is then used for grayscale sampling of the rendered PNG image. The color mapping texture can be fixed or user-generated as a long gradient color stripe image.

[0200] 2) Using Cesium, a rectangular primitive object is created based on the latitude and longitude range information at a certain moment in the JSON. In the material function of the custom shader, the grayscale image in PNG format, the color mapping texture, and the maximum and minimum values ​​of the data are passed to the GPU for shader programming processing: first, the original image is sampled and normalized to the range [0,1], and then the sampled values ​​of the original image are mapped to the corresponding color mapping texture in the range [0,1] for sampling, thus completing the color mapping rendering of the original grayscale image;

[0201] 3) Control the switching of images at the current time according to the timeline.

[0202] Step 3: Vector field data and scalar field calculation and processing.

[0203] Two-dimensional arrays containing U and V components are extracted at hourly or daily time intervals. The minimum and maximum values ​​(minValue and maxValue) of the U and V arrays at each given moment are obtained and quantized into PNG image format (0-255) using a quantization formula. Finally, the image series addresses, maximum and minimum values, time, latitude and longitude range, and image width and height information are stored in JSON format and sent to the front-end for processing. The specific structure is shown in Table 2 below.

[0204]

[0205] It is understandable that the xxxx in http: / / examples / xxxx / temperature_2025-04-15.PNG is a placeholder for illustration and can be replaced with letters or numbers in actual applications.

[0206] Step 4: UV vector field + scalar field overlay rendering method.

[0207] 1) Generate a random particle position mesh within the latitude and longitude range of the NC file. Input the current particle position texture, U, and V textures into the GPU. Calculate the velocity vector using the formula to restore the original data in the calculation instructions, and render it as a velocity texture. Preprocessing continuously updates the current particle texture to the texture of the next position. Calculate the true UV velocity from the two PNG images (U and V) input to the GPU and normalize the UV velocity. Reconstruct the true velocity calculation based on the true velocity calculation formula, which is:

[0208]

[0209] In the formula, The original values ​​of the image. The maximum value, It is the minimum value.

[0210]

[0211] In the formula, The original values ​​of the image. The maximum value, It is the minimum value.

[0212] 2) The velocity texture is passed to the next calculation instruction to calculate the position of the next particle based on the current position and velocity, and then rendered as the next particle position texture. The formula for calculating the position of the next point is:

[0213]

[0214] In the formula, The x-axis coordinate in the WebGL coordinate system. The Y-axis coordinate in the WebGL coordinate system. Let be the velocity component of the particle in the X-axis direction. Let be the velocity component of the particle in the Y-axis direction. To obtain the current particle coordinates, To obtain the velocity of a particle, convert it to coordinates with consistent units.

[0215] 3) The next particle position texture is passed to the last calculation instruction. Based on the next particle position texture, the velocity texture generates random particle positions within a certain latitude and longitude range, which are then rendered as post-processed position textures. The formula for random particle positions is as follows:

[0216] Longitude coordinates:

[0217] Latitude coordinates:

[0218] In the formula, Lon represents the longitude coordinates, and Lat represents the latitude coordinates. This is a random function formula that will return a random decimal between 0 and 1. , These are the maximum and minimum longitudes, respectively. , These are the maximum and minimum latitudes, respectively.

[0219] 4) Pass the previous particle position texture, the current particle position texture, the post-processed position, and the velocity color band mapping texture generated in steps 1-3 into the first drawing instruction to calculate the coordinates of the projected particle line segment to the screen, the velocity normalization value, and sample the velocity mapping color band texture to render it into a frame buffer.

[0220] First, convert latitude and longitude to a spatial rectangular coordinate system:

[0221] ,

[0222] ,

[0223] ,

[0224] ,

[0225] ,

[0226] In the formula, The altitude of any point on Earth , These are the major and minor axes of the WGS84 coordinate system, respectively. The formula for the square of the first eccentricity is... , These are latitude and longitude in radians, respectively. Calculation of the radius of curvature of the zonal circle. , , These are the three components of the world coordinates in the Cartesian rectangular coordinate system.

[0227] Then, the Cartesian three-dimensional coordinates are projected onto the screen coordinates, which involves the following steps:

[0228] The first step is to convert world coordinates to camera coordinates. First, the camera observes a point. Determine the camera's world coordinate position, the direction of observation, and the upward direction perpendicular to the observation direction. Then, using the camera as the origin of the camera coordinate system, subtract the camera's world coordinates from the point's world coordinates to obtain the converted latitude and longitude coordinates for the camera. This can be expressed as a left-multiplied translation matrix:

[0229] ,

[0230] In the formula, The world coordinates of the point that need to be translated. For the world coordinates of a point, The camera coordinates are the translated coordinates, and then the camera's viewing posture is rotated. Left-multiplying by a rotation matrix:

[0231] ,

[0232] The left side shows three matrices representing the camera's rotation around the X, Y, and Z axes, with the rotation angles represented by... This means that the camera coordinates on the right side of the equation are finally obtained.

[0233] The second step is to convert the camera coordinates to projected (cropped) coordinates and normalize them, using the following formula:

[0234] ,

[0235] In the formula, The x-axis coordinate of the projection (clipping) coordinates. The y-axis coordinate of the projection (clipping) coordinates. The z-axis coordinate of the projection (clipping) coordinates. The x-axis coordinate of the camera coordinate system. The y-coordinate of the camera coordinates. The z-axis coordinate of the camera coordinate system. These represent the near-plane distance and far-plane distance, respectively, defining the camera's field of view. , , , These represent the distances to the left, right, top, and bottom of the far plane, respectively.

[0236] The third step is to transform the calculated normalized projection (clipping) coordinates to screen coordinates using a viewport transformation. This transformation maps the projection (clipping) coordinate domain [-1,1] to the pixel coordinate system of the HTMLCanvasElement. The specific formula is as follows:

[0237] ,

[0238] ,

[0239] In the formula, , These are the x and y components of the projected (clipping) coordinates, respectively. The width of the HTMLCanvasElement. The height of HTMLCanvasElement, To convert to the relative width of the HTMLCanvasElement, This is used to convert the relative height to the HTMLCanvasElement.

[0240] Through the above three steps of calculation, the coordinates drawn on the screen are finally obtained.

[0241] 5) Pass the color band texture of the frame buffer into the second drawing instruction to process the effect of the particle path gradually darkening and becoming transparent from head to tail, and then render it back into the frame buffer.

[0242] 6) Finally, the velocity band mapping texture of the frame buffer is passed to the final drawing command, and after being drawn on the screen, it presents the effect of a dynamic particle flow field.

[0243] For example, a schematic diagram of the scalar field rendering effect using sea surface temperature as an example is shown below. Figure 7 As shown in the diagram, the scalar + vector field rendering effect is illustrated using ocean currents as an example. Figure 8 As shown.

[0244] This application embodiment parses NC data into PNG images for network transmission and employs a GPU computing and rendering scheme to reduce data transmission pressure, improve front-end rendering efficiency, effectively solve the problem of slow rendering during the rendering of large amounts of NC data, meet the visualization rendering needs of large amounts of NC data in low-bandwidth environments, improve data processing and display efficiency, and enhance the user experience of web application systems.

[0245] Please see Figure 9 This application also provides a data visualization device that can implement the above-described method. The device includes:

[0246] The data acquisition module 901 is used to acquire raw multidimensional data, which includes dimensions, variables, attributes and data. The variables include the longitudinal velocity component and the latitudinal velocity component.

[0247] The color strip generation module 902 is used to extract scalar data from the original multidimensional data and generate color strip textures based on the scalar data. The color strip textures correspond to the time axis.

[0248] Vector processing module 903 is used to extract vector data from the original multidimensional data and generate latitudinal and longitudinal textures based on the vector data.

[0249] The velocity calculation module 904 is used to obtain the current particle position, calculate the velocity vector based on the current particle position, latitudinal texture and longitudinal texture, and render the velocity vector into a velocity texture.

[0250] Prediction module 905 is used to calculate and render the texture of the next particle position based on the current particle position and velocity texture;

[0251] Post-processing generation module 906 is used to generate and render post-processed position textures based on the next particle position texture and velocity texture.

[0252] The display generation module 907 is used to obtain the position of the previous particle, calculate the screen coordinates of the previous particle position, the current particle position, the post-processing position texture and the color band texture, and perform rendering processing on the screen coordinates to obtain the frame buffer.

[0253] It is understood that the content of the above method embodiments is applicable to the present device embodiments. The specific functions implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0254] This application also provides an electronic device, which includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the above-described method. This electronic device can be any smart terminal, including tablet computers, in-vehicle computers, etc.

[0255] It is understood that the content of the above method embodiments is applicable to this device embodiment. The specific functions implemented by this device embodiment are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0256] Please see Figure 10 , Figure 10 The hardware structure of an electronic device according to another embodiment is illustrated. The electronic device includes:

[0257] The processor 1001 can be implemented using a general-purpose CPU (Central Processing Unit), microprocessor, application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this application.

[0258] The memory 1002 can be implemented as a read-only memory (ROM), static storage device, dynamic storage device, or random access memory (RAM). The memory 1002 can store the operating system and other applications. When the technical solutions provided in the embodiments of this specification are implemented through software or firmware, the relevant program code is stored in the memory 1002 and is called and executed by the processor 1001 using the methods described in the embodiments of this application.

[0259] Input / output interface 1003 is used to implement information input and output;

[0260] The communication interface 1004 is used to enable communication and interaction between this device and other devices. Communication can be achieved through wired means (such as USB, network cable, etc.) or wireless means (such as mobile network, WIFI, Bluetooth, etc.).

[0261] Bus 1005 transmits information between various components of the device (e.g., processor 1001, memory 1002, input / output interface 1003, and communication interface 1004);

[0262] The processor 1001, memory 1002, input / output interface 1003 and communication interface 1004 are connected to each other within the device via bus 1005.

[0263] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method.

[0264] It is understood that the content of the above method embodiments is applicable to this storage medium embodiment. The specific functions implemented in this storage medium embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0265] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.

[0266] It is understood that the content of the above method embodiments is applicable to the embodiments of this program product. The specific functions implemented by the embodiments of this program product are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0267] Memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory may optionally include memory remotely located relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0268] The data visualization method, apparatus, electronic device, storage medium, and program product provided in this application embodiment extract scalar data from the original multidimensional data and generate color band textures based on the scalar data; extract vector data from the original multidimensional data and generate latitudinal and longitudinal textures based on the vector data; obtain the current particle position, calculate the velocity vector based on the current particle position, latitudinal and longitudinal textures, and render the velocity vector as a velocity texture; calculate and render the next particle position texture based on the current particle position and velocity texture; generate and render a post-processed position texture based on the next particle position texture and velocity texture; obtain the previous particle position, calculate the screen coordinates based on the previous particle position, current particle position, post-processed position texture, and color band texture, and perform rendering processing on the screen coordinates to obtain a frame buffer, thereby realizing the visualization rendering of data. This is beneficial for the rapid rendering of large amounts of data, effectively solves the problem of slow rendering during the rendering of large amounts of data, can meet the visualization rendering of large amounts of data in low-bandwidth environments, improves data processing and display efficiency, improves the user experience on web pages, and is also beneficial for professional analysts to understand the data content.

[0269] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

[0270] Those skilled in the art will understand that the technical solutions shown in the figures do not constitute a limitation on the embodiments of this application, and may include more or fewer steps than shown, or combine certain steps, or different steps.

[0271] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0272] Those skilled in the art will understand that all or some of the steps in the methods disclosed above, as well as the functional modules / units in the systems and devices, can be implemented as software, firmware, hardware, or suitable combinations thereof.

[0273] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0274] It should be understood that in this application, "at least one (item)" means one or more, and "more than" means two or more. "And / or" is used to describe the relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can represent three cases: only A exists, only B exists, and both A and B exist simultaneously, where A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one (item) of the following" or similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one (item) of a, b, or c can represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, and c can be single or multiple.

[0275] In the several embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of the units described above is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0276] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0277] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0278] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes multiple instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing programs, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0279] The preferred embodiments of the present application have been described above with reference to the accompanying drawings, but this does not limit the scope of the claims of the present application. Any modifications, equivalent substitutions, and improvements made by those skilled in the art without departing from the scope and substance of the embodiments of the present application shall be within the scope of the claims of the present application.

Claims

1. A data visualization method, characterized in that, The method includes the following steps: Obtain raw multidimensional data, which includes dimensions, variables, attributes, and data, and the variables include longitudinal velocity components and latitudinal velocity components. Extract scalar data from the original multidimensional data, and generate a color band texture based on the scalar data. The color band texture corresponds to the time axis. Extract vector data from the original multidimensional data, and generate latitudinal and longitudinal textures based on the vector data; Obtain the current particle position, calculate the velocity vector based on the current particle position, the latitudinal texture and the longitudinal texture, and render the velocity vector into a velocity texture; The next particle position texture is calculated and rendered based on the current particle position and the velocity texture. A post-processed position texture is generated and rendered based on the next particle position texture and the velocity texture. Get the position of the previous particle, calculate the screen coordinates of the previous particle position, the current particle position, the post-processing position texture and the color band texture, and perform rendering processing on the screen coordinates to obtain the frame buffer; The process of calculating and rendering the next particle position texture based on the current particle position and the velocity texture includes: The next particle position is calculated based on the current particle position and the velocity texture, and the expression for the next particle position is as follows; , in, The position of the next particle. Let X be the X-axis coordinate of the current particle position in the coordinate system. Let Y be the Y-axis coordinate of the current particle position in the coordinate system. The velocity component of the particle's current position along the X-axis. The velocity component of the particle at its current position along the Y-axis. To obtain the current particle coordinates, To obtain the velocity of a particle and convert it to coordinates with consistent units; The next particle position is rendered as a next particle position texture.

2. The method according to claim 1, characterized in that, The method further includes: The current particle position is taken as the previous particle position, the next particle position is taken as the current particle position, and the process returns to the step of obtaining the current particle position, calculating the velocity vector based on the current particle position, the latitudinal texture and the longitudinal texture, and rendering the velocity vector into a velocity texture.

3. The method according to claim 1, characterized in that, The step of extracting scalar data from the original multidimensional data and generating color band textures based on the scalar data includes: A scalar field is generated based on the meridional velocity component and the zonal velocity component, the scalar field including a scalar value at each position; The scalar field is normalized and mapped to a grayscale range of 0-255 to generate a grayscale image; Obtain the maximum and minimum scalar values ​​of the scalar field; Get the gradient color mapping texture; The grayscale image is sampled and normalized. The normalized grayscale image is then sampled using the maximum scalar value and the minimum scalar value to obtain the color mapping texture, thus obtaining the color banding texture.

4. The method according to claim 1, characterized in that, The step of obtaining the current particle position, calculating a velocity vector based on the current particle position, the latitudinal texture, and the longitudinal texture, and rendering the velocity vector into a velocity texture includes: Determine if the current particle position exists; if it exists, obtain the current particle position. If the current particle position does not exist, a random particle position grid is generated according to a preset latitude and longitude range, and the generated random particle position grid is used as the current particle position; The true meridional velocity and true latitudinal velocity are calculated from the current particle position, the latitudinal texture, and the longitudinal texture using the formula for restoring the original data. The expression for the formula for restoring the original data is as follows: , , in, The true meridional velocity, This is the original value of the current particle position. The maximum value of the meridional texture. This is the minimum value of the radial texture. The true latitudinal velocity, The maximum value of the latitudinal texture. This is the minimum value of the latitudinal texture; A velocity vector is obtained by combining the true meridional velocity and the true latitudinal velocity, and the velocity vector is rendered into a velocity texture.

5. The method according to claim 1, characterized in that, The step of obtaining the previous particle position, calculating screen coordinates using the previous particle position, the current particle position, the post-processed position texture, and the color band texture, and performing rendering processing on the screen coordinates to obtain a frame buffer includes: Determine if the position of the previous particle exists; if it exists, obtain the position of the previous particle. If the previous particle position does not exist, a random particle position grid is generated according to a preset latitude and longitude range, and the generated random particle position grid is used as the current particle position. Calculate screen coordinates based on the previous particle position, the current particle position, the post-processed position texture, and the color band texture; The rendering result is obtained by sampling the color stripe texture and assigning path color to the screen coordinates; The rendering result is output to the frame buffer.

6. A data visualization device, characterized in that, The device includes: The data acquisition module is used to acquire raw multidimensional data, which includes dimensions, variables, attributes and data, and the variables include longitudinal velocity components and latitudinal velocity components. A color band generation module is used to extract scalar data from the original multidimensional data and generate a color band texture based on the scalar data. The color band texture corresponds to the time axis. The vector processing module is used to extract vector data from the original multidimensional data and generate latitudinal and longitudinal textures based on the vector data. The velocity calculation module is used to obtain the current particle position, calculate the velocity vector based on the current particle position, the latitudinal texture and the longitudinal texture, and render the velocity vector into a velocity texture; The prediction module is used to calculate and render the next particle position texture based on the current particle position and the velocity texture; The post-processing generation module is used to generate and render a post-processed position texture based on the next particle position texture and the velocity texture. The display generation module is used to obtain the position of the previous particle, calculate the screen coordinates of the previous particle position, the current particle position, the post-processing position texture and the color band texture, and perform rendering processing on the screen coordinates to obtain the frame buffer; The prediction module is specifically used for: The next particle position is calculated based on the current particle position and the velocity texture, and the expression for the next particle position is as follows; , in, The position of the next particle. Let X be the X-axis coordinate of the current particle position in the coordinate system. Let Y be the Y-axis coordinate of the current particle position in the coordinate system. The velocity component of the particle's current position along the X-axis. The velocity component of the particle at its current position along the Y-axis. To obtain the current particle coordinates, To obtain the velocity of a particle and convert it to coordinates with consistent units; The next particle position is rendered as a next particle position texture.

7. An electronic device, characterized in that, The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the method according to any one of claims 1 to 5.

8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

9. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 5.

Citation Information

Patent Citations

  • Ocean data visualization method and system based on unreal engine and medium

    CN118736158A

  • Methods and apparatus for creating three-dimensional motion illusion in a graphics processing system

    US6847364B1