CN102004804B - Method for storing and inquiring range data - Google Patents

Method for storing and inquiring range data Download PDF

Info

Publication number
CN102004804B
CN102004804B CN201010617843A CN201010617843A CN102004804B CN 102004804 B CN102004804 B CN 102004804B CN 201010617843 A CN201010617843 A CN 201010617843A CN 201010617843 A CN201010617843 A CN 201010617843A CN 102004804 B CN102004804 B CN 102004804B
Authority
CN
China
Prior art keywords
data
inquiry
field
key word
scope type
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.)
Expired - Fee Related
Application number
CN201010617843A
Other languages
Chinese (zh)
Other versions
CN102004804A (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.)
Northwest University
Original Assignee
Northwest University
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 Northwest University filed Critical Northwest University
Priority to CN201010617843A priority Critical patent/CN102004804B/en
Publication of CN102004804A publication Critical patent/CN102004804A/en
Application granted granted Critical
Publication of CN102004804B publication Critical patent/CN102004804B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method for storing and inquiring range data, which comprises the following steps of: 1, data storage: storing a plurality of data into a data table built in a storage device, storing the range data in a single-field storage manner, and correspondingly building a bound range data identification library, an error range data identification library and a region range data identification library; and 2, data inquiry comprising the following procedures of: inputting an inquiring keyword, analyzing and judging the inquiring keyword and inquiring the range data. The invention has the advantages of reasonable design, convenience for data storage and inquiry, and small data processing workload; meanwhile, the method for storing and inquiring the range data accords with the ordinary data storage and inquiry habit of people, visually embodies the link among the data, and can effectively solve the defects that the traditional method for storing and inquiring the range data does not accord with the daily data storage habit of people, is large in data processing workload, difficult to change, inconvenient for inquiry and the like.

Description

