Density map data visual query method and device based on flow model

The spatial and temporal data is aggregated and encoded through the stream model, density map data is generated and visualized query is carried out, which solves the problem of low spatiotemporal data processing efficiency, realizes efficient data exploration and feature recognition, and improves user interaction and analysis efficiency.

CN120448430AActive Publication Date: 2025-08-08SHANGHAI TUSHI INTELLIGENT TECHNOLOGY CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202510949093.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-10
Publication Date
2025-08-08
Estimated Expiration
2045-07-10

AI Technical Summary

Technical Problem

The existing technology is difficult to efficiently explore and mine features in spatiotemporal data, making it difficult for users to effectively traverse and understand the huge spatiotemporal data space and to efficiently identify valuable information.

Method used

The density map data visual query method based on the flow model is used to aggregate the spatiotemporal data, process the kernel density estimation algorithm, and encode the flow model to generate density map data, and use the trained flow model to perform visual query to display the density map data.

Benefits of technology

It significantly reduces the amount of data processing, captures key spatio-temporal features, laying a foundation for efficient access for subsequent queries and analysis. Users quickly explore and interact through intuitive interfaces, improving knowledge discovery and decision-making efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120448430A_ABST
    Figure CN120448430A_ABST
Patent Text Reader

Abstract

The invention provides a density map data visual query method and device based on a flow model. The method comprises the following steps: aggregating spatio-temporal data related to a target area to obtain different data frames; based on a configured kernel density estimation algorithm, processing the different data frames to generate density maps corresponding to the different data frames and corresponding density map data; inputting the density map data into a trained flow model, and encoding the density map data corresponding to any data frame by the flow model to obtain an encoding result representing the density map data to the corresponding representation space; after the space-time range and the coding result involved by the data frame are stored in an associated mode, according to the query condition input by the user, the trained flow model is used for conducting visual query on the stored data set, and the query result is displayed to the user. The method can significantly reduce the space occupancy and can accelerate the efficiency of common aggregation operations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method and device for visual query of density map data based on a flow model. Background Art

[0002] Spatiotemporal data refers to data that combines both temporal and geographic dimensions, such as environmental monitoring data, demographic data, and traffic flow data. Spatiotemporal data is often used to solve real-world problems. For example, measuring changes in air quality over time at a specific location, selecting a suitable location for a store, and planning public resources for each district in a city are examples. By selecting appropriate spatiotemporal datasets and applying appropriate analytical methods to analyze them, useful conclusions can be drawn.

[0003] However, spatiotemporal data has the characteristics of large data volume and sparse effective information, and existing technologies find it difficult to efficiently explore such data and mine features. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a visual query method and device for density map data based on a flow model, which is used to encode spatiotemporal data through a flow model in a neural network. The encoded result can significantly reduce space occupancy and speed up the efficiency of common aggregation operations.

[0005] In a first aspect, a method for visually querying density map data based on a flow model is provided, which may include:

[0006] Aggregate the spatiotemporal data involved in the target area to obtain different data frames; each data frame includes statistical data divided by spatial dimension and time dimension;

[0007] Based on the configured kernel density estimation algorithm, the different data frames are processed to generate density maps and corresponding density map data corresponding to the different data frames;

[0008] Inputting the density map data into a trained flow model, the flow model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data to the corresponding representation space; the flow model is used to perform bidirectional mapping between the data space and the representation space through the Haar transform layer and the coupling layer;

[0009] After the spatiotemporal range involved in the data frame and the encoding results are associated and stored, a visual query is performed on the stored data set using the trained stream model according to the query conditions input by the user, and the query results are displayed to the user; the data set includes the encoding results corresponding to the spatiotemporal range involved in different data frames.

[0010] In one possible implementation, the coupling layer includes an attention mechanism module and a multi-scale feature fusion module;

[0011] Inputting the density map data into a trained flow model, the flow model encodes the density map data to obtain an encoding result representing the density map data into a corresponding representation space, including:

[0012] The Haar transform layer decomposes the input density map data to obtain low-frequency information and high-frequency information corresponding to the density map data;

[0013] The attention mechanism module in the coupling layer processes the obtained low-frequency information and high-frequency information to obtain the attention weight corresponding to the low-frequency information and the attention weight corresponding to the high-frequency information;

[0014] The multi-scale feature fusion module in the coupling layer fuses low-frequency information and high-frequency information using corresponding attention weights to obtain fused information;

[0015] The low-frequency information and the fused information are determined as encoding results representing spatial data.

