Meteorological data storage and query method and device

By compressing meteorological data in both time and space and storing it in a non-relational database, the problem of a surge in the number of database entries was solved, achieving efficient data storage and retrieval.

CN113946572BActive Publication Date: 2025-12-23HUAFENG-ACCUWEATHER METEOROLOGICAL TECH (BEIJING) CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202010680067.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-07-15
Publication Date
2025-12-23
Estimated Expiration
2041-06-19

AI Technical Summary

Technical Problem

Existing meteorological data storage methods lead to a surge in the number of database entries and low query and storage efficiency when processing large amounts of forecast data.

Method used

By performing time and spatial compression on meteorological service data, data from the same time or space point are merged into a single record, and stored using a non-relational database such as MongoDB, indexes are created for both time and spatial dimensions.

Benefits of technology

It significantly reduces the number of records stored in the database, improves read and write efficiency, and enhances data query performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113946572B_ABST
    Figure CN113946572B_ABST
Patent Text Reader

Abstract

The present disclosure provides a meteorological data storage and query method and device. The meteorological data query method comprises: obtaining a plurality of meteorological service data, wherein each meteorological service data comprises time data, space data and at least one meteorological element; compressing the data items of the meteorological service data; and storing the compressed meteorological service data in a database; wherein the data item compression comprises time compression or space compression. The meteorological data query method compresses the data of a certain time point or space point into a data storage by using data item compression, reduces the number of database storage entries by lengthening the field length, and greatly improves the read-write efficiency of the database.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] Embodiments of the present application relate to a meteorological data storage, query method and device. BACKGROUND

[0002] Meteorological data is an indispensable data information in life, and meteorological data needs to be processed to obtain meteorological data information that has an impact on people's production and life. Meteorological data not only plays a very important role in daily life, but also provides various types of meteorological services for many fields such as aviation, livelihood, etc., such as gale forecast, typhoon forecast, high-altitude temperature forecast, etc. SUMMARY

[0003] At least one embodiment of the present application provides a meteorological data storage method, which comprises: acquiring a plurality of meteorological service data, each of the meteorological service data comprising time data, space data and at least one meteorological element; compressing the data items of the meteorological service data; storing the compressed meteorological service data into a database; the data item compression comprises time compression or space compression.

[0004] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, the database comprises a non-relational database for storing the meteorological service data.

[0005] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, storing the compressed meteorological service data into the database comprises: based on the time data and the space data, creating an index value of the meteorological service data in the database, storing the index value and the at least one meteorological element into the database, the index value of the database comprising time dimension data and space dimension data, the space dimension data based on the space data, and the time dimension data based on the time data.

[0006] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, the time compression comprises: when the time data comprises a report time, merging a first number of meteorological service data in the plurality of meteorological service data having the same space data and the same report time into a new meteorological service data; when the time data comprises a live time, merging a first number of meteorological service data in the plurality of meteorological service data having the same space data into a new meteorological service data; the first number is greater than 1.

[0007] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, the first quantity of meteorological service data is merged into one new meteorological service data, including: sequentially splicing meteorological elements of the first quantity of meteorological service data in chronological order to obtain the one new meteorological service data.

[0008] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, the spatial dimension data in the database index value includes longitude and latitude, the spatial data item includes longitude, latitude and height, the meteorological elements of the second quantity of meteorological service data in the multiple meteorological service data include the first type of meteorological elements and have the same longitude and latitude, the same time dimension data, the second quantity is greater than 1, the first type of meteorological elements of the second quantity of meteorological service data have different data corresponding to different heights at the same longitude and latitude, and the spatial compression includes: creating a new element with the different height markers according to the first type of meteorological elements of each of the second quantity of meteorological service data; and merging the second quantity of meteorological service data into one new meteorological service data, wherein the one new meteorological service data obtained by merging includes the new element created according to each of the second quantity of meteorological service data.

[0009] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, the data item compression includes the time compression and the spatial compression.

[0010] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, based on the time data item and the spatial data item, the index value of the meteorological service data in the database is created, including: converting the spatial data item into a grid serial number as the spatial dimension data in the database index value, the grid serial number including a longitude serial number, a latitude serial number and / or a height serial number; and / or converting the time data item into a time serial number as the time dimension data in the database index value, the time serial number including a report time serial number and / or a valid time serial number.

[0011] For example, in the meteorological data storage method provided in at least one embodiment of the present disclosure, based on the time data item and the spatial data item, the index value of the meteorological service data in the database is created, including: converting the spatial data item into a spatial numerical value as the spatial dimension data in the database index value, the spatial numerical value including a longitude numerical value, a latitude numerical value and / or a height numerical value; and / or converting the time data item into a time numerical value as the time dimension data in the database index value, the time numerical value including a report time numerical value and / or a valid time numerical value.

[0012] For example, in the meteorological data storage method provided by at least one embodiment of the present disclosure, creating index values of the meteorological service data in the database based on the time data item and the space data item includes: converting the space data item into a grid serial number as space dimension data in the database index value, the grid serial number including a longitude serial number, a latitude serial number and / or an altitude serial number; and converting the time data item into a time value as time dimension data in the database index value, the time value including a report time value and / or a valid time value; or converting the space data item into a space value as space dimension data in the database index value, the space value including a longitude value, a latitude value and / or an altitude value; and converting the time data item into a time serial number as time dimension data in the database index value, the time serial number including a report time serial number and / or a valid time serial number. For example, in the meteorological data storage method provided by at least one embodiment of the present disclosure, creating index values of the meteorological service data in the database based on the time data item and the space data item includes: splicing the time data item and the space data item to form a location identification tag as the database index value.

[0013] For example, in the meteorological data storage method provided by at least one embodiment of the present disclosure, splicing the time data item and the space data item to form a location identification tag includes: arranging and combining the time data item and the space data item and connecting them with a connection character to form a character string, thereby obtaining the location identification tag.

[0014] For example, in the meteorological data storage method provided by at least one embodiment of the present disclosure, before storing the compressed data item into the database, the method further includes: further performing data space compression on the compressed data item, and storing the data item into the database includes: storing the data space compressed data item into the database.

[0015] For example, in the meteorological data storage method provided by at least one embodiment of the present disclosure, the data space compression includes: compressing meteorological elements in the meteorological service data into short strings and storing them into the database.

[0016] At least one embodiment of the present application also provides a meteorological data query method, which comprises: receiving a meteorological data query request, the query request comprising a time request and / or a space request; generating a query key according to the query request and an index value type of a database; querying the database according to the query key to obtain meteorological service data stored in the database corresponding to the query key; the meteorological service data comprising time data items, space data items and at least one meteorological element, the meteorological service data being stored in the database after data item compression, the data item compression comprising time compression or space compression.

[0017] For example, in the meteorological data query method provided by at least one embodiment of the present application, the index value of the database comprises time dimension data and space dimension data, the database index value comprises a serial number form, and the generation of the query key comprises: when the time dimension data of the database index value comprises a time serial number, finding a time serial number corresponding to a nearest time point of the time request, taking the time serial number as time information of the query key, and generating a corresponding query key; or when the space dimension data of the database index value comprises a grid serial number, finding a grid serial number corresponding to a nearest space point of the space request, taking the grid serial number as space information of the query key, and generating a corresponding query key.

[0018] For example, in the meteorological data query method provided by at least one embodiment of the present application, the index value of the database comprises time dimension data and space dimension data, the database index comprises a numerical form, and the generation of the query key comprises: when the time dimension data of the database index value comprises a time numerical value, processing the time request to a predetermined precision according to the database index precision, taking the time numerical value as time information of the query key, and generating a corresponding query key; or when the space dimension data of the database index value comprises a space numerical value, processing the space request to a predetermined precision according to the database index precision, taking the space numerical value as space information of the query key, and generating a corresponding query key.

