CN107193874A - A kind of data query method based on finger URL Yu Boolean query condition - Google Patents

A kind of data query method based on finger URL Yu Boolean query condition Download PDF

Info

Publication number
CN107193874A
CN107193874A CN201710260143.XA CN201710260143A CN107193874A CN 107193874 A CN107193874 A CN 107193874A CN 201710260143 A CN201710260143 A CN 201710260143A CN 107193874 A CN107193874 A CN 107193874A
Authority
CN
China
Prior art keywords
intermediate result
inquiry
query
finger url
data
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
Application number
CN201710260143.XA
Other languages
Chinese (zh)
Other versions
CN107193874B (en
Inventor
米传民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Jiangsu Weichi Digital Technology Co ltd
Original Assignee
Nanjing University of Aeronautics and Astronautics
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nanjing University of Aeronautics and Astronautics filed Critical Nanjing University of Aeronautics and Astronautics
Priority to CN201710260143.XA priority Critical patent/CN107193874B/en
Publication of CN107193874A publication Critical patent/CN107193874A/en
Application granted granted Critical
Publication of CN107193874B publication Critical patent/CN107193874B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • G06F16/24534Query rewriting; Transformation
    • G06F16/24537Query rewriting; Transformation of operators

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The present invention relates to a kind of data query method based on finger URL Yu Boolean query condition, for the inquiry intermediate result of iteration during data query, carry out brand-new Data Structure Design, utilize contacting between address location and query statement, effectively reduce the memory space needed for inquiry intermediate result, while iterative query intermediate result integrality is ensured, it is ensured that the operating efficiency of data query.

Description

A kind of data query method based on finger URL Yu Boolean query condition
Technical field
The present invention relates to a kind of data query method based on finger URL Yu Boolean query condition, belong to data warehouse, big Data analysis, Data Environments technical field.
Background technology
As information-based is continued to develop, enterprise have accumulated substantial amounts of knot during production information more and more Structure data, by taking carrier data as an example, as increasing province userbase is close to more than one hundred million scales, will be produced daily Billions of signaling datas and metering data;Data volume is skyrocketed through, by the treatment scale of data warehouse, processing speed, Treatment mechanism proposes higher requirement.
Generally require repeatedly to iterate and could complete in face of the analysis mining of big data, each step of calculating can all be generated Corresponding results set;When many, the size of the size of results set even beyond original data set, this to storage, Arithmetic speed proposes very high requirement, accordingly, it would be desirable to which a kind of quick, economic, simple method records intermediate result, is used to Realize more efficient data query mode.
The content of the invention
The technical problems to be solved by the invention are to provide one kind and use brand-new design, with efficient, economic, simple advantage The data query method based on finger URL Yu Boolean query condition.
In order to solve the above-mentioned technical problem the present invention uses following technical scheme:The present invention devises a kind of based on finger URL With the data query method of Boolean query condition, the corresponding querying condition of each bar record in all initial data is obtained first, The finger URL recorded respectively as each bar;Then initial data is directed to, data query is carried out according to target query sentence, wherein, Following steps are carried out for inquiry intermediate results at different levels, until obtaining inquiry objective result;
Step 001. obtains the corresponding finger URL of each bar record in inquiry intermediate result respectively, and enters step 002;
Each bar in initial data and the inquiry intermediate result is recorded corresponding finger URL and packed by step 002., structure Into the virtual view corresponding to the inquiry intermediate result, subsequently into step 003;
Step 003. judges whether the inquiry intermediate result is inquiry objective result, is then to be directed to the inquiry intermediate result institute Corresponding virtual view, according to finger URL therein, obtains each bar by query statement in initial data therein and inquires about mesh Mark record, as inquiry objective result, data query terminates;Otherwise step 004 is entered;
Virtual view of the step 004. corresponding to the inquiry intermediate result, according to finger URL therein, passes through inquiry Sentence obtains each bar record in the inquiry intermediate result in initial data therein, and enters step 005;
Each bar record that step 005. is directed in the inquiry intermediate result is further inquired about, and is obtained in next stage inquiry Between result, and return to step 001.
It is used as a preferred technical solution of the present invention:In the step 001, each bar in inquiry intermediate result is obtained respectively While recording corresponding finger URL, for the inquiry intermediate result, set each specified attribute and tied as in the middle of the inquiry The given query attribute of fruit, subsequently into step 002;
In the step 002, each bar in initial data, the inquiry intermediate result is recorded into corresponding finger URL, and The given query attribute of the inquiry intermediate result is packed, and constitutes the virtual view corresponding to the inquiry intermediate result, then Into step 003;
Step 003. judges whether the inquiry intermediate result is inquiry objective result, is then to be directed to the inquiry intermediate result institute Corresponding virtual view, according to finger URL therein and given query attribute, by query statement in initial data therein Each specified attribute that each bar inquires about target record is obtained, as inquiry objective result, data query terminates;Otherwise step is entered 004;
Virtual view of the step 004. corresponding to the inquiry intermediate result, according to finger URL therein and given query Attribute, each bar obtained by query statement in initial data therein in the inquiry intermediate result is recorded, and enters step 005;
Each bar record that step 005. is directed in the inquiry intermediate result is further inquired about, and is obtained in next stage inquiry Between result, and return to step 001.
It is used as a preferred technical solution of the present invention:Also include following execution in the step 001:
For the inquiry intermediate result, intermediate result table is set, and set the dominant record number of the intermediate result table as M, Then judge whether the record number in the inquiry intermediate result is more than M, be, the random M bars record that obtains is deposited from the intermediate result It is stored in the intermediate result table;Otherwise by each bar record storage in the intermediate result in the intermediate result table.
It is used as a preferred technical solution of the present invention:The target query sentence and query statement are SQL query statement.
A kind of data query method based on finger URL and Boolean query condition of the present invention uses above technical scheme Compared with prior art, with following technique effect:
(1) the designed data query method based on finger URL Yu Boolean query condition of the present invention, for data query mistake The inquiry intermediate result of iteration in journey, carries out brand-new Data Structure Design, utilizes the connection between address location and query statement System, effectively reduces the memory space needed for inquiry intermediate result, while iterative query intermediate result integrality is ensured, protects The operating efficiency of data query is demonstrate,proved;
(2) in the designed data query method based on finger URL and Boolean query condition of the present invention, in the middle of inquiry As a result, each specified attribute is set as the given query attribute of the inquiry intermediate result, introduces given query attribute, does not only have Effect reduces the space of data storage, and user can be helped quickly to position the record for needing to browse, in addition, based on fixed On the basis of position symbol design, the I/O expenses when introducing of given query attribute can substantially reduce storage overhead and access;
(3) in the designed data query method based on finger URL and Boolean query condition of the present invention, in the middle of inquiry As a result, further design setting intermediate result table, it would be preferable to support analysis personnel browse intermediate result on demand, effectively increase inquiry The access speed of intermediate result.
Brief description of the drawings
Fig. 1 is schematic flow sheet of the present invention design based on finger URL Yu the data query method of Boolean query condition;
Fig. 2 is the structure of virtual view in data query method of the present invention design based on finger URL and Boolean query condition Schematic diagram.
Embodiment
The embodiment of the present invention is described in further detail with reference to Figure of description.
As shown in figure 1, one kind designed by the present invention is based on finger URL (Locator) and the data of Boolean query condition are looked into Inquiry method, obtains the corresponding querying condition of each bar record, the positioning recorded respectively as each bar in all initial data first Accord with (Locator);Then initial data is directed to, data query is carried out according to target query sentence, wherein, in inquiries at different levels Between result carry out following steps, until obtain inquiry objective result;
Step 001. obtains the corresponding finger URL (Locator) of each bar record in inquiry intermediate result respectively, and enters Step 002;
Each bar in initial data and the inquiry intermediate result is recorded corresponding finger URL (Locator) and entered by step 002. Row packing, constitutes the virtual view corresponding to the inquiry intermediate result, subsequently into step 003;
Step 003. judges whether the inquiry intermediate result is inquiry objective result, is then to be directed to the inquiry intermediate result institute Corresponding virtual view, according to finger URL therein (Locator), obtains each by query statement in initial data therein Bar inquires about target record, and as inquiry objective result, data query terminates;Otherwise step 004 is entered;
Virtual view of the step 004. corresponding to the inquiry intermediate result, according to finger URL therein (Locator), Each bar obtained by query statement in initial data therein in the inquiry intermediate result is recorded, and enters step 005;
Each bar record that step 005. is directed in the inquiry intermediate result is further inquired about, and is obtained in next stage inquiry Between result, and return to step 001.
The designed data query method based on finger URL (Locator) with Boolean query condition of above-mentioned technical proposal, pin To the inquiry intermediate result of iteration during data query, brand-new Data Structure Design is carried out, address location and inquiry is utilized Contact between sentence, effectively reduces the memory space needed for inquiry intermediate result, is ensureing that iterative query intermediate result is complete While whole property, it is ensured that the operating efficiency of data query.
Finger URL (Locator) and the data query method and technology scheme of Boolean query condition are based on based on above-mentioned design On basis, the present invention also further devises following optimal technical scheme:For inquiry intermediate result, set each and specify category Property as the inquiry intermediate result given query attribute, introduce given query attribute, not only effectively reduce data storage Space, and user can be helped quickly to position the record for needing to browse, in addition, based on finger URL (Locator) design Basis on, I/O expenses when introducings of given query attribute can substantially reduce storage overhead and access;And for looking into Ask intermediate result, further design setting intermediate result table, it would be preferable to support analysis personnel browse intermediate result on demand, effectively improve The access speed of inquiry intermediate result.
As shown in figure 1, a kind of designed data query based on finger URL (Locator) with Boolean query condition of the present invention Method obtains the corresponding querying condition of each bar record in all initial data among actual application, first, makees respectively The finger URL (Locator) recorded for each bar;Then initial data is directed to, data query is carried out according to target SQL query statement, Wherein, following steps are carried out for inquiry intermediate results at different levels, until obtaining inquiry objective result;
Step 001. obtains the corresponding finger URL (Locator) of each bar record, Yi Jizhen in inquiry intermediate result respectively To the inquiry intermediate result, each specified attribute is set as the given query attribute of the inquiry intermediate result, meanwhile, for this Intermediate result, setting intermediate result table are inquired about, and sets the dominant record number of the intermediate result table inquiry is judged as M, then Whether the record number in intermediate result is more than M, is then to obtain M bars record storage at random from the intermediate result in the intermediate result In table;Otherwise by each bar record storage in the intermediate result in the intermediate result table, subsequently into step 002;
Each bar in initial data, the inquiry intermediate result is recorded corresponding finger URL (Locator) by step 002., with And the given query attribute of the inquiry intermediate result is packed, the virtual view corresponding to the inquiry intermediate result is constituted, such as Shown in Fig. 2, subsequently into step 003;
Step 003. judges whether the inquiry intermediate result is inquiry objective result, is then to be directed to the inquiry intermediate result institute Corresponding virtual view, according to finger URL therein (Locator) and given query attribute, by SQL query statement by wherein Initial data in obtain each specified attribute that each bar inquires about target record, as inquiry objective result, data query terminates; Otherwise step 004 is entered;
Virtual view of the step 004. corresponding to the inquiry intermediate result, according to finger URL therein (Locator) With given query attribute, each bar obtained by SQL query statement in initial data therein in the inquiry intermediate result is remembered Record, and enter step 005;
Each bar record that step 005. is directed in the inquiry intermediate result is further inquired about, and is obtained in next stage inquiry Between result, and return to step 001.
Above-mentioned design is based on finger URL (Locator) and the technical scheme of the data query method of Boolean query condition, Among the data of physical operator, the mobile signaling protocol data wherein in initial data are as shown in table 1 below, i.e. mobile signaling protocol Table TBL:
Locator Time Number Opposite-terminal number Opposite end ownership place The duration of call
Table 1
Assuming that being recorded in initial data more than 10,000,000,000, it is necessary to by iterative query twice:
Iteration 1:The duration of call is chosen to be located at 10 minutes to 15 minutes, and time of origin is 1 day 12 October in 2015: 00 to 13:Record between 00.
Iteration 2:On the basis of the above results, lookup opposite end ownership place is Beijing, and local terminal number attribution is Nanjing Number;(the first seven of number may decide that the ownership of number, if belong is calculating number attribution function)
For iteration 1, generation T1 SQL statement is:
Insert into T1as Select locator from TBL where
" duration of call ">600and " duration of call "<=900
And " time " between (time (" 20151001120000 "), time (" 20151001130000 "))
When needing to check iteration T1 result,
Following SQL statement can be used:
select Proj from tbl where locator in(select locator from T1)
For iteration 2, generation T2 SQL statement is:
When needing to check iteration T2 result, following SQL statement can be used:
select Proj from tbl where locator in(select locator from T2)
For the inquiry intermediate results at different levels in above-mentioned iterative process twice, the present invention is introduced designed based on finger URL (Locator) with the data query method of Boolean query condition, data query is realized, effectively increases and inquires about needed for intermediate result Memory space, ensure iterative query intermediate result integrality while, it is ensured that the operating efficiency of data query.
Embodiments of the present invention are explained in detail above in conjunction with accompanying drawing, but the present invention is not limited to above-mentioned implementation Mode, can also be on the premise of present inventive concept not be departed from the knowledge that those of ordinary skill in the art possess Make a variety of changes.

Claims (4)

1. a kind of data query method based on finger URL Yu Boolean query condition, it is characterised in that:Obtain all original first The corresponding querying condition of each bar record, the finger URL recorded respectively as each bar in data;Then initial data is directed to, according to Target query sentence carries out data query, wherein, following steps are carried out for inquiry intermediate results at different levels, until obtaining inquiry mesh Mark result;
Step 001. obtains the corresponding finger URL of each bar record in inquiry intermediate result respectively, and enters step 002;
Each bar in initial data and the inquiry intermediate result is recorded corresponding finger URL and packed by step 002., and constituting should The virtual view corresponding to intermediate result is inquired about, subsequently into step 003;
Step 003. judges whether the inquiry intermediate result is inquiry objective result, is then directed to corresponding to the inquiry intermediate result Virtual view, according to finger URL therein, each bar obtained in initial data therein by query statement inquire about target and remember Record, as inquiry objective result, data query terminates;Otherwise step 004 is entered;
Virtual view of the step 004. corresponding to the inquiry intermediate result, according to finger URL therein, passes through query statement Each bar record in the inquiry intermediate result is obtained in initial data therein, and enters step 005;
Each bar record that step 005. is directed in the inquiry intermediate result is further inquired about, and is obtained and is tied in the middle of next stage inquiry Really, and return to step 001.
2. a kind of data query method based on finger URL Yu Boolean query condition according to claim 1, it is characterised in that:
In the step 001, while each bar records corresponding finger URL in acquisition inquiry intermediate result respectively, looked into for this Intermediate result is ask, each specified attribute is set as the given query attribute of the inquiry intermediate result, subsequently into step 002;
In the step 002, each bar in initial data, the inquiry intermediate result is recorded into corresponding finger URL, and this is looked into The given query attribute for asking intermediate result is packed, and constitutes the virtual view corresponding to the inquiry intermediate result, subsequently into Step 003;
Step 003. judges whether the inquiry intermediate result is inquiry objective result, is then directed to corresponding to the inquiry intermediate result Virtual view, according to finger URL therein and given query attribute, obtained by query statement in initial data therein Each bar inquires about each specified attribute of target record, and as inquiry objective result, data query terminates;Otherwise step 004 is entered;
Virtual view of the step 004. corresponding to the inquiry intermediate result, belongs to according to finger URL therein and given query Property, each bar obtained by query statement in initial data therein in the inquiry intermediate result is recorded, and enters step 005;
Each bar record that step 005. is directed in the inquiry intermediate result is further inquired about, and is obtained and is tied in the middle of next stage inquiry Really, and return to step 001.
3. a kind of data query method based on finger URL Yu Boolean query condition according to claim 1 or claim 2, its feature exists In:Also include following execution in the step 001:
For the inquiry intermediate result, intermediate result table is set, and set the dominant record number of the intermediate result table as M, then Judge whether record number in the inquiry intermediate result is more than M, be then from the intermediate result it is random obtain M bars record storage in In the intermediate result table;Otherwise by each bar record storage in the intermediate result in the intermediate result table.
4. a kind of data query method based on finger URL Yu Boolean query condition according to claim 1, it is characterised in that: The target query sentence and query statement are SQL query statement.
CN201710260143.XA 2017-04-20 2017-04-20 Data query method based on locator and logic query condition Active CN107193874B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710260143.XA CN107193874B (en) 2017-04-20 2017-04-20 Data query method based on locator and logic query condition

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710260143.XA CN107193874B (en) 2017-04-20 2017-04-20 Data query method based on locator and logic query condition

Publications (2)

Publication Number Publication Date
CN107193874A true CN107193874A (en) 2017-09-22
CN107193874B CN107193874B (en) 2020-06-16

Family

ID=59871117

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710260143.XA Active CN107193874B (en) 2017-04-20 2017-04-20 Data query method based on locator and logic query condition

Country Status (1)

Country Link
CN (1) CN107193874B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6356888B1 (en) * 1999-06-18 2002-03-12 International Business Machines Corporation Utilize encoded vector indexes for distinct processing
CN101089851A (en) * 2007-07-12 2007-12-19 复旦大学 XML flow buffer store manage method based on partial binary prefix code
CN101216840A (en) * 2008-01-21 2008-07-09 金蝶软件(中国)有限公司 Data enquiry method and data enquiry system
CN103049473A (en) * 2012-10-15 2013-04-17 新浪技术(中国)有限公司 Data querying method and device
CN104756101A (en) * 2012-10-31 2015-07-01 惠普发展公司,有限责任合伙企业 Executing a query having multiple set operators

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6356888B1 (en) * 1999-06-18 2002-03-12 International Business Machines Corporation Utilize encoded vector indexes for distinct processing
CN101089851A (en) * 2007-07-12 2007-12-19 复旦大学 XML flow buffer store manage method based on partial binary prefix code
CN101216840A (en) * 2008-01-21 2008-07-09 金蝶软件(中国)有限公司 Data enquiry method and data enquiry system
CN103049473A (en) * 2012-10-15 2013-04-17 新浪技术(中国)有限公司 Data querying method and device
CN104756101A (en) * 2012-10-31 2015-07-01 惠普发展公司,有限责任合伙企业 Executing a query having multiple set operators

Also Published As

Publication number Publication date
CN107193874B (en) 2020-06-16

Similar Documents

Publication Publication Date Title
CN104123374B (en) The method and device of aggregate query in distributed data base
CN105989129B (en) Real time data statistical method and device
CN104679778B (en) A kind of generation method and device of search result
CN104252536B (en) A kind of internet log data query method and device based on hbase
CN101404032B (en) Video retrieval method and system based on contents
CN103294822B (en) A kind of based on active Hash with the high-efficiency caching method of Bloom filter
CN104486777B (en) A kind of method and device for realizing data processing
CN104298736B (en) Data acquisition system connection method, device and Database Systems
CN103200293A (en) Method of automatically combining tautonomy contacts in process of guiding contacts into contact list
CN112637305B (en) Data storage and query method, device, equipment and medium based on cache
CN110162540B (en) Block chain account book data query method, electronic device and storage medium
CN110928882B (en) Memory database indexing method and system based on improved red black tree
CN104504077A (en) Web access data statistical method and the device
CN106776823A (en) A kind of time series data management method, equipment and device
CN103123650A (en) Extensible markup language (XML) data bank full-text indexing method based on integer mapping
US11829377B2 (en) Efficient storage method for time series data
CN105550220B (en) A kind of method and device of the access of heterogeneous system
CN101963993B (en) Method for fast searching database sheet table record
CN103226858B (en) The processing method and processing device of Bluetooth pairing information
CN108241709A (en) A kind of data integrating method, device and system
CN103559272A (en) Method and device for importing data into dimension table
EP3282372A1 (en) Method and apparatus for storing data
CN112182021A (en) User data query method, device and system
CN101980190A (en) Method and device for quickly putting service data into base
CN107193874A (en) A kind of data query method based on finger URL Yu Boolean query condition

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
TR01 Transfer of patent right

Effective date of registration: 20200730

Address after: 12 / F, building a, Xingzhi science and Technology Park, Xingzhi Road, Nanjing Economic and Technological Development Zone, Jiangsu Province 210000

Patentee after: Jiangsu weichi Digital Technology Co.,Ltd.

Address before: Yudaojie Qinhuai District of Nanjing City, Jiangsu Province, No. 29 210000

Patentee before: Nanjing University of Aeronautics and Astronautics

TR01 Transfer of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A data query method based on locators and logical query conditions

Effective date of registration: 20201010

Granted publication date: 20200616

Pledgee: Jiangsu Zijin rural commercial bank Limited by Share Ltd. branch of science and technology

Pledgor: Jiangsu weichi Digital Technology Co.,Ltd.

Registration number: Y2020980006707

PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20210922

Granted publication date: 20200616

Pledgee: Jiangsu Zijin rural commercial bank Limited by Share Ltd. branch of science and technology

Pledgor: Jiangsu weichi Digital Technology Co.,Ltd.

Registration number: Y2020980006707

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A data query method based on locator and logical query conditions

Effective date of registration: 20210924

Granted publication date: 20200616

Pledgee: Jiangsu Zijin Rural Commercial Bank Co.,Ltd. Gulou sub branch

Pledgor: Jiangsu weichi Digital Technology Co.,Ltd.

Registration number: Y2021320000243

PE01 Entry into force of the registration of the contract for pledge of patent right
PC01 Cancellation of the registration of the contract for pledge of patent right

Date of cancellation: 20220812

Granted publication date: 20200616

Pledgee: Jiangsu Zijin Rural Commercial Bank Co.,Ltd. Gulou sub branch

Pledgor: Jiangsu weichi Digital Technology Co.,Ltd.

Registration number: Y2021320000243

PC01 Cancellation of the registration of the contract for pledge of patent right
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A Data Query Method Based on Locator and Logical Query Conditions

Effective date of registration: 20220818

Granted publication date: 20200616

Pledgee: Jiangsu Zijin Rural Commercial Bank Co.,Ltd. Gulou sub branch

Pledgor: Jiangsu weichi Digital Technology Co.,Ltd.

Registration number: Y2022320000475

PE01 Entry into force of the registration of the contract for pledge of patent right