[0016] In one possible implementation, the multi-scale feature fusion module in the coupling layer fuses low-frequency information and high-frequency information using corresponding attention weights to obtain fused information, including:

[0017] Performing Fourier transform on the low-frequency information and the high-frequency information respectively to obtain first frequency domain representation information corresponding to the low-frequency information and second frequency domain representation information corresponding to the high-frequency information;

[0018] Using a preset interactive algorithm, operating the first frequency domain representation information and the second frequency domain representation information to obtain interactive frequency domain representation information;

[0019] Perform inverse Fourier transform on the frequency domain representation information after interaction to obtain the spatial representation information after interaction;

[0020] Based on the attention weight corresponding to the low-frequency information and the attention weight corresponding to the high-frequency information, the low-frequency information and the high-frequency information are weightedly fused to obtain the initial fused information;

[0021] Fusion information is determined based on the space representation information after the interaction and the initial fusion information.

[0022] In one possible implementation, the query condition includes a time and space range to be queried;

[0023] Based on the query conditions input by the user, a trained streaming model is used to perform a visual query on the stored data set, and the query results are displayed to the user, including:

[0024] According to the time and space range to be queried in the query condition, a corresponding target encoding result is found from the data set, and the target encoding result is decoded using the trained flow model to obtain corresponding density map data;

[0025] A rendered image corresponding to the obtained density map data is displayed to the user; the rendered image includes a heat map or a line map.

[0026] In a possible implementation, the query condition further includes a query type;

[0027] After obtaining the corresponding density map data, the method further includes:

[0028] After processing the obtained density map data according to the query type, the processed data is obtained;

[0029] The rendered image corresponding to the obtained processed data is displayed to the user.

[0030] In one possible implementation, the query types include aggregation queries and similarity queries.

[0031] In one possible implementation, the spatiotemporal data related to the target area are aggregated to obtain different data frames, including:

[0032] Collect spatiotemporal data related to the target area from multiple data sources;

[0033] According to the spatial division of the target area, the spatiotemporal data are grouped by geographical location. At the same time, according to the temporal division of the target area, the spatiotemporal data are grouped by time granularity.

[0034] The spatiotemporal data after spatial division and the spatiotemporal data after time division are aggregated to obtain different data frames.

[0035] In a second aspect, a visual query device for density map data based on a flow model is provided, which may include:

[0036] An aggregation unit is used to aggregate the spatiotemporal data involved in the target area to obtain different data frames; each data frame includes statistical data divided by spatial dimension and time dimension;

[0037] a processing unit, configured to process the different data frames based on a configured kernel density estimation algorithm to generate density maps and corresponding density map data corresponding to the different data frames;

[0038] An acquisition unit is configured to input the density map data into a trained flow model, wherein the flow model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data in a corresponding representation space; the flow model is configured to perform bidirectional mapping between the data space and the representation space through a Haar transform layer and a coupling layer on the input data;

[0039] a query unit configured to perform a visual query on the stored data set using the trained stream model according to a query condition input by a user after associating and storing the spatiotemporal range involved in the data frame with the encoding result; the data set includes encoding results corresponding to the spatiotemporal range involved in different data frames;

[0040] A display unit is used to display the query result to the user.

[0041] In a third aspect, an electronic device is provided, the electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0042] Memory for storing computer programs;

[0043] The processor is configured to implement any of the method steps described in the first aspect when executing a program stored in the memory.

[0044] In a fourth aspect, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any of the method steps described in the first aspect is implemented.

[0045] The density map data visual query method based on the flow model provided in the embodiment of the present application aggregates the spatiotemporal data involved in the target area to obtain different data frames; each data frame includes statistical data divided by spatial dimension and time dimension; based on the configured kernel density estimation algorithm, different data frames are processed to generate density maps and corresponding density map data corresponding to different data frames; the density map data is input into the trained flow model, and the flow model encodes the density map data corresponding to any data frame to obtain the encoding result representing the density map data to the corresponding representation space; the flow model is used to bidirectionally map the input data between the data space and the representation space through the Haar transform layer and the coupling layer; after the spatiotemporal range involved in the data frame and the encoding result are associated and stored, the trained flow model is used to perform a visual query on the stored data set according to the query conditions input by the user, and the query result is displayed to the user; the data set includes the encoding results corresponding to the spatiotemporal range involved in different data frames. The method encodes the spatiotemporal data through the flow model in the neural network, and the encoded result can significantly reduce space occupancy and speed up the efficiency of common aggregation operations. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without creative work.

