CN116257553B - Wind energy resource grid data query method and device, electronic equipment and storage medium - Google Patents

Wind energy resource grid data query method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN116257553B
CN116257553B CN202310547025.2A CN202310547025A CN116257553B CN 116257553 B CN116257553 B CN 116257553B CN 202310547025 A CN202310547025 A CN 202310547025A CN 116257553 B CN116257553 B CN 116257553B
Authority
CN
China
Prior art keywords
query
data
wind energy
energy resource
resource grid
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202310547025.2A
Other languages
Chinese (zh)
Other versions
CN116257553A (en
Inventor
文仁强
王浩
张子良
易侃
杜梦蛟
张皓
贾天下
陈圣哲
薛兆邦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Gezhouba Electric Power Rest House
China Three Gorges Corp
Original Assignee
Beijing Gezhouba Electric Power Rest House
China Three Gorges Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Gezhouba Electric Power Rest House, China Three Gorges Corp filed Critical Beijing Gezhouba Electric Power Rest House
Priority to CN202310547025.2A priority Critical patent/CN116257553B/en
Publication of CN116257553A publication Critical patent/CN116257553A/en
Application granted granted Critical
Publication of CN116257553B publication Critical patent/CN116257553B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24532Query optimisation of parallel queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases

Abstract

The application provides a wind energy resource grid data query method, a device, electronic equipment and a storage medium, wherein the method comprises the following steps: generating a first preset number of data files according to the first preset number of wind energy parameters and the wind energy resource grid data; constructing a wind energy resource grid database according to a first preset number of data files; acquiring a wind energy resource grid data query request; and obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request. According to the method and the device, the problems that in the related technology, wind energy resource grid data are difficult to retrieve under the conditions of multiple users and high concurrency, the retrieval time is long, and the retrieval efficiency is low are solved.

Description

Wind energy resource grid data query method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of wind power generation technologies, and in particular, to a wind energy resource grid data query method, a wind energy resource grid data query device, an electronic device, and a storage medium.
Background
The wind energy is converted into electric energy by the fan to realize profit, and wind has obvious space-time change characteristics, so wind energy resource assessment is a problem which must be considered in each stage of wind farm construction. Currently, wind energy resource grid data is generally obtained through calculation in a mesoscale meteorological mode, the content of the wind energy resource grid data generally comprises high-resolution grids (such as 1km×1km nationwide), each grid corresponds to a plurality of height layers (10-200 meters, one height layer for 10 meters), different wind directions (16 wind directions), different wind speed sections (0-26 meters/second, generally divided at intervals of 0.5m/s or 1 m/s), average wind speeds, wind power densities, wind direction frequencies, wind energy direction frequencies, weibull parameters (shape parameters A, scale parameters K), wind speed frequencies, wind energy frequencies and the like, the total amount of the grids is approximately 500 hundred million, the capacity size is approximately 1TB, and file storage is generally carried out in a NetCDF or Grib2 format and the like.
The wind energy resource grid data can clearly reflect the space-time distribution characteristics and the space-time change characteristics of the wind energy resources in China at different heights, and a user can search the area suitable for building the wind power plant by inquiring and accessing the wind energy resource grid data. Because the wind energy resource grid data has the characteristics of high space-time resolution, complex data structure and large capacity, certain difficulty is brought to the efficient query of the wind energy resource grid data, and the method is specifically expressed as follows: the high-resolution wind energy resource grid data is multidimensional data, has multiple variables, thin grids and large data capacity, builds back-end service in a python library file reading mode, provides query and search service, has the problem of large occupied content, and is easy to block, long in consumed time, low in concurrent query efficiency and the like due to the limitation of disk IO when multiple users access. In addition, wind energy resource grid data are converted into GIS grid data for static layer storage, and because wind energy resource original data are multidimensional and multivariable data, the number of static layer is very large, and space retrieval statistical efficiency is low.
Therefore, the prior art has the problems that the wind energy resource grid data is difficult to retrieve under the condition of multiple users and high concurrency, the retrieval time is long, and the retrieval efficiency is low.
Disclosure of Invention
The application provides a wind energy resource grid data query method, a device, electronic equipment and a storage medium, which at least solve the problems that in the related technology, the wind energy resource grid data is difficult to retrieve under the condition of multiple users and high concurrency, the retrieval time is long and the retrieval efficiency is low.
According to an aspect of an embodiment of the present application, there is provided a wind energy resource grid data query method, the method including:
generating a first preset number of data files according to the first preset number of wind energy parameters and the wind energy resource grid data;
constructing a wind energy resource grid database according to a first preset number of data files;
acquiring a wind energy resource grid data query request;
and obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request.
According to another aspect of embodiments of the present application, there is also provided a wind energy resource grid data querying device, the device comprising:
the generation module is used for generating a first preset number of data files according to the first preset number of wind energy parameters and the wind energy resource grid data;
the construction module is used for constructing a wind energy resource grid database according to a first preset number of data files;
The acquisition module is used for acquiring a wind energy resource grid data query request;
the obtaining module is used for obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request.
Optionally, the generating module includes:
the first reading unit is used for sequentially reading the wind energy resource grid data according to the names of a first preset number of wind energy parameters to obtain variable values corresponding to the wind energy parameters;
the first obtaining unit is used for performing dimension reduction operation on the variable values to obtain an array with the dimension being a preset value;
the setting unit is used for carrying out parameter setting on the first intermediate data file according to preset information to obtain a second intermediate data file, wherein the format of the first intermediate data file is the same as that of the data file;
the second reading unit is used for reading the first data in the array according to a preset sequence;
the second obtaining unit is used for carrying out serialization processing on the first data and writing the first data into corresponding wave bands in the second intermediate data file to obtain a first preset number of data files, wherein the wave bands are used for inquiring the first data.
Optionally, the building module includes:
a first creation unit configured to create a first database;
a third obtaining unit, configured to configure a spatial database expander for the first database to obtain a second database;
a fourth obtaining unit, configured to configure a grid driver for the second database, to obtain a third database;
the second creating unit is used for creating a database instance according to the third database;
and a fifth obtaining unit, configured to import second data in the data file into the database instance based on a preset spatial data engine and a preset method, create a spatial index corresponding to the second data, and grid-slice the second data to obtain the wind energy resource grid database, where the spatial index is used to query the second data.
Optionally, the acquiring module includes:
the acquisition unit is used for acquiring geographic coordinates of the query position, the query type and the query requirement of the user;
and a sixth obtaining unit, configured to package the query location geographic coordinate, the query type and the query requirement, to obtain the wind energy resource grid data query request.
Optionally, the obtaining module includes:
A seventh obtaining unit, configured to obtain the query type according to the wind energy resource grid data query request;
the generating unit is used for generating a query statement according to the query type, a first preset function and the wind energy resource grid data query request, wherein the first preset function is used for generating the query statement;
and the query unit is used for obtaining the query result from the wind energy resource grid database according to the query type corresponding to the query statement and returning the query result to the user.
Optionally, the query type includes a point query, and the query unit includes:
the first obtaining submodule is used for obtaining the inquiry position geographic coordinates and the inquiry requirements according to the inquiry statement, wherein the inquiry position geographic coordinates comprise inquiry longitude and inquiry latitude, and the inquiry requirements are used for determining inquiry wind energy parameters;
the creation sub-module is used for creating a point object according to the query longitude, the query latitude and a second preset function;
a second obtaining submodule, configured to obtain a target point object according to the point object, a preset map projection code, and a preset projection function, where the target point object is the same as a spatial reference of the data set corresponding to the query wind energy parameter in the wind energy resource grid database, and the target point object is used to determine a query position;
The first determining submodule is used for determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
the first generation submodule is used for generating a wave band array according to a third preset function, the wave band starting sequence number and the wave band ending sequence number, wherein the wave band array comprises a second preset number of wave band sequence numbers;
the first acquisition submodule is used for acquiring the storage field of the query wind energy parameter from the wind energy resource grid database;
a third obtaining submodule, configured to obtain a grid intersecting the query position according to the spatial index, the storage field, the target point object, and a fourth preset function;
the reading submodule is used for reading grid values of the grid grids corresponding to different band sequence numbers from the wind energy resource grid database according to the storage field, the band array, the target point object and a fifth preset function;
and fourth, obtaining a sub-module, configured to obtain the query result that meets the query requirement according to the grid value.
Optionally, the query type includes a polygonal query, and the query unit further includes:
A fifth obtaining sub-module, configured to obtain, according to the query statement, the query location geographic coordinate and the query requirement, where the query location geographic coordinate includes a polygon boundary coordinate set, and the query requirement is used to determine a query wind energy parameter;
a sixth obtaining submodule, configured to obtain a polygon object according to the polygon boundary coordinate set and a sixth preset function;
a seventh obtaining submodule, configured to obtain a target point object according to the polygon object, a preset map projection code, and a preset projection function, where the target point object is the same as a spatial reference of the data set corresponding to the query wind energy parameter in the wind energy resource grid database;
the second acquisition submodule is used for acquiring the storage field of the query wind energy parameter from the wind energy resource grid database;
eighth obtaining sub-module, configured to query third data corresponding to the queried wind energy parameter in the wind energy resource grid database according to the storage field, the target point object, a preset query condition and a seventh preset function, and crop the third data to obtain a data union of the data after clipping and grid slice data;
A ninth obtaining submodule, configured to combine the data union according to an eighth preset function, and remove repeated data in the data union to obtain a raster data set;
the second determining submodule is used for determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
the second generating submodule is used for generating a wave band array according to a third preset function, the wave band starting sequence number and the wave band ending sequence number, wherein the wave band array comprises a third preset number of wave band sequence numbers;
a tenth obtaining submodule, configured to obtain a raster data set corresponding to different band sequence numbers according to the raster data set, the storage field, the band array, and a ninth preset function;
an eleventh obtaining submodule, configured to obtain a numerical value corresponding to the query wind energy parameter in the polygonal area and the number of occurrences of the numerical value according to the second raster data set, a preset query function, and a preset summation function;
and a twelfth obtaining sub-module, configured to obtain the query result that meets the query requirement according to the numerical value and the corresponding number of times.
According to yet another aspect of the embodiments of the present application, there is also provided an electronic device including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein the memory is used for storing a computer program; a processor for performing the method steps of any of the embodiments described above by running the computer program stored on the memory.
According to a further aspect of the embodiments of the present application, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the method steps of any of the embodiments described above when run.
In the embodiment of the application, a first preset number of data files are generated according to a first preset number of wind energy parameters and wind energy resource grid data; constructing a wind energy resource grid database according to a first preset number of data files; acquiring a wind energy resource grid data query request; and obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request. According to the method, wind energy parameters are utilized to convert wind energy resource grid data into a plurality of data files; constructing a wind energy resource grid database according to the newly generated data file; and obtaining a query result in the wind energy resource grid database according to the wind energy resource grid data query request. The wind energy resource grid data is stored into the wind energy resource grid database, and the function of inquiring in the wind energy resource grid database is provided, so that occupied content is reduced, and the method and the device have no disk limitation, so that the search can be performed under the conditions of multiple users and high concurrency, the search time is shortened, and the search efficiency is improved. The method solves the problems that in the related art, the grid data of the wind energy resources are difficult to retrieve under the condition of multiple users and high concurrency, the retrieval time is long, and the retrieval efficiency is low.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of an alternative wind energy resource grid data query method according to an embodiment of the present application;
FIG. 2 is a flow chart of an alternative wind energy resource high resolution grid data efficient query method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a query statement and query results of an alternative point query in accordance with an embodiment of the present application;
FIG. 4 is a schematic diagram of a query statement and query results of an alternative polygonal query in accordance with an embodiment of the present application;
FIG. 5 is a block diagram of an alternative wind energy resource grid data querying device in accordance with an embodiment of the present application;
Fig. 6 is a block diagram of an alternative electronic device according to an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will be made in detail and with reference to the accompanying drawings in the embodiments of the present application, it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the terms "first," "second," and the like in the description and claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
According to an aspect of the embodiments of the present application, there is provided a wind energy resource grid data query method, as shown in fig. 1, the flow of which may include the steps of:
step S101, generating a first preset number of data files according to a first preset number of wind energy parameters and wind energy resource grid data.
Optionally, the present application is based on Browser/Server architecture (B/S), and implements all functions in combination with a data processing module and a data access module. The data processing module is used for extracting elements from the wind energy resource grid data, converting the format of the wind energy resource grid data and finally importing the wind energy resource grid data into the wind energy resource grid database for storage. The data access module is responsible for receiving a wind energy resource query request from the browser end, returning a query result after being processed by the server end, and displaying the query result on the browser end.
The wind energy parameters include: average wind speed, wind power density, wind direction frequency, wind energy direction frequency, weibull parameters (shape parameter A, scale parameter K), wind speed frequency, wind energy frequency, month-time cross statistics and other main wind energy parameters.
Extracting elements from wind energy resource grid data in the existing wind energy resource grid data files (in the formats of NetCDF, grib2 and the like) according to the wind energy parameters, generating a data file corresponding to each wind energy parameter according to the extracted elements, and realizing format conversion, wherein the format of the data file can be GeoTiff.
Step S102, a wind energy resource grid database is constructed according to the first preset number of data files.
Optionally, importing the data in each GeoTiff data file into a database supporting storage of geographic elements, space inquiry and grid data, and completing construction of the wind energy resource grid database.
Step S103, acquiring a wind energy resource grid data query request.
Optionally, the data access module obtains a wind energy resource grid data query request input by a user at a browser end, including: and (5) building information such as the geographic position, the query type, the query element, the query requirement and the like of the wind farm. And sending the wind energy resource grid data query request to a server side.
Step S104, according to the wind energy resource grid database and the wind energy resource grid data query request, a query result is obtained and returned.
Optionally, after receiving the wind energy resource grid data query request, the server generates a query statement, obtains a query result according to the query type specified by the user, returns the query result, and performs visual display after receiving the query result.
In the embodiment of the application, a first preset number of data files are generated according to a first preset number of wind energy parameters and wind energy resource grid data; constructing a wind energy resource grid database according to a first preset number of data files; acquiring a wind energy resource grid data query request; and obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request. According to the method, wind energy parameters are utilized to convert wind energy resource grid data into a plurality of data files; constructing a wind energy resource grid database according to the newly generated data file; and obtaining a query result in the wind energy resource grid database according to the wind energy resource grid data query request. The wind energy resource grid data is stored into the wind energy resource grid database, and the function of space inquiry in the wind energy resource grid database is provided, so that occupied content is reduced, and the method and the device have no disk limitation, so that the search can be performed under the conditions of multiple users and high concurrency, the search time is shortened, and the search efficiency is improved. The method solves the problems that in the related art, the grid data of the wind energy resources are difficult to retrieve under the condition of multiple users and high concurrency, the retrieval time is long, and the retrieval efficiency is low.
As an alternative embodiment, generating a first preset number of data files from a first preset number of wind energy parameters and wind energy resource grid data, comprises:
sequentially reading wind energy resource grid data according to the names of the first preset number of wind energy parameters to obtain variable values corresponding to the wind energy parameters;
performing dimension reduction operation on the variable values to obtain an array with the dimension being a preset value;
parameter setting is carried out on the first intermediate data file according to preset information to obtain a second intermediate data file, wherein the first intermediate data file has the same format as the data file;
reading first data in the array according to a preset sequence;
and carrying out serialization processing on the first data, and writing the first data into corresponding wave bands in the second intermediate data file to obtain a first preset number of data files, wherein the wave bands are used for inquiring the first data.
Optionally, the wind energy parameters include: average wind speed, wind power density, wind direction frequency, wind energy direction frequency, weibull parameters (shape parameter A, scale parameter K), wind speed frequency, wind energy frequency, month-time cross statistics and other main wind energy parameters.
And opening the existing wind energy resource grid data files (in the formats of NetCDF, grib2 and the like), sequentially taking the wind energy parameters as variables, and reading the wind energy resource grid data according to the names of the variables to obtain variable values corresponding to the wind energy parameters, wherein the variable values are high-dimensional groups (for example, latitude grid number multiplied by longitude grid number multiplied by year multiplied by month multiplied by day multiplied by time multiplied by altitude layer multiplied by wind direction multiplied by wind speed section).
The variable value is subjected to dimension reduction operation, the variable value is uniformly transformed into a three-dimensional array (for example, the number of latitudinal grids is multiplied by the number of longitudinal grids is multiplied by N), and the preset value is three at the moment, wherein N represents the dimension after the other dimensions except the number of latitudinal grids and the number of longitudinal grids are uniformly arranged (for example, N=year×month×day×time×altitude layer×wind direction×wind speed section).
Creating a blank data file (i.e., a first intermediate data file) with the format of GeoTiff, and performing parameter setting on the first intermediate data file with the format of GeoTiff according to wind energy resource grid data basic information (i.e., preset information such as spatial resolution, etc.), including but not limited to: the number of longitude-direction grids, the number of latitude-direction grids, the number of wave bands, metadata items, the origin coordinates of the upper left corner, horizontal resolution, vertical resolution, horizontal-direction rotation parameters, vertical-direction rotation parameters, space references and the like, and after parameter setting is completed, a second intermediate data file is obtained.
The method comprises the following specific steps of: taking 0 to (N-1) as serial numbers, respectively taking out the values in the three-dimensional data (namely, the first data, and the values are two-dimensional arrays). And carrying out serialization processing on the first data one by one, and writing the first data into a corresponding sequence number Band (Band) in the second intermediate data file to obtain and store a GeoTiff data file corresponding to each wind energy parameter.
The above is shown in fig. 2: reading wind energy resource grid data (NetCFD format), and extracting and generating GeoTiff element by element based on the resolution of 1km×1km (5040×5040≡2500 ten thousand grids) nationwide, wherein 20 high-level layers×16 wind directions×26 wind speed sections×12 months×24 time×8 wind condition parameters are approximately 1900 ten thousand variables (corresponding to the dimension reduction operation); each variable is converted to 1 Band (Band) of GeoTiff, where the newly generated GeoTiff file contains about 475 billion data grids of wind energy resource grid data.
In the embodiment of the application, wind energy parameters are used as variables to read wind energy resource grid data, so that a GeoTiff data file corresponding to each wind energy parameter is generated, and a foundation is provided for constructing a wind energy resource grid database through the GeoTiff data files in the follow-up process.
As an alternative embodiment, constructing a wind energy resource grid database according to a first preset number of data files includes:
creating a first database;
a space database expander is configured for the first database to obtain a second database;
configuring a grid driver for the second database to obtain a third database;
creating a database instance according to the third database;
based on a preset space data engine and a preset method, importing second data in a data file into a database instance, creating a space index corresponding to the second data, and performing grid slicing on the second data to obtain a wind energy resource grid database, wherein the space index is used for inquiring the second data.
Optionally, a PostgreSQL database (i.e., the first database) is created. A spatial database extender (e.g., postGIS) is configured for the first database to enable that the first database supports storage of geographic elements and corresponding SQL spatial queries to obtain the second database.
And configuring a grid driver (postgis_ras) for the second database, and realizing the support of the second database to the grid data to obtain a third database. A database instance nc2tiff for storing wind energy resource grid data is created in the third database.
The PostGIS spatial data engine (i.e. the preset spatial data engine) is utilized to import the data in the GeoTiff data file (i.e. the second data) into the database instance nc2tiff through the master 2pgsql command, and the spatial index is created and grid slicing is performed at the same time of importing, and the slice size can be automatically calculated according to the data resolution, or specific values, such as 16×16, can be specified. And successfully constructing a wind energy resource grid database.
The above is shown in fig. 2: and importing the wind energy resource grid data contained in the GeoTiff file into a space database through a Raster2pgsql command by using a PostGIS space data engine. Grid slicing is performed on the wind energy resource grid data. Finally, a PostgreSQL database is generated.
In the embodiment of the application, the GeoTiff file is utilized to construct the wind energy resource grid database, so that the adaptability of accessing the wind energy resource grid data under the conditions of multiple users and high concurrency is obviously improved. The wind energy resource grid data are stored in the wind energy resource grid database in a gridding manner, and a space inquiry statistical function is provided, so that the data inquiry efficiency is greatly improved, and the second-level response of the hundred million-level grid inquiry can be realized.
As an alternative embodiment, obtaining a wind energy resource grid data query request includes:
acquiring geographic coordinates of a query position, a query type and a query requirement of a user;
and packaging the geographical coordinates of the query position, the query type and the query requirement to obtain the wind energy resource grid data query request.
Optionally, the user completes the setting of the geographic position of the wind farm to be built by interacting with the GIS map at the browser end, and selects the query types (including point query and polygon query) and inputs the query requirements. And then, the data access module extracts the geographic coordinates of the position to be queried, the query type selected by the user and the query requirement of the user. And then, the data access module encapsulates information such as geographic coordinates to be queried, query types, query elements, query requirements and the like in json format, generates a wind energy resource grid data query request, and sends the wind energy resource grid data query request to the server side.
The above is shown in fig. 2: the user starts at the Browser end (Browser); setting the position of the wind farm; inquiring wind resource data, wherein the inquiring mode comprises the following steps: a point query service and a polygon query service.
In the embodiment of the application, the geographic coordinates can be extracted by the interaction of the user and the GIS map, so that the user can use the geographic coordinates conveniently. Two query types, namely point query and polygon query, are set, so that functions of the method and the device are enriched, and query efficiency is further improved.
As an alternative embodiment, according to the wind energy resource grid database and the wind energy resource grid data query request, obtaining and returning the query result includes:
obtaining a query type according to the wind energy resource grid data query request;
generating a query statement according to the query type, a first preset function and a wind energy resource grid data query request, wherein the first preset function is used for generating the query statement;
and obtaining a query result from the wind energy resource grid database according to the query type corresponding to the query statement according to the query statement, and returning the query result to the user.
Optionally, after receiving the wind energy resource grid data query request, the server calls the postGIS Function (i.e. the first preset Function) according to the query type (including point query and polygon query) to assemble an sql statement (i.e. a query statement). According to the sql statement, completing point query or polygon query of wind energy resource grid data in a database, returning a query result to a browser end, and displaying the query result to a user by the browser end.
The above is shown in fig. 2: and calling the PostGIS Function to generate a query statement of the point query service or the polygon query service, obtaining a query result in the database, returning the query result to the browser, and displaying wind resource data after the browser receives the query result returned by the server. And (5) ending.
In the embodiment of the application, a query statement is generated according to a wind energy resource grid data query request through a first preset function. And finishing point query or polygon query according to the query statement, obtaining a query result and displaying the query result to a user. The method meets the requirement of users on efficient query and access of wind energy resource grid data, and is convenient for interactive analysis of the users.
As an alternative embodiment, the query types include point query, and according to the query statement, obtaining a query result from the wind energy resource grid database according to the query type corresponding to the query statement, including:
obtaining a query location geographic coordinate and a query requirement according to the query statement, wherein the query location geographic coordinate comprises a query longitude and a query latitude, and the query requirement is used for determining a query wind energy parameter;
creating a point object according to the query longitude, the query latitude and the second preset function;
Obtaining a target point object according to the target point object, a preset map projection code and a preset projection function, wherein the target point object is the same as the space reference of a data set corresponding to the query wind energy parameter in the wind energy resource grid database, and the target point object is used for determining the query position;
determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
generating a wave band array according to a third preset function, a wave band starting sequence number and a wave band ending sequence number, wherein the wave band array comprises a second preset number of wave band sequence numbers;
acquiring a storage field for inquiring wind energy parameters from a wind energy resource grid database;
obtaining grid grids intersecting with the query position according to the spatial index, the storage field, the target point object and the fourth preset function;
according to the storage field, the wave band array, the target point object and the fifth preset function, grid values of grid grids corresponding to different wave band serial numbers are read from the wind energy resource grid database;
and obtaining a query result meeting the query requirement according to the grid value.
Optionally, the query types include point queries.
Taking the example of querying the wind power densities (i.e. querying the wind energy parameters) of layers (9) with different heights from 70 meters to 150 meters at the position with the longitude being lat and the latitude being lon, the steps of the embodiment will be described in detail:
According to the sql statement (i.e. query statement), obtaining a query location geographic coordinate and a query requirement, wherein the query location geographic coordinate comprises: longitude lon and latitude lat, the query requirement is: the wind power densities of the layers (9 total) with different heights from 70 meters to 150 meters are inquired. The ST_MakePoint function (namely a second preset function) is called to create a point object pt by taking the longitude lon and the latitude lat as input parameters. And taking the point object pt and the map projection code (i.e. the preset map projection code) as input parameters, calling the ST_SetSRID function (i.e. the preset projection function), and carrying out map projection on the point object pt and the map projection code to obtain the point object geometry (i.e. the target point object) with the same spatial reference as the wind power density data set.
And determining the band starting sequence number and the band ending sequence number according to the query statement and the query requirement. And calling a generator_series function (namely a third preset function) by taking a wave band starting sequence number and a wave band ending sequence number as input parameters to create a wave band array, wherein the wave band sequence number is consistent with the wave band sequence number of the wind power density data set, the wave band array comprises a plurality of different wave band sequence numbers, and the second preset number is a plurality of wave band sequence numbers.
The wind power density data is stored in a rast field (namely a storage field) of the wind energy resource grid database by default, and an ST_Intercts function (namely a fourth preset function) is called to retrieve and obtain a grid A intersecting with the query position by using the previously established spatial index and taking the storage field rast and the target point object geometry as input parameters 1
Taking a storage field rast, a wave Duan Shuzu and a target point object as input parameters, calling an ST_value function (namely a fifth preset function) to read grid A 1 Grid values of different band sequence numbers are grid values, namely, different-height layer wind power density data (namely, query results meeting query requirements) at query positions.
The above is shown in fig. 2: and calling the PostGIS Function to generate an sql query statement corresponding to the point query service, and querying in a database by combining the ST_value Function, the ST_Intercts Function and the multiband to obtain a query result.
Taking the position with the query longitude of 114.97 and the latitude of 22.35 as an example, the wind power densities of layers (9 total) with different heights from 70 meters to 150 meters, the sql query statement and the query result are shown in fig. 3:
query statement Query:
select b,ST_value(rast,b,foo.pt_geom) as pop
……
Where ST_Intersects(rast,foo.pt_geom);
the query result is: the wind power densities of the layers (9 layers) with different heights from 70 meters to 150 meters are as follows: 331.5799865722656, …,380.54998779296875. The inquiry time was 0.107 seconds. The user can view the historical Query statement at a Query History interface. Details are shown in fig. 3, and will not be described here again.
In the embodiment of the application, a space query statistical function based on point query is designed, and the wind energy parameters of different heights at a specific position are queried by a user. The user searching requirement is met, and the searching efficiency of the user is greatly improved.
As an alternative embodiment, the query types include polygonal query, and according to the query statement, obtaining a query result from the wind energy resource grid database according to the query type corresponding to the query statement, including:
obtaining geographic coordinates of a query position and query requirements according to the query statement, wherein the geographic coordinates of the query position comprise a polygon boundary coordinate set, and the query requirements are used for determining query wind energy parameters;
obtaining a polygon object according to the polygon boundary coordinate set and a sixth preset function;
obtaining a target point object according to the polygon object, a preset map projection code and a preset projection function, wherein the target point object is the same as the spatial reference of the data set corresponding to the query wind energy parameter in the wind energy resource grid database;
acquiring a storage field for inquiring wind energy parameters from a wind energy resource grid database;
inquiring third data corresponding to the wind energy parameters in the wind energy resource grid database according to the storage field, the target point object, the preset inquiring condition and the seventh preset function, and cutting the third data to obtain a data union of cut data and grid slice data;
merging the data union sets according to an eighth preset function, and removing repeated data in the data union sets to obtain a raster data set;
Determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
generating a wave band array according to a third preset function, a wave band starting sequence number and a wave band ending sequence number, wherein the wave band array comprises a third preset number of wave band sequence numbers;
obtaining raster data sets corresponding to different band sequence numbers according to the raster data sets, the storage fields, the band array and a ninth preset function;
obtaining a numerical value corresponding to the query wind energy parameter in the polygonal area and the number of times of occurrence of the numerical value according to the second raster data set, the preset query function and the preset summation function;
and obtaining the query result meeting the query requirement according to the numerical value and the corresponding times.
Optionally, the query types include polygonal queries.
Taking the example of inquiring about the wind power density (namely, inquiring about the wind energy parameters) of layers (9) with different heights from 70 meters to 150 meters in a polygonal area surrounded by a coordinate string formed by a plurality of longitude and latitude coordinate pairs, the steps of the embodiment are described in detail:
according to the sql statement (i.e. query statement), obtaining query position geographic coordinates and query requirements, wherein the query position geographic coordinates comprise polygon boundary coordinate strings (i.e. polygon boundary coordinate sets), and the query requirements are wind power densities of different height layers (9 total) from 70 meters to 150 meters in a query polygon area. And taking the POLYGON boundary coordinate string as an input parameter, and calling an ST_GeomFromText ('POLYGON (POLYGON boundary coordinate string)') function (namely a sixth preset function) to obtain the POLYGON object POLYGON. And taking polygon object polygon and map projection code (i.e. preset map projection code) as input parameters, calling ST_SetSRID function (i.e. preset projection function), and carrying out map projection on the polygon object polygon and map projection code to obtain a point object geometry (i.e. target object point) which is the same as the spatial reference of the wind power density data set.
The wind power density data are stored in a rast field (i.e. a storage field) of the wind energy resource grid database by default, the storage field rast and the target object point geometry are used as input parameters, an ST_Clip function (i.e. a seventh preset function) is called to cut the wind power density data (i.e. third data), a query condition is set as space intersection (i.e. preset query condition) based on the ST_Intercts function, and since the wind power density data are sliced during warehouse entry in the previous step, the ST_Clip function returns a data union U with a polygonal cutting result for different slice data.
Calling the ST_Union function (namely an eighth preset function) to merge and de-duplicate the data Union U, and obtaining a first raster data set A 2
And determining the band starting sequence number and the band ending sequence number according to the query statement and the query requirement. And calling a generator_series function (namely a third preset function) by taking a wave band starting sequence number and a wave band ending sequence number as input parameters to create a wave band array, wherein the wave band sequence number is consistent with the wave band sequence number of the wind power density data set, the wave band array comprises a plurality of different wave band sequence numbers, and the third preset number is a plurality of.
In a first raster data set A 2 The storage field rast and the band array areAnd inputting parameters, and calling an ST_ValueCount function (namely a ninth preset function) to obtain a second raster data set B of different wavebands. And calling an sql select function (i.e. a preset query function) to query each grid unit value in the second grid data set B, and calling a SUM function (i.e. a preset summation function) to count the number of the same grid unit values, thereby finally obtaining the wind power density value (i.e. the value corresponding to the query wind energy parameter) in the polygonal region and the occurrence times of the wind power density value. The wind power density value in the polygon area and the occurrence frequency thereof are query results meeting the query requirement.
The above is shown in fig. 2: and calling the PostGIS Function to generate an sql query statement corresponding to the polygonal query service, and querying in a database by combining the ST_ValueCount Function, the ST_Union Function, the ST_clip Function, the ST_Intersts Function and multiple bands to obtain a query result.
Taking the example of inquiring about the wind power density of layers (9 total) with different heights from 70 meters to 150 meters in a rectangular area surrounded by four points (115.6736, 24.8848), (115.6736, 24.9297), (115.7273, 24.9297), (115.7273, 24.8848), the inquiring time is 0.109 seconds, and the sql inquiring statement and the inquiring result are shown in fig. 4:
Query statement Query:
SELECT (pvc).value,SUM((pvc).count) As total
……
ORDER BY (pvc).value;
the query result is: the wind power density values in the polygonal area and the number of occurrences thereof are: 154.8000030517578 occurs 1 time, 157.74000549316406 occurs 1 time, …,170.9499969482422 occurs 1 time. The inquiry time was 0.109 seconds. The user can view the historical Query statement at a Query History interface. Details are shown in fig. 4, and will not be described here again.
In the embodiment of the application, a space query statistical function based on polygon query is designed, and the requirement of users for querying wind energy parameters of different heights in a specific polygon area is met. The user searching requirement is met, and the searching efficiency of the user is greatly improved.
According to another aspect of the embodiments of the present application, there is also provided a wind energy resource grid data query device for implementing the above wind energy resource grid data query method. FIG. 5 is a block diagram of an alternative wind energy resource grid data querying device in accordance with an embodiment of the present application, as shown in FIG. 5, which may include:
a generating module 501, configured to generate a first preset number of data files according to a first preset number of wind energy parameters and wind energy resource grid data;
A construction module 502, configured to construct a wind energy resource grid database according to a first preset number of data files;
an obtaining module 503, configured to obtain a wind energy resource grid data query request;
the obtaining module 504 is configured to obtain and return a query result according to the wind energy resource grid database and the wind energy resource grid data query request.
It should be noted that, the generating module 501 in this embodiment may be configured to perform the above-mentioned step S101, the constructing module 502 in this embodiment may be configured to perform the above-mentioned step S102, the obtaining module 503 in this embodiment may be configured to perform the above-mentioned step S103, and the obtaining module 504 in this embodiment may be configured to perform the above-mentioned step S104.
Through the modules, wind energy resource grid data are converted into a plurality of data files by utilizing wind energy parameters; constructing a wind energy resource grid database according to the newly generated data file; and obtaining a query result in the wind energy resource grid database according to the wind energy resource grid data query request. The wind energy resource grid data is stored into the wind energy resource grid database, and the function of inquiring in the wind energy resource grid database is provided, so that occupied content is reduced, and the method and the device have no disk limitation, so that the search can be performed under the conditions of multiple users and high concurrency, the search time is shortened, and the search efficiency is improved. The method solves the problems that in the related art, the grid data of the wind energy resources are difficult to retrieve under the condition of multiple users and high concurrency, the retrieval time is long, and the retrieval efficiency is low.
As an alternative embodiment, the generating module includes:
the first reading unit is used for sequentially reading the wind energy resource grid data according to the names of the first preset number of wind energy parameters to obtain variable values corresponding to the wind energy parameters;
the first obtaining unit is used for performing dimension reduction operation on the variable values to obtain an array with the dimension being a preset value;
the setting unit is used for carrying out parameter setting on the first intermediate data file according to preset information to obtain a second intermediate data file, wherein the first intermediate data file has the same format as the data file;
the second reading unit is used for reading the first data in the array according to a preset sequence;
the second obtaining unit is used for carrying out serialization processing on the first data and writing the first data into corresponding wave bands in the second intermediate data file to obtain a first preset number of data files, wherein the wave bands are used for inquiring the first data.
As an alternative embodiment, the building block comprises:
a first creation unit configured to create a first database;
a third obtaining unit, configured to configure a spatial database expander for the first database to obtain a second database;
a fourth obtaining unit, configured to configure a grid driver for the second database, to obtain a third database;
The second creation unit is used for creating a database instance according to the third database;
and a fifth obtaining unit, configured to import second data in the data file into the database instance based on the preset spatial data engine and the preset method, create a spatial index corresponding to the second data, and grid-slice the second data to obtain the wind energy resource grid database, where the spatial index is used to query the second data.
As an alternative embodiment, the obtaining module includes:
the acquisition unit is used for acquiring geographic coordinates of the query position, the query type and the query requirement of the user;
and a sixth obtaining unit, configured to encapsulate the query location geographic coordinate, the query type and the query requirement, to obtain a wind energy resource grid data query request.
As an alternative embodiment, the obtaining module comprises:
a seventh obtaining unit, configured to obtain a query type according to the wind energy resource grid data query request;
the generating unit is used for generating a query statement according to the query type, a first preset function and a wind energy resource grid data query request, wherein the first preset function is used for generating the query statement;
and the query unit is used for obtaining a query result from the wind energy resource grid database according to the query type corresponding to the query statement and returning the query result to the user.
As an alternative embodiment, the query type comprises a point query, and the query unit comprises:
the first obtaining submodule is used for obtaining inquiry position geographic coordinates and inquiry requirements according to inquiry sentences, wherein the inquiry position geographic coordinates comprise inquiry longitude and inquiry latitude, and the inquiry requirements are used for determining inquiry wind energy parameters;
the creation sub-module is used for creating a point object according to the query longitude, the query latitude and the second preset function;
the second obtaining submodule is used for obtaining a target point object according to the target point object, the preset map projection code and the preset projection function, wherein the target point object is the same as the space reference of the data set corresponding to the query wind energy parameter in the wind energy resource grid database, and the target point object is used for determining the query position;
the first determining submodule is used for determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
the first generation submodule is used for generating a wave band array according to a third preset function, a wave band starting sequence number and a wave band ending sequence number, wherein the wave band array comprises a second preset number of wave band sequence numbers;
the first acquisition submodule is used for acquiring and inquiring storage fields of wind energy parameters from the wind energy resource grid database;
A third obtaining submodule, configured to obtain a grid intersecting with the query position according to the spatial index, the storage field, the target point object, and the fourth preset function;
the reading submodule is used for reading grid values of grid grids corresponding to different band sequence numbers from the wind energy resource grid database according to the storage field, the band array, the target point object and the fifth preset function;
fourth, a sub-module is obtained, which is used for obtaining the query result meeting the query requirement according to the grid value.
As an alternative embodiment, the query type comprises a polygonal query, and the query unit further comprises:
fifthly, obtaining a sub-module for obtaining geographic coordinates of the query location and query requirements according to the query statement, wherein the geographic coordinates of the query location comprise a polygon boundary coordinate set, and the query requirements are used for determining query wind energy parameters;
a sixth obtaining submodule, configured to obtain a polygon object according to the polygon boundary coordinate set and a sixth preset function;
a seventh obtaining submodule, configured to obtain a target point object according to the polygon object, a preset map projection code, and a preset projection function, where the target point object is the same as a spatial reference of a data set corresponding to the query wind energy parameter in the wind energy resource grid database;
The second acquisition submodule is used for acquiring and inquiring a storage field of the wind energy parameter from the wind energy resource grid database;
eighth obtaining sub-module, configured to query third data corresponding to the wind energy parameter in the wind energy resource grid database according to the storage field, the target point object, the preset query condition and the seventh preset function, and cut the third data to obtain a data union of the cut data and grid slice data;
a ninth obtaining submodule, configured to combine the data union according to an eighth preset function, and remove repeated data in the data union to obtain a raster data set;
the second determining submodule is used for determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
the second generating submodule is used for generating a wave band array according to a third preset function, a wave band starting sequence number and a wave band ending sequence number, wherein the wave band array comprises a third preset number of wave band sequence numbers;
a tenth obtaining submodule, configured to obtain a raster data set corresponding to serial numbers of different bands according to the raster data set, the storage field, the band array, and a ninth preset function;
an eleventh obtaining submodule, configured to obtain a number corresponding to the query wind energy parameter in the polygonal area and a number occurrence number according to the second raster data set, the preset query function, and the preset summation function;
And a twelfth obtaining sub-module for obtaining the query result meeting the query requirement according to the numerical value and the corresponding times.
It should be noted that the above modules are the same as examples and application scenarios implemented by the corresponding steps, but are not limited to what is disclosed in the above embodiments.
According to a further aspect of the embodiments of the present application, there is also provided an electronic device for implementing the above-described wind energy resource grid data query method, which may be a server, a terminal, or a combination thereof.
Fig. 6 is a block diagram of an alternative electronic device, according to an embodiment of the present application, including a processor 601, a communication interface 602, a memory 603, and a communication bus 604, as shown in fig. 6, wherein the processor 601, the communication interface 602, and the memory 603 perform communication with each other via the communication bus 604, wherein,
a memory 603 for storing a computer program;
the processor 601 is configured to execute the computer program stored in the memory 603, and implement the following steps:
generating a first preset number of data files according to the first preset number of wind energy parameters and the wind energy resource grid data;
constructing a wind energy resource grid database according to a first preset number of data files;
Acquiring a wind energy resource grid data query request;
and obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request.
Alternatively, in the present embodiment, the above-described communication bus may be a PCI (Peripheral Component Interconnect, peripheral component interconnect standard) bus, or an EISA (Extended Industry Standard Architecture ) bus, or the like. The communication bus may be classified as an address bus, a data bus, a control bus, or the like. For ease of illustration, only one thick line is shown in fig. 6, but not only one bus or one type of bus.
The communication interface is used for communication between the electronic device and other devices.
The memory may include RAM or may include non-volatile memory (non-volatile memory), such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
As an example, as shown in FIG. 6, the memory 603 may include, but is not limited to, a generating module 501, a constructing module 502, an obtaining module 503, and an obtaining module 504 in the wind energy resource grid data querying device. In addition, other module units in the wind energy resource grid data query device may be included, but are not limited to, and are not described in detail in this example.
The processor may be a general purpose processor and may include, but is not limited to: CPU (Central Processing Unit ), NP (Network Processor, network processor), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the structure shown in fig. 6 is only illustrative, and the device implementing the wind energy resource grid data query method may be a terminal device, and the terminal device may be a smart phone (such as an Android mobile phone, an iOS mobile phone, etc.), a tablet computer, a palm computer, a mobile internet device (Mobile Internet Devices, MID), a PAD, etc. Fig. 6 is not limited to the structure of the electronic device described above. For example, the terminal device may also include more or fewer components (e.g., network interfaces, display devices, etc.) than shown in fig. 6, or have a different configuration than shown in fig. 6.
Those of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be implemented by a program for instructing a terminal device to execute in association with hardware, the program may be stored in a computer readable storage medium, and the storage medium may include: flash disk, ROM, RAM, magnetic or optical disk, etc.
According to yet another aspect of embodiments of the present application, there is also provided a storage medium. Alternatively, in the present embodiment, the storage medium described above may be used for storing program code for performing the wind energy resource grid data query method.
Alternatively, in this embodiment, the storage medium may be located on at least one network device of the plurality of network devices in the network shown in the above embodiment.
Alternatively, in the present embodiment, the storage medium is configured to store program code for performing the steps of:
generating a first preset number of data files according to the first preset number of wind energy parameters and the wind energy resource grid data;
constructing a wind energy resource grid database according to a first preset number of data files;
acquiring a wind energy resource grid data query request;
and obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request.
Alternatively, specific examples in the present embodiment may refer to examples described in the above embodiments, which are not described in detail in the present embodiment.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: various media capable of storing program codes, such as a U disk, ROM, RAM, a mobile hard disk, a magnetic disk or an optical disk.
In the description of the present specification, a description referring to the terms "present embodiment," "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present disclosure. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction. In the description of the present disclosure, the meaning of "a plurality" is at least two, such as two, three, etc., unless explicitly specified otherwise.
It is apparent that the above examples are given by way of illustration only and are not limiting of the embodiments. Other variations or modifications of the above teachings will be apparent to those of ordinary skill in the art. It is not necessary here nor is it exhaustive of all embodiments. While still being apparent from variations or modifications that may be made by those skilled in the art are within the scope of the invention.

Claims (8)

1. A method for querying wind energy resource grid data, the method comprising:
generating a first preset number of data files according to a first preset number of wind energy parameters and wind energy resource grid data, wherein the generating the first preset number of data files according to the first preset number of wind energy parameters and wind energy resource grid data comprises: sequentially reading the wind energy resource grid data according to the names of a first preset number of wind energy parameters to obtain variable values corresponding to the wind energy parameters; performing dimension reduction operation on the variable values to obtain an array with the dimension being a preset value; parameter setting is carried out on a first intermediate data file according to preset information to obtain a second intermediate data file, wherein the first intermediate data file is an empty file with the same data file format, the preset information is wind energy resource grid data basic information, and the preset information comprises: spatial resolution; reading first data in the array according to a preset sequence; carrying out serialization processing on the first data, and writing the first data into a corresponding wave band in the second intermediate data file to obtain a first preset number of data files, wherein the wave band is used for inquiring the first data;
Constructing a wind energy resource grid database according to a first preset number of data files, wherein the constructing the wind energy resource grid database according to the first preset number of data files comprises the following steps: creating a first database; a space database expander is configured for the first database to obtain a second database; configuring a grid driver for the second database to obtain a third database; creating a database instance according to the third database; importing second data in the data file into the database instance based on a preset spatial data engine and a preset method, creating a spatial index corresponding to the second data, and performing grid slicing on the second data to obtain the wind energy resource grid database, wherein the second data represents the data in the data file, and the spatial index is used for inquiring the second data;
acquiring a wind energy resource grid data query request;
and obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request.
2. The method of claim 1, wherein the obtaining a wind energy resource grid data query request comprises:
Acquiring geographic coordinates of a query position, a query type and a query requirement of a user;
and packaging the query position geographic coordinates, the query type and the query requirement to obtain the wind energy resource grid data query request.
3. The method according to claim 2, wherein said obtaining and returning a query result from said wind energy resource grid database and said wind energy resource grid data query request comprises:
obtaining the query type according to the wind energy resource grid data query request;
generating a query statement according to the query type, a first preset function and the wind energy resource grid data query request, wherein the first preset function is used for generating the query statement;
and obtaining the query result from the wind energy resource grid database according to the query type corresponding to the query statement according to the query statement, and returning the query result to the user.
4. A method according to claim 3, wherein the query types include point queries, and the obtaining the query results from the wind energy resource grid database according to the query types corresponding to the query statements according to the query statements includes:
Obtaining the inquiry position geographic coordinates and the inquiry requirements according to the inquiry statement, wherein the inquiry position geographic coordinates comprise inquiry longitude and inquiry latitude, and the inquiry requirements are used for determining inquiry wind energy parameters;
creating a point object according to the query longitude, the query latitude and a second preset function;
obtaining a target point object according to the point object, a preset map projection code and a preset projection function, wherein the target point object is the same as the spatial reference of the data set corresponding to the query wind energy parameter in the wind energy resource grid database, and the target point object is used for determining a query position;
determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
generating a wave band array according to a third preset function, the wave band starting sequence number and the wave band ending sequence number, wherein the wave band array comprises a second preset number of wave band sequence numbers;
acquiring a storage field of the query wind energy parameter from the wind energy resource grid database;
obtaining a grid intersected with the query position according to the spatial index, the storage field, the target point object and a fourth preset function;
According to the storage field, the wave band array, the target point object and a fifth preset function, grid values of the grid grids corresponding to different wave band serial numbers are read from the wind energy resource grid database;
and obtaining the query result meeting the query requirement according to the grid value.
5. A method according to claim 3, wherein the query types include polygonal queries, and the obtaining the query results from the wind energy resource grid database according to the query types corresponding to the query statements according to the query statements includes:
obtaining the query position geographic coordinates and the query requirement according to the query statement, wherein the query position geographic coordinates comprise a polygon boundary coordinate set, and the query requirement is used for determining a query wind energy parameter;
obtaining a polygon object according to the polygon boundary coordinate set and a sixth preset function;
obtaining a target point object according to the polygonal object, a preset map projection code and a preset projection function, wherein the target point object is the same as the spatial reference of the data set corresponding to the query wind energy parameter in the wind energy resource grid database;
Acquiring a storage field of the query wind energy parameter from the wind energy resource grid database;
inquiring third data corresponding to the inquiring wind energy parameters in the wind energy resource grid database according to the storage field, the target point object, a preset inquiring condition and a seventh preset function, and cutting the third data to obtain a data union of cut data and grid slice data;
merging the data union sets according to an eighth preset function, and removing repeated data in the data union sets to obtain a first raster data set;
determining a wave band starting sequence number and a wave band ending sequence number according to the query statement and the query requirement;
generating a wave band array according to a third preset function, the wave band starting sequence number and the wave band ending sequence number, wherein the wave band array comprises a third preset number of wave band sequence numbers;
obtaining a second raster data set corresponding to different band sequence numbers according to the first raster data set, the storage field, the band array and a ninth preset function;
obtaining a numerical value corresponding to the query wind energy parameter in the polygonal area and the occurrence frequency of the numerical value according to the second raster data set, a preset query function and a preset summation function;
And obtaining the query result meeting the query requirement according to the numerical value and the corresponding times.
6. A wind energy resource grid data querying device, the device comprising:
the generating module is used for generating a first preset number of data files according to a first preset number of wind energy parameters and wind energy resource grid data, wherein the generating module comprises: the first reading unit is used for sequentially reading the wind energy resource grid data according to the names of a first preset number of wind energy parameters to obtain variable values corresponding to the wind energy parameters; the first obtaining unit is used for performing dimension reduction operation on the variable values to obtain an array with the dimension being a preset value; the setting unit is used for carrying out parameter setting on a first intermediate data file according to preset information to obtain a second intermediate data file, wherein the first intermediate data file is an empty file with the same data file format, the preset information is wind energy resource grid data basic information, and the preset information comprises: spatial resolution; the second reading unit is used for reading the first data in the array according to a preset sequence; the second obtaining unit is used for carrying out serialization processing on the first data and writing the first data into corresponding wave bands in the second intermediate data file to obtain a first preset number of data files, wherein the wave bands are used for inquiring the first data;
The building module is used for building a wind energy resource grid database according to a first preset number of data files, wherein the building module comprises: a first creation unit configured to create a first database; a third obtaining unit, configured to configure a spatial database expander for the first database to obtain a second database; a fourth obtaining unit, configured to configure a grid driver for the second database, to obtain a third database; the second creating unit is used for creating a database instance according to the third database; a fifth obtaining unit, configured to import second data in the data file into the database instance based on a preset spatial data engine and a preset method, create a spatial index corresponding to the second data, and grid-slice the second data to obtain the wind energy resource grid database, where the second data represents data in the data file, and the spatial index is used to query the second data;
the acquisition module is used for acquiring a wind energy resource grid data query request;
the obtaining module is used for obtaining and returning a query result according to the wind energy resource grid database and the wind energy resource grid data query request.
7. An electronic device comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus, characterized in that,
the memory is used for storing a computer program;
the processor is configured to perform the method steps of any one of claims 1 to 5 by running the computer program stored on the memory.
8. A computer-readable storage medium, characterized in that the storage medium has stored therein a computer program, wherein the computer program, when executed by a processor, implements the method steps of any of claims 1 to 5.
CN202310547025.2A 2023-05-16 2023-05-16 Wind energy resource grid data query method and device, electronic equipment and storage medium Active CN116257553B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310547025.2A CN116257553B (en) 2023-05-16 2023-05-16 Wind energy resource grid data query method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310547025.2A CN116257553B (en) 2023-05-16 2023-05-16 Wind energy resource grid data query method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116257553A CN116257553A (en) 2023-06-13
CN116257553B true CN116257553B (en) 2023-07-25

Family

ID=86684757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310547025.2A Active CN116257553B (en) 2023-05-16 2023-05-16 Wind energy resource grid data query method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116257553B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966863A (en) * 2021-02-26 2021-06-15 兰州中心气象台(兰州干旱生态环境监测预测中心) Integrated intelligent grid forecast service system for weather forecast
CN114691806A (en) * 2022-03-30 2022-07-01 拉扎斯网络科技(上海)有限公司 Data query method, display method, device, electronic equipment and storage medium

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3242606B2 (en) * 1997-09-16 2001-12-25 関西電力株式会社 Wind power generation system suitable site selection method
CN102622514A (en) * 2012-02-17 2012-08-01 中国科学院地理科学与资源研究所 Ocean temperature field data processing method
US10026204B2 (en) * 2015-01-27 2018-07-17 Splunk Inc. Efficient point-in-polygon indexing technique for processing queries over geographic data sets
CN112037290B (en) * 2020-08-28 2021-05-11 中科三清科技有限公司 Data processing method, device and equipment

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112966863A (en) * 2021-02-26 2021-06-15 兰州中心气象台(兰州干旱生态环境监测预测中心) Integrated intelligent grid forecast service system for weather forecast
CN114691806A (en) * 2022-03-30 2022-07-01 拉扎斯网络科技(上海)有限公司 Data query method, display method, device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
OGSA-DAI的异源空间数据访问技术及应用;樊明辉;陈崇成;吴小竹;;华侨大学学报(自然科学版)(02);64-67 *

Also Published As

Publication number Publication date
CN116257553A (en) 2023-06-13

Similar Documents

Publication Publication Date Title
CN106294887B (en) The description method to object existing for objective world and event based on space-time
CN101719154B (en) Grid structure-based spatial index establishing method and grid structure-based spatial index establishing system
US8525848B2 (en) Point cloud decimation engine
CN103500196A (en) EXCEL data export method and export device in multi-concurrence large data volume environment
CN105786942A (en) Geographic information storage system based on cloud platform
CN112559667A (en) Map editor, map engine, map editing system, map editing method, and storage medium
CN112650782B (en) Big data geographic information visualization method, system and storage medium
EP3410315A1 (en) Systems and methods for using tiled data
CN112100130B (en) Massive remote sensing variable multi-dimensional aggregation information calculation method based on data cube model
CN112181980A (en) Large-scale analysis-oriented space-time big data cube organization method and system
CN116257553B (en) Wind energy resource grid data query method and device, electronic equipment and storage medium
CN107402942B (en) Indexing method and device
CN102622224A (en) Method for achieving tree-like control piece with search function in Windchill system
CN112699102B (en) Processing method of lattice point data and related equipment thereof
Yan et al. An improved coverage-oriented retrieval algorithm for large-area remote sensing data
CN117152399A (en) Model making method, device, equipment and storage medium based on transformer substation
Pabreja et al. A data warehousing and data mining approach for analysis and forecast of cloudburst events using OLAP-based data hypercube
CN109359224B (en) Material data processing method and device, electronic equipment and storage medium
CN101699545A (en) Method and device for automatically generalizing map spatial points
CN111125157B (en) Query data processing method and device, storage medium and processor
CN111949706B (en) Storage method for land big data distributed mining analysis
CN105991400B (en) Group searching method and device
Reinecke et al. Efficient data structures for masks on 2D grids
Lian et al. FunnelCloud: a cloud-based system for exploring tornado events
CN111046244A (en) PostGIS-based power grid resource graph superposition analysis method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant