Summary of the invention
The purpose of the present invention is to provide a kind of for the three-dimensional data coding of magnanimity marine environment data management and storage
Method can quickly and accurately navigate to any one region of ocean space.
A kind of three-dimensional data coding and storage method for magnanimity marine environment data management, specifically includes following step
It is rapid:
Step 1, longitude, latitude, the depth bounds for obtaining marine environment data to be processed;
Step 2, setting carry out resolution ratio required by subdivision to pending data;
Step 3 carries out subdivision processing group to temperature, salinity, density, the velocity of sound, ocean current environmental element data according to resolution ratio
At data acquisition system, each data acquisition system includes the various environmental element information of minimum unit;
Step 4 encodes each data acquisition system using encoding scheme, as Spatial Cable quotation marks;
Step 5, will be in call number and the corresponding deposit database of data acquisition system comprising environmental element information.
A kind of three-dimensional data coding and storage method for magnanimity marine environment data management, according to data set
Information description, is defined as i for step 2 intermediate-resolution, wherein i can indicate range at 1/32 ° to 1 ° as unit of spending.
A kind of three-dimensional data for magnanimity marine environment data management encodes and storage method, specific in step 3
Environmental data include temperature, salinity, density, the velocity of sound, ocean current horizontal component, ocean current vertical component this 6 kinds of basic ocean essentials
Value.
A kind of three-dimensional data for magnanimity marine environment data management encodes and storage method, three-dimensional in step 4
Encoding scheme is the wherein two-dimensional encoded part of longitude and latitude 8 by longitude and latitude is two-dimensional encoded and the coding of depth dimension is constituted, depth
Dimension 2, collectively constitutes 10 position digital codings, coded format D0D1D2d3D4D5D6d7D8D9, wherein D expression decimal values,
The d resolution ratio according to setting can be the numerical value such as the decimal system, hexadecimal, duotricemary notation.
A kind of three-dimensional data coding and storage method for magnanimity marine environment data management, step 4 are specifically wrapped
Include following steps:
Step 4.1 is defined based on latitude and longitude coordinates space and the two-dimensional encoded part of resolution ratio pair warp and weft degree, specific to count
Calculation process is as follows:
Geospatial location is projected into single quadrant rectangular coordinate system, if abscissa value is x, transformed vertical seat after transformation
Scale value is y, wherein x=lat1+90=132.125, y=lon1+180=280.25;
D0It represents the longitude first order: taking the hundreds D of y0=[y ÷ 100]=2;
D1It represents the longitude second level: taking the tens D of y1=[y-100 × D0]=8;
D2It represents the longitude third level: taking the units D of y2=[y-100 × D0-10×D1]=0;
d3It represents longitude resolution ratio: d is calculated according to resolution ratio i3=[(y-100 × D0-10×D1-D2) ÷ i]=2, similarly,
The same above formula when resolution ratio takes other values, when i < 1/10 °, d3It is indicated using hexadecimal or duotricemary notation number;
D4It represents the latitude first order: taking the hundreds D of x0=[x ÷ 100]=1;
D5It represents the latitude second level: taking the tens D of x5=[x-100 × D4]=3;
D6It represents the latitude third level: taking the units D of x6=[x-100 × D4-10×D5]=2;
d7Represent latitude resolution ratio: d7=[(x-100 × D4-10×D5-D6) ÷ i]=1, similarly, when resolution ratio takes other
Same above formula when value, when i < 1/10 °, d7It is indicated using hexadecimal or duotricemary notation number;
Step 4.2 is defined depth dimension coded portion based on depth, different from common three-dimensional uniform grid point
Cloth, ocean space data are unevenly distributed in the horizontal direction, and coastal waters space of planes Marine Environmental Elements change greatly, and at deep-sea
The variation of space Marine Environmental Elements is smaller;And the ocean depth very little for longitude and latitude distance, so depth dimension encodes
It is divided according to the number of plies, D8D9For two decimal numbers, data level is represented, indicates 0~99 layer.
A kind of three-dimensional data coding and storage method for magnanimity marine environment data management, step 5 are specifically wrapped
Include following steps:
Step 5.1 establishes ocean according to the source of data and analyzes product database again;
Step 5.2, in each database, establish two kinds of table respectively, a seed type is metadata table, another
For specific tables of data, tissue divides several tables of data as unit of the time.
Step 5.3, in each specific tables of data, using the encoded radio being calculated by 3-dimensional encoding as call number,
Temperature in one-to-one data acquisition system therewith, salinity, density, the velocity of sound, ocean current horizontal component, ocean current vertical component element is incited somebody to action to make
For each attribute value, two-dimensional table is established, and sets major key index for ID value.
The beneficial effects of the present invention are:
The 3-dimensional encoding method of ocean space data provided by the present invention can be based on it to global ocean environmental data
Affiliated spatial position carries out universal formulation, and establishes concordance list to the data acquisition system marked off, and this method has unified global sea
The storage mode of foreign environmental data, and the data set of different resolution can be provided according to user demand, reduce data redundancy,
Improve the utilization rate of data.On the basis of above-mentioned 3-dimensional encoding method, data managing method provided by the present invention is used
Marine environment data is stored, since call number is directly corresponding with data acquisition system, passes through index fast searching number
According to precise positioning is to specified spatial dimension, to be conducive to extract the data efficient in specified region.
Specific embodiment
The present invention is described further with reference to the accompanying drawing.
The three-dimensional data coding extracted for ocean space data proposed by the invention and storage method main thought are:
Subdivision is carried out to initial data to be processed using the resolution ratio of setting, obtains a series of numbers comprising all Ocean environment informations
According to set;Data acquisition system is encoded using the three-dimensional data encoding scheme of design, is denoted as call number;By call number and data
Set corresponds, and design storage organization saves in the database, is believed using specified marine environment of the call number to specified region
Breath extracts.
The raw data set that example of the present invention uses is distributed across E99 ° to E150 ° of longitude range, latitude scope N-
10 ° to N52 °, 0 layer to 49 layers of depth bounds, time range be 1 day 0 January in 1988 of space-time when 31 days 21 December in 2017
Range, comprising temperature, salinity, density, the velocity of sound, ocean current horizontal component, ocean current vertical component element, resolution ratio is 1/8 °
Such a raw data set.
It as shown in Fig. 1, is ocean space subdivision volume elements schematic diagram;Attached drawing 2 is of the invention based on three-dimensional data coding
Data partition pretreatment process figure;Attached drawing 3 is the database metadata table figure that the present invention establishes;Attached drawing 4 is that the present invention establishes
The specific tables of data figure of database.
One, the step of 3-dimensional encoding scheme of the invention and data prediction, is described in detail below with reference to Fig. 2:
Step 1, longitude, latitude, the depth bounds for obtaining marine environment data to be processed;
For marine environment data, it includes certain space range informations, according to the property file or letter of initial data
Breath description, obtains its space-time unique.If longitude range variable is lon1 and lon2, latitude scope variable is lat1 and lat2, deep
Degree bound variable is h1 and h2, and time range variable is time1 and time2;
Step 2, setting carry out resolution ratio required by subdivision to pending data;
It is described according to the information of data set, resolution ratio is defined as i, wherein i can indicate range 1/ as unit of spending
32 ° to 1 °.It can be by the description degree of being converted to of other unit in actual application.I=1/8 ° in this example;
Step 3 carries out subdivision processing group to temperature, salinity, density, the velocity of sound, ocean current environmental element data according to resolution ratio
At data acquisition system, each data acquisition system includes the various environmental element information of minimum unit;
Specific environmental data includes temperature, salinity, density, the velocity of sound, ocean current horizontal component, this 6 kinds of ocean current vertical component
The value of basic ocean essential, if temperature variable is temperature, salinity variable is salinity, and density variables are
Density, velocity of sound variable are soundvelocity, and ocean current horizontal component is u, and ocean current vertical component is v.Choose ocean space
It is described in detail for certain point.For the point A concentrated for example, by using initial data, the spatial position of A point is longitude
E100.25 °, N42.125 ° of latitude, the 0th layer of depth, when the time is on September 27,03 2016, temperature value 20.0417, salinity
Value is 34.0927, density value 1021.6816, acoustic velocity value 1520.9167, and ocean current horizontal component is 9999.0000, ocean current
Vertical component is 9999.0000.Then according to above-mentioned definition, lon1=100.25, lat1=42.125, h1=0, time1=
2016092703, temperature=20.0417, salinity=34.0927, density=1520.9167,
Soundvelocity=1021.6816, u=9999.0000, v=9999.0000;
Can similarly subdivision be carried out to other spatial position points that data are concentrated and integration is handled;
Step 4 encodes each data acquisition system using encoding scheme, as Spatial Cable quotation marks;
3-dimensional encoding scheme of the invention is by longitude and latitude is two-dimensional encoded and the coding of depth dimension is constituted;Wherein longitude and latitude
Two-dimensional encoded part 8, collectively constitutes 10 position digital codings by depth dimension 2.If coded format is D0D1D2d3D4D5D6d7D8D9,
Encoded radio is set as dm, calculation formula are as follows:
Dm=1000000000 × D0+100000000×D1+10000000×D2+1000000×d3+100000×D4+
10000×D5+1000×D6+100×d7+10D8+D9
Wherein D indicates decimal value, and d can be the decimal system, hexadecimal, duotricemary notation number according to the resolution ratio of setting
Value.
WhenWhen, resolution bits d is indicated using decimal integer;When such as i=1/8 °, d selectable value 0,1,2,3,
4,5,6,7,8,9;
WhenWhen, resolution bits d is indicated using hexadecimal integers;When such as i=1/12 °, d selectable value 0,1,
2,3,4,5,6,7,8,9,A,B;
WhenWhen, resolution bits d is indicated using hexadecimal integers;When such as i=1/20 °, d selectable value 0,1,
2,3,4,5,6,7,8,9,A,B,C,D,E,F,G,H,J,K;
Longitude and latitude is two-dimensional encoded to be based partially on latitude and longitude coordinates space and resolution ratio is defined;By taking sampled point A as an example, tool
Body calculating process is as follows:
Geospatial location is projected into single quadrant rectangular coordinate system, if abscissa value is x, transformed vertical seat after transformation
Scale value is y, wherein x=lat1+90=132.125, y=lon1+180=280.25;
D0It represents the longitude first order: taking the hundreds D of y0=[y ÷ 100]=2;
D1It represents the longitude second level: taking the tens D of y1=[y-100 × D0]=8;
D2It represents the longitude third level: taking the units D of y2=[y-100 × D0-10×D1]=0;
d3It represents longitude resolution ratio: d is calculated according to resolution ratio i3=[(y-100 × D0-10×D1-D2) ÷ i]=2, similarly,
The same above formula when resolution ratio takes other values, when i < 1/10 °, d3It is indicated using hexadecimal or duotricemary notation number;
D4It represents the latitude first order: taking the hundreds D of x0=[x ÷ 100]=1;
D5It represents the latitude second level: taking the tens D of x5=[x-100 × D4]=3;
D6It represents the latitude third level: taking the units D of x6=[x-100 × D4-10×D5]=2;
d7Represent latitude resolution ratio: d7=[(x-100 × D4-10×D5-D6) ÷ i]=1, similarly, when resolution ratio takes other
Same above formula when value, when i < 1/10 °, d7It is indicated using hexadecimal or duotricemary notation number.
Depth dimension coded portion is defined based on depth.It is distributed different from common three-dimensional uniform grid, ocean space
Data are unevenly distributed in the horizontal direction, and coastal waters space of planes Marine Environmental Elements change greatly, and in deep-sea space ocean ring
The variation of border element is smaller;And the ocean depth very little for longitude and latitude distance.In summary consider, depth dimension encodes root
It is divided according to the number of plies, D8D9For two decimal numbers, data level is represented, can indicate 0~99 layer.D in this example8=0, D9=0.
The then dm=2802132100 of sampled point A;
Shown in example as above, uniquely tagged is carried out to each data acquisition system by three-dimensional data encoding scheme, coding is made
For the call number of each set.
Above step realizes the pretreatment and tri-bit encoding to marine environment initial data, is global ocean spatial data
Organization of unity and management lay a good foundation.
Two, the unified storage management of data.
Above-mentioned steps have determined the call number of subdivision data acquisition system, for each subdivision data set, by itself and call number one
One is corresponding, constitutes an information of storage ocean space data file, by obtained call number and includes environmental element information
It is managed in the corresponding deposit database of data acquisition system.The present invention devises a kind of data file and unifies storage scheme, specific to walk
It is rapid as follows:
Step 1 establishes ocean according to the source of data and analyzes product database again.
It is as follows using sql like language creation database by taking MySQL database as an example:
CREATE DATABASE reanalysisdata;
Step 2, in each database, establish two kinds of table respectively.One seed type is metadata table, for illustrating
Some description informations such as data type, storage format in this library, the understanding convenient for user to database Global Information;It is another
For specific tables of data, tissue divides several tables of data as unit of the time, and table is named as MEDyyyymmddhh, and wherein MED is sea
The english abbreviation of foreign environmental data Marine Environmental Data, yyyy indicate year, and mm indicates that the moon, dd indicate day, hh
When expression, such as by May 17,03 2016 when all marine environment datas be stored in a tables of data, table is named as
MED2016051703.Every 3 hours of 30 years primary specific tables of data totally 87600 (30* can be created according to raw data set
365*8) open.
It is as follows to create metadata table example:
Wherein cust_id is from increasing number, and cust_range is space-time unit information, and cust_element is environmental element
Information, cust_i are resolution ratio, and table content is as shown in Figure 3;
Step 3, in each specific tables of data, will be with using the dm value being calculated by 3-dimensional encoding as call number
One-to-one data acquisition system in temperature, salinity, density, the velocity of sound, ocean current horizontal component, ocean current vertical component element as each
Attribute value establishes two-dimensional table, and sets major key index for ID value, to accelerate the search speed of data;
It is as follows to create specific tables of data example MED2016051703:
Wherein dm is three-dimensional data coding, and temperature is temperature value, and salinity is salt angle value, and density is close
Angle value, soundvelocity are acoustic velocity value, and u and v are ocean current level, vertical direction component;
It is as follows that factor data is imported into table:
LOAD DATA INFILE'E:/dmfile/zuobiaodmt.txt'INTO TABLE MED2016051703
fields terminated by','
lines terminated by'\r\n'
(dm,temperature,salinity,density,soundvelocity,u,v);
Based on above scheme, the Marine Environmental Elements data of i.e. extractable designated position are needed according to user.
The invention proposes a kind of 3-dimensional encoding methods of ocean space data, and to data based on this coding method
Unified organization and administration are carried out, data storage scheme is devised.On the one hand global ocean environmental data can be based on belonging to it
Spatial position carry out universal formulation, convenient for the accurate positionin of Ocean environment information;On the other hand global ocean environment has been unified
The storage mode of data can reduce data redundancy, index is avoided to repeat, improve search efficiency.
The above is merely preferred embodiments of the present invention, in summary, it is not intended to limit the scope of the present invention.
All within the spirits and principles of the present invention, any modification, equivalent replacement, improvement and so on should be included in of the invention
Within protection scope.