[0019] For example, in the meteorological data query method provided by at least one embodiment of the present application, the database index is a location identification label, and the generation of the query key comprises: arranging the space request and / or the time request and connecting them with a connection character, splicing to form a string in the same way as generating the location identification label, and generating a corresponding query key by using the string.

[0020] For example, in the meteorological data query method provided by at least one embodiment of the present application, after receiving the meteorological data query request, the method further comprises: distributing the meteorological data query request to a data interface server with non-maximum user access traffic according to user access traffic of a plurality of interface servers for the database.

[0021] For example, in the weather data query method provided by at least one embodiment of the present disclosure, the weather service data is compressed in data space, and the obtaining of the stored weather service data corresponding to the query key comprises: decompressing the weather service data compressed in data space to obtain the weather service data before data space compression.

[0022] At least one embodiment of the present application provides a weather data storage device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program can execute the weather data storage method according to at least one embodiment of the present application when the computer program is run by the processor.

[0023] At least one embodiment of the present application provides a weather data query device, comprising a processor and a memory, wherein the memory stores a computer program, and the computer program can execute the weather data query method according to at least one embodiment of the present application when the computer program is run by the processor. BRIEF DESCRIPTION OF DRAWINGS

[0024] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings of the embodiments will be briefly introduced below. Obviously, the drawings described in the following are only related to some embodiments of the present application, but not limited to the present application.

[0025] Figure 1 The example flow chart of the weather data storage method according to at least one embodiment of the present disclosure is shown in the figure;

[0026] Figure 2 The example flow chart of the weather data time compression storage method according to at least one embodiment of the present disclosure is shown in the figure;

[0027] Figure 3 The example flow chart of the weather data space compression storage method according to at least one embodiment of the present disclosure is shown in the figure;

[0028] Figure 4 The example diagram of the horizontal space grid serial number mapping method according to at least one embodiment of the present disclosure is shown in the figure;

[0029] Figure 5 The example flow chart of the weather data query method according to at least one embodiment of the present disclosure is shown in the figure;

[0030] Figure 6 The schematic block diagram of the architecture of the weather data storage and query system according to at least one embodiment of the present disclosure is shown in the figure;

[0031] Figure 7 The schematic block diagram of the weather data storage device according to at least one embodiment of the present disclosure is shown in the figure;

[0032] Figure 8 An exemplary scenario diagram of a weather data storage and query system is shown. DETAILED DESCRIPTION

[0033] In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions of the embodiments of the present application will be described clearly and completely below with reference to the drawings of the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the described embodiments of the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort belong to the scope of protection of the present application.

[0034] Unless otherwise defined, technical terms or scientific terms used in the present disclosure shall have the ordinary meaning commonly understood by one of ordinary skill in the art to which the present application belongs. The terms "first", "second", and similar terms used in the present disclosure do not denote any order, quantity, or importance, but are used to distinguish different components. Similarly, the terms "include", "contain", and similar terms mean that the elements or objects before the terms encompass the elements or objects listed after the terms and their equivalents, and do not exclude other elements or objects. The terms "connect" or "connected" or similar terms are not limited to physical or mechanical connections, but can include electrical or signal connections, whether direct or indirect.

[0035] The weather data storage method according to at least one embodiment of the present disclosure is described below by several examples or embodiments, which are not limited, and different features in these specific examples or embodiments can be combined with each other to obtain new examples or embodiments, which are also within the scope of protection of the present disclosure, as described below, without mutual contradiction.

[0036] It should be noted that in the description of the present disclosure, the database index refers to the index structure of the database, and the database index value refers to the index value stored in each database record. For example, the database index includes the time dimension and the space dimension, and the database index value includes the time dimension data and the space dimension data correspondingly.

[0037] The service provided for users by using meteorological data includes four processing layers: a data collection layer, a logic processing layer, an IT processing layer, and a front-end application layer. Among them, the data collection layer obtains meteorological raw data through various channels, such as raw forecast data, live data, aviation professional messages, etc.; the logic processing layer processes the obtained various meteorological raw data into practical meteorological service data, such as processing wind-related data into pitching data, processing humidity and temperature data of the whole layer of atmosphere into convection intensity data according to the arrangement characteristics, etc.; the IT processing layer stores the processed meteorological service data and distributes them according to the corresponding data interface; and the front-end application layer constructs a related service data carrier, provides query and analysis interfaces for users, and displays data through a visual interface.

[0038] Currently, a commonly used meteorological data storage structure is shown in Table 1. In this data storage structure, each piece of data has a longitude, latitude, height, reporting time, and valid time, wherein the longitude, latitude, height, reporting time, and valid time are database indexes, representing that this record is meteorological data of a certain point in space at a certain time; the time information and location information in the meteorological data are stored in the corresponding positions of the index values, and one or more meteorological elements in the meteorological data are stored in the values corresponding to the database index values. For example, this database record is meteorological service data of a spatial position of latitude 116.24°, longitude 23.58°, height 1000 meters, reporting time 2020-05-28 00:00, and valid time 2020-05-28 16:00, and the meteorological elements include temperature, relative humidity, precipitation, etc. For example, the height here refers to the "elevation", and its numerical unit can be meters, and sometimes pressure (such as hPa) can also be used.

[0039] Table 1: A typical storage structure of meteorological data in a database

[0040]

[0041] However, for forecast data and other meteorological data, it represents data at different time points in the future, and it is also a gridded data set. For example, for a situation of 10.5 billion data points, updated 4 times a day, the total data volume is about 4.2 billion per day. If stored according to the traditional method, the number of database entries will increase dramatically, which brings great challenges to database query and storage.

[0042] The meteorological data storage method provided by at least one embodiment of the present disclosure includes: obtaining a plurality of meteorological service data, wherein each piece of meteorological service data includes a time data item, a space data item, and at least one meteorological element; data item compression is performed on the meteorological service data; and the data item compressed meteorological service data is stored in a database. The data item compression includes time compression or space compression.

[0043] The disclosure also provides a meteorological data storage device corresponding to the above-mentioned meteorological data storage method.

[0044] The meteorological data storage method provided by the above-mentioned embodiments of the disclosure greatly improves the read-write efficiency of the database by compressing the data of a certain time point or space point into a data storage and reducing the number of database storages by lengthening the field length.

[0045] The embodiments of the disclosure will be described in detail below with reference to the accompanying drawings.

[0046] Figure 1 The above-mentioned meteorological data storage method provided by the embodiments of the disclosure can be applied to the storage of en route meteorological data and other scenarios, for example, for en route meteorological forecasting.

[0047] As shown in Figure 1 The meteorological data storage method according to the embodiments of the disclosure includes steps S101-S103.

[0048] First, in step S101, a plurality of meteorological service data are obtained. Each meteorological service data includes time data, space data, and at least one meteorological element.

[0049] For example, the obtained raw meteorological data is processed and analyzed to generate meteorological service data, which includes any one of forecast data, grid live data, aviation professional message, meteorological satellite data, meteorological radar data, or any combination of these data. For example, the aviation professional message includes METAR (Meteorological Aerodrome Report) data, SPECI (Special Weather Message) data, and TAF (Terminal Aerodrome Forecast) data.

[0050] The space data in the meteorological service data is used to indicate the spatial position (or geographical position) of the meteorological service data, and the time data is used to indicate the corresponding time of the meteorological service data. The meteorological element includes one or more of processed atmospheric temperature, relative humidity, precipitation, wind direction, and wind speed data, and the embodiments of the disclosure do not limit the composition of the meteorological element.

[0051] In step S102, the meteorological service data is compressed. The data compression includes time compression or space compression.

[0052] In step S103, the compressed meteorological service data is stored in the database.

[0053] For example, in at least one example, storing the compressed weather service data into the database comprises: creating an index value of the weather service data in the database based on the time data item and the space data item, and storing the index value and the at least one weather element into the database. The index value of the database comprises time dimension data based on the time data item and space dimension data based on the space data item. That is, the time data item and the space data item in the weather service data are converted into corresponding forms according to the index type and stored at the corresponding index value.