A kind of storage and querying method of scope type data
Technical field
The invention belongs to data storage and inquiring technology field, especially relate to a kind of storage and querying method of scope type data.
Background technology
The scope type data that touched in routine work, production and the study are very many, and above-mentioned scope type data also play crucial effects, compare with the numeric type data, and the storage of scope type data and query amount are all very big.Below enumerating several instances describes:
Example 1: in the present stage census; Need effectively store the perfect instrument number (being identification card number) of population; This storage is stored according to the branch region of range data usually; For example earlier by the province storage, the ID card No. in Shaanxi Province is between 610XXXXXXX-619XXXXXXX, and the province in Henan Province card number is between 620XXXXXXX-629XXXXXXXXXX; Afterwards, store by the urban district, wherein the ID card No. of Xi'an is between 6100XXXXXX-6109XXXXXX again, and the Weinan City ID card No. is between 6111XXXXXX-6119XXXXXX; Then store by the district again; Wherein the ID card No. of Changan District is between 61001XXXXX-61009XXXXX; Will there be a large amount of wide-style data in the ID card No. of Lianhu District during above-mentioned data storage between 61011XXXXX-61019XXXXX, this data all are not easy when storage and inquiry very much; But above-mentioned data again must storage, thereby is badly in need of a kind ofly not changing above-mentioned memory module but storage and inquiry all scope type data storage and querying method very easily.
Example 2: when in physics, the range of each surveying instrument being stored, like upright and outspoken chi: 0-300mm; Steel tape: 0-1000mm; Vernier caliper: 08300mm; Spiral dial gauge: 0-100mm; Mercury thermometer :-30 ℃-300 ℃, the storage of big and so on weight range type data and inquiry also very inconvenience.
Example 3: measure in the timing of period of single pendulum at certain,, measure and got following data: T1=2.813 ± 0.002s 1000 times in order to obtain very accurate data; T2=2.815 ± 0.001s, T 3=2.814 ± 0.002s, T5=2.813 ± 0.001s; T6=2.813 ± 0.002s, T7=2.811 ± 0.003s, T8=2.812 ± 0.002s; T9=2.812 ± 0.001s; T10=2.810 ± 0.005s...T100=2.810 ± 0.002s, T101=2.812 ± 0.005s...T999=2.813 ± 0.002s, T1000=2.812 ± 0.003s.The known 2.8125s of hypothesis is the accurate data of this period of single pendulum now; That is to say the above data that record; As long as including the data of 2.8125s all is valid data, so how from these 1000 data fast detecting to go out those are valid data, its inquiry difficulty is very big.
Example 4: in a chemical experiment, need record a batch data at a certain temperature, if at 0 ℃-20 ℃, 20 ℃-40 ℃; 40 ℃-60 ℃, 60 ℃-80 ℃, in 80 ℃ of-100 ℃ of these several range sections; Measure 20 times in each range section, now will be relatively at 30 ℃-35 ℃, 50 ℃-55 ℃; Under 70 ℃ of-75 ℃ of these several temperature range of condition, other conditions are all identical, the situation of change of some data.So; The storage of corresponding these data just and temperature range direct relation is arranged; Must find above several scope type data this moment earlier in which the above-mentioned type of range for measuring data, through navigating under this temperature range, checks the situation of change of some data then; Compare again, but above-mentioned query script is difficult to realize.
Example 5: once measure in the experiment of chemical reaction product at certain; Reaction product (supposing that this reaction product has 100 kinds) to certain material is measured, and measures respectively to contain the N amount in each reaction product, has obtained a series of data; Requiring to contain the N amount does not now cast out at the product of 40%-60%; How retrieving those products fast should cast out, and which product should keep, and it is bigger that it accepts or rejects the process difficulty.
Above-mentioned example all is the FAQs that can run in our actual life, the engineering experiment; These problems are handled fast and effectively; Make storage efficiency and recall precision remain on a high level, its storage and querying method to above-mentioned scope type data is all had relatively high expectations.
Thereby; In each field of engineering technology, there is a large amount of handling problems, for example at chemical field to scope type data (comprising the error pattern data); Often exist such as require temperature within ± 0.2 scope, to wait a series of data of this type 40 ℃-80 ℃ or error; The characteristic of this data is to be worth within the specific limits, but does not have exact value, just can not simply store with the numeric type data for the storage of such data in database.If use database storing, adopt the way of dividing at present mostly, promptly be divided into two row to data, more be listed as even.Adopt two row fields write down respectively this range data bound (just can save as for 40 ℃-80 ℃ like top data: 80 ℃ of the upper limits, 40 ℃ of lower limits and deposit two fields respectively in).This existing storage mode comes data are stored through enlarging the list structure space; But there is following practical problems in such storage mode: at first; The custom that storage mode and people store data at ordinary times is not inconsistent; Contact between the data closely and data type express not directly perceived, need during actual storage with 40 ℃-80 ℃ of continuous datas respectively two fields store respectively; Secondly, for some data, if know it is the data of which kind of type in advance, should carry out in which field the division of this kind data processing, relevant division is clear and definite then divides easily; But promptly do not know data type in advance for some unknown data; If scope type data after mass data is stored, occurred; Just must the change data structure, involve the migration of mass data and storage problem in addition, workload is very big and be prone to mistake; Moreover above-mentioned existing storage data mode relatively expends time in when data query, because will compare from two field values, and simultaneously neither be very convenient for the storage of query results.
Illustrate, have the error formula scope type data of a collection of experiment test to need to handle, this data comprise 50 ± 0.2,70 ± 0.1; 60 ± 0.4,55 ± 0.2,49 ± 0.2,50 ± 0.1; 52 ± 0.8,53 ± 0.1,56 ± 0.4; 55 ± 0.3 etc., the main operation that this data relate to has storage and inquiry, and the quality of corresponding storage means is directly connected to the efficient and the result of data query.What we adopted to the processing of this type data usually is to adopt two fields to write down the bound of this kind data respectively, reaches the purpose of data storage, and then accomplishes data query.Just be stored as the upper limit like above-mentioned data: (50.2,70.1,60.4,55.2,49.2,50.1,52.8,53.1,56.4,55.3), lower limit: (49.8,69.9,59.6,54.8,48.8,49.9,51.2,52.9,55.6,54.7).After the storage, when above-mentioned data are inquired about, take out in corresponding two fields corresponding data at every turn and operate like this.Simultaneously, when said method was stored data, each operation must split data (bound that promptly splits out data earlier) earlier, just can carry out the storage of data.Thereby this existing data storage method had not both met the custom that people store data at ordinary times, and was not easy to show the inner link between the data on directly perceived, adopted a plurality of field store simultaneously, and the storage space cost is big.In addition, above-mentioned existing storage means has a general drawback: if in advance and do not know data type, it is pretty troublesome will revising this list data structure later on.
Summary of the invention
Technical matters to be solved by this invention is to above-mentioned deficiency of the prior art; A kind of storage and querying method of scope type data are provided; It is reasonable in design, data storage and inquiry is convenient, the data processing work amount is little and its data storage meets the people storage and the inquiry custom of data at ordinary times with querying method, and the while intuitively embodies the contact between the data.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: a kind of storage and querying method of scope type data is characterized in that this method may further comprise the steps:
Step 1, data storage: adopt PC and a plurality of data of needs storage are stored respectively according to conventional input method; And in the tables of data that a plurality of data of being stored all are stored in the memory device to be set up, in a plurality of tables of data that perhaps a plurality of data of being stored are stored in the memory device respectively to be set up according to the difference of field name information; Said field name information is the represented parameter type titles of each data; A plurality of said data comprise numeric type data and two types of data of scope type data, and said numeric type data are the data that explicit value is arranged, and said scope type data mean the data that a scope only arranged and do not have explicit value;
When storing, all identical to the storage mode of all data, and with character string forms each data is stored respectively; Each data of being stored include the field name information, number three category informations with the corresponding concrete numerical value of field name information with to the major key that data are carried out unique differentiation; The quantity of said field name information and said concrete numerical value is one or more, and said field name information and said concrete numerical value are corresponding one by one; Said field name information, concrete numerical value and major key numbering are all stored with the storage mode of individual character section; And the field name information of same data, concrete numerical value and major key numbering are stored in the single field respectively during actual storage; Wherein the concrete numerical value of scope type data is stored with the storage mode of individual character segment limit data; The concrete numerical value of numeric type data is stored with the storage mode of individual character segment data, the concrete numerical value in the same data respectively with field name information and major key numbering between the concrete numerical value that carries out in the related and same data through associative cell number corresponding with the field name information and the major key of these data respectively; When a plurality of said data are stored, the major key of each data numbering all is stored in the major key numbering database, and the dissimilar scope type data identifiers that comprised in a plurality of said data are carried out synchronous recording;
Before the data query; The dissimilar scope type data identifiers that write down are gathered and classify; And through parameter input device and according to the pairing scope type of each scope type data identifier data type; The scope type data identifier that is write down is added into respectively in bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and the region-type scope type data identifier storehouse of setting up in advance, makes said bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and region-type scope type data identifier storehouse comprise all types scope type data identifier of a plurality of said data;
Step 2, data query, its query script may further comprise the steps:
201, key word of the inquiry input: the key word of the inquiry that adopts the parameter input device input institute of PC to inquire about comprises the field name information that needs inquire about field in the said key word of the inquiry;
202, the query manipulation field analysis is judged: the central processing unit of said PC calls query manipulation field judge module and judges whether the query manipulation field that comprises in institute's input inquiry key word is to store the major key field that major key is numbered: when judgement draws operated field and is major key field, then change step 204 over to; Otherwise, get into step 203;
203, non-major key numbering inquiry: said central processing unit calls lexical analysis and the Symbol recognition module is analyzed the key word of the inquiry of being imported; Judge and whether comprise scope type data identifier in it:, and change step 2031 over to if then separation and Extraction scope type data identifier is arranged; Otherwise, change step 2032 over to;
2031, scope type data type inquiry, its query script is following:
20311, scope type data type identification in the key word of the inquiry: said central processing unit calls scope type data qualification identification module the said scope type data identifier that separation and Extraction goes out is compared with the identifier that said bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and region-type scope type data identifier storehouse are stored respectively; And judge scope type type of data in the key word of the inquiry, and to the synchronous recording judged result according to comparing result;
20312, the concrete query script of scope type data: said central processing unit calls scope type data query module all tables of data of need inquiry is inquired about respectively; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in storer when a plurality of tables of data are inquired about; During inquiry, all identical and all identical to the querying method of all fields of storing in the tables of data to the querying method of all tables of data, for any tables of data that need inquire about wherein, its concrete query script is following:
203121, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding field name information of all fields of storing in the need data query table; And the field name information that comprises in the field name information that will transfer out and the key word of the inquiry compares, and all the consistent fields of field name information that comprise in field name information and the key word of the inquiry are all added mark to be checked;
203122, field to be checked is transferred: said scope type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
203123, individual character segment limit data qualification identification, inquiry and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze, and judges whether comprise scope type data identifier in it: then treat the individual character segment limit data of storing in the inquiry field and inquire about if having; Otherwise, return step 203122, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table;
When treating individual character segment limit data that inquiry stores in the field and inquiring about, said scope type data query module is inquired about the transfer individual character segment limit data of storing in the field to be checked, and all identical to the querying method of all individual character segment limit data; When individual character segment limit data were inquired about: call scope type data qualification identification module earlier, whether judgement needed cargo tracer field range data identical with the scope type data type of key word of the inquiry; When judgement draws the scope type data type that needs cargo tracer field range data and key word of the inquiry when identical; Concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry compares analysis, and judges whether the concrete numerical range of key word of the inquiry is within the concrete numerical range that needs cargo tracer field range data; When numerical range that judgement draws key word of the inquiry was within the concrete numerical range that needs cargo tracer field range data, the major key numbering that these individual character segment limit data are corresponding was saved in the query results;
203124, said central processing unit is judged needs whether the data query table is empty: if empty, inquiry finishes, and changes step 203125 over to; Otherwise, return step 203122, the storage in the need data query table and the field next to be checked of adding mark to be checked are inquired about;
203125, all major key numberings of being preserved in the query results described in the step 203123 are configured to one and enumerate vectorial selstr;
203126, adopt enumerating vectorial selstr and, all fields of being stored in the need data query table being inquired about of being generated in the step 203125, needing to obtain the Query Result record set of data query table according to the sequencing of memory location;
203127, repeating step 203121 to 203126 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish;
2032, numeric type data query: said central processing unit calls numeric type data query module; And all tables of data of need inquiry are inquired about respectively according to the querying method of conventional numeric type data; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in memory device when a plurality of tables of data are inquired about; And when inquiring about; Querying method to all tables of data is all identical; All need are inquired about all fields of being stored in each tables of data according to the sequencing of memory location and are all identical to the querying method of all fields; For any tables of data that need inquire about wherein, its query script is following:
20321, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding field name information of all fields of storing in the need data query table; And the field name information that comprises in the field name information that will transfer out and the key word of the inquiry compares, and all the consistent fields of field name information that comprise in field name information and the key word of the inquiry are all added mark to be checked;
20322, field to be checked is transferred: said numeric type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
20323, inquiry of individual character segment data and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze; Judge and whether comprise scope type data identifier in it: if having; Return step 20322, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table; Otherwise, treat the individual character segment data of storing in the inquiry field and inquire about;
When treating individual character segment data that inquiry stores in the field and inquiring about; Said numeric type data query module is inquired about the individual character segment data of storing in the transferring field; And the querying method to all individual character segment datas is all identical; All adopt the method that key word of the inquiry of being imported and the individual character segment data of being inquired about are carried out the difference comparison to inquire about: when judgement draws the individual character segment data of being inquired about when identical with key word of the inquiry, then the major key numbering with this individual character segment data field of living in is saved in the query results;
20324, return step 20322, and the next field of storing in the need data query table and add mark to be checked is transferred and inquired about according to the sequencing of memory location; And repeatedly repeating step 20322 is to step 20323, in to need data query table, stores and all fields of adding mark to be checked are all inquired about and finished, and changes step 20325 over to;
20325, all major key numberings of being preserved in the query results described in the step 20323 are configured to one and enumerate vectorial selstr;
20326, adopt enumerating vectorial selstr and, all fields of storing in the need data query table and add mark to be checked being inquired about of being generated in the step 20325, obtain the outcome record collection of need data query table according to the sequencing of memory location;
20327, repeating step 20321 to 20326 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish;
204, major key numbering inquiry: said central processing unit calls numeric type data query module; And all tables of data of need inquiry are inquired about respectively according to the querying method of conventional numeric type data; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in memory device when a plurality of tables of data are inquired about; And when inquiring about; Querying method to all tables of data is all identical; All need are inquired about all fields of being stored in each tables of data according to the sequencing of memory location and are all identical to the querying method of all fields; For any tables of data that need inquire about wherein, its query script is following:
2041, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding major key numbering of all fields of storing in the need data query table; And the major key that will transfer out is numbered and key word of the inquiry compares, and major key numbering all fields identical with key word of the inquiry are all added mark to be checked;
2042, field to be checked is transferred: said numeric type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
2043, inquiry of individual character segment data and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze; Judge whether comprise the major key numbering in it:, treat the major key numbering of storing in the inquiry field and inquire about if having; Otherwise, return step 2042, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table;
Said numeric type data query module is inquired about the major key numbering of storing in the transferring field; And the querying method to all major key numberings is all identical; All adopt the method that the key word of the inquiry of being imported and the major key inquired about numbering are carried out the difference comparison to inquire about:, then this major key of transferring field to be numbered to be saved in the query results when judgement draws the major key numbering of being inquired about when identical with key word of the inquiry;
2044, return step 2042, and the next field of storing in the need data query table and add mark to be checked is transferred and inquired about according to the sequencing of memory location; And repeatedly repeating step 2042 is to step 2043, in to need data query table, stores and all fields of adding mark to be checked are all inquired about and finished, and changes step 2045 over to;
2045, all major key numberings of being preserved in the query results described in the step 2043 are configured to one and enumerate vectorial selstr;
2046, adopt enumerating vectorial selstr and, all fields of storing in the need data query table and add mark to be checked being inquired about of being generated in the step 2045, obtain the outcome record collection of need data query table according to the sequencing of memory location;
2047, repeating step 2041 to 2046 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish.
The storage and the querying method of above-mentioned a kind of scope type data; It is characterized in that: after the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is bound formula scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is a bound formula scope type data query module, adopts said bound formula scope type data query module to carry out in the query script, and before field to be checked is transferred in step 203122; Said central processing unit should call bound formula scope type data preprocessing module earlier key word of the inquiry is carried out pre-service, and its preprocessing process may further comprise the steps:
I, transfer the upper lower limit value data except that bound formula scope type data identifier in the key word of the inquiry;
II, call the difference comparison module upper lower limit value data of being transferred out are carried out difference relatively, and the higher value in the two is stored to B_dot, smaller value is stored to S_dot;
The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203123 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
I, the pre-service of need cargo tracer field range data: said central processing unit calls bound formula scope type data preprocessing module need cargo tracer field range data is carried out pre-service, and transferring out earlier needs the upper lower limit value data except that bound formula scope type data identifier in the cargo tracer field range data; Afterwards, call the difference comparison module upper lower limit value data of being transferred out are carried out difference relatively;
Ii, difference comparative analysis: call the difference comparison module with the step I difference relatively the higher value that obtained of back and smaller value correspondence respectively with Step II in the numerical value that is stored among B_dot and the S_dot carry out difference relatively: when difference relatively draws when being stored in the numerical value of S_dot in smaller value>=Step II that difference in the numerical value that is stored in B_dot in the step I in difference higher value≤Step II that relatively back is obtained and the step I obtained after relatively, the numerical range that key word of the inquiry is described be in need the concrete numerical range of cargo tracer field range data within.
The storage and the querying method of above-mentioned a kind of scope type data; It is characterized in that: after the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is error formula scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is an error formula scope type data query module; Carry out in the query script and in step 203121, need before the inquiry field transfers when said error formula scope type data, said central processing unit should call error formula scope type data preprocessing module earlier key word of the inquiry is carried out pre-service, and its preprocessing process may further comprise the steps:
1., transfer error formula scope type data identifier both sides in the key word of the inquiry about two numeric datas;
2., with step transferred out in 1. about two numeric data correspondences be stored to respectively among L_dot and the R_dot;
The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203123 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
(1), need the pre-service of cargo tracer field range data: said central processing unit calls error formula scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfer out need error formula scope type data identifier both sides in the cargo tracer field range data about two numeric datas;
(2), the difference comparative analysis: call the difference comparison module with step (1) transfer out about two numeric data correspondences respectively with step (1) in the numerical value that is stored among L_dot and the R_dot carry out difference relatively: when difference draw relatively that the error formula scope type data identifier left data transferred out in the step (1) and step are stored in that numerical value among the L_dot equates in 2. and step (1) in error formula scope type data identifier left data≤step of transferring out when being stored in the numerical value among the R_dot in 2., explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data.
The storage and the querying method of above-mentioned a kind of scope type data; It is characterized in that: the bound formula scope type data identifier described in the step 1 comprise "~", "-", " extremely ", " arriving ", "≤X≤", ">=X>=", "<X<", ">X>", " between...and... ", " ... with ... between " and " ... with ... between "; Said error formula scope type data identifier is " ± ", said region-type scope type data identifier comprise "≤", ">=", "<", ">", " not between...and... ", " greater than ", " less than ", " being not more than " and " being not less than ".
The storage and the querying method of above-mentioned a kind of scope type data; It is characterized in that: after the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is region-type scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is a region-type scope type data query module; When said region-type scope type data query module is carried out in the query script and in step 203121, needed before the inquiry field transfers; Said central processing unit should call region-type scope type data qualification module earlier and the scope type data identifier type of key word of the inquiry is discerned and according to recognition result key word of the inquiry classified: the scope type data identifier that draws key word of the inquiry when judgement gets into step a during for " not between...and... "; The scope type data identifier that draws key word of the inquiry when judgement for "≤", "<", " less than " during with " being not more than ", entering step b; Otherwise, get into step c;
A, key word of the inquiry pre-service, its preprocessing process may further comprise the steps: transfer two limit value data except that region-type scope type data identifier in the key word of the inquiry earlier; Afterwards, call the difference comparison module again two limit value data being transferred out are carried out difference relatively, and the higher value in the two is stored to BI_dot, smaller value is stored to SM_dot;
After the pre-service of key word of the inquiry described in the step a finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
A1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, and transferring out earlier needs two limit value data except that region-type scope type data identifier in the cargo tracer field range data; Call the difference comparison module again transfer out two limit value data that need in the cargo tracer field range data are carried out difference relatively;
A2, difference comparative analysis: call the difference comparison module with the difference of transferring among the step a1 relatively the higher value that obtained of back and smaller value correspondence respectively with step a in the numerical value that is stored among BI_dot and the SM_dot carry out difference relatively: when difference relatively draws when being stored in the numerical value of SM_dot among smaller value≤step a that difference among the numerical value that is stored in BI_dot among the step a1 among difference higher value>=step a that relatively back is obtained and the step a1 obtained after relatively, the numerical range that key word of the inquiry is described whether be in need the concrete numerical range of cargo tracer field range data within;
B, key word of the inquiry pre-service: transfer the numeric data on scope type data identifier right side in the key word of the inquiry, and with transferring data storage to SM;
After the pre-service of key word of the inquiry described in the step b finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
B1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfers out earlier the numeric data that needs scope type data identifier right side in the cargo tracer field range data;
B2, difference comparative analysis: call the difference comparison module and carry out difference relatively:, explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data when difference relatively draws when being stored in the numeric data among the SM among the numeric data≤step b that transfers among the step b1 with being stored in numeric data among the SM among numeric data of transferring among the step b1 and the step b;
C, key word of the inquiry pre-service: transfer the numeric data on scope type data identifier right side in the key word of the inquiry, and with transferring data storage to BI;
After the pre-service of key word of the inquiry described in the step c finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
C1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfers out earlier the numeric data that needs scope type data identifier right side in the cargo tracer field range data;
C2, difference comparative analysis: call the difference comparison module and carry out difference relatively:, explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data when difference relatively draws when being stored in the numeric data among the SM among the numeric data >=step c that transfers among the step c1 with being stored in numeric data among the BI among numeric data of transferring among the step c1 and the step c.
The present invention compared with prior art has the following advantages:
1, reasonable in design, use easy and simple to handle and realize convenient.
2, data storage and inquiry are convenient, and the storage that the invention enables scope type data and inquiry have met the custom of people's data storage and inquiry at ordinary times; Sum of errors scope type data are effectively stored, save storage space, and embody the contact between the data intuitively, the way that provides a kind of new data query to handle.During actual the storage, adopt the method for character string storage (just to store scope type data according to character string.So-called character string is exactly the finite sequence of being made up of character one by one.For example, stored 40 at 40%~60% o'clock here; % ,~, 60; % is a character, and does not regard them as numerical value 40%, 60%); In individual character segment limit data, adopt distinctive way that the type data are effectively inquired about then the data storage of error, wide-style, this inquiry can avoid effectively that conventional store and querying method exist does not meet many drawbacks such as people daily data storage custom, data processing work amount are big, change difficulty, inquiry inconvenience.
3, the data recording that the present invention is relevant with all leaves in the corresponding individual character section; Whether have in the above-mentioned three types identifier any one and need not distinguish these data; The type of field is character string type (to the SQLSever database, corresponding type is exactly nvarchar [(n)], and it is a kind of character type data that can comprise the variable-length of n character at most); Storage is in the same field of storage with this data like this; Both meet people and stored the custom of data at ordinary times, and saved storage space, intuitively embodied the contact between the data simultaneously.
4, practical value is high and applied widely, and popularizing application prospect is extensive, and the principle of the invention is simple, but applicability is extensive, and practicality is extremely strong.Can be applied to this scope type data of each field of engineering technology of present stage and the data query of error pattern data, very meet with people's storage data custom at ordinary times simultaneously.
In sum; The present invention is reasonable in design, data storage and inquiry is convenient, the data processing work amount is little and its data storage meets the people's storage and inquiry of data at ordinary times with querying method and is accustomed to; Simultaneously intuitively embody the contact between the data, what can solve effectively that existing scope type data storage and querying method exist does not meet many drawbacks such as people daily data storage custom, data processing work amount are big, change difficulty, inquiry inconvenience.
Through accompanying drawing and embodiment, technical scheme of the present invention is done further detailed description below.
Description of drawings
Fig. 1 carries out the method flow block diagram of data query for the present invention.
Fig. 2 carries out the method flow diagram of scope type data query for the present invention.
Embodiment
Like Fig. 1, shown in Figure 2, the storage and the querying method of scope type data of the present invention may further comprise the steps:
Step 1, data storage: adopt PC and a plurality of data of needs storage are stored respectively according to conventional input method; And in the tables of data that a plurality of data of being stored all are stored in the memory device to be set up, in a plurality of tables of data that perhaps a plurality of data of being stored are stored in the memory device respectively to be set up according to the difference of field name information; Said field name information is the represented parameter type titles of each data; A plurality of said data comprise numeric type data and two types of data of scope type data, and the data of explicit value are confirmed and had to the value that said numeric type data are data, and said scope type data mean the data that a scope only arranged and do not have explicit value.
When storing, all identical to the storage mode of all data, and with character string forms each data is stored respectively; Each data of being stored include the field name information, number three category informations with the corresponding concrete numerical value of field name information with to the major key that data are carried out unique differentiation; The quantity of said field name information and said concrete numerical value is one or more, and said field name information and said concrete numerical value are corresponding one by one; Said field name information, concrete numerical value and major key numbering are all stored with the storage mode of individual character section; And the field name information of same data, concrete numerical value and major key numbering are stored in the single field respectively during actual storage; Wherein the concrete numerical value of scope type data is stored with the storage mode of individual character segment limit data; The concrete numerical value of numeric type data is stored with the storage mode of individual character segment data, the concrete numerical value in the same data respectively with field name information and major key numbering between the concrete numerical value that carries out in the related and same data through associative cell number corresponding with the field name information and the major key of these data respectively; When a plurality of said data are stored, the major key of each data numbering all is stored in the major key numbering database, and the dissimilar scope type data identifiers that comprised in a plurality of said data are carried out synchronous recording.Wherein, the field name information is used to distinguish the parameter types such as physical quantity or chemistry amount that each field writes down concrete numerical value representative, like temperature, pressure, pressure etc.Like chemical test test data table 1 and the table of being stored 2:
Table 1 chemical test material information data table memory to be tested
Major key numbering material title material type storage condition (℃)
1 nitrolite 20~40
2 TNT explosives 50 ± 20%
Table 2 chemical test substance testing parametric data table to be tested
Major key numbering experiment pressure (Pa) pressure experiment temperature (℃)
1 100 30 30
2 200 50 80
In table 1 and table 2; 1 and 2 are respectively the major key numbering; The storage condition that first row is stored in the table 1 (℃) and table 2 in first row experiment pressure (Pa), pressure and experimental temperature (℃) be respectively the field name information; " 20~40 " of being stored in the table 1 and " 50 ± 20% " are respectively individual character segment limit type data, and that is stored in the table 2 100,30,30,200,50 and 80 is the individual character segment data.Individual character segment limit type data " 20~40 " in the table 1 establish incidence relation respectively and between field name information of these data " storage condition (℃) " and the major key numbering " 1 ", and its incidence relation is the peer message that carries in the table 1 and with the form attributes incidence relation between the column information.Likewise; For the data of being stored in the table 2 " 200 " respectively and the field name information of these data " experiment pressure (Pa) " number between " 2 " with major key and establish incidence relation, and its incidence relation is the peer message that carries in the table 1 and with the form attributes incidence relation between the column information.The storage mode of other data of being stored in table 1 and the table 2 is all identical.
Before the data query; The dissimilar scope type data identifiers that write down are gathered and classify; And through said parameter input device and according to the pairing scope type of each scope type data identifier data type; The scope type data identifier that is write down is added into respectively in bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and the region-type scope type data identifier storehouse of setting up in advance, makes said bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and region-type scope type data identifier storehouse comprise all types scope type data identifier of a plurality of said data.
Actual when carrying out data storage, people are according at ordinary times data storage custom, and all data storage that will store with character string forms are extremely in one or more tables of data that are associated.Among the present invention, all data of need storages are divided into two big types: i.e. numeric type data and scope type data, wherein the numeric type data are meant that the value of data is definite, promptly data have the data type of an exact value; Scope type data mean the data that a scope only arranged and do not have explicit value, the i.e. data type of data neither one exact value.Said scope type data comprise following three types of data: 1. bound formula scope type data: specifically refer to the scope type data represented through two upper lower limit values; Such data comprise " ...~... ", " ...-... ", " ... extremely ... ", " ... arrive ... ", " ...≤X≤... ", " ...>=X>=... ", " ...<X<... ", " ...>X>... ", " between...and... ", " be in ... with ... between ", " be in ... with ... between " etc., include also wherein that other languages of utilization are represented and with above-mentioned " be in ... with ... between " and " be in ... with ... between " the scope type data of equivalent meanings; Thereby, the identifier of bound formula scope type data comprise "~", "-", " extremely ", " arriving ", "≤X≤", ">=X>=", "<X<", ">X>", " between...and... ", " ... with ... between ", " ... with ... between " etc.; 2. error formula scope type data: specifically refer to through a concrete numerical value and the scope type data that the numerical value that fluctuates is up and down represented, such data be " ... ± ... ", thereby the identifier of error formula scope type data is " ± "; 3. region-type scope type data: the higher limit or the uncertain scope type of the lower limit data of concrete exponential quantity scope; Such data comprise "≤... ", ">=... ", "<... ", ">... ", " not between...and... ", " greater than ... ", " less than ... ", " being not more than ... ", " being not less than ... " etc., include also wherein that other languages of utilization are represented and with the scope type data of above-mentioned " greater than ... ", " less than ... ", " being not more than ... " and " being not less than ... " equivalent meanings; Thereby, the identifier of region-type scope type data comprise "≤", ">=", "<", ">", " not between...and... ", " greater than ", " less than ", " being not more than ", " being not less than " etc.
Step 2, data query, its query script may further comprise the steps:
201, key word of the inquiry input: the key word of the inquiry that adopts the parameter input device input institute of PC to inquire about comprises the field name information that needs inquire about field in the said key word of the inquiry.
202, the query manipulation field analysis is judged: the central processing unit of said PC calls query manipulation field judge module and judges whether the query manipulation field that comprises in institute's input inquiry key word is to store the major key field that major key is numbered: when judgement draws operated field and is major key field, then change step 204 over to; Otherwise, get into step 203.
The query manipulation field that comprises in the said key word of the inquiry be comprise in the key word of the inquiry and query script in the concrete Query Information that need to use; Its by with stored the corresponding major key of data numbering, field name information or concrete numerical value; The purpose of step 202 is specifically judged the query manipulation field exactly; Specifically be to be that major key numbering or concrete numerical value are judged to key word of the inquiry; When key word of the inquiry comprises major key numbering and concrete numerical value simultaneously, then earlier the major key numbering is inquired about.
203, non-major key numbering inquiry: said central processing unit calls lexical analysis and the Symbol recognition module is analyzed the key word of the inquiry of being imported; Judge and whether comprise scope type data identifier in it:, and change step 2031 over to if then separation and Extraction scope type data identifier is arranged; Otherwise, change step 2032 over to;
2031, scope type data type inquiry, its query script is following:
20311, scope type data type identification in the key word of the inquiry: said central processing unit calls scope type data qualification identification module the said scope type data identifier that separation and Extraction goes out is compared with the identifier that said bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and region-type scope type data identifier storehouse are stored respectively; And judge scope type type of data in the key word of the inquiry, and to the synchronous recording judged result according to comparing result;
20312, the concrete query script of scope type data: said central processing unit calls scope type data query module all tables of data of need inquiry is inquired about respectively; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in storer when a plurality of tables of data are inquired about; During inquiry, all identical and all identical to the querying method of all fields of storing in the tables of data to the querying method of all tables of data, for any tables of data that need inquire about wherein, its concrete query script is following:
203121, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding field name information of all fields of storing in the need data query table; And the field name information that comprises in the field name information that will transfer out and the key word of the inquiry compares, and all the consistent fields of field name information that comprise in field name information and the key word of the inquiry are all added mark to be checked;
203122, field to be checked is transferred: said scope type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
203123, individual character segment limit data qualification identification, inquiry and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze, and judges whether comprise scope type data identifier in it: then treat the individual character segment limit data of storing in the inquiry field and inquire about if having; Otherwise, return step 203122, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table.
When treating individual character segment limit data that inquiry stores in the field and inquiring about, said scope type data query module is inquired about the transfer individual character segment limit data of storing in the field to be checked, and all identical to the querying method of all individual character segment limit data; When individual character segment limit data were inquired about: call scope type data qualification identification module earlier, whether judgement needed cargo tracer field range data identical with the scope type data type of key word of the inquiry; When judgement draws the scope type data type that needs cargo tracer field range data and key word of the inquiry when identical; Concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry compares analysis, and judges whether the concrete numerical range of key word of the inquiry is within the concrete numerical range that needs cargo tracer field range data; When numerical range that judgement draws key word of the inquiry was within the concrete numerical range that needs cargo tracer field range data, the major key numbering that these individual character segment limit data are corresponding was saved in the query results;
203124, said central processing unit is judged needs whether the data query table is empty (specifically judging through central processing unit mobile data pointer): if empty, inquiry finishes, and changes step 203125 over to; Otherwise, return step 203122, the storage in the need data query table and the field next to be checked of adding mark to be checked are inquired about;
203125, all major key numberings of being preserved in the query results described in the step 203122 are configured to one and enumerate vectorial selstr;
203126, adopt enumerating vectorial selstr and, all fields of being stored in the need data query table being inquired about of being generated in the step 203124, needing to obtain the Query Result record set of data query table according to the sequencing of memory location;
203127, repeating step 203121 to 203126 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish.
2032, numeric type data query: said central processing unit calls numeric type data query module; And all tables of data of need inquiry are inquired about respectively according to the querying method of conventional numeric type data; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in memory device when a plurality of tables of data are inquired about; And when inquiring about; Querying method to all tables of data is all identical; All need are inquired about all fields of being stored in each tables of data according to the sequencing of memory location and are all identical to the querying method of all fields; For any tables of data that need inquire about wherein, its query script is following:
20321, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding field name information of all fields of storing in the need data query table; And the field name information that comprises in the field name information that will transfer out and the key word of the inquiry compares, and all the consistent fields of field name information that comprise in field name information and the key word of the inquiry are all added mark to be checked;
20322, field to be checked is transferred: said numeric type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
20323, inquiry of individual character segment data and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze; Judge and whether comprise scope type data identifier in it: if having; Return step 20322, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table; Otherwise, treat the individual character segment data of storing in the inquiry field and inquire about.
When treating individual character segment data that inquiry stores in the field and inquiring about; Said numeric type data query module is inquired about the individual character segment data of storing in the transferring field; And the querying method to all individual character segment datas is all identical; All adopt the method that key word of the inquiry of being imported and the individual character segment data of being inquired about are carried out the difference comparison to inquire about: when judgement draws the individual character segment data of being inquired about when identical with key word of the inquiry, then the major key numbering with this individual character segment data field of living in is saved in the query results;
20324, return step 20322, and the next field of storing in the need data query table and add mark to be checked is transferred and inquired about according to the sequencing of memory location; And repeatedly repeating step 20322 is to step 20323, in to need data query table, stores and all fields of adding mark to be checked are all inquired about and finished, and changes step 20325 over to;
20325, all major key numberings of being preserved in the query results described in the step 20324 are configured to one and enumerate vectorial selstr;
20326, adopt enumerating vectorial selstr and, all fields of storing in the need data query table and add mark to be checked being inquired about of being generated in the step 20325, obtain the outcome record collection of need data query table according to the sequencing of memory location;
20326, repeating step 20321 to 20325 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish.
204, major key numbering inquiry: said central processing unit calls numeric type data query module; And all tables of data of need inquiry are inquired about respectively according to the querying method of conventional numeric type data; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in memory device when a plurality of tables of data are inquired about; And when inquiring about; Querying method to all tables of data is all identical; All need are inquired about all fields of being stored in each tables of data according to the sequencing of memory location and are all identical to the querying method of all fields; For any tables of data that need inquire about wherein, its query script is following:
2041, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding major key numbering of all fields of storing in the need data query table; And the major key that will transfer out is numbered and key word of the inquiry compares, and major key numbering all fields identical with key word of the inquiry are all added mark to be checked;
2042, field to be checked is transferred: said numeric type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
2043, inquiry of individual character segment data and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze; Judge whether comprise the major key numbering in it:, treat the major key numbering of storing in the inquiry field and inquire about if having; Otherwise, return step 2042, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table;
Said numeric type data query module is inquired about the major key numbering of storing in the transferring field; And the querying method to all major key numberings is all identical; All adopt the method that the key word of the inquiry of being imported and the major key inquired about numbering are carried out the difference comparison to inquire about:, then this major key of transferring field to be numbered to be saved in the query results when judgement draws the major key numbering of being inquired about when identical with key word of the inquiry;
2044, return step 2042, and the next field of storing in the need data query table and add mark to be checked is transferred and inquired about according to the sequencing of memory location; And repeatedly repeating step 2042 is to step 2043, in to need data query table, stores and all fields of adding mark to be checked are all inquired about and finished, and changes step 2045 over to;
2045, all major key numberings of being preserved in the query results described in the step 2044 are configured to one and enumerate vectorial selstr;
2046, adopt enumerating vectorial selstr and, all fields of storing in the need data query table and add mark to be checked being inquired about of being generated in the step 2045, obtain the outcome record collection of need data query table according to the sequencing of memory location;
2046, repeating step 2041 to 2045 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish.
In the present embodiment; After the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is bound formula scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about, the scope type data query module that said central processing unit is transferred is a bound formula scope type data query module, when said bound formula scope type data query module is carried out in the query script and in step 203121, needed before the inquiry field transfers; Said central processing unit should call bound formula scope type data preprocessing module earlier key word of the inquiry is carried out pre-service, and its preprocessing process may further comprise the steps:
I, transfer the upper lower limit value data except that bound formula scope type data identifier in the key word of the inquiry;
II, call the difference comparison module upper lower limit value data of being transferred out are carried out difference relatively, and the higher value in the two is stored to B_dot, smaller value is stored to S_dot;
The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
I, the pre-service of need cargo tracer field range data: said central processing unit calls bound formula scope type data preprocessing module need cargo tracer field range data is carried out pre-service, and transferring out earlier needs the upper lower limit value data except that bound formula scope type data identifier in the cargo tracer field range data; Afterwards, call the difference comparison module upper lower limit value data of being transferred out are carried out difference relatively;
Ii, difference comparative analysis: call the difference comparison module with the step I difference relatively the higher value that obtained of back and smaller value correspondence respectively with Step II in the numerical value that is stored among B_dot and the S_dot carry out difference relatively: when difference relatively draws when being stored in the numerical value of S_dot in smaller value>=Step II that difference in the numerical value that is stored in B_dot in the step I in difference higher value≤Step II that relatively back is obtained and the step I obtained after relatively, the numerical range that key word of the inquiry is described whether be in need the concrete numerical range of cargo tracer field range data within; Vice versa.
And after the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is error formula scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is an error formula scope type data query module; Carry out in the query script and in step 203121, need before the inquiry field transfers when said error formula scope type data, said central processing unit should call error formula scope type data preprocessing module earlier key word of the inquiry is carried out pre-service, and its preprocessing process may further comprise the steps:
1., transfer error formula scope type data identifier both sides in the key word of the inquiry about two numeric datas;
2., with step transferred out in 1. about two numeric data correspondences be stored to respectively among L_dot and the R_dot;
The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
(1), need the pre-service of cargo tracer field range data: said central processing unit calls error formula scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfer out need error formula scope type data identifier both sides in the cargo tracer field range data about two numeric datas;
(2), the difference comparative analysis: call the difference comparison module with step (1) transfer out about two numeric data correspondences respectively with step (1) in the numerical value that is stored among L_dot and the R_dot carry out difference relatively: when difference draw relatively that the error formula scope type data identifier left data transferred out in the step (1) and step are stored in that numerical value among the L_dot equates in 2. and step (1) in error formula scope type data identifier left data≤step of transferring out when being stored in the numerical value among the R_dot in 2., explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data; Vice versa.
In the present embodiment; Bound formula scope type data identifier described in the step 1 comprise "~", "-", " extremely ", " arriving ", "≤X≤", ">=X>=", "<X<", ">X>", " be tween...and... ", " ... with ... between " and " ... with ... between "; Said error formula scope type data identifier is " ± ", said region-type scope type data identifier comprise "≤", ">=", "<", ">", " not between...and... ", " greater than ", " less than ", " being not more than " and " being not less than ".In the actual use, can add the identifier of three types of scope type data according to the concrete needs of reality.
In the present embodiment; After the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is region-type scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is a region-type scope type data query module; When said region-type scope type data query module is carried out in the query script and in step 203121, needed before the inquiry field transfers, said central processing unit should call region-type scope type data qualification module earlier and the scope type data identifier type of key word of the inquiry is discerned and according to recognition result key word of the inquiry classified: the scope type data identifier that draws key word of the inquiry when judgement gets into step a during for " not between...and... "; The scope type data identifier that draws key word of the inquiry when judgement for "≤", "<", " less than " during with " being not more than ", entering step b; Otherwise, get into step c;
A, key word of the inquiry pre-service, its preprocessing process may further comprise the steps: transfer two limit value data except that region-type scope type data identifier in the key word of the inquiry earlier; Afterwards, call the difference comparison module again two limit value data being transferred out are carried out difference relatively, and the higher value in the two is stored to BI_dot, smaller value is stored to SM_dot;
After the pre-service of key word of the inquiry described in the step a finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
A1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, and transferring out earlier needs two limit value data except that region-type scope type data identifier in the cargo tracer field range data; Call the difference comparison module again transfer out two limit value data that need in the cargo tracer field range data are carried out difference relatively;
A2, difference comparative analysis: call the difference comparison module with the difference of transferring among the step a1 relatively the higher value that obtained of back and smaller value correspondence respectively with step a in the numerical value that is stored among BI_dot and the SM_dot carry out difference relatively: when difference relatively draws when being stored in the numerical value of SM_dot among smaller value≤step a that difference among the numerical value that is stored in BI_dot among the step a1 among difference higher value>=step a that relatively back is obtained and the step a1 obtained after relatively, the numerical range that key word of the inquiry is described whether be in need the concrete numerical range of cargo tracer field range data within; Vice versa;
B, key word of the inquiry pre-service: transfer the numeric data on scope type data identifier right side in the key word of the inquiry, and with transferring data storage to SM;
After the pre-service of key word of the inquiry described in the step b finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
B1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfers out earlier the numeric data that needs scope type data identifier right side in the cargo tracer field range data;
B2, difference comparative analysis: call the difference comparison module and carry out difference relatively:, explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data when difference relatively draws when being stored in the numeric data among the SM among the numeric data≤step b that transfers among the step b1 with being stored in numeric data among the SM among numeric data of transferring among the step b1 and the step b; Vice versa;
C, key word of the inquiry pre-service: transfer the numeric data on scope type data identifier right side in the key word of the inquiry, and with transferring data storage to BI;
After the pre-service of key word of the inquiry described in the step c finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
C1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfers out earlier the numeric data that needs scope type data identifier right side in the cargo tracer field range data;
C2, difference comparative analysis: call the difference comparison module and carry out difference relatively:, explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data when difference relatively draws when being stored in the numeric data among the SM among the numeric data >=step c that transfers among the step c1 with being stored in numeric data among the BI among numeric data of transferring among the step c1 and the step c; Vice versa.
In the present embodiment, after scope type data type was discerned in the step 20311 pair key word of the inquiry, said central processing unit obtained the enquiry module inlet handle (being the entry address) of respective range type data type according to recognition result.Like this, realize that said central processing unit calls corresponding enquiry module (comprising bound formula scope type data query module, error formula scope type data query module and region-type scope type data area formula scope type data query module) automatically according to the recognition result of scope type data type and inquires about.
In the to sum up actual use, as at chemical field, every kind of material many kinds of attributes are all arranged, need get up this multiple property store now, enable to reflect this kind material characteristic in a certain respect.We can if still the attribute of this material demand storage is too much, only be stored in these information in the table these property store in a table, and the attribute field of table is many, and it is loaded down with trivial details to seem.So our design this with a kind of multiple property store of material in different tables, reflect with a kind of material through different tables.Identical major key numbering is set in each table again then (is defined as the field of integer type; Main effect is to make data recording unique; Do not repeat), make that the various attributes of material are well shown, simultaneously; Through the attribute that major key numbering can guarantee to have same numbering again, reflection be identical material property.According to above analysis, design obtains following three tables;
Table 3 Back ground Information list structure:
The field title Data type Length Could be sky Remarks
The composite explosives numbering NUMBER 10 NOT NULL Uniqueness, keyword
The Chinese and English title VARchar2 50 NOT NULL
Code name VARchar2 50 NULL
Classification VARchar2 50 NULL
Preparation technology VARchar2 50 NULL
Relative molecular weight NUMBER 20 NULL
Element is formed VARchar2 50 NULL
Remarks VARchar2 50 NULL
Table 4 physical and chemical performance table:
The field title Data type Length Could be sky Remarks
The composite explosives numbering NUMBER 10 NOT NULL Uniqueness, keyword
Outward appearance VARchar2 100 NULL
Solid density NUMBER 10 NULL
Bulk density NUMBER 10 NULL
Charge density NUMBER 10 NULL
Volatility VARchar2 20 NULL
Acidity value NUMBER 10 NULL
Hydroscopicity NUMBER 10 NULL
Vapor pressure NUMBER 10 NULL
Dissolubility NUMBER 10 NULL
Oxygen balance NUMBER 10 NULL
Toxicity VARchar2 20 NULL
Table 5 roadholding table:
The field name information Data type Length Could be sky Remarks
The composite explosives numbering NUMBER 10 NOT NULL Uniqueness, keyword
The 5s bursting point NUMBER 20 NULL
1000s thermal explosion critical temperature NUMBER 20 NULL
Inflammable index VARchar2 100 NULL
100 ℃ of heat tests VARchar2 100 NULL
Compatibility experiment with metal VARchar2 100 NULL
The experiment of vacuum stability VARchar2 100 NULL
Shelf characteric VARchar2 100 NULL
Mathematic(al) expectation VARchar2 50 NULL
In above-mentioned each table, the composite explosives numbering is that major key field is the major key numbering, through this field, connects three tables.If now say in the physical and chemical performance table; The data of acidity value field are that to be similar to " 7.0 ± 0.5 " such; We the acidity value that will inquire about be all properties of the material of ">7.2 "; So just must handle, just can inquire about, and then obtain the result that we want this string data.And we so do just; At first judge in the data recording of taking out whether contain our defined three types identifier; If contain then call SQL (being bound formula scope type data query module, error formula scope type data query module and region-type scope type data area formula scope type data query module) and handle; Judge according to result, obtain our desired result's composite explosives major key numbering, utilize this major key numbering again; Other tables are inquired about, obtained all properties that we want material.
The above; It only is preferred embodiment of the present invention; Be not that the present invention is done any restriction, every technical spirit changes any simple modification, change and the equivalent structure that above embodiment did according to the present invention, all still belongs in the protection domain of technical scheme of the present invention.