[0047] Figure 1 A flow chart of a method for visually querying density map data based on a flow model provided in an embodiment of the present application;

[0048] Figure 2 A schematic diagram of the structure of a flow model-based density map data visual query device provided in an embodiment of the present application;

[0049] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The following will provide a clear and complete description of the technical solutions in the embodiments of this application, in conjunction with the accompanying drawings. Obviously, the described embodiments represent only a portion of the embodiments of this application and are not intended to be exhaustive. Based on the embodiments of this application, all other embodiments derived by persons of ordinary skill in the art without inventive effort are intended to fall within the scope of protection of this application. Unless otherwise defined, technical or scientific terms used in this application should have the same ordinary meanings as those understood by persons of ordinary skill in the art. The terms "first," "second," and similar expressions used in this application do not denote any order, quantity, or importance; they are merely used to distinguish between different components. Terms such as "include" or "comprising" mean that the element or object preceding the term encompasses the elements or objects listed after the term, and their equivalents, without excluding other elements or objects. Terms such as "connect," "couple," or "connected" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect.

[0051] Spatiotemporal data is a complex data type that encompasses both temporal and spatial (geographic) dimensions. Examples include environmental monitoring (e.g., air quality, weather), demographics, traffic flow, mobile object trajectories, social media check-ins, and IoT sensor network data. This type of data is key to understanding the dynamic world and is widely used to solve real-world problems such as tracking trends at specific locations (e.g., analyzing fluctuations in PM2.5 concentrations within a city over a year); optimizing site selection based on historical and real-time patterns (e.g., selecting locations with high foot traffic and low competition for new retail stores); optimizing the allocation of public facilities (hospitals, schools, parks) or services (bus routes, shared bike deployment) based on population distribution, demand forecasts, and mobility; and identifying hidden correlations, anomalies (e.g., traffic accident hotspots, disease outbreaks), and cyclical patterns. The key to solving problems with spatiotemporal data lies in selecting appropriate datasets and applying appropriate analytical techniques (statistics, mining, modeling, and visualization). The massive volume and information sparsity of spatiotemporal data present significant obstacles, making it difficult for users to effectively traverse and understand vast data spaces and efficiently identify valuable insights from these vast volumes of spatiotemporal data.

[0052] To address the above-mentioned issues, this application provides a visual query method for density map data based on a stream model. By encoding spatiotemporal data using a stream model and learning from data space to representation space, the amount of data processing is reduced while also capturing key spatiotemporal features, laying the foundation for efficient access for subsequent queries and analyses. Afterwards, users explore the encoded data and query specific spatiotemporal patterns or features (such as "find the locations and peak hours of all traffic jams in the past week" or "show areas where air quality continues to deteriorate") through an intuitive visualization interface (such as map overlays, timelines, heat maps, etc.). Visual queries leverage humans' powerful pattern recognition capabilities, allowing users to efficiently interact with complex encoding results, thereby accelerating the knowledge discovery and decision-making process.

[0053] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application can be combined with each other if there is no conflict.

[0054] Figure 1 The flowchart of a method for visual query of density map data based on a flow model provided in an embodiment of the present application is shown in FIG. Figure 1 As shown, the method may include:

[0055] Step S110: Aggregate the spatiotemporal data related to the target area to obtain different data frames.

[0056] In specific implementations, spatiotemporal data related to the target area is collected from multiple data sources. This data can include sensor data (e.g., data from weather stations (temperature, humidity, wind speed, etc.), traffic flow data from traffic cameras, and pollutant concentration data from environmental monitoring stations), mobile device data (e.g., smartphone location data, mobile app usage data), and administrative data (e.g., census data, business activity data, and crime records). The collected spatiotemporal data is preprocessed (e.g., data cleaning, data standardization, and time alignment).

[0057] Next, the spatiotemporal data is grouped by geographic location based on the spatial divisions of the target area. For example, if the target area is a city, the spatiotemporal data can be spatially aggregated by different blocks, communities, or administrative divisions. For each region, the statistical characteristics of the spatiotemporal data in the time dimension (such as average, sum, maximum, etc.) are calculated. Furthermore, based on the time divisions of the target area, the spatiotemporal data is grouped by time granularity. For example, if the time range is one month, the spatiotemporal data can be aggregated by day or hour, and the statistical characteristics of the spatiotemporal data in the spatial dimension are calculated for each time unit.

[0058] Aggregate the spatially partitioned spatiotemporal data with the temporally partitioned spatiotemporal data to generate different data frames. Each data frame contains statistical data partitioned by both spatial and temporal dimensions. For example, one data frame might represent traffic flow data for a particular block on a particular day, while another might represent air quality data for a particular neighborhood over a particular month.

[0059] It can be understood that each data frame stores data in the form of a table or matrix, where rows represent different time units (such as hours, days), columns represent different spatial units (such as blocks, administrative divisions), and the values in the cells are statistical data under this time and space combination.

[0060] Step S120 : Based on the configured kernel density estimation algorithm, different data frames are processed to generate density maps and corresponding density map data corresponding to the different data frames.

[0061] The core parameters of the kernel density estimation (KDE) algorithm include bandwidth and kernel function. To ensure that the generated density map smoothly reflects the data distribution while avoiding over-smoothing or under-smoothing, the kernel density estimation algorithm configured in this application can automatically select the most suitable kernel function for the corresponding kernel density estimation by analyzing the statistical characteristics of the statistical data within the data frame (such as skewness and kurtosis). For example, for data frames with Gaussian distribution characteristics, the Gaussian kernel function is preferred; for data frames with more uniform distribution, the uniform kernel function is selected. This application does not limit this. Furthermore, bandwidth is a key parameter in kernel density estimation and determines the smoothness of the density estimate. An adaptive bandwidth selection method is used to dynamically adjust the bandwidth based on the spatiotemporal distribution of the data frame. For example, for areas with dense data, a smaller bandwidth is used to capture local details; for areas with sparse data, a larger bandwidth is used to smooth noise. The bandwidth parameter can be optimized through cross-validation or heuristic methods based on data distribution.

[0062] In specific implementations, for each data frame, the data at each spatial location and each time point (i.e., one time step) in the data frame is used as input. A kernel density estimation operation is performed using a selected kernel function and corresponding bandwidth parameters to obtain the density value of each spatiotemporal unit. Based on the density value of each spatiotemporal unit, the density map corresponding to the data frame and the density map data within the density map are obtained, i.e., the feature data representing the density map.

[0063] Step S130: input the density map data into the trained flow model, and the flow model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data into the corresponding representation space.

[0064] The flow model is used to perform a bidirectional mapping between the data space and the representation space for input data through a Haar transform layer and a coupling layer. Through the combined structure of the Haar transform and coupling layers, the flow model achieves effective information compression and reconstruction. Specifically, the flow model is a reversible generative model that learns a bidirectional mapping between the data space and the representation space. By setting a loss function, operations in the representation space can also be mapped back to the original data space. Our flow model architecture consists of two main components: a Haar transform-based convolution kernel and a coupling layer. One of the model's goals is that the encoded result preserves the characteristics of the original density map and can be used to reconstruct the original image. The Haar transform can meet these requirements. The Haar transform is a basic discrete wavelet transform (DWT) that decomposes the input signal into two components: the mean and the residual. The mean represents the smoothed original signal, preserving low-frequency information in the original density map, such as the outlines and brightness of salient regions. The residual obtained by the Haar transform corresponds to high-frequency features, such as the outlines of regions in the density map and the gradient details of brightness. The original density map can be losslessly reconstructed by combining the mean and residual information through the inverse wavelet transform (IWT). The coupling layer converts the high-frequency information obtained by the Haar transform into a distribution that is irrelevant to the density map, so that it can be discarded. When restoring the density map, it is randomly sampled from a normal distribution.

[0065] In the specific implementation, the Haar transform layer can decompose the input density map data to obtain the low-frequency information corresponding to the density map data. and high-frequency information ; The low-frequency information obtained by the coupling layer and high-frequency information Fusion is performed to obtain fusion information ; Afterwards, the low-frequency information can be and fusion information The encoding result is determined to represent spatial data.

[0066] The density map dataset is encoded through the flow model, and the trained flow model is applied to the entire density map dataset to achieve lossy encoding of the data. The encoding process uses a combined structure based on Haar transform and coupling layer. Through the mapping learned by the model, the features of the original density map are embedded into the representation space. First, the data in the representation space is processed using Haar transform and decomposed into low-frequency information. and high-frequency information Through the coupling layer, the low frequency information and high-frequency information The features are fused to obtain the encoded representation space data and .in The results need to be saved using a lossless compression format, such as PNG. Note that the JPEG lossy compression format is not used here, as information loss would cause errors in the decoding process. This process effectively compresses and reconstructs the original density map information, providing an efficient foundation for subsequent queries. Represents the global structure of the density map (such as major hot spots and spatial distribution patterns). It is a low-resolution version of the original data. Represents the detailed supplementary information learned through the coupling layer, including the structured compression of some high-frequency features. and Together they form an approximation to the original density map.

