A meteorological data processing method, device and medium based on sparse matrix
By processing meteorological data based on a sparse matrix method, the problems of large memory usage and ineffective calculations in traditional technology are solved, efficient data processing and storage is achieved, and it is suitable for large-scale meteorological data processing.
Patent Information
- Application Number
- CN202410888297.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-04
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-04
AI Technical Summary
When traditional meteorological data processing methods process data containing a large number of zero values or invalid values, they result in large memory usage, increased invalid calculations, and do not support concurrent access, which reduces the efficiency of large-scale meteorological data processing.
Using a sparse matrix-based data processing method, by obtaining the meteorological data processing requirements, reading the meteorological data and converting it into a sparse matrix, slicing it into a sub-matrix set, and performing dimensionality reduction index value calculation to facilitate parallel processing and storage of non-zero elements. , optimize resource utilization and storage efficiency.
Significantly improves data processing efficiency, saves storage space, reduces computing resource consumption, supports multi-dimensional data analysis and concurrent processing, adapts to block loading and processing of large data sets, and reduces data transmission and storage costs.
Smart Images

Figure CN118410214B_ABST
Abstract
Description
Technical Field
[0001] The present specification relates to the field of data processing technology, and in particular to a meteorological data processing method, device and medium based on sparse matrix. Background Art
[0002] The network common data format (NetCDF) is a description and encoding standard for array-oriented data suitable for network sharing. NetCDF is widely used in many fields such as atmospheric science, hydrology, oceanography, environmental simulation, geophysics, etc. In the process of processing meteorological data, especially for meteorological data that changes with time and space, such as rainfall data and snowfall data, there are a large number of zero values or invalid data in this type of data. For NetCDF data, if there are a large number of zero values or invalid data in the meteorological data in the data set, when these data are loaded into the memory, they will take up a lot of space, resulting in inefficient resource utilization. In addition, when processing large meteorological data sets and performing statistical analysis, model simulation and other tasks on meteorological data in NetCDF data, the need to calculate these zero values or invalid data increases additional invalid calculation workload, thereby reducing the overall processing efficiency; and because the meteorological data in NetCDF format does not support simultaneous access, it cannot cope with concurrent processing scenarios, which reduces the processing efficiency of meteorological data.
[0003] Therefore, for meteorological data with a large number of zero or invalid values, traditional data processing methods have problems such as large memory usage, increased invalid calculations, and no support for concurrent access, which limits the data processing efficiency in large-scale meteorological data processing. Summary of the invention
[0004] One or more embodiments of the present specification provide a sparse matrix-based meteorological data processing method, device and medium for solving the following technical problems: For meteorological data with a large number of zero values or invalid values, traditional data processing methods have problems such as large memory usage, increased invalid calculations and lack of support for concurrent access, which limits the data processing efficiency in large-scale meteorological data processing.
[0005] One or more embodiments of this specification adopt the following technical solutions:
[0006] One or more embodiments of the present specification provide a meteorological data processing method based on a sparse matrix, the method comprising: obtaining a meteorological data processing requirement, and reading the meteorological data to be processed corresponding to the meteorological data type in the original meteorological data set through the meteorological data processing requirement, wherein the meteorological data processing requirement includes the meteorological data type and the meteorological data processing dimension, and the meteorological data processing dimension includes the time dimension, the longitude dimension and the latitude dimension; converting the meteorological data to be processed into a meteorological array to determine the sparse matrix to be processed corresponding to the meteorological data to be processed, and obtaining the initial index value and meteorological data corresponding to the sparse matrix to be processed; slicing the sparse matrix to be processed according to the meteorological data processing dimension, and determining a submatrix set corresponding to the meteorological data processing dimension, wherein the submatrix set includes multiple submatrices, and each submatrix corresponds to a dimension value of the meteorological data processing dimension; calculating the index value after dimensionality reduction for each submatrix in the submatrix set, determining the dimensionality reduction index value in each submatrix, and associating the meteorological data in the submatrix through the dimensionality reduction index value to perform data processing on the meteorological data.
[0007] Furthermore, the meteorological data to be processed is converted into a meteorological array to determine the sparse matrix to be processed corresponding to the meteorological data to be processed, specifically including: obtaining the meteorological data and dimensional data of multiple meteorological impact dimensions in the meteorological data to be processed, wherein the meteorological impact dimensions include longitude, latitude and time; arranging the meteorological data according to the dimensional data of the meteorological impact dimensions to determine the multidimensional meteorological array corresponding to the meteorological data to be processed; analyzing the meteorological data in the multidimensional meteorological array to determine non-zero meteorological data, and obtaining the meteorological impact dimension data corresponding to the non-zero meteorological data; determining the sparse matrix to be processed corresponding to the meteorological data to be processed through the non-zero meteorological data and the meteorological impact dimension data corresponding to the non-zero meteorological data.
[0008] Furthermore, according to the meteorological data processing dimension, the sparse matrix to be processed is sliced to determine a set of sub-matrices corresponding to the meteorological data processing dimension, specifically including: according to the meteorological data processing dimension, the sparse matrix to be processed is subjected to dimensionality reduction processing to obtain a reduced dimension matrix corresponding to each processing dimension data under the meteorological data processing dimension; through the reduced dimension matrix corresponding to each processing dimension data, the set of sub-matrices corresponding to the meteorological data processing dimension is determined.
[0009] Furthermore, according to the meteorological data processing dimension, the sparse matrix to be processed is subjected to dimensionality reduction processing to obtain a dimensionality reduction matrix corresponding to each processing dimension data under the meteorological data processing dimension, specifically including: according to the meteorological data processing dimension, the sparse matrix to be processed is grouped to obtain grouped data corresponding to each processing dimension data under the meteorological data processing dimension; each of the grouped data is converted into a coordinate matrix after dimensionality reduction to determine the dimensionality reduction matrix corresponding to each of the grouped data.
[0010] Furthermore, the index value after dimensionality reduction is calculated for each submatrix in the submatrix set to determine the dimensionality reduction index value in each submatrix, specifically including: determining the initial index value of the matrix data in each submatrix in the sparse matrix to be processed, so as to convert the initial index value into an initial matrix dimension array, wherein the initial matrix dimension array includes dimension values under multiple dimensions; traversing the initial matrix dimension array, and adding other dimension values corresponding to other dimensions except the meteorological data processing dimension to the first array; traversing the pre-constructed dimension length array, and adding the dimension length information corresponding to other dimensions except the meteorological data processing dimension to the second array, wherein the dimension length information is used to represent the amount of data under each dimension; traversing the second array, and based on the dimension length information in the second array, calculating the dimensional volume data of the previous dimension, and storing it in the third array; and calculating the dimensionality reduction index value in each submatrix according to the first array and the third array.
[0011] Further, the initial index value is converted into an initial matrix dimension array, specifically including: analyzing the sparse matrix to be processed to determine the dimensional reference data amount under each dimension, wherein the dimensional reference data amount is used to represent the data change amount corresponding to each incremental unit dimensional amount; determining the first dimension reference data amount corresponding to the first dimension, the second dimension reference data amount corresponding to the second dimension, and the third dimension reference data amount corresponding to the third dimension through the dimensional reference data amount under each dimension, wherein the first dimension is the highest dimension, and the number of dimensions of the first dimension, the second dimension, and the third dimension decreases in sequence; according to the initial index value and the first dimension reference data amount, According to the data volume, a first quotient and a first remainder are determined through division operation, and the first dimension value under the highest dimension is determined according to the first quotient; based on the first remainder and the second dimension reference data volume, a second quotient and a second remainder are determined through division operation, and the second dimension value under the second dimension is determined according to the second quotient; according to the second remainder and the third dimension reference data volume, a third quotient and a third remainder are determined through division operation, and the third dimension value under the third dimension is determined according to the third quotient; the third dimension value, the second dimension value and the first dimension value are sorted in order from low to high in terms of the number of dimensions to obtain an initial matrix dimension array corresponding to the initial index value.
[0012] Furthermore, the meteorological data in the submatrix are associated through the dimensionality reduction index value to perform data processing on the meteorological data, specifically including: obtaining data processing requirement information, wherein the data processing requirement information includes the dimensional analysis range corresponding to the meteorological data processing dimension; based on the dimensional analysis range, screening is performed among the multiple submatrices to determine at least one designated submatrix corresponding to the dimensional analysis range; each of the designated submatrices is analyzed to determine the designated dimensionality reduction index value corresponding to each non-zero element in each of the designated submatrices; based on the designated dimensionality reduction index value, the meteorological data of the designated dimensionality reduction index value in each of the designated submatrices is queried to determine the set of meteorological data to be analyzed; and through the set of meteorological data to be analyzed, data processing is performed on the meteorological data within the dimensional analysis range.
[0013] Furthermore, according to the meteorological data processing requirements, the meteorological data to be processed corresponding to the meteorological data type is read in the original meteorological data set, specifically including: obtaining the original meteorological data set, wherein the original meteorological data set is a NetCDF data set, which is used to store various types of meteorological data under various meteorological impact dimensions, and the meteorological impact dimensions include longitude, latitude and time; according to the meteorological data type in the meteorological data processing requirements, the meteorological data of the specified type of the corresponding type is read in the original meteorological data set to determine the meteorological data to be processed.
[0014] One or more embodiments of the present specification provide a meteorological data processing device based on a sparse matrix, including:
[0015] at least one processor; and,
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method.
[0018] One or more embodiments of this specification provide a non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to:
[0019] Obtain meteorological data processing requirements, and read the meteorological data to be processed corresponding to the meteorological data type in the original meteorological data set through the meteorological data processing requirements, wherein the meteorological data processing requirements include the meteorological data type and the meteorological data processing dimension, and the meteorological data processing dimension includes the time dimension, the longitude dimension and the latitude dimension; convert the meteorological data to be processed into a meteorological array to determine the sparse matrix to be processed corresponding to the meteorological data to be processed, and obtain the initial index value and meteorological data corresponding to the sparse matrix to be processed; according to the meteorological data processing dimension, slice the sparse matrix to be processed to determine the submatrix set corresponding to the meteorological data processing dimension, wherein the submatrix set includes multiple submatrices, each of which corresponds to a dimension value or a dimension value range of the meteorological data processing dimension; calculate the index value after dimensionality reduction for each of the submatrices in the submatrix set, determine the dimensionality reduction index value in each of the submatrices, and associate the meteorological data in the submatrix through the dimensionality reduction index value to perform data processing on the meteorological data.
[0020] At least one of the above technical solutions adopted in the embodiments of this specification can achieve the following beneficial effects: through the above technical solution, by slicing the sparse matrix to be processed according to the meteorological data processing dimension to form a set of sub-matrices, these sub-matrices can be processed in parallel, thereby improving the overall data processing efficiency; the characteristics of sparse matrices make a large number of elements zero or invalid, and directly processing the entire matrix will cause a waste of computing resources. By slicing and reducing the dimension, only processing the sub-matrix containing valid data can significantly reduce resource consumption; by calculating the dimensionality reduction index value, the meteorological data in different sub-matrices can be associated to achieve data integration across time, longitude and latitude dimensions, for More complex analysis is possible; meteorological data usually contains multiple dimensions such as time, longitude and latitude. By slicing these dimensions, it is easier to support multidimensional data analysis, such as time series analysis, spatial distribution analysis, etc.; the determination of sub-matrix sets makes data processing more flexible, and a sub-matrix can be selectively processed according to specific needs without processing the entire data set; by accurately calculating the dimensionality reduction index value of the sub-matrix, the accuracy and consistency of the data can be ensured during the data processing process; converting the original meteorological data into meteorological arrays and sparse matrices, and calculating the dimensionality reduction index value, the data storage method can be optimized and the efficiency of data retrieval can be improved. For meteorological data with a large number of zero or invalid values, storage space can be significantly saved by storing only the coordinates and values of non-zero elements, greatly reducing the storage requirements of data files; in large data set processing scenarios, sparse matrices can be used to compress data to adapt it to limited memory capacity. For NetCDF files, if the data set is too large to be loaded into memory at one time, compressed storage of sparse matrices can be used to load and process it in blocks, improving memory usage efficiency; in addition, the compressed storage method of sparse matrices reduces the size of the data, thereby reducing the cost of data transmission and storage. For NetCDF data, especially in network transmission and cloud storage scenarios, the use of sparse matrices can significantly reduce bandwidth and storage space consumption. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art description. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative labor. In the drawings:
[0022] Figure 1 A schematic diagram of a flow chart of a meteorological data processing method based on a sparse matrix provided in an embodiment of this specification;
[0023] Figure 2A schematic diagram of the structure of a meteorological data processing device based on a sparse matrix provided in an embodiment of this specification. DETAILED DESCRIPTION
[0024] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.
[0025] The network common data format (NetCDF) is a description and encoding standard for array-oriented data suitable for network sharing. NetCDF is widely used in many fields such as atmospheric science, hydrology, oceanography, environmental simulation, geophysics, etc. In the process of processing meteorological data, especially for meteorological data that changes with time and space, such as rainfall data and snowfall data, there are a large number of zero values or invalid data in this type of data. For NetCDF data, if there are a large number of zero values or invalid data in the meteorological data in the data set, when these data are loaded into the memory, they will take up a lot of space, resulting in inefficient resource utilization. In addition, when processing large meteorological data sets and performing statistical analysis, model simulation and other tasks on meteorological data in NetCDF data, the need to calculate these zero values or invalid data increases additional invalid calculation workload, thereby reducing the overall processing efficiency; and because the meteorological data in NetCDF format does not support simultaneous access, it cannot cope with concurrent processing scenarios, which reduces the processing efficiency of meteorological data.
[0026] Therefore, for meteorological data with a large number of zero or invalid values, traditional data processing methods have problems such as large memory usage, increased invalid calculations, and no support for concurrent access, which limits the data processing efficiency in large-scale meteorological data processing.
[0027] The embodiment of this specification provides a meteorological data processing method based on a sparse matrix. It should be noted that the execution subject in the embodiment of this specification can be a server or any device with data processing capabilities. Figure 1 A schematic diagram of a flow chart of a meteorological data processing method based on a sparse matrix provided in an embodiment of this specification, such as Figure 1 As shown, it mainly includes the following steps:
[0028] Step S101 , obtaining a meteorological data processing requirement, so as to read the to-be-processed meteorological data corresponding to the meteorological data type in the original meteorological data set according to the meteorological data processing requirement.
[0029] The meteorological data processing requirements include meteorological data types and meteorological data processing dimensions, and the meteorological data processing dimensions include time dimension, longitude dimension and latitude dimension.
[0030] According to the meteorological data processing requirement, the meteorological data to be processed corresponding to the meteorological data type is read in the original meteorological data set, specifically including: obtaining the original meteorological data set, wherein the original meteorological data set is a NetCDF data set, which is used to store various types of meteorological data under various meteorological impact dimensions, and the meteorological impact dimensions include longitude, latitude and time; according to the meteorological data type in the meteorological data processing requirement, the meteorological data of the specified type of the corresponding type is read in the original meteorological data set to determine the meteorological data to be processed.
[0031] In one embodiment of the present specification, a meteorological data processing requirement is obtained, and the meteorological data processing requirement includes a meteorological data type and a meteorological data processing dimension. The meteorological data processing dimension includes a time dimension, a longitude dimension, and a latitude dimension. The meteorological data processing requirement here is related to the application scenario of the meteorological data. For example, in an application scenario of rainfall data trend analysis within a certain time range in a region, it is necessary to obtain rainfall data within a certain time range in the region. The corresponding meteorological data type is rainfall type meteorological data, that is, rainfall data. The impact dimensions of rainfall data include three dimensions of longitude, latitude, and time. However, in combination with the application scenario of rainfall data trend analysis within a certain time range in a region, it can be seen that the corresponding data processing dimension is the time dimension, and trend analysis is performed on regional rainfall data at different times.
[0032] In one embodiment of the present specification, an original meteorological data set is obtained, wherein the original meteorological data set is a NetCDF data set, which is used to store various types of meteorological data under various meteorological impact dimensions, collect and organize meteorological data, and may include rainfall, snowfall, etc., and change with time (such as every hour, every day) and space (such as longitude and latitude grid). Such meteorological data is usually sparse, that is, the values of most data points are zero or close to zero. In order to reduce storage and computing costs, sparse matrix technology can be used to represent these data later. After obtaining the original meteorological data set, the GridDataset class reads the NetCDF data, reads the specified type of meteorological data of the corresponding type in the original meteorological data set according to the meteorological data type in the meteorological data processing requirements from the file with the nc suffix, and determines the meteorological data to be processed.
[0033] Through the above technical solution, combined with the application scenarios of meteorological data, matching the meteorological data processing needs, starting from the user's demand for meteorological data, reading the corresponding type of meteorological data in a large amount of raw data, and matching the corresponding meteorological data processing dimensions, it provides a basis for the subsequent data processing process, which is conducive to improving the data processing efficiency of the subsequent data processing process.
[0034] Step S102, converting the meteorological data to be processed into a meteorological array to determine a sparse matrix to be processed corresponding to the meteorological data to be processed, and obtaining an initial index value and meteorological data corresponding to the sparse matrix to be processed.
[0035] The meteorological data to be processed is converted into a meteorological array to determine the sparse matrix to be processed corresponding to the meteorological data to be processed, specifically including: obtaining the meteorological data and dimensional data of multiple meteorological impact dimensions in the meteorological data to be processed, wherein the meteorological impact dimension includes longitude, latitude and time; arranging the meteorological data according to the dimensional data of the meteorological impact dimension to determine the multidimensional meteorological array corresponding to the meteorological data to be processed; analyzing the meteorological data in the multidimensional meteorological array to determine non-zero meteorological data, and obtaining the meteorological impact dimension data corresponding to the non-zero meteorological data; determining the sparse matrix to be processed corresponding to the meteorological data to be processed through the non-zero meteorological data and the meteorological impact dimension data corresponding to the non-zero meteorological data.
[0036] In one embodiment of the present specification, meteorological data and dimensional data of multiple meteorological impact dimensions in the meteorological data to be processed are obtained, and the meteorological impact dimensions include longitude, latitude and time. The dimensional data here is related to specific dimensional values, such as longitude value, latitude value and time value. Here, the user can pre-construct a coordinate grid according to the needs, and determine the longitude range, latitude range and time range corresponding to each grid. For example, longitude is taken as X, latitude is taken as Y, and time is taken as Z. The origin corresponds to the specified longitude, specified latitude and specified time, such as 30 degrees east longitude, 30 degrees north latitude, and 0 o'clock on June 20, and three-dimensional coordinates are constructed. The longitude change range corresponding to each unit X is 1 degree, the latitude change range corresponding to each unit Y is 1 degree, and the time corresponding to each unit Z is one hour. The specific values under each meteorological impact dimension corresponding to each meteorological data are converted into the form of dimensional coordinates, and the dimensional coordinates can be used as dimensional data. The meteorological data is arranged according to the dimensional data of the meteorological impact dimension to generate a multidimensional meteorological array corresponding to the meteorological data to be processed. Under three meteorological impact latitudes, the corresponding meteorological array is a three-dimensional array. The meteorological data in the multidimensional meteorological array is analyzed to determine the non-zero meteorological data, and the meteorological impact dimension data corresponding to the non-zero meteorological data is obtained. Here, the meteorological impact dimension data is the dimensional coordinates of longitude, latitude and time corresponding to the non-zero meteorological data, such as (2, 2, 1). The sparse matrix to be processed corresponding to the meteorological data to be processed is determined by the non-zero meteorological data and the meteorological impact dimension data corresponding to the non-zero meteorological data, and stored. Here, the information of the non-zero elements in the matrix can be stored in the form of a triple (row, col, data). There are relatively few non-zero elements in a sparse matrix, so the storage space can be significantly saved by storing only the coordinates and values of the non-zero elements. For NetCDF data, if there are a large number of zero values or invalid data, the use of sparse matrices can greatly reduce the storage requirements of data files. In other words, the non-zero values and their corresponding coordinates (such as longitude, latitude, time, etc.) in the NetCDF meteorological data are represented in the form of a sparse matrix, and only non-zero data are stored and processed, thereby significantly reducing the storage space requirements.
[0037] Step S103, according to the meteorological data processing dimension, the sparse matrix to be processed is sliced to determine a sub-matrix set corresponding to the meteorological data processing dimension.
[0038] The sub-matrix set includes a plurality of sub-matrices, each of which takes a value corresponding to a dimension of the meteorological data processing dimension, for example, the time dimension corresponding to time 0 takes 0.
[0039] In one embodiment of the specification, for NetCDF files, when processing large data sets, due to the limitation of memory resources, there is a data set that is too large to be loaded into the memory at one time. In order to solve the above problem, the sparse matrix to be processed can be sliced according to the meteorological data processing dimension, and the sub-matrix set corresponding to the meteorological data processing dimension can be determined. Through the compressed storage of the sparse matrix, block loading and processing are realized, and the memory usage efficiency is improved.
[0040] According to the meteorological data processing dimension, the sparse matrix to be processed is sliced to determine the submatrix set corresponding to the meteorological data processing dimension, specifically including: according to the meteorological data processing dimension, the sparse matrix to be processed is subjected to dimensionality reduction processing to obtain the reduced dimension matrix corresponding to each processing dimension data under the meteorological data processing dimension; through the reduced dimension matrix corresponding to each processing dimension data, the submatrix set corresponding to the meteorological data processing dimension is determined.
[0041] In one embodiment of the present specification, the sparse matrix to be processed is subjected to dimensionality reduction processing according to the meteorological data processing dimension. Continuing with the above example, assuming that the meteorological data processing dimension is the time dimension, the three-dimensional matrix is split into two-dimensional matrices under multiple time values to obtain a dimensionality reduction matrix corresponding to each time value. The multiple dimensionality reduction matrices are sub-matrices corresponding to different time values under the time dimension, and a sub-matrix set corresponding to the meteorological data processing dimension is obtained.
[0042] According to the meteorological data processing dimension, the sparse matrix to be processed is subjected to dimensionality reduction processing to obtain a dimensionality reduction matrix corresponding to each processing dimension data under the meteorological data processing dimension, specifically comprising: according to the meteorological data processing dimension, the sparse matrix to be processed is grouped to obtain grouped data corresponding to each processing dimension data under the meteorological data processing dimension; each of the grouped data is converted into a coordinate matrix after dimensionality reduction to determine the dimensionality reduction matrix corresponding to each of the grouped data.
[0043] In one embodiment of the present specification, it is assumed that there are 18 meteorological data, and the sparse matrix to be processed is a 3*3*2 matrix, that is, there are two values of the time dimension Z, which can be Z=0 and Z=1. According to the time dimension, the matrix to be processed is divided into two groups, one group is the meteorological data at different latitudes Y and longitudes X when Z=0, and this group of data is converted into a 3*3 two-dimensional coordinate matrix, and the other group is the meteorological data at different latitudes and longitudes when Z=1, and is also converted into a 3*3 two-dimensional coordinate matrix. Since the obtained coordinate matrix is a two-dimensional coordinate matrix, compared with the three-dimensional matrix corresponding to the sparse matrix to be processed, it reduces one dimension, so it is called a dimensionality reduction matrix.
[0044] In one embodiment of the present specification, the matrix slicing function is used to reduce the dimension of the matrix according to the specified dimension and return the set of sub-matrices after the dimension reduction. The program implementation logic is as follows. First, create an array subEveryDimensionLength whose length is 1 less than the original dimension length, which is used to store the length of each dimension after removing the specified dimension (such as the time dimension). The length of each dimension here can be understood as the amount of data under each dimension. Then, by traversing the original dimension length array, the lengths of other dimensions except the specified dimension (such as the time dimension) are stored in the subEveryDimensionLength array. Next, the streaming operation of Java 8 is used to process the original matrix data. The matrix data is grouped according to the specified dimension through the groupingBy method, and the data in each group is converted into a coordinate matrix after dimension reduction using the toMap method. Finally, the set of sub-matrices after dimension reduction is stored in result and returned.
[0045] Through the above technical scheme, by slicing the sparse matrix according to the meteorological data processing dimension, each sub-matrix can be processed independently or in parallel, thereby greatly improving the efficiency of data processing; most of the elements in the sparse matrix are 0, and directly processing the entire matrix will waste computing resources. Through dimensionality reduction processing, only the sub-matrix where non-zero elements or key elements are located is processed, which can significantly reduce the consumption of computing resources; the sub-matrix after dimensionality reduction is usually smaller than the original sparse matrix, which helps to optimize the data storage method and save storage space; after the sparse matrix is sliced according to the meteorological data processing dimension, each sub-matrix represents a specific data set under a certain dimension, which makes data analysis and mining more intuitive and convenient; the determination of the sub-matrix set makes the meteorological data processing more flexible, and a sub-matrix can be selectively processed or analyzed as needed without processing the entire sparse matrix; by independently processing each sub-matrix, the mutual influence between data of different dimensions can be avoided, thereby improving the accuracy of data processing; after obtaining the sub-matrix set, various complex mathematical, statistical or machine learning algorithms can be further applied for more in-depth analysis to extract more valuable information.
[0046] Step S104, calculate the index value after dimensionality reduction for each submatrix in the submatrix set, determine the dimensionality reduction index value in each submatrix, and associate the meteorological data in the submatrix through the dimensionality reduction index value to perform data processing on the meteorological data.
[0047] The index value after dimensionality reduction is calculated for each submatrix in the submatrix set, and the dimensionality reduction index value in each submatrix is determined, specifically including: determining the initial index value of the matrix data in each submatrix in the sparse matrix to be processed, so as to convert the initial index value into an initial matrix dimension array, wherein the initial matrix dimension array includes dimension values under multiple dimensions; traversing the initial matrix dimension array, and adding other dimension values corresponding to other dimensions except the meteorological data processing dimension to the first array; traversing the pre-constructed dimension length array, and adding the dimension length information corresponding to other dimensions except the meteorological data processing dimension to the second array, wherein the dimension length information is used to represent the amount of data under each dimension; traversing the second array, and based on the dimension length information in the second array, calculating the dimensional volume data of the previous dimension, and storing it in the third array; and calculating the dimensionality reduction index value in each submatrix according to the first array and the third array.
[0048] In one embodiment of the present specification, the initial index value of the matrix data in each submatrix in the sparse matrix to be processed is determined. The initial index value here is the initial index value under the three dimensions of longitude, latitude, and time, which is related to the index value setting rules specified in the NetCDF file. Taking a 3*3*2 matrix as an example, the initial index value corresponding to (1, 1, 0) is 1, the initial index value corresponding to (2, 1, 0) is 2, the initial index value corresponding to (3, 1, 0) is 3, and the initial index value corresponding to (1, 2, 0) is 4, and so on. After determining the initial index value, it is necessary to convert the initial index value into an initial matrix dimension array.
[0049] Converting the initial index value into an initial matrix dimension array specifically includes: analyzing the sparse matrix to be processed to determine the dimensional reference data amount under each dimension, wherein the dimensional reference data amount is used to represent the data change amount corresponding to each incremental unit dimensional amount; determining the first dimension reference data amount corresponding to the first dimension, the second dimension reference data amount corresponding to the second dimension, and the third dimension reference data amount corresponding to the third dimension through the dimensional reference data amount under each dimension, wherein the first dimension is the highest dimension, and the number of dimensions of the first dimension, the second dimension, and the third dimension decreases in sequence; according to the initial index value and the first dimension reference data amount, A quantity is determined by a division operation to determine a first quotient and a first remainder, and a first dimension value under the highest dimension is determined according to the first quotient; based on the first remainder and the second dimensional reference data quantity, a second quotient and a second remainder are determined by a division operation, and a second dimension value under the second dimension is determined according to the second quotient; based on the second remainder and the third dimensional reference data quantity, a third quotient and a third remainder are determined by a division operation, and a third dimension value under the third dimension is determined according to the third quotient; the third dimension value, the second dimension value and the first dimension value are sorted in order from low to high in terms of the number of dimensions to obtain an initial matrix dimension array corresponding to the initial index value.
[0050] In one embodiment of the present specification, the sparse matrix to be processed is first analyzed to determine the dimensional reference data amount under each dimension. The dimensional reference data amount is used to represent the data change amount corresponding to each incremental unit dimensional amount, including the first dimension reference data amount corresponding to the first dimension, the second dimension reference data amount corresponding to the second dimension, and the third dimension reference data amount corresponding to the third dimension. Next, an example is given to illustrate the above process. Continuing with the above example, the sparse matrix to be processed is a 3*3*2 matrix, which contains three dimensions and can be called the highest dimension. First, the time dimension corresponding to Z is analyzed. For each increase of Z by one unit, the amount of data in the corresponding array increases by 3*3, that is, 9. It can be understood that when Z=0, there are 9 data in the XOY plane, and when Z=1, there are 18 data in the XOY plane. The dimensional amount corresponding to Z increases by one unit, and the amount of data in the corresponding array increases by 9. In this example, the first dimension is the time dimension, and the amount of reference data of the first dimension is 9. Next, we analyze the second dimension, namely the Y dimension. When analyzing the Y dimension, Y can be 1, 2, and 3. When Y is 1, the corresponding array includes 3 data. When the dimension corresponding to Y increases by one unit and takes 2, the number of corresponding arrays becomes 6. Similarly, when the dimension corresponding to Y increases by another unit and takes 3, the number of corresponding arrays becomes 9. Therefore, for every increase of one unit of Y, the number changes by 3. In this example, the second dimension is the latitude dimension Y, and the reference data volume of the second dimension is 3. Similarly, for the lowest dimension, that is, when there is only one dimension of the X dimension, for every increase of one unit of X, the number of arrays changes by 1. In this example, the third dimension is the longitude dimension X, and the reference data volume of the third dimension is 1. It should be noted that the first dimension being the highest dimension means that when the first dimension exists, the number of dimensions in the array is the largest, including the first, second, and third dimensions, and the number of dimensions is 3. The second dimension refers to the second and third dimensions remaining after removing the first dimension, and the number of dimensions is 2. The third dimension refers to the case where only the first dimension remains after removing the second dimension, and the number of dimensions is 1. Therefore, the number of dimensions of the first dimension, the second dimension, and the third dimension decreases successively.
[0051] Determine the initial index value, and obtain the corresponding dimension array dimensions through the indexToDimensions (one-dimensional to multi-dimensional) method based on the original index information, that is, the initial index value. Assuming that the initial index value in the above example is 17, in order to convert the initial index value 17 into the corresponding initial matrix dimension array, the initial index value 17 and the first dimension reference data volume 9 are divided, and the first quotient is determined to be 1 and the first remainder is 8. The first quotient 1 obtained is the value under the first dimension, that is, the first dimension value Z=1. The first remainder 8 and the second dimension reference data volume 3 are divided to determine the second quotient 2 and the second remainder 2. The second quotient 2 obtained is the value under the Y dimension, that is, the second dimension value Y=2. The second remainder 2 and the third dimension are divided by the reference data volume 1 to determine the third quotient 2 and the third remainder 1. The third quotient 2 is the value of X, that is, the third dimension value. According to the order of the number of dimensions from low to high, based on the previous discussion, the number of data dimensions of the third dimension, the second dimension, and the first dimension increases, which are 1 dimension X, two dimensions XY, and three dimensions XYZ respectively. Therefore, according to the order of the third dimension value, the second dimension value, and the first dimension value, the initial matrix dimension array (2, 2, 1) corresponding to the initial index value is obtained.
[0052] A new array targetDimensions is created in advance, i.e., the first array, for storing dimension information after deleting the specified dimension. The initial matrix dimension array is traversed, and other dimension values corresponding to other dimensions other than the meteorological data processing dimension are added to the first array. Assuming the initial matrix dimension array (2, 2, 1), the submatrix obtained by slicing according to the time dimension Z in the embodiment of this specification is obtained. Therefore, the dimension value of dimension Z is deleted from the initial matrix dimension array (2, 2, 1) to obtain the array (2, 2), and the other dimension values (2, 2) except the specified dimension (time dimension Z) are added to the targetDimensions array, i.e., the first array. A new array subEveryDimensionLength is created, i.e., the second array, for storing the dimension length information after deleting the specified dimension, i.e., the amount of dimension data after deleting the time dimension Z. The pre-constructed dimension length array everyDimensionLength array is traversed, and the other dimension length values except the specified dimension are added to the second array subEveryDimensionLength array. The dimension length information is used to represent the amount of data under each dimension. In the above example, the amount of data in the X dimension is 3, and the amount of data in the Y dimension is 3. The second array is traversed to obtain the dimension length information of each dimension in the second array. Based on the dimension length information in the second array, the dimension volume data of the previous dimension is calculated, and the calculation is performed in order, starting from the X dimension. The X dimension can be understood as a line, and the amount of data increases one by one, so the volume of the X dimension is 1, and the XY dimension is understood as a surface. In the Y dimension, for each additional unit dimension, the amount of data increases by 3, so the volume corresponding to the XY dimension is 3, and the XYZ dimension is understood as a cuboid. In the Z dimension, for each additional unit dimension, the amount of data increases by 3*3=9, so its volume data is 9. It should be noted that the dimension volume data here is the same as the dimension reference data in the aforementioned content. It is a different expression during the program running process, and its meaning is the same.
[0053] In the embodiments of this specification, the time dimension Z is removed, so it is only necessary to store (1, 3) in the third array, and obtain the dimension reduction index value in each sub-matrix according to the first array (2, 2) and the third array (1, 3). Y=2 indicates that after the process of Y being 0 and Y being 1, the amount of data increases by 3 for each unit dimension added in the Y dimension, and Y here increases by two unit dimensions, so the corresponding amount of data changes to 3*2=6, and X=2 indicates that two unit dimensions are added in the X dimension, so 1*2=2 is the amount of data change generated by the X dimension, and the initial index value is 17 calculated by 2*3+2*1, and the dimension reduction index value in different sub-matrices after dimension reduction is 8.
[0054] Through the above technical solution, by calculating the dimensionality reduction index value, the meteorological data originally scattered in multiple sub-matrices can be associated, which is very useful for situations where cross-dimensional analysis or integration of meteorological data is required, such as multivariate analysis in climate models. In big data processing, data indexing and retrieval is a key step, and the dimensionality reduction index value can be used as a tool for rapid retrieval and positioning of data, making the data processing process more efficient; in sparse matrices, many elements are zero or invalid values. Through dimensionality reduction and index value calculation, only those sub-matrices and elements containing valid data can be focused on, thereby reducing data redundancy and improving processing efficiency; when the dimensionality reduction index value of the sub-matrix is determined, it can be more easily allocated to different processing units or threads for parallel processing, which can not only speed up data processing, but also improve resource utilization; through the dimensionality reduction index value, more complex query and analysis operations can be supported, such as spatial distribution analysis based on multiple dimensions.
[0055] The meteorological data in the submatrix are associated through the dimensionality reduction index value to perform data processing on the meteorological data, specifically including: obtaining data processing requirement information, wherein the data processing requirement information includes a dimensional analysis range corresponding to the meteorological data processing dimension; based on the dimensional analysis range, screening is performed among multiple submatrices to determine at least one designated submatrix corresponding to the dimensional analysis range; each of the designated submatrices is analyzed to determine a designated dimensionality reduction index value corresponding to each non-zero element in each of the designated submatrices; based on the designated dimensionality reduction index value, the meteorological data of the designated dimensionality reduction index value in each of the designated submatrices is queried to determine a set of meteorological data to be analyzed; and through the set of meteorological data to be analyzed, data processing is performed on the meteorological data within the dimensional analysis range.
[0056] In one embodiment of the present specification, data processing demand information is obtained, wherein the data processing demand information includes a dimensional analysis range corresponding to the meteorological data processing dimension, for example, the dimensional range under the time dimension is from 0 o'clock to 8 o'clock. Based on the dimensional analysis range, screening is performed in multiple sub-matrices to determine at least one designated sub-matrix corresponding to the dimensional analysis range, and the value under the time dimension is determined according to the dimensional analysis range, and the corresponding designated sub-matrix is obtained according to the value under the time dimension. Each designated sub-matrix is analyzed to determine the designated dimensionality reduction index value corresponding to each non-zero element in each designated sub-matrix, and the meteorological data of the designated dimensionality reduction index value in each designated sub-matrix is queried through the designated dimensionality reduction index value to determine the meteorological data set to be analyzed, and the meteorological data within the dimensional analysis range is subjected to subsequent operations such as data processing and data analysis through the meteorological data set to be analyzed. During the calculation process, the sparse matrix algorithm can avoid the calculation of zero elements, thereby improving the calculation efficiency. For numerical calculation tasks in NetCDF data, such as statistical analysis, model simulation, etc., for example, when summarizing rainfall, it is only necessary to add the rainfall in each submatrix corresponding to the specified dimensionality reduction index value of the non-zero data to obtain the cumulative rainfall data, without the need for invalid calculations on a large number of zero elements. In addition, the non-zero elements in each submatrix can be processed at the same time, and these submatrices can be processed in parallel, thereby improving the overall data processing efficiency. The use of sparse matrices can significantly reduce invalid calculations and speed up processing. In addition, the sparse matrix algorithm supports a variety of compressed storage methods, such as triples, sequential tables of row logical links, etc., and the appropriate implementation method can be selected according to specific needs, which provides greater flexibility for processing NetCDF data. The appropriate sparse matrix algorithm can be selected for optimization according to the characteristics of the data and the application scenario.
[0057] Through the above technical solution, by slicing the sparse matrix to be processed according to the meteorological data processing dimension to form a sub-matrix set, these sub-matrices can be processed in parallel, thereby improving the overall data processing efficiency; the characteristics of the sparse matrix make a large number of elements zero or invalid, and directly processing the entire matrix will cause a waste of computing resources. By slicing and reducing the dimension, only the sub-matrix containing valid data is processed, which can significantly reduce resource consumption; by calculating the reduced dimension index value, the meteorological data in different sub-matrices can be associated to achieve data integration across time, longitude and latitude dimensions, providing the possibility for more complex analysis; meteorological data usually contains multiple dimensions such as time, longitude and latitude. By slicing these dimensions, multidimensional data analysis, such as time series analysis, spatial distribution analysis, etc., can be more conveniently supported; the determination of the sub-matrix set makes data processing more flexible, and a sub-matrix can be selectively processed according to specific needs without processing the entire data set; by accurately calculating the reduced dimension index value of the sub-matrix, the accuracy and consistency of the data can be ensured during the data processing process; by converting the original meteorological data into a meteorological array and a sparse matrix, and calculating the reduced dimension index value, the data storage method can be optimized and the efficiency of data retrieval can be improved. For meteorological data with a large number of zero or invalid values, storage space can be significantly saved by storing only the coordinates and values of non-zero elements, greatly reducing the storage requirements of data files; in large data set processing scenarios, sparse matrices can be used to compress data to adapt it to limited memory capacity. For NetCDF files, if the data set is too large to be loaded into memory at one time, compressed storage of sparse matrices can be used to load and process it in blocks, improving memory usage efficiency; in addition, the compressed storage method of sparse matrices reduces the size of the data, thereby reducing the cost of data transmission and storage. For NetCDF data, especially in network transmission and cloud storage scenarios, the use of sparse matrices can significantly reduce bandwidth and storage space consumption.
[0058] The embodiment of this specification also provides a meteorological data processing device based on a sparse matrix, Figure 2 A schematic diagram of a meteorological data processing device based on a sparse matrix provided in an embodiment of this specification, such as Figure 2 As shown, the device includes: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the above method. In one embodiment of the present specification, the processor and the memory are connected via a bus.
[0059] The embodiment of the present specification also provides a non-volatile computer storage medium, storing computer executable instructions, wherein the computer executable instructions are configured to: obtain a meteorological data processing requirement, and read the meteorological data to be processed corresponding to the meteorological data type in the original meteorological data set through the meteorological data processing requirement, wherein the meteorological data processing requirement includes the meteorological data type and the meteorological data processing dimension, and the meteorological data processing dimension includes the time dimension, the longitude dimension, and the latitude dimension; convert the meteorological data to be processed into a meteorological array to determine the sparse matrix to be processed corresponding to the meteorological data to be processed, and obtain the initial index value and meteorological data corresponding to the sparse matrix to be processed; slice the sparse matrix to be processed according to the meteorological data processing dimension, and determine a submatrix set corresponding to the meteorological data processing dimension, wherein the submatrix set includes multiple submatrices, and each of the submatrix corresponds to a dimension value or a dimension value range of the meteorological data processing dimension; calculate the index value after dimensionality reduction for each of the submatrices in the submatrix set, determine the dimensionality reduction index value in each of the submatrixes, and associate the meteorological data in the submatrix through the dimensionality reduction index value to perform data processing on the meteorological data.
[0060] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, equipment, and non-volatile computer storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0061] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0062] The above description is only one or more embodiments of this specification and is not intended to limit this specification. For those skilled in the art, one or more embodiments of this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of one or more embodiments of this specification shall be included in the scope of the claims of this specification.
Claims
1. A meteorological data processing method based on sparse matrix, characterized in that: The method comprises: Obtaining meteorological data processing requirements, so as to read the meteorological data to be processed corresponding to the meteorological data type in the original meteorological data set through the meteorological data processing requirements, wherein the meteorological data processing requirements include the meteorological data type and the meteorological data processing dimensions, and the meteorological data processing dimensions include the time dimension, the longitude dimension and the latitude dimension; Convert the to-be-processed meteorological data into a meteorological array to determine a to-be-processed sparse matrix corresponding to the to-be-processed meteorological data, and obtain an initial index value and meteorological data corresponding to the to-be-processed sparse matrix; According to the meteorological data processing dimension, the sparse matrix to be processed is sliced to determine a submatrix set corresponding to the meteorological data processing dimension, wherein the submatrix set includes a plurality of submatrices, and each submatrix corresponds to a dimension value of the meteorological data processing dimension; Calculating the index value after dimension reduction for each of the submatrices in the submatrix set, determining the dimension reduction index value in each of the submatrices, and associating the meteorological data in the submatrix through the dimension reduction index value to perform data processing on the meteorological data; Calculating the index value after dimension reduction for each submatrix in the submatrix set to determine the dimension reduction index value in each submatrix specifically includes: Determine the initial index value of the matrix data in each of the submatrices in the sparse matrix to be processed, so as to convert the initial index value into an initial matrix dimension array, wherein the initial matrix dimension array includes dimension values under multiple dimensions; Traversing the initial matrix dimension array, and adding other dimension values corresponding to other dimensions except the meteorological data processing dimension to the first array; Traversing the pre-constructed dimension length array, and adding dimension length information corresponding to other dimensions except the meteorological data processing dimension to the second array, wherein the dimension length information is used to represent the amount of data under each dimension; Traversing the second array, calculating the dimensional volume data of the previous dimension based on the dimensional length information in the second array, and storing the data in the third array; According to the first array and the third array, a dimension reduction index value in each of the sub-matrices is calculated.
2. A meteorological data processing method based on sparse matrix according to claim 1, characterized in that: Converting the to-be-processed meteorological data into a meteorological array to determine a to-be-processed sparse matrix corresponding to the to-be-processed meteorological data specifically includes: Acquire meteorological data and dimension data of multiple meteorological impact dimensions in the meteorological data to be processed, wherein the meteorological impact dimensions include longitude, latitude and time; Arrange the meteorological data according to the dimension data of the meteorological impact dimension to determine a multidimensional meteorological array corresponding to the meteorological data to be processed; Analyze the meteorological data in the multidimensional meteorological array, determine non-zero meteorological data, and obtain meteorological impact dimension data corresponding to the non-zero meteorological data; The sparse matrix to be processed corresponding to the meteorological data to be processed is determined by using the non-zero meteorological data and the meteorological impact dimension data corresponding to the non-zero meteorological data.
3. The meteorological data processing method based on sparse matrix according to claim 1, characterized in that: According to the meteorological data processing dimension, the sparse matrix to be processed is sliced to determine a submatrix set corresponding to the meteorological data processing dimension, specifically including: According to the meteorological data processing dimension, the sparse matrix to be processed is subjected to dimensionality reduction processing to obtain a dimensionality reduction matrix corresponding to each processing dimension data under the meteorological data processing dimension; The sub-matrix set corresponding to the meteorological data processing dimension is determined by using the dimensionality reduction matrix corresponding to each processing dimension data.
4. The meteorological data processing method based on sparse matrix according to claim 3 is characterized in that: According to the meteorological data processing dimension, the sparse matrix to be processed is subjected to dimensionality reduction processing to obtain a dimensionality reduction matrix corresponding to each processing dimension data under the meteorological data processing dimension, specifically including: According to the meteorological data processing dimension, the sparse matrix to be processed is grouped to obtain grouped data corresponding to each processing dimension data under the meteorological data processing dimension; Each of the grouped data is converted into a coordinate matrix after dimension reduction to determine the dimension reduction matrix corresponding to each of the grouped data.
5. The meteorological data processing method based on sparse matrix according to claim 1, characterized in that: Converting the initial index value into an initial matrix dimension array includes: Analyze the sparse matrix to be processed to determine the dimensional reference data volume under each dimension, wherein the dimensional reference data volume is used to represent the data change volume corresponding to each incremental unit dimensional volume; Determine the first dimension reference data amount corresponding to the first dimension, the second dimension reference data amount corresponding to the second dimension, and the third dimension reference data amount corresponding to the third dimension through the dimensional reference data amount under each dimension, wherein the first dimension is the highest dimension, and the number of dimensions of the first dimension, the second dimension, and the third dimension decreases in sequence; Determine a first quotient and a first remainder through a division operation according to the initial index value and the first dimensional reference data amount, and determine a first dimensional value under the highest dimension according to the first quotient; Based on the first remainder and the second dimensional reference data amount, determine a second quotient and a second remainder through a division operation, and determine a second dimensional value under the second dimension according to the second quotient; Determine a third quotient and a third remainder by a division operation according to the second remainder and the third dimensional reference data amount, and determine a third dimensional value under the third dimension according to the third quotient; The third dimension value, the second dimension value, and the first dimension value are sorted in order of the number of dimensions from low to high to obtain an initial matrix dimension array corresponding to the initial index value.
6. The meteorological data processing method based on sparse matrix according to claim 1, characterized in that: The meteorological data in the submatrix are associated by using the dimension reduction index value to perform data processing on the meteorological data, specifically including: Acquire data processing requirement information, wherein the data processing requirement information includes a dimensional analysis range corresponding to the meteorological data processing dimension; Based on the dimensional analysis range, screening is performed among the plurality of sub-matrices to determine at least one designated sub-matrix corresponding to the dimensional analysis range; Analyze each of the specified submatrices to determine a specified dimensionality reduction index value corresponding to each non-zero element in each of the specified submatrices; Based on the specified dimensionality reduction index value, query the meteorological data of the specified dimensionality reduction index value in each of the specified submatrices to determine a set of meteorological data to be analyzed; The meteorological data within the dimensional analysis range is processed using the meteorological data set to be analyzed.
7. The meteorological data processing method based on sparse matrix according to claim 1, characterized in that: According to the meteorological data processing requirements, the meteorological data to be processed corresponding to the meteorological data type is read from the original meteorological data set, specifically including: Acquire an original meteorological data set, wherein the original meteorological data set is a NetCDF data set, which is used to store various types of meteorological data under various meteorological impact dimensions, wherein the meteorological impact dimensions include longitude, latitude, and time; According to the type of meteorological data in the meteorological data processing requirement, meteorological data of a corresponding type is read from the original meteorological data set to determine the meteorological data to be processed.
8. A meteorological data processing device based on sparse matrix, characterized in that: The device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 7.
9. A non-volatile computer storage medium storing computer executable instructions, characterized in that: The computer executable instructions are configured to: Obtaining meteorological data processing requirements, so as to read the meteorological data to be processed corresponding to the meteorological data type in the original meteorological data set through the meteorological data processing requirements, wherein the meteorological data processing requirements include the meteorological data type and the meteorological data processing dimensions, and the meteorological data processing dimensions include the time dimension, the longitude dimension and the latitude dimension; Convert the to-be-processed meteorological data into a meteorological array to determine a to-be-processed sparse matrix corresponding to the to-be-processed meteorological data, and obtain an initial index value and meteorological data corresponding to the to-be-processed sparse matrix; According to the meteorological data processing dimension, the sparse matrix to be processed is sliced to determine a submatrix set corresponding to the meteorological data processing dimension, wherein the submatrix set includes a plurality of submatrices, each of which corresponds to a dimension value or a dimension value range of the meteorological data processing dimension; Calculating the index value after dimension reduction for each of the submatrices in the submatrix set, determining the dimension reduction index value in each of the submatrices, and associating the meteorological data in the submatrix through the dimension reduction index value to perform data processing on the meteorological data; Calculating the index value after dimension reduction for each submatrix in the submatrix set to determine the dimension reduction index value in each submatrix specifically includes: Determine the initial index value of the matrix data in each of the submatrices in the sparse matrix to be processed, so as to convert the initial index value into an initial matrix dimension array, wherein the initial matrix dimension array includes dimension values under multiple dimensions; Traversing the initial matrix dimension array, and adding other dimension values corresponding to other dimensions except the meteorological data processing dimension to the first array; Traversing the pre-constructed dimension length array, adding dimension length information corresponding to other dimensions except the meteorological data processing dimension to the second array, wherein the dimension length information is used to represent the amount of data under each dimension; Traversing the second array, calculating the dimensional volume data of the previous dimension based on the dimensional length information in the second array, and storing the data in the third array; According to the first array and the third array, a dimension reduction index value in each of the sub-matrices is calculated.