[0054] For example, when the weather service data is forecast data, the time dimension comprises a start time and a valid time, wherein the start time is the start time of the forecast, and the valid time, also referred to as the forecast time, is the time corresponding to the weather data; the space dimension is the geographical position information based on the grid where the weather data is located, comprising longitude, latitude and height. For example, the height is the altitude, and the unit is meter.

[0055] For example, when the weather service data is real-time data, the space dimension comprises longitude, latitude and height, but since the real-time data represents the weather condition at a certain time, it does not contain the forecast attribute, and therefore the time dimension only comprises time.

[0056] For example, the database mentioned in the above steps comprises a non-relational database for storing weather service data. For example, in some embodiments of the present disclosure, a MongoDB database or other non-relational databases such as Redis, Membase, etc. are used to cope with the storage and large-scale access of a large amount of data, and the embodiments of the present disclosure do not limit this.

[0057] The weather data storage method provided by the present disclosure will be described in detail below by way of examples in conjunction with the accompanying drawings.

[0058] Figure 2 is an example flowchart of a weather data time compression storage method according to at least one embodiment of the present disclosure, which comprises steps S201-S202.

[0059] Step S201, splicing the weather elements of the first number of weather service data in chronological order.

[0060] Step S202, merging the first number of weather service data after splicing the weather elements into a new weather service data.

[0061] For example, in at least one embodiment of the present disclosure, the weather service data is forecast data, and when the data item compression adopts time compression, the time dimension of the database index is set as the forecast time, not including the valid time. The spatial data of the weather service data is converted according to the index type to serve as the spatial dimension data of the database index value, and the forecast time of the time data item is converted according to the index type to serve as the time dimension data of the database index value. The weather elements of the first quantity of weather service data at the same spatial point and with the same forecast time are spliced in the chronological order of time to obtain a new weather service data containing the time dimension data, the spatial dimension data, and the spliced weather elements.

[0062] For example, in at least one embodiment of the present disclosure, the weather service data is live data, which can be stored in the live data in the form of a traditional database storage structure, or a plurality of live data at different times can be stored as one database record. When the plurality of live data is stored as one database record, the database index is set not to include the time dimension, and the spatial data of the weather service data is converted according to the index type to serve as the spatial dimension data of the database index value. The weather elements of the first quantity of weather service data at the same spatial point are spliced in the chronological order of time to obtain a new weather service data containing the spatial dimension data and the spliced weather elements. That is, the present disclosure is applicable to the time-level compressed data centralized storage, including but not limited to the forecast data.

[0063] Here, the "first quantity" is used to refer to the quantity of weather service data to be compressed in time. For example, the first quantity refers to the quantity of weather service data with the same spatial point and the same forecast time currently being processed, or the quantity of weather service data with the same spatial point, which is greater than 1 (if equal to 1, then no compression is needed) and less than or equal to the quantity of all weather service data, for example, the weather service data satisfying the aforementioned time compression condition can be all weather service data or part of weather service data.

[0064] Alternatively, the weather element splicing manner includes various manners, such as string splicing or fixed manner separation, and the present disclosure does not limit this.

[0065] The plurality of database records are combined into one through the weather element splicing to generate the same new weather service data. For example, if one forecast data includes 120 valid time data, the time compression storage makes the data quantity reduced by 120 times, greatly improving the data storage efficiency.

[0066] Table 2 is an example of a database storage structure using the time compression storage method according to an embodiment of the present disclosure. As shown in Table 2, the dimension of valid time is removed, and the spatial dimension data 23.58, 116.24 and 1000 are stored at the longitude, latitude and height (unit: meters) respectively, and the time dimension data 2020052800 (i.e. 00:00 on May 28, 2020) is stored at the report time. The meteorological service data with the same spatial dimension data and the same report time in the multiple meteorological service data are merged into a new meteorological service data. Taking the temperature and relative humidity elements as examples, the temperature data of multiple valid times are 10, 11, 13, 25, 16, 11…, which are connected together in the order of time with a comma to form the temperature element in the database record, i.e. “temperature: 10, 11, 13, 25, 16, 11…”; similarly, the relative humidity data of multiple valid times are 85, 86, 83, 70…, which are connected together in the same time order with a comma to form the relative humidity element in the database record, i.e. “relative humidity: 85, 86, 83, 70…”.

[0067] Table 2 is an example of a database storage structure using the time compression storage method according to an embodiment of the present disclosure. As shown in Table 2, the dimension of valid time is removed, and the spatial dimension data 23.58, 116.24 and 1000 are stored at the longitude, latitude and height (unit: meters) respectively, and the time dimension data 2020052800 (i.e. 00:00 on May 28, 2020) is stored at the report time. The meteorological service data with the same spatial dimension data and the same report time in the multiple meteorological service data are merged into a new meteorological service data. Taking the temperature and relative humidity elements as examples, the temperature data of multiple valid times are 10, 11, 13, 25, 16, 11…, which are connected together in the order of time with a comma to form the temperature element in the database record, i.e. “temperature: 10, 11, 13, 25, 16, 11…”; similarly, the relative humidity data of multiple valid times are 85, 86, 83, 70…, which are connected together in the same time order with a comma to form the relative humidity element in the database record, i.e. “relative humidity: 85, 86, 83, 70…”.

[0068]

[0069] According to the time compression storage method according to an embodiment of the present disclosure, the forecast data is compressed in the time dimension, and the meteorological data at multiple time points at a spatial point is compressed into one data for storage, so as to reduce the number of database storage records and improve the efficiency of the database.

[0070] Figure 3 is an example flowchart of a meteorological data spatial compression storage method according to at least one embodiment of the present disclosure, which includes steps S301-S302.

[0071] Step S301, a new element with a height label is created according to the first type of meteorological element of each of the second number of meteorological service data.

[0072] For example, in at least one embodiment of the present disclosure, the spatial dimension of the database index is longitude and latitude, but does not include height. The meteorological elements in the meteorological service data include the first type of meteorological elements. Here, the first type of meteorological elements refers to the meteorological elements existing at different heights at the same longitude and the same latitude, such as ice accumulation, etc., which have different data at different height layers. That is, at least part of the meteorological service data in the whole meteorological service data corresponds to the same longitude, the same latitude, but corresponds to different heights, and all have a certain first type of meteorological element, so the spatial compression can be performed on this part of the meteorological service data.

[0073] Here, the "second number" is used to refer to the number of weather service data to be subjected to spatial compression. For example, the second number refers to the number of weather service data having the same longitude, latitude and the same time dimension data and having the same first type of weather element (e.g. icing) currently being processed, which is greater than 1 (if equal to 1, then no compression is needed) and less than or equal to the number of all weather service data, i.e. the weather service data satisfying the aforementioned spatial compression condition can be all weather service data or part of weather service data.

[0074] In some examples, the new element creation method is specifically described taking the icing element in the first type of weather element as an example. Icing has data at different altitudes, such as icing data at 600 meters, icing data at 900 meters, icing data at 1200 meters, etc. Before spatial compression, the three pieces of weather service data have icing data at altitudes of 600 meters, 900 meters and 1200 meters respectively, of course, the three pieces of weather service data also include other weather elements, such as wind direction, etc. The three pieces of weather service data can be subjected to spatial compression to be combined into the same new weather service data. When spatial compression is stored, the different altitude icing data possessed by the three pieces of weather service data is taken out and marked with the corresponding altitude for the three icing elements respectively, thereby obtaining three new elements, such as icing_600, icing_900, icing_1200, etc.

[0075] In step S302, the second number of weather service data is combined into the same new weather service data, wherein the same new weather service data obtained by the combination includes the new elements created according to each of the second number of weather service data.

[0076] For example, in one example, all weather elements of the second number of weather service data are combined, and the new elements created according to each of the second number of weather service data are used to replace the first type of weather element of each of the second number of weather service data, thereby combining the second number of weather service data into the same new weather service data.