[0067] In some embodiments, the coupling layer may include an attention mechanism module and a multi-scale feature fusion module.

[0068] The attention mechanism module in the coupling layer pays attention to the low-frequency information obtained and high-frequency information Processing to obtain low-frequency information Corresponding attention weights and high-frequency information The corresponding attention weights; the multi-scale feature fusion module in the coupling layer uses the corresponding attention weights to focus on low-frequency information and high-frequency information Fusion is performed to obtain fusion information ; Low frequency information and fusion information The encoding result is determined to represent spatial data.

[0069] Furthermore, the multi-scale feature fusion module in the coupling layer uses the corresponding attention weights to and high-frequency information Fusion to obtain fusion information Ways to do this may include:

[0070] (1) Use the corresponding attention weight to focus on low-frequency information and high-frequency information Perform weighted fusion to obtain fusion information.

[0071] (2) Low-frequency information and high-frequency information They have different physical meanings and feature distributions in the frequency domain. Low-frequency information mainly reflects global trends, while high-frequency information contains local details. Directly fusing these two types of information in the spatial domain may lead to feature conflicts in the frequency domain, especially when the spatial distribution of low-frequency and high-frequency information is inconsistent. Traditional fusion methods often ignore the interaction between frequency domain features and the calibration of spatial positions. If the low-frequency and high-frequency information are not properly aligned in space, the fused features may introduce noise and reduce the quality of representing spatial data. In order to solve the above problems, this application introduces a frequency domain feature interaction and spatial calibration mechanism. The specific steps are as follows:

[0072] Step 1: Low-frequency information and high-frequency information Perform Fourier transform respectively to obtain low-frequency information The corresponding first frequency domain represents information Y1 and high frequency information The corresponding second frequency domain represents information Y2; wherein, before Fourier transform, the low-frequency information and high-frequency information It is usually data in matrix form in the spatial domain, so the corresponding frequency domain representation information is still data in matrix form.

[0073] Step 2: Using a preset interaction algorithm, perform an operation on the first frequency domain representation information Y1 and the second frequency domain representation information Y2 (e.g., performing a dot product operation on the first frequency domain representation information Y1 and the second frequency domain representation information Y2) to obtain the interactive frequency domain representation information. This interaction can enhance feature complementarity within the frequency domain, especially in areas where low-frequency and high-frequency features overlap.

[0074] Step 3: Perform inverse Fourier transform on the frequency domain representation information after interaction to obtain the spatial representation information after interaction;

[0075] Step 4: Based on low-frequency information Corresponding attention weights and high-frequency information The corresponding attention weight for low-frequency information and high-frequency information Perform weighted fusion to obtain initial fusion information;

[0076] Step 5: Determine the fusion information based on the spatial representation information after interaction and the initial fusion information .

[0077] Determine fusion information The formula is: , where α is a balance parameter, i(x) is the spatial representation information after interaction, is the initial fusion information.

[0078] Alternatively, after concatenating the spatially represented information after interaction with the initial fusion information, feature fusion can be performed through a convolutional layer to obtain the fusion information. .

[0079] Furthermore, the balance parameter α is used to control the contributions of the spatially represented information i(x) after interaction and the initial fusion information to the final fusion information . The balance parameter α can be adaptively adjusted based on information entropy. Specifically, calculate the information entropy H(i) and H(C) of i(x) and respectively; then α can be adjusted according to the magnitudes of the two information entropies. If H(i)>H(C), it indicates that i(x) contains more information and the value of α should be increased; conversely, if H(i)<H(C), it means that contains more information and the value of α should be decreased. The following formula can be used to dynamically adjust α: .

[0080] Step S140: After associatively storing the spatio-temporal range and encoding result involved in the data frame, according to the query conditions input by the user, use the trained flow model to perform visual query on the stored data set, and display the query result to the user.

[0081] Among them, after associatively storing the spatio-temporal range and encoding result involved in the data frame, a data set can be formed, that is, the data set can include the encoding results corresponding to the spatio-temporal ranges involved in different data frames. The spatio-temporal range involved in the data frame refers to the spatial range and time step corresponding to the corresponding data frame.

[0082] In specific implementation, the query conditions may include the spatio-temporal range to be queried;

[0083] According to the spatio-temporal range to be queried in the query conditions, find the corresponding target encoding result from the data set, and use the trained flow model to decode the target encoding result to obtain the corresponding density map data; display the rendered image corresponding to the obtained density map data to the user; the rendered image includes a heat map or a line graph.

