Granular computation-based spatio-temporal data encoding and decoding method and device
By compressing and encoding the spatiotemporal data, the spatiotemporal enhanced extremely entropy fuzzy encoding algorithm is used to generate target encoding results, which solves the problem of low spatiotemporal data processing efficiency and realizes fast and efficient spatiotemporal data processing.
Patent Information
- Application Number
- CN202510141611.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-08
- Publication Date
- 2025-06-03
AI Technical Summary
Spatial-temporal data processing efficiency is low, and the prior art relies on a large amount of data to lead to long processing time.
The spatiotemporal data encoding and decoding method based on particle calculation is adopted, and the spatiotemporal data is compressed and normalized, and the spatiotemporal enhanced extreme entropy fuzzy encoding algorithm is used for encoding, multiple encoding centers and membership matrices are generated, and the target encoding results with the minimum error are selected for spatiotemporal data prediction.
It greatly reduces the time required to process massive spatiotemporal data and improves the efficiency of spatiotemporal data processing.
Smart Images

Figure CN120090645A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer big data processing, and in particular, to a spatio-temporal data encoding and decoding method and device based on granular computing. Background Technique
[0002] Spatio-temporal data includes time data and space data, and spatio-temporal data is a way of expressing information in a spatial environment. Spatio-temporal data involves various types of data, such as smart city traffic construction, meteorological data analysis, pedestrian flow prediction, remote sensing satellite data analysis, etc. Spatio-temporal data not only has obvious spatial distribution characteristics, but also has characteristics such as huge data volume, non-linearity, and time-variation, making it of great significance to mine and analyze spatio-temporal data. For example, mining spatio-temporal data in the field of urban planning can help analyze problems such as traffic congestion and pedestrian flow distribution, optimize the urban traffic network, and improve the urban management level. Mining spatio-temporal data in the field of environmental protection can monitor air quality, predict natural disasters, etc., and provide a scientific basis for the decisions corresponding to the monitoring and prediction.
[0003] Currently, the processing of spatio-temporal data usually adopts traditional algorithms, such as empirical methods, regression analysis, time series, exponential smoothing method, support vector machine, autoregressive integrated moving average and autoregressive integrated moving average model in autoregression. However, traditional algorithms rely on a large amount of data when processing spatio-temporal data, and processing spatio-temporal data through a large amount of data will consume a lot of time, resulting in low efficiency of spatio-temporal data processing. Summary of the Invention
[0004] The purpose of the embodiments of the present invention is to provide a spatio-temporal data encoding and decoding method and device based on granular computing to solve the problem of low efficiency of spatio-temporal data processing.
[0005] To solve the above technical problems, the embodiments of the present invention provide the following technical solutions:
[0006] The first aspect of the present invention provides a spatio-temporal data encoding and decoding method based on granular computing, and the method includes:
[0007] Perform compression processing and normalization processing on spatio-temporal data to obtain processed spatio-temporal data;
[0008] Use the spatio-temporal enhanced maximum entropy fuzzy coding algorithm to encode the processed spatio-temporal data to obtain a plurality of coding centers and a plurality of membership matrices, and determine a plurality of decoded spatio-temporal data according to the plurality of coding centers, the plurality of membership matrices and the fuzzy coefficient, and determine a plurality of errors corresponding to the plurality of decoded spatio-temporal data and the processed spatio-temporal data respectively. The spatio-temporal enhanced maximum entropy fuzzy coding algorithm is an algorithm generated based on the initialized membership matrix, the processed spatio-temporal data, a plurality of Euclidean distance coefficients and the maximum entropy factor;
[0009] Select the minimum error among multiple errors, and use the target membership matrix and the target coding center corresponding to the minimum error as the target coding result, which is used for spatio-temporal data prediction.
[0010] The second aspect of the present invention provides a spatio-temporal data encoding and decoding device based on granular computing, the device includes:
[0011] A processing module, configured to perform compression processing and normalization processing on spatio-temporal data to obtain processed spatio-temporal data;
[0012] An encoding and determination module, configured to use a spatio-temporal enhanced maximum entropy fuzzy encoding algorithm to encode the processed spatio-temporal data to obtain multiple coding centers and multiple membership matrices, and determine multiple decoded spatio-temporal data according to the multiple coding centers, multiple membership matrices and fuzzy coefficients, and determine multiple errors corresponding to the multiple decoded spatio-temporal data and the processed spatio-temporal data respectively. The spatio-temporal enhanced maximum entropy fuzzy encoding algorithm is an algorithm generated based on an initialized membership matrix, processed spatio-temporal data, multiple Euclidean distance coefficients and a maximum entropy factor;
[0013] A selection module, configured to select the minimum error among multiple errors, and use the target membership matrix and the target coding center corresponding to the minimum error as the target coding result, which is used for spatio-temporal data prediction.
[0014] Compared with the prior art, a spatio-temporal data encoding and decoding method and device provided by the present invention perform compression processing and normalization processing on spatio-temporal data to obtain processed spatio-temporal data; use a spatio-temporal enhanced maximum entropy fuzzy encoding algorithm to encode the processed spatio-temporal data to obtain multiple coding centers and multiple membership matrices, determine multiple decoded spatio-temporal data according to the multiple coding centers, multiple membership matrices and fuzzy coefficients, and determine multiple errors corresponding to the multiple decoded spatio-temporal data and the processed spatio-temporal data respectively; select the minimum error among multiple errors, and use the target membership matrix and the target coding center corresponding to the minimum error as the target coding result. In this way, the processed spatio-temporal data can be encoded by the spatio-temporal enhanced maximum entropy fuzzy encoding algorithm, greatly reducing the time required to process a large amount of spatio-temporal data and improving the efficiency of spatio-temporal data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0016] Figure 1Schematically shows a flowchart of a spatio-temporal data encoding and decoding method based on granular computing;
[0017] Figure 2 Schematically shows a schematic diagram of the spatial distribution after encoding the synthesized spatio-temporal data;
[0018] Figure 3 Schematically shows a schematic diagram of the effect of encoding using the spatio-temporal enhanced maximum entropy fuzzy encoding algorithm of the present invention;
[0019] Figure 4 Schematically shows a schematic diagram of the encoding effect of an existing enhanced fuzzy C-means granulation model;
[0020] Figure 5 Schematically shows a structural diagram of a spatio-temporal data encoding and decoding device based on granular computing. Detailed implementation mode
[0021] Hereinafter, exemplary embodiments of the present invention will be described in more detail with reference to the accompanying drawings. Although the exemplary embodiments of the present invention are shown in the drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the present invention can be more thoroughly understood and the scope of the present invention can be fully conveyed to those skilled in the art.
[0022] It should be noted that: unless otherwise specified, the technical terms or scientific terms used in the present invention should have the ordinary meaning understood by those skilled in the art to which the present invention belongs.
[0023] Hereinafter, the method in the embodiments of the present invention will be described in detail.
[0024] Figure 1 Schematically shows a flowchart of the spatio-temporal data encoding and decoding method based on granular computing in the embodiments of the present invention. Refer to Figure 1 As shown, the spatio-temporal data encoding and decoding method based on granular computing may include:
[0025] S101. Perform compression processing and normalization processing on the spatio-temporal data to obtain the processed spatio-temporal data.
[0026] Among them, the spatio-temporal data includes time data and space data, and the compression processing includes discrete Fourier transform, piecewise aggregate approximation, and discrete wavelet transform.
[0027] The processed spatio-temporal data includes processed time data and normalized space data, and the processed time data includes first time data, second time data, and third time data.
[0028] Spatio-temporal data refers to data that has specific attributes and changing patterns in both time and space. Spatio-temporal data includes data information in two dimensions: time data and space data. Spatio-temporal data can be used to describe and analyze the changes and associations of things in time and space. In spatio-temporal data, time data represents the changing process and sequence of the data, and time data can be discrete time points or continuous time periods. Space data represents the position or spatial range of the data, and space data can be different spatial elements such as points, lines, surfaces, or volumes.
[0029] Spatio-temporal data can be represented as X1, X2,..., Xn′, where n′ is the total number of spatio-temporal data, and Xn′ is the n′-th spatio-temporal data. Each spatio-temporal data contains time data and space data. Each spatio-temporal data can be represented by concatenating time data and space data. For example, the k-th spatio-temporal data Xk in spatio-temporal data is represented as Xk = [Xk(s)|Xk(t)]T, where Xk(s) is the k-th space data and Xk(t) is the k-th time data. For spatio-temporal data with multi-dimensional features, it can be defined as: Assume that each time data has q features and each space data has r features, and the expression of spatio-temporal data is:
[0030] Xk = [Xk(s)|Xk(t)]T
[0031] = [Xk1(s), …, Xkr(s)|Xk1(t), …, Xkq(t)]T;
[0032] where Xk is the k-th spatio-temporal data, Xk1(s) is the first feature in the k-th space data, Xkr(s) is the r-th feature in the k-th space data, Xk1(t) is the first feature in the k-th time data, Xkq(t) is the q-th feature in the k-th time data, s represents space, and t represents time.
[0033] Specifically, the spatio-temporal data is processed by compression and normalization to obtain the processed spatio-temporal data, including:
[0034] Step A1: Perform discrete Fourier transform on the time data to obtain the first time data.
[0035] Performing discrete Fourier transform (Discrete Fourier Transform, DFT) on the time data, the obtained first time data can be represented in different lengths. For example, the first time data is represented as time series data with lengths of 8, 16, 32, etc.
[0036] Step A2: Perform piecewise aggregate approximation on the time data to obtain the second time data.
[0037] Perform piecewise aggregate approximation (PAA) on the time data, and the obtained second time data can be represented in different lengths. For example, represent the second time data as time series data with lengths of 8, 16, 32, etc.
[0038] Step A3: Perform discrete wavelet transform on the time data to obtain third time data.
[0039] Perform discrete wavelet transform (DWT) on the time data, and the obtained third time data can be represented in different lengths. For example, represent the third time data as time series data with lengths of 8, 16, 32, etc.
[0040] Process the time data in the spatio-temporal data using DFT, PAA, and DWT respectively, and three different time data, namely the first time data, the second time data, and the third time data, can be obtained.
[0041] Adopt different data representation methods, namely discrete Fourier transform, piecewise aggregate approximation, and discrete wavelet transform. In the case of processing a large amount of spatio-temporal data, the use of spatio-temporal data can be reduced, making the processing of spatio-temporal data more efficient.
[0042] Step A4: Normalize the spatial data to obtain normalized spatial data.
[0043] Normalize the spatial data to represent the spatial data in a two-dimensional coordinate system, and obtain the horizontal and vertical coordinate points of the spatial data in the two-dimensional coordinate system.
[0044] S102: Use the spatio-temporal enhanced maximum entropy fuzzy coding algorithm to encode the processed spatio-temporal data to obtain multiple coding centers and multiple membership matrices. According to the multiple coding centers, multiple membership matrices, and fuzzy coefficients, determine multiple decoded spatio-temporal data, and determine multiple errors corresponding to the multiple decoded spatio-temporal data and the processed spatio-temporal data respectively.
[0045] Among them, the spatio-temporal enhanced maximum entropy fuzzy coding algorithm is an algorithm generated based on the initialized membership matrix, the processed spatio-temporal data, multiple Euclidean distance coefficients, and the maximum entropy factor.
[0046] The multiple coding centers include the first coding center, the multiple membership matrices include the first membership matrix, and the multiple decoded spatio-temporal data include the first decoded spatio-temporal data. The multiple Euclidean distance coefficients include the current Euclidean distance coefficient and multiple target Euclidean distance coefficients including the next Euclidean distance coefficient, and the multiple errors include the first error and multiple second errors.
[0047] Multiple Euclidean distance coefficients are coefficients set according to requirements. For example, multiple Euclidean distance coefficients can be 0, 0.01, 0.02, …, 1.
[0048] Specifically, using the Spatiotemporal Augmented Maximum Entropy Fuzzy Cluster (STMEC) algorithm, encode the processed spatiotemporal data to obtain multiple coding centers and multiple membership matrices. According to the multiple coding centers, multiple membership matrices, and fuzzy coefficients, determine multiple decoded spatiotemporal data, and determine multiple errors between the multiple decoded spatiotemporal data and the processed spatiotemporal data respectively, including:
[0049] Step B1: Determine the current coding center according to the initialized membership matrix and the processed spatiotemporal data.
[0050] The processed spatiotemporal data includes first-time data, second-time data, third-time data, and normalized spatial data.
[0051] The formula for determining the current coding center is the same as the formula for determining the next coding center below, except that the current membership matrix below is replaced with the initialized membership matrix.
[0052] The formula for determining the current coding center is:
[0053]
[0054] where vi0 is the i-th current coding center, xk is the k-th processed spatiotemporal data, uik0 is the initialized membership matrix for the k-th processed spatiotemporal data to be classified to the i-th current coding center, and n is the total number of processed spatiotemporal data.
[0055] Step B2: Determine the current Euclidean distance from the processed spatiotemporal data to the current coding center according to the processed spatiotemporal data, the current Euclidean distance coefficient, and the current coding center.
[0056] The formula for the current Euclidean distance from the processed spatiotemporal data to the current coding center is:
[0057]
[0058] where vi0 is the i-th current coding center, xk is the k-th processed spatiotemporal data, The current Euclidean distance from the spatio-temporal data processed at the k-th to the i-th current coding center, vi0(s) is the normalized spatial data corresponding to the i-th current coding center, vi0(t) is the processed time data corresponding to the i-th current coding center, xk(s) is the normalized spatial data, xk(t) is the processed time data, s is space, t is time, and λ is the current Euclidean distance coefficient.
[0059] λ is used to control the influence of the processed spatio-temporal data in the Euclidean distance. λ helps to achieve a reasonable balance between the influences of the normalized spatial data and the processed time data. When λ = 0, the normalized spatial data is considered and the processed time data is completely ignored. The higher the value of λ, the greater the influence of the processed time data in the processed spatio-temporal data on the current Euclidean distance.
[0060] λ is used for iterative processing. By finding the most suitable λ, the optimal coding effect of the spatio-temporal data can be further found.
[0061] Step B3: Determine the current objective function based on the current Euclidean distance, the initialized membership matrix, and the maximum entropy factor.
[0062] The formula for the current objective function is:
[0063]
[0064] where J0 is the current objective function, vi0 is the i-th current coding center, xk is the k-th processed spatio-temporal data, is the current Euclidean distance from the k-th processed spatio-temporal data to the i-th current coding center, uik0 is the initialized membership matrix for the k-th processed spatio-temporal data being classified to the i-th current coding center, γ is the maximum entropy factor, c is the total number of coding centers, and n is the total number of processed spatio-temporal data.
[0065] Step B4: Determine the current membership matrix based on the current Euclidean distance and the maximum entropy factor.
[0066] The formula for the current membership matrix is:
[0067]
[0068] where uik is the current membership matrix for the k-th processed spatio-temporal data being classified to the i-th next coding center, vi0 is the i-th current coding center, xk is the k-th processed spatio-temporal data, is the current Euclidean distance from the k-th processed spatio-temporal data to the i-th current coding center, γ is the maximum entropy factor, and n is the total number of processed spatio-temporal data.
[0069] Step B5: Determine the next coding center according to the current membership matrix and the processed spatio-temporal data.
[0070] Specifically, determining the next coding center according to the current membership matrix and the processed spatio-temporal data includes:
[0071] Determine the next coding center according to the current membership matrix and the processed spatio-temporal data by using the following first formula:
[0072]
[0073] where \(v_i\) is the \(i\)-th next coding center, \(x_k\) is the \(k\)-th processed spatio-temporal data, \(u_{ik}\) is the current membership matrix in which the \(k\)-th processed spatio-temporal data is classified to the \(i\)-th next coding center, and \(n\) is the total number of the processed spatio-temporal data.
[0074] Step B6: Determine the next Euclidean distance from the processed spatio-temporal data to the next coding center according to the processed spatio-temporal data, the current Euclidean distance coefficient, and the next coding center.
[0075] Step B7: Determine the next objective function according to the next Euclidean distance, the current membership matrix, and the maximum entropy factor.
[0076] Specifically, determining the next objective function according to the next Euclidean distance, the current membership matrix, and the maximum entropy factor includes:
[0077] Determine the next objective function according to the next Euclidean distance, the current membership matrix, and the maximum entropy factor by using the following second formula:
[0078]
[0079] where \(J\) is the next objective function, \(v_i\) is the \(i\)-th next coding center, \(x_k\) is the \(k\)-th processed spatio-temporal data, is the next Euclidean distance from the \(k\)-th processed spatio-temporal data to the \(i\)-th next coding center, \(u_{ik}\) is the current membership matrix in which the \(k\)-th processed spatio-temporal data is classified to the \(i\)-th next coding center, \(\gamma\) is the maximum entropy factor, \(c\) is the total number of multiple coding centers, \(n\) is the total number of the processed spatio-temporal data, \(v_i(s)\) is the normalized spatial data corresponding to the \(i\)-th next coding center, \(v_i(t)\) is the processed time data corresponding to the \(i\)-th next coding center, \(x_k(s)\) is the normalized spatial data, \(x_k(t)\) is the processed time data, \(s\) is space, \(t\) is time, and \(\lambda\) is the current Euclidean distance coefficient.
[0080] Step B8: Determine the next membership matrix according to the next Euclidean distance and the maximum entropy factor.
[0081] Specifically, determining the next membership matrix according to the next Euclidean distance and the maximum entropy factor includes:
[0082] Determine the next membership matrix according to the next Euclidean distance and the maximum entropy factor by using the following third formula:
[0083]
[0084] where \(u_{ik}'\) is the next membership matrix of the spatio-temporal data of the \(k\)-th process classified to the \(i\)-th next coding center, \(v_i\) is the \(i\)-th next coding center, \(x_k\) is the spatio-temporal data of the \(k\)-th process, is the next Euclidean distance from the spatio-temporal data of the \(k\)-th process to the \(i\)-th next coding center, \(\gamma\) is the maximum entropy factor, and \(n\) is the total number of spatio-temporal data processed.
[0085] Step B9: Take the next membership matrix as the current membership matrix, and return to the step of determining the next coding center according to the current membership matrix and the processed spatio-temporal data, and stop the iteration until the calculated objective function is the same as the previous objective function, so as to obtain the first coding center and the first membership matrix corresponding to the current Euclidean distance coefficient.
[0086] Specifically, update the current membership matrix in Step B5 to the next membership matrix, and return to execute Step B5, that is, repeat Steps B5 to B8 until the calculated objective function is the same as the previous objective function, and stop the iteration to obtain the first coding center and the first membership matrix corresponding to the current Euclidean distance coefficient.
[0087] The calculated objective function includes the next objective function, and the previous objective function includes the current objective function.
[0088] Steps B1 to B9 complete an iteration under a Euclidean distance coefficient, that is, an iteration under the current Euclidean distance coefficient \(\lambda\), and obtain the first coding center and the first membership matrix corresponding to the current Euclidean distance coefficient \(\lambda\).
[0089] Step B10: Determine the first decoded spatio-temporal data corresponding to the current Euclidean distance coefficient according to the first coding center, the first membership matrix, and the fuzzy coefficient.
[0090] Specifically, determining the first decoded spatio-temporal data corresponding to the current Euclidean distance coefficient according to the first coding center, the first membership matrix, and the fuzzy coefficient includes:
[0091] Determine the first decoded spatio-temporal data corresponding to the current Euclidean distance coefficient according to the first coding center, the first membership matrix, and the fuzzy coefficient by using the following fourth formula:
[0092]
[0093] Among them, is the k-th first decoded spatio-temporal data, m is the fuzzy coefficient, is the first membership degree matrix that the k-th processed spatio-temporal data is classified into the i-th next coding center, vi1 is the i-th first coding center, and c is the total number of coding centers.
[0094] The first decoded spatio-temporal data under the current Euclidean distance coefficient λ is obtained through step B10.
[0095] Step B11: Determine the first error between the first decoded spatio-temporal data and the processed spatio-temporal data.
[0096] The first decoded spatio-temporal data includes the first decoded time data and the first decoded space data.
[0097] The formula for the first error between the first decoded spatio-temporal data and the processed spatio-temporal data is:
[0098]
[0099] Among them, E(λ) is the first error between the first decoded spatio-temporal data and the processed spatio-temporal data, xk is the k-th processed spatio-temporal data, is the k-th first decoded spatio-temporal data, xk(s) is the k-th normalized space data, xk(t) is the k-th processed time data, is the k-th first decoded time data, is the k-th first decoded space data, and n is the total number of processed spatio-temporal data.
[0100] The first error between the first decoded spatio-temporal data and the processed spatio-temporal data under the current Euclidean distance coefficient λ is determined through step B10 and step B11.
[0101] Step B12: Take the next Euclidean distance coefficient as the current Euclidean distance coefficient, and return to the step of determining the current coding center according to the initialized membership degree matrix and the processed spatio-temporal data, and stop the iteration until the next Euclidean distance coefficient reaches the preset value, and obtain multiple second errors corresponding to multiple target Euclidean distance coefficients.
[0102] After determining the first error between the first decoded spatio-temporal data and the processed spatio-temporal data under the current Euclidean distance coefficient λ, it is necessary to determine the errors of other Euclidean distance coefficients except the current Euclidean distance coefficient λ among the multiple Euclidean distance coefficients, that is, multiple second errors corresponding to multiple target Euclidean distance coefficients. Each target Euclidean distance coefficient corresponds to a second error.
[0103] Update the current Euclidean distance coefficient to the next Euclidean distance coefficient, and return to execute step B1, that is, repeat steps B1 to B11 until the iteration stops when the next Euclidean distance coefficient reaches a preset value, and obtain multiple second errors corresponding to multiple target Euclidean distance coefficients.
[0104] By iterating multiple Euclidean distance coefficients, the error corresponding to each Euclidean distance coefficient is determined.
[0105] Continuing with the example in S102, the preset value can be 1, and no specific limitation is imposed on the preset value here.
[0106] The operations from step B1 to step B11 need to be performed for each Euclidean distance coefficient. That is to say, a corresponding current coding center and a next coding center will be obtained for each Euclidean distance coefficient. When there are i Euclidean distance coefficients, there are i corresponding current coding centers and next coding centers.
[0107] S103. Select the minimum error among multiple errors, and use the target membership matrix and the target coding center corresponding to the minimum error as the target coding result.
[0108] Among them, the target coding result is used for spatio-temporal data prediction. The multiple decoded spatio-temporal data also includes the target decoded spatio-temporal data.
[0109] Specifically, selecting the minimum error among multiple errors and using the target membership matrix and the target coding center corresponding to the minimum error as the target coding result includes:
[0110] Step C1: Select the minimum error among the first error and multiple second errors.
[0111] The selection of the minimum error can be determined by comparing the first error with multiple second errors, or by sorting the first error and multiple second errors. No specific limitation is imposed on the selection method of the minimum error here.
[0112] Step C2: Query the spatio-temporal data of the target decoding corresponding to the minimum error.
[0113] Step C3: Use the target membership matrix and the target coding center corresponding to the spatio-temporal data of the target decoding as the target coding result.
[0114] In addition to steps C2 and C3, other methods can also be used to determine the target membership matrix and the target coding center. For example, each Euclidean distance coefficient corresponds to an error. After determining the minimum error, the corresponding Euclidean distance coefficient can be determined through the minimum error, and then the membership matrix and the coding center under this Euclidean distance coefficient can be determined, and the membership matrix and the coding center under this Euclidean distance coefficient are determined as the target membership matrix and the target coding center.
[0115] The spatio-temporal data encoding and decoding method based on granular computing of the present invention has important practical application value in the fields of satellite weather prediction, urban traffic flow prediction, and smart city construction. Through the application of the spatio-temporal data encoding and decoding method based on granular computing of the present invention, on the basis of ensuring the encoding effect, the time cost of spatio-temporal data processing can be effectively reduced, thereby bringing convenience and efficiency improvement to related fields. The spatio-temporal data encoding and decoding method based on granular computing of the present invention not only promotes the development of data processing technology, but also provides new tools and methods for the research and application of related fields.
[0116] To verify the efficiency of the spatio-temporal data encoding and decoding method based on granular computing of the present invention in spatio-temporal data processing, synthetic spatio-temporal data and real spatio-temporal data are used for experiments respectively. At the same time, encoding experiments are carried out for each type of spatio-temporal data.
[0117] In the synthetic spatio-temporal data: Figure 2 A schematic diagram showing the spatial distribution after encoding the synthetic spatio-temporal data is schematically shown. The horizontal and vertical coordinates represent the spatial positions where the synthetic spatio-temporal data is located. Among them, the horizontal coordinate represents the position in the horizontal direction where the synthetic spatio-temporal data is located, and the vertical coordinate represents the position in the vertical direction where the synthetic spatio-temporal data is located. In this embodiment, first, outlier processing is performed on the synthetic spatio-temporal data, and then the discrete Fourier transform (DFT(32)), piecewise aggregate approximation (PAA(32)), and discrete wavelet transform (DWT(32)) methods are used to process the synthetic spatio-temporal data respectively, and the corresponding first time data, second time data, and third time data are obtained respectively. Then, STMEC is used to encode the first time data, second time data, and third time data to obtain 5 encoding centers and 5 membership matrices. See Figure 2 as shown Figure 2 There are 5 types of synthetic spatio-temporal data, and each type of synthetic spatio-temporal data is represented by a different symbol, specifically 5 diamonds, 5 circles, 5 pentagrams, 5 triangles, and 5 squares. There is an encoding center corresponding to each type of synthetic spatio-temporal data. The 5 encoding centers are adjacent in space and are also relatively similar in time data. From Figure 2 it can be seen that STMEC can encode the processed spatio-temporal data well, and ensure that it is similar within the encoding center and different between encoding centers, meeting the reasonable granularity criterion.
[0118] Specifically, for the synthesized spatio-temporal data, each synthesized spatio-temporal data has time data with a length of 256. Take one of the synthesized spatio-temporal data and the first time data, the second time data, and the third time data obtained through processing. Perform DFT(32) representation, PAA(32) representation, and DWT(32) representation on the taken synthesized spatio-temporal data, the first time data, the second time data, and the third time data obtained through processing respectively. Among them, DFT(32) is the discrete Fourier transform with a length of 32, PAA(32) is the piecewise aggregate approximation with a length of 32, and DWT(32) is the discrete wavelet transform with a length of 32. For the DFT(32) representation, the original synthesized spatio-temporal data is relatively chaotic. After the DFT(32) representation, the coefficients of the discrete Fourier representation of the data are obtained, which is quite different from the original synthesized spatio-temporal data. However, the coefficients of the discrete Fourier representation of the data contain the characteristics of the original synthesized spatio-temporal data. For the PAA(32) representation, the general trend is relatively close to the original synthesized spatio-temporal data because PAA(32) only takes the average value within the interval. The DWT(32) representation can also well represent the characteristics of the original synthesized spatio-temporal data and at the same time reduces the use of a large amount of spatial data.
[0119] In the experiment, the enhanced fuzzy C-means granulation model (Spatiotemporal Augmented Fuzzy C-Means, STFCM) is used as a comparative algorithm, and at the same time, the STMEC of the present invention is adopted to perform encoding and decoding analysis on the synthesized spatio-temporal data respectively. In this experiment, it is shown how λ affects the generation of time data and spatial data in the spatio-temporal data. For STFCM, the fuzzy coefficient m is set to 2, and the distance metric function is set to the Euclidean additive distance. For STMEC, the maximum entropy factor γ is set to 3.5. Table 1 visualizes the spatial data corresponding to different data representations and the coding errors generated by the optimal value of λ. Among them, the total number of multiple coding centers, that is, the granulation number c = 5. In each column corresponding to STFCM and STMEC in Table 1, the first value is the optimal value of the Euclidean distance coefficient λ, and the second value is the coding error value generated by the optimal value of λ, that is, the minimum error.
[0120] Table 1 Encoding on Synthesized Spatio-Temporal Data with Granulation Number c = 5
[0121] Data representation STFCM STMEC DFT(8) 0.2,92.7876 0.4,47.8757 DFT(16) 0.1,25.8013 0.6,14.9766 DFT(32) 0.2,7.0547 0.5,4.0000 PAA(8) 0.1,0.2790 0.5,0.2725 PAA(16) 0.1,0.2801 0.3,0.2814 PAA(32) 0.1,0.2955 0.3,0.2950 DWT(8) 0.2,0.4991 0.2,0.2951 DWT(16) 0.1,0.4835 0.1,0.2961 DWT(32) 0.1,0.4979 0.2,0.2957
[0122] As can be seen from Table 1 above, among different data representation methods, namely DFT(8), DFT(16), DFT(32), PAA(8), PAA(16), PAA(32), DWT(8), DWT(16), and DWT(32), the encoding effect of the STMEC of the present invention is better than that of the STFCM model, and the improvement in the encoding effect of STMEC is more than 5%.
[0123] Figure 3 Schematically shows a schematic diagram of the encoding effect using the spatio-temporal enhanced maximum entropy fuzzy coding algorithm of the present invention. Figure 4 Schematically shows a schematic diagram of the encoding effect of the existing enhanced fuzzy C-means granulation model. Figure 3 and Figure 4 Correspondingly represent some differences that occur when using STFCM and STMEC to encode synthetic spatio-temporal data. Figure 3 and Figure 4 The horizontal and vertical coordinates represent the spatial position of the synthetic spatio-temporal data. Among them, the horizontal coordinate represents the position in the horizontal direction of the synthetic spatio-temporal data, and the vertical coordinate represents the position in the vertical direction of the synthetic spatio-temporal data. It can be understood that the longitude and latitude of the synthetic spatio-temporal data are transformed onto a two-dimensional coordinate system. Figure 3 The 5 diamonds, 6 circles, 5 pentagrams, 4 triangles, and 5 squares in respectively represent different synthetic spatio-temporal data, and the cross symbol in each synthetic spatio-temporal data represents the encoding center. Combining Figure 3 and Figure 4 It can be seen that Figure 3 The encoding effect in the upper right corner of and Figure 4 The encoding effect in the upper right corner of are inconsistent. Specifically, Figure 3 There are 4 triangles and 6 circles in, but in Figure 4 There are 5 triangles and 5 squares in, Figure 4 Each synthetic spatio-temporal data in is 5 data points, indicating that Figure 4 The encoding effect of is more dependent on the spatial position, while Figure 3 The encoding effect in takes into account not only the spatial position but also time.
[0124] The spatio-temporal data encoding and decoding method based on granular computing of the present invention can be applied to the Alberta temperature dataset, and the Alberta temperature dataset includes the daily average temperature. The Alberta temperature dataset provides updated agricultural-related data for agriculture and rural development. The Alberta temperature dataset includes daily temperature, humidity, precipitation, etc. These Alberta temperature datasets are recorded by many stations located in Alberta of some countries. For each station, the geographical coordinates in the form of latitude and longitude are provided. These Alberta temperature datasets are available on existing websites. On this existing website, the end user can select the desired stations and relevant agricultural-related variables to download the Alberta temperature dataset of each station. The present invention has downloaded the Alberta temperature datasets of 121 stations in total, and the time span is from January 1, 2012 to January 1, 2014.
[0125] The daily average temperature data recorded in 2012 is divided into 4 seasons (spring, summer, autumn, and winter). An encoding experiment is carried out on the daily average temperature data recorded in 2012. The number of Alberta temperature datasets ranges from 2 to 5. For each representation method (discrete Fourier transform, piecewise aggregate approximation, and discrete wavelet transform), a representation of length 8 is selected. Tables 2 and 3 show the encoding effects of STFCM and STMEC. Table 2 shows the λ and the minimum encoding error of STFCM for different seasons and different numbers of clusters. Table 3 shows the λ and the minimum encoding error of STMEC for different seasons and different numbers of clusters. It can be seen from Tables 2 and 3 that when forming more Alberta temperature datasets, the encoding error will be smaller, which is also in line with expectations, because the more the number of Alberta temperature datasets, according to the reasonable granularity criterion, the smaller the granules will be, and the result will be closer to the true value. And Tables 2 and 3 also show the superiority of the method of the present invention compared with the existing STFCM method. It can be seen that under the above different data representation methods of DFT(8), PAA(8), and DWT(8), the effect of STMEC is more than twice better than that of STFCM. In Tables 2 and 3, the total number c of encoding centers is 2, 3, 4, and 5 respectively. The first numerical value in the second, third, fourth, and fifth columns of Tables 2 and 3 is the optimal value of the Euclidean distance coefficient λ, and the second numerical value is the minimum encoding error, that is, the minimum error.
[0126] Table 2 λ and minimum encoding error of STFCM for different seasons and different numbers of clusters
[0127]
[0128]
[0129] Table 3 λ and minimum encoding error of STMEC for different seasons and different numbers of clusters
[0130]
[0131]
[0132] Based on the above Figure 1 As can be seen from the above implementation manner, in the embodiment of the present invention, spatio-temporal data is subjected to compression processing and normalization processing to obtain processed spatio-temporal data; the spatio-temporal enhanced maximum entropy fuzzy coding algorithm is used to code the processed spatio-temporal data to obtain a plurality of coding centers and a plurality of membership matrices, and according to the plurality of coding centers, the plurality of membership matrices and the fuzzy coefficients, a plurality of decoded spatio-temporal data are determined, and a plurality of errors corresponding to the plurality of decoded spatio-temporal data and the processed spatio-temporal data respectively are determined. The spatio-temporal enhanced maximum entropy fuzzy coding algorithm is an algorithm generated based on the initialized membership matrix, the processed spatio-temporal data, a plurality of Euclidean distance coefficients and the maximum entropy factor; the minimum error is selected from the plurality of errors, and the target membership matrix and the target coding center corresponding to the minimum error are used as the target coding result. In this way, the processed spatio-temporal data can be coded by the spatio-temporal enhanced maximum entropy fuzzy coding algorithm, greatly reducing the time required for processing a large amount of spatio-temporal data and improving the efficiency of spatio-temporal data processing.
[0133] Based on the same inventive concept, as an implementation of the above spatio-temporal data encoding and decoding method based on granular computing, the embodiment of the present invention further provides a spatio-temporal data encoding and decoding device based on granular computing. Figure 5 For the structural diagram of the device in the embodiment of the present invention, see Figure 5 As shown, the device may include:
[0134] A processing module 501, configured to perform compression processing and normalization processing on spatio-temporal data to obtain processed spatio-temporal data;
[0135] An encoding and determination module 502, configured to use the spatio-temporal enhanced maximum entropy fuzzy coding algorithm to code the processed spatio-temporal data to obtain a plurality of coding centers and a plurality of membership matrices, and according to the plurality of coding centers, the plurality of membership matrices and the fuzzy coefficients, determine a plurality of decoded spatio-temporal data, and determine a plurality of errors corresponding to the plurality of decoded spatio-temporal data and the processed spatio-temporal data respectively. The spatio-temporal enhanced maximum entropy fuzzy coding algorithm is an algorithm generated based on the initialized membership matrix, the processed spatio-temporal data, a plurality of Euclidean distance coefficients and the maximum entropy factor;
[0136] A selection module 503, configured to select the minimum error from the plurality of errors, and use the target membership matrix and the target coding center corresponding to the minimum error as the target coding result, and the target coding result is used for spatio-temporal data prediction.
[0137] The processing module 501 is specifically configured to perform discrete Fourier transform on the time data to obtain first time data; perform piecewise aggregate approximation on the time data to obtain second time data; perform discrete wavelet transform on the time data to obtain third time data; perform normalization processing on the spatial data to obtain normalized spatial data; the processed spatio-temporal data includes the processed time data and the normalized spatial data, and the processed time data includes the first time data, the second time data, and the third time data.
[0138] The selection module 503 is specifically configured to select the minimum error from the first error and multiple second errors; query the target decoded spatio-temporal data corresponding to the minimum error; use the target membership matrix and the target coding center corresponding to the target decoded spatio-temporal data as the target coding result; the multiple decoded spatio-temporal data also includes the target decoded spatio-temporal data.
[0139] It should be noted here that: the above description of the embodiment of the spatio-temporal data encoding and decoding device based on granular computing is similar to the description of the above embodiment of the spatio-temporal data encoding and decoding method based on granular computing, and has beneficial effects similar to those of the embodiment of the spatio-temporal data encoding and decoding method based on granular computing. For the technical details not disclosed in the embodiment of the spatio-temporal data encoding and decoding device based on granular computing of the present invention, please refer to the description of the embodiment of the spatio-temporal data encoding and decoding method based on granular computing of the present invention for understanding.
[0140] The above is only the specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present invention can easily think of changes or substitutions, which should all be covered within the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A spatiotemporal data encoding and decoding method based on granular computing, characterized in that: include: Performing compression and normalization processing on the spatiotemporal data to obtain processed spatiotemporal data; The processed spatiotemporal data are encoded using a spatiotemporal enhanced maximum entropy fuzzy coding algorithm to obtain a plurality of coding centers and a plurality of membership matrices, and a plurality of decoded spatiotemporal data are determined according to the plurality of coding centers, the plurality of membership matrices and fuzzy coefficients, and a plurality of errors corresponding to the plurality of decoded spatiotemporal data and the processed spatiotemporal data are determined, wherein the spatiotemporal enhanced maximum entropy fuzzy coding algorithm is an algorithm generated based on an initialized membership matrix, the processed spatiotemporal data, a plurality of Euclidean distance coefficients and a maximum entropy factor; A minimum error is selected from the multiple errors, and a target membership matrix and a target coding center corresponding to the minimum error are used as a target coding result, and the target coding result is used for spatiotemporal data prediction.
2. The spatiotemporal data encoding and decoding method based on granular computing according to claim 1, characterized in that: The spatiotemporal data includes time data and space data, and the compression processing includes discrete Fourier transform, piecewise aggregation approximation and discrete wavelet transform.
3. The spatiotemporal data encoding and decoding method based on granular computing according to claim 2, characterized in that: The processed spatiotemporal data includes processed time data and normalized spatial data, the processed time data includes first time data, second time data and third time data, and the compression and normalization processing of the spatiotemporal data to obtain the processed spatiotemporal data includes: Performing discrete Fourier transform on the time data to obtain the first time data; Performing segmented aggregation and approximation on the time data to obtain the second time data; Performing discrete wavelet transform on the time data to obtain the third time data; The spatial data is normalized to obtain the normalized spatial data.
4. The spatiotemporal data encoding and decoding method based on granular computing according to claim 3, characterized in that: The multiple encoding centers include a first encoding center, the multiple membership matrices include a first membership matrix, the multiple decoded spatiotemporal data include first decoded spatiotemporal data, the multiple Euclidean distance coefficients include a current Euclidean distance coefficient and a plurality of target Euclidean distance coefficients including a next Euclidean distance coefficient, and the multiple errors include a first error and a plurality of second errors; The method comprises: encoding the processed spatiotemporal data using a spatiotemporal enhanced maximum entropy fuzzy coding algorithm to obtain a plurality of coding centers and a plurality of membership matrices; determining a plurality of decoded spatiotemporal data according to the plurality of coding centers, the plurality of membership matrices and fuzzy coefficients; and determining a plurality of errors corresponding to the processed spatiotemporal data respectively from the plurality of decoded spatiotemporal data, including: Determining a current encoding center according to the initialized membership matrix and the processed spatiotemporal data; Determining a current Euclidean distance from the processed spatiotemporal data to the current encoding center according to the processed spatiotemporal data, the current Euclidean distance coefficient and the current encoding center; Determining a current objective function according to the current Euclidean distance, the initialized membership matrix and the maximum entropy factor; Determining a current membership matrix according to the current Euclidean distance and the maximum entropy factor; Determining a next encoding center based on the current membership matrix and the processed spatiotemporal data; Determining a next Euclidean distance from the processed spatiotemporal data to the next encoding center according to the processed spatiotemporal data, the current Euclidean distance coefficient and the next encoding center; Determining a next objective function according to the next Euclidean distance, the current membership matrix and the maximum entropy factor; Determining a next membership matrix according to the next Euclidean distance and the maximum entropy factor; Taking the next membership matrix as the current membership matrix, returning to the step of determining the next coding center according to the current membership matrix and the processed spatiotemporal data, stopping iteration until the calculated objective function is the same as the previous objective function, and obtaining the first coding center and the first membership matrix corresponding to the current Euclidean distance coefficient; Determining the first decoded spatiotemporal data corresponding to the current Euclidean distance coefficient according to the first coding center, the first membership matrix and the fuzzy coefficient; determining a first error between the first decoded spatiotemporal data and the processed spatiotemporal data; The next Euclidean distance coefficient is used as the current Euclidean distance coefficient, and the step of determining the current coding center according to the initialized membership matrix and the processed spatiotemporal data is returned, and the iteration is stopped until the next Euclidean distance coefficient is a preset value, so as to obtain the multiple second errors corresponding to the multiple target Euclidean distance coefficients.
5. The spatiotemporal data encoding and decoding method based on granular computing according to claim 4, characterized in that: The multiple decoded spatiotemporal data also include target decoded spatiotemporal data, and the minimum error is selected from the multiple errors, and the target membership matrix and target coding center corresponding to the minimum error are used as the target coding result, including: Selecting the minimum error among the first error and the plurality of second errors; Querying the target decoded spatiotemporal data corresponding to the minimum error; The target membership matrix and the target encoding center corresponding to the target decoded spatiotemporal data are taken as the target encoding result.
6. The spatiotemporal data encoding and decoding method based on granular computing according to claim 4, characterized in that: The step of determining a next encoding center according to the current membership matrix and the processed spatiotemporal data comprises: According to the current membership matrix and the processed spatiotemporal data, the next encoding center is determined using the following first formula: Among them, vi is the i-th next coding center, xk is the k-th processed spatiotemporal data, uik is the current membership matrix of the k-th processed spatiotemporal data classified to the i-th next coding center, and n is the total number of the processed spatiotemporal data.
7. The spatiotemporal data encoding and decoding method based on granular computing according to claim 4, characterized in that: The step of determining a next objective function according to the next Euclidean distance, the current membership matrix and the maximum entropy factor comprises: According to the next Euclidean distance, the current membership matrix and the maximum entropy factor, the next objective function is determined using the following second formula: Wherein, J is the next objective function, vi is the i-th next encoding center, xk is the k-th processed spatiotemporal data, is the next Euclidean distance from the kth processed spatiotemporal data to the i-th next coding center, uik is the current membership matrix of the kth processed spatiotemporal data classified to the i-th next coding center, γ is the maximum entropy factor, c is the total number of the multiple coding centers, n is the total number of processed spatiotemporal data, vi(s) is the normalized spatial data corresponding to the i-th next coding center, vi(t) is the processed time data corresponding to the i-th next coding center, xk(s) is the normalized spatial data, xk(t) is the processed time data, s is space, t is time, and λ is the current Euclidean distance coefficient.
8. The spatiotemporal data encoding and decoding method based on granular computing according to claim 4, characterized in that: The step of determining a next membership matrix according to the next Euclidean distance and the maximum entropy factor comprises: According to the next Euclidean distance and the maximum entropy factor, the next membership matrix is determined using the following third formula: Among them, ui′k is the next membership matrix of the k-th processed spatiotemporal data classified to the i-th next coding center, vi is the i-th next coding center, xk is the k-th processed spatiotemporal data, is the next Euclidean distance from the kth processed spatiotemporal data to the i-th next encoding center, γ is the maximum entropy factor, and n is the total number of processed spatiotemporal data.
9. The spatiotemporal data encoding and decoding method based on granular computing according to claim 4, characterized in that: The step of determining the first decoded spatiotemporal data corresponding to the current Euclidean distance coefficient according to the first coding center, the first membership matrix and the fuzzy coefficient includes: According to the first coding center, the first membership matrix and the fuzzy coefficient, the first decoded spatiotemporal data corresponding to the current Euclidean distance coefficient is determined using the following fourth formula: in, is the kth first decoded spatiotemporal data, m is the fuzzy coefficient, The k-th processed spatiotemporal data is classified into the first membership matrix of the i-th next coding center, vi1 is the i-th first coding center, and c is the total number of the multiple coding centers.
10. A spatiotemporal data encoding and decoding device based on granular computing, characterized in that: include: A processing module, used for compressing and normalizing the spatiotemporal data to obtain processed spatiotemporal data; A coding and determination module, for encoding the processed spatiotemporal data using a spatiotemporal enhanced maximum entropy fuzzy coding algorithm to obtain a plurality of coding centers and a plurality of membership matrices, determining a plurality of decoded spatiotemporal data according to the plurality of coding centers, the plurality of membership matrices and fuzzy coefficients, and determining a plurality of errors corresponding to the plurality of decoded spatiotemporal data and the processed spatiotemporal data, respectively, wherein the spatiotemporal enhanced maximum entropy fuzzy coding algorithm is an algorithm generated based on an initialized membership matrix, the processed spatiotemporal data, a plurality of Euclidean distance coefficients and a maximum entropy factor; A selection module is used to select a minimum error from the multiple errors, and use the target membership matrix and target coding center corresponding to the minimum error as a target coding result, and the target coding result is used for spatiotemporal data prediction.