A multi-dimensional method and system for collecting and collating shrinking city data
By obtaining the shrinkage trend and the compression requirements of the clusters, the iterative merging method solves the problem that the lossy compression method in the existing technology cannot effectively retain the data characteristics, and achieves more efficient data compression and organization.
Patent Information
- Application Number
- CN202410966119.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2044-07-18
AI Technical Summary
The lossy compression method in the existing technology cannot effectively retain the important characteristics of shrinking city data, resulting in poor quality of compressed data and affecting subsequent data collation and analysis.
By obtaining the shrinkage trend of each feature time series data and the compression requirements of the cluster cluster, iterative merging is performed based on the location distribution distance and shrinkage trend, and the final clustering result is obtained for compressed storage. Combined with the analysis of distribution dispersion and time distribution breadth, adaptive Compression requirements to improve compression efficiency.
It improves data compression efficiency, ensures that important features of data representation are effectively retained, and improves the quality of subsequent data sorting and analysis.
Smart Images

Figure CN118503503B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data clustering and compression, and in particular to a method and system for collecting and collating shrinking city data based on multiple dimensions. Background Art
[0002] Shrinking cities are mainly reflected in population shrinkage, industrial structure shrinkage or resource shrinkage, etc. Development planning for shrinking cities is also a key proposition for urban governance. The relevant data of shrinking cities usually covers multiple aspects, including population data, economic data, real estate data, social service data, etc. Through multi-dimensional data, in-depth analysis of urban development can be achieved. Therefore, the collection and collation of a large amount of shrinking city data can provide a good analysis environment for urban development research.
[0003] Due to the huge amount of shrinking city data in different dimensions, it is unrealistic to directly collect and store the data, so data compression is a necessary process for collection. Since the data of shrinking cities in different dimensions represent the development trend of cities differently, the lossless compression method can fully retain important features, but it will increase the compression cost and lead to poor compression efficiency. The choice of lossy compression method cannot guarantee that the important features of data representation are effectively retained, resulting in poor quality of collected and compressed data, which is not conducive to the subsequent collation and analysis of shrinking city data. Summary of the invention
[0004] In order to solve the technical problem that the selection of lossy compression methods in the prior art cannot ensure that the important features of data representation are effectively retained, resulting in poor quality of collected compressed data, the purpose of the present invention is to provide a method and system for collecting and collating shrinking city data based on multiple dimensions. The technical solutions adopted are as follows:
[0005] The present invention provides a method for collecting and collating shrinking city data based on multiple dimensions, the method comprising:
[0006] Obtain characteristic time series data of each city indicator at each collection moment in the historical time period;
[0007] According to the discrete distribution of each characteristic time series data on the city indicator, and the wide distribution of the characteristic time series data corresponding to the characteristic time series data of different city indicators at the same collection time, the contraction trend of each characteristic time series data is obtained;
[0008] Cluster the characteristic time series data to obtain characteristic clustering clusters; in each characteristic clustering cluster, obtain the compression demand of each characteristic clustering cluster according to the correlation degree of the time series changes of different city indicators on the characteristic time series data, as well as the distribution of the shrinkage trend of the characteristic time series data and the degree of location distribution aggregation;
[0009] For every two feature clusters, they are iteratively merged based on the location distribution distance, compression requirements and the closeness in shrinkage trend to obtain the final clustering result; and compressed storage is performed based on the final clustering result.
[0010] Furthermore, the method for obtaining the shrinkage trend includes:
[0011] For any characteristic time series data, the distribution dispersion of the characteristic time series data is obtained according to the degree of deviation of the characteristic time series data in all characteristic time series data of the city indicator;
[0012] At the time of collection corresponding to the characteristic time series data, according to the difference degree of the characteristic time series data between all city indicators, the time distribution breadth of the characteristic time series data is obtained;
[0013] The shrinkage trend of the characteristic time series data is obtained by combining the distribution dispersion and the time distribution breadth of the characteristic time series data; the distribution dispersion and the time distribution breadth are both positively correlated with the shrinkage trend.
[0014] Furthermore, the method for acquiring the time distribution breadth includes:
[0015] The sampling time corresponding to the characteristic time series data is used as the analysis time; the characteristic time series data of each two different city indicators at the analysis time is used as a distribution tuple;
[0016] Calculate the difference between the two feature time series data in each distribution binary group to obtain the numerical breadth of each distribution binary group;
[0017] The value breadth of all distribution pairs is combined to obtain the moment distribution breadth of the feature time series data.
[0018] Furthermore, the method for obtaining the compression requirement includes:
[0019] For any feature cluster, the change correlation of the feature cluster is obtained according to the change proximity between all city indicators in the feature cluster;
[0020] Obtain the center point data of the feature cluster; in the feature cluster, obtain the distribution dispersion of the feature cluster according to the distribution disorder of the distance between each feature time series data and the center point data;
[0021] In the feature cluster, the shrinkage difference of the feature cluster is obtained by combining the deviation degree of the shrinkage trend of each feature time series data in all feature time series data of the feature cluster;
[0022] The compression requirement of the feature cluster is obtained by combining the change correlation, distribution dispersion and shrinkage difference of the feature cluster. The change correlation is positively correlated with the compression requirement, while the distribution dispersion and shrinkage difference are negatively correlated with the compression requirement.
[0023] Furthermore, the method for obtaining the change correlation includes:
[0024] According to the local value change of each characteristic time series data in the characteristic cluster in the city indicator, the change degree of each characteristic time series data is obtained;
[0025] The characteristic time series data of each city indicator in the characteristic clustering cluster are sorted in time series order to obtain the characteristic distribution sequence of each city indicator in the characteristic clustering cluster;
[0026] According to the difference in the change degree of the characteristic time series data between each two city indicators in the characteristic cluster and the similarity of the change of the characteristic distribution sequence, the change correlation of the characteristic cluster is obtained.
[0027] Furthermore, the change correlation of the feature cluster is obtained according to the difference in the change degree of the feature time series data between each two city indicators in the feature cluster and the similarity of the change of the feature distribution sequence, including:
[0028] Each two different city indicators in the characteristic cluster are regarded as a correlation analysis group;
[0029] Calculate the mean value of the change of all characteristic time series data corresponding to each city indicator in the association analysis group to obtain the mean value of the change of each city indicator in the association analysis group;
[0030] The difference in the mean changes of the indicators of the two cities in the association analysis group is taken as the difference in the degree of change of the association analysis group; the mean of the difference in the degree of change of all association analysis groups is calculated and negative correlation mapping is performed to obtain the similarity of the changes of the characteristic clustering cluster;
[0031] Calculate the absolute value of the Pearson correlation coefficient between the characteristic distribution sequences of the two city indicators in the association analysis group to obtain the temporal correlation of the association analysis group; take the mean of the temporal correlation of all the association analysis groups as the temporal correlation of the characteristic clustering cluster;
[0032] The change correlation of the feature clustering cluster is obtained by combining the change similarity and time series association of the feature clustering cluster; the change similarity and time series association are both positively correlated with the change correlation.
[0033] Furthermore, the method for obtaining the final clustering result includes:
[0034] The shrinkage degree of each feature cluster is obtained by combining the shrinkage trend of all feature time series data in each feature cluster; the necessity of shrinkage and merging of each feature cluster is obtained according to the difference between the shrinkage degree of each feature cluster and the maximum shrinkage degree;
[0035] Negative correlation mapping is performed on the compression requirement difference between each feature clustering cluster and each other feature clustering cluster, so as to obtain the necessity of compression merging of each feature clustering cluster and each other feature clustering cluster;
[0036] Negative correlation mapping is performed on the center point distance between each feature clustering cluster and each other feature clustering cluster to obtain the necessity of merging the distance between each feature clustering cluster and each other feature clustering cluster;
[0037] Combining the compression merging necessity, distance merging necessity and shrinkage merging necessity of each feature clustering cluster with other feature clustering clusters, the merging necessity of each feature clustering cluster with other feature clustering clusters is obtained; iterative merging is performed based on the merging necessity between all feature clustering clusters to obtain the final clustering result.
[0038] Furthermore, the merging between all feature clusters must be iteratively merged to obtain the final clustering result, including:
[0039] When the necessary value for merging each feature clustering cluster with other feature clustering clusters is greater than a preset merging threshold, the corresponding feature clustering cluster is merged with other feature clustering clusters as a new feature clustering cluster; the mean necessary value for merging each feature clustering cluster with other feature clustering clusters in the new feature clustering cluster is used as the necessary value for merging the new feature clustering cluster with other feature clustering clusters;
[0040] All feature clusters are iteratively merged until they cannot be merged, and each feature cluster at this time is taken as each final clustering result.
[0041] Furthermore, the compression and storage according to the final clustering result includes:
[0042] Calculate the average of the compression requirements of all feature clustering clusters involved in the merger in each final clustering result as the compression index of each final clustering result;
[0043] When the compression index is greater than the preset compression threshold, the corresponding final clustering result will be lossily compressed, and the remaining final clustering results will be losslessly compressed to obtain the final compressed data for storage.
[0044] The present invention provides a system for collecting and collating shrinking city data based on multiple dimensions, including a memory and a processor. The processor executes a computing program stored in the memory to implement a method for collecting and collating shrinking city data based on multiple dimensions as described above.
[0045] The present invention has the following beneficial effects:
[0046] The present invention first obtains the shrinkage trend of each feature time series data by analyzing the distribution of the feature time series data in the city indicators at each moment in the time period, and the distribution of the feature time series data in different city indicators at the moment, reflecting the severity of the shrinkage of the city indicators at each feature time series data at the moment, and considering the impact of the shrinkage of the city indicators in the subsequent compression analysis. In order to improve the analysis efficiency of adaptive compression, the feature clustering cluster is obtained for the classification analysis of the feature time series data, and the compression requirements of each clustering cluster are comprehensively analyzed according to the association between multiple city indicators in the feature clustering cluster, the shrinkage trend and distribution aggregation of the feature time series data, and each feature clustering cluster is analyzed for the merging of the comprehensive distance, compression requirements and shrinkage trend analysis with other clustering clusters, and the final clustering result is obtained for compression storage, and the multi-dimensional change relationship and shrinkage situation are comprehensively considered through the distribution characteristics of the feature time series itself, so as to obtain a more preferred compression requirement, and improve the subsequent compression efficiency through merging. The present invention adjusts the compression requirements of the divided data by comprehensively shrinking the shrinkage situation characterized by different dimensions of the shrinking city and the change relationship between different dimensions, so that different data can be adaptively compressed and stored, so as to improve the efficiency of data collection and sorting. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A flowchart of a method for collecting and collating shrinking city data based on multiple dimensions provided by an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of characteristic time series distribution of various city indicators provided by an embodiment of the present invention;
[0050] Figure 3 A flow chart of a method for obtaining a shrinkage trend provided by an embodiment of the present invention;
[0051] Figure 4 A flow chart of a method for obtaining compression requirements provided by an embodiment of the present invention;
[0052] Figure 5 A flow chart of a method for obtaining change correlation provided by an embodiment of the present invention;
[0053] Figure 6A flow chart of a method for obtaining a final clustering result provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0054] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following is a detailed description of a multi-dimensional shrinking city data collection and collation method and system proposed by the present invention, its specific implementation method, structure, features and effects, in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0055] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0056] The following is a detailed description of a method and system for collecting and collating shrinking city data based on multiple dimensions provided by the present invention in conjunction with the accompanying drawings.
[0057] See also Figure 1 , which shows a flow chart of a method for collecting and collating shrinking city data based on multiple dimensions provided by an embodiment of the present invention, the method comprising the following steps:
[0058] S1: Obtain characteristic time series data of each city indicator at each collection moment in the historical time period.
[0059] A variety of urban indicators are also multidimensional data of shrinking cities. Urban indicators may include: census data, real estate vacancy rate, public service utilization rate, economic output rate and unemployment rate, etc. In a specific implementation of the embodiment of the present invention, urban indicators can obtain relevant data at each collection time in the historical time period through the urban management department and the statistics bureau, and establish a sample space for analysis after standardized preprocessing. Please refer to Figure 2 , which shows a schematic diagram of characteristic time series distribution of various urban indicators provided by an embodiment of the present invention, wherein 1 represents the unemployment rate, 2 represents the real estate vacancy rate, 3 represents the population census data, 4 represents the economic output rate, and 5 represents the public service utilization rate.
[0060] Among them, the relevant data are the data corresponding to each city indicator, that is, the characteristic time series data. The historical time period is the data stored without compression processing. For example, the historical time period is one month, and the collection time is once a day, or the historical time period is one year, and the collection time is once a month, etc. The specific collection frequency can be set by the implementer according to the specific implementation scenario, and there is no restriction here.
[0061] It should be noted that in the specific implementation of this application, the collection, use and processing of relevant data related to urban indicators need to comply with relevant laws, regulations and standards of relevant countries and regions.
[0062] S2: According to the discrete distribution of each characteristic time series data in the city indicator, and the wide distribution of the characteristic time series data corresponding to different city indicators at the same collection time, the contraction trend of each characteristic time series data is obtained.
[0063] For shrinking cities, as the degree of urban shrinkage gradually decreases, the linear changes of related urban indicators will intensify, and the diversified urban indicators will gradually become isolated. For example, when the city shrinks, the real estate vacancy rate will show a gradual upward trend, while the economic output will show a gradual downward trend. The city indicators that were originally distributed relatively closely will become more discrete and isolated as the severity of urban shrinkage increases. Therefore, the characteristic time series data of each urban indicator at each collection moment is analyzed for distribution, and the shrinkage situation is analyzed for each characteristic time series data at each moment.
[0064] Preferably, in a specific implementation of the embodiment of the present invention, the method for obtaining the shrinkage trend can be found in Figure 3 , which shows a flow chart of a method for obtaining a shrinkage trend provided by an embodiment of the present invention, the method comprising the following steps:
[0065] S201: For any characteristic time series data, the distribution dispersion of the characteristic time series data is obtained according to the degree of deviation of the characteristic time series data in all characteristic time series data of the city indicator.
[0066] First, we analyze the distribution of characteristic time series data in the city indicators of the corresponding dimensions. The higher the deviation of the characteristic time series data in the overall data of the city indicators, the more severe the shrinkage has been at the time when the characteristic time series data is located, reflecting that the data shrinkage at this time is relatively large.
[0067] In the embodiment of the present invention, the mean of all characteristic time series data in the city index where the characteristic time series data is located is used as the reference value of the characteristic time series data, and the overall value distribution is reflected by the mean. The difference between the characteristic time series data and the reference value is used as the distribution dispersion of the characteristic time series data. The larger the distribution dispersion, the higher the deviation of the value of the characteristic time series data is, and the more likely it is to be at a time when the contraction degree is serious.
[0068] In other embodiments of the present invention, the numerical median of the characteristic time series data in the city index where the characteristic time series data is located is used as the benchmark value of the characteristic time series data, the overall numerical distribution is characterized by the numerical median, and the difference between the characteristic time series data and the benchmark value is used as the distribution dispersion of the characteristic time series data, which is not elaborated here.
[0069] S202: At the time of collection corresponding to the characteristic time series data, according to the degree of difference of the characteristic time series data between all city indicators, obtaining the time distribution breadth of the characteristic time series data;
[0070] Further analysis is conducted based on the overall distribution of all feature time series data at the time of collection corresponding to the feature time series data. The greater the numerical difference between all feature time series data at the time of collection, the higher the degree of urban contraction, and the values between multiple dimensions have tended to a more discrete distribution.
[0071] In some achievable manners of the embodiments of the present invention, a method for acquiring the time distribution breadth includes:
[0072] First, the sampling time corresponding to the characteristic time series data is taken as the analysis time, and the characteristic time series data of each two different city indicators at the analysis time is taken as a distribution tuple, and all dimensions at the analysis time are analyzed pairwise.
[0073] Furthermore, the difference between the two feature time series data in each distribution binary is calculated to obtain the numerical breadth of each distribution binary, which reflects the degree of numerical discreteness between the two dimensions. The numerical breadth of all distribution binary groups is combined to obtain the moment distribution breadth of the feature time series data, which reflects the overall numerical discreteness between the two dimensions.
[0074] In the embodiment of the present invention, the accumulated value of the value breadth of all distribution binary groups is used as the time distribution breadth. In other embodiments of the present invention, the average value of the value breadth of all distribution binary groups can also be used as the time distribution breadth, which will not be described in detail here.
[0075] S203: Combining the distribution dispersion and the time distribution breadth of the characteristic time series data, the shrinkage trend of the characteristic time series data is obtained; the distribution dispersion and the time distribution breadth are both positively correlated with the shrinkage trend.
[0076] Combined with the degree of contraction represented by the characteristic time series data itself in the city index, and the degree of contraction reflected at the time when the characteristic time series data is located, the contraction situation reflected by the characteristic time series data is comprehensively obtained. In an embodiment of the present invention, the product of the distribution dispersion and the distribution breadth at the moment is normalized to obtain the contraction trend of the characteristic time series data. The larger the distribution dispersion, the greater the degree of contraction of the characteristic time series data in the dimension of the city index. The greater the distribution breadth at the moment, the more serious the overall contraction situation at the moment when the characteristic time series data is located, so the contraction trend is greater.
[0077] In other embodiments of the present invention, other basic mathematical operations may be used to reflect that both the distribution discreteness and the time distribution breadth are positively correlated with the shrinkage trend, such as addition or power operation, etc., which are not limited here.
[0078] In a specific implementation of the embodiment of the present invention, the expression of the shrinkage trend is:
[0079] ; In the formula, Expressed as Among the city indicators The shrinking trend of characteristic time series data, Expressed as Among the city indicators Characteristic time series data, Expressed as Among the city indicators The baseline value of the characteristic time series data, Expressed as The characteristic time series data corresponds to the collection time A feature time series data in a distribution pair, Expressed as The characteristic time series data corresponds to the collection time Another feature time series data in the distribution pair, Expressed as The total number of distribution pairs corresponding to the feature time series data at the time of collection, Expressed as an absolute value extraction function, It is represented as a normalization processing function. It should be noted that normalization is a technical means well known to those skilled in the art. The normalization function can be linear normalization or standard normalization, etc. The specific normalization method is not limited here.
[0080] in, Expressed as Among the city indicators The distribution dispersion of the characteristic time series data, Expressed as The characteristic time series data corresponds to the collection time The numerical breadth of the distribution pairs, Expressed as Among the city indicators The breadth of the time distribution of characteristic time series data.
[0081] At this point, the analysis of the shrinkage of individual data is completed and the shrinkage trend is obtained.
[0082] S3: Cluster the feature time series data to obtain feature clustering clusters; in each feature clustering cluster, obtain the compression demand of each feature clustering cluster based on the correlation degree of the time series changes of different city indicators on the feature time series data, as well as the shrinkage trend distribution and location distribution aggregation degree of the feature time series data.
[0083] In order to better perform adaptive compression on the data, the characteristic time series data with relatively close numerical distribution in time series are clustered as the compression required for the overall analysis of the cluster cluster. In an embodiment of the present invention, the ISODATA algorithm can be used to cluster all characteristic time series data according to the numerical approximation to obtain characteristic cluster clusters, wherein the ISODATA algorithm is a clustering technology well known to those skilled in the art, and other clustering methods can also be selected, such as K-means clustering, etc., which will not be repeated here.
[0084] For each feature cluster, the closer and more consistent the data distribution in the cluster is, the higher the distribution of the time series change of the feature time series data is, and a higher degree of compression can be performed. For example, as urban shrinkage worsens, the census data will decline, which will cause a decline in the real estate vacancy rate. In this case, the correlation distribution between the census data and the real estate vacancy rate may be higher locally, and the important features lost may be lower if loss compression is performed. At the same time, considering the consistency of the representation of the shrinkage situation in the cluster, the better the consistency of the representation of the shrinkage situation, the more compression can be performed.
[0085] Preferably, in a specific implementation of the embodiment of the present invention, the method for obtaining the compression requirement is as follows: Figure 4 , which shows a flow chart of a method for obtaining compression requirements provided by an embodiment of the present invention, the method comprising the following steps:
[0086] S301: For any feature cluster, according to the degree of proximity of changes between all city indicators in the feature cluster, obtain the change correlation of the feature cluster.
[0087] Since the data in the feature clustering cluster is multidimensional data, in addition to analyzing the degree of clustering, it is also necessary to consider the degree of correlation between different dimensions. The higher the consistency of the change of multidimensional data in the clustering cluster, the better the consistent distribution of the data in the clustering cluster, and the greater the degree of compression that can be performed.
[0088] Preferably, in a specific implementation of the embodiment of the present invention, the method for obtaining the change correlation degree can be found in Figure 5 , which shows a flow chart of a method for obtaining a change correlation provided by an embodiment of the present invention, the method comprising the following steps:
[0089] S3011: Obtain the degree of change of each feature time series data according to the local value change of each feature time series data in the city indicator in the feature cluster.
[0090] Analyze the local numerical changes of each characteristic time series data in the city index, that is, analyze the slope of each characteristic time series data in the continuous change of time series. In the possible implementation method of the embodiment of the present invention, the two characteristic time series data closest to each characteristic time series data in time series are used as the adjacent time series data of each characteristic time series data, and the numerical difference between each characteristic time series data and each adjacent time series data is calculated, and the two numerical differences are averaged to obtain the change degree of each characteristic time series data. The degree of numerical change between the characteristic time series data and the adjacent data is used as the degree of change to reflect the change trend of the characteristic time series data.
[0091] In other embodiments of the present invention, curve fitting can also be performed on each city indicator, and the slope of each characteristic time series data on the fitting curve is used as the degree of change. The method of obtaining the slope by curve fitting is a technical means well known to those skilled in the art and will not be elaborated here.
[0092] S3012: Sort the characteristic time series data of each city indicator in the characteristic clustering cluster in time series order to obtain a characteristic distribution sequence of each city indicator in the characteristic clustering cluster.
[0093] In order to subsequently perform an approximate analysis on the specific change trends of data of different dimensions in the feature clustering cluster, sequences of feature time series data of different dimensions are obtained in the feature clustering cluster according to the time series order.
[0094] S3013: Obtain the change correlation of the feature cluster according to the difference in the change degree of the feature time series data between every two city indicators in the feature cluster and the similarity of the change of the feature distribution sequence.
[0095] By integrating the local change degree and change trend of the overall feature time series data between different dimensions, the change correlation is obtained to reflect the consistency of changes between multiple dimensions. Preferably, in some achievable methods of the embodiments of the present invention, the method for obtaining the change correlation includes:
[0096] First, every two different city indicators in the feature cluster are taken as an association analysis group, and the two are analyzed in pairs for different dimensions. The mean value of the change of each city indicator in the association analysis group corresponding to all feature time series data is calculated to obtain the mean value of the change of each city indicator in the association analysis group. By integrating the local variability of the data in each dimension, the overall local change degree of each dimension in the cluster is reflected.
[0097] Secondly, the difference in the mean changes of the indicators of the two cities in the association analysis group is used as the difference in the degree of change of the association analysis group, reflecting the degree of difference in the local numerical changes. The mean of the difference in the degree of change of all association analysis groups is calculated and negative correlation mapping is performed to obtain the similarity of the changes in the feature clustering clusters, which comprehensively reflects the difference in local numerical changes between the two dimensions. In an embodiment of the present invention, the negative correlation mapping can be obtained in the form of an inverse proportion of the mean. In other embodiments of the present invention, the negative correlation mapping can also be performed using a negative exponential form, which will not be repeated here.
[0098] Furthermore, the absolute value of the Pearson correlation coefficient between the characteristic distribution sequences of the two city indicators in the association analysis group is calculated to obtain the temporal correlation of the association analysis group, and the Pearson correlation coefficient between the sequences reflects the degree of correlation between the sequences. The mean of the temporal correlation of all association analysis groups is used as the temporal correlation of the characteristic clustering cluster, which comprehensively reflects the degree of correlation of the characteristic temporal data change trend between the two dimensions.
[0099] In other embodiments of the present invention, the DTW value between the characteristic distribution sequences of the two city indicators can also be calculated and negative correlation mapping can be performed to obtain the temporal correlation of the association analysis group, and the DTW value can also reflect the degree of correlation between the sequences. It should be noted that the Pearson correlation coefficient and the DTW value are both technical means well known to those skilled in the art and will not be described in detail here.
[0100] Finally, the change correlation of the feature clustering cluster is obtained by combining the change similarity and time series association of the feature clustering cluster. The approximate correlation of the two aspects is combined to reflect the degree of correlation of the change of the feature time series data in two dimensions. Both the change similarity and time series association are positively correlated with the change correlation.
[0101] In the embodiment of the present invention, the product of change similarity and temporal correlation is used as the change correlation of the feature cluster. In other embodiments of the present invention, other basic mathematical operations can also be used to reflect that change similarity and temporal correlation are both positively correlated with change correlation, such as addition, etc., which will not be described in detail here.
[0102] In a specific implementation of the embodiment of the present invention, the expression of the change correlation is:
[0103] ; In the formula, Expressed as The change correlation of feature clusters, Expressed as The total number of association analysis groups for feature clusters, Expressed as The first feature cluster The difference in the degree of change among the association analysis groups, Expressed as The first feature cluster The temporal correlation of the association analysis groups, It is expressed as an exponential function with a natural constant as the base. Expressed as The temporal correlation of feature clusters, Expressed as The changes of the feature clusters are similar, and negative correlation mapping is performed in the form of a negative exponential function.
[0104] At this point, the change correlation is obtained from the correlation analysis between the multidimensional data in the feature clusters, reflecting the ability of the clusters to represent the consistency of the data.
[0105] S302: Obtain the center point data of the feature cluster; in the feature cluster, obtain the distribution dispersion of the feature cluster according to the distribution disorder of the distance between each feature time series data and the center point data.
[0106] In each feature clustering cluster, the most intuitive reflection of the consistency of clustering distribution is the aggregation of data and central data. Therefore, in an embodiment of the present invention, the distance between each feature time series data and the central point data in the feature clustering cluster is calculated, and the variance of all distances is used as the distribution dispersion of the feature clustering. The larger the variance, the worse the aggregation of the data distribution in the clustering cluster, the larger the distribution dispersion, and the weaker the consistent characterization ability of the data in the feature clustering cluster.
[0107] In other embodiments of the present invention, the coefficient of variation of all distances may also be calculated to obtain distribution dispersion. The coefficient of variation is used to reflect the distribution disorder of the distance. The coefficient of variation is a technical means well known to those skilled in the art and will not be described in detail here.
[0108] S303: In the feature cluster, the shrinkage difference of the feature cluster is obtained by combining the degree of deviation of the shrinkage trend of each feature time series data in all feature time series data of the feature cluster.
[0109] The distribution consistency of the shrinkage trend further reflects the data consistency characterization capability of the clustering cluster. In the embodiment of the present invention, the mean of the shrinkage trend of all feature time series data in the feature clustering cluster is obtained as the shrinkage mean of the feature clustering cluster, the difference between each feature time series data in the feature clustering cluster and the shrinkage mean is used as the deviation of each feature time series data, and the mean of the deviation of all feature time series data in the feature clustering cluster is used as the shrinkage difference of the feature clustering cluster. The discrete situation of the shrinkage trend in the feature clustering cluster is comprehensively reflected. The larger the shrinkage difference, the higher the overall distribution deviation of the shrinkage trend, and the weaker the ability of the feature clustering cluster to reflect the consistent data features.
[0110] In other embodiments of the present invention, the variance of the shrinkage trend of all feature time series data may also be directly calculated to obtain the shrinkage difference, which reflects the overall discrete deviation degree, and will not be elaborated here.
[0111] S304: Combining the change correlation, distribution dispersion and shrinkage difference of the feature clustering cluster, the compression requirement of the feature clustering cluster is obtained; the change correlation is positively correlated with the compression requirement, and the distribution dispersion and shrinkage difference are negatively correlated with the compression requirement.
[0112] The comprehensive analysis of the three aspects reflects the consistency of data distribution in the feature clustering cluster, and the compression requirement is obtained. When the change correlation is larger, it means that the multi-dimensional changes are more consistent. When the distribution dispersion is smaller, it means that the data value distribution in the clustering cluster is more concentrated. When the shrinkage difference is smaller, it means that the shrinkage degree reflected by the data in the clustering cluster is similar. Therefore, the feature clustering cluster can be more strongly compressed, and the compression requirement is higher. In the embodiment of the present invention, the product of the change correlation, the inverse proportional value of the distribution dispersion, and the inverse proportional value of the shrinkage difference is normalized to obtain the compression requirement of the feature clustering cluster.
[0113] At this point, a preliminary analysis of the compression of the clusters after the feature time series data is divided has been conducted.
[0114] S4: For every two feature clusters, iteratively merge them based on the location distribution distance, compression requirements and the closeness in shrinkage trend to obtain the final clustering result; and compress and store them according to the final clustering result.
[0115] Since urban shrinkage is a gradual process and the amount of data that needs to be compressed is large, in order to better improve the compression efficiency and further reduce the compression cost, the feature clustering clusters are analyzed for merging. The possible merging analysis is performed based on the required compression requirements and combined with the shrinkage trend to obtain the final clustering result.
[0116] Preferably, in a specific implementation of the embodiment of the present invention, the method for obtaining the final clustering result can be found in Figure 6, which shows a flow chart of a method for obtaining a final clustering result provided by an embodiment of the present invention, the method comprising the following steps:
[0117] S401: combining the shrinkage trend of all feature time series data in each feature clustering cluster to obtain the shrinkage degree of each feature clustering cluster; according to the difference between the shrinkage degree of each feature clustering cluster and the maximum shrinkage degree, obtaining the necessity of shrinkage and merging of each feature clustering cluster.
[0118] The shrinkage situation reflected in each feature cluster itself is used as an indicator for subsequent combined analysis. In an embodiment of the present invention, the mean of the shrinkage trend of all feature time series data in each feature cluster is used as the shrinkage degree of each feature cluster, reflecting the shrinkage situation of the overall data in the feature cluster.
[0119] By further analyzing the difference between the shrinkage degree and the maximum shrinkage degree of each feature clustering cluster, the difference between the shrinkage degree of the data in the feature clustering and the extreme value shrinkage is reflected. When the shrinkage of the feature clustering cluster is farther away from the most shrinkage situation, the data distribution discreteness in the feature clustering cluster is weaker, and the degree of merging and compression is higher. Therefore, the necessity of merging will be higher. On the contrary, when the shrinkage of the feature clustering cluster is closer to the most shrinkage situation, the data in the feature clustering cluster reflects the shrinkage characteristics more significantly. De-merging and compression will reduce the compression quality. Therefore, the necessity of merging is lower.
[0120] S402: Perform negative correlation mapping on the compression requirement difference between each feature clustering cluster and each other feature clustering cluster, and obtain the necessity of compression merging of each feature clustering cluster and each other feature clustering cluster.
[0121] Based on the compression requirements analyzed, when the compression requirements are more consistent, that is, the difference in compression requirements is smaller, it means that the representation capabilities of the feature clustering clusters are more likely to be consistent, and the degree to which the feature clustering cluster can be merged with other feature clustering clusters for compression is more similar, and the clustering clusters can be further merged to improve the subsequent compression efficiency.
[0122] S403: Perform negative correlation mapping on the center point distance between each feature clustering cluster and each other feature clustering cluster, and obtain the necessity of merging the distance between each feature clustering cluster and each other feature clustering cluster.
[0123] At the same time, when merging feature clusters, the distribution distance between clusters is extremely important. The closer the distribution between clusters, the closer the data distribution reflected by the clusters is in the data sample space, and the greater the possibility of merging. Therefore, in an embodiment of the present invention, by obtaining the center point of the feature cluster, the inverse proportional value of the distance between each feature cluster and each other feature cluster at the center point is used as the necessity of merging the distance between each feature cluster and each other feature cluster. The closer the distance between the center points, the closer the feature clusters are in position, and there is a possibility of merging, so the necessity of distance merging is greater.
[0124] S404: Combining the necessity of compression merging, distance merging and shrinkage merging between each feature cluster and other feature clusters, obtaining the necessity of merging each feature cluster with other feature clusters.
[0125] The final necessity of merging is obtained by analyzing the possibility of merging in the three aspects. In the embodiment of the present invention, the product of the necessity of compression merging, the necessity of distance merging and the necessity of shrinkage merging of each feature cluster with other feature clusters is normalized to obtain the necessity of merging each feature cluster with other feature clusters. The higher the three necessities of merging, the greater the possibility of merging between the two clusters, that is, the greater the necessity of merging.
[0126] S405: Iterative merging is necessary based on the merging of all feature clusters to obtain a final clustering result.
[0127] The feature clustering clusters are iteratively merged in pairs to obtain a final clustering result. In some achievable methods of the embodiments of the present invention, the method for obtaining the final clustering result includes:
[0128] When the merging necessity of each feature clustering cluster with other feature clustering clusters is greater than the preset merging threshold, it indicates that the merging degree is high, and the corresponding feature clustering cluster is merged with other feature clustering clusters as a new feature clustering cluster. Among them, the preset merging threshold is set to 0.75, and the specific value can be adjusted according to the specific real-time scenario, and there is no restriction here. It should be noted that since the merging necessity is for analysis between two feature clustering clusters, during the merging process, the merging is also based on two-by-two merging. If there are feature clustering clusters and multiple other feature clustering clusters that can be merged at the same time, the feature clustering cluster with the highest merging necessity is merged with other feature clustering clusters first, and then the merging situation is analyzed iteratively.
[0129] After updating the merged clusters, the merge necessity is obtained again, and the mean of the merge necessity of each feature cluster in the new feature cluster with other feature clusters is further used as the merge necessity of the new feature cluster with other feature clusters. The merge necessity between the two clusters to be merged and the other clusters is combined to update the merge necessity between the new feature cluster after the merger and the corresponding other feature clusters.
[0130] All feature clusters are further iterated and merged until they cannot be merged, and each feature cluster at this time is used as each final clustering result. Each final clustering result may be generated by merging multiple feature clusters, or it may be composed of a single feature cluster that has not been merged.
[0131] At this point, the division and merging of feature time series data is completed, and the compression situation is adaptively analyzed.
[0132] The data after merging is compressed and stored according to the final clustering result. Preferably, in some possible implementations of the present invention, the mean of the compression requirements of all the feature clustering clusters participating in the merging in each final clustering result is calculated as the compression index of each final clustering result, reflecting the degree of adaptive compression of different data under the final division.
[0133] When the compression index is greater than the preset compression threshold, the corresponding final clustering result is lossy compressed, and the remaining final clustering results are losslessly compressed to obtain the final compressed data for storage, and the compression is performed in two compression modes according to the value of the compression index, and the final compressed data is stored. In a specific embodiment of the present invention, the preset compression threshold is set to 0.45, and the specific value is not limited.
[0134] In other embodiments of the present invention, the degree of lossy compression of the final clustering result can also be adaptively adjusted by the compression index. The higher the compression index, the higher the degree of lossy compression of the corresponding final clustering result. The specific adjustment process is not described in detail here.
[0135] In summary, the present invention first obtains the shrinkage trend of each feature time series data by analyzing the distribution of the feature time series data in the city indicators at each moment in the time period, and the distribution of the feature time series data in different city indicators at the moment, reflecting the severity of the shrinkage of the city indicators at each feature time series data at the moment, and considering the impact of the shrinkage of the city indicators in the subsequent compression analysis. In order to improve the analysis efficiency of adaptive compression, the feature clustering cluster is obtained for the classification analysis of the feature time series data, and the compression requirements of each clustering cluster are comprehensively analyzed according to the association between multiple city indicators in the feature clustering cluster, the shrinkage trend and distribution aggregation of the feature time series data, and each feature clustering cluster is analyzed for the merging of the comprehensive distance, compression requirements and shrinkage trend analysis with other clustering clusters, and the final clustering result is obtained for compression storage. The distribution characteristics of the feature time series itself are comprehensively considered to comprehensively consider the change relationship and shrinkage of multiple dimensions, obtain a more preferred compression requirement, and improve the subsequent compression efficiency by merging. In the present invention, the shrinkage situation characterized by the different dimensions of the shrinking city and the change relationship between different dimensions are comprehensively shrunken to adjust the compression requirements of the divided data, so that different data can be adaptively compressed and stored to improve the efficiency of data collection and sorting.
[0136] The present invention provides a system for collecting and collating shrinking city data based on multiple dimensions, including a memory and a processor. The processor executes a computing program stored in the memory to implement a method for collecting and collating shrinking city data based on multiple dimensions as described above.
[0137] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0138] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A multi-dimensional method for collecting and collating shrinking city data, characterized in that: The method comprises: Obtain characteristic time series data of each city indicator at each collection moment in the historical time period; According to the discrete distribution of each characteristic time series data on the city indicator, and the wide distribution of the characteristic time series data corresponding to the characteristic time series data of different city indicators at the same collection time, the contraction trend of each characteristic time series data is obtained; Cluster the characteristic time series data to obtain characteristic clustering clusters; in each characteristic clustering cluster, obtain the compression demand of each characteristic clustering cluster according to the correlation degree of the time series changes of different city indicators on the characteristic time series data, as well as the distribution of the shrinkage trend of the characteristic time series data and the degree of location distribution aggregation; For every two feature clusters, they are iteratively merged based on the location distribution distance, compression requirements and the closeness in shrinkage trend to obtain the final clustering result; and compressed storage is performed based on the final clustering result.
2. The multi-dimensional shrinking city data collection and sorting method according to claim 1 is characterized in that: The method for obtaining the shrinkage trend includes: For any characteristic time series data, the distribution dispersion of the characteristic time series data is obtained according to the degree of deviation of the characteristic time series data in all characteristic time series data of the city indicator; At the time of collection corresponding to the characteristic time series data, according to the difference degree of the characteristic time series data between all city indicators, the time distribution breadth of the characteristic time series data is obtained; The shrinkage trend of the characteristic time series data is obtained by combining the distribution dispersion and the time distribution breadth of the characteristic time series data; the distribution dispersion and the time distribution breadth are both positively correlated with the shrinkage trend.
3. The multi-dimensional shrinking city data collection and sorting method according to claim 2 is characterized in that: The method for acquiring the time distribution breadth includes: The sampling time corresponding to the characteristic time series data is used as the analysis time; the characteristic time series data of each two different city indicators at the analysis time is used as a distribution tuple; Calculate the difference between the two feature time series data in each distribution binary group to obtain the numerical breadth of each distribution binary group; The value breadth of all distribution pairs is combined to obtain the moment distribution breadth of the feature time series data.
4. The multi-dimensional shrinking city data collection and sorting method according to claim 1 is characterized in that: The method for obtaining the compression requirement includes: For any feature cluster, the change correlation of the feature cluster is obtained according to the change proximity between all city indicators in the feature cluster; Obtain the center point data of the feature cluster; in the feature cluster, obtain the distribution dispersion of the feature cluster according to the distribution disorder of the distance between each feature time series data and the center point data; In the feature cluster, the shrinkage difference of the feature cluster is obtained by combining the deviation degree of the shrinkage trend of each feature time series data in all feature time series data of the feature cluster; The compression requirement of the feature cluster is obtained by combining the change correlation, distribution dispersion and shrinkage difference of the feature cluster. The change correlation is positively correlated with the compression requirement, while the distribution dispersion and shrinkage difference are negatively correlated with the compression requirement.
5. The method for collecting and collating shrinking city data based on multiple dimensions according to claim 4 is characterized in that: The method for obtaining the change correlation includes: According to the local value change of each characteristic time series data in the characteristic cluster in the city indicator, the change degree of each characteristic time series data is obtained; The characteristic time series data of each city indicator in the characteristic clustering cluster are sorted in time series order to obtain the characteristic distribution sequence of each city indicator in the characteristic clustering cluster; According to the difference in the change degree of the characteristic time series data between each two city indicators in the characteristic cluster and the similarity of the change of the characteristic distribution sequence, the change correlation of the characteristic cluster is obtained.
6. The multi-dimensional shrinking city data collection and sorting method according to claim 5 is characterized in that: The step of obtaining the change correlation of the feature cluster according to the difference in the change degree of the feature time series data between each two city indicators in the feature cluster and the similarity of the change of the feature distribution sequence includes: Each two different city indicators in the characteristic cluster are regarded as a correlation analysis group; Calculate the mean value of the change of all characteristic time series data corresponding to each city indicator in the association analysis group to obtain the mean value of the change of each city indicator in the association analysis group; The difference in the mean changes of the indicators of the two cities in the association analysis group is taken as the difference in the degree of change of the association analysis group; the mean of the difference in the degree of change of all association analysis groups is calculated and negative correlation mapping is performed to obtain the similarity of the changes of the characteristic clustering cluster; Calculate the absolute value of the Pearson correlation coefficient between the characteristic distribution sequences of the two city indicators in the association analysis group to obtain the temporal correlation of the association analysis group; take the mean of the temporal correlation of all the association analysis groups as the temporal correlation of the characteristic clustering cluster; The change correlation of the feature clustering cluster is obtained by combining the change similarity and time series association of the feature clustering cluster; the change similarity and time series association are both positively correlated with the change correlation.
7. The multi-dimensional shrinking city data collection and sorting method according to claim 1 is characterized in that: The method for obtaining the final clustering result includes: The shrinkage degree of each feature cluster is obtained by combining the shrinkage trend of all feature time series data in each feature cluster; the necessity of shrinkage and merging of each feature cluster is obtained according to the difference between the shrinkage degree of each feature cluster and the maximum shrinkage degree; Negative correlation mapping is performed on the compression requirement difference between each feature clustering cluster and each other feature clustering cluster, so as to obtain the necessity of compression merging of each feature clustering cluster and each other feature clustering cluster; Negative correlation mapping is performed on the center point distance between each feature clustering cluster and each other feature clustering cluster to obtain the necessity of merging the distance between each feature clustering cluster and each other feature clustering cluster; Combining the compression merging necessity, distance merging necessity and shrinkage merging necessity of each feature clustering cluster with other feature clustering clusters, the merging necessity of each feature clustering cluster with other feature clustering clusters is obtained; iterative merging is performed based on the merging necessity between all feature clustering clusters to obtain the final clustering result.
8. The multi-dimensional shrinking city data collection and sorting method according to claim 7 is characterized in that: The merging between all feature clusters must be iteratively merged to obtain the final clustering result, including: When the necessary value for merging each feature clustering cluster with other feature clustering clusters is greater than a preset merging threshold, the corresponding feature clustering cluster is merged with other feature clustering clusters as a new feature clustering cluster; the mean necessary value for merging each feature clustering cluster with other feature clustering clusters in the new feature clustering cluster is used as the necessary value for merging the new feature clustering cluster with other feature clustering clusters; All feature clusters are iteratively merged until they cannot be merged, and each feature cluster at this time is taken as each final clustering result.
9. The multi-dimensional shrinking city data collection and sorting method according to claim 8 is characterized in that: The compressing and storing according to the final clustering result includes: Calculate the average of the compression requirements of all feature clustering clusters involved in the merger in each final clustering result as the compression index of each final clustering result; When the compression index is greater than the preset compression threshold, the corresponding final clustering result will be lossily compressed, and the remaining final clustering results will be losslessly compressed to obtain the final compressed data for storage.
10. A multi-dimensional shrinking city data collection and collation system, comprising a memory and a processor, characterized in that: The processor executes the computing program stored in the memory to implement a multi-dimensional method for collecting and collating shrinking city data as described in any one of claims 1 to 9.