[0077] For example, in at least one embodiment of the present disclosure, the created icing elements at different altitudes marked with altitudes, such as icing_600, icing_900, icing_1200, etc., are used to replace the original first type of weather element icing in the weather service data, and the weather service data corresponding to different altitudes are combined into the same new weather service data.

[0078] For example, meteorological service data may also include a second type of meteorological elements, which includes elements that have the same data at different altitudes (e.g., partial altitudes) under the same longitude and latitude, such as precipitation. These elements do not have an altitude attribute, meaning they have only one data point at different altitude levels. For example, in at least one example, when merging meteorological service data to obtain new meteorological service data, firstly, all meteorological elements included in the merged meteorological service data are combined to obtain a set of all meteorological elements; secondly, newly created elements with altitude markers are used to replace the original first type of meteorological elements, thereby combining them with the second type of meteorological elements (and other meteorological elements, if present) of the merged meteorological service data to obtain all meteorological elements in the merged new meteorological service data. For example, all meteorological elements include surface temperature, precipitation, wind direction, icing_600, icing_900, icing_1200, etc. Then, the spatial data items of the meteorological service data are converted into spatial dimension data of the database index value according to the index type, and the temporal data items are converted into temporal dimension data of the database index value according to the index type, thus obtaining the complete new meteorological service data.

[0079] Table 3-1 is an example of a database storage structure using a spatial compression storage method according to at least one embodiment of this disclosure. As shown in Table 3-1, the altitude dimension is removed, and spatial dimension data is stored in the longitude and latitude fields, while time dimension data is stored in the start time and validity period fields. The meteorological elements at different altitudes from different meteorological service data before compression are marked with altitude tags and merged to create a new element, such as icing_300, icing_600, icing_900, etc. All new elements, along with other existing meteorological elements from the different meteorological service data before compression, are merged to obtain the same new meteorological service data, which is then stored in a record in the database.

[0080] Table 3-1 Database storage structure using space compression storage method

[0081]

[0082] For example, in another example, as shown in Table 3-2, the second type of meteorological elements (e.g., precipitation, etc.) have data at one preset height, and other different heights (e.g., partial heights) are all "empty" (NA) values. When merging multiple pieces of meteorological service data to obtain the same new piece of meteorological service data, first, all meteorological elements of the multiple pieces of meteorological service data to be merged are merged to obtain a set of all meteorological elements, at this time, in the set of meteorological elements, in addition to the first type of meteorological elements, there are three groups of second type of meteorological elements with the meteorological element being precipitation, one group of values is the element value, and the other two groups of values are "empty" values; second, the newly created new elements with height markers are used to replace the original first type of meteorological elements, for example, creating ice_0, ice_1 and ice_2 to replace the original three first type of meteorological elements; third, the meteorological elements with "empty" values in the second type of meteorological elements are removed, thereby obtaining all meteorological elements in the same new piece of meteorological service data after merging, for example, the all meteorological elements include precipitation, ice_0, ice_1, ice_2, etc. meteorological elements. Then, the spatial data items of the meteorological service data are converted according to the index type as the spatial dimension data of the database index value, and the time data items are converted according to the index type as the time dimension data of the database index value, thereby obtaining the complete same new piece of meteorological service data.

[0083] Table 3-2 meteorological service data storage structure containing second type of meteorological elements

[0084]

[0085] For example, in another example, the meteorological service data includes first type of meteorological elements and second type of meteorological elements. When merging multiple pieces of meteorological service data to obtain the same new piece of meteorological service data, first, a set of first meteorological elements of the multiple pieces of meteorological service data to be merged is obtained, and the set of first meteorological elements only includes first type of meteorological elements; second, the newly created new elements with height markers are used to replace the original first type of meteorological elements to obtain a combination of new elements; third, the second type of meteorological elements with real numerical values are merged into the set of new elements to obtain all meteorological elements in the same new piece of meteorological service data after merging, for example, the all meteorological elements include precipitation, ice_0, ice_1, ice_2, etc. meteorological elements. Then, the spatial data items of the meteorological service data are converted according to the index type as the spatial dimension data of the database index value, and the time data items are converted according to the index type as the time dimension data of the database index value, thereby obtaining the complete same new piece of meteorological service data.

[0086] For example, in still another embodiment, the weather service data includes a first type of weather element and a second type of weather element. When merging multiple pieces of weather service data to obtain a same new piece of weather service data, first, a newly created set of new elements with height markers is obtained for the multiple pieces of weather service data to be merged; then, the second type of weather element with a real value is merged into the set of new elements to obtain all weather elements in the same new piece of weather service data after merging, for example, all weather elements include a precipitation amount, an ice accumulation_0, an ice accumulation_1, an ice accumulation_2, and the like. After that, the spatial data item of the weather service data is converted according to an index type as spatial dimension data of a database index value, and the time data item is converted according to an index type as time dimension data of a database index value, so as to obtain a complete same new piece of weather service data.

[0087] The above-mentioned various ways of merging multiple pieces of weather service data to obtain a same new piece of weather service data are exemplary descriptions, and embodiments of the present disclosure are not limited to the above descriptions. Although the number of weather elements of each database record is increased, the number of database storage records is reduced, and the purpose of improving the read-write efficiency of the database is achieved.

[0088] It should be noted that the form of the newly created new element includes various forms, and embodiments of the present disclosure do not specifically limit this, and can be set according to actual conditions.

[0089] According to the spatial compression storage method provided in at least one embodiment of the present disclosure, by performing height layer compression on the forecast data, the data is converted from three dimensions to two dimensions, all height data at a certain time point is compressed into 1 piece of data for storage, so as to achieve the purpose of reducing the number of database storage records and improving the efficiency of the database.

[0090] Table 4 is an example of a database storage structure using a time and spatial compression storage method at the same time according to at least one embodiment of the present disclosure. As shown in Table 4, the weather service data is forecast data, the spatial dimension retains longitude and latitude, and the original three-dimensional data is reduced to two dimensions; the time dimension retains the reporting time, and the valid time is removed.

[0091] Table 4 is an example of a database storage structure using a time and spatial compression storage method at the same time according to at least one embodiment of the present disclosure. As shown in Table 4, the weather service data is forecast data, the spatial dimension retains longitude and latitude, and the original three-dimensional data is reduced to two dimensions; the time dimension retains the reporting time, and the valid time is removed.

[0092]

[0093] For example, the data is spatially compressed, and weather elements at different heights are created as new elements with height markers, for example, ice accumulation_300, ice accumulation_600, and the like; the data is time-compressed, and weather elements at different time points are spliced to obtain a same new piece of weather service data, and then stored as one piece of data record.

[0094] The time and space compression storage method provided by the above embodiments of the present disclosure reduces the number of data records and significantly enhances the database read-write performance by reducing the index from five dimensions to three dimensions through simultaneous time compression and space compression, and further improving the data compression capability on the basis of single compression storage.

[0095] It should be noted that the time dimension, space dimension and meteorological element setting listed in the present disclosure are only exemplary, and the above database index can be set according to actual conditions for different types of meteorological service data (for example, forecast data, live data, etc.), and the embodiments of the present disclosure do not make specific limitations thereon.

[0096] For time compression storage, all forecast data with the same reporting time is compressed and stored as one, and when the number of effective data is large, for example, the forecast data of the Global Forecast System (GFS), each update of the forecast data includes 384 forecast times, which results in a too long meteorological element string after splicing and thus a too large storage space. For space compression, the number of elements is increased, and when the number of merged data is large, it also results in a too long meteorological element string and thus a too large storage space.

[0097] According to at least one embodiment of the present disclosure, the data space compression is further performed on the data item compressed meteorological service data before the data item compressed meteorological service data is stored in the database, and then the data space compressed meteorological service data is stored in the database. Here, the data space compression method includes but is not limited to the compression method such as zlib, which compresses a long string into a shorter string to save storage space.

