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

Method for storing and inquiring range data Download PDF

Info

Publication number
CN102004804A
CN102004804A CN 201010617843 CN201010617843A CN102004804A CN 102004804 A CN102004804 A CN 102004804A CN 201010617843 CN201010617843 CN 201010617843 CN 201010617843 A CN201010617843 A CN 201010617843A CN 102004804 A CN102004804 A CN 102004804A
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.)
Granted
Application number
CN 201010617843
Other languages
Chinese (zh)
Other versions
CN102004804B (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

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 is all very big with the inquiry workload.Below enumerating several examples 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 (identity number) 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 (identity number) card No. of Xi'an is between 6100XXXXXX-6109XXXXXX again, and the Weinan City ID (identity number) card No. is between 6111XXXXXX-6119XXXXXX; Then store by the district again, wherein the ID (identity number) card No. of Changan District is between 61001XXXXX-61009XXXXX, the ID (identity number) card No. of Lianhu District is between 61011XXXXX-61019XXXXX, will there be a large amount of wide-style data during above-mentioned data storage, 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, as 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, in order to obtain very accurate data, measure and got following data: T1=2.813 ± 0.002s 1000 times, T2=2.815 ± 0.001s, T3=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 to record at a certain temperature a batch data, 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 above-mentioned scope type data of having measured, then by navigating under this temperature range, check the situation of change of some data, 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, measure respectively and contain the N amount in each reaction product, a series of data have been obtained, 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 at scope type data (comprising the error pattern data), for example at chemical field, often exist such as require temperature within ± 0.2 scope, to wait a series of data of this type 40 ℃-80 ℃ or error, the feature 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 data are divided into two row, more be listed as even.Adopt two row fields write down respectively this range data bound (just can save as for 40 ℃-80 ℃ as 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 by 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 at the processing of these class 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 finishes data query.Just be stored as the upper limit as 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 at 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 solution used in the present invention 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, perhaps in a plurality of tables of data that 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; Described field name information is the represented parameter type titles of each data; A plurality of described data comprise numeric type data and two types of data of scope type data, and the data of explicit value are determined and had to the value that described numeric type data are data, and described 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 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 described field name information and described concrete numerical value is one or more, and described field name information and described concrete numerical value are corresponding one by one; Described 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 during actual storage, concrete numerical value and major key numbering are stored in the single field respectively, 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 undertaken in the related and same data by associative cell number corresponding with the field name information and the major key of these data respectively; When a plurality of described 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 described data are carried out synchronous recording;
Before the data query, the dissimilar scope type data identifiers that write down are gathered and classify, and by described 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 the bound formula scope type data identifier storehouse of setting up in advance respectively, in error formula scope type data identifier storehouse and the region-type scope type data identifier storehouse, make described 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 described 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 the parameter input device input of employing PC will be inquired about comprises the field name information that needs the inquiry field in the described key word of the inquiry;
202, the query manipulation field analysis is judged: the central processing unit of described 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, enter step 203;
203, non-major key numbering inquiry: described 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 as follows:
20311, scope type data type identification in the key word of the inquiry: described central processing unit calls scope type data qualification identification module the described scope type data identifier that separation and Extraction goes out is compared with the identifier that described 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 the type of scope type 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: described 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 as follows:
203121, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the field name information of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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, described 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, the concrete numerical value that comprises in need cargo tracer field range data and the key word of the inquiry is analyzed, 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 is within the concrete numerical range that needs cargo tracer field range data, the major key numbering of this individual character segment limit data correspondence is saved in the query results;
203124, described 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 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: described 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 as follows:
20321, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the field name information of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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, described 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, the method that all adopts the key word of the inquiry that will be imported and the individual character segment data of being inquired about to carry out the difference comparison is inquired 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, stores in to need data query table 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: described 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 as follows:
2041, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the major key numbering of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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;
Described 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, the method that all adopts the key word of the inquiry that will be imported and the major key of being inquired about numbering to carry out the difference comparison is inquired about: when judgement draws the major key numbering of being inquired about when identical with key word of the inquiry, the major key of then this being transferred field is numbered and is saved in the query results;
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, stores in to need data query table 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.
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 described 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 described central processing unit is transferred is a bound formula scope type data query module, adopt described 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, described 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 difference smaller value 〉=Step II that relatively back is obtained 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, the numerical range that key word of the inquiry be described be in need the concrete numerical range of cargo tracer field range data within; Vice versa.
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 described 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 described central processing unit is transferred is an error formula scope type data query module, when described error formula scope type data are carried out in the query script and needed in step 203121 before the inquiry field transfers, described 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., two numeric data correspondences are stored to respectively among L_dot and the R_dot about step being transferred out in 1.;
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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numerical value among the R_dot in 2., illustrate 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.
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 comprises "~", "-", " extremely ", " arrive ", "≤X≤", " 〉=X 〉=", "<X<", ">X>", " between...and... ", " ... and ... between " and " ... with ... between ", described error formula scope type data identifier is " ± ", and described region-type scope type data identifier comprises "≤", " 〉=", "<", ">", " not between...and... ", " greater than ", " less than ", " be 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 described 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 described central processing unit is transferred is a region-type scope type data query module, when described region-type scope type data query module is carried out in the query script and needed in step 203121 before the inquiry field transfers, described 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 be classified: the scope type data identifier that draws key word of the inquiry when judgement enters step a during for " not between...and... "; The scope type data identifier that draws key word of the inquiry when judgement for "≤", "<", " less than " and when " being not more than ", enter step b; Otherwise, enter 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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, the difference comparative analysis: call the difference comparison module with the difference transferred 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 difference smaller value≤step a that relatively back is obtained 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, the numerical range that key word of the inquiry be 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numeric data that is stored among the numeric data transferred among the step b1 and the step b among the SM is carried out difference relatively: when difference relatively draws the numeric data that is stored among the numeric data≤step b that transfers among the step b1 among the SM, illustrate 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;
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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numeric data that is stored among the numeric data transferred among the step c1 and the step c among the BI is carried out difference relatively: when difference relatively draws the numeric data that is stored among the numeric data 〉=step c that transfers among the step c1 among the SM, illustrate 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.
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 scope type data to be stored 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%~60% o'clock, here 40, %,~, 60, % is a character, and they is not regarded 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 that character string type is (at the SQLSever database, corresponding type is exactly nvarchar[(n)], 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 met the custom that people store data at ordinary times, and saved storage space, intuitively embody 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, intuitively embody simultaneously 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.
Below by drawings and Examples, technical scheme of the present invention is described in further detail.
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
As shown in Figure 1 and 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, perhaps in a plurality of tables of data that 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; Described field name information is the represented parameter type titles of each data; A plurality of described data comprise numeric type data and two types of data of scope type data, and the data of explicit value are determined and had to the value that described numeric type data are data, and described 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 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 described field name information and described concrete numerical value is one or more, and described field name information and described concrete numerical value are corresponding one by one; Described 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 during actual storage, concrete numerical value and major key numbering are stored in the single field respectively, 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 undertaken in the related and same data by associative cell number corresponding with the field name information and the major key of these data respectively; When a plurality of described 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 described data are carried out synchronous recording.Wherein, field name information is used to distinguish each field and writes down parameter types such as the physical quantity of concrete numerical value representative or chemistry amount, as temperature, pressure, pressure etc.As chemical test test data table 1 and the table of being stored 2:
The tested material information data table memory of table 1 chemical test
Major key numbering material title material type storage condition (℃)
1 nitrolite 20~40
2 TNT explosives 50 ± 20%
The tested substance testing parametric data table of table 2 chemical test
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 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.Similarly, for the data of being stored in the table 2 " 200 " respectively and the field name information of these data " experiment pressure (Pa) " and major key number between " 2 " 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 by described 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 the bound formula scope type data identifier storehouse of setting up in advance respectively, in error formula scope type data identifier storehouse and the region-type scope type data identifier storehouse, make described 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 described data.
Actual when carrying out data storage, people are according at ordinary times data storage custom, and all data storage that will need with character string forms to store are to one or more tables of data that are associated.Among the present invention, all data of need storages are divided into two big classes: 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.Described scope type data comprise following three class data: 1. bound formula scope type data: specifically refer to the scope type data represented by two upper lower limit values, such data comprise " ...~... ", " ...-... ", " ... extremely ... ", " ... arrive ... ", " ...≤X≤... ", " ... 〉=X 〉=... ", " ...<X<... ", " ...>X>... ", " between...and... ", " be in ... and ... between ", " be in ... with ... between " etc., include also wherein that other languages of utilization are represented and with above-mentioned " be in ... and ... 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... ", " ... and ... between ", " ... with ... between " etc.; 2. error formula scope type data: specifically refer to by 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 the parameter input device input of employing PC will be inquired about comprises the field name information that needs the inquiry field in the described key word of the inquiry.
202, the query manipulation field analysis is judged: the central processing unit of described 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, enter step 203.
The query manipulation field that comprises in the described 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: described 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 as follows:
20311, scope type data type identification in the key word of the inquiry: described central processing unit calls scope type data qualification identification module the described scope type data identifier that separation and Extraction goes out is compared with the identifier that described 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 the type of scope type 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: described 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 as follows:
203121, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the field name information of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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, described 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, the concrete numerical value that comprises in need cargo tracer field range data and the key word of the inquiry is analyzed, 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 is within the concrete numerical range that needs cargo tracer field range data, the major key numbering of this individual character segment limit data correspondence is saved in the query results;
203124, described central processing unit is judged needs whether the data query table is empty (specifically judging by 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: described 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 as follows:
20321, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the field name information of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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, described 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, the method that all adopts the key word of the inquiry that will be imported and the individual character segment data of being inquired about to carry out the difference comparison is inquired 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, stores in to need data query table 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: described 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 as follows:
2041, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the major key numbering of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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;
Described 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, the method that all adopts the key word of the inquiry that will be imported and the major key of being inquired about numbering to carry out the difference comparison is inquired about: when judgement draws the major key numbering of being inquired about when identical with key word of the inquiry, the major key of then this being transferred field is numbered and is saved in the query results;
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, stores in to need data query table 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 described 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 described central processing unit is transferred is a bound formula scope type data query module, when described bound formula scope type data query module is carried out in the query script and needed in step 203121 before the inquiry field transfers, described 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 difference smaller value 〉=Step II that relatively back is obtained 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, the numerical range that key word of the inquiry be 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 described 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 described central processing unit is transferred is an error formula scope type data query module, when described error formula scope type data are carried out in the query script and needed in step 203121 before the inquiry field transfers, described 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., two numeric data correspondences are stored to respectively among L_dot and the R_dot about step being transferred out in 1.;
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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numerical value among the R_dot in 2., illustrate 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 comprises "~", "-", " extremely ", " arrive ", "≤X≤", " 〉=X 〉=", "<X<", ">X>", " between...and... ", " ... and ... between " and " ... with ... between ", described error formula scope type data identifier is " ± ", and described region-type scope type data identifier comprises "≤", " 〉=", "<", ">", " not between...and... ", " greater than ", " less than ", " be 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 described 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 described central processing unit is transferred is a region-type scope type data query module, when described region-type scope type data query module is carried out in the query script and needed in step 203121 before the inquiry field transfers, described 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 be classified: the scope type data identifier that draws key word of the inquiry when judgement enters step a during for " not between...and... "; The scope type data identifier that draws key word of the inquiry when judgement for "≤", "<", " less than " and when " being not more than ", enter step b; Otherwise, enter 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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, the difference comparative analysis: call the difference comparison module with the difference transferred 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 difference smaller value≤step a that relatively back is obtained 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, the numerical range that key word of the inquiry be 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numeric data that is stored among the numeric data transferred among the step b1 and the step b among the SM is carried out difference relatively: when difference relatively draws the numeric data that is stored among the numeric data≤step b that transfers among the step b1 among the SM, illustrate 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;
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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numeric data that is stored among the numeric data transferred among the step c1 and the step c among the BI is carried out difference relatively: when difference relatively draws the numeric data that is stored among the numeric data 〉=step c that transfers among the step c1 among the SM, illustrate 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, after scope type data type was discerned in the step 20311 pair key word of the inquiry, described 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 described 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 by 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, by 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:
Field name 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:
Field name 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:
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, by this field, three tables is connected.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, the acidity value that we will inquire about is all properties of the material of ">7.2 ", so just must handle this string data, just can inquire about, and then obtain the result that we want.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 self-defining function (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 imposed any restrictions, everyly any simple modification that above embodiment did, change and equivalent structure changed, all still belong in the protection domain of technical solution of the present invention according to the technology of the present invention essence.

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, perhaps in a plurality of tables of data that 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; Described field name information is the represented parameter type titles of each data; A plurality of described data comprise numeric type data and two types of data of scope type data, and the data of explicit value are determined and had to the value that described numeric type data are data, and described 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 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 described field name information and described concrete numerical value is one or more, and described field name information and described concrete numerical value are corresponding one by one; Described 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 during actual storage, concrete numerical value and major key numbering are stored in the single field respectively, 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 undertaken in the related and same data by associative cell number corresponding with the field name information and the major key of these data respectively; When a plurality of described 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 described data are carried out synchronous recording;
Before the data query, the dissimilar scope type data identifiers that write down are gathered and classify, and by described 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 the bound formula scope type data identifier storehouse of setting up in advance respectively, in error formula scope type data identifier storehouse and the region-type scope type data identifier storehouse, make described 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 described 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 the parameter input device input of employing PC will be inquired about comprises the field name information that needs the inquiry field in the described key word of the inquiry;
202, the query manipulation field analysis is judged: the central processing unit of described 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, enter step 203;
203, non-major key numbering inquiry: described 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 as follows:
20311, scope type data type identification in the key word of the inquiry: described central processing unit calls scope type data qualification identification module the described scope type data identifier that separation and Extraction goes out is compared with the identifier that described 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 the type of scope type 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: described 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 as follows:
203121, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the field name information of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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, described 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, the concrete numerical value that comprises in need cargo tracer field range data and the key word of the inquiry is analyzed, 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 is within the concrete numerical range that needs cargo tracer field range data, the major key numbering of this individual character segment limit data correspondence is saved in the query results;
203124, described 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 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: described 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 as follows:
20321, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the field name information of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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, described 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, the method that all adopts the key word of the inquiry that will be imported and the individual character segment data of being inquired about to carry out the difference comparison is inquired 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, stores in to need data query table 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: described 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 as follows:
2041, name information contrast: described central processing unit calls name information contrast module, according to the sequencing of memory location the major key numbering of all field correspondences of storing in the need data query table is transferred, 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: described 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, described 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;
Described 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, the method that all adopts the key word of the inquiry that will be imported and the major key of being inquired about numbering to carry out the difference comparison is inquired about: when judgement draws the major key numbering of being inquired about when identical with key word of the inquiry, the major key of then this being transferred field is numbered and is saved in the query results;
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, stores in to need data query table 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.
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 described 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 described central processing unit is transferred is a bound formula scope type data query module, adopt described 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, described 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 difference smaller value 〉=Step II that relatively back is obtained 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, the numerical range that key word of the inquiry be described be in need the concrete numerical range of cargo tracer field range data within; Vice versa.
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 described 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 described central processing unit is transferred is an error formula scope type data query module, when described error formula scope type data are carried out in the query script and needed in step 203121 before the inquiry field transfers, described 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., two numeric data correspondences are stored to respectively among L_dot and the R_dot about step being transferred out in 1.;
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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numerical value among the R_dot in 2., illustrate 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.
4. according to claim 1, the storage and the querying method of 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 comprises "~", "-", " extremely ", " arrive ", "≤X≤", " 〉=X 〉=", "<X<", ">X>", " between...and... ", " ... and ... between " and " ... with ... between ", described error formula scope type data identifier is " ± ", and described region-type scope type data identifier comprises "≤", " 〉=", "<", ">", " not between...and... ", " greater than ", " less than ", " be 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 described 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 described central processing unit is transferred is a region-type scope type data query module, when described region-type scope type data query module is carried out in the query script and needed in step 203121 before the inquiry field transfers, described 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 be classified: the scope type data identifier that draws key word of the inquiry when judgement enters step a during for " not between...and... "; The scope type data identifier that draws key word of the inquiry when judgement for "≤", "<", " less than " and when " being not more than ", enter step b; Otherwise, enter 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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, the difference comparative analysis: call the difference comparison module with the difference transferred 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 difference smaller value≤step a that relatively back is obtained 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, the numerical range that key word of the inquiry be 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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numeric data that is stored among the numeric data transferred among the step b1 and the step b among the SM is carried out difference relatively: when difference relatively draws the numeric data that is stored among the numeric data≤step b that transfers among the step b1 among the SM, illustrate 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;
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 is analyzed and judges that its comparative analysis process was as follows 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: described 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 numeric data that is stored among the numeric data transferred among the step c1 and the step c among the BI is carried out difference relatively: when difference relatively draws the numeric data that is stored among the numeric data 〉=step c that transfers among the step c1 among the SM, illustrate 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.
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 true CN102004804A (en) 2011-04-06
CN102004804B 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)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346433A (en) * 2013-08-07 2015-02-11 国际商业机器公司 Method and system of scalable acceleration of database query operations
CN106874318A (en) * 2016-06-08 2017-06-20 阿里巴巴集团控股有限公司 A kind of method and device of information inquiry
CN108038224A (en) * 2017-12-25 2018-05-15 合肥宽信机电有限公司 A kind of new water physical property querying method of computer based
CN109068170A (en) * 2018-07-03 2018-12-21 武汉斗鱼网络科技有限公司 A kind of storage method, device, terminal and the storage medium of barrage message
CN109656928A (en) * 2018-12-24 2019-04-19 成都四方伟业软件股份有限公司 Relationship preparation method and device between table
CN111339133A (en) * 2018-12-19 2020-06-26 深圳市优必选科技有限公司 Data segmentation method and device, computer equipment and storage medium
CN111949663A (en) * 2020-08-17 2020-11-17 沈阳京华博瑞科技有限公司 Big data main foreign key consistency evaluation method, device and equipment
CN112868217A (en) * 2018-10-18 2021-05-28 西门子股份公司 Method, apparatus and computer program for automatically processing data identifiers
CN114048238A (en) * 2022-01-12 2022-02-15 树根互联股份有限公司 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

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104346433B (en) * 2013-08-07 2017-10-17 国际商业机器公司 Method and system for the scalable acceleration of database query operations
CN104346433A (en) * 2013-08-07 2015-02-11 国际商业机器公司 Method and system of scalable acceleration of database query operations
CN106874318B (en) * 2016-06-08 2020-01-14 阿里巴巴集团控股有限公司 Information query method and device
CN106874318A (en) * 2016-06-08 2017-06-20 阿里巴巴集团控股有限公司 A kind of method and device of information inquiry
CN108038224A (en) * 2017-12-25 2018-05-15 合肥宽信机电有限公司 A kind of new water physical property querying method of computer based
CN109068170A (en) * 2018-07-03 2018-12-21 武汉斗鱼网络科技有限公司 A kind of storage method, device, terminal and the storage medium of barrage message
CN112868217A (en) * 2018-10-18 2021-05-28 西门子股份公司 Method, apparatus and computer program for automatically processing data identifiers
CN112868217B (en) * 2018-10-18 2024-04-09 西门子股份公司 Method for automatically processing data identifiers, data carrier and computer system
CN111339133A (en) * 2018-12-19 2020-06-26 深圳市优必选科技有限公司 Data segmentation method and device, computer equipment and storage medium
CN111339133B (en) * 2018-12-19 2022-08-05 深圳市优必选科技有限公司 Data segmentation method and device, computer equipment and storage medium
CN109656928A (en) * 2018-12-24 2019-04-19 成都四方伟业软件股份有限公司 Relationship preparation method and device between table
CN109656928B (en) * 2018-12-24 2020-09-01 成都四方伟业软件股份有限公司 Method and device for obtaining relationships between tables
CN111949663A (en) * 2020-08-17 2020-11-17 沈阳京华博瑞科技有限公司 Big data main foreign key consistency evaluation method, device and equipment
CN114048238A (en) * 2022-01-12 2022-02-15 树根互联股份有限公司 Storage method and device for industrial equipment time sequence data and electronic equipment
CN114048238B (en) * 2022-01-12 2022-04-12 树根互联股份有限公司 Storage method and device for industrial equipment time sequence data and electronic equipment

Also Published As

Publication number Publication date
CN102004804B (en) 2012-09-05

Similar Documents

Publication Publication Date Title
CN102004804B (en) Method for storing and inquiring range data
CN103116713B (en) Based on compound and the prediction of protein-protein interaction method of random forest
CN106295250A (en) Method and device is analyzed in the quick comparison of the short sequence of secondary order-checking
CN106933833B (en) Method for quickly querying position information based on spatial index technology
US8943091B2 (en) System, method, and computer program product for performing a string search
CN102243664B (en) Data storage and query method for compound fields
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
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
CN104268280A (en) Layering storage and inquiring method based on key value database
CN106326475A (en) High-efficiency static hash table implement method and system
CN105335481A (en) Large scale character string text suffix index building method and device
CN102456055A (en) Method and device for retrieving interest points
CN102831224A (en) Creating method for data index base and searching suggest generation method and device
CN107463711A (en) A kind of tag match method and device of data
CN103914456A (en) Data storage method and system
CN102339256B (en) Complex event detection method on basis of IMF (instance matching frequency) internal and external memory replacement policy
CN103473056A (en) Automatic generation method for telemetering configuration files
Rachtman et al. The impact of contaminants on the accuracy of genome skimming and the effectiveness of exclusion read filters
CN101908102B (en) Precasting method and device for stalk-based RNA (Ribonucleic Acid) secondary structure
CN103617163A (en) Quick target association method based on clustering analysis
CN103440249A (en) System and method for rapidly searching unstructured data
Park et al. Localized network centrality and essentiality in the yeast–protein interaction network
CN103034656A (en) Chapter content tiering method and device, and article content tiering method and device

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20120905

Termination date: 20191231