[0084] Furthermore, the query conditions may also include the query type, which may include aggregate query and similarity query.

[0085] After obtaining the corresponding density map data, the obtained density map data can be processed according to the query type to obtain processed data; and display the rendered image corresponding to the obtained processed data to the user.

[0086] It can be seen that the above-mentioned implementation of the present application can make full use of the bidirectional mapping characteristics of the flow model, allowing users to perform flexible query operations in the representation space and quickly trace back to the original density map from the representation space. The user enters the query conditions, including queries for specific features, patterns or similarities in the representation space. Performing fast aggregation query operations in the representation space, users can perform maximum, minimum and mean queries to meet their analysis needs. The query results reconstruct the original density map through the inverse process of the flow model.

[0087] In some cases, when the amount of spatiotemporal data from a particular data source is small, directly aggregating the data may result in the loss of valuable information or an inability to effectively extract it. In this case, the following strategies are needed to enhance the usability and representativeness of the data while ensuring that the aggregation process can effectively extract valuable information.

[0088] After collecting spatiotemporal data related to the target area from the data source, if it is detected that the spatiotemporal data is missing at certain time points or spatial regions, the application can fill these gaps through interpolation methods to increase the amount of data. Interpolation methods may include: (1) Time series interpolation: that is, for missing data in the time dimension, linear interpolation, spline interpolation, or interpolation methods based on time series models (such as ARIMA) are used to fill the data. (2) Spatial interpolation: that is, for missing data in the spatial dimension, Kriging interpolation (Kriging) and inverse distance weighted interpolation (IDW) are used to fill the data.

[0089] (3) Design a quantum neural network for the interpolation of spatiotemporal data. Specifically: Encode the features of spatiotemporal data with a small amount of data (such as timestamp, spatial position, data value, etc.) into the quantum state of the quantum bit using quantum coding technology (such as amplitude coding, angle coding). For example, map the data value to the superposition state of the quantum bit and input it into the quantum neural network. The quantum neural network evolves the quantum state in the quantum circuit through multiple quantum gate operations (such as CNOT gates) and finally forms an output quantum state. The evolution process of the quantum state simulates the complex patterns and correlations of spatiotemporal data. Measure the output quantum state of the quantum circuit to obtain the measurement result. Due to the superposition and uncertainty of the quantum state, multiple measurements are required to obtain the probability distribution. Decode the result of the quantum measurement into classical data. According to the probability distribution of the measurement result, calculate the expected value or most likely value of the characteristic value. Post-process the decoded data, such as standardization or normalization, to obtain the interpolation result that meets the actual needs. The superposition and entanglement characteristics of quantum bits can provide a more powerful computing basis for the interpolation task, thereby improving the accuracy and efficiency of interpolation.

[0090] Furthermore, in the actual deployment of quantum neural networks, remote execution of quantum circuits can be achieved through a quantum cloud computing platform, ensuring efficient processing of spatiotemporal data interpolation tasks in resource-constrained environments. The training process of quantum neural networks can employ classical-quantum hybrid optimization algorithms, such as the variational quantum algorithm (VQA), to adjust quantum gate parameters by minimizing the interpolation error loss function, thereby improving model generalization. The interpolated data is seamlessly integrated into the dataset storage and included in subsequent query processes as part of the target encoding result. When users perform aggregate queries, the system automatically checks data integrity. If missing regions are detected, the quantum interpolation module is prioritized to fill in the data, avoiding query distortion. For similarity queries, the spatial representation properties of the flow model are leveraged to quickly match similar patterns by calculating cosine similarity or Euclidean distance between encoding results. The user interface supports custom query parameters, such as the temporal window size and spatial resolution, and renders query results in real time through interactive heatmaps, allowing users to intuitively analyze density distribution trends. Furthermore, an error feedback mechanism can be configured to automatically fall back to traditional interpolation methods or log data for debugging when anomalies occur during interpolation or querying, ensuring the robustness and reliability of the overall query system.

[0091] In some embodiments, query operations support batch processing mode, and users can submit multiple query requests at one time. The system automatically schedules execution based on the priority queue to avoid resource conflicts. After the user enters the query conditions, the validity of the spatiotemporal range can be verified in real time (such as whether the time step is within the coverage of the data set), and a query execution report is generated for the user to preview. For aggregate queries, statistical indicators (such as maximum, minimum, and mean) can be calculated directly in the representation space without reconstructing the original density map; similarity queries support result sorting and filtering functions, and users can set similarity thresholds to refine matching results. In addition to heat map or line map rendering, query results also provide data export options to facilitate offline analysis. Query history is automatically saved, and users can backtrack or reuse previous query parameters to improve analysis efficiency.