[0098] Reasonably establishing the index of the non-relational database is also the key to improving the performance of a large amount of data storage and query. Therefore, the database index needs to be planned and designed before the data is stored in the database. The following non-restrictively describes the database index construction method provided by at least one embodiment of the present disclosure through several examples or embodiments. As described below, the different features in these specific examples or embodiments can be combined with each other without mutual contradiction, so as to obtain new examples or embodiments, and these new examples or embodiments also belong to the protection scope of the present disclosure.

[0099] Table 5 shows the database storage structure in the form of a serial number of the database index provided by at least one embodiment of the present disclosure. For example, the forecast data is established on a grid, which is composed of multiple grids in the horizontal direction and the vertical direction, and each data corresponds to longitude, latitude, height, reporting time and effective time.

[0100] Table 5: Database storage structure in the form of a serial number of the database index

[0101] Longitude number Latitude number Altitude number Time of issuance number Forecast time (valid time) number 124 256 5 125 21

[0102] For example, according to at least one embodiment of the present disclosure, when creating an index value of the meteorological service data in the database based on the time data item and the space data item, the space data item is converted into a grid serial number as the space dimension data in the database index value, wherein the grid serial number comprises a longitude serial number, a latitude serial number and / or an altitude serial number; or the time data item is converted into a time serial number as the time dimension data in the database index value, wherein the time serial number comprises a report time serial number and / or a valid time serial number. In at least one example, the space data item can be converted into a grid serial number and the time data item can be converted into a time serial number at the same time. For example, the grid serial number comprises a longitude serial number, a latitude serial number and an altitude serial number, i.e. the longitude, latitude and altitude are all in the form of serial numbers. For example, the time serial number comprises a report time serial number and a valid time serial number, i.e. the report time and the valid time are both in the form of serial numbers.

[0103] For example, in at least one embodiment of the present disclosure, the space data item of the obtained meteorological service data is latitude 23.8°, longitude 116.92° and altitude 1000 hPa (or altitude data), and the time data item is report time May 28, 2020 00:00 and valid time May 29, 2020 01:00. According to the self-defined manner, the latitude serial number is 124, the longitude serial number is 256, the altitude serial number is 5, the report time serial number is 125 and the valid time serial number is 21, so the five data 124, 256, 5, 125 and 21 are used to establish an index, as shown in Table 5.

[0104] Figure 4 An example diagram of the horizontal space grid serial number mapping method according to at least one embodiment of the present disclosure is shown in the figure. As shown in the figure, the grid is regarded as a two-dimensional table, each column represents a different longitude, each row represents a different latitude, and the data in the cell represents the value of a meteorological element, i.e. the grid represents the longitude and latitude of a certain meteorological element. Taking the position of longitude 70.125° and latitude 54.75° as an example, the longitude position of the position in the mapping table is the second column and the latitude position is the third row, so the longitude serial number of the position is 2 and the latitude serial number is 3. The altitude serial number and the time serial number can be mapped according to the same or other methods.

[0105] Table 6 is a database storage structure with database index in numerical form according to at least one embodiment of the present disclosure.

[0106] Table 6 is a database storage structure with database index in numerical form according to at least one embodiment of the present disclosure.

[0107] Longitude Latitude Altitude Time of issuance Forecast time (valid time) 116.92 23.80 1000 2020052800 2020052901

[0108] For example, according to at least one embodiment of the present disclosure, when creating the index value of the meteorological service data in the database based on the time data item and the space data item, the space data item is converted into a space numerical value as the space dimension data in the database index value, wherein the space numerical value includes a longitude numerical value, a latitude numerical value and / or an altitude numerical value; or the time data item can be converted into a time numerical value as the time dimension data in the database index value, wherein the time numerical value includes a report time numerical value and / or a valid time numerical value. In at least one example, the space data item can be converted into a space numerical value and the time data item can be converted into a time numerical value at the same time. For example, the space numerical value includes a longitude numerical value, a latitude numerical value and an altitude numerical value, i.e., the longitude, latitude and altitude are all in numerical form. For example, the time numerical value includes a report time numerical value and a valid time numerical value, i.e., the report time and the valid time are both in numerical form.

[0109] In the above embodiment, the index establishing manner is the same as the method of the database index being in the form of a serial number, but there is no need to map the database index into a serial number again, and the specific numerical value or string is directly stored into the database as the time dimension data and the space dimension data. The string can also adopt other representation manners, and the embodiments of the present disclosure do not make specific limitation on this.

[0110] Table 7 is a database storage structure with the database index being in the form of a numerical value and a serial number according to at least one embodiment of the present disclosure.

[0111] Table 7 is a database storage structure with the database index being in the form of a numerical value and a serial number according to at least one embodiment of the present disclosure.

[0112] Longitude number Latitude number Altitude number Time of issuance Valid time 124 256 5 2020052800 2020052816

[0113] For example, according to at least one embodiment of the present disclosure, when creating the index value of the meteorological service data in the database based on the time data item and the space data item, the space data item is converted into a space numerical value as the space dimension data in the database index value, wherein the space numerical value includes a longitude numerical value, a latitude numerical value and / or an altitude numerical value; or the time data item can be converted into a time numerical value as the time dimension data in the database index value, wherein the time numerical value includes a report time numerical value and / or a valid time numerical value. In at least one example, the space data item can be converted into a space numerical value and the time data item can be converted into a time numerical value at the same time. For example, the space numerical value includes a longitude numerical value, a latitude numerical value and an altitude numerical value, i.e., the longitude, latitude and altitude are all in numerical form. For example, the time numerical value includes a report time numerical value and a valid time numerical value, i.e., the report time and the valid time are both in numerical form.

[0114] In another embodiment, when creating the index value of the weather service data in the database based on the time data item and the space data item, the space data item is converted into a space value as the space dimension data in the index value of the database, wherein the space value includes a longitude value, a latitude value and / or an altitude value; and the time data item is converted into a time serial number as the time dimension data in the index value of the database, wherein the time serial number includes a report time serial number and / or a valid time serial number.

[0115] It should be noted that the index time dimension and the index space dimension of the database can be in any serial number form or value form as needed, and do not need to be absolutely consistent; for example, the serial number form can be used in part of the index, and the string form can also be used in part of the index, and the embodiments of the present disclosure do not make specific limitations in this regard.

[0116] Table 8 is a database storage structure of the database with the location identification tag as the database index according to at least one embodiment of the present disclosure.

[0117] Table 8 is a database storage structure of the database with the location identification tag as the database index according to at least one embodiment of the present disclosure.

[0118] Index Data 116_92&23.80&1000&2020052800&2020052901 ……

[0119] Since the time and space attributes corresponding to each piece of data are unique, the time and space attributes can form a unique location identification tag, and the location identification tag is used as a unique index value to replace the original multiple index values, so as to reduce the number of index matching during the query, thereby improving the query performance of the database.

[0120] For example, according to at least one embodiment of the present disclosure, the time data item and the space data item are arranged and combined and connected by a connection character to form a string, and thus the location identification tag is obtained. For example, the characters “&” are connected, so as to splice the multiple index values to form a string, and the string is the location identification tag. The generation mode of the location identification tag can adopt multiple forms of index value splicing, and the embodiments of the present disclosure do not make specific limitations in this regard. For example, the connection character can also be selected from other characters that will not cause data misreading, such as “$”, and the embodiments of the present disclosure do not make limitations in this regard.

[0121] At least one embodiment of the present disclosure also provides a weather data query method. The method is applied to query the weather data stored in the database according to the above embodiments. Similarly, the weather service data includes a time data item, a space data item and at least one weather element, the weather service data is stored in the database after data item compression, and the data item compression includes time compression or space compression.

