Interpolation method, device, equipment and medium
By preprocessing geographic feature data and multi-dimensional feature vector transformation, combined with neural network model, the existing interpolation methods are solved in terms of generality, accuracy and automation, and high-precision and high-adaptive interpolation are achieved.
Patent Information
- Application Number
- CN202510432057.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-07-11
AI Technical Summary
The existing interpolation methods are insufficient in terms of versatility, accuracy and automation, making it difficult to effectively process data from different sources, formats and quality.
By preprocessing the target geographical feature data, converting it into a multi-dimensional feature vector, and interpolation is performed using the trained interpolation model. Taking into account the correlation between the geographical features of the data point and the target point, a neural network model is used for interpolation.
It improves the accuracy and adaptability of interpolation, can learn the distribution rules and characteristics of the data more accurately, and achieve high-precision interpolation results.
Smart Images

Figure CN120296322A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of geographic information technology, and particularly to an interpolation method, device, equipment and medium. Background Art
[0002] Interpolation can solve problems such as missing data filling, data resampling, grid data downscaling, gridding of irregular spatio-temporal distribution data, spatio-temporal matching of multi-source data, and estimation of geographical elements at locations without observed data. Therefore, interpolation methods are widely used in disciplinary fields such as pedology, ecology, meteorology, climatology, environmental science, and hydrology.
[0003] To solve different interpolation problems, people have developed a series of interpolation methods such as the nearest neighbor method, natural neighbor method, inverse distance weighted method, global polynomial method, local polynomial method, bilinear interpolation method, radial basis function method, high-precision surface method, ordinary kriging method, universal kriging method, co-kriging method, indicator kriging method, moving window kriging method, kriging with drift, regression kriging method, regression method, copula-based geostatistical method, Bayesian maximum entropy method, high-order statistic method, and so on. However, these interpolation methods are mostly oriented to specific types of problems and have problems such as poor generality, low accuracy, or low automation. Summary of the Invention
[0004] The object of the present invention is to provide an interpolation method, device, equipment and medium, which have the characteristics of good generality, high accuracy, high automation, etc.
[0005] To solve the above technical problems, the present invention provides an interpolation method, which includes:
[0006] Obtain data required for interpolating a target geographical element, and preprocess the obtained data;
[0007] Embed different types of data points in the preprocessed data into multi-dimensional feature vectors respectively as tokens corresponding to the data points;
[0008] For any target point, input the tokens of the data points within the set spatio-temporal neighborhood of the target point into the trained interpolation model to interpolate the target geographical element of the target point.
[0009] In a first aspect, in the above interpolation method provided by the present invention, preprocessing the obtained data includes:
[0010] Uniformly convert the soft data corresponding to the same geographical element in the obtained data into vectors of the same dimension;
[0011] When multiple geographical elements are synchronously observed or acquired within a target range, the multiple geographical elements are combined into a new geographical element, and the data corresponding to the new geographical element is represented by a vector synthesized from the data of the corresponding geographical elements.
[0012] On the other hand, in the above interpolation method provided by the present invention, the soft data corresponding to the same geographical element in the acquired data is uniformly converted into vectors of the same dimension, including:
[0013] The interval range soft data is uniformly represented by a vector composed of interval endpoints;
[0014] For probability distribution soft data, the probability distribution interval is uniformly discretized into several small intervals and the corresponding probabilities are calculated, and the soft data is represented by a vector composed of the probability values corresponding to the small intervals;
[0015] The nominal variable type soft data is converted into a dummy variable vector representation.
[0016] On the other hand, in the above interpolation method provided by the present invention, different types of data points in the preprocessed data are respectively embedded as multi-dimensional feature vectors, as tokens corresponding to the data points, including:
[0017] A vector composed of the spatio-temporal coordinates and corresponding data of a data point is embedded as a multi-dimensional feature vector, as a token corresponding to the data point;
[0018] Alternatively, the spatio-temporal coordinates and corresponding data of a data point are respectively embedded as multi-dimensional feature vectors to obtain two multi-dimensional feature vectors; the sum of the two multi-dimensional feature vectors is obtained, and the sum vector is used as the token of the data point.
[0019] On the other hand, in the above interpolation method provided by the present invention, before inputting the tokens of the data points within the set spatio-temporal neighborhood of any target point into the trained interpolation model, it further includes:
[0020] According to the number of hard data points, soft data points, and synthetic data points within the spatio-temporal neighborhood, determine the size and shape of the set spatio-temporal neighborhood;
[0021] Train the constructed interpolation model.
[0022] On the other hand, in the above interpolation method provided by the present invention, training the constructed interpolation model includes:
[0023] Using the cross-validation method and the tokens of the data points within the set spatio-temporal domain of the hard data points of the target geographical element to train the interpolation model;
[0024] Input the output vectors obtained after being processed by multiple encoders into a multi-layer fully-connected head to output the predicted values of the target geographical features of the target points, and calculate the loss function by combining the hard data corresponding to the data points.
[0025] On the other hand, in the above interpolation method provided by the present invention, when training the constructed interpolation model, it further includes:
[0026] Use the parameters of the quantiles of the target geographical features of the target points as the input of the multi-layer fully-connected head in the interpolation model, and combine the quantile loss function to implement the training of the interpolation model.
[0027] To solve the above technical problems, the present invention also provides an interpolation device, and the device includes:
[0028] A data processing module, configured to obtain the data required for interpolating the target geographical features and preprocess the obtained data;
[0029] A data embedding module, configured to respectively embed different types of data points in the preprocessed data into multi-dimensional feature vectors as the tokens of the corresponding data points;
[0030] An interpolation module, configured to, for any target point, input the tokens of the data points within the set spatio-temporal neighborhood of the target point into the trained interpolation model to interpolate the target geographical features of the target point.
[0031] To solve the above technical problems, the present invention also provides an interpolation device, and the device includes:
[0032] A memory, configured to store a computer program;
[0033] A processor, configured to implement the steps of the above interpolation method when executing the computer program.
[0034] To solve the above technical problems, the present invention also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above interpolation method are implemented.
[0035] As can be seen from the above technical solutions, an interpolation method provided by the present invention includes: obtaining the data required for interpolating the target geographical features and preprocessing the obtained data; respectively embedding different types of data points in the preprocessed data into multi-dimensional feature vectors as the tokens of the corresponding data points; for any target point, inputting the tokens of the data points within the set spatio-temporal neighborhood of the target point into the trained interpolation model to interpolate the target geographical features of the target point.
[0036] The beneficial effects of the present invention are as follows. For the interpolation method provided by the present invention, first, the data required for interpolating the target geographical feature is obtained and preprocessed, which can unify and standardize data from different sources, in different formats, and of different qualities, and reduce the influence of data noise and outliers. Then, different types of data points in the preprocessed data are embedded as multi-dimensional feature vectors, serving as tokens for the corresponding data points, which can map various types of data into a unified feature space, enabling the model to process various forms of data and improving the adaptability to different data. In geographical feature interpolation, these multi-dimensional feature vectors have stronger expressive power than the original data, which helps the interpolation model learn the distribution rules and features of the data more accurately, thereby improving the interpolation accuracy. Subsequently, the tokens of the data points within the set spatio-temporal neighborhood of the target point are input into the trained interpolation model to interpolate the target geographical feature of the target point. This method fully considers the correlation between the geographical features of the data points and the target geographical feature of the target point, enabling the interpolation model to better infer the value of the target geographical feature of the target point and making the interpolation result more conform to the actual distribution and change trend of the target geographical feature. This method has the characteristics of good generality, high accuracy, and high degree of automation.
[0037] In addition, the present invention also provides a corresponding interpolation device, interpolation equipment, and computer-readable storage medium for the interpolation method, which have the same or corresponding technical features as the interpolation method mentioned above, and the effects are the same. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] To more clearly illustrate the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0039] Figure 1 It is a flowchart of the interpolation method provided by the embodiment of the present invention;
[0040] Figure 2 It is a schematic diagram related to geographical feature interpolation provided by the embodiment of the present invention;
[0041] Figure 3 It is a schematic diagram of the model architecture for geographical feature interpolation provided by the embodiment of the present invention;
[0042] Figure 4 It is a schematic diagram of the structure of the interpolation device provided by the embodiment of the present invention;
[0043] Figure 5 It is a schematic diagram of the structure of the interpolation equipment provided by the embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without making creative efforts fall within the protection scope of the present invention.
[0045] To enable those skilled in the art of this technology to better understand the solution of the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific implementation manners. Figure 1 The flowchart of the interpolation method provided for the embodiments of the present invention is as Figure 1 shown, and the method includes the following steps:
[0046] S101. Obtain the data required for interpolating the target geographical element, and preprocess the obtained data.
[0047] In implementation, the target geographical element may include soil salt content, soil organic carbon content, soil total nitrogen content, soil available potassium content, soil available phosphorus content, precipitation, PM2.5, etc. The data required for interpolating the target geographical element may include hard data; or, the data required for interpolating the target geographical element may include hard data and soft data.
[0048] Hard data may include high-precision observation values of the target geographical element at several hard data points within the target range. Hard data may also include high-precision observation values of other geographical elements related to the target geographical element at several hard data points within the target range.
[0049] Since hard data is usually obtained through high-precision instrument observation, detection, or analysis, it is usually considered the true value of the geographical element at the corresponding spatio-temporal position; of course, according to the actual situation, data with a certain accuracy requirement and not very high accuracy is sometimes also considered hard data.
[0050] Soft data is the information of geographical elements related to the target geographical element at several soft data points within the target range, such as the interval range information, probability distribution information, and nominal variable type information (such as soil type) of the geographical element at the soft data points. Soft data usually has fuzziness, incompleteness, and uncertainty. The target range can be a spatio-temporal range of any dimension greater than or equal to one dimension.
[0051] When performing step S101, obtaining the data required for interpolating the target geographical element and preprocessing the obtained data can unify and standardize data from different sources, in different formats, and of different qualities, and reduce the influence of data noise and outliers.
[0052] S102. Embed data points of different types in the preprocessed data into multi-dimensional feature vectors respectively as tokens corresponding to the data points.
[0053] In implementation, the present invention can embed data points of different types into multi-dimensional feature vectors respectively as tokens corresponding to the data points. For convenience, the present invention uniformly refers to hard data points, soft data points, and combined data points corresponding to geographical elements formed by combination as data points, and regards data points corresponding to different types of geographical elements as data points of different types.
[0054] Embedding data points of different types into multi-dimensional feature vectors as tokens corresponding to the data points can map various types of data to a unified feature space, enabling the model to process various forms of data and improving the adaptability to different data.
[0055] S103. For any target point, input the tokens of data points within the set spatio-temporal neighborhood of the target point into the trained interpolation model to interpolate the target geographical element of the target point.
[0056] In implementation, the interpolation model may include a neural network model of the sequence-to-sequence transformation type. The neural network model of the sequence-to-sequence transformation type may be a neural network model of types such as Transformer and Mamba.
[0057] Figure 2 It is a schematic diagram related to geographical element interpolation provided for the embodiments of the present invention. Figure 2 It shows different types of data points and the target point and its spatio-temporal neighborhood. The black triangles represent hard data points, and this type of data is usually obtained through precise measurement and other methods with relatively high reliability; the empty circles represent soft data points, which may be obtained through estimation, prediction, etc. with relatively lower accuracy. The black circle represents the target point, which is the point where geographical element interpolation needs to be performed, that is, the target geographical element value of this point needs to be inferred through the surrounding data points. The dashed circle centered on the target point represents the spatio-temporal neighborhood, and within the interpolation process, the data points (such as hard data points and soft data points) within this range can be used to analyze and calculate the target geographical element of the target point.
[0058] In the above interpolation method provided by the embodiments of the present invention, first, the data required for interpolating the target geographical feature is acquired and preprocessed, which can unify and standardize data from different sources, with different formats and qualities, and reduce the influence of data noise and outliers. Then, different types of data points in the preprocessed data are embedded as multi-dimensional feature vectors, serving as tokens for the corresponding data points, which can map various types of data to a unified feature space, enabling the model to handle multiple forms of data and improving the adaptability to different data. In geographical feature interpolation, these multi-dimensional feature vectors have stronger expressive power than the original data, helping the interpolation model to more accurately learn the distribution rules and features of the data, thereby improving the interpolation accuracy. Subsequently, the tokens of the data points within the set spatio-temporal neighborhood of the target point are input into the trained interpolation model to interpolate the target geographical feature of the target point, fully considering the correlation between the geographical features of the data points and the target geographical feature of the target point, enabling the interpolation model to better infer the value of the target geographical feature of the target point and making the interpolation result more conform to the actual distribution and change trend of the target geographical feature. This method has the characteristics of good generality, high accuracy, and high degree of automation.
[0059] Further, in specific implementation, in the above interpolation method provided by the embodiments of the present invention, step S101 preprocesses the acquired data, which may specifically include: uniformly converting the soft data corresponding to the same geographical feature in the acquired data into vectors of the same dimension; when multiple geographical features are synchronously observed or acquired within the target range, combining the multiple geographical features into a new geographical feature, and representing the data corresponding to the new geographical feature by a vector synthesized from the data of the corresponding geographical features.
[0060] In implementation, data preprocessing may include: uniformly converting the soft data corresponding to the same geographical feature into vectors of the same dimension. When multiple geographical features are synchronously observed or acquired within the target range, they can be combined into a new geographical feature, and the data corresponding to it is represented by a vector synthesized from the data of the corresponding geographical features. Finally, it may also include data normalization or standardization. This can convert different forms of soft data into vectors of the same dimension, giving the data a unified structure and format. In subsequent model processing, there is no need to design complex processing logics for different formats of data, and the model can read and operate on the data more efficiently and consistently, improving the efficiency and operability of data processing. For the soft data of the same geographical feature, through specific conversion to have the same representation form, it can integrate geographical information from multiple aspects, making the data contain richer content.
[0061] Further, in specific implementation, in the above steps, the soft data corresponding to the same type of geographical feature in the acquired data is uniformly converted into vectors of the same dimension, which may specifically include: representing the interval range soft data uniformly by a vector composed of interval endpoints; for the probability distribution soft data, uniformly discretizing the probability distribution interval into several small intervals and calculating the corresponding probabilities, and representing the corresponding soft data by a vector composed of the probability values corresponding to the small intervals; converting the nominal variable type soft data into a dummy variable vector representation.
[0062] In implementation, for the interval range soft data, it is represented by an interval endpoint vector, which completely retains the boundary information of the interval. The probability distribution soft data is represented by a probability value vector through discretization, which not only reflects the characteristics of the probability distribution but also converts it into a numerical form convenient for processing, enabling subsequent analysis to effectively utilize probability information. The nominal variable is converted into a dummy variable vector, which can distinguish different categories at the numerical level, retain the difference information between categories, and facilitate model recognition and processing.
[0063] Further, in specific implementation, in the above interpolation method provided by the embodiment of the present invention, in step S102, different types of data points in the preprocessed data are respectively embedded as multi-dimensional feature vectors and used as tokens corresponding to the data points, which may specifically include: embedding a vector composed of the spatio-temporal coordinates and corresponding data of the data point as a multi-dimensional feature vector and using it as the token corresponding to the data point; or, respectively embedding the spatio-temporal coordinates and corresponding data of the data point as multi-dimensional feature vectors to obtain two multi-dimensional feature vectors; obtaining the sum of the two multi-dimensional feature vectors and using the sum vector as the token of the data point.
[0064] In implementation, the spatio-temporal coordinates of the data point represent its position in space and time, and the corresponding data reflects the attribute characteristics of the point. Embedding the vector composed of the two or embedding the two respectively as multi-dimensional feature vectors can achieve the deep integration of space, time, and attribute information.
[0065] The spatio-temporal coordinates of the data point include relative coordinates; or relative coordinates and absolute coordinates. The relative coordinate is the coordinate of the data point relative to the target point, which can be obtained by subtracting the absolute coordinate of the data point from the absolute coordinate of the target point. The relative coordinate may further include a relative coordinate based on geographical attributes, which can be obtained by subtracting the value of the corresponding geographical feature of the data point from the value of the corresponding geographical feature of the target point; considering the relative coordinate can take into account the first law of geography, and considering the absolute coordinate can take into account the overall trend of geographical features within the target range. The embedding of spatio-temporal coordinates can be achieved by combining Fourier encoding and separable spatio-temporal position embedding methods.
[0066] Furthermore, in a specific implementation, in the above-mentioned interpolation method provided in an embodiment of the present invention, before executing step S103 for any target point, inputting the token of the data point within the set spatiotemporal neighborhood of the target point into the trained interpolation model, it may also include: determining the size and shape of the set spatiotemporal neighborhood according to the number of hard data points, soft data points, and synthetic data points within the spatiotemporal neighborhood; and training the constructed interpolation model.
[0067] In implementation, the shape, size, and dimension of the spatiotemporal neighborhood are not limited. The shape of the spatiotemporal neighborhood can be circular, spherical, square, rectangular, cuboid, cube, ellipse, ellipsoid, etc. The size and shape of the spatiotemporal neighborhood can also be determined by the number of hard data points, soft data points, and synthetic data points in the spatiotemporal neighborhood.
[0068] Furthermore, in the specific implementation, in the above steps, the constructed interpolation model is trained, which can specifically include: using the cross-validation method and the hard data points of the target geographic elements to set the tokens of the data points in the spatiotemporal domain to train the interpolation model; inputting the output vector obtained after processing by multiple encoders into a multi-layer fully connected head, outputting the predicted value of the target point target geographic element, and calculating the loss function in combination with the hard data corresponding to the data point.
[0069] Figure 3 A schematic diagram of a model architecture for geographic element interpolation provided by an embodiment of the present invention. Figure 3 As shown in the figure, data point 1 token, data point 2 token, ..., data point n token represent the multi-dimensional feature vectors (tokens) obtained after processing different data points. They are the input of the model and provide the original information for the model. After receiving the tokens of each data point, the Transformer Encoder uses the self-attention mechanism to extract features and interactively process the input data to mine the potential relationship between data points. The multi-layer fully connected head (MLP head) receives the feature representation output by the Transformer Encoder, and outputs the target point target geographic element after further processing to predict the target point target geographic element value.
[0070] Furthermore, in a specific implementation, in the above-mentioned interpolation method provided in an embodiment of the present invention, step S103, for any target point, inputs the token of the data point within the time and space neighborhood set for the target point into the trained interpolation model to interpolate the target geographic element of the target point. It may also include: setting different time and space neighborhoods to obtain multiple values of the target geographic element of the target point to analyze the uncertainty of the target geographic element of the target point.
[0071] In implementation, the present invention can adopt a cross-validation method to input the tokens corresponding to the data points within a certain spatio-temporal neighborhood of the hard data points of the target geographical feature into the Transformer model for training. Output vectors are obtained through multiple Transformer encoders, and a multi-layer fully connected head is connected to output the predicted value of the target geographical feature at the target point. The loss function (such as mean square error loss function, mean absolute error loss function, cross-entropy loss function, quantile loss function) is obtained by combining the hard data (i.e., label) corresponding to the data points, thereby realizing the training of the interpolation model.
[0072] Furthermore, in specific implementation, in the above steps, when training the constructed interpolation model, it may further include: using the parameter of the quantile of the target geographical feature at the target point as the input of the multi-layer fully connected head in the interpolation model, and combining the quantile loss function to realize the training of the interpolation model.
[0073] In implementation, in order to obtain the τ -quantile Q(τ) of the target geographical feature at the target point, the present invention can also use τ as the input of the interpolation model, specifically as the input of the multi-layer fully connected head, and combine the quantile loss function, thereby realizing the training of the interpolation model. Obtaining the quantile of the target geographical feature at the target point can provide more comprehensive information for decision-making. In geographical data, there may be some outliers due to measurement errors or special geographical phenomena. Using the quantile loss function can make the model have better robustness to these outliers during the training process, improving the stability and reliability of the model.
[0074] It should be noted that when there are multiple continuous target geographical features, after determining the weights of their respective errors, multiple continuous target geographical features can be modeled and predicted simultaneously. When there are multiple categorical target geographical features, multiple categorical target geographical features can be combined into a new categorical target geographical feature, thereby realizing the simultaneous modeling and prediction of multiple categorical target geographical features.
[0075] When the target geographical feature is a continuous geographical feature, if the generated geographical feature normalization or standardization value is obtained, the generated geographical feature normalization or standardization value can be inverse-normalized or inverse-standardized to obtain the final predicted value;
[0076] When the target geographical feature is a categorical geographical feature, the probability values of each category of the generated geographical feature are generated, and based on the generated probability values of each category of the geographical feature, the category to which the geographical feature belongs is obtained as the final predicted value.
[0077] In the above embodiments, the interpolation method has been described in detail. The present invention also provides corresponding embodiments of an interpolation device and an interpolation device. It should be noted that the present invention describes the embodiments of the device part from two perspectives, one is from the perspective of functional modules, and the other is from the perspective of hardware.
[0078] Figure 4 FIG. 4 is a schematic structural diagram of an interpolation device provided by an embodiment of the present invention. This embodiment is based on the perspective of functional modules. As Figure 4 shown, the device includes:
[0079] A data processing module 10, configured to obtain data required for interpolating a target geographical feature and preprocess the obtained data;
[0080] A data embedding module 11, configured to respectively embed different types of data points in the preprocessed data into multi-dimensional feature vectors as tokens corresponding to the data points;
[0081] An interpolation module 12, configured to, for any target point, input tokens of data points within a set spatio-temporal neighborhood of the target point into a trained interpolation model to interpolate the target geographical feature of the target point.
[0082] In the above interpolation device provided by the embodiment of the present invention, through the interaction of the above three modules, first, data required for interpolating a target geographical feature is obtained and preprocessed, so that data from different sources, in different formats, and of different qualities is unified and standardized, reducing the influence of data noise and outliers; then, different types of data points in the preprocessed data are embedded into multi-dimensional feature vectors as tokens corresponding to the data points, which can map various types of data to a unified feature space, enabling the model to process various forms of data and improving the adaptability to different data. In geographical feature interpolation, these multi-dimensional feature vectors have stronger expression ability than the original data, which helps the interpolation model to more accurately learn the distribution law and features of the data, thereby improving the interpolation accuracy. Then, tokens of data points within a set spatio-temporal neighborhood of the target point are input into the trained interpolation model to interpolate the target geographical feature of the target point, fully considering the correlation between the geographical features of the data points and the target geographical feature of the target point, enabling the interpolation model to better infer the value of the target geographical feature of the target point and making the interpolation result more conform to the actual distribution and change trend of the target geographical feature. The entire device has characteristics such as good versatility, high precision, and high automation.
[0083] Since the embodiments of the device part correspond to the embodiments of the method part, for the embodiments of the device part, please refer to the description of the embodiments of the method part, which will not be elaborated here for the time being. And it has the same beneficial effects as the above-mentioned interpolation method.
[0084] Further, in specific implementation, in the above-mentioned interpolation device provided in the embodiments of the present invention, the data processing module 10 may specifically be used to uniformly convert the soft data corresponding to the same geographical feature in the acquired data into vectors of the same dimension; when multiple geographical features are synchronously observed or acquired within the target range, combine the multiple geographical features into a new geographical feature, and represent the data corresponding to the new geographical feature by a vector synthesized from the data of the corresponding geographical features.
[0085] Further, in specific implementation, in the above-mentioned interpolation device provided in the embodiments of the present invention, the data embedding module 11 may specifically be used to embed the vector composed of the spatio-temporal coordinates and corresponding data of a data point into a multi-dimensional feature vector as the token of the corresponding data point; or, embed the spatio-temporal coordinates and corresponding data of a data point into multi-dimensional feature vectors respectively to obtain two multi-dimensional feature vectors; obtain the sum of the two multi-dimensional feature vectors, and use the sum vector as the token of the data point.
[0086] Further, in specific implementation, in the above-mentioned interpolation device provided in the embodiments of the present invention, it may further include: a model training module for training the constructed interpolation model. Specifically, the cross-validation method and the tokens of the data points within the spatio-temporal domain set by the hard data points of the target geographical feature may be used to train the interpolation model; input the output vector obtained after being processed by multiple encoders into a multi-layer fully connected head, output the predicted value of the target geographical feature of the target point, and calculate the loss function in combination with the hard data corresponding to the data point.
[0087] Figure 5 It is a schematic structural diagram of the interpolation device provided in the embodiments of the present invention. Based on the hardware perspective, as Figure 5 shown, the interpolation device includes:
[0088] A memory 20 for storing a computer program;
[0089] A processor 21 for implementing the steps of the interpolation method mentioned in the above embodiments when executing the computer program.
[0090] Among them, the processor 21 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 21 may be implemented in at least one hardware form of a Digital Signal Processor (DSP), a Field-Programmable Gate Array (FPGA), or a Programmable Logic Array (PLA). The processor 21 may also include a main processor and a coprocessor. The main processor is a processor used to process data in the wake state, also known as the CPU; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 21 may be integrated with a Graphics Processing Unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen and can also be used for model training and inference. In some embodiments, the processor 21 may further include an Artificial Intelligence (AI) processor, and the AI processor is used to process computational operations related to machine learning.
[0091] The memory 20 may include one or more computer-readable storage media, and the computer-readable storage media may be non-transitory. The memory 20 may further include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash storage devices. In this embodiment, the memory 20 is at least used to store the following computer program 201. After the computer program is loaded and executed by the processor 21, it can implement the relevant steps of the interpolation method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 20 may further include an operating system 202 and data 203, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 202 may include Windows, Unix, Linux, etc. The data 203 may include, but is not limited to, the data involved in the interpolation method mentioned above.
[0092] In some embodiments, the interpolation device may further include a display screen 22, an input / output interface 23, a communication interface 24, a power supply 25, and a communication bus 26. Those skilled in the art can understand that Figure 5 the structure shown in does not constitute a limitation on the interpolation device, and it may include more or fewer components than shown in the figure. The interpolation device provided by the embodiment of the present invention includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the interpolation method mentioned above, and the effect is the same.
[0093] Finally, the present invention also provides an embodiment corresponding to a computer-readable storage medium. A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps recorded in the above method embodiments are implemented.
[0094] It can be understood that if the method in the above embodiments is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage media include: various media such as USB flash drives, mobile hard disks, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical discs that can store program codes. The computer-readable storage medium provided by the present invention can implement the interpolation method mentioned above, and the effect is the same.
[0095] Finally, the present invention also provides an embodiment corresponding to a computer program product. The computer program product includes computer programs / instructions, and when the computer programs / instructions are executed by a processor, the steps recorded in the above interpolation method embodiments are implemented. The computer program product provided by the present invention can implement the interpolation method mentioned above, and the effect is the same.
[0096] It should also be noted that in this specification, relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover a non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including the said element.
[0097] The interpolation method, device, equipment and medium provided by the present invention have been introduced in detail above. The various embodiments in the specification are described in a progressive manner. Each embodiment focuses on the differences from other embodiments. For the same or similar parts among the various embodiments, reference can be made to each other. For the device disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple. For the relevant parts, reference can be made to the description in the method part. It should be noted that for those of ordinary skill in the art in the technical field of the present invention, without departing from the principle of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. An interpolation method, characterized in that, The method includes: Obtaining the data required for interpolation of target geographical elements, and preprocessing the obtained data; Embedding different types of data points in the preprocessed data into multi-dimensional feature vectors respectively as the tokens of the corresponding data points; For any target point, inputting the tokens of the data points within the set spatio-temporal neighborhood of the target point into the trained interpolation model to interpolate the target geographical element of the target point.
2. The interpolation method according to claim 1, wherein Preprocessing the obtained data includes: Uniformly converting the soft data corresponding to the same geographical element in the obtained data into vectors of the same dimension; When multiple geographical elements are synchronously observed or obtained within the target range, combining the multiple geographical elements into a new geographical element, and representing the data corresponding to the new geographical element by a vector synthesized from the data of the corresponding geographical elements.
3. The interpolation method according to claim 2, wherein Uniformly converting the soft data corresponding to the same geographical element in the obtained data into vectors of the same dimension, including: Representing the interval range soft data uniformly by a vector composed of interval endpoints; For probability distribution soft data, uniformly discretizing the probability distribution interval into several small intervals and calculating the corresponding probabilities, and representing the corresponding soft data by a vector composed of the probability values corresponding to the small intervals; Converting the nominal variable type soft data into a dummy variable vector representation.
4. The interpolation method according to claim 1, wherein Embedding different types of data points in the preprocessed data into multi-dimensional feature vectors respectively as the tokens of the corresponding data points, including: Embedding the vector composed of the spatio-temporal coordinates and the corresponding data of the data point into a multi-dimensional feature vector as the token of the corresponding data point; Or, embedding the spatio-temporal coordinates and the corresponding data of the data point into multi-dimensional feature vectors respectively to obtain two multi-dimensional feature vectors; obtaining the sum of the two multi-dimensional feature vectors and using the sum vector as the token of the data point.
5. The interpolation method according to claim 1, wherein Before inputting the tokens of the data points within the set spatio-temporal neighborhood of the target point into the trained interpolation model for any target point, it further includes: Determining the size and shape of the set spatio-temporal neighborhood according to the number of hard data points, soft data points, and synthetic data points within the spatio-temporal neighborhood; Training the constructed interpolation model.
6. The interpolation method according to claim 5, wherein Training the constructed interpolation model includes: Training the interpolation model by using the cross-validation method and the tokens of the data points within the set spatio-temporal domain of the hard data points of the target geographical element; Inputting the output vector obtained after being processed by multiple encoders into a multi-layer fully connected head, outputting the predicted value of the target geographical element of the target point, and calculating the loss function in combination with the hard data corresponding to the data point.
7. The interpolation method according to claim 6, characterized in that, Training the constructed interpolation model further includes: Taking the parameter of the quantile of the target geographical element of the target point as the input of the multi-layer fully connected head in the interpolation model, and combining with the quantile loss function to realize the training of the interpolation model.
8. An interpolation device, characterized in that The device includes: A data processing module, configured to obtain the data required for interpolation of target geographical elements, and preprocess the obtained data; A data embedding module, configured to embed different types of data points in the preprocessed data into multi-dimensional feature vectors respectively as the tokens of the corresponding data points; An interpolation module, configured to, for any target point, input the tokens of the data points within the set spatio-temporal neighborhood of the target point into a trained interpolation model, so as to interpolate the target geographical feature of the target point.
9. An interpolation device, characterized in that, The device includes: a memory, configured to store a computer program; a processor, configured to implement the steps of the interpolation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the interpolation method according to any one of claims 1 to 7 are implemented.