Geographic raster data short-term prediction method and system, storage medium and equipment
The raster diagram is preprocessed and gray Markov chain model prediction through the MATLAB program, which solves the problem of low data conversion and computing efficiency in the prior art, and achieves efficient short-term prediction and result output.
Patent Information
- Application Number
- CN202510298260.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-13
- Publication Date
- 2025-06-10
AI Technical Summary
In the geographic grid short-term prediction based on the gray Markov chain model, the prior art has problems such as low data conversion efficiency, low computing efficiency and complicated process steps, resulting in low conversion efficiency and high error rate.
The input raster diagram is preprocessed through the MATLAB program, forming a raster space cube matrix, and a gray Markov chain model is constructed to predict the array of each raster point, directly save the predicted value in the layer, and reduce manual operations.
It improves data conversion and calculation efficiency, reduces manual operations, reduces error rate, and greatly improves experimental efficiency.
Smart Images

Figure CN120124486A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geographic space information prediction, and in particular to a method, system, storage medium and device for short-term prediction of geographic raster data. Background Art
[0002] In recent years, with the development of big data, more and more data prediction methods are widely used in the field of geographic information system (GIS). Among them, the prediction method based on the Grey Markov Chain Model has achieved good results in short-term predictions in economy, energy, environment and transportation. The Grey Markov Chain Model is a prediction method that combines grey system theory and Markov chain, and is mainly used to deal with dynamic systems with uncertainty and randomness. It can effectively predict the future state of the system when the amount of data is small and the information is incomplete. The following is a detailed introduction to the model:
[0003] 1. Grey system theory
[0004] The grey system theory was proposed by Professor Deng Julong and is applicable to systems where “part of the information is known and part of the information is unknown”. Its core idea is to use a small amount of known information to explore the internal laws of the system and construct a grey model (such as GM (1,1)) for prediction.
[0005] 2. Markov Chain
[0006] Markov chain is a random process with "no aftereffect", that is, the future state depends only on the current state and has nothing to do with the past state. The state transition matrix can be used to describe the transition probability between different states of the system.
[0007] 3. Grey Markov Chain Model
[0008] The grey Markov chain model combines the advantages of grey system theory and Markov chain, and is suitable for predicting systems with both trends and random fluctuations.
[0009] The grid of the raster data structure is composed of regular squares or rectangles, and the spacing and size between the grids are equal. This regularity makes the raster data structure convenient for map making and spatial analysis, and its advantages include:
[0010] 1. The data structure is simple, which makes it easy to implement algorithms and overlay and combine spatial data.
[0011] 2. Good spatial continuity and visualization effect, which facilitates the matching application and analysis of remote sensing data.
[0012] 3. The accuracy is adjustable. By adjusting the resolution, the accuracy and detail of the data can be flexibly controlled.
[0013] 4. The data format of raster data is easily understood by most programmers and users, and information sharing is easier than that of vector data.
[0014] Although the raster data structure has many advantages, it also has defects such as low expression accuracy, large data storage volume, and low work efficiency, resulting in difficulties in establishing spatial network connection relationships and relatively complex projection conversions.
[0015] There have been related studies using the grey Markov chain method to construct a short-term prediction model. Specifically, the current short-term prediction of geographical rasters based on the grey Markov chain model is to export raster images as table files in sequence through the "raster to point" tool of GIS for multiple raster maps with the same spatio-temporal resolution. The table file has X and Y coordinates and the values of each raster point. A sequence of numbers is formed under the superposition of multiple raster points at the same X and Y coordinate points. Then, the sequence of numbers is brought into the grey Markov chain model to calculate the predicted value of the raster point at the X and Y coordinates. Finally, the X and Y coordinates and the corresponding predicted values are obtained, and then this table is used to generate a map through the "XY to point" and "point to raster" tools in the GIS software to obtain the final result map predicted based on the grey Markov chain model.
[0016] However, the existing technical solutions do not display the characteristics of geographical information system data. It is necessary to convert multiple raster maps into Excel table data through GIS tools. Generally, there are dozens of input map sheets, and batch conversion cannot be carried out, resulting in low conversion efficiency. Moreover, the raster point arrays are calculated time and time again through the MATLAB programming language. For raster maps with thousands of points, the calculation efficiency is very low. In addition, the raster point values obtained after calculation need to be output as result maps through GIS tools. This process is cumbersome, with many manual operation steps and a high error rate. Summary of the Invention
[0017] The purpose of the present invention is to overcome the technical problems existing in the prior art, and provide a method, system, storage medium and device for short-term prediction of geographical raster data.
[0018] The purpose of the present invention is achieved through the following technical solutions:
[0019] In the first aspect, a method for short-term prediction of geographical raster data is provided, including:
[0020] Performing data preprocessing on the input raster map;
[0021] Reading the geographical spatial data and the number of rasters of the preprocessed raster map through a MATLAB program, stacking the raster maps in a top-down arrangement according to the time series to form a raster space cube matrix, so that the raster points with the same XY coordinates become an array of columns;
[0022] Construct a grey Markov chain model, and use the grey Markov chain model to predict the arrays of each grid point to obtain the short-term prediction values of all grid points;
[0023] Save the short-term prediction values of each grid point in the grid point corresponding to the XY coordinates, and use the MATLAB tool code to output the result layer to obtain the result grid map.
[0024] Preferably, the data preprocessing of the input grid map includes:
[0025] Clean the data of all input grid maps, unify the spatial resolution and coordinate system of all grid maps, rename them according to the time series, and put them in the specified folder.
[0026] Preferably, the construction of the grey Markov chain model includes:
[0027] Establish the initial time series, establish the GM(1,1) model, and obtain the predicted values. The response function of the GM(1,1) model is as follows:
[0028]
[0029] Preferably, the use of the grey Markov chain model to predict the arrays of each grid point includes:
[0030] Divide the state intervals based on the ratio of the predicted value to the measured value;
[0031] Count the quantities in each state interval, calculate the state transition probability matrix, and predict the future state according to the state transition probability matrix;
[0032] Use the MATLAB accumulation program, calculate the array of the next grid point according to the row and column distribution of the grid map, save the prediction result in the grid point after obtaining it, and so on, calculate the short-term prediction values of all grid points.
[0033] Preferably, the use of the grey Markov chain model to predict the arrays of each grid point further includes:
[0034] Correct the predicted values of the grey Markov model, calculate the residuals between the measured values and the predicted values, and calculate the average residuals of all states in each state interval.
[0035] In a second aspect, a short-term prediction system for geographic grid data is provided, including:
[0036] A preprocessing module for performing data preprocessing on the input grid map;
[0037] The raster map data reading module is used to read the geospatial data and the number of rasters of the preprocessed raster map through a MATLAB program, stack the raster maps arranged from top to bottom in time series, and form a raster space cube matrix, so that the raster points with the same XY coordinates become an array of columns;
[0038] The model prediction module is used to construct a grey Markov chain model and use the grey Markov chain model to predict the array of each raster point to obtain the short-term prediction values of all raster points;
[0039] The output module of the result raster map is used to save the short-term prediction value of each raster point in the raster point with the corresponding XY coordinates, and use the MATLAB tool code to output the result layer to obtain the result raster map.
[0040] Thirdly, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the short-term prediction method of geographical raster data as described in the first aspect is implemented.
[0041] Fourthly, an electronic device is provided, including a memory and a processor. A computer instruction that can run on the processor is stored on the memory. When the processor runs the computer instruction, the short-term prediction method of geographical raster data as described in the first aspect is implemented.
[0042] It should be further noted that the technical features corresponding to the above options can be combined or replaced with each other without conflict to form a new technical solution.
[0043] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0044] The present invention directly reads the raster points of all map sheets in the folder through a programming method, uses multiple raster images with the same resolution for superposition, and stacks them arranged from top to bottom in time series to form a raster space cube matrix. The raster points with the same XY coordinates are arranged from top to bottom as an array of columns. When predicting, directly bring the array with the same XY coordinates into the model for calculation, and the grey Markov chain model can be used to calculate the short-term prediction result of the raster point in the future, and it is not necessary to manually run by jumping to the next raster point through the program. The characteristics of geographical rasters are fully utilized, and the grey Markov chain model is applied to each raster, greatly improving the operation efficiency. And the calculated values are directly saved in the raster points of the layer, reducing the workflow of converting XY coordinates to points for mapping in the original method, and greatly improving the experimental efficiency. Description of the Drawings
[0045] Figure 1 It is a flowchart of the short-term prediction method of geographical raster data shown in the embodiment of the present invention. Detailed Embodiments
[0046] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. The components of the embodiments of the present application described and illustrated herein can be arranged and designed in various different configurations. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0047] It should be noted that all the defects existing in the above prior art solutions are the results obtained by the inventor after practice and careful research. Therefore, the discovery process of the above problems and the solutions proposed by the embodiments of the present application below for the above problems should be the contributions made by the inventor to the present application during the invention creation process, and should not be understood as the technical content known to those skilled in the art.
[0048] The embodiments provided by the present invention for the technical problems pointed out in the background art are as follows:
[0049] Embodiment 1
[0050] Refer to Figure 1 , in an exemplary embodiment, a short-term prediction method for geographic grid data is provided, including the following steps:
[0051] S1: Perform data preprocessing on the input raster map. First, clean all the input raster maps, unify the spatial resolution and coordinate positions of all raster maps, rename them according to the time series, and place them in a specified folder.
[0052] S2: Through the MATLAB program, read the geospatial data and the number of raster cells of the preprocessed raster map, stack the raster maps arranged from top to bottom according to the time series to form a raster space cube matrix, so that the raster points with the same XY coordinates become an array of columns;
[0053] S3: Substitute each column array of each raster point into the grey Markov chain model. The grey model is a model that establishes a differential equation after processing the original data, also called the GM model. Due to noise pollution, the original data series shows a disorderly phenomenon. The disorderly data series is called a grey process, and the model constructed for the grey process is called a grey model. The basic steps of the grey model:
[0054] Determine the time series of the original data:
[0055] x 0 =(x 0 (1),x 0 (2),…,x 0 (n))(1.1)
[0056] Accumulate the time series of the original data to generate a new sequence:
[0057] x 1 (k) = x 0 (1) + x 0 (2) + … + x 0 (k),
[0058] k = 1, 2, …, n(1.2)
[0059] Construct the accumulation matrix B and the constant term vector y:
[0060]
[0061] y = (x 0 (2), x 0 (3), …, x0(n)) T (1.4)
[0062] Establish the corresponding grey prediction model GM(1,1), and its specific form is:
[0063] dx1 / dt + ax1 = u(1.5)
[0064] Solve the grey parameters by the least squares method:
[0065]
[0066] The time response function of this model is:
[0067]
[0068]
[0069] Accumulation reduction:
[0070]
[0071] k = 1, 2, …, n - 1(1.9)
[0072] The grey model can obtain relatively good prediction results for data with short time series and obvious upward or downward trends. The grey GM(1,1) model is an exponential function curve, and the object to be predicted is a relatively smooth curve. Therefore, the fitting of data with large fluctuations is relatively poor. Through the transition probability matrix of the Markov chain, the disadvantage of the grey model with large data fluctuations and low prediction accuracy can be reduced. Based on this, a grey Markov chain prediction model is constructed to make up for the deficiencies of the former. The advantage of this is that it can make full use of the characteristic range of historical data and improve the prediction accuracy of data with large fluctuations.
[0073] S4: Construct a grey Markov chain model and use the grey Markov chain model to predict the array of each grid point to obtain the short-term prediction values of all grid points. The basic process of the grey Markov chain prediction method includes three key steps: First, construct a grey GM(1,1) prediction model and derive its prediction results; Next, according to the characteristics presented by the prediction curve, subdivide the state intervals; In the third step, count the quantities within each state interval and calculate the Markov transition probability matrix of the data to predict the future state of the system, so as to determine the interval where the future state is located. Specifically as follows:
[0074] (1) Establish the initial time series, establish the GM(1,1) model, and obtain the prediction values. The response function of the GM(1,1) model is as follows:
[0075]
[0076] where, is the predicted value for the (k + 1)-th cumulative time, is the predicted value for the k-th cumulative time. is the predicted value of the original sequence at the (k + 1)-th time.
[0077] (2) Division of the f state interval based on the ratio of the predicted value to the measured value:
[0078]
[0079] F i1 is the minimum value within the i-th state interval, and F i2 is the maximum value within the i-th state interval;
[0080] (3) Calculate the state transition probability:
[0081]
[0082] In the formula, n ij (k) represents the number of times the state i transfers to the state j at time t = k, and n i (k) represents the total number of times the state i transfers at time t = k;
[0083] (4) Calculation of the state transition matrix
[0084] The ratio f of the predicted value to the measured value is a sequence of discrete random variables, and S is the set of all states that f can take. If the conditional probability p ij (k) in S is independent of time k, that is, p ij (k) = p ij, then this kind of Markov chain is called homogeneous. The n-step transition probability matrix of a homogeneous Markov chain is denoted as R(n), which consists of the n-step transition probabilities p ij n and its expression is:
[0085] Obviously
[0086] In practical applications, assume that the prediction object is in state m at a certain moment. Examine the m-th row of the one-step transition probability matrix R(1). If max(p mi ) = p mL , then it is considered that the system is most likely to be in state L at the next moment. When there are two or more equal probabilities in the m-th row of the matrix R(1), it is necessary to examine the two-step or multi-step transition probability matrix of the system to determine the future direction.
[0087] (5) Modified model
[0088] When correcting the predicted value of the grey Markov model, it is necessary to calculate the residual between the measured value and the predicted value, and calculate the average residual of all states within each state interval:
[0089] Residual:
[0090] Average residual:
[0091] (6) Check the ratio C of the posterior difference and the small error probability P:
[0092] Small error probability:
[0093] Posterior difference: where
[0094] S5: Obtain the short-term prediction value of the grey Markov chain through calculation and store it in the grid at this XY coordinate point.
[0095] S6: Use the MATLAB accumulation program to calculate the array of the next grid point according to the row and column distribution of the grid map. After obtaining the prediction result, save it in this grid point, and so on, to calculate the short-term prediction data results of all grid points.
[0096] S7: After calculating all the grid points of the rows and columns and saving them in the corresponding XY coordinate grid points, use the MATLAB tool code to output the result layer to obtain the result grid map.
[0097] This method directly reads the raster points of all map sheets in a folder through programming, directly brings the three-point arrays with the same XY coordinates into the model for calculation, and jumps to the next point through the program without manual operation. It fully utilizes the characteristics of geographical rasters, applies the grey Markov chain model to each raster, and greatly improves the calculation efficiency. Moreover, the calculated values are directly saved in the raster points of the map layer, reducing the workflow of converting XY coordinates to points for plotting in the original method.
[0098] Embodiment 2
[0099] Based on the same inventive concept as Embodiment 1, this embodiment provides a short-term prediction system for geographical raster data, including:
[0100] A preprocessing module for preprocessing the data of the input raster map;
[0101] A raster map data reading module for reading the geographical space data and the number of rasters of the preprocessed raster map through a MATLAB program, stacking the raster maps arranged from top to bottom in time series to form a raster space cube matrix, so that the raster points with the same XY coordinates become a column array;
[0102] A model prediction module for constructing a grey Markov chain model and using the grey Markov chain model to predict the array of each raster point to obtain the short-term prediction values of all raster points;
[0103] An output module for the resulting raster map for saving the short-term prediction values of each raster point in the raster points with the corresponding XY coordinates, and using MATLAB tool code to output the resulting layer to obtain the resulting raster map.
[0104] Embodiment 3
[0105] Based on the same inventive concept as Embodiment 1, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the short-term prediction method for geographical raster data provided by the embodiments of the present invention. Based on such an understanding, the technical solution of this embodiment, in essence, or the part that contributes to the prior art or a part of this technical solution can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods of the various embodiments of the present invention. And the foregoing storage medium includes various media that can store program codes such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.
[0106] Example 4
[0107] Based on the same inventive concept as in Example 1, an electronic device is provided, including a memory and a processor. A computer instruction that can run on the processor is stored on the memory. When the processor runs the computer instruction, it executes the short-term prediction method for geographical grid data provided in the embodiments of the present invention.
[0108] The processor can be a single-core or multi-core central processing unit or a specific integrated circuit, or an integrated circuit configured to implement one or more of the present invention.
[0109] Embodiments of the subject matter and functional operations described in this specification can be implemented in the following: tangibly embodied computer software or firmware, computer hardware including the structures disclosed in this specification and their structural equivalents, or a combination of one or more of them. Embodiments of the subject matter described in this specification can be implemented as one or more computer programs, that is, one or more modules in computer program instructions encoded on a tangible non-transitory program carrier to be executed by a data processing device or to control the operation of the data processing device. Alternatively or additionally, the program instructions can be encoded on an artificially generated propagated signal, such as a machine-generated electrical, optical, or electromagnetic signal, which is generated to encode and transmit information to a suitable receiver device for execution by the data processing device.
[0110] The processes and logical flows described in this specification can be executed by one or more programmable computers executing one or more computer programs to perform corresponding functions by operating on input data and generating output. The processes and logical flows can also be executed by dedicated logic circuits - such as FPGA (Field Programmable Gate Array) or ASIC (Application Specific Integrated Circuit), and the device can also be implemented as a dedicated logic circuit.
[0111] Processors suitable for executing computer programs include, for example, general and / or special-purpose microprocessors, or any other type of central processing unit. Generally, the central processing unit will receive instructions and data from a read-only memory and / or a random access memory. The basic components of a computer include a central processing unit for implementing or executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include one or more mass storage devices for storing data, such as magnetic disks, magneto-optical disks, or optical disks, etc., or the computer will be operatively coupled to such a mass storage device to receive data therefrom or transfer data thereto, or both. However, a computer is not necessarily required to have such devices. In addition, a computer may be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name just a few examples.
[0112] It should be understood that each block in a flowchart or block diagram can represent a module, a program segment, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the drawings. For example, two consecutive blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0113] The above specific embodiments are detailed descriptions of the present invention. It cannot be determined that the specific embodiments of the present invention are only limited to these descriptions. For those of ordinary skill in the technical field to which the present invention pertains, without departing from the concept of the present invention, several simple deductions and substitutions can still be made, and all should be regarded as belonging to the protection scope of the present invention.
Claims
1. A method for short-term prediction of geographic raster data, characterized in that: include: Perform data preprocessing on the input raster image; Through the MATLAB program, the geospatial data and grid number of the preprocessed grid map are read, and the grid map is stacked from top to bottom in time series to form a grid space cube matrix, so that the grid points with the same XY coordinates become a column array; Construct a grey Markov chain model, and use it to predict the array of each grid point to obtain the short-term prediction value of all grid points; The short-term prediction value of each grid point is saved in the grid point corresponding to the XY coordinates, and the result layer is output using the MATLAB tool code to obtain the result grid map.
2. The geographic grid data short-term prediction method according to claim 1, characterized in that: The data preprocessing of the input raster image includes: All input raster images are cleaned, the spatial resolution and coordinate system of all raster images are unified, they are numbered and renamed according to the time series, and placed in the specified folder.
3. The geographic raster data short-term prediction method according to claim 1, characterized in that: The grey Markov chain model is constructed, comprising: Establish the initial time series, build the GM(1,1) model, and obtain the predicted value. The response function of the GM(1,1) model is as follows:
4. The method for short-term prediction of geographic raster data according to claim 1, characterized in that: The method of using the grey Markov chain model to predict the array of each grid point includes: Divide the state interval based on the ratio of predicted value to measured value; Count the number of states in each state interval, calculate the state transition probability matrix, and predict the future state based on the state transition probability matrix; Using the MATLAB accumulation program, the array of the next grid point is calculated according to the row and column distribution of the grid map. After obtaining the prediction result, it is saved in the grid point. Similarly, the short-term prediction values of all grid points are calculated.
5. The method for short-term prediction of geographic raster data according to claim 4, characterized in that: The method of using the grey Markov chain model to predict the array of each grid point also includes: The predicted values of the grey Markov model are corrected, the residuals between the measured values and the predicted values are calculated, and the average residuals of all states in each state interval are calculated.
6. A geographic raster data short-term prediction system, characterized in that: include: A preprocessing module is used to perform data preprocessing on the input raster image; The raster map data reading module is used to read the geospatial data and grid quantity of the pre-processed raster map through the MATLAB program, and to arrange and stack the raster map from top to bottom in time series to form a raster space cube matrix, so that the grid points with the same XY coordinates become a column array; The model prediction module is used to construct a grey Markov chain model and use the grey Markov chain model to predict the array of each grid point to obtain the short-term prediction values of all grid points; The result grid map output module is used to save the short-term prediction value of each grid point in the grid point corresponding to the XY coordinates, and use the MATLAB tool code to output the result layer to obtain the result grid map.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for short-term prediction of geographic raster data described in any one of claims 1 to 5 is implemented.
8. An electronic device comprising a memory and a processor, wherein the memory stores computer instructions that can be executed on the processor, wherein: When the processor runs the computer instructions, it executes the geographic raster data short-term prediction method described in any one of claims 1-5.