[0122] The weather data query method can be deployed on a client, or distributed and deployed on a server side (or cloud side) and a personal terminal. For example, a query request can be initiated to the server side, the server side (or cloud side) connects a database and performs an operation of querying weather data, and the weather data is transmitted back to the personal terminal and output and displayed to show a query result. For another example, a query request can be initiated at the personal terminal and sent to the server side (or cloud side), the server side (or cloud side) queries weather data, and the weather data is transmitted back to the personal terminal and output and displayed to show a query result.

[0123] Figure 5 An example flowchart of a weather data query method provided for at least one embodiment of the present disclosure includes steps S501-S503.

[0124] Step S501, receiving a weather data query request.

[0125] The query request includes a time request and / or a space request. For example, the time request includes a time or a time period corresponding to weather service data to be queried, and the space request includes a geographical position of the weather service data to be queried.

[0126] Optionally, in at least one example, reference is made to the following description Figure 6 In the illustrated embodiment, the system includes at least one data interface server for converting an external query request into a query key for a database and returning a result of queried weather service data to a user. When a query request is received, data access can be distributed to different data interface servers in a load balancing manner, that is, the query request is distributed to a data interface server with a non-maximum user access amount according to the user access amount of the data interface server. Different data interface servers deploy the same data interface content, and the rules executed by the different data interface servers are completely the same. The load balancing manner can dynamically scale the interface performance when the user access amount is different, so as to avoid resource waste.

[0127] Step S502, generating a query key according to the query request and an index type of the database.

[0128] For example, according to at least one embodiment of the present disclosure, the database index includes a time dimension and a space dimension, and the database index includes a serial number form, a numerical form, and the like. The time request and the space request in the query request provide time information and space information of weather service data to be queried, and the information in the query request is converted to generate a corresponding query key according to the type of the database index and the index value generation manner.

[0129] For example, when the time dimension data of the database index value includes a time serial number, the time serial number corresponding to the time request nearest to the time point is found, the time serial number is taken as the time information of the query key, and the corresponding query key is generated. For example, in some examples, the time dimension of the database index is in the form of a serial number. In the database, the time dimension data includes a report start time serial number. When receiving a user request, the time point nearest to the time request in the user request is first found, such as the time request being July 3, 2020, 18:10, and the time dimension data being arranged according to whole hours, the whole hour nearest to the time request being July 3, 2020, 18:00; then the report start time serial number corresponding to the nearest whole hour, i.e., 15, is obtained; and finally, the report start time serial number 15 is taken as the time information of the query key, and the corresponding query key is generated.

[0130] For example, when the space dimension data of the database index value includes a grid serial number, the grid serial number corresponding to the space request nearest to the space point is found, the grid serial number is taken as the space information of the query key, and the corresponding query key is generated. For example, in some examples, the space dimension of the database index is in the form of a serial number. In the database, the space dimension data includes a latitude serial number and a longitude serial number, and the mapping method of the latitude serial number and the longitude serial number adopts a horizontal space grid mapping method. When receiving a user request, the space point nearest to the space request in the user request is first found, such as the longitude in the space request being 23.56876 and the latitude being 116.122456, and the longitude and the latitude in the horizontal space grid mapping method taking 0.1 as a step, the latitude value nearest to the space request being 23.6 and the longitude value nearest to the space request being 116.1 after rounding. Then, the grid serial number corresponding to the nearest longitude value and the nearest latitude value is obtained, for example, the serial number corresponding to the longitude value 116.1 being 124, and the serial number corresponding to the latitude value 23.6 being 21, that is, the grid serial number corresponding to the space request being 21 and 124. Finally, the grid serial numbers 21 and 124 are taken as the space information of the query key, and the corresponding query key is generated. For example, when the time dimension data of the database index value includes a time value, the time request is processed to a predetermined precision according to the index precision of the database, taken as the time information of the query key, and the corresponding query key is generated.

[0131] For example, when the space dimension data of the database index value includes a space value, the space request is processed to a predetermined precision according to the index precision of the database, taken as the space information of the query key, and the corresponding query key is generated.

[0132] For example, in some examples, the time dimension and the space dimension of the database index are in numerical form. In the space dimension, when the spatial index in the database is continuous at a certain precision, the spatial index can be performed by retaining the precision of the user's latitude and longitude. For example, in the database, the latitude data is 23.56, 23.57, 23.58,..., the longitude is 116.12, 116.13, 116.14,..., and the height is 1000, 2000, 3000,.... When receiving a user request, the user's spatial information can be classified to the corresponding precision, such as the user's longitude of 23.56876, latitude of 116.122456, and height of 1200 meters. The latitude and longitude are rounded to the hundredth place, which is 23.57 and 116.12, and the height is rounded to the thousandth place, which is 1000. In the time dimension, the user's time can be mapped to the time precision string consistent with the database according to the time required by the user to query, such as the time precision in the database being in hours, and the user's time being mapped to hours. For example, the user's time is May 28, 2020, 16:38, which can be omitted according to the business characteristics, or the nearest whole time is found, that is, the mapping is 2020052816 or 2020052817. In this way, the space dimension and the time dimension are converted into a complete string information to obtain a query key, and then the corresponding index in the database is found to complete data query.

[0133] For example, the spatial request and / or the time request are arranged and connected by a connection character, and a string is formed by splicing in the same way as generating the position identification tag. The corresponding query key is generated by using the string.

[0134] Step S503, querying the database according to the query key to obtain the meteorological service data stored corresponding to the query key from the database.

[0135] For example, when the meteorological service data is stored after data space compression, the extracted meteorological service data is decompressed into a normal string by using the same method as data space compression to obtain the meteorological service data before data space compression.

[0136] For example, in one example, the space dimension of the database index is set to two dimensions, including longitude and latitude. The space dimension data is a grid serial number, including a longitude serial number and a latitude serial number. The time dimension of the data index is set to include the time of issuance. The time dimension data is in numerical form, including the time of issuance value. The time dimension and the space dimension cooperate to establish a three-dimensional index, that is, the index includes longitude, latitude, and time of issuance. The data item is compressed in the time and space dimensions, that is, the meteorological elements with different data at different height layers are represented by newly created elements with height identifiers in the space, and all valid time data is spliced into a long string for compression storage in the time.

[0137] Before storage, the compressed meteorological service data is further compressed by using the zlib compression method, and the compressed meteorological service data is stored in the database.

[0138] Correspondingly, when the data interface queries, first, according to the load balancing configuration, the access request is distributed to the data interface server with the least access traffic; then, the latitude and longitude information in the spatial request in the query request is converted into the grid serial number according to the mapping method, and the time information in the time request is converted into a string; finally, according to the three-dimensional index, the nearest index value is found as the spatial information and time information of the query key, the corresponding query key is generated, the corresponding meteorological service data is extracted, and the meteorological service data is decompressed by using the zlib form to obtain the meteorological service data before data space compression.

[0139] In this example, the database simultaneously uses time compression and space compression, reduces the index from five dimensions to three dimensions, further improves the data compression capability, greatly reduces the number of data records, and significantly improves the read-write performance of the database. The load balancing distribution of access requests can dynamically scale the interface performance when the user access volume is different, so as to avoid resource waste. In addition, the meteorological service data after data item compression is compressed in data space, the long string is compressed into a shorter string, and the purpose of saving storage space is achieved.

[0140] Figure 6 A schematic block diagram of an architecture of a meteorological data storage and query system according to at least one embodiment of the present disclosure is shown.

[0141] For example, in at least one embodiment of the present disclosure, the meteorological data storage and query system includes meteorological data storage, meteorological data query, and a database.

[0142] For example, the meteorological data storage is configured to obtain a plurality of meteorological service data, compress the meteorological service data in data items, and store the meteorological service data after data item compression in the database, wherein the data item compression includes time compression or space compression. For example, the meteorological data storage can implement the meteorological data storage method provided in the foregoing embodiments, which will not be repeated here.

