CN107679093A - A kind of data query method and device - Google Patents
A kind of data query method and device Download PDFInfo
- Publication number
- CN107679093A CN107679093A CN201710801101.2A CN201710801101A CN107679093A CN 107679093 A CN107679093 A CN 107679093A CN 201710801101 A CN201710801101 A CN 201710801101A CN 107679093 A CN107679093 A CN 107679093A
- Authority
- CN
- China
- Prior art keywords
- metadata
- target
- data
- intermediate layer
- client
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/10—File systems; File servers
- G06F16/14—Details of searching files based on file metadata
- G06F16/144—Query formulation
Abstract
The embodiment of the present invention provides a kind of data query method and device, for solving the high technical problem of client development cost in the prior art.Methods described includes:Intermediate layer receives the inquiry request that client is sent, and the inquiry request includes the storage format of querying condition and target data;Wherein, the querying condition is used for the constraints for defining the metadata of target data;The intermediate layer obtains the target metadata for meeting the querying condition, and determines to read the target read command of the target data according to the storage format of data and the mapping of read command;Intermediate layer data according to corresponding to the target read command from the accumulation layer reading target metadata of determination, and data corresponding to the target metadata are sent to the client, packet corresponding to the target metadata contains the target data.
Description
Technical field
The present invention relates to field of computer technology, more particularly to a kind of data query method and device.
Background technology
In existing distributed memory system, the storage format of the data in accumulation layer can have polytype, such as
Parquet forms, orc forms, RCFile forms etc., and client has to use in the target data in reading accumulation layer
The program code being adapted with the storage format of target data could successfully read target data.In order to realize client to depositing
The access of the data of reservoir difference storage format, the way of prior art are:All opened for each storage format for client
Send out a set of and be adapted program code, and client switching when reading the target data of different storage formats uses variety classes journey
Sequence code, client development cost are high.
The content of the invention
The present invention provides a kind of data query method and device, is deposited for solving client in the prior art in reading difference
Need to switch when storing up the target data of form to use variety classes program code, the high technical problem of client development cost.
First aspect of the embodiment of the present invention provides a kind of data query method, including:
Intermediate layer receives the inquiry request that client is sent, and the inquiry request includes depositing for querying condition and target data
Store up form;Wherein, the querying condition is used for the constraints for defining the metadata of target data;
The intermediate layer obtains the target metadata for meeting the querying condition, and
Determined to read the target read command of the target data according to the mapping of the storage format of data and read command;
Intermediate layer data according to corresponding to the target read command from the accumulation layer reading target metadata of determination, and
Data corresponding to the target metadata are sent to the client, packet corresponding to the target metadata contains the mesh
Mark data.
In such scheme, inquiry request that client is sent according to from predetermined protocol to intermediate layer, intermediate layer receives client
After inquiry request of the end according to predetermined protocol transmission, data corresponding to the inquiry request are read from accumulation layer, then by institute
State data corresponding to inquiry request and return to client, realize that client obtains target data from accumulation layer with this.Client pair
The access of data in accumulation layer is realized indirectly by intermediate layer, is directly interacted different from client in the prior art with accumulation layer
Mode, this programme can not carry out program code in the target data of different storage formats in inquiring about accumulation layer to client
Species switches, and can need not be directed to each storage format in exploitation client phase is all adapted for client exploitation is a set of
Program code, reduce client development cost.
Optionally, the intermediate layer obtains the target metadata for meeting the querying condition, including:The intermediate layer obtains
Metadata for file where indicating the target data;Or the intermediate layer is obtained for indicating the target data place
The metadata of row group;Or the intermediate layer obtains the metadata for page (page) where indicating the target data.Pass through this
Mode, intermediate layer can position according to the target metadata got to the position where target data, different from existing
Technology can only at most navigate to row group level, and the manner can effectively be reduced the registration of target data to page levels
The loading capacity of data and the invalid computation amount of client, lift efficiency data query.
Optionally, the intermediate layer obtains the target metadata for meeting the querying condition, including:The intermediate layer is from institute
State accumulation layer and obtain the target metadata for meeting the querying condition;And/or the member that the intermediate layer stores from the intermediate layer
The target metadata for meeting the querying condition is obtained in data.By the manner, intermediate layer, which can obtain, meets the inquiry
The target metadata of condition, and then access of the client to the data in accumulation layer is realized indirectly by intermediate layer,
Each storage format need not be directed in exploitation client phase by alloing all is adapted program for client exploitation is a set of
Code, reduce client development cost.
Optionally, methods described also includes:The intermediate layer receives the metadata updates information that the client is sent;Its
In, the metadata updates information is that the client is receiving data corresponding to the target metadata from the intermediate layer
Afterwards, data corresponding to the target metadata are carried out with the metadata updates information of statistical analysis generation;The intermediate layer root
The metadata stored according to the metadata updates information to the intermediate layer is updated;And/or the intermediate layer is according to
Metadata updates information is updated to the metadata in the accumulation layer.By the manner, intermediate layer is looked into reception client
During asking request progress data query, constantly original metadata can be updated, constantly metadata is carried out
Extension and supplement so that metadata can describe more detailed data, and then cause intermediate layer inquiring about target from accumulation layer
More accurate data can be got during data, can effectively reduce the loading capacity of data and the invalid computation amount of client,
Lift efficiency data query.
Optionally, the type of the target metadata is included in value type, time type, character types, enumeration type
At least one of.By the manner, intermediate layer can be enabled to get more multiclass when inquiring about target data from accumulation layer
The metadata of type, further refines filter condition, further reduces the loading capacity of data and the invalid computation amount of client, lifting
Efficiency data query.
Optionally, the constraints of the metadata of the querying condition including the target data and file to be checked
Scope;The intermediate layer obtains the target metadata for meeting the querying condition, including:The intermediate layer is according to described to be checked
The scope of file determines file to be checked, determines the metadata of the file to be checked, from the metadata of the file to be checked
The middle metadata for meeting the constraints of screening is as the target metadata.By the manner, intermediate layer can be according to obtaining
The target metadata got positions to the position where target data, further reduces the loading capacity and client of data
Invalid computation amount, lift efficiency data query.
Optionally, query caching is preserved in the intermediate layer, and the query caching includes at least one historical query request
And target metadata corresponding to each single item at least one of described historical query request;Client hair is received in the intermediate layer
After the inquiry request sent, methods described includes:The intermediate layer judges that whether including the inquiry in the query caching asks
Ask;If it has, then the intermediate layer obtains target metadata corresponding with the inquiry request in the query caching.Pass through this
Mode, when inquiry request is one in historical query request, intermediate layer can be direct according to the query caching preserved before
Determine target metadata, it may not be necessary to carry out the screening process of metadata, further improve efficiency data query.
Optionally, methods described also includes:Added in the query caching in the range of the scheduled time in the intermediate layer
Target metadata corresponding to the inquiry request and the inquiry request received in the range of the scheduled time received;And/or
Request number of times is added in the query caching and is surpassed more than the inquiry request of pre-determined number and the request number of times in the intermediate layer
Cross target metadata corresponding to the inquiry request of pre-determined number., can be to recent history inquiry request and its right by the manner
Target metadata, the inquiry request of high frequency and its corresponding target metadata answered are cached, and then intermediate layer is being connect
When receiving recent queries request or high frequency inquiry request, target element can directly be determined according to the query caching preserved before
Data, it is not necessary to carry out the screening process of metadata, further improve efficiency data query.
Optionally, query caching is preserved in the intermediate layer, and the query caching includes at least one historical query request
And target data corresponding to each single item at least one of described historical query request;The intermediate layer, which obtains, meets the inquiry
The target data of condition, including:The intermediate layer judges whether include the inquiry request in the query caching;If it is,
Then the intermediate layer obtains target data corresponding with the inquiry request in the query caching.By the manner, inquiring about
When asking one in being asked for historical query, intermediate layer can directly determine number of targets according to the query caching preserved before
According to, it may not be necessary to carry out the screening process of metadata and the process of data corresponding to target metadata read from accumulation layer,
Further improve efficiency data query.
Optionally, the intermediate layer receives the inquiry request that client is sent, including:The intermediate layer receives the client
The inquiry request that end is sent according to predetermined protocol, the predetermined protocol are that different clients are communicated with the intermediate layer
The agreement followed.By the manner, different clients can communicate with intermediate layer according to predetermined protocol so that client pair
The access of data in accumulation layer can be realized indirectly by intermediate layer, and then is allowd and do not needed in exploitation client phase
Program code all is adapted for client exploitation is a set of for each storage format, reduces client development cost.
Optionally, the intermediate layer can include following three functional modules:Tadata memory module, metadata updates mould
Block and query caching module.Wherein, the tadata memory module be used for obtain and store the metadata of file in accumulation layer,
The metadata updates information that the metadata updates module is used to be sent according to client is in the tadata memory module
Metadata is updated or the metadata in the accumulation layer is updated, and update mode can specifically include to original class
The further supplement of type metadata and the metadata two ways for extending new type;The query caching module is used to cache visitor
The historical query request and the target metadata or target data corresponding with historical query request that family end is sent.Pass through this
The intermediate layer that mode provides, it is possible to achieve save client development cost, reduce the loading capacity of data query and the nothing of client
Amount of calculation is imitated, lifts the technique effect of efficiency data query.
Second aspect of the embodiment of the present invention also provides a kind of data request method, including:
Client sends inquiry request to intermediate layer, and the inquiry request includes querying condition and the storage lattice of target data
Formula, the querying condition is used for the constraints for defining the metadata of target data, so that the intermediate layer is obtained described in satisfaction
The target metadata of querying condition, determined to read the mesh of the target data according to the mapping of the storage format of data and read command
Mark read command, the target metadata from accumulation layer is read according to the target read command of determination corresponding to data, and by the mesh
Data corresponding to mark metadata are sent to the client;Wherein, packet corresponding to the target metadata contains the target
Data;The client receives data corresponding to the target metadata that the intermediate layer is sent.
Optionally, the client sends inquiry request to intermediate layer, including:The client is according to predetermined protocol to institute
State client and send the inquiry request, the predetermined protocol is that different clients are communicated what is followed with the intermediate layer
Agreement.
Optionally, after data corresponding to the target metadata of the intermediate layer transmission are received in the client, institute
Stating method also includes:The client carries out statistical analysis to data corresponding to the target metadata, generates metadata updates
Information;The metadata updates information is sent to the intermediate layer, so that the intermediate layer is believed according to the metadata updates
Cease and the metadata of intermediate layer storage is updated, and/or according to the metadata updates information in the accumulation layer
Metadata be updated.
The third aspect of the embodiment of the present invention provides a kind of data query arrangement, including:Receiving unit, for receiving client
The inquiry request of transmission, the inquiry request include the storage format of querying condition and target data;Wherein, the querying condition
For the constraints for the metadata for defining target data;Determining unit, the target element of the querying condition is met for obtaining
Data, and determine to read the target read command of the target data according to the storage format of data and the mapping of read command;Read
Unit is taken, data corresponding to the target metadata are read from accumulation layer for the target read command according to determination;Transmitting element,
For data corresponding to the target metadata to be sent into the client, packet corresponding to the target metadata contains institute
State target data.
Optionally, the determining unit is used for:Obtain the metadata for file where indicating the target data;Or obtain
Take the metadata for group of being expert in the instruction target data;Or obtain member for page where indicating the target data
Data.
Optionally, the determining unit is used for:The target metadata for meeting the querying condition is obtained from the accumulation layer;
And/or the target metadata for meeting the querying condition is obtained from the metadata of described device storage.
Optionally, the receiving unit is additionally operable to:Receive the metadata updates information that the client is sent;Wherein, institute
State metadata updates information for the client after data corresponding to the target metadata are received from described device, it is right
Data corresponding to the target metadata carry out the metadata updates information of statistical analysis generation;It is single that described device also includes renewal
Member, it is used for:It is updated according to the metadata that the metadata updates information stores to described device, and/or according to the member
Data fresh information is updated to the metadata in the accumulation layer.
Optionally, the type of the target metadata is included in value type, time type, character types, enumeration type
At least one of.
Optionally, described device preserves query caching, at least one of the query caching includes historical query request with
And target metadata corresponding to each single item at least one of described historical query request;The determining unit is used for:Described in judgement
Whether include the inquiry request in query caching, when the query caching includes the inquiry request, looked into described in acquisition
Ask target metadata corresponding with the inquiry request in caching.
Optionally, also described device includes buffer unit, is used for:Addition is in scheduled time scope in the query caching
Target metadata corresponding to the inquiry request and the inquiry request received in the range of the scheduled time inside received;With/
Or request number of times is added in the query caching and is exceeded predetermined time more than the inquiry request of pre-determined number and the request number of times
Target metadata corresponding to several inquiry requests.
Optionally, the receiving unit is used for:The inquiry request that the client is sent according to predetermined protocol is received,
The predetermined protocol is that different clients are communicated the agreement followed with described device.
Fourth aspect of the embodiment of the present invention also provides a kind of client, including:Transmitting element, looked into for being sent to intermediate layer
Request is ask, the inquiry request includes the storage format of querying condition and target data, and the querying condition is used to define target
The constraints of the metadata of data, so that the intermediate layer obtains the target metadata for meeting the querying condition, according to number
According to storage format and the mapping of read command determine to read the target read command of the target data, read to order according to the target of determination
Order reads data corresponding to the target metadata from accumulation layer, and data corresponding to the target metadata is sent to described
Client;Wherein, packet corresponding to the target metadata contains the target data;Receiving unit, for receive it is described in
Data corresponding to the target metadata that interbed is sent.
Optionally, the client also includes:Processing unit, sent for receiving the intermediate layer in the receiving unit
The target metadata corresponding to after data, statistical analysis is carried out to data corresponding to the target metadata, generates first number
According to fresh information;The transmitting element is additionally operable to:The metadata updates information is sent to the intermediate layer, so that in described
The metadata that interbed stores according to the metadata updates information to the intermediate layer is updated, and/or according to first number
The metadata in the accumulation layer is updated according to fresh information.
Optionally, the transmitting element is used for:The inquiry request is sent to the intermediate layer according to predetermined protocol, it is described
Predetermined protocol is that different clients are communicated the agreement followed with the intermediate layer.
The aspect of the embodiment of the present invention the 5th also provides a kind of data query equipment, including:At least one processor, Yi Jiyu
The memory of at least one processor communication connection, communication interface;Wherein, the memory storage have can by it is described at least
The instruction of one computing device, at least one processor is by performing the instruction of the memory storage, using described
The method that communication interface performs the data query that first aspect of the embodiment of the present invention provides.
The aspect of the embodiment of the present invention the 6th also provides a kind of client, including:At least one processor, and with it is described extremely
The memory of few processor communication connection, communication interface;Wherein, have can be by least one place for the memory storage
The instruction that device performs is managed, at least one processor is connect by performing the instruction of the memory storage using the communication
The method that mouth performs the request of data that the face of the embodiment of the present invention second provides.
Brief description of the drawings
Technical scheme in order to illustrate the embodiments of the present invention more clearly, make required in being described below to embodiment
Accompanying drawing is briefly introduced, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for this
For the those of ordinary skill in field, without having to pay creative labor, it can also be obtained according to these accompanying drawings
His accompanying drawing.
Fig. 1 is the schematic diagram of distributed Query Processing System framework in the embodiment of the present invention;
Fig. 2 is the schematic flow sheet of data query method in the embodiment of the present invention;
Fig. 3 is the schematic diagram that intermediate layer is updated to metadata in the embodiment of the present invention;
Fig. 4 is the structural representation of data query arrangement in the embodiment of the present invention;
Fig. 5 is the structural representation of client in the embodiment of the present invention.
Embodiment
Technical solution of the present invention is described in detail below by accompanying drawing and specific embodiment, it should be understood that the present invention
Specific features in embodiment and embodiment are the detailed description to technical solution of the present invention, rather than to the technology of the present invention
The restriction of scheme, in the case where not conflicting, the technical characteristic in the embodiment of the present invention and embodiment can be mutually combined.
Data query method provided in an embodiment of the present invention can apply to distributed memory system, the distributed storage system
System can be column storage system, or line storage system.Fig. 1 is distributed query system provided in an embodiment of the present invention
The schematic diagram of system framework, technical scheme of the embodiment of the present invention are improved original distributed Query Processing System framework, specifically
To increase by an intermediate layer between client and accumulation layer, so that client is realized to the data in accumulation layer by intermediate layer
Access.
Client in the embodiment of the present invention can be mounted in server, personal computer, or tablet personal computer, or intelligence
Distributed Calculation engine in the network equipments such as mobile phone, such as MapReduce, spark etc.;Accumulation layer in the embodiment of the present invention
Specific implementation can be storage device in the server in distributed memory system on each network node, can also be individual
Built-in storage or external memory in people's computer, tablet personal computer, smart mobile phone etc., such as floppy disk, hard disk, CD, USB flash disk, movement
Hard disk, read-only storage, random access memory etc. or separately as all kinds of smart memory devices existing for entity, the present invention
Embodiment is not particularly limited;The data in accumulation layer in the embodiment of the present invention can have a variety of storage formats, example simultaneously
Parquet forms as shown in Figure 1, orc forms, RCFile forms etc., the specific implementation in intermediate layer can be one or more
Application program or application software, the intermediate layer can be in same entity devices with the accumulation layer, can also be in difference
Entity device in.
In following description of the embodiment of the present invention, mainly by taking column storage system as an example, to the embodiment of the present invention
Data query method describes in detail.
Embodiment one
The embodiment of the present invention one provides a kind of data query method, and reference picture 2, methods described includes:
Step 101:Intermediate layer receives the inquiry request that client is sent, and the inquiry request includes querying condition and mesh
Mark the storage format of data.
Specifically, the intermediate layer receives the client sends the inquiry request according to predetermined protocol, it is described predetermined
Agreement is that different clients are communicated the agreement followed with the intermediate layer.
Wherein, the inquiry request can specifically include three category informations:Reading instruction, querying condition and target data are deposited
Store up form.It is described to read instruction for indicating that intermediate layer performs the operation from accumulation layer reading target data;The querying condition
The constraints of metadata and the scope of file to be checked of the target data can be included, the querying condition is used for true
The scope of fixed file to be checked and the constraints for the metadata for defining target data;The storage format of the target data is used
In it is determined that reading the target read command of the target data.The client, the intermediate layer and the intermediate layer can be
On consolidated network node, also on different network nodes, the embodiment of the present invention is not particularly limited.
Step 102:The target metadata for meeting the querying condition is obtained, and is ordered according to the storage format of data with reading
The mapping of order determines to read the target read command of the target data.
The intermediate layer can be determined to be checked after the inquiry request is received according to the scope of the file to be checked
Ask file, then obtain the metadata for characterizing the feature of data in the file to be checked, i.e., the metadata of file to be checked, and
Screening meets the metadata of the constraints as the target metadata from the metadata of the file to be checked.Its
In, the intermediate layer can obtain from the accumulation layer meet the target metadata of the querying condition, can also be from described
The target metadata for meeting the querying condition is obtained in the metadata of interbed storage, the embodiment of the present invention is not particularly limited.
Such as:Assuming that accumulation layer stores 100 files, including file a, file b, file c, file d etc., its Chinese
It is [400,730] that part a metadata, which includes a1 and the magnitude range of a2, a1 sign file a the first row group data, and a2 characterizes file
The magnitude range of a the second row group data is [750,800];File b metadata includes b1, b2 and b3, and b1 characterizes file b the
The magnitude range of a line group data is [200,400], the magnitude range of b2 sign file b the second row group data is [400,550],
The magnitude range that b3 characterizes file b the third line group data is [600,750];Its in 100 files in addition to file a, file b
The data area that the metadata that his file (such as file c, file d etc.) includes characterizes is not in [100,500].It is assuming that middle
The querying condition that receives of layer be:Numerical value is inquired about in 100 files and is more than 100 data for being less than 500, then intermediate layer
The metadata of this 100 files can be first obtained, it is found that file c, file d etc. number range are unsatisfactory for querying condition, only
File a and file b meets querying condition, and then query context is navigated into file a and file c, then further to file a and
File b metadata is screened, final to determine that metadata a1, metadata b1 and metadata b2 are mesh corresponding to the inquiry request
Mark metadata.
The intermediate layer is stored with the mapping of the storage format of data and the species of read command, is being received in the intermediate layer
To after the inquiry request, data that intermediate layer can store according to the storage format of the target data, the intermediate layer are deposited
The mapping of the species of form and read command is stored up, determines to make when the target data is read in the intermediate layer from the accumulation layer
With what type of target read command, and then the intermediate layer is enabled to use the storage format with the target data mutually to fit
The target data is read in the read command matched somebody with somebody from the accumulation layer.
Step 103:The target metadata is read from accumulation layer according to the target read command of determination and corresponded in the intermediate layer
Data, and data corresponding to the target metadata are sent to the client, data corresponding to the target metadata
Include the target data.
Specifically, the intermediate layer is given birth to according to the species for the target read command determined and the target metadata
Into target read command, the target read command is then sent to the accumulation layer, the accumulation layer receives the target and reads life
The target read command is responded after order, data corresponding to the target metadata are sent to the intermediate layer, the intermediate layer
Data corresponding to the target metadata are sent to the client again.
For example, continuing to use the example in above-mentioned steps 102, intermediate layer determines that target metadata is b1 and metadata b2, false
If the storage format of the data in file b is parquet forms, intermediate layer is according to the target metadata and target data
Storage format is parquet forms generation command object, after the command object is sent to accumulation layer by intermediate layer, accumulation layer meeting
By data corresponding to metadata b2 and b3 in the file b, i.e. data in file b the first rows group and the second row group are sent to institute
Intermediate layer is stated, the data in file b the first rows group and the second row group are sent to the client by the intermediate layer again.
In such scheme, inquiry request that client is sent according to from predetermined protocol to intermediate layer, intermediate layer receives client
After inquiry request of the end according to predetermined protocol transmission, data corresponding to the inquiry request are read from accumulation layer, then by institute
State data corresponding to inquiry request and return to client, realize that client obtains target data from accumulation layer with this.Client pair
The access of data in accumulation layer is realized indirectly by intermediate layer, is directly interacted different from client in the prior art with accumulation layer
Mode, this programme can not carry out program code in the target data of different storage formats in inquiring about accumulation layer to client
Species switches, and can need not be directed to each storage format in exploitation client phase is all adapted for client exploitation is a set of
Program code, reduce client development cost.
In prior art client directly interacts with accumulation layer and realizes the scheme of data query, the metadata of each file
All it is stored in file, therefore client must first travel through all file ability to be checked of accumulation layer when inquiring about data
The metadata of file to be checked is got, then determination meets querying condition from the metadata of the file to be checked got again
Target metadata, that is to say, that no matter inquiry data volume size and scope be it is how many, client obtain number of targets
According to being required for reading through the whole of accumulation layer file to be checked before, data loading capacity is big, and efficiency data query is low.
In order to solve the problem of data loading capacity is big, and efficiency data query is low existing for prior art, the embodiment of the present invention
It is proposed stores metadata in the technical scheme in intermediate layer:
Optionally, before performing the acquisition described in above-mentioned steps 102 and meeting the target metadata of the querying condition, institute
Stating method also includes:The intermediate layer obtains metadata from the accumulation layer, and is stored in the form of unified, so that
, can be according to the querying condition in the inquiry request from described after the intermediate layer receives the inquiry request that client is sent
The target metadata for meeting the querying condition is searched in the metadata of interbed storage.Wherein, the intermediate layer can only obtain
Part metadata in the accumulation layer, can also obtain whole metadata in the accumulation layer, and the embodiment of the present invention is not done
Concrete restriction.By the manner, intermediate layer, can be from first number of its storage after the inquiry request of client transmission is received
The metadata of file to be checked is directly obtained in, can not be by reading file acquisition target metadata in accumulation layer, energy
The invalid computation amount of enough loading capacities and client for effectively reducing data, lifts efficiency data query.
Optionally, the above method can also include:The intermediate layer receives the metadata updates letter that the client is sent
Breath, and the metadata stored according to the metadata updates information to the intermediate layer is updated, and/or to the accumulation layer
In metadata be updated.Wherein, the metadata updates information is receiving institute for the client from the intermediate layer
After stating data corresponding to target metadata, data corresponding to the target metadata are carried out with the metadata of statistical analysis generation
Fresh information.
Specifically, reference picture 3, client receive data corresponding to the target metadata of intermediate layer return it
Afterwards, statistical analysis can be carried out to the feature of data corresponding to the target metadata, for example analyzes the data in accumulation layer
In specific distribution and data numerical values recited specific distribution in accumulation layer of corresponding relation, the data
With data timestamp specific distribution in accumulation layer of corresponding relation, the data and data character types
Corresponding relation etc., generate statistic analysis result, the intermediate layer then judged according to the statistic analysis result of generation
Or the metadata in accumulation layer whether can also the place of progress fill, if it has, then the client can be according to the statistical
Result generation metadata updates information is analysed, and the metadata updates information is sent to intermediate layer, intermediate layer receives described
Original metadata can be updated after metadata updates information.Wherein, intermediate layer is receiving the metadata updates
After information, it can be updated according to the metadata that the metadata updates information stores to intermediate layer, can also be to accumulation layer
Metadata be updated, the embodiment of the present invention is not particularly limited.
Wherein, the metadata updates information can include following two types:
1st kind:The metadata of original type is supplemented.
For example, it is assumed that querying condition is timestamp scope in inquiry file c 20,160,808 13:00~20160808
18:Data in 00, but the metadata of file c timestamp type that intermediate layer is got after the inquiry request is received is only
The timestamp scope that all data in file c can be characterized is 20,160,808 11:00~20,160,808 19:00, then intermediate layer
File c all digital independents will be come out from accumulation layer and be returned to client, client is receiving intermediate layer transmission
The target data for meeting querying condition is obtained after data from file c all data, that is, filters out timestamp scope and exists
20160808 13:00~20,160,808 18:Data in 00.Number of targets is obtained in the data that client returns from intermediate layer
During, it is found that the data in file c specifically include three row groups, and the timestamp of the data of file c the first row groups
Scope is 20,160,808 11:00~20,160,808 12:The timestamp scope of 00, file c the second row group data is 20160808
13:00~20,160,808 15:00, the timestamp scope of file c the third line group data is 20,160,808 16:00~20160808
18:00, then filter out the data of the second row group and the third line group as mesh in the data that client will return from intermediate layer
Data are marked, while are characterized as that file c generates metadata updates information according to the timestamp of each row groups of file c, and by the member of generation
Data fresh information is sent to intermediate layer, and intermediate layer is updated after metadata updates information is received to original metadata,
Generate metadata, the member for characterizing the second row group data time stamp scope for characterizing the first row group data time stamp scope
Data and the metadata for characterizing the third line group data time stamp scope, and then by first number of file c timestamp type
According to the row group rank for refineing to file c.
The existing scope of metadata instruction data of the prior art hereof can only at most arrive the rank of row group, but
Among specific implementation process of the present invention, the page that metadata can be refine in file.For example, it is assumed that querying condition is to look into
Timestamp scope is 20,160,808 13 in inquiry file e:00~20,160,808 18:Data in 00, intermediate layer are looked into receiving this
Ask and determine that (timestamp scope is file e the second row groups data according to the metadata stored in accumulation layer or intermediate layer after request
20160808 13:00~20,160,808 15:00), (timestamp scope is 20,160,808 16 to file e the third lines group data:00
~20,160,808 18:00) meet querying condition, and the digital independent of file e the second row group data and the third line group is come out simultaneously
It is returned to client.After client receives the data of that return of intermediate layer, target data is obtained in the data returned from intermediate layer
During, it is found that the timestamp of file e the second row group data has a tomography, the first page data in the second row group
Timestamp scope is 20,160,808 13:00~20,160,808 14:00, the timestamp model of the 2nd page data in the second row group
Enclose for 20,160,808 14:30~20,160,808 15:00, then client can according to the first page of file e the second row groups with
And the 2nd the timestamps of page data be characterized as that file e generates metadata more information, and the metadata updates information of generation is sent out
Intermediate layer is given, intermediate layer is generated for characterizing the page numbers of the second row group the first after metadata updates information is received for file e
According to the metadata of timestamp scope and the metadata for characterizing the page data time stamp scopes of the second row group the 2nd, and then will
The metadata of file e timestamp type refine to file c page ranks.In another example, it is assumed that the member of the first row group of file f
The magnitude range of the data of the first row group of data characterization is [10,1000].Client is sent out after the first row group data are obtained
There is tomography in the data of existing file f the first row group, be specially [10,15], [240,290] and [900,1000], then client
End will generate metadata updates information, so that the first row group of the intermediate layer to file f according to the fault feature of the row group data
Metadata be updated, further refine file f metadata scope.
2nd kind, extend the metadata of new type.Wherein, the expansible type of metadata includes but is not limited to following several
Kind:Time type, value type, character types and enumeration type etc..
For example, it is assumed that querying condition is timestamp scope in inquiry file d 20,160,808 13:00~20160808
18:Data in 00, the metadata that intermediate layer stores after the inquiry request is received according to accumulation layer or intermediate layer determine file d
(timestamp scope is 20,160,808 13 to second row group data:00~20,160,808 15:00), file d the third lines group data (when
Between stab scope be 20,160,808 16:00~20,160,808 18:00) querying condition, and file d the second row group data and are met
The digital independent of three row groups comes out and is returned to client.After client receives the data of intermediate layer return, returned from intermediate layer
Data in obtain target data during, client finds that the initial of file c the second row group data is B, file c the
The initial of three row group data is C, then client can be according to file c the second row groups and the initial feature of the third line group
Metadata more information is generated for file d, and the metadata updates information of generation is sent to intermediate layer, intermediate layer is receiving first number
According to the metadata and use for generating the character types for characterizing file d the second row group data initials after more information for file d
In the metadata for the character types for characterizing file d the third line group data initials, and then file d metadata type is expanded to
The character types of data so that next data query can inquire about the data in file d according to the initial feature of data.
The metadata updates information of the client transmission is received by the intermediate layer, and according to the metadata updates
The metadata that information stores to the intermediate layer is updated, and/or to side that the metadata in the accumulation layer is updated
Formula, intermediate layer constantly can be carried out during receiving client query request and carrying out data query to original metadata
Renewal, is constantly extended and supplements to metadata so that metadata can describe more detailed data, and then cause
Interbed from accumulation layer inquire about target data when can get more accurate data, further reduce data loading capacity and
The invalid computation amount of client, lift efficiency data query.
Optionally, the technical scheme that original metadata can be updated with reference to above-mentioned intermediate layer, the embodiment of the present invention
Acquisition described in above-mentioned steps 102 meets the target metadata of the querying condition, can specifically include:The intermediate layer obtains
Metadata for file where indicating the target data;Or the intermediate layer is obtained for indicating the target data place
The metadata of row group;Or the intermediate layer obtains the metadata for page where indicating the target data.
Specifically, intermediate layer during target metadata is obtained, is inquired about for indicating the target data institute first
In the metadata of file, the file where target data is determined, then further inquiry whether there is for indicating the mesh
Mark the metadata of the row group of data hereof;If it is not, determine that the target metadata is for indicating the target
The metadata of file where data, if so, then further inquiry whether there is for indicating the target data in this document
In the row group in page metadata;If it is not, determine that the target metadata is for indicating the number of targets
The metadata organized according to being expert at, if, it is determined that the target metadata is for page where indicating the target data
Metadata.Wherein, target metadata may indicate that the number that the levels of precision of target data position can characterize according to metadata
Depending on the level of detail of feature, the embodiment of the present invention is not particularly limited.
By the manner, intermediate layer can be determined the position where target data according to the target metadata got
Position, different from prior art at most can only navigate to row group a level, the manner can by the registration of target data to page levels,
The loading capacity of data and the invalid computation amount of client are further reduced, lifts efficiency data query.
Optionally, the intermediate layer in the embodiment of the present invention can record the inquiry request of client, and inquiry is remembered
Record is cached, and a query caching is generated in intermediate layer, and the query caching includes at least one historical query request and institute
State target metadata corresponding to each single item at least one historical query request.Wherein, the intermediate layer can be in the inquiry
The inquiry request received in the range of the scheduled time and the inquiry received in the range of the scheduled time are added in caching
Target metadata corresponding to request, the intermediate layer can also add request number of times in the query caching and exceed pre-determined number
Inquiry request and the request number of times exceed pre-determined number inquiry request corresponding to target metadata, the embodiment of the present invention pair
The condition that the intermediate layer caches inquiry record is triggered to be not particularly limited.
When the query caching is preserved in the intermediate layer, the intermediate layer described in above-mentioned steps 102, which obtains, to be met
The implementation of the target metadata of the querying condition can also include:The intermediate layer judge in the query caching whether
Including the inquiry request;If it has, then the intermediate layer obtains mesh corresponding with the inquiry request in the query caching
Metadata is marked, and using the target metadata got from the query caching as the target element number for meeting the querying condition
According to.
By the manner, when inquiry request is one in historical query request, intermediate layer can be according to preserving before
Query caching directly determine target metadata, it may not be necessary to carry out the screening process of metadata, further improve number
According to search efficiency.
Optionally, the intermediate layer in the embodiment of the present invention can record the inquiry request of client, and inquiry is remembered
Record is cached, and a query caching is generated in intermediate layer, and the query caching includes at least one historical query request and institute
State target data corresponding to each single item at least one historical query request.Wherein, the intermediate layer can be slow in the inquiry
Deposit the inquiry request that is received in the range of the scheduled time of addition and the inquiry received in the range of the scheduled time please
Corresponding target data is sought, the intermediate layer can also add request number of times looking into more than pre-determined number in the query caching
Ask request and the request number of times exceedes target data corresponding to the inquiry request of pre-determined number, the embodiment of the present invention is to triggering institute
The condition that intermediate layer caches inquiry record is stated to be not particularly limited.
When the query caching is preserved in the intermediate layer, after above-mentioned steps 101, methods described includes:In described
Interbed judges whether include the inquiry request in the query caching;Delay if it has, then the intermediate layer obtains the inquiry
Target data corresponding with the inquiry request is deposited, and by the target data got from the query caching and is sent to
The client.
By the manner, when inquiry request is one in historical query request, intermediate layer can be according to preserving before
Query caching be directly obtained target data, it may not be necessary to carry out metadata screening process and from accumulation layer read mesh
The process of data corresponding to metadata is marked, further lifts efficiency data query.
Optionally, reference picture 1, the intermediate layer can include following three functional modules:Tadata memory module, first number
According to update module and query caching module.Wherein, the tadata memory module is used to obtain and store file in accumulation layer
Metadata, the metadata updates module be used for according to client send metadata updates information the metadata is stored
Metadata in module is updated or the metadata in the accumulation layer is updated, and update mode can specifically include
The metadata two ways of further supplement and extension new type to original genre metadata;The query caching module is used
The historical query request sent in cache client and the target metadata or number of targets corresponding with historical query request
According to.The intermediate layer provided by the manner, it is possible to achieve save client development cost, the loading capacity for reducing data query and visitor
The invalid computation amount at family end, lift the technique effect of efficiency data query.
Embodiment two
The embodiment of the present invention two provides a kind of data request method, including:
Client sends inquiry request to intermediate layer, and the inquiry request includes querying condition and the storage lattice of target data
Formula, the querying condition is used for the constraints for defining the metadata of target data, so that the intermediate layer is obtained described in satisfaction
The target metadata of querying condition, determined to read the mesh of the target data according to the mapping of the storage format of data and read command
Mark read command, the target metadata from accumulation layer is read according to the target read command of determination corresponding to data, and by the mesh
Data corresponding to mark metadata are sent to the client;Wherein, packet corresponding to the target metadata contains the target
Data;
The client receives data corresponding to the target metadata that the intermediate layer is sent.
Optionally, the client sends inquiry request to intermediate layer, including:
The client sends the inquiry request according to predetermined protocol to the client, and the predetermined protocol is difference
Client is communicated the agreement followed with the intermediate layer.
Optionally, after data corresponding to the target metadata of the intermediate layer transmission are received in the client, institute
Stating method also includes:
The client carries out statistical analysis to data corresponding to the target metadata, generates metadata updates information;
The metadata updates information is sent to the intermediate layer, so that the intermediate layer is according to the metadata updates
The metadata that information stores to the intermediate layer is updated, and/or according to the metadata updates information to the accumulation layer
In metadata be updated.
Embodiment three
The embodiment of the present invention three provides a kind of data query arrangement, for implementing the data query side in above-described embodiment one
Method, reference picture 4, described device includes:
Receiving unit 201, for receiving the inquiry request of client transmission, the inquiry request includes querying condition and mesh
Mark the storage format of data;Wherein, the querying condition is used for the constraints for defining the metadata of target data;
Determining unit 202, the target metadata of the querying condition, and the storage lattice according to data are met for obtaining
The mapping of formula and read command determines to read the target read command of the target data;
Reading unit 203, read for the target read command according to determination from accumulation layer corresponding to the target metadata
Data;
Transmitting element 204, for data corresponding to the target metadata to be sent into the client, the target element
Packet corresponding to data contains the target data.
Optionally, the determining unit 202 is used for:Obtain the metadata for file where indicating the target data;
Or obtain the metadata organized for indicating the target data to be expert at;Or obtain for page where indicating the target data
Metadata.
Optionally, the determining unit 202 is used for:The target element number for meeting the querying condition is obtained from the accumulation layer
According to;And/or the target metadata for meeting the querying condition is obtained from the metadata of described device storage.
Optionally, the receiving unit 201 is additionally operable to:Receive the metadata updates information that the client is sent;Wherein,
The metadata updates information be the client after data corresponding to the target metadata are received from described device,
Data corresponding to the target metadata are carried out with the metadata updates information of statistical analysis generation;
Described device also includes updating block, is used for:The member stored according to the metadata updates information to described device
Data are updated, and/or the metadata in the accumulation layer is updated according to the metadata updates information.
Optionally, the type of the target metadata is included in value type, time type, character types, enumeration type
At least one of.
Optionally, described device preserves query caching, at least one of the query caching includes historical query request with
And target metadata corresponding to each single item at least one of described historical query request;
The determining unit 202 is used for:Judge whether include the inquiry request in the query caching, in the inquiry
When caching includes the inquiry request, target metadata corresponding with the inquiry request in the query caching is obtained.
Optionally, also described device includes buffer unit, is used for:Addition is in scheduled time scope in the query caching
Target metadata corresponding to the inquiry request and the inquiry request received in the range of the scheduled time inside received;With/
Or request number of times is added in the query caching and is exceeded predetermined time more than the inquiry request of pre-determined number and the request number of times
Target metadata corresponding to several inquiry requests.
Optionally, the receiving unit 201 is used for:The inquiry that the client is sent according to predetermined protocol is received to ask
Ask, the predetermined protocol is that different clients are communicated the agreement followed with described device.
The specific implementation of the performed operation of above each unit can be to be performed in the embodiment of the present invention one by intermediate layer
Corresponding step, the embodiment of the present invention repeats no more.
Example IV
The embodiment of the present invention four provides a kind of client, for realizing the data request method in above-described embodiment two, ginseng
According to Fig. 5, the client includes:
Transmitting element 301, for sending inquiry request to intermediate layer, the inquiry request includes querying condition and number of targets
According to storage format, the querying condition be used for define target data metadata constraints so that the intermediate layer is obtained
The target metadata for meeting the querying condition is taken, is determined to read the mesh according to the mapping of the storage format of data and read command
Mark the target read command of data, the target metadata from accumulation layer is read according to the target read command of determination corresponding to data,
And data corresponding to the target metadata are sent to the client;Wherein, packet corresponding to the target metadata
Containing the target data;
Receiving unit 302, data corresponding to the target metadata sent for receiving the intermediate layer.
Optionally, the client also includes processing unit, is used for:The intermediate layer is received in the receiving unit 302
After data corresponding to the target metadata sent, data corresponding to the target metadata are carried out with statistical analysis, generation
Metadata updates information;
The transmitting element 301 is additionally operable to:The metadata updates information is sent to the intermediate layer, so that in described
The metadata that interbed stores according to the metadata updates information to the intermediate layer is updated, and/or according to first number
The metadata in the accumulation layer is updated according to fresh information.
Optionally, the transmitting element 301 is used for:The inquiry request is sent to the intermediate layer according to predetermined protocol,
The predetermined protocol is that different clients are communicated the agreement followed with the intermediate layer.
The specific implementation of the performed operation of above each unit can with the embodiment of the present invention two by client executing
Corresponding step, the embodiment of the present invention repeats no more.
Embodiment five
The embodiment of the present invention five also provides a kind of data query equipment, including:
At least one processor, and
The memory that is connected with least one processor communication, communication interface;
Wherein, have can be by the instruction of at least one computing device, at least one place for the memory storage
Reason device utilizes the communication interface to perform the data described in the embodiment of the present invention one by performing the instruction of the memory storage
The method of inquiry.
Embodiment six
The embodiment of the present invention six provides a kind of client, including:
At least one processor, and
The memory that is connected with least one processor communication, communication interface;
Wherein, have can be by the instruction of at least one computing device, at least one place for the memory storage
Reason device utilizes the communication interface to perform the data described in the embodiment of the present invention two by performing the instruction of the memory storage
The method of request.
The one or more technical schemes provided in the embodiment of the present invention, have at least the following technical effects or advantages:
1st, access of the client to the data in accumulation layer is realized indirectly by intermediate layer, different from client in the prior art
End directly can be with the target data of different storage formats in inquiring about accumulation layer with accumulation layer interactive mode, the embodiment of the present invention
The species for not carrying out program code to client switches, and each storage format can need not be directed in exploitation client phase
Program code all is adapted for client exploitation is a set of, reduces client development cost;
2nd, intermediate layer can directly be obtained after the inquiry request of client transmission is received from the metadata of its storage
Get the metadata of file to be checked, it may not be necessary to, can be effective by reading file acquisition target metadata in accumulation layer
The loading capacity of data is reduced, lifts efficiency data query;
3rd, intermediate layer can receive metadata updates information from client, constantly original metadata is updated, no
Disconnected ground is extended and supplemented to metadata so that metadata can describe more detailed data, and then intermediate layer is existed
More accurate data can be got when inquiring about target data from accumulation layer, page levels is can be as accurate as, further reduces
The loading capacity of data, improves efficiency data query;
4th, during one in the historical query request during inquiry request is query caching, intermediate layer can be according to protecting before
The query caching deposited directly determines target metadata, it may not be necessary to carries out the screening process of metadata, further improves
Efficiency data query;
5th, during one in the historical query request during inquiry request is query caching, intermediate layer can be according to protecting before
The query caching deposited is directly obtained target data, it may not be necessary to carries out the screening process of metadata and is read from accumulation layer
The process of data corresponding to target metadata, further lifts efficiency data query.
It should be understood by those skilled in the art that, embodiments of the invention can be provided as method, system or computer program
Product.Therefore, the present invention can use the reality in terms of complete hardware embodiment, complete software embodiment or combination software and hardware
Apply the form of example.Moreover, the present invention can use the computer for wherein including computer usable program code in one or more
The computer program production that usable storage medium is implemented on (including but is not limited to magnetic disk storage, CD-ROM, optical memory etc.)
The form of product.
The present invention is the flow with reference to method according to embodiments of the present invention, equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be by every first-class in computer program instructions implementation process figure and/or block diagram
Journey and/or the flow in square frame and flow chart and/or block diagram and/or the combination of square frame.These computer programs can be provided
The processors of all-purpose computer, special-purpose computer, Embedded Processor or other programmable data processing devices is instructed to produce
A raw machine so that produced by the instruction of computer or the computing device of other programmable data processing devices for real
The device for the function of being specified in present one flow of flow chart or one square frame of multiple flows and/or block diagram or multiple square frames.
Obviously, those skilled in the art can carry out the essence of various changes and modification without departing from the present invention to the present invention
God and scope.So, if these modifications and variations of the present invention belong to the scope of the claims in the present invention and its equivalent technologies
Within, then the present invention is also intended to comprising including these changes and modification.
Claims (22)
- A kind of 1. data query method, it is characterised in that including:Intermediate layer receives the inquiry request that client is sent, and the inquiry request includes querying condition and the storage lattice of target data Formula;Wherein, the querying condition is used for the constraints for defining the metadata of target data;The intermediate layer obtains the target metadata for meeting the querying condition, andDetermined to read the target read command of the target data according to the mapping of the storage format of data and read command;The intermediate layer target metadata read from accumulation layer according to the target read command of determination corresponding to data, and by institute State data corresponding to target metadata and be sent to the client, packet corresponding to the target metadata contains the number of targets According to.
- 2. the method as described in claim 1, it is characterised in that the intermediate layer obtains the target element for meeting the querying condition Data, including:The intermediate layer obtains the metadata for file where indicating the target data;OrThe intermediate layer obtains the metadata organized for indicating the target data to be expert at;OrThe intermediate layer obtains the metadata for page page where indicating the target data.
- 3. the method as described in claim 1, it is characterised in that the intermediate layer obtains the target element for meeting the querying condition Data, including:The intermediate layer obtains the target metadata for meeting the querying condition from the accumulation layer;And/orThe target metadata for meeting the querying condition is obtained in the metadata that the intermediate layer stores from the intermediate layer.
- 4. the method as described in claim 1, it is characterised in that also include:The intermediate layer receives the metadata updates information that the client is sent;Wherein, the metadata updates information is institute Client is stated after data corresponding to the target metadata are received from the intermediate layer, it is corresponding to the target metadata Data carry out statistical analysis generation metadata updates information;The metadata that the intermediate layer stores according to the metadata updates information to the intermediate layer is updated;And/orThe intermediate layer is updated according to the metadata updates information to the metadata in the accumulation layer.
- 5. the method as described in claim 1, it is characterised in that the type of the target metadata includes value type, time At least one of in type, character types, enumeration type.
- 6. the method as described in claim 1, it is characterised in that preserve query caching, the query caching in the intermediate layer Including target metadata corresponding to each single item at least one historical query request and at least one described historical query request;The intermediate layer obtains the target metadata for meeting the querying condition, including:The intermediate layer judges whether include the inquiry request in the query caching;If it has, then the intermediate layer obtains target metadata corresponding with the inquiry request in the query caching.
- 7. method as claimed in claim 6, it is characterised in that also include:The inquiry request that is received in the range of the scheduled time and described pre- is added in the query caching in the intermediate layer Target metadata corresponding to the inquiry request received in the range of fixing time;And/orInquiry request of the request number of times more than pre-determined number and the request time are added in the query caching in the intermediate layer Number is more than target metadata corresponding to the inquiry request of pre-determined number.
- 8. the method as described in claim 1, it is characterised in that the intermediate layer receives the inquiry request that client is sent, bag Include:The intermediate layer receives the inquiry request that the client is sent according to predetermined protocol, and the predetermined protocol is difference Client is communicated the agreement followed with the intermediate layer.
- A kind of 9. data request method, it is characterised in that including:Client sends inquiry request to intermediate layer, and the inquiry request includes the storage format of querying condition and target data, The querying condition is used for the constraints for defining the metadata of target data, so that the intermediate layer, which obtains, meets the inquiry The target metadata of condition, determine that the target for reading the target data is read according to the mapping of the storage format of data and read command Order, the target metadata from accumulation layer is read according to the target read command of determination corresponding to data, and by the target element Data corresponding to data are sent to the client;Wherein, packet corresponding to the target metadata contains the target data;The client receives data corresponding to the target metadata that the intermediate layer is sent.
- 10. method as claimed in claim 9, it is characterised in that received in the client described in the intermediate layer transmission After data corresponding to target metadata, methods described also includes:The client carries out statistical analysis to data corresponding to the target metadata, generates metadata updates information;By institute State metadata updates information and be sent to the intermediate layer so that the intermediate layer according to the metadata updates information in described The metadata of interbed storage is updated, and/or the metadata in the accumulation layer is entered according to the metadata updates information Row renewal.
- 11. method as claimed in claim 9, it is characterised in that the client sends inquiry request to intermediate layer, including:The client sends the inquiry request according to predetermined protocol to the intermediate layer, and the predetermined protocol is different clients Hold the agreement for being communicated with the intermediate layer and being followed.
- A kind of 12. data query arrangement, it is characterised in that including:Receiving unit, for receiving the inquiry request of client transmission, the inquiry request includes querying condition and target data Storage format;Wherein, the querying condition is used for the constraints for defining the metadata of target data;Determining unit, the target metadata of the querying condition, and the storage format according to data and reading are met for obtaining The mapping of order determines to read the target read command of the target data;Reading unit, data corresponding to the target metadata are read from accumulation layer for the target read command according to determination;Transmitting element, for data corresponding to the target metadata to be sent into the client, the target metadata pair The packet answered contains the target data.
- 13. device as claimed in claim 12, it is characterised in that the determining unit is used for:Obtain the metadata for file where indicating the target data;OrObtain the metadata organized for indicating the target data to be expert at;OrObtain the metadata for page where indicating the target data.
- 14. device as claimed in claim 12, it is characterised in that the determining unit is used for:The target metadata for meeting the querying condition is obtained from the accumulation layer;And/orThe target metadata for meeting the querying condition is obtained from the metadata of described device storage.
- 15. device as claimed in claim 12, it is characterised in that the receiving unit is additionally operable to:Receive the metadata updates information that the client is sent;Wherein, the metadata updates information is that the client exists After described device receives data corresponding to the target metadata, data corresponding to the target metadata are united The metadata updates information of meter analysis generation;Described device also includes updating block, is used for:The metadata stored according to the metadata updates information to described device It is updated, and/or the metadata in the accumulation layer is updated according to the metadata updates information.
- 16. device as claimed in claim 12, it is characterised in that the type of the target metadata include value type, when Between in type, character types, enumeration type at least one of.
- 17. device as claimed in claim 1, it is characterised in that described device preserves query caching, the query caching bag Include target metadata corresponding to each single item at least one historical query request and at least one described historical query request;The determining unit is used for:Judge whether include the inquiry request in the query caching, in the query caching During including the inquiry request, target metadata corresponding with the inquiry request in the query caching is obtained.
- 18. device as claimed in claim 17, it is characterised in that also described device includes buffer unit, is used for:The inquiry request that is received in the range of the scheduled time and described in scheduled time scope is added in the query caching Target metadata corresponding to the inquiry request inside received;And/orRequest number of times is added in the query caching more than the inquiry request of pre-determined number and the request number of times more than predetermined Target metadata corresponding to the inquiry request of number.
- 19. device as claimed in claim 12, it is characterised in that the receiving unit is used for:The inquiry request that the client is sent according to predetermined protocol is received, the predetermined protocol is different clients and institute Device is stated to be communicated the agreement followed.
- A kind of 20. client, it is characterised in that including:Transmitting element, for sending inquiry request to intermediate layer, the inquiry request includes depositing for querying condition and target data Form is stored up, the querying condition is used for the constraints for defining the metadata of target data, met so that the intermediate layer obtains The target metadata of the querying condition, determined to read the target data according to the mapping of the storage format of data and read command Target read command, the target metadata from accumulation layer is read according to the target read command of determination corresponding to data, and by institute State data corresponding to target metadata and be sent to the client;Wherein, packet corresponding to the target metadata is containing described Target data;Receiving unit, data corresponding to the target metadata sent for receiving the intermediate layer.
- 21. client as claimed in claim 20, it is characterised in that the client also includes:Processing unit, for receiving data corresponding to the target metadata of the intermediate layer transmission in the receiving unit Afterwards, statistical analysis is carried out to data corresponding to the target metadata, generates metadata updates information;The transmitting element is additionally operable to:The metadata updates information is sent to the intermediate layer, so that the intermediate layer root The metadata stored according to the metadata updates information to the intermediate layer is updated, and/or according to the metadata updates Information is updated to the metadata in the accumulation layer.
- 22. client as claimed in claim 20, it is characterised in that the transmitting element is additionally operable to:The inquiry request is sent to the intermediate layer according to predetermined protocol, during the predetermined protocol is different clients and is described Interbed is communicated the agreement followed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710801101.2A CN107679093B (en) | 2017-09-07 | 2017-09-07 | Data query method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710801101.2A CN107679093B (en) | 2017-09-07 | 2017-09-07 | Data query method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107679093A true CN107679093A (en) | 2018-02-09 |
CN107679093B CN107679093B (en) | 2020-04-07 |
Family
ID=61135052
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710801101.2A Active CN107679093B (en) | 2017-09-07 | 2017-09-07 | Data query method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107679093B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059105A (en) * | 2019-04-26 | 2019-07-26 | 北京贝斯平云科技有限公司 | A kind of data processing method, device, computer equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090024596A1 (en) * | 2007-07-18 | 2009-01-22 | At&T Labs, Inc. | System and apparatus to represent, store, manipulate, and process metadata information |
CN101980213A (en) * | 2010-11-23 | 2011-02-23 | 中国科学院软件研究所 | J2EE-based data persistence method and system |
CN105005522A (en) * | 2015-06-30 | 2015-10-28 | 深圳市芯海科技有限公司 | Online simulation method of LCD nixie tube |
CN105224546A (en) * | 2014-06-04 | 2016-01-06 | 阿里巴巴集团控股有限公司 | Data storage and query method and apparatus |
US9256697B2 (en) * | 2012-05-11 | 2016-02-09 | Microsoft Technology Licensing, Llc | Bidirectional mapping between applications and network content |
CN105975493A (en) * | 2016-04-26 | 2016-09-28 | 北京神州绿盟信息安全科技股份有限公司 | File combination method and apparatus |
CN106776733A (en) * | 2016-11-22 | 2017-05-31 | 北京航天自动控制研究所 | The data staging methods of sampling in data handling system |
-
2017
- 2017-09-07 CN CN201710801101.2A patent/CN107679093B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090024596A1 (en) * | 2007-07-18 | 2009-01-22 | At&T Labs, Inc. | System and apparatus to represent, store, manipulate, and process metadata information |
CN101980213A (en) * | 2010-11-23 | 2011-02-23 | 中国科学院软件研究所 | J2EE-based data persistence method and system |
US9256697B2 (en) * | 2012-05-11 | 2016-02-09 | Microsoft Technology Licensing, Llc | Bidirectional mapping between applications and network content |
CN105224546A (en) * | 2014-06-04 | 2016-01-06 | 阿里巴巴集团控股有限公司 | Data storage and query method and apparatus |
CN105005522A (en) * | 2015-06-30 | 2015-10-28 | 深圳市芯海科技有限公司 | Online simulation method of LCD nixie tube |
CN105975493A (en) * | 2016-04-26 | 2016-09-28 | 北京神州绿盟信息安全科技股份有限公司 | File combination method and apparatus |
CN106776733A (en) * | 2016-11-22 | 2017-05-31 | 北京航天自动控制研究所 | The data staging methods of sampling in data handling system |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110059105A (en) * | 2019-04-26 | 2019-07-26 | 北京贝斯平云科技有限公司 | A kind of data processing method, device, computer equipment and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN107679093B (en) | 2020-04-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108134691B (en) | Model building method, Internet resources preload method, apparatus, medium and terminal | |
CN103324642B (en) | System and method and the data query method of index is set up for data | |
CN108463817A (en) | Personalised entity library | |
CN105488231B (en) | A kind of big data processing method divided based on adaptive table dimension | |
CN103782295B (en) | Query explain plan in a distributed data management system | |
CN103118132B (en) | A kind of distributed cache system towards space-time data and method | |
CN106095589B (en) | A kind of method, apparatus and system for distributing subregion | |
CN106790718A (en) | Service call link analysis method and system | |
CN106294352B (en) | A kind of document handling method, device and file system | |
CN103559300B (en) | The querying method and inquiry unit of data | |
CN109194707A (en) | The method and device of distribution figure insertion | |
CN103607424B (en) | Server connection method and server system | |
CN111258978B (en) | Data storage method | |
CN104539681A (en) | Distributed GIS accelerating system and GIS service processing method | |
CN104346345B (en) | The storage method and device of data | |
CN103885865B (en) | A kind of Method of Sensor Management and device | |
CN109923847A (en) | Call discovery method, apparatus, equipment and the storage medium of link | |
CN104346458B (en) | Date storage method and storage device | |
CN108287668A (en) | Processing method and processing device, computer installation and the readable storage medium storing program for executing of device data | |
CN103631933A (en) | Distributed duplication elimination system-oriented data routing method | |
WO2018153033A1 (en) | Information processing method and device | |
CN113836318A (en) | Dynamic knowledge graph completion method and device and electronic equipment | |
CN107491463A (en) | The optimization method and system of data query | |
CN106446289B (en) | Information query method and device based on Pinpoint | |
CN108875035A (en) | The date storage method and relevant device of distributed file system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CP01 | Change in the name or title of a patent holder | ||
CP01 | Change in the name or title of a patent holder |
Address after: 100089 Beijing city Haidian District Road No. 4 North wa Yitai three storey building Patentee after: NSFOCUS Technologies Group Co.,Ltd. Patentee after: NSFOCUS TECHNOLOGIES Inc. Address before: 100089 Beijing city Haidian District Road No. 4 North wa Yitai three storey building Patentee before: NSFOCUS INFORMATION TECHNOLOGY Co.,Ltd. Patentee before: NSFOCUS TECHNOLOGIES Inc. |