[0092] Corresponding to the above method, the embodiment of the present application also provides a density map data visual query device based on a flow model, such as Figure 2 As shown, the device includes:

[0093] Aggregation unit 210, configured to aggregate the spatiotemporal data related to the target area to obtain different data frames; each data frame includes statistical data divided by spatial dimension and temporal dimension;

[0094] The processing unit 220 is configured to process the different data frames based on the configured kernel density estimation algorithm to generate density maps and corresponding density map data corresponding to the different data frames;

[0095] An acquisition unit 230 is configured to input the density map data into a trained flow model. The flow model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data in a corresponding representation space. The flow model is configured to perform bidirectional mapping between the data space and the representation space by using a Haar transform layer and a coupling layer to input the data.

[0096] The query unit 240 is configured to perform a visual query on the stored data set using the trained stream model according to a query condition input by a user after associating and storing the spatiotemporal range involved in the data frame with the encoding result; the data set includes encoding results corresponding to the spatiotemporal range involved in different data frames;

[0097] The display unit 250 is used to display the query result to the user.

[0098] The functions of each functional unit of the density map data visual query device based on the flow model provided in the above-mentioned embodiment of the present application can be realized through the above-mentioned method steps. Therefore, the specific working process and beneficial effects of each unit in the density map data visual query device based on the flow model provided in the embodiment of the present application will not be repeated here.

[0099] The present application also provides an electronic device, such as Figure 3 As shown, it includes a processor 310 , a communication interface 320 , a memory 330 and a communication bus 340 , wherein the processor 310 , the communication interface 320 , and the memory 330 communicate with each other via the communication bus 340 .

[0100] Memory 330, for storing computer programs;

[0101] The processor 310 is configured to execute the program stored in the memory 330 by performing the following steps:

[0102] Aggregate the spatiotemporal data involved in the target area to obtain different data frames; each data frame includes statistical data divided by spatial dimension and time dimension;

[0103] Based on the configured kernel density estimation algorithm, the different data frames are processed to generate density maps and corresponding density map data corresponding to the different data frames;

[0104] The density map data is input into a trained flow model, and the flow model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data to the corresponding representation space; the flow model is used to perform bidirectional mapping between the data space and the representation space through the Haar transform layer and the coupling layer;

[0105] After the spatiotemporal range involved in the data frame and the encoding results are associated and stored, a visual query is performed on the stored data set using the trained stream model according to the query conditions input by the user, and the query results are displayed to the user; the data set includes the encoding results corresponding to the spatiotemporal range involved in different data frames.

[0106] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into address buses, data buses, and control buses. For ease of illustration, the figure uses only one thick line, but this does not mean that there is only one bus or only one type of bus.

[0107] The communication interface is used for communication between the above electronic device and other devices.

[0108] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage. Alternatively, the memory may be at least one storage device located away from the processor.

[0109] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0110] The implementation methods and beneficial effects of the various components of the electronic device in the above embodiments to solve the problems can be found in Figure 1 The various steps in the embodiment shown are implemented, therefore, the specific working process and beneficial effects of the electronic device provided by the embodiment of the present application are not repeated here.

[0111] In another embodiment provided in the present application, a computer-readable storage medium is also provided, which stores instructions. When the computer-readable storage medium is run on a computer, it enables the computer to execute the visual query method for density map data based on the flow model described in any of the above embodiments.

[0112] In another embodiment provided by the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the visual query method for density map data based on a flow model described in any of the above embodiments.

[0113] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the embodiments of the present application may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware. Furthermore, the embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0114] The embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0115] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1a process or multiple processes and / or boxes Figure 1 The steps for the function specified in one or more boxes.

[0117] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0118] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims and their equivalents, the embodiments of the present application are also intended to include these modifications and variations.

Claims

1. A visual query method for density map data based on a flow model, characterized in that: The method comprises: Aggregate the spatiotemporal data involved in the target area to obtain different data frames; each data frame includes statistical data divided by spatial dimension and time dimension; Based on the configured kernel density estimation algorithm, the different data frames are processed to generate density maps and corresponding density map data corresponding to the different data frames; Inputting the density map data into a trained flow model, the flow model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data to the corresponding representation space; the flow model is used to perform bidirectional mapping between the data space and the representation space through the Haar transform layer and the coupling layer; After the spatiotemporal range involved in the data frame and the encoding results are associated and stored, a visual query is performed on the stored data set using the trained stream model according to the query conditions input by the user, and the query results are displayed to the user; the data set includes the encoding results corresponding to the spatiotemporal range involved in different data frames.