[0143] For example, the weather data query is configured to receive a weather data query request, generate a query key according to the query request and an index value type of the database, query the database according to the query key, and obtain weather service data stored in the database corresponding to the query key; wherein the weather service data includes time data items, space data items, and at least one weather element, and the weather service data is stored in the database after being compressed according to data items, and the data item compression includes time compression or space compression. For example, the weather data storage can implement the weather data query provided in the foregoing embodiments, and details are not described herein.

[0144] For example, the database is signal connected with the weather data storage and the weather data query, and the database is a non-relational database and is used to store weather service data.

[0145] Figure 7 A schematic block diagram of a weather data storage device provided by at least one embodiment of the present disclosure is shown. For example, as shown in the figure, the weather data storage device 1000 includes a processor 1010 and a memory 1020. The weather data storage device can be deployed on one device or distributed on multiple devices, and the present embodiment does not limit this. Figure 7

[0146] The memory 1020 includes one or more computer program modules 1021. The one or more computer program modules 1021 are stored in the memory 1020 and configured to be executed by the processor 1010, and the one or more computer program modules 1021 include instructions for executing any weather data storage method provided by at least one embodiment of the present disclosure, which, when executed by the processor 1010, can execute one or more steps in the weather data storage method provided by at least one embodiment of the present disclosure. The memory 1020 and the processor 1010 can be interconnected through a bus system and / or other forms of connection mechanism (not shown).

[0147] For example, the memory 1020 and the processor 1010 can be arranged at a server end (or cloud end) and used to execute one or more steps in the weather data storage method described above. Figure 1 、 Figure 2 、 Figure 3 and Figure 5

[0148] For example, the processor 1010 can be a central processing unit (CPU), a digital signal processor (DSP), or other forms of processing units with data processing capability and / or program execution capability, such as a field programmable gate array (FPGA), etc.; for example, the central processing unit (CPU) can be an X86 or ARM architecture, etc. The processor 1010 can be a general-purpose processor or a special-purpose processor, and can control other components in the device 1000 to perform desired functions. ​​

[0149] For example, the memory 1020 can include any combination of one or more computer program products which can include various forms of computer-readable storage media, for example, volatile memory and / or non-volatile memory. Volatile memory, for example, can include random access memory (RAM), and / or a cache, etc. Non-volatile memory, for example, can include read-only memory (ROM), hard disks, erasable programmable read-only memory (EPROM), compact disc read-only memory (CD-ROM), USB memory, flash memory, etc. One or more computer program modules 1021 can be stored on the computer-readable storage media, and the processor 1010 can run the one or more computer program modules 1021 to implement various functions of the apparatus 1000. Various application programs and various data used and / or generated by the application programs, for example, meteorological service data, etc. can also be stored in the computer-readable storage media.

[0150] It should be noted that, for the sake of clarity and simplicity, the disclosure embodiments do not give all the constituent units of the meteorological data storage apparatus 1000. To achieve the necessary functions of the meteorological data storage apparatus 1000, those skilled in the art can provide and set other constituent units not shown according to specific needs, and the embodiments of the disclosure do not limit this. For example, the meteorological data storage apparatus 1000 can also include a bus, a wireless or wired communication port, an input / output device, etc.

[0151] The structure of the meteorological data query apparatus is the same as that of the meteorological data storage apparatus in the above embodiments, and will not be described here. The specific functions and technical effects of the meteorological data query apparatus in different embodiments can refer to the specific functions and technical effects of the meteorological data query method provided by the embodiments of the disclosure, and will not be described here.

[0152] Figure 8 An exemplary scenario diagram of a meteorological data storage and query system provided by at least one embodiment of the disclosure is shown. As shown in the figure, Figure 8 The meteorological data storage and query system 300 can include a user terminal 310, a network 320, a server 330, and a database 340.

[0153] For example, the user terminal 310 initiates external access and submits a query request. For example, the user 310 can be Figure 8 the computer 310-1, the portable terminal 310-2 shown in the figure. It can be understood that the user terminal can also be any other type of electronic device capable of performing data reception, processing and display, which can include but is not limited to a desktop computer, a notebook computer, a tablet computer, a smart home device, a wearable device, a vehicle-mounted electronic device, a medical electronic device, etc.

[0154] For example, the network 320 can be a single network, or a combination of at least two different networks. For example, the network 320 can include, but is not limited to, one or a combination of several of a local area network, a wide area network, a public network, a private network, the Internet, a mobile communication network, and the like. In some other embodiments, custom and / or proprietary data communication technologies can also be used instead of or in addition to the above-mentioned data communication networks.

[0155] For example, the server 330 is configured to implement the meteorological data storage method or the meteorological data query method provided by the foregoing embodiments. The server 330 can be a single server (or cloud), or a server group (or cloud), and the servers in the server group are connected through a wired network or a wireless network. The wired network can communicate through twisted pair, coaxial cable or optical fiber transmission, and the wireless network can communicate through 3G / 4G / 5G mobile communication network, Bluetooth, Zigbee or WiFi. The type and function of the network are not limited in the present disclosure. The server group can be centralized, such as a data center, or distributed. The server can be local or remote. For example, the server 330 can be a general-purpose server or a special-purpose server, and can be a virtual server or a cloud server.

[0156] For example, the database 340 can be used to store various data, such as meteorological service data, generated, utilized and output from the user terminal 310 and the server 330. The database 340 can be connected or communicated with the server 330 or a part of the server 330 via the network 320, or directly connected or communicated with the server 330, or connected or communicated with the server 330 via a combination of the above two manners. In some embodiments, the database 340 can be a separate device. In some other embodiments, the database 340 can also be integrated into at least one of the user terminal 310 and the server 340. For example, the database 340 can be arranged on the user terminal 310, or arranged on the server 340. For example, the database 340 can also be distributed, and a part of the database 340 is arranged on the user terminal 310, and another part of the database 340 is arranged on the server 340.

