A flow model-based density map data visual query method and device
By encoding and mapping spatiotemporal data using a streaming model, the problem of large and sparse spatiotemporal data is solved, enabling efficient data querying and analysis.
Patent Information
- Application Number
- CN202510949093.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-07-10
AI Technical Summary
The spatiotemporal data is large in volume and the effective information is sparse, making it difficult for existing technologies to efficiently explore and mine features.
A density map data visualization query method based on a flow model is adopted. The spatiotemporal data is encoded by the flow model in the neural network, and bidirectional mapping is performed using the Haar transform layer and coupling layer to generate the encoded density map data, which can then be visualized and queried.
It significantly reduces space usage, improves the efficiency of aggregation operations, and supports flexible query operations and intuitive visualization analysis.
Smart Images

Figure CN120448430B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a density map data visual query method and device based on a flow model. BACKGROUND
[0002] Spatio-temporal data refers to data containing both time and geographical location information dimensions, such as environmental monitoring data, population statistics data, traffic flow data, etc. Spatio-temporal data is often used to solve problems in the real world. For example, statistics of air quality changes in a certain place within a period of time; selecting a suitable business location for a store; planning public resources in each area of a city, etc. People can choose appropriate spatio-temporal data sets, apply appropriate analysis methods to analyze the spatio-temporal data sets, and draw helpful conclusions.
[0003] However, spatio-temporal data has the characteristics of large data volume and sparse effective information, and existing technologies are difficult to efficiently explore such data and mine features. SUMMARY
[0004] The purpose of the embodiments of the present application is to provide a density map data visual query method and device based on a flow model, which encodes spatio-temporal data through a flow model in a neural network. The result after encoding can significantly reduce the space occupation and can speed up the efficiency of common aggregation operations.
[0005] In a first aspect, a density map data visual query method based on a flow model is provided. The method can include:
[0006] Aggregating spatio-temporal data related to a target area to obtain different data frames; each data frame includes statistical data divided by spatial and temporal dimensions;
[0007] Based on a configured kernel density estimation algorithm, processing the different data frames to generate a density map corresponding to the different data frames and corresponding density map data;
[0008] Inputting the density map data into a trained flow model, the flow model encoding the density map data corresponding to any data frame to obtain an encoding result representing the density map data to a corresponding representation space; the flow model is used to bidirectionally map the input data between the data space and the representation space through a Haar transform layer and a coupling layer;
[0009] After associating and storing the spatio-temporal range related to the data frame and the encoding result, visualizing the stored data set using the trained flow model according to the user input query condition, and displaying the query result to the user; the data set includes the encoding result corresponding to the spatio-temporal range related to the different data frames.
[0010] In a possible implementation, the coupling layer includes an attention mechanism module and a multi-scale feature fusion module.
[0011] The density map data is input into the trained stream model, the stream model encodes the density map data to obtain an encoding result representing the density map data in 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 attention weights corresponding to the low-frequency information and attention weights corresponding to the high-frequency information.
[0014] The multi-scale feature fusion module in the coupling layer fuses the low-frequency information and the high-frequency information using the corresponding attention weights to obtain fusion information.
[0015] The low-frequency information and the fusion information are determined as the encoding result of the representation space data.
[0016] In a possible implementation, the multi-scale feature fusion module in the coupling layer fuses the low-frequency information and the high-frequency information using the corresponding attention weights to obtain fusion information, including:
[0017] The low-frequency information and the high-frequency information are respectively subjected to Fourier transform 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] A preset interaction algorithm is used to operate the first frequency domain representation information and the second frequency domain representation information to obtain interactioned frequency domain representation information.
[0019] Inverse Fourier transform is performed on the interactioned frequency domain representation information to obtain interactioned spatial representation information.
[0020] The low-frequency information and the high-frequency information are weightedly fused based on the attention weights corresponding to the low-frequency information and the attention weights corresponding to the high-frequency information to obtain initial fusion information.
[0021] The fusion information is determined based on the interactioned spatial representation information and the initial fusion information.
[0022] In a possible implementation, the query condition includes a to-be-searched space-time range.
[0023] According to the query condition input by the user, the trained stream model is used to perform visual query on the stored data set, and the query result is displayed to the user, including:
[0024] According to the to-be-searched spatio-temporal range in the query condition, a corresponding target coding result is found from the data set, and the trained flow model is used to decode the target coding result 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 graph.
[0026] In one possible implementation, the query condition further includes a query type.
[0027] After obtaining the corresponding density map data, the method further includes:
[0028] According to the query type, the obtained density map data is processed to obtain processed data.
[0029] A rendered image corresponding to the obtained processed data is displayed to the user.
[0030] In one possible implementation, the query type includes an aggregation query and a similarity query.
[0031] In one possible implementation, the spatio-temporal data related to the target region is aggregated to obtain different data frames, including:
[0032] Spatio-temporal data related to the target region is collected from multiple data sources;
[0033] According to the spatial division of the target region, the spatio-temporal data is grouped according to geographical location, and according to the time division of the target region, the spatio-temporal data is grouped according to time granularity.
[0034] The spatio-temporal data after spatial division and the spatio-temporal data after time division are aggregated to obtain different data frames.
[0035] In a second aspect, a density map data visual query device based on a flow model is provided, which can include:
[0036] An aggregation unit is configured to aggregate spatio-temporal data related to a target region to obtain different data frames; each data frame includes statistical data divided according to spatial dimensions and time dimensions.
[0037] A processing unit is configured to process the different data frames based on a configured kernel density estimation algorithm to generate a density map corresponding to the different data frames and corresponding density map data.
[0038] The acquisition unit is configured to input the density map data into a trained stream model, the stream model is configured to encode the density map data corresponding to any data frame to obtain an encoding result representing the density map data to a corresponding representation space; and the stream model is configured to perform bidirectional mapping between a data space and the representation space through a Haar transform layer and a coupling layer for the input data.
[0039] The query unit is configured to, after storing the spatiotemporal range related to the data frame and the encoding result in association, perform visual query on the stored data set according to a query condition input by a user, using the trained stream model; and the data set includes the encoding result corresponding to the spatiotemporal range related to different data frames.
[0040] The display unit is configured to display the query result to the user.
[0041] In a third aspect, an electronic device is provided, which includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete communication with each other through the communication bus.
[0042] The memory is configured to store a computer program.
[0043] The processor is configured to execute the program stored in the memory to implement the method steps of any one of the first aspect.
[0044] In a fourth aspect, a computer readable storage medium is provided, which stores a computer program, and the computer program is executed by a processor to implement the method steps of any one of the first aspect.
[0045] The method provided by the embodiments of the present application encodes spatiotemporal data related to a target region to obtain different data frames, each data frame includes statistical data divided according to a spatial dimension and a time dimension; processes different data frames based on a configured kernel density estimation algorithm to generate a density map corresponding to each data frame and corresponding density map data; inputs the density map data into a trained stream model, the stream model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data to a corresponding representation space; the stream model is configured to perform bidirectional mapping between a data space and the representation space through a Haar transform layer and a coupling layer for the input data; after storing the spatiotemporal range related to the data frame and the encoding result in association, performs visual query on the stored data set according to a query condition input by a user, using the trained stream model, and displays the query result to the user; and the data set includes the encoding result corresponding to the spatiotemporal range related to different data frames. The method encodes spatiotemporal data through a stream model in a neural network, and the encoding result can significantly reduce space occupation and speed up the efficiency of common aggregation operations. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments of the present application. It should be understood that the following drawings only show some of the embodiments of the present application, and therefore should not be regarded as a limitation on the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0047] Figure 1 A flowchart of a density map data visual query method based on a flow model provided by the embodiments of the present application;
[0048] Figure 2 A structural schematic diagram of a density map data visual query device based on a flow model provided by the embodiments of the present application;
[0049] Figure 3 A structural schematic diagram of an electronic device provided by the embodiments of the present application. DETAILED DESCRIPTION
[0050] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, and not all the embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of the present application. Unless otherwise defined, the technical terms or scientific terms used in the present application should be understood as the general meaning understood by those skilled in the art. The words "first", "second", and similar words used in the present application do not represent any order, number, or importance, but are only used to distinguish different components. The words "include" or "contain" and similar words mean that the elements or objects before the words cover the elements or objects listed after the words and their equivalents, and do not exclude other elements or objects. The words "connect", "couple", or "connect" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect.
[0051] Spatio-temporal data is a complex data type that contains both time and spatial (geographical location) dimensions, such as environmental monitoring (e.g. air quality, weather), population statistics, traffic flow, mobile object trajectories, social media check-ins, Internet of Things sensor network data, etc. Such data is critical to understanding the dynamic world and is widely used to solve real-world problems such as: tracking trends in a specific location (e.g. analyzing the fluctuation of PM2.5 concentration in a city area over a year); optimizing site selection based on historical and real-time patterns (e.g. choosing a location with high foot traffic and less competition for a new retail store); optimizing the configuration of public facilities (hospitals, schools, parks) or services (bus routes, shared bike deployment) based on population distribution, demand prediction, and mobility; identifying hidden correlations, abnormal events (e.g. traffic accident hotspots, disease outbreaks), periodic patterns, etc. The core of solving problems using spatio-temporal data lies in selecting the right dataset and applying appropriate analysis techniques (statistics, mining, modeling, visualization), etc. Due to the massive amount of spatio-temporal data and the sparsity of information, it is difficult for users to effectively traverse and understand the vast data space, and it is also difficult to efficiently identify valuable information from the massive spatio-temporal data.
[0052] To solve the above problems, the application provides a density map data visual query method based on a flow model. By encoding spatio-temporal data through a flow model and learning from data space to representation space, the amount of data processing is reduced while key spatio-temporal features are captured, laying a foundation for efficient access for subsequent queries and analysis. Then, users explore the encoded data through intuitive visual interfaces (e.g. map overlays, timelines, heat maps, etc.) to query specific spatio-temporal patterns or features (e.g. "find all locations and peak periods of traffic congestion in the past week", "show areas with deteriorating air quality"). Visual query takes advantage of human's strong pattern recognition ability, allowing users to efficiently interact with complex encoded results, thereby accelerating the discovery of knowledge and the decision-making process.
[0053] The preferred embodiments of the application are described below in conjunction with the accompanying drawings of the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the application, and are not used to limit the application, and the embodiments in the application and the features in the embodiments can be combined with each other without conflict.
[0054] Figure 1 A flowchart of a density map data visual query method based on a flow model provided by an embodiment of the application is shown in FIG. 1. As shown in FIG. 1, the method can include the following steps. Figure 1
[0055] In step S110, the spatio-temporal data related to the target area is aggregated to obtain different data frames.
[0056] In a specific implementation, spatio-temporal data related to the target area is collected from multiple data sources. The spatio-temporal data can include sensor data (e.g., data from weather stations (temperature, humidity, wind speed, etc.), traffic camera data, pollutant concentration data from environmental monitoring stations, etc.), mobile device data (e.g., location data from smartphones, usage data from mobile applications, etc.), and administrative data (e.g., census data, business activity data, crime record data, etc.). The collected spatio-temporal data is pre-processed (e.g., data cleaning, data standardization, time alignment, etc.).
[0057] Next, the spatio-temporal data is grouped by geographical location according to the spatial division of the target area. For example, if the target area is a city, the spatio-temporal data can be spatially aggregated by different blocks, communities, or administrative divisions. For each region, the statistical characteristics of the spatio-temporal data in the time dimension (e.g., mean, sum, maximum, etc.) are calculated. In addition, the spatio-temporal data is grouped by time granularity according to the time division of the target area. For example, if the time range is one month, the spatio-temporal data can be temporally aggregated by day or by hour, and the data statistical characteristics of the spatio-temporal data in the spatial dimension are calculated for each time unit.
[0058] The spatially divided spatio-temporal data and the temporally divided spatio-temporal data are aggregated to obtain different data frames. Each data frame contains statistical data divided by the spatial and temporal dimensions. For example, one data frame can represent the traffic flow data in a certain block on a certain day, and another data frame can represent the air quality data in a certain community in a certain month.
[0059] It can be understood that each data frame stores data in the form of a table or a matrix, where the rows represent different time units (e.g., hours, days), the columns represent different spatial units (e.g., blocks, administrative divisions), and the values in the cells are the statistical data for the combination of time and space.
[0060] In step S120, different data frames are processed based on the configured kernel density estimation algorithm to generate density maps and corresponding density map data corresponding to different data frames.
[0061] The core parameters of the kernel density estimation (KDE) algorithm include bandwidth and kernel function. In order to ensure that the generated density map can smoothly reflect the distribution of data, while avoiding the problems of over-smoothing or under-smoothing, the kernel density estimation algorithm configured by the present application can automatically select the most suitable kernel function by analyzing the statistical characteristics (such as skewness, kurtosis, etc.) of the statistical data in the data frame, to perform corresponding kernel density estimation processing. For example, for a data frame with Gaussian distribution characteristics, a Gaussian kernel function is preferred; for a data frame with relatively uniform distribution, a uniform kernel function is selected, which is not limited by the present application. Further, bandwidth is a key parameter in kernel density estimation, which determines the smoothness of density estimation. An adaptive bandwidth selection method is used to dynamically adjust the bandwidth according to the spatio-temporal distribution of the data frame. For example, for data-intensive areas, a smaller bandwidth is used to capture local details; for data-sparse areas, 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 a specific implementation, for each data frame, the data at each spatial location and each time point (i.e. one time step) in the data frame can be taken as input, and the kernel density estimation operation is performed through the selected kernel function and the corresponding bandwidth parameter to obtain the density value of each spatio-temporal unit. Based on the density value of each spatio-temporal unit, the density map corresponding to the data frame and the density map data in the density map, i.e. the feature data representing the density map, are obtained.
[0063] Step S130, input the density map data into the trained stream model, and the stream model encodes the density map data corresponding to any data frame to obtain an encoding result representing the density map data in the corresponding representation space.
[0064] The streaming model is used to bidirectionally map input data between the data space and the representation space through Haar transform layers and coupling layers. The streaming model can achieve efficient information compression and reconstruction through the combined structure of Haar transform and coupling layers. Specifically, the streaming model is a reversible generative model that can learn to perform bidirectional mappings 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 streaming model structure mainly consists of two parts: convolutional kernels based on Haar transform and coupling layers. One of the model's goals is that its encoding results can preserve the features of the original density map and 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 parts: the mean and the residual. The mean represents the smoothed original signal, preserving low-frequency information in the original density map, such as the contours and brightness of salient regions. The residual obtained from the Haar transform corresponds to high-frequency features, such as the contours of regions and the gradual details of brightness gradations in the density map. The original density map can be reconstructed losslessly by combining mean and residual information through inverse wavelet transform (IWT). The coupling layer converts the high-frequency information obtained from the Haar transform into a density map-independent distribution, which can then be discarded. When reconstructing the density map, it is randomly sampled from a normal distribution.
[0065] In practice, 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 coupling layer provides the obtained low-frequency information. and high-frequency information The information is merged to obtain the merged information. After that, low-frequency information can be... and integrated information The result is determined to represent the encoding of spatial data.
[0066] The density map dataset is encoded using a streaming model. The trained streaming model is applied to the entire density map dataset to achieve lossy encoding. This encoding process uses a combined structure based on Haar transform and coupling layers. Through model-learned mappings, 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, decomposing it into low-frequency information. and high-frequency information Low-frequency information is transmitted through a coupling layer. and high-frequency information The features are fused to obtain the encoded representation space data. and .in The data needs to be saved, and the results are saved using a lossless compression format, such as PNG. It's important to note that JPEG lossy compression is not used here, as the resulting information loss could cause errors in the decoding result. Through this process, the information of the original density map is effectively compressed and reconstructed, providing an efficient foundation for subsequent queries. It represents the global structure of the density map (such as major hotspots and spatial distribution patterns). It is a low-resolution version of the original data. This represents supplementary information learned through the coupling layer, including structured compression of some high-frequency features. and Together they form an approximation of 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 receives low-frequency information. and high-frequency information Processing is performed 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 process low-frequency information. and high-frequency information The information is merged to obtain the merged information. ; to transfer low-frequency information and integrated information The result is determined to represent the encoding of spatial data.
[0069] Furthermore, the multi-scale feature fusion module in the coupling layer utilizes corresponding attention weights to process low-frequency information. and high-frequency information The fusion process yields the fused information. The methods may include:
[0070] (1) Using the corresponding attention weights, low-frequency information and high-frequency information We perform weighted fusion to obtain the fused information.
[0071] (2) Low-frequency information and high-frequency information In the frequency domain, low-frequency and high-frequency information have different physical meanings and feature distributions. 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 distributions of low-frequency and high-frequency information are inconsistent. Traditional fusion methods often ignore the interaction between frequency domain features and the spatial alignment problem. If low-frequency and high-frequency information are not properly aligned in space, the fused features may introduce noise and reduce the quality of spatial data representation. To address these issues, this application introduces a frequency domain feature interaction and spatial alignment mechanism, with the following specific steps:
[0072] Step 1: Low-frequency information and high-frequency information Perform Fourier transforms on each to obtain low-frequency information. The corresponding first frequency domain representation information Y1 and high frequency information The corresponding second frequency domain representation information Y2; where, before the Fourier transform, the low-frequency information and high-frequency information The data is typically in matrix form in the spatial domain, therefore the corresponding frequency domain representation information is also in matrix form.
[0073] Step 2: Using a preset interactive algorithm, perform operations on the first frequency domain representation information Y1 and the second frequency domain representation information Y2 (e.g., perform 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 the feature complementarity within the frequency domain, especially in regions where low-frequency and high-frequency features overlap.
[0074] Step 3: Perform an 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 weights 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 balancing parameter, and i(x) is the spatial representation information after interaction. This is the initial fusion information.
[0078] Alternatively, after concatenating the spatially represented information after interaction with the initial fused information, feature fusion can be performed through a convolutional layer to obtain the fused information. .
[0079] Furthermore, the balance parameter α is used to control the contributions of the spatially represented information i(x) after interaction and the initial fused information in the final fused 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 the encoding result involved in the data frame, according to the query conditions input by the user, use the trained flow model to perform a 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 the 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 can 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 can also include the query type, which can include an aggregation query and a 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 embodiments of the present application can fully utilize the bidirectional mapping characteristics of the flow model, and the user can perform flexible query operations in the representation space, while being able to quickly backtrack to the original density map from the representation space. The user inputs the query condition, including the query of the demand for specific features, patterns or similarities in the representation space. Fast aggregation query operations are performed in the representation space, and the user can perform maximum, minimum and mean value queries to meet the analysis needs. The query result is reconstructed into the original density map through the inverse process of the flow model.
[0087] In some embodiments, when the amount of data of the spatio-temporal data of a certain data source is small, direct data aggregation may lead to the loss of valuable information or the inability to effectively extract valuable information. In this case, the following strategies are needed to enhance the availability and representativeness of the data while ensuring that the aggregation process can effectively extract valuable information.
[0088] After collecting the spatio-temporal data related to the target area from the data source, if it is detected that the spatio-temporal data is missing at certain time points or spatial regions, the gaps can be filled by interpolation methods to increase the amount of data. The interpolation method can include: (1) Time series interpolation: that is, for missing data in the time dimension, use linear interpolation, spline interpolation or interpolation method based on time series model (such as ARIMA) to fill the data. (2) Spatial interpolation: that is, for missing data in the spatial dimension, use Kriging interpolation (Kriging), inverse distance weighted interpolation (IDW) interpolation method to fill the data.
[0089] (3) Design a quantum neural network for spatio-temporal data interpolation, specifically: encode the features of the spatio-temporal data with less data (such as timestamp, spatial position, data value, etc.) into the quantum state of the quantum bit using quantum encoding technology (such as amplitude encoding, angle encoding). For example, map the data value to the superposition state of the quantum bit and input it into the quantum neural network. The quantum state evolves in the quantum circuit through multiple quantum gate operations (such as CNOT gate), and finally forms an output quantum state. The evolution process of the quantum state simulates the complex patterns and correlations of the spatio-temporal 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 needed to obtain the probability distribution. Decode the quantum measurement result into classical data. According to the probability distribution of the measurement result, calculate the expected value or most likely value of the feature 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 the quantum bit can provide a more powerful computing basis for the interpolation task, thereby improving the accuracy and efficiency of the interpolation.
[0090] In addition, in the actual deployment of the quantum neural network, remote execution of the quantum circuit can be realized through a quantum cloud computing platform to ensure efficient processing of the space-time data interpolation task in a resource-limited environment. The training process of the quantum neural network can adopt a classical-quantum hybrid optimization algorithm, such as a variational quantum algorithm (VQA), to adjust quantum gate parameters by minimizing an interpolation error loss function, thereby improving the model generalization capability. The interpolated data will be seamlessly integrated into the dataset storage as part of the target encoding result and participate in the subsequent query process. When the user performs an aggregation query, the system automatically detects data integrity, and if a missing area is detected, the quantum interpolation module is preferentially called to fill in the data to avoid query distortion; for a similarity query, the representation space characteristics of the flow model can be used to quickly match similar patterns by calculating the cosine similarity or Euclidean distance between the encoding results. The user interface supports custom query parameters such as time window size or spatial resolution, and renders the query results in real time through an interactive heat map, facilitating intuitive analysis of the density distribution trend by the user. At the same time, an error feedback mechanism can be set up, and when an exception occurs in the interpolation or query process, the system automatically reverts to the traditional interpolation method or records logs for debugging, ensuring the robustness and reliability of the overall query system.
[0091] In some embodiments, the query operation supports batch processing mode, and the user can submit multiple query requests at a time, and the system automatically schedules execution based on a priority queue to avoid resource conflicts. After the user inputs the query conditions, the validity of the space-time range can be verified in real time (such as whether the time step is within the coverage of the dataset), and a query execution report can be generated for the user to preview. For an aggregation query, statistical indicators (such as maximum value, minimum value, and mean value) can be directly calculated in the representation space without reconstructing the original density map; the similarity query supports result sorting and filtering functions, and the user can set a similarity threshold to refine the matching results. In addition to heat map or line chart rendering, the query results also provide data export options to facilitate offline analysis by the user. Query history records are automatically saved, and the user can backtrack or reuse previous query parameters to improve analysis efficiency.
[0092] Corresponding to the above method, the embodiments of the present application also provide a density map data visual query device based on a flow model, as shown in Figure 2 The device comprises:
[0093] An aggregation unit 210 is configured to aggregate space-time data related to a target area to obtain different data frames; each data frame comprises statistical data divided according to a spatial dimension and a time dimension;
[0094] A processing unit 220 is configured to process the different data frames based on a configured kernel density estimation algorithm to generate a density map corresponding to the different data frames and corresponding density map data;
[0095] The acquisition unit 230 is used to input the density map data into the trained streaming model. The streaming 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 streaming model is used to perform bidirectional mapping between the data space and the representation space through the Haar transform layer and the coupling layer.
[0096] The query unit 240 is used to perform a visual query on the stored dataset based on the query conditions input by the user, after associating and storing the spatiotemporal range involved in the data frame with the encoding results; the dataset includes the encoding results corresponding to the spatiotemporal ranges involved in different data frames.
[0097] Display unit 250 is used to display the query results to the user.
[0098] The functions of each functional unit of the flow model-based density map data visualization query device provided in the above embodiments of this application can be implemented through the above method steps. Therefore, the specific working process and beneficial effects of each unit in the flow model-based density map data visualization query device provided in the embodiments of this application will not be repeated here.
[0099] This 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 through the communication bus 340.
[0100] Memory 330 is used to store computer programs;
[0101] When the processor 310 executes the program stored in the memory 330, it performs the following steps:
[0102] The spatiotemporal data involved in the target area are aggregated to obtain different data frames; each data frame includes statistical data divided by spatial and temporal dimensions.
[0103] Based on the configured kernel density estimation algorithm, the different data frames are processed to generate density maps and corresponding density map data for the different data frames;
[0104] The density map data is input into the trained streaming model, which 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 streaming 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 by the data frame and the encoding result are stored in association, according to a query condition input by a user, a stored data set is queried and visualized by using a trained flow model, and a query result is displayed to the user; the data set includes the encoding result corresponding to the spatiotemporal range involved by 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, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For the convenience of representation, only one thick line is used in the figure, but it 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 electronic device and other devices.
[0108] The memory can include a Random Access Memory (RAM) and can also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory can also be at least one storage device located away from the aforementioned processor.
[0109] The processor mentioned above can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; can also be a Digital Signal Processing (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component.
[0110] Since the implementation manners and beneficial effects of the electronic device in the above-mentioned embodiments can be achieved by referring to the steps in the embodiments shown in the above-mentioned embodiments, the specific working process and beneficial effects of the electronic device provided by the embodiments of the present application will not be repeated here. Figure 1 The specific working process and beneficial effects of the electronic device provided by the embodiments of the present application will not be repeated here.
[0111] In a further example provided in the present application, a computer readable storage medium is provided, and the computer readable storage medium stores instructions which, when executed on a computer, cause the computer to perform the flow model based density map data visual query method according to any one of the above examples.
[0112] In a further example provided in the present application, a computer program product is provided, and the computer program product contains instructions which, when executed on a computer, cause the computer to perform the flow model based density map data visual query method according to any one of the above examples.
[0113] Those skilled in the art should understand that the examples in the present application can be provided as a method, a system, or a computer program product. Therefore, the examples in the present application can be in the form of an entirely hardware example, an entirely software example, or an example combining software and hardware aspects. Moreover, the examples in the present application can be in the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk memory, CD-ROM, optical memory, etc.) containing computer-usable program code.
[0114] The examples in the present application are described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the examples in the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams 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 produce the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks
[0115] These computer program instructions can also be stored in a computer readable memory capable of directing the computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including instruction devices, which implement the functions specified in the flowcharts and / or block diagrams. Figure 1 The functions specified in a flow or multiple flows and / or blocks Figure 1 The functions specified in a flow or multiple flows and / or blocks
[0116] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are performed on the computer or other programmable device to produce a computer implemented process, so that the instructions executed on the computer or other programmable device provide functions for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1one or more processes and / or blocks Figure 1 the steps of the functions specified in the one or more blocks.
[0117] While the preferred embodiments in the application have been described, additional variations and modifications can be made to the embodiments in the application by those of skill in the art once they have the benefit of the present disclosure without departing from the spirit and scope of the embodiments in the application. Accordingly, the attached claims are intended to embrace all such variations and modifications as fall within the scope of the embodiments in the application.
[0118] It is apparent that a person skilled in the art can make various changes and modifications to the embodiments in the application without departing from the spirit and scope of the embodiments in the application. Thus, it is intended to include these changes and modifications in the scope of the embodiments in the application.
Claims
1. A density map data visualization query method based on a flow model, characterized in that, The method includes: The spatiotemporal data involved in the target area are aggregated to obtain different data frames; each data frame includes statistical data divided by spatial and temporal dimensions. Based on the configured kernel density estimation algorithm, the different data frames are processed to generate density maps and corresponding density map data for the different data frames; The density map data is input into the trained streaming model, which 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 streaming 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 associating and storing the spatiotemporal range involved in the data frame with the encoding result, the trained streaming model is used to perform a visual query on the stored dataset based on the query conditions input by the user, and the query results are displayed to the user; the dataset includes the encoding results corresponding to the spatiotemporal range involved in different data frames.
2. The method as described in claim 1, characterized in that, The coupling layer includes an attention mechanism module and a multi-scale feature fusion module; The density map data is input into a trained streaming model, which encodes the density map data to obtain an encoding result representing the density map data into the corresponding representation space, including: The Haar transform layer decomposes the input density map data to obtain the low-frequency and high-frequency information corresponding to the density map data; The attention mechanism module in the coupling layer processes the obtained low-frequency and high-frequency information to obtain the attention weights corresponding to the low-frequency information and the attention weights corresponding to the high-frequency information. The multi-scale feature fusion module in the coupling layer uses corresponding attention weights to fuse low-frequency and high-frequency information to obtain fused information. Low-frequency information and fused information are used as the encoding results representing spatial data.
3. The method as described in claim 2, characterized in that, The multi-scale feature fusion module in the coupling layer uses corresponding attention weights to fuse low-frequency and high-frequency information to obtain fused information, including: Perform Fourier transforms on the low-frequency information and the high-frequency information respectively to obtain the first frequency domain representation information corresponding to the low-frequency information and the second frequency domain representation information corresponding to the high-frequency information; A preset interactive algorithm is used to process the first frequency domain representation information and the second frequency domain representation information to obtain the interactive frequency domain representation information; Perform an inverse Fourier transform on the frequency domain representation information after interaction to obtain the spatial representation information after interaction; Based on the attention weights corresponding to low-frequency information and high-frequency information, the low-frequency information and high-frequency information are weighted and fused to obtain the initial fused information. Based on the spatial representation information after the interaction and the initial fusion information, the fusion information is determined.
4. The method as described in claim 1, characterized in that, The query criteria include the spatiotemporal range to be queried; Based on the user's input query criteria, a trained streaming model is used to perform a visual query on the stored dataset, and the query results are displayed to the user, including: Based on the spatiotemporal range to be queried in the query conditions, the corresponding target encoding result is found in the dataset, and the trained stream model is used to decode the target encoding result to obtain the corresponding density map data. The user is shown a rendered image corresponding to the obtained density map data; the rendered image includes a heatmap or a line graph.
5. The method as described in claim 4, characterized in that, The query criteria also include the query type; After obtaining the corresponding density map data, the method further includes: Based on the query type, the obtained density map data is processed to obtain the processed data; The user is then shown the rendered image corresponding to the processed data.
6. The method as described in claim 5, characterized in that, The query types include aggregate queries and similarity queries.
7. The method as described in claim 1, characterized in that, The spatiotemporal data involved in the target area are aggregated to obtain different data frames, including: Spatiotemporal data related to the target area are collected from multiple data sources; Based on the spatial division of the target area, the spatiotemporal data are grouped by geographical location. At the same time, based on the temporal division of the target area, the spatiotemporal data are grouped by time granularity. The spatially divided spatiotemporal data and the temporally divided spatiotemporal data are aggregated to obtain different data frames.
8. A density map data visualization query device based on a flow model, characterized in that, The device includes: The aggregation unit is used to aggregate spatiotemporal data related to the target area to obtain different data frames; each data frame includes statistical data divided by spatial and temporal dimensions. The processing unit is used to process the different data frames based on the configured kernel density estimation algorithm to generate density maps and corresponding density map data for the different data frames. The acquisition unit is used to input the density map data into the trained streaming model. The streaming 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 streaming model is used to perform bidirectional mapping between the data space and the representation space through the Haar transform layer and the coupling layer. The query unit is used to perform a visual query on the stored dataset based on the query conditions input by the user, after associating and storing the spatiotemporal range involved in the data frame with the encoding results; the dataset includes the encoding results corresponding to the spatiotemporal ranges involved in different data frames; The display unit is used to show the query results 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 through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method of any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.
Citation Information
Patent Citations
Spatio-temporal data flow model self-enhancement method
CN113779169A
Geographic information visual recommendation method based on hidden space coding
CN115438276A