Claims (5)

1. the storage and the querying method of scope type data is characterized in that this method may further comprise the steps:
Step 1, data storage: adopt PC and a plurality of data of needs storage are stored respectively according to conventional input method; And in the tables of data that a plurality of data of being stored all are stored in the memory device to be set up, in a plurality of tables of data that perhaps a plurality of data of being stored are stored in the memory device respectively to be set up according to the difference of field name information; Said field name information is the represented parameter type titles of each data; A plurality of said data comprise numeric type data and two types of data of scope type data, and said numeric type data are the data that explicit value is arranged, and said scope type data mean the data that a scope only arranged and do not have explicit value;
When storing, all identical to the storage mode of all data, and with character string forms each data is stored respectively; Each data of being stored include the field name information, number three category informations with the corresponding concrete numerical value of field name information with to the major key that data are carried out unique differentiation; The quantity of said field name information and said concrete numerical value is one or more, and said field name information and said concrete numerical value are corresponding one by one; Said field name information, concrete numerical value and major key numbering are all stored with the storage mode of individual character section; And the field name information of same data, concrete numerical value and major key numbering are stored in the single field respectively during actual storage; Wherein the concrete numerical value of scope type data is stored with the storage mode of individual character segment limit data; The concrete numerical value of numeric type data is stored with the storage mode of individual character segment data, the concrete numerical value in the same data respectively with field name information and major key numbering between the concrete numerical value that carries out in the related and same data through associative cell number corresponding with the field name information and the major key of these data respectively; When a plurality of said data are stored, the major key of each data numbering all is stored in the major key numbering database, and the dissimilar scope type data identifiers that comprised in a plurality of said data are carried out synchronous recording;
Before the data query; The dissimilar scope type data identifiers that write down are gathered and classify; And through parameter input device and according to the pairing scope type of each scope type data identifier data type; The scope type data identifier that is write down is added into respectively in bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and the region-type scope type data identifier storehouse of setting up in advance, makes said bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and region-type scope type data identifier storehouse comprise all types scope type data identifier of a plurality of said data;
Step 2, data query, its query script may further comprise the steps:
201, key word of the inquiry input: the key word of the inquiry that adopts the parameter input device input institute of PC to inquire about comprises the field name information that needs inquire about field in the said key word of the inquiry;
202, the query manipulation field analysis is judged: the central processing unit of said PC calls query manipulation field judge module and judges whether the query manipulation field that comprises in institute's input inquiry key word is to store the major key field that major key is numbered: when judgement draws operated field and is major key field, then change step 204 over to; Otherwise, get into step 203;
203, non-major key numbering inquiry: said central processing unit calls lexical analysis and the Symbol recognition module is analyzed the key word of the inquiry of being imported; Judge and whether comprise scope type data identifier in it:, and change step 2031 over to if then separation and Extraction scope type data identifier is arranged; Otherwise, change step 2032 over to;
2031, scope type data type inquiry, its query script is following:
20311, scope type data type identification in the key word of the inquiry: said central processing unit calls scope type data qualification identification module the said scope type data identifier that separation and Extraction goes out is compared with the identifier that said bound formula scope type data identifier storehouse, error formula scope type data identifier storehouse and region-type scope type data identifier storehouse are stored respectively; And judge scope type type of data in the key word of the inquiry, and to the synchronous recording judged result according to comparing result;
20312, the concrete query script of scope type data: said central processing unit calls scope type data query module all tables of data of need inquiry is inquired about respectively; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in storer when a plurality of tables of data are inquired about; During inquiry, all identical and all identical to the querying method of all fields of storing in the tables of data to the querying method of all tables of data, for any tables of data that need inquire about wherein, its concrete query script is following:
203121, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding field name information of all fields of storing in the need data query table; And the field name information that comprises in the field name information that will transfer out and the key word of the inquiry compares, and all the consistent fields of field name information that comprise in field name information and the key word of the inquiry are all added mark to be checked;
203122, field to be checked is transferred: said scope type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
203123, individual character segment limit data qualification identification, inquiry and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze, and judges whether comprise scope type data identifier in it: then treat the individual character segment limit data of storing in the inquiry field and inquire about if having; Otherwise, return step 203122, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table;
When treating individual character segment limit data that inquiry stores in the field and inquiring about, said scope type data query module is inquired about the transfer individual character segment limit data of storing in the field to be checked, and all identical to the querying method of all individual character segment limit data; When individual character segment limit data were inquired about: call scope type data qualification identification module earlier, whether judgement needed cargo tracer field range data identical with the scope type data type of key word of the inquiry; When judgement draws the scope type data type that needs cargo tracer field range data and key word of the inquiry when identical; Concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry compares analysis, and judges whether the concrete numerical range of key word of the inquiry is within the concrete numerical range that needs cargo tracer field range data; When numerical range that judgement draws key word of the inquiry was within the concrete numerical range that needs cargo tracer field range data, the major key numbering that these individual character segment limit data are corresponding was saved in the query results;
203124, said central processing unit is judged needs whether the data query table is empty: if empty, inquiry finishes, and changes step 203125 over to; Otherwise, return step 203122, the storage in the need data query table and the field next to be checked of adding mark to be checked are inquired about;
203125, all major key numberings of being preserved in the query results described in the step 203123 are configured to one and enumerate vectorial selstr;
203126, adopt enumerating vectorial selstr and, all fields of being stored in the need data query table being inquired about of being generated in the step 203125, needing to obtain the Query Result record set of data query table according to the sequencing of memory location;
203127, repeating step 203121 to 203126 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish;
2032, numeric type data query: said central processing unit calls numeric type data query module; And all tables of data of need inquiry are inquired about respectively according to the querying method of conventional numeric type data; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in memory device when a plurality of tables of data are inquired about; And when inquiring about; Querying method to all tables of data is all identical; All need are inquired about all fields of being stored in each tables of data according to the sequencing of memory location and are all identical to the querying method of all fields; For any tables of data that need inquire about wherein, its query script is following:
20321, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding field name information of all fields of storing in the need data query table; And the field name information that comprises in the field name information that will transfer out and the key word of the inquiry compares, and all the consistent fields of field name information that comprise in field name information and the key word of the inquiry are all added mark to be checked;
20322, field to be checked is transferred: said numeric type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
20323, inquiry of individual character segment data and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze; Judge and whether comprise scope type data identifier in it: if having; Return step 20322, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table; Otherwise, treat the individual character segment data of storing in the inquiry field and inquire about;
When treating individual character segment data that inquiry stores in the field and inquiring about; Said numeric type data query module is inquired about the individual character segment data of storing in the transferring field; And the querying method to all individual character segment datas is all identical; All adopt the method that key word of the inquiry of being imported and the individual character segment data of being inquired about are carried out the difference comparison to inquire about: when judgement draws the individual character segment data of being inquired about when identical with key word of the inquiry, then the major key numbering with this individual character segment data field of living in is saved in the query results;
20324, return step 20322, and the next field of storing in the need data query table and add mark to be checked is transferred and inquired about according to the sequencing of memory location; And repeatedly repeating step 20322 is to step 20323, in to need data query table, stores and all fields of adding mark to be checked are all inquired about and finished, and changes step 20325 over to;
20325, all major key numberings of being preserved in the query results described in the step 20323 are configured to one and enumerate vectorial selstr;
20326, adopt enumerating vectorial selstr and, all fields of storing in the need data query table and add mark to be checked being inquired about of being generated in the step 20325, obtain the outcome record collection of need data query table according to the sequencing of memory location;
20327, repeating step 20321 to 20326 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish;
204, major key numbering inquiry: said central processing unit calls numeric type data query module; And all tables of data of need inquiry are inquired about respectively according to the querying method of conventional numeric type data; It is one or more needing the quantity of data query table, inquires about according to the sequencing of the memory location of each tables of data in memory device when a plurality of tables of data are inquired about; And when inquiring about; Querying method to all tables of data is all identical; All need are inquired about all fields of being stored in each tables of data according to the sequencing of memory location and are all identical to the querying method of all fields; For any tables of data that need inquire about wherein, its query script is following:
2041, name information contrast: said central processing unit calls name information contrast module; Sequencing according to the memory location is transferred the corresponding major key numbering of all fields of storing in the need data query table; And the major key that will transfer out is numbered and key word of the inquiry compares, and major key numbering all fields identical with key word of the inquiry are all added mark to be checked;
2042, field to be checked is transferred: said numeric type data query module is transferred out a field to be checked of storing and adding mark to be checked in the need data query table according to the sequencing of memory location;
2043, inquiry of individual character segment data and major key numbering are preserved: at first; Said central processing unit calls lexical analysis and Symbol recognition module and exchanges the field to be checked of taking-up and analyze; Judge whether comprise the major key numbering in it:, treat the major key numbering of storing in the inquiry field and inquire about if having; Otherwise, return step 2042, transfer out the field next to be checked of storing and adding mark to be checked in the need data query table;
Said numeric type data query module is inquired about the major key numbering of storing in the transferring field; And the querying method to all major key numberings is all identical; All adopt the method that the key word of the inquiry of being imported and the major key inquired about numbering are carried out the difference comparison to inquire about:, then this major key of transferring field to be numbered to be saved in the query results when judgement draws the major key numbering of being inquired about when identical with key word of the inquiry;
2044, return step 2042, and the next field of storing in the need data query table and add mark to be checked is transferred and inquired about according to the sequencing of memory location; And repeatedly repeating step 2042 is to step 2043, in to need data query table, stores and all fields of adding mark to be checked are all inquired about and finished, and changes step 2045 over to;
2045, all major key numberings of being preserved in the query results described in the step 2043 are configured to one and enumerate vectorial selstr;
2046, adopt enumerating vectorial selstr and, all fields of storing in the need data query table and add mark to be checked being inquired about of being generated in the step 2045, obtain the outcome record collection of need data query table according to the sequencing of memory location;
2047, repeating step 2041 to 2046 repeatedly, and according to the sequencing of memory location other tables of data of need inquiry is inquired about successively, until all being inquired about, all tables of data of need inquiry finish.
2. according to the storage and the querying method of the described a kind of scope type data of claim 1; It is characterized in that: after the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is bound formula scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is a bound formula scope type data query module, adopts said bound formula scope type data query module to carry out in the query script, and before field to be checked is transferred in step 203122; Said central processing unit should call bound formula scope type data preprocessing module earlier key word of the inquiry is carried out pre-service, and its preprocessing process may further comprise the steps:
I, transfer the upper lower limit value data except that bound formula scope type data identifier in the key word of the inquiry;
II, call the difference comparison module upper lower limit value data of being transferred out are carried out difference relatively, and the higher value in the two is stored to B_dot, smaller value is stored to S_dot;
The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203123 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
I, the pre-service of need cargo tracer field range data: said central processing unit calls bound formula scope type data preprocessing module need cargo tracer field range data is carried out pre-service, and transferring out earlier needs the upper lower limit value data except that bound formula scope type data identifier in the cargo tracer field range data; Afterwards, call the difference comparison module upper lower limit value data of being transferred out are carried out difference relatively;
Ii, difference comparative analysis: call the difference comparison module with the step I difference relatively the higher value that obtained of back and smaller value correspondence respectively with Step II in the numerical value that is stored among B_dot and the S_dot carry out difference relatively: when difference relatively draws when being stored in the numerical value of S_dot in smaller value>=Step II that difference in the numerical value that is stored in B_dot in the step I in difference higher value≤Step II that relatively back is obtained and the step I obtained after relatively, the numerical range that key word of the inquiry is described be in need the concrete numerical range of cargo tracer field range data within.
3. according to the storage and the querying method of the described a kind of scope type data of claim 1; It is characterized in that: after the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is error formula scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is an error formula scope type data query module; Carry out in the query script and in step 203121, need before the inquiry field transfers when said error formula scope type data, said central processing unit should call error formula scope type data preprocessing module earlier key word of the inquiry is carried out pre-service, and its preprocessing process may further comprise the steps:
1., transfer error formula scope type data identifier both sides in the key word of the inquiry about two numeric datas;
2., with step transferred out in 1. about two numeric data correspondences be stored to respectively among L_dot and the R_dot;
The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203123 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
(1), need the pre-service of cargo tracer field range data: said central processing unit calls error formula scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfer out need error formula scope type data identifier both sides in the cargo tracer field range data about two numeric datas;
(2), the difference comparative analysis: call the difference comparison module with step (1) transfer out about two numeric data correspondences respectively with step (1) in the numerical value that is stored among L_dot and the R_dot carry out difference relatively: when difference draw relatively that the error formula scope type data identifier left data transferred out in the step (1) and step are stored in that numerical value among the L_dot equates in 2. and step (1) in error formula scope type data identifier left data≤step of transferring out when being stored in the numerical value among the R_dot in 2., explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data.
4. according to the storage and the querying method of claim 1,2 or 3 described a kind of scope type data; It is characterized in that: the bound formula scope type data identifier described in the step 1 comprise "~", "-", " extremely ", " arriving ", "≤X≤", ">=X>=", "<X<", ">X>", " be tween...and... ", " ... with ... between " and " ... with ... between "; Said error formula scope type data identifier is " ± ", said region-type scope type data identifier comprise "≤", ">=", "<", ">", " not between...and... ", " greater than ", " less than ", " being not more than " and " being not less than ".
5. according to the storage and the querying method of the described a kind of scope type data of claim 4; It is characterized in that: after the key word of the inquiry Classification and Identification described in the step 20311; When judgement draws said key word of the inquiry and is region-type scope type data; Then carry out scope type data in the step 20312 when specifically inquiring about; The scope type data query module that said central processing unit is transferred is a region-type scope type data query module; When said region-type scope type data query module is carried out in the query script and in step 203121, needed before the inquiry field transfers; Said central processing unit should call region-type scope type data qualification module earlier and the scope type data identifier type of key word of the inquiry is discerned and according to recognition result key word of the inquiry classified: the scope type data identifier that draws key word of the inquiry when judgement gets into step a during for " not between...and... "; The scope type data identifier that draws key word of the inquiry when judgement for "≤", "<", " less than " during with " being not more than ", entering step b; Otherwise, get into step c;
A, key word of the inquiry pre-service, its preprocessing process may further comprise the steps: transfer two limit value data except that region-type scope type data identifier in the key word of the inquiry earlier; Afterwards, call the difference comparison module again two limit value data being transferred out are carried out difference relatively, and the higher value in the two is stored to BI_dot, smaller value is stored to SM_dot;
After the pre-service of key word of the inquiry described in the step a finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
A1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, and transferring out earlier needs two limit value data except that region-type scope type data identifier in the cargo tracer field range data; Call the difference comparison module again transfer out two limit value data that need in the cargo tracer field range data are carried out difference relatively;
A2, difference comparative analysis: call the difference comparison module with the difference of transferring among the step a1 relatively the higher value that obtained of back and smaller value correspondence respectively with step a in the numerical value that is stored among BI_dot and the SM_dot carry out difference relatively: when difference relatively draws when being stored in the numerical value of SM_dot among smaller value≤step a that difference among the numerical value that is stored in BI_dot among the step a1 among difference higher value>=step a that relatively back is obtained and the step a1 obtained after relatively, the numerical range that key word of the inquiry is described whether be in need the concrete numerical range of cargo tracer field range data within;
B, key word of the inquiry pre-service: transfer the numeric data on scope type data identifier right side in the key word of the inquiry, and with transferring data storage to SM;
After the pre-service of key word of the inquiry described in the step b finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
B1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfers out earlier the numeric data that needs scope type data identifier right side in the cargo tracer field range data;
B2, difference comparative analysis: call the difference comparison module and carry out difference relatively:, explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data when difference relatively draws when being stored in the numeric data among the SM among the numeric data≤step b that transfers among the step b1 with being stored in numeric data among the SM among numeric data of transferring among the step b1 and the step b;
C, key word of the inquiry pre-service: transfer the numeric data on scope type data identifier right side in the key word of the inquiry, and with transferring data storage to BI;
After the pre-service of key word of the inquiry described in the step c finishes; The concrete numerical value to comprising in need cargo tracer field range data and the key word of the inquiry described in the step 203122 compares to be analyzed and judges that its comparative analysis process was following when whether the concrete numerical range that needs cargo tracer field range data was within the numerical range of key word of the inquiry:
C1, the pre-service of need cargo tracer field range data: said central processing unit calls region-type scope type data preprocessing module need cargo tracer field range data is carried out pre-service, transfers out earlier the numeric data that needs scope type data identifier right side in the cargo tracer field range data;
C 2, difference comparative analysis: call the difference comparison module and carry out difference relatively:, explain whether the numerical range of key word of the inquiry is within the concrete numerical range of need cargo tracer field range data when difference relatively draws when being stored in the numeric data among the SM among the numeric data >=step c that transfers among the step c1 with being stored in numeric data among the BI among numeric data of transferring among the step c1 and the step c.
CN201010617843A 2010-12-31 2010-12-31 Method for storing and inquiring range data Expired - Fee Related CN102004804B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010617843A CN102004804B (en) 2010-12-31 2010-12-31 Method for storing and inquiring range data

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010617843A CN102004804B (en) 2010-12-31 2010-12-31 Method for storing and inquiring range data