[0157] For example, in one example, first, the user terminal 310 (e.g., the user's cell phone) can send a request data to the server 330 via the network 320 or other techniques (e.g., Bluetooth communication, infrared communication, etc.). Next, the server 330 obtains the query request of the current user in response to the request data, and then, the server 330 obtains the query key according to the database index type based on the query request. Then, the server 330 sends the corresponding weather service data of the database to the user terminal 310 via the network 320 or other techniques (e.g., Bluetooth communication, infrared communication, etc.) based on the query key. The user terminal 310 displays the weather service data from the server 330 after receiving the weather service data.

[0158] In this disclosure, the term "a plurality of" refers to two or more, unless otherwise expressly specified.

[0159] Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the features disclosed herein. It is intended that the specification and examples be considered as exemplary only, with the true scope and spirit of the disclosure being indicated by the following claims.

[0160] It will be understood that the present disclosure is not limited to the precise structures herein described and illustrated in the drawings, and that various modifications and changes can be made without departing from its scope. The scope of the present disclosure is limited only by the claims that follow.

Claims

1. A method for storing meteorological data, comprising: obtaining a plurality of meteorological service data, wherein each of the meteorological service data comprises a time data item, a space data item, and at least one meteorological element; data item compressing the meteorological service data; storing the data item compressed meteorological service data into a database; wherein the data item compressing comprises time compressing and space compressing; wherein storing the data item compressed meteorological service data into the database comprises: creating an index value of the meteorological service data in the database based on the time data item and the space data item, storing the index value and the at least one meteorological element into the database, wherein the index value of the database comprises time dimension data and space dimension data, the space dimension data is based on the space data item, and the time dimension data is based on the time data item; the time compressing comprises: when the time data item comprises a report time, merging a first number of meteorological service data with the same space data item and the same report time in the plurality of meteorological service data representing forecast data into a same new meteorological service data, wherein the time data item of the forecast data comprises a report time and a valid time, the report time is a forecast start time, and the valid time indicates a valid time limit of the forecast data; when the time data item comprises a live time, merging a first number of meteorological service data with the same space data item in the plurality of meteorological service data representing live data into a same new meteorological service data, wherein the time data item of the live data comprises a live time, and the live time is an observation time point of obtaining the live data; wherein the space dimension data in the index value of the database comprises longitude and latitude, the space data item comprises longitude, latitude, and height, a second number of meteorological service data in the plurality of meteorological service data comprises a first type of meteorological element and has the same longitude and latitude and the same time dimension data, and the second number is greater than 1, the first type of meteorological element of the second number of meteorological service data respectively has different data corresponding to different heights at the same longitude and latitude, the space compressing comprises: creating a new element with the different height markers according to the first type of meteorological element of each of the second number of meteorological service data; merging the second number of meteorological service data into a same new meteorological service data, wherein the same new meteorological service data obtained by merging comprises the new element created according to each of the second number of meteorological service data, wherein the same new meteorological service data comprises all meteorological elements in the first number or the second number of meteorological service data, and the first number is greater than 1.

2. The meteorological data storage method of claim 1, wherein, The database comprises a non-relational database for storing the meteorological service data.

3. The meteorological data storage method of claim 2, wherein, merging the first number of meteorological service data into a same new meteorological service data comprises: The meteorological elements of the first number of meteorological service data are sequentially spliced in time sequence respectively to obtain the same new meteorological service data.

4. The meteorological data storage method according to any one of claims 1 to 3, wherein, Based on the time data item and the space data item, creating the index value of the meteorological service data in the database includes: Converting the space data item into a grid serial number as the spatial dimension data in the database index value, wherein the grid serial number includes a longitude serial number, a latitude serial number, and / or an altitude serial number; and / or Converting the time data item into a time serial number as the time dimension data in the database index value, wherein the time serial number includes a report time serial number and / or a valid time serial number.

5. The meteorological data storage method according to any one of claims 1 to 3, wherein, Based on the time data item and the space data item, creating the index value of the meteorological service data in the database includes: Converting the space data item into a spatial numerical value as the spatial dimension data in the database index value, wherein the spatial numerical value includes a longitude numerical value, a latitude numerical value, and / or an altitude numerical value; and / or Converting the time data item into a time numerical value as the time dimension data in the database index value, wherein the time numerical value includes a report time numerical value and / or a valid time numerical value.

6. The meteorological data storage method according to any one of claims 1 to 3, wherein, Based on the time data item and the space data item, creating the index value of the meteorological service data in the database includes: Converting the space data item into a grid serial number as the spatial dimension data in the database index value, wherein the grid serial number includes a longitude serial number, a latitude serial number, and / or an altitude serial number; and converting the time data item into a time numerical value as the time dimension data in the database index value, wherein the time numerical value includes a report time numerical value and / or a valid time numerical value; or Converting the space data item into a spatial numerical value as the spatial dimension data in the database index value, wherein the spatial numerical value includes a longitude numerical value, a latitude numerical value, and / or an altitude numerical value; and converting the time data item into a time serial number as the time dimension data in the database index value, wherein the time serial number includes a report time serial number and / or a valid time serial number.

7. The meteorological data storage method according to any one of claims 1 to 3, wherein, Based on the time data item and the space data item, creating the index value of the meteorological service data in the database includes: Splicing the time data item and the space data item to form a location identification tag as the database index value.

8. The meteorological data storage method of claim 7, wherein, Splicing the time data item and the space data item to form a location identification tag includes: Arranging and combining the time data item and the space data item and connecting them with a connection character to form a character string, thereby obtaining the location identification tag.

9. The meteorological data storage method according to any one of claims 1-3, before storing the data item compressed meteorological service data into the database, further comprising: further data space compression on the data item compressed meteorological service data, wherein storing the data item compressed meteorological service data into the database includes: storing the data space compressed meteorological service data into the database.

10. The meteorological data storage method of claim 9, wherein, The data space compression includes: The meteorological elements in the meteorological service data are compressed into short strings and stored in a database.

11. A meteorological data query method, comprising the following steps: receiving a meteorological data query request, wherein the query request comprises a time request and / or a space request; generating a query key according to the query request and an index value type of the database; querying the database according to the query key to obtain meteorological service data stored in the database corresponding to the query key; wherein the meteorological service data comprises time data items, space data items and at least one meteorological element, the meteorological service data is stored in the database after data item compression, the data item compression comprises time compression and space compression; the time compression comprises: when the time data items comprise a report time, merging a first number of meteorological service data with the same space data items and the same report time in the meteorological service data representing forecast data into a new meteorological service data, wherein the time data items of the forecast data comprise a report time and a valid time, the report time is a forecast start time, and the valid time indicates the validity of the forecast data; when the time data items comprise a live time, merging a first number of meteorological service data with the same space data items in the meteorological service data representing live data into a new meteorological service data, wherein the time data items of the live data comprise a live time, and the live time is an observation time point of obtaining the live data; wherein the space dimension data in the database index value comprises longitude and latitude, the space data items comprise longitude, latitude and height, and the meteorological elements of a second number of meteorological service data in the multiple meteorological service data comprise a first type of meteorological element and have the same longitude and latitude and the same time dimension data, the second number is greater than 1, the first type of meteorological element of the second number of meteorological service data respectively has different data corresponding to different heights at the same longitude and latitude, the space compression comprises: creating a new element with the different height markers according to the first type of meteorological element of each of the second number of meteorological service data; merging the second number of meteorological service data into a new meteorological service data, wherein the new meteorological service data obtained by merging comprises the new elements created according to each of the second number of meteorological service data, wherein the new meteorological service data comprises all meteorological elements in the first number or the second number of meteorological service data, and the first number is greater than 1.

12. The weather data query method of claim 11, wherein, The index value of the database comprises time dimension data and space dimension data, the database index value comprises a serial number form, the generation of the query key comprises: when the time dimension data of the database index value comprises a time serial number, finding a time serial number corresponding to a nearest time point of the time request, taking the time serial number as time information of the query key, and generating a corresponding query key; or When the spatial dimension data of the database index value comprises a grid serial number, the grid serial number corresponding to the spatial request is found, and the grid serial number is taken as the spatial information of the query key to generate the corresponding query key.

13. The weather data query method of claim 11, wherein, The index value of the database comprises time dimension data and spatial dimension data, and the database index comprises numerical values, The generation of the query key comprises: When the time dimension data of the database index value comprises a time numerical value, the time request is processed to a predetermined precision according to the database index precision, and the time information of the query key is taken as the corresponding query key; or When the spatial dimension data of the database index value comprises a spatial numerical value, the spatial request is processed to a predetermined precision according to the database index precision, and the spatial information of the query key is taken as the corresponding query key.

14. The weather data query method of claim 11, wherein, The database index is a location identification tag, The generation of the query key comprises: The spatial request and / or the time request are arranged and connected by a connection character, and a string is formed by splicing in the same way as the location identification tag, and the corresponding query key is generated by using the string.

15. The weather data query method according to any one of claims 11-14, after receiving the weather data query request, further comprising: According to the user access flow of the plurality of interface servers for the database, the weather data query request is distributed to the data interface server with the smallest user access flow.

16. The method of claim 11-14, wherein, The weather service data is data space compressed, The obtaining of the stored weather service data corresponding to the query key comprises: The data space compressed weather service data is decompressed to obtain the weather service data before data space compression.

17. A weather data storage device, comprising: a processor; a memory having a computer program stored thereon, wherein the computer program is executed by the processor to perform the weather data storage method according to any one of claims 1-10.

18. A weather data query device, comprising: a processor; a memory having a computer program stored thereon, wherein the computer program is executed by the processor to perform the weather data query method according to any one of claims 11-16.

Citation Information

Patent Citations

  • Real-time database based meteorological element data organization type-in and querying method

    CN101984421A

  • Distributed time series geographic information service system and method

    CN107066511A

  • Grid-based spatial data distributed storage and retrieval method and system

    CN107423422A

  • Meteorological data preprocessing method and device, computer equipment and storage medium

    CN110928849A