2. The method according to claim 1, wherein The coupling layer includes an attention mechanism module and a multi-scale feature fusion module; Inputting the density map data into a trained flow model, the flow model encodes the density map data to obtain an encoding result representing the density map data into a corresponding representation space, including: The Haar transform layer decomposes the input density map data to obtain low-frequency information and high-frequency information corresponding to the density map data; The attention mechanism module in the coupling layer processes the obtained low-frequency information and high-frequency information to obtain the attention weight corresponding to the low-frequency information and the attention weight corresponding to the high-frequency information; The multi-scale feature fusion module in the coupling layer fuses low-frequency information and high-frequency information using corresponding attention weights to obtain fused information; The low-frequency information and the fused information are determined as encoding results representing spatial data.

3. The method according to claim 2, wherein The multi-scale feature fusion module in the coupling layer uses the corresponding attention weights to fuse the low-frequency information and the high-frequency information to obtain fused information, including: Performing Fourier transform on the low-frequency information and the high-frequency information respectively to obtain first frequency domain representation information corresponding to the low-frequency information and second frequency domain representation information corresponding to the high-frequency information; Using a preset interactive algorithm, operating the first frequency domain representation information and the second frequency domain representation information to obtain interactive frequency domain representation information; Perform inverse Fourier transform on the frequency domain representation information after interaction to obtain the spatial representation information after interaction; Based on the attention weight corresponding to the low-frequency information and the attention weight corresponding to the high-frequency information, the low-frequency information and the high-frequency information are weightedly fused to obtain the initial fused information; Fusion information is determined based on the space representation information after the interaction and the initial fusion information.

4. The method according to claim 1, wherein The query conditions include the time and space range to be queried; Based on the query conditions input by the user, a trained streaming model is used to perform a visual query on the stored data set, and the query results are displayed to the user, including: According to the time and space range to be queried in the query condition, a corresponding target encoding result is found from the data set, and the target encoding result is decoded using the trained flow model to obtain corresponding density map data; A rendered image corresponding to the obtained density map data is displayed to the user; the rendered image includes a heat map or a line map.

5. The method according to claim 4, wherein The query conditions also include query type; After obtaining the corresponding density map data, the method further includes: After processing the obtained density map data according to the query type, the processed data is obtained; The rendered image corresponding to the obtained processed data is displayed to the user.

6. The method according to claim 5, wherein The query types include aggregation queries and similarity queries.

7. The method according to claim 1, wherein Aggregate the spatiotemporal data of the target area to obtain different data frames, including: Collect spatiotemporal data related to the target area from multiple data sources; According to the spatial division of the target area, the spatiotemporal data are grouped by geographical location. At the same time, according to the temporal division of the target area, the spatiotemporal data are grouped by time granularity. The spatiotemporal data after spatial division and the spatiotemporal data after time division are aggregated to obtain different data frames.

8. A visual query device for density map data based on a flow model, characterized in that: The device comprises: An aggregation unit is used to aggregate the spatiotemporal data involved in the target area to obtain different data frames; each data frame includes statistical data divided by spatial dimension and time dimension; a processing unit, configured to process the different data frames based on a configured kernel density estimation algorithm to generate density maps and corresponding density map data corresponding to the different data frames; An acquisition unit is configured to input the density map data into a trained flow model, wherein the flow model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data in a corresponding representation space; the flow model is configured to perform bidirectional mapping between the data space and the representation space through a Haar transform layer and a coupling layer on the input data; a query unit configured to perform a visual query on the stored data set using the trained stream model according to a query condition input by a user after associating and storing the spatiotemporal range involved in the data frame with the encoding result; the data set includes encoding results corresponding to the spatiotemporal range involved in different data frames; A display unit is used to display the query result to the user.

9. An electronic device, characterized in that: The electronic device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Spatio-temporal data flow model self-enhancement method

    CN113779169A

  • Geographic information visual recommendation method based on hidden space coding

    CN115438276A

  • Terraced field pattern evolution quantification and ecological system service tradeoff method

    CN120032256A

  • Meteorological metadata storage method and system based on machine learning

    CN120104579A

  • Generating a visualization of data points returned in response to a query based on attributes of a display device and display screen to render the visualization

    US20230033541A1