Urban environmental risk area prediction method and system based on multi-dimensional dynamic visualization
Through the multi-dimensional dynamic visualization method, we analyze and model urban multi-dimensional data, extract key environmental characteristics and risk factors, and construct a risk scatter matrix diagram, which solves the problem of failing to predict environmental risk areas in time in the existing technology and improves urban environmental risks. Timeliness and accuracy of forecasts.
Patent Information
- Application Number
- CN202411041547.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2044-07-31
AI Technical Summary
Existing urban environmental risk area prediction methods fail to fully exploit the correlation between multi-source environmental data, resulting in the inability to predict some environmental risk areas in a timely manner.
Using a method based on multi-dimensional dynamic visualization, by acquiring urban multi-dimensional data and historical risk events, using spatio-temporal data models for spatio-temporal fusion, distributed storage of data, using the Seaborn tool to analyze data distribution and correlation, extract key environmental features, and establish a risk analysis model , calculate SHAP values, determine key environmental risk factors, and construct a risk scatter matrix diagram for dynamic visualization.
It improves the timeliness of prediction of urban environmental risk areas, helps decision makers better understand risk distribution and characteristics, and provides support for urban planning and management.
Smart Images

Figure CN118569651B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of environmental science, and in particular to a method and system for predicting urban environmental risk areas based on multi-dimensional dynamic visualization. Background Art
[0002] Urban environmental risk area prediction refers to the use of various data analysis and modeling techniques to predict areas in cities where environmental risks (such as air pollution, floods, earthquakes, traffic jams, etc.) may occur. This prediction can help city managers, decision makers, and emergency response teams better understand, prepare for, and respond to possible risks, thereby reducing the potential impact of these risks on urban residents and infrastructure.
[0003] At present, the prediction of urban environmental risk areas is mainly carried out by collecting environmental data through sensor equipment installed in various areas of the city. When the environmental indicators of the collected environmental data exceed the preset risk environmental indicator threshold, a risk warning is issued. This method only detects environmental indicators of the data collected by each sensor device, and does not fully explore the correlation between the multi-source environmental data of the city. Some environmental risks may be affected by multiple factors, which leads to a large number of urban environmental risk areas cannot be predicted in a timely manner. Summary of the invention
[0004] The present invention provides a method and system for predicting urban environmental risk areas based on multi-dimensional dynamic visualization, the main purpose of which is to improve the timeliness of predicting urban environmental risk areas.
[0005] To achieve the above object, the present invention provides a method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization, comprising:
[0006] Acquire urban multidimensional data and historical risk events of the city to be inspected, use a preset spatiotemporal data model to perform spatiotemporal fusion on the urban multidimensional data to obtain fused multidimensional data, and perform distributed storage on the fused multidimensional data to obtain distributed multidimensional data;
[0007] Analyze the data distribution and correlation of the distributed multidimensional data using a preset Seaborn tool, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation;
[0008] Identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, calculate the factor SHAP value of the environmental risk factor using the risk analysis model, and determine the key environmental risk factors of the environmental risk factor based on the factor SHAP value;
[0009] Based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data, an environmental detection model of the city to be detected is established;
[0010] Construct a real-time data iteration library of the city to be detected, based on the real-time data iteration library, use the environmental detection model to analyze the risk area and risk coefficient of the city to be detected, based on the risk area and the risk coefficient, construct a risk scatter matrix diagram of the city to be detected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk area of the city to be detected.
[0011] Optionally, the using a preset spatiotemporal data model to perform spatiotemporal fusion on the city multidimensional data to obtain fused multidimensional data includes:
[0012] identifying a model type of the spatiotemporal data model;
[0013] Based on the model type, determining model dimensions of the spatiotemporal data model, wherein the model dimensions include model time, model space, and model attributes;
[0014] Based on the model dimensions, construct a data mapping method for the city's multidimensional data;
[0015] Based on the data mapping method, organizing the corresponding structure of the city multidimensional data;
[0016] Based on the corresponding structure, the city multidimensional data is fused in time and space to obtain the fused multidimensional data.
[0017] Optionally, the method for constructing a data mapping method of the city multidimensional data based on the model dimension includes:
[0018] Based on the model dimension, the urban multidimensional data is spatiotemporally labeled to obtain urban spatiotemporal data;
[0019] The spatiotemporal pattern of the urban spatiotemporal data is calculated using the following formula:
[0020] ;
[0021] in, represents the spatiotemporal pattern of urban spatiotemporal data, represents the pattern recognition function, Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates the quantity of urban spatiotemporal data;
[0022] Based on the spatiotemporal model, a data mapping method for the urban multidimensional data is constructed.
[0023] Optionally, analyzing the data distribution and correlation of the distributed multidimensional data using a preset Seaborn tool includes:
[0024] Configure the Seaborn environment for the distributed multidimensional data;
[0025] Construct a DataFrame dataset of the distributed multidimensional data;
[0026] In the Seaborn environment, construct a KDE curve of the DataFrame data set using the kdeplot function corresponding to the Seaborn tool;
[0027] Analyzing data distribution of the distributed multidimensional data based on the KDE curve;
[0028] In the Seaborn environment, using the pairplot function corresponding to the Seaborn tool to draw a box plot of the DataFrame data set;
[0029] Based on the box plot, the correlation of the distributed multidimensional data is analyzed.
[0030] Optionally, in the Seaborn environment, constructing a KDE curve of the DataFrame data set using a kdeplot function corresponding to the Seaborn tool includes:
[0031] Analyze the estimated smoothness requirement of the DataFrame dataset;
[0032] Determining a KDE bandwidth of the DataFrame data set based on the estimated smoothness requirement;
[0033] Based on the KDE bandwidth, the kernel density estimate of the DataFrame dataset is calculated using the following formula:
[0034] ;
[0035] in, Indicates at point The kernel density estimate at , represents the points on the x-axis used to calculate the kernel density estimate, Indicates the number of DataFrame datasets, represents the KDE bandwidth, represents the kernel function, Represents the DataFrame dataset The observed value of data points;
[0036] The KDE curve of the DataFrame data set is constructed using the kernel density estimate.
[0037] Optionally, extracting key environmental features of the distributed multidimensional data based on the data distribution and the correlation includes:
[0038] Based on the data distribution and the correlation, extracting initial environmental features of the distributed multidimensional data;
[0039] Standardizing the initial environmental characteristics to obtain standardized environmental characteristics;
[0040] Importing the standardized environmental characteristics into a preset factor analysis library, and configuring the factor parameters of the factor analysis library;
[0041] Based on the factor parameters, extracting characteristic factors of the standardized environmental characteristics using the factor analysis model corresponding to the factor analysis library;
[0042] Constructing a factor loading matrix of the characteristic factors;
[0043] Based on the factor loading matrix, key environmental features of the standardized environmental features are constructed.
[0044] Optionally, extracting characteristic factors of the standardized environmental characteristics based on the factor parameters using a factor analysis model corresponding to the factor analysis library includes:
[0045] Based on the factor parameters, configuring the factor analysis model to obtain a configured factor analysis model;
[0046] Using the configuration factor analysis model to fit the standardized environmental characteristics, to obtain fitted environmental characteristics;
[0047] Extracting feature latent dimensions of the fitting environment features;
[0048] Based on the feature potential dimension, a feature factor of the fitting environment feature is determined.
[0049] Optionally, calculating the factor SHAP value of the environmental risk factor using the risk analysis model includes:
[0050] Identify a decision tree structure corresponding to the decision tree of the risk analysis model;
[0051] Based on the decision tree structure, determining the number of decision trees and leaf nodes of the risk analysis model;
[0052] Based on the number of decision trees and the tree leaf nodes, the factor SHAP value of the environmental risk factor is calculated using the following formula:
[0053] ;
[0054] in, Environmental risk factors The factor SHAP value of represents the number of decision trees of the risk analysis model, Represents the risk analysis model The set of decision tree leaf nodes of a decision tree, represents the indicator function, when and When the nodes are in the same decision tree leaf, it is 1, otherwise it is 0. The risk analysis model is Environmental risk factors on decision trees The predicted value of The risk analysis model is The average prediction of the leaf nodes of a decision tree.
[0055] Optionally, constructing a risk scatter matrix diagram of the city to be inspected based on the risk area and the risk coefficient includes:
[0056] Constructing a three-dimensional coordinate system of the city to be detected in the environment;
[0057] identifying risk boundaries of the risk area;
[0058] Based on the risk boundary, constructing a risk coordinate map of the city to be inspected in the three-dimensional city coordinate system;
[0059] Based on the risk coefficient, marking the color of the coordinate graph of the risk coordinate graph;
[0060] The risk coordinate map and the color of the coordinate map are interpreted to obtain a scatter matrix map of the interpreted risks of the city to be tested;
[0061] Detecting the visual consistency coefficient of the risk interpretation scatter matrix diagram;
[0062] When the visual consistency coefficient meets the preset visual consistency threshold, the interpreted risk scatter matrix diagram is used as the risk scatter matrix diagram of the city to be detected.
[0063] To achieve the above object, the present invention also provides an urban environmental risk area prediction system based on multi-dimensional dynamic visualization, comprising:
[0064] A multidimensional data processing module is used to obtain the city multidimensional data and historical risk events of the city to be detected, perform spatiotemporal fusion on the city multidimensional data using a preset spatiotemporal data model to obtain fused multidimensional data, and perform distributed storage on the fused multidimensional data to obtain distributed multidimensional data;
[0065] An environmental feature extraction module is used to analyze the data distribution and correlation of the distributed multidimensional data using a preset Seaborn tool, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation;
[0066] A risk factor identification module is used to identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, calculate the factor SHAP value of the environmental risk factor using the risk analysis model, and determine the key environmental risk factors of the environmental risk factor based on the factor SHAP value;
[0067] An environmental detection model building module is used to build an environmental detection model of the city to be detected based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data;
[0068] The urban risk area identification module is used to construct a real-time data iteration library of the city to be detected, based on the real-time data iteration library, use the environmental detection model to analyze the risk area and risk coefficient of the city to be detected, based on the risk area and the risk coefficient, construct a risk scatter matrix diagram of the city to be detected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk areas of the city to be detected.
[0069] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:
[0070] a memory storing at least one instruction; and
[0071] The processor executes the instructions stored in the memory to implement the above-mentioned urban environmental risk area prediction method based on multi-dimensional dynamic visualization.
[0072] In order to solve the above problems, the present invention also provides a computer-readable storage medium, which stores at least one instruction, and the at least one instruction is executed by a processor in an electronic device to implement the above-mentioned urban environmental risk area prediction method based on multi-dimensional dynamic visualization.
[0073] The present invention uses a preset spatiotemporal data model to analyze the spatiotemporal dimension of the urban multidimensional data to analyze data characteristics and prepare for later data fusion; the present invention performs distributed storage on the fused multidimensional data to obtain distributed multidimensional data, which can improve data security, and can simultaneously process the data of the distributed storage nodes, thereby improving data processing efficiency; the present invention uses a preset Seaborn tool to analyze the data distribution and correlation of the distributed multidimensional data to provide a basis for subsequent data analysis and modeling; further, based on the data distribution and the correlation, the present invention extracts the key environmental features of the distributed multidimensional data, which can retain most of the information of the original features and reduce the number of features, thereby improving the efficiency of later analysis and modeling; the present invention uses the risk analysis model to calculate the factor SHAP value of the environmental risk factor, which can be used as a basis for later identification of key environmental risk factors. Finally, based on the risk area and the risk coefficient, the present invention constructs a risk scatter matrix diagram of the city to be detected to help decision makers better understand the distribution and characteristics of urban environmental risks, and provide support for urban planning and management. Therefore, the present invention can improve the timeliness of urban environmental risk area prediction. BRIEF DESCRIPTION OF THE DRAWINGS
[0074] Figure 1 A schematic diagram of a process flow of a method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization provided by an embodiment of the present invention;
[0075] Figure 2 A functional module diagram of an urban environmental risk area prediction system based on multi-dimensional dynamic visualization provided by an embodiment of the present invention;
[0076] Figure 3 A schematic diagram of the structure of an electronic device for implementing the urban environmental risk area prediction method based on multi-dimensional dynamic visualization provided by an embodiment of the present invention.
[0077] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0078] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0079] The embodiment of the present application provides a method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization. The execution subject of the method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0080] Reference Figure 1 FIG. 1 is a flow chart of a method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization according to an embodiment of the present invention. In this embodiment, the method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization includes:
[0081] S1. Obtain urban multidimensional data and historical risk events of the city to be inspected, use a preset spatiotemporal data model to perform spatiotemporal fusion on the urban multidimensional data to obtain fused multidimensional data, and perform distributed storage on the fused multidimensional data to obtain distributed multidimensional data.
[0082] The urban multidimensional data refers to various types of data collected in the urban environment. These data can be obtained from different sources (IoT devices, satellite remote sensing, social media, etc.) and usually contain multiple dimensions or attributes. These data may include real-time monitoring data, such as air quality index (AQI), noise level, water quality parameters, soil pollution indicators, etc.; static data, such as land use type, building density, transportation network layout; and socio-economic data, such as demographics, economic activities, infrastructure, etc. The historical risk events refer to specific events related to environmental risks that occur in the urban environment. These events may have a negative impact on the urban environment and residents' health. These events may include air pollution events, floods, earthquakes, fires, traffic accidents, etc.
[0083] The present invention uses a preset spatiotemporal data model to analyze the spatiotemporal dimension of the urban multidimensional data to analyze data characteristics and prepare for subsequent data fusion.
[0084] In detail, the using of a preset spatiotemporal data model to perform spatiotemporal fusion on the city multidimensional data to obtain fused multidimensional data includes:
[0085] identifying a model type of the spatiotemporal data model;
[0086] Based on the model type, determining model dimensions of the spatiotemporal data model, wherein the model dimensions include model time, model space, and model attributes;
[0087] Based on the model dimensions, construct a data mapping method for the city's multidimensional data;
[0088] Based on the data mapping method, organizing the corresponding structure of the city multidimensional data;
[0089] Based on the corresponding structure, the city multidimensional data is fused in time and space to obtain the fused multidimensional data.
[0090] Among them, the model type refers to the type of spatiotemporal data model, and the model type can be a spatiotemporal cube. The model time refers to the organization of data in the time dimension, including timestamps, time intervals, time series, etc. The model space refers to the organization of data in the spatial dimension, including geographic location, spatial grid, spatial object, etc. The model attribute refers to the organization of data in the attribute dimension, including various environmental indicators, socio-economic indicators, etc. The data mapping method refers to the method of mapping original multidimensional data to a spatiotemporal data model, including data aggregation, data slicing, data projection, etc. The corresponding structure refers to the data organization structure in the spatiotemporal data model constructed according to the data mapping method, such as slices of the spatiotemporal cube, points or time periods of the spatiotemporal sequence, nodes and edges of the spatiotemporal network, etc. The spatiotemporal dimension refers to the time and space dimensions of urban multidimensional data.
[0091] Furthermore, the data mapping method for constructing the model dimension can be written in Python using Pandas and GeoPandas.
[0092] In detail, the data mapping method for constructing the city multidimensional data based on the model dimension includes:
[0093] Based on the model dimension, the urban multidimensional data is spatiotemporally labeled to obtain urban spatiotemporal data;
[0094] The spatiotemporal pattern of the urban spatiotemporal data is calculated using the following formula:
[0095] ;
[0096] in, represents the spatiotemporal pattern of urban spatiotemporal data, represents the pattern recognition function, Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates the quantity of urban spatiotemporal data;
[0097] Based on the spatiotemporal model, a data mapping method for the urban multidimensional data is constructed.
[0098] The urban spatiotemporal data refers to a multidimensional urban data set distributed in time and space, which includes various data collected in different areas of the city and at different time points, such as air quality, noise level, traffic flow, etc. For example, if the analysis is about air quality, then It may refer to the PM2.5 concentration at a monitoring station in area A of a city on January 1, 2021. If the analysis is about urban economic development, then It may refer to an economic indicator located in area A of city on January 1, 2021, such as GDP per capita; the spatiotemporal pattern refers to a law or pattern that appears in time and space, which may reflect the trend of urban environmental changes, periodic fluctuations, spatial distribution characteristics, etc. The pattern recognition function refers to a mathematical function or algorithm used to identify spatiotemporal patterns from urban spatiotemporal data.
[0099] The present invention performs distributed storage on the fused multidimensional data to obtain distributed multidimensional data, which can improve the security of the data and can simultaneously process the data of the distributed storage nodes, thereby improving the processing efficiency of the data. The distributed multidimensional data refers to data sets distributed in multiple physical locations, which can be composed of multiple different data sources. Specifically, the distributed multidimensional data can be stored through a relational database (such as MySQL, PostgreSQL) or a NoSQL database.
[0100] S2. Analyze the data distribution and correlation of the distributed multidimensional data using the preset Seaborn tool, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation.
[0101] The present invention uses the preset Seaborn tool to analyze the data distribution and correlation of the distributed multidimensional data to provide a basis for subsequent data analysis and modeling.
[0102] In detail, the use of the preset Seaborn tool to analyze the data distribution and correlation of the distributed multidimensional data includes:
[0103] Configure the Seaborn environment for the distributed multidimensional data;
[0104] Construct a DataFrame dataset of the distributed multidimensional data;
[0105] In the Seaborn environment, construct a KDE curve of the DataFrame data set using the kdeplot function corresponding to the Seaborn tool;
[0106] Analyzing data distribution of the distributed multidimensional data based on the KDE curve;
[0107] In the Seaborn environment, using the pairplot function corresponding to the Seaborn tool to draw a box plot of the DataFrame data set;
[0108] Based on the box plot, the correlation of the distributed multidimensional data is analyzed.
[0109] Among them, the Seaborn environment refers to an environment in which the Seaborn library is installed in the Python environment, the DataFrame dataset refers to a data structure created using the Pandas library, which contains multidimensional data, and the DataFrame is usually composed of rows and columns, where rows represent observations and columns represent different features or variables. The kdeplot function refers to a function in the Seaborn library, which is used to draw a kernel density estimation (KDE) curve, which can help us estimate the probability density function of the data and visualize the distribution of the data. The KDE curve refers to a curve of the probability density function calculated by the kernel density estimation method. The data distribution refers to the distribution of data on a certain feature. The pairplot function refers to a function in the Seaborn library, which is used to draw a box plot containing multidimensional data. The box plot refers to a statistical graph used to display data distribution. The box plot includes a box (consisting of upper and lower quartiles and box lines) and an outlier marker. The correlation refers to the degree of correlation between two features. By analyzing the box plot, the correlation between different features can be understood, such as positive correlation, negative correlation, and irrelevance.
[0110] Furthermore, in the Seaborn environment, the KDE curve of the DataFrame data set is constructed using the kdeplot function corresponding to the Seaborn tool, including:
[0111] Analyze the estimated smoothness requirement of the DataFrame dataset;
[0112] Determining a KDE bandwidth of the DataFrame data set based on the estimated smoothness requirement;
[0113] Based on the KDE bandwidth, the kernel density estimate of the DataFrame dataset is calculated using the following formula:
[0114] ;
[0115] in, Indicates at point The kernel density estimate at , represents the points on the x-axis used to calculate the kernel density estimate, Indicates the number of DataFrame datasets, represents the KDE bandwidth, represents the kernel function, Represents the DataFrame dataset The observed value of data points;
[0116] The KDE curve of the DataFrame data set is constructed using the kernel density estimate.
[0117] Among them, the estimated smoothness requirement refers to the requirement for the smoothness of the density curve estimated by distributed multidimensional data. Smoothness refers to the degree of continuity of the density curve between data points, that is, the degree of change of the curve near the data points. The KDE bandwidth is used to determine the parameter of the smoothness of the kernel density estimation. The larger the bandwidth, the smoother the estimated density function; the smaller the bandwidth, the sharper the estimated density function. Selecting a suitable bandwidth is a key step in KDE, which is usually determined by cross-validation, Silverman's rule and other methods. The kernel density estimate refers to the use of a kernel function to estimate the density value of a data point at a certain point (usually a point on the x-axis). In kernel density estimation, each data point is regarded as the center point of a kernel density estimate, and then the density value of the target point is estimated by calculating the contribution of each center point at the target point. The kernel function refers to the function used to define the shape of the Gaussian kernel. Commonly used kernel functions include Gaussian kernel, Epanechnikov kernel, Biweight kernel and other functions.
[0118] Based on the data distribution and the correlation, the present invention extracts key environmental features of the distributed multidimensional data, which can retain most of the information of the original features while reducing the number of features, thereby improving the efficiency of subsequent analysis and modeling.
[0119] In detail, extracting key environmental features of the distributed multidimensional data based on the data distribution and the correlation includes:
[0120] Based on the data distribution and the correlation, extracting initial environmental features of the distributed multidimensional data;
[0121] Standardizing the initial environmental characteristics to obtain standardized environmental characteristics;
[0122] Importing the standardized environmental characteristics into a preset factor analysis library, and configuring the factor parameters of the factor analysis library;
[0123] Based on the factor parameters, extracting characteristic factors of the standardized environmental characteristics using the factor analysis model corresponding to the factor analysis library;
[0124] Constructing a factor loading matrix of the characteristic factors;
[0125] Based on the factor loading matrix, key environmental features of the standardized environmental features are constructed.
[0126] Among them, the initial environmental features refer to the unprocessed features directly extracted from the original data, which represent the basic properties and information of the data. The standardized environmental features refer to the features after the initial environmental features are standardized, with the purpose of scaling the values of all features to the same range so that each feature has the same dimension. The factor analysis library refers to a software library or tool set for performing factor analysis, such as the FactorAnalysis class in scikit-learn. The factor parameters refer to the parameters that need to be set during the factor analysis process, such as the number of retained factors (n_components), which determines the number of key features finally extracted. The factor analysis model refers to the factor analysis algorithm configured according to the factor parameters, which is used to extract characteristic factors from the standardized environmental features. The characteristic factors refer to the latent dimensions extracted from the standardized environmental features, which can explain most of the variation of the original features. The factor loading matrix refers to the correlation coefficient matrix between each characteristic factor and the original features, which shows how each characteristic factor explains the original features. The key environmental features refer to the most important characteristic factors extracted through the factor loading matrix, which represent the key information in the data that is most relevant to the target environmental features.
[0127] Furthermore, based on the factor parameters, extracting characteristic factors of the standardized environmental characteristics using the factor analysis model corresponding to the factor analysis library includes:
[0128] Based on the factor parameters, configuring the factor analysis model to obtain a configured factor analysis model;
[0129] Using the configuration factor analysis model to fit the standardized environmental characteristics, to obtain fitted environmental characteristics;
[0130] Extracting feature latent dimensions of the fitting environment features;
[0131] Based on the feature potential dimension, a feature factor of the fitting environment feature is determined.
[0132] Among them, the configured factor analysis model refers to the factor analysis model configured by the factor parameters, including the configuration of parameters such as the number of retained factors (n_components) and the regularization parameter (reg); the fitted environmental features refer to fitting the standardized environmental features using the configured factor analysis model to generate a set of new features; the feature latent dimensions refer to the latent dimensions represented by the feature factors extracted from the fitting environment.
[0133] S3. Identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, calculate the factor SHAP value of the environmental risk factor using the risk analysis model, and determine the key environmental risk factors of the environmental risk factor based on the factor SHAP value.
[0134] It should be explained that the environmental risk factors refer to those factors or variables that may cause potential harm or negative impact on the environment. These factors can be natural factors, such as geological conditions, climatic conditions, etc., or they can be man-made factors, such as industrial emissions, traffic flow, urban planning, etc.
[0135] The risk analysis model refers to a model for analyzing the historical risk events of the city to be detected in the environment. In detail, the establishment of the risk analysis model includes cleaning the collected historical risk event data and processing missing values, outliers and duplicate records. Perform data conversion, such as normalization and standardization, to meet the requirements of the risk analysis model, extract time features (such as seasonal features), spatial features (such as geographical location, land use type) and attribute features (such as pollution level, economic indicators) from the pre-processed historical risk event data, apply data transformation techniques (such as standardization and normalization) to improve the distribution of features, select a suitable statistical model, and train the statistical model through the extracted time features, spatial features and attribute features.
[0136] The present invention uses the risk analysis model to calculate the factor SHAP value of the environmental risk factor, which can be used as a basis for later identification of key environmental risk factors.
[0137] In detail, the step of calculating the factor SHAP value of the environmental risk factor using the risk analysis model includes:
[0138] Identify a decision tree structure corresponding to the decision tree of the risk analysis model;
[0139] Based on the decision tree structure, determining the number of decision trees and leaf nodes of the risk analysis model;
[0140] Based on the number of decision trees and the tree leaf nodes, the factor SHAP value of the environmental risk factor is calculated using the following formula:
[0141] ;
[0142] in, Environmental risk factors The factor SHAP value of represents the number of decision trees of the risk analysis model, Represents the risk analysis model The set of decision tree leaf nodes of a decision tree, represents the indicator function, when and When the nodes are in the same decision tree leaf, it is 1, otherwise it is 0. The risk analysis model is Environmental risk factors on decision trees The predicted value of The risk analysis model is The average prediction of the leaf nodes of a decision tree.
[0143] The decision tree structure refers to a tree structure used for classification or regression, the number of decision trees refers to the number of decision trees constructed, the decision tree leaf nodes are the bottom-level nodes in the tree, the factor SHAP value measures the contribution of each environmental risk factor to a specific prediction, the indicator function is a binary function that returns 1 when the condition is true and 0 otherwise, and the environmental risk factor The predicted value refers to the prediction result of the model for a specific environmental risk factor (such as pollution level, economic indicator, etc.), and the predicted average value refers to the average value of the prediction result of the model for a specific environmental risk factor (such as pollution level, economic indicator, etc.).
[0144] In detail, based on the factor SHAP value, the key environmental risk factor of the environmental risk factor can be determined by selecting the environmental risk factor whose factor SHAP value meets the preset SHAP value threshold as the key environmental risk factor. Wherein, the SHAP value threshold refers to the threshold for evaluating whether the environmental risk factor is a key environmental risk factor, and the key environmental risk factor refers to the environmental influencing factor that has a significant impact on the environment of the city to be tested, such as weather, engineering and other factors.
[0145] S4. Based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data, an environmental detection model of the city to be detected is established.
[0146] In detail, the establishing of the environmental detection model of the city to be detected based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multidimensional data includes establishing a model training data set for the city to be detected based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multidimensional data, extracting training features of the data set of the model training data set, selecting a neural network model for the city to be detected, training the neural network model through the model training data set and the training features, and obtaining the environmental detection model of the city to be detected.
[0147] S5. Construct a real-time data iteration library for the city to be inspected, and based on the real-time data iteration library, use the environmental detection model to analyze the risk areas and risk coefficients of the city to be inspected, and based on the risk areas and the risk coefficients, construct a risk scatter matrix diagram for the city to be inspected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk areas of the city to be inspected.
[0148] It should be explained that the real-time data iteration library refers to a library used to update the environmental data of the city to be inspected in real time. The real-time data iteration library can ensure that the data input into the environmental detection model is the latest data of the city to be inspected, thereby improving the reliability and timeliness of risk detection of the urban risk area model.
[0149] In detail, the real-time data updated by the real-time data iteration library is uploaded to the environmental detection model to output the risk area and the risk coefficient. The risk area refers to areas in the city where environmental risks may exist, and these areas may be associated with specific environmental risk factors (such as pollution sources, areas susceptible to natural disasters, etc.). The risk coefficient refers to the size or intensity of the environmental risk, usually expressed as a numerical value.
[0150] Based on the risk areas and the risk coefficients, the present invention constructs a risk scatter matrix diagram of the city to be tested to help decision makers better understand the distribution and characteristics of urban environmental risks and provide support for urban planning and management.
[0151] In detail, the risk scatter matrix diagram of the city to be inspected is constructed based on the risk area and the risk coefficient, including:
[0152] Constructing a three-dimensional coordinate system of the city to be detected in the environment;
[0153] identifying risk boundaries of the risk area;
[0154] Based on the risk boundary, constructing a risk coordinate map of the city to be inspected in the three-dimensional city coordinate system;
[0155] Based on the risk coefficient, marking the color of the coordinate graph of the risk coordinate graph;
[0156] The risk coordinate map and the color of the coordinate map are interpreted to obtain a scatter matrix map of the interpreted risks of the city to be tested;
[0157] Detecting the visual consistency coefficient of the risk interpretation scatter matrix diagram;
[0158] When the visual consistency coefficient meets the preset visual consistency threshold, the interpreted risk scatter matrix diagram is used as the risk scatter matrix diagram of the city to be detected.
[0159] Among them, the three-dimensional urban coordinate system refers to a coordinate system containing three dimensions, which is usually used to represent the location information in the city. The three dimensions usually include longitude, latitude and an additional dimension (such as floor height). The risk boundary refers to the boundary of the risk area in the city. The risk coordinate map is a location map of the risk area constructed in the three-dimensional urban coordinate system. It shows the distribution of the risk area in the three-dimensional space. The color of the coordinate map refers to the color marking of the risk area in the risk coordinate map according to the risk coefficient. Different colors may represent different risk coefficient ranges. The interpreted risk scatter matrix map refers to the risk scatter matrix map obtained after interpreting the risk coordinate map and the color of the coordinate map. It contains information on the distribution and risk coefficient of the risk area. The visual consistency coefficient refers to an indicator that measures the visualization effect of the risk scatter matrix map, which reflects the readability and consistency of the graph. The visual consistency threshold refers to a preset visual consistency coefficient threshold, which is used to determine whether the visualization effect of the interpreted risk scatter matrix map meets the requirements. The risk scatter matrix map refers to the risk scatter matrix map of the city to be detected as the environment. It contains information on the location and risk coefficient of all risk areas in the city.
[0160] Furthermore, based on the risk boundary, in the three-dimensional coordinate system of the city, a risk coordinate map of the city to be inspected in the environment is constructed, and the risk coordinate map can be created and displayed in the three-dimensional coordinate system through data visualization tools such as Tableau, Power BI, Qlik and other tools.
[0161] Based on the risk scatter matrix diagram, the dynamic visualization of the risk area corresponding to the city to be detected in the environment can be realized. A dynamic interactive component of the risk scatter matrix diagram can be constructed to realize user interaction (zoom in, zoom out, swipe). In detail, the dynamic interactive component can be realized through Web technology, graphical user interface (GUI) library and framework technology.
[0162] The present invention uses a preset spatiotemporal data model to analyze the spatiotemporal dimension of the urban multidimensional data to analyze data characteristics and prepare for later data fusion; the present invention performs distributed storage on the fused multidimensional data to obtain distributed multidimensional data, which can improve data security, and can simultaneously process the data of the distributed storage nodes, thereby improving data processing efficiency; the present invention uses a preset Seaborn tool to analyze the data distribution and correlation of the distributed multidimensional data to provide a basis for subsequent data analysis and modeling; further, based on the data distribution and the correlation, the present invention extracts the key environmental features of the distributed multidimensional data, which can retain most of the information of the original features and reduce the number of features, thereby improving the efficiency of later analysis and modeling; the present invention uses the risk analysis model to calculate the factor SHAP value of the environmental risk factor, which can be used as a basis for later identification of key environmental risk factors. Finally, based on the risk area and the risk coefficient, the present invention constructs a risk scatter matrix diagram of the city to be detected to help decision makers better understand the distribution and characteristics of urban environmental risks, and provide support for urban planning and management. Therefore, the present invention can improve the timeliness of urban environmental risk area prediction.
[0163] like Figure 2 The figure shows a functional module diagram of an urban environmental risk area prediction system based on multi-dimensional dynamic visualization provided by an embodiment of the present invention.
[0164] The urban environmental risk area prediction system 100 based on multi-dimensional dynamic visualization of the present invention can be installed in an electronic device. According to the functions implemented, the urban environmental risk area prediction system 100 based on multi-dimensional dynamic visualization may include a multi-dimensional data processing module 101, an environmental feature extraction module 102, a risk factor identification module 103, an environmental detection model construction module 104 and an urban risk area identification module 105. The module of the present invention may also be referred to as a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.
[0165] The multidimensional data processing module 101 is used to obtain the city multidimensional data and historical risk events of the city to be detected, perform spatiotemporal fusion on the city multidimensional data using a preset spatiotemporal data model to obtain fused multidimensional data, and perform distributed storage on the fused multidimensional data to obtain distributed multidimensional data;
[0166] The environmental feature extraction module 102 is used to analyze the data distribution and correlation of the distributed multidimensional data using a preset Seaborn tool, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation;
[0167] The risk factor identification module 103 is used to identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, calculate the factor SHAP value of the environmental risk factor using the risk analysis model, and determine the key environmental risk factors of the environmental risk factor based on the factor SHAP value;
[0168] The environmental detection model building module 104 is used to build an environmental detection model of the city to be detected based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data;
[0169] The urban risk area identification module 105 is used to construct a real-time data iteration library of the city to be detected, and based on the real-time data iteration library, use the environmental detection model to analyze the risk area and risk coefficient of the city to be detected, and based on the risk area and the risk coefficient, construct a risk scatter matrix diagram of the city to be detected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk areas of the city to be detected.
[0170] In detail, each module in the urban environmental risk area prediction system 100 based on multi-dimensional dynamic visualization in the embodiment of the present invention is used in the same manner as above. Figure 1 The same technical means are used as the urban environmental risk area prediction method based on multi-dimensional dynamic visualization described in the text, and can produce the same technical effects, so they will not be repeated here.
[0171] like Figure 3 , is a schematic diagram of the structure of an electronic device for implementing a method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization provided by an embodiment of the present invention.
[0172] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as an urban environmental risk area prediction method program based on multi-dimensional dynamic visualization.
[0173] The memory 11 includes at least one type of readable storage medium, including flash memory, mobile hard disk, multimedia card, card-type memory (e.g., SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of the electronic device 1, such as a mobile hard disk of the electronic device 1. In other embodiments, the memory 11 may also be an external storage device of the electronic device 1, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 also includes an internal storage unit of the electronic device 1 and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device 1, such as the code of the urban environmental risk area prediction method program based on multi-dimensional dynamic visualization, but also can be used to temporarily store data that has been output or is to be output.
[0174] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as a method program for predicting urban environmental risk areas based on multi-dimensional dynamic visualization, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.
[0175] The bus 12 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus 12 may be divided into an address bus, a data bus, a control bus, etc. The bus 12 is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.
[0176] Figure 3 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 3The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.
[0177] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to various components. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.
[0178] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.
[0179] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.
[0180] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.
[0181] The urban environmental risk area prediction method program based on multi-dimensional dynamic visualization stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:
[0182] Acquire urban multidimensional data and historical risk events of the city to be inspected, use a preset spatiotemporal data model to perform spatiotemporal fusion on the urban multidimensional data to obtain fused multidimensional data, and perform distributed storage on the fused multidimensional data to obtain distributed multidimensional data;
[0183] Analyze the data distribution and correlation of the distributed multidimensional data using a preset Seaborn tool, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation;
[0184] Identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, calculate the factor SHAP value of the environmental risk factor using the risk analysis model, and determine the key environmental risk factors of the environmental risk factor based on the factor SHAP value;
[0185] Based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data, an environmental detection model of the city to be detected is established;
[0186] Construct a real-time data iteration library of the city to be detected, based on the real-time data iteration library, use the environmental detection model to analyze the risk area and risk coefficient of the city to be detected, based on the risk area and the risk coefficient, construct a risk scatter matrix diagram of the city to be detected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk area of the city to be detected.
[0187] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 3 The description of the relevant steps in the corresponding embodiments will not be repeated here.
[0188] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).
[0189] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:
[0190] Acquire urban multidimensional data and historical risk events of the city to be inspected, use a preset spatiotemporal data model to perform spatiotemporal fusion on the urban multidimensional data to obtain fused multidimensional data, and perform distributed storage on the fused multidimensional data to obtain distributed multidimensional data;
[0191] Analyze the data distribution and correlation of the distributed multidimensional data using a preset Seaborn tool, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation;
[0192] Identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, calculate the factor SHAP value of the environmental risk factor using the risk analysis model, and determine the key environmental risk factors of the environmental risk factor based on the factor SHAP value;
[0193] Based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data, an environmental detection model of the city to be detected is established;
[0194] Construct a real-time data iteration library of the city to be detected, based on the real-time data iteration library, use the environmental detection model to analyze the risk area and risk coefficient of the city to be detected, based on the risk area and the risk coefficient, construct a risk scatter matrix diagram of the city to be detected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk area of the city to be detected.
[0195] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, systems and methods can be implemented in other ways. For example, the system embodiments described above are only illustrative, and actual implementation may have other division methods.
[0196] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0197] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.
[0198] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.
[0199] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.
Claims
1. A method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization, characterized in that: The method comprises: Acquire urban multidimensional data and historical risk events of the city to be detected, identify the model type of the preset spatiotemporal data model, determine the model dimension of the spatiotemporal data model based on the model type, wherein the model dimension includes model time, model space and model attribute, and perform spatiotemporal tagging on the urban multidimensional data based on the model dimension to obtain urban spatiotemporal data; The spatiotemporal pattern of the urban spatiotemporal data is calculated using the following formula: ; in, represents the spatiotemporal pattern of urban spatiotemporal data, represents the pattern recognition function, Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates the quantity of urban spatiotemporal data, constructs a data mapping method for the urban multidimensional data based on the spatiotemporal model, organizes the corresponding structure of the urban multidimensional data based on the data mapping method, performs spatiotemporal fusion on the urban multidimensional data based on the corresponding structure to obtain fused multidimensional data, and performs distributed storage on the fused multidimensional data to obtain distributed multidimensional data; A Seaborn environment for the distributed multidimensional data is configured, a DataFrame data set for the distributed multidimensional data is constructed, and in the Seaborn environment, an estimated smoothness requirement of the DataFrame data set is analyzed, and based on the estimated smoothness requirement, a KDE bandwidth of the DataFrame data set is determined, and based on the KDE bandwidth, a kernel density estimate of the DataFrame data set is calculated using the following formula: ; in, Indicates at point The kernel density estimate at , represents the points on the x-axis used to calculate the kernel density estimate, Indicates the number of DataFrame datasets, represents the KDE bandwidth, represents the kernel function, Represents the DataFrame dataset Observation values of data points, construct a KDE curve of the DataFrame data set through the kernel density estimation value, analyze the data distribution of the distributed multidimensional data based on the KDE curve, draw a box plot of the DataFrame data set using the pairplot function corresponding to the Seaborn tool in the Seaborn environment, analyze the correlation of the distributed multidimensional data based on the box plot, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation; Identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, identify the decision tree structure of the decision tree corresponding to the risk analysis model, determine the number of decision trees and decision tree leaf nodes of the risk analysis model based on the decision tree structure, and calculate the factor SHAP value of the environmental risk factor based on the number of decision trees and the decision tree leaf nodes using the following formula: ; in, Environmental risk factors The factor SHAP value of represents the number of decision trees of the risk analysis model, Represents the risk analysis model The set of decision tree leaf nodes of a decision tree, represents the indicator function, when and When the nodes are in the same decision tree leaf, it is 1, otherwise it is 0. The risk analysis model is Environmental risk factors on decision trees The predicted value of The risk analysis model is The predicted average value of the leaf nodes of the decision tree is used to determine the key environmental risk factors of the environmental risk factors based on the SHAP value of the factor; Based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data, an environmental detection model of the city to be detected is established; Construct a real-time data iteration library of the city to be detected, based on the real-time data iteration library, use the environmental detection model to analyze the risk area and risk coefficient of the city to be detected, based on the risk area and the risk coefficient, construct a risk scatter matrix diagram of the city to be detected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk area of the city to be detected.
2. The method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization according to claim 1, characterized in that: The extracting key environmental features of the distributed multidimensional data based on the data distribution and the correlation includes: Based on the data distribution and the correlation, extracting initial environmental features of the distributed multidimensional data; Standardizing the initial environmental characteristics to obtain standardized environmental characteristics; Importing the standardized environmental characteristics into a preset factor analysis library, and configuring the factor parameters of the factor analysis library; Based on the factor parameters, extracting characteristic factors of the standardized environmental characteristics using the factor analysis model corresponding to the factor analysis library; Constructing a factor loading matrix of the characteristic factors; Based on the factor loading matrix, key environmental features of the standardized environmental features are constructed.
3. The method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization according to claim 2, characterized in that: The extracting the characteristic factors of the standardized environmental characteristics based on the factor parameters and using the factor analysis model corresponding to the factor analysis library includes: Based on the factor parameters, configuring the factor analysis model to obtain a configured factor analysis model; Using the configuration factor analysis model to fit the standardized environmental characteristics, to obtain fitted environmental characteristics; Extracting feature latent dimensions of the fitting environment features; Based on the feature potential dimension, a feature factor of the fitting environment feature is determined.
4. The method for predicting urban environmental risk areas based on multi-dimensional dynamic visualization according to claim 3, characterized in that: The step of constructing a risk scatter matrix diagram of the city to be inspected based on the risk area and the risk coefficient includes: Constructing a three-dimensional coordinate system of the city to be detected in the environment; identifying risk boundaries of the risk area; Based on the risk boundary, constructing a risk coordinate map of the city to be inspected in the three-dimensional city coordinate system; Based on the risk coefficient, marking the color of the coordinate graph of the risk coordinate graph; The risk coordinate map and the color of the coordinate map are interpreted to obtain a scatter matrix map of the interpreted risks of the city to be tested; Detecting the visual consistency coefficient of the risk interpretation scatter matrix diagram; When the visual consistency coefficient meets the preset visual consistency threshold, the interpreted risk scatter matrix diagram is used as the risk scatter matrix diagram of the city to be detected.
5. An urban environmental risk area prediction system based on multi-dimensional dynamic visualization, characterized in that: The system comprises: A multidimensional data processing module is used to obtain the city multidimensional data and historical risk events of the city to be detected, identify the model type of the preset spatiotemporal data model, and determine the model dimension of the preset spatiotemporal data model based on the model type, wherein the model dimension includes model time, model space and model attribute, and based on the model dimension, perform spatiotemporal labeling on the city multidimensional data to obtain the city spatiotemporal data; The spatiotemporal pattern of the urban spatiotemporal data is calculated using the following formula: ; in, represents the spatiotemporal pattern of urban spatiotemporal data, represents the pattern recognition function, Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates time point and spatial location The attribute value of Indicates the quantity of urban spatiotemporal data, constructs a data mapping method for the urban multidimensional data based on the spatiotemporal model, organizes the corresponding structure of the urban multidimensional data based on the data mapping method, performs spatiotemporal fusion on the urban multidimensional data based on the corresponding structure to obtain fused multidimensional data, and performs distributed storage on the fused multidimensional data to obtain distributed multidimensional data; An environmental feature extraction module is used to configure the Seaborn environment of the distributed multidimensional data, construct a DataFrame data set of the distributed multidimensional data, analyze the estimated smoothness requirement of the DataFrame data set in the Seaborn environment, determine the KDE bandwidth of the DataFrame data set based on the estimated smoothness requirement, and calculate the kernel density estimate of the DataFrame data set based on the KDE bandwidth using the following formula: ; in, Indicates at point The kernel density estimate at , represents the points on the x-axis used to calculate the kernel density estimate, Indicates the number of DataFrame datasets, represents the KDE bandwidth, represents the kernel function, Represents the DataFrame dataset Observation values of data points, construct a KDE curve of the DataFrame data set through the kernel density estimation value, analyze the data distribution of the distributed multidimensional data based on the KDE curve, draw a box plot of the DataFrame data set using the pairplot function corresponding to the Seaborn tool in the Seaborn environment, analyze the correlation of the distributed multidimensional data based on the box plot, and extract key environmental features of the distributed multidimensional data based on the data distribution and the correlation; The risk factor identification module is used to identify the environmental risk factors of the city to be tested, establish a risk analysis model for the city to be tested based on the historical risk events, identify the decision tree structure of the decision tree corresponding to the risk analysis model, determine the number of decision trees and decision tree leaf nodes of the risk analysis model based on the decision tree structure, and calculate the factor SHAP value of the environmental risk factor based on the number of decision trees and the decision tree leaf nodes using the following formula: ; in, Environmental risk factors The factor SHAP value of represents the number of decision trees of the risk analysis model, Represents the risk analysis model The set of decision tree leaf nodes of a decision tree, represents the indicator function, when and When the nodes are in the same decision tree leaf, it is 1, otherwise it is 0. The risk analysis model is Environmental risk factors on decision trees The predicted value of The risk analysis model is The predicted average value of the leaf nodes of the decision tree is used to determine the key environmental risk factors of the environmental risk factors based on the SHAP value of the factor; An environmental detection model building module is used to build an environmental detection model of the city to be detected based on the key environmental characteristics, the historical risk events, the key environmental risk factors and the distributed multi-dimensional data; The urban risk area identification module is used to construct a real-time data iteration library of the city to be detected, based on the real-time data iteration library, use the environmental detection model to analyze the risk area and risk coefficient of the city to be detected, based on the risk area and the risk coefficient, construct a risk scatter matrix diagram of the city to be detected, and based on the risk scatter matrix diagram, realize dynamic visualization of the corresponding risk areas of the city to be detected.