Publications (2)

Publication Number Publication Date
CN102004804A CN102004804A (en) 2011-04-06
CN102004804B true CN102004804B (en) 2012-09-05

Family

ID=43812166

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010617843A Expired - Fee Related CN102004804B (en) 2010-12-31 2010-12-31 Method for storing and inquiring range data

Country Status (1)

Country Link
CN (1) CN102004804B (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9495418B2 (en) * 2013-08-07 2016-11-15 International Business Machines Corporation Scalable acceleration of database query operations
CN106874318B (en) * 2016-06-08 2020-01-14 阿里巴巴集团控股有限公司 Information query method and device
CN108038224A (en) * 2017-12-25 2018-05-15 合肥宽信机电有限公司 A kind of new water physical property querying method of computer based
CN109068170B (en) * 2018-07-03 2021-11-09 武汉斗鱼网络科技有限公司 Storage method, device, terminal and storage medium for barrage message
EP3641275A1 (en) * 2018-10-18 2020-04-22 Siemens Aktiengesellschaft Method, device and a computer program for automatically processing data labels
CN111339133B (en) * 2018-12-19 2022-08-05 深圳市优必选科技有限公司 Data segmentation method and device, computer equipment and storage medium
CN109656928B (en) * 2018-12-24 2020-09-01 成都四方伟业软件股份有限公司 Method and device for obtaining relationships between tables
CN111949663B (en) * 2020-08-17 2021-07-30 沈阳京华博瑞科技有限公司 Big data main foreign key consistency evaluation method, device and equipment
CN114048238B (en) * 2022-01-12 2022-04-12 树根互联股份有限公司 Storage method and device for industrial equipment time sequence data and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007139751A2 (en) * 2006-05-22 2007-12-06 Initiate Systems, Inc. Method and system for indexing information about entities with respect to hierarchies
CN101441654A (en) * 2008-12-16 2009-05-27 腾讯科技(深圳)有限公司 Database retrieving method and system
CN101770483A (en) * 2008-12-29 2010-07-07 华为技术有限公司 Self-adaption search method, device and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007139751A2 (en) * 2006-05-22 2007-12-06 Initiate Systems, Inc. Method and system for indexing information about entities with respect to hierarchies
CN101441654A (en) * 2008-12-16 2009-05-27 腾讯科技(深圳)有限公司 Database retrieving method and system
CN101770483A (en) * 2008-12-29 2010-07-07 华为技术有限公司 Self-adaption search method, device and system

Also Published As

Publication number Publication date
CN102004804A (en) 2011-04-06

Similar Documents

Publication Publication Date Title
CN102004804B (en) Method for storing and inquiring range data
CN106295250A (en) Method and device is analyzed in the quick comparison of the short sequence of secondary order-checking
Shao et al. An efficient similarity search framework for SimRank over large dynamic graphs
CN103116713B (en) Based on compound and the prediction of protein-protein interaction method of random forest
CN103164408B (en) Information based on vertical search engine stores, querying method and device thereof
CN109117440B (en) Metadata information acquisition method, system and computer readable storage medium
CN102243664B (en) Data storage and query method for compound fields
CN102375852A (en) Method for building data index as well as method and system using data index for inquiring data
CN104090962A (en) Nested query method oriented to mass distributed-type database
CN102831224A (en) Creating method for data index base and searching suggest generation method and device
CN106326475A (en) High-efficiency static hash table implement method and system
CN102169491B (en) Dynamic detection method for multi-data concentrated and repeated records
CN103914456A (en) Data storage method and system
CN107463711A (en) A kind of tag match method and device of data
CN105335481A (en) Large scale character string text suffix index building method and device
CN102339256B (en) Complex event detection method on basis of IMF (instance matching frequency) internal and external memory replacement policy
CN103440249A (en) System and method for rapidly searching unstructured data
Rachtman et al. The impact of contaminants on the accuracy of genome skimming and the effectiveness of exclusion read filters
CN103617163A (en) Quick target association method based on clustering analysis
CN101908102B (en) Precasting method and device for stalk-based RNA (Ribonucleic Acid) secondary structure
CN101493340B (en) Method for quickly searching interested point information in navigation system for vehicles
US7725448B2 (en) Method and system for disjunctive single index access
CN103034656A (en) Chapter content tiering method and device, and article content tiering method and device
US20080114752A1 (en) Querying across disparate schemas
Abeywickrama et al. Hierarchical graph traversal for aggregate k nearest neighbors search in road networks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120905

Termination date: 20191231

CF01 Termination of patent right due to non-payment of annual fee