CN110162537A - Data query method and device, storage medium and electronic equipment - Google Patents
Data query method and device, storage medium and electronic equipment Download PDFInfo
- Publication number
- CN110162537A CN110162537A CN201910317816.XA CN201910317816A CN110162537A CN 110162537 A CN110162537 A CN 110162537A CN 201910317816 A CN201910317816 A CN 201910317816A CN 110162537 A CN110162537 A CN 110162537A
- Authority
- CN
- China
- Prior art keywords
- checked
- data
- query result
- condition
- dictionary data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/242—Query formulation
- G06F16/2425—Iterative querying; Query formulation based on the results of a preceding query
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/24—Querying
- G06F16/248—Presentation of query results
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Databases & Information Systems (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The embodiment of the present invention is to belong to big data processing technology field about a kind of data query method and device, storage medium and electronic equipment, this method comprises: receiving the condition to be checked of user's input;Wherein, condition to be checked includes one of keyword to be checked, logical relation and logical expression for being generated according to keyword to be checked with logical relation or a variety of;Dictionary data corresponding with keyword to be checked is generated according to keyword to be checked, logical relation and logical expression;Dictionary data is inquired, the query result of condition to be checked is obtained;Query result is ranked up, and the query result after sequence is shown, so that user checks.This method solve as that can only input the problem that query result accuracy is lower caused by a querying condition and efficiency is lower every time, improve the accuracy rate and search efficiency of query result in the prior art.
Description
Technical field
The present embodiments relate to big data processing technology fields, in particular to a kind of data query method, data
Inquiry unit, computer readable storage medium and electronic equipment.
Background technique
In today of scientific and technological high speed development, internet affects our study, life and work in different ways.
Wherein it is possible to mutually exchange, work by network, valuable data are found, to promote working efficiency and living standard, are changed
Kind life style and work and study mode.But with the fast development of cybertimes, exponential type is presented in the data generated daily
Sharp increase, therefore it is also more difficult for the inquiry of data.
In the existing data query method based on ElasticSearch, ElasticSearch can only installed
Host on, execute curl order inquired;But on the one hand this method has the drawback that, carried out by curl order
Inquiry can only be inquired every time for a querying condition, so that obtained query result accuracy is lower;Another party
Face needs by hand repeatedly input inquiry condition, efficiency when if there is multiple conditions and the progress of multirow data while inquiry operation
It is lower.
Accordingly, it is desirable to provide a kind of new data query method and device.
It should be noted that the information in the invention of above-mentioned background technology part is only used for reinforcing the reason to background of the invention
Solution, therefore may include the information not constituted to the prior art known to persons of ordinary skill in the art.
Summary of the invention
The purpose of the present invention is to provide a kind of data query methods, data query device, computer readable storage medium
And electronic equipment, and then query result caused by the limitation and defect due to the relevant technologies is overcome at least to a certain extent
The problem that accuracy rate is lower and search efficiency is lower.
According to one aspect of the disclosure, a kind of data query method is provided, comprising:
Receive the condition to be checked of user's input;Wherein, the condition to be checked includes keyword to be checked, logical relation
And one of logical expression generated according to the keyword to be checked with the logical relation or a variety of;
It is generated and the keyword to be checked according to keyword, logical relation and the logical expression to be checked
Corresponding dictionary data;
The dictionary data is inquired, the query result of the condition to be checked is obtained;
The query result is ranked up, and the query result after sequence is shown, for user progress
It checks.
In a kind of exemplary embodiment of the disclosure, the dictionary data is inquired, obtains the item to be checked
The query result of part includes:
If the dictionary data is individual data, directly reads the dictionary data and inquired, obtains described
The query result of condition to be checked;
If the dictionary data is multiple data, circuits sequentially and read each dictionary data and inquired, obtain
To the query result of the condition to be checked.
In a kind of exemplary embodiment of the disclosure, the query result is ranked up includes:
Judge whether the matching degree of the query result is more than or equal to preset matching degree;
If the matching degree of the query result is more than or equal to the preset matching degree, the query result is arranged
Sequence;
If the matching degree of the query result is less than the preset matching degree, adjust the number of the dictionary data into
Row is inquired again, and is ranked up to the query result inquired again.
In a kind of exemplary embodiment of the disclosure, the query result is ranked up further include:
According to the degree of correlation size of the query result and the condition to be checked, and/or
According to the search order of each dictionary data, the query result is ranked up.
In a kind of exemplary embodiment of the disclosure, before being ranked up to the query result, the data are looked into
Inquiry method further include:
Judge in the query result whether to include abnormal data;
If including the abnormal data in the query result, the abnormal data is filtered.
It is described after the query result for obtaining the condition to be checked in a kind of exemplary embodiment of the disclosure
Data query method further include:
The dictionary data is identified according to the condition to be checked, and establish the condition to be checked and mark after
Dictionary data between mapping relations;
To after the condition to be checked, the mark dictionary data and the mapping relations store;And
Be spaced preset time, to after the condition to be checked of storage, the mark dictionary data and the mapping
Relationship is updated.
In a kind of exemplary embodiment of the disclosure, it is spaced preset time, to the condition to be checked of storage, described
Dictionary data and the mapping relations after mark are updated and include:
It is spaced the preset time, dictionary data and the mapping after judging the condition to be checked, the mark
Whether the frequency of use of relationship is higher than preset threshold;
If frequency of use is higher than the preset threshold, according to the height of frequency of use to the condition to be checked, institute
Dictionary data and the mapping relations after stating mark are ranked up;
If frequency of use is lower than the preset threshold, to the word after the condition to be checked of storage, the mark
Allusion quotation data and the mapping relations are deleted.
According to one aspect of the disclosure, a kind of data query device is provided, comprising:
Receiving module, for receiving the condition to be checked of user's input;Wherein, the condition to be checked includes pass to be checked
One of key word, logical relation and logical expression for being generated according to the keyword to be checked and the logical relation or
It is a variety of;
Dictionary data generation module, for according to keyword, logical relation and the logical expression to be checked
Generate dictionary data corresponding with the keyword to be checked;
Enquiry module obtains the query result of the condition to be checked for inquiring the dictionary data;
Display module for being ranked up to the query result, and the query result after sequence is shown, for
The user checks.
In a kind of exemplary embodiment of the disclosure, the dictionary data is inquired, obtains the item to be checked
The query result of part includes:
If the dictionary data is individual data, directly reads the dictionary data and inquired, obtains described
The query result of condition to be checked;
If the dictionary data is multiple data, circuits sequentially and read each dictionary data and inquired, obtain
To the query result of the condition to be checked.
In a kind of exemplary embodiment of the disclosure, the query result is ranked up includes:
Judge whether the matching degree of the query result is more than or equal to preset matching degree;
If the matching degree of the query result is more than or equal to the preset matching degree, the query result is arranged
Sequence;
If the matching degree of the query result is less than the preset matching degree, adjust the number of the dictionary data into
Row is inquired again, and is ranked up to the query result inquired again.
In a kind of exemplary embodiment of the disclosure, the query result is ranked up further include:
According to the degree of correlation size of the query result and the condition to be checked, and/or
According to the search order of each dictionary data, the query result is ranked up.
In a kind of exemplary embodiment of the disclosure, the data query device further include:
Judgment module, for judging in the query result whether to include abnormal data;
Filtering module, if carried out for including the abnormal data in the query result to the abnormal data
Filtering.
In a kind of exemplary embodiment of the disclosure, the data query device further include:
Mark module for being identified according to the condition to be checked to the dictionary data, and is established described to be checked
The mapping relations between dictionary data after inquiry condition and mark;
Memory module, for after the condition to be checked, the mark dictionary data and the mapping relations into
Row storage;And
Update module, for being spaced preset time, to the dictionary data after the condition to be checked of storage, the mark
And the mapping relations are updated.
In a kind of exemplary embodiment of the disclosure, it is spaced preset time, to the condition to be checked of storage, described
Dictionary data and the mapping relations after mark are updated and include:
It is spaced the preset time, dictionary data and the mapping after judging the condition to be checked, the mark
Whether the frequency of use of relationship is higher than preset threshold;
If frequency of use is higher than the preset threshold, according to the height of frequency of use to the condition to be checked, institute
Dictionary data and the mapping relations after stating mark are ranked up;
If frequency of use is lower than the preset threshold, to the word after the condition to be checked of storage, the mark
Allusion quotation data and the mapping relations are deleted.
According to one aspect of the disclosure, a kind of computer readable storage medium is provided, computer program is stored thereon with,
The computer program realizes data query method described in above-mentioned any one when being executed by processor.
According to one aspect of the disclosure, a kind of electronic equipment is provided, comprising:
Processor;And
Memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to execute number described in above-mentioned any one via the executable instruction is executed
According to querying method.
A kind of data query method of the embodiment of the present invention, on the one hand, by receiving the condition to be checked of user's input, then root
Dictionary data corresponding with keyword to be checked is generated according to keyword to be checked, logical relation and logical expression;To dictionary
Data are inquired, and the query result of condition to be checked is obtained;Query result is ranked up, and by the query result after sequence
It is shown, so that user checks, solves in the prior art as that can only be inputted caused by a querying condition every time
The problem that query result accuracy is lower and efficiency is lower improves the accuracy rate and search efficiency of query result;It is another
Aspect by generating corresponding dictionary data, and inquires dictionary data to obtain query result, and it is accurately fixed to allow to
The corresponding query result of the dictionary data is arrived in position, avoids as needing repeatedly inquiry burden caused by system, while also mentioning
The high accuracy rate of inquiry;In another aspect, then the query result after sequence is opened up by being ranked up to query result
Show, so that user checks, user is allowed rapidly to find required query result, improve checking for user
The user experience is improved simultaneously for efficiency.
It should be understood that above general description and following detailed description be only it is exemplary and explanatory, not
It can the limitation present invention.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows and meets implementation of the invention
Example, and be used to explain the principle of the present invention together with specification.It should be evident that the accompanying drawings in the following description is only the present invention
Some embodiments for those of ordinary skill in the art without creative efforts, can also basis
These attached drawings obtain other attached drawings.
Fig. 1 schematically shows a kind of flow chart of data query method according to the embodiment of the present disclosure.
Fig. 2 schematically shows the method flow diagram being ranked up according to a kind of pair of query result of the embodiment of the present disclosure.
Fig. 3 schematically shows the method flow diagram of another data query according to the embodiment of the present disclosure.
Fig. 4 schematically shows a kind of interval preset time according to the embodiment of the present disclosure, to the item to be checked of storage
The method flow diagram that dictionary data and the mapping relations after part, the mark are updated.
Fig. 5 schematically shows a kind of block diagram of data query device according to the embodiment of the present disclosure.
Fig. 6 is schematically shown to be set according to a kind of electronics for realizing above-mentioned data query method of the embodiment of the present disclosure
It is standby.
Fig. 7 is schematically shown can according to a kind of computer for realizing above-mentioned data query method of the embodiment of the present disclosure
Read storage medium.
Specific embodiment
Example embodiment is described more fully with reference to the drawings.However, example embodiment can be with a variety of shapes
Formula is implemented, and is not understood as limited to example set forth herein;On the contrary, thesing embodiments are provided so that the present invention will more
Fully and completely, and by the design of example embodiment comprehensively it is communicated to those skilled in the art.Described feature, knot
Structure or characteristic can be incorporated in any suitable manner in one or more embodiments.In the following description, it provides perhaps
More details fully understand embodiments of the present invention to provide.It will be appreciated, however, by one skilled in the art that can
It is omitted with practicing technical solution of the present invention one or more in the specific detail, or others side can be used
Method, constituent element, device, step etc..In other cases, be not shown in detail or describe known solution to avoid a presumptuous guest usurps the role of the host and
So that each aspect of the present invention thickens.
In addition, attached drawing is only schematic illustrations of the invention, it is not necessarily drawn to scale.Identical attached drawing mark in figure
Note indicates same or similar part, thus will omit repetition thereof.Some block diagrams shown in the drawings are function
Energy entity, not necessarily must be corresponding with physically or logically independent entity.These function can be realized using software form
Energy entity, or these functional entitys are realized in one or more hardware modules or integrated circuit, or at heterogeneous networks and/or place
These functional entitys are realized in reason device device and/or microcontroller device.
A kind of data query method is provided firstly in this example embodiment, this method can run on server, clothes
Business device cluster or Cloud Server etc., can also run on device end;Certainly, those skilled in the art can also exist according to demand
Other platforms run method of the invention, and particular determination is not done to this in the present exemplary embodiment.Refering to what is shown in Fig. 1, the data
Querying method may comprise steps of:
Step S110. receives the condition to be checked of user's input;Wherein, the condition to be checked includes key to be checked
One of word, logical relation and logical expression for being generated according to the keyword to be checked and the logical relation are more
Kind.
Step S120. according to the keyword to be checked, logical relation and the logical expression generate with it is described to
The corresponding dictionary data of key word of the inquiry.
Step S130. inquires the dictionary data, obtains the query result of the condition to be checked.
Step S140. is ranked up the query result, and the query result after sequence is shown, for described
User checks.
In above-mentioned data query method, on the one hand, by receiving the condition to be checked of user's input, further according to pass to be checked
Key word, logical relation and logical expression generate dictionary data corresponding with keyword to be checked;Dictionary data is looked into
It askes, obtains the query result of condition to be checked;Query result is ranked up, and the query result after sequence is shown,
So that user checks, solve in the prior art since the standard of query result caused by a querying condition can only be inputted every time
The problem that exactness is lower and efficiency is lower improves the accuracy rate and search efficiency of query result;On the other hand, pass through life
At corresponding dictionary data, and dictionary data is inquired to obtain query result, allows to accurately navigate to the dictionary
The corresponding query result of data avoids as needing repeatedly inquiry burden caused by system, while also improving inquiry
Accuracy rate;In another aspect, then the query result after sequence is shown by being ranked up to query result, for
Family is checked, user is allowed rapidly to find required query result, and improve user checks efficiency simultaneously
The user experience is improved.
In the following, will be carried out in conjunction with attached drawing to each step in data query method above-mentioned in this example embodiment detailed
Explanation and explanation.
In step s 110, the condition to be checked of user's input is received;Wherein, the condition to be checked includes pass to be checked
One of key word, logical relation and logical expression for being generated according to the keyword to be checked and the logical relation or
It is a variety of.
In this example embodiment, user can be in the ElasticSearch of server (or device end) offer
Condition to be checked is inputted in the interface of search engine;Wherein, which may include keyword to be checked, logical relation
And the expression formula etc. generated according to keyword to be checked and logical relation.For example, keyword to be checked for example can wrap
It includes: name of product, manufacturer, specifications and models and manufacturer, the place of production etc.;Logical relation for example may include: and
(with), or (or), not (non-), xor (exclusive or), (matching 0 is any by adj (the two adjacent, the former first occurs) and %
Multiple characters) etc..
In this example embodiment, by taking medical industry as an example, to the key to be checked for including in above-mentioned condition to be checked
Word is further illustrated.For example, corresponding name of product can be erythromycin;Model may include enteric coatel tablets enteric
Capsule, injection sterile powder, eye ointment and ointment etc.;Specification for example may include 0.125g, 0.25g, can be according to type
Number difference, corresponding different specification;Manufacturer for example may include producer A, producer B, producer C and producer D etc.;It produces
Ground for example may include Beijing, Guangzhou, Shenzhen, Nanjing etc..Expression formula for example can be with are as follows: erythromycin and enteric coated tablet and
0.125g;Or: erythromycin and (enteric coated tablet not eye ointment) and 0.125g and (producer A not producer B);Example again
Such as, or: erythromycin and (enteric coated tablet not eye ointment) and (0.125g or 0.25g) and (producer A not producer B)
Etc.;Other expression formulas can also be generated, there is no special restriction on this for this example according to actual needs.
Further, it can also establish between keyword to be checked and multiple expression formulas corresponding with keyword to be checked
Mapping relations;Then keyword to be checked, expression formula and mapping relations are stored to database again;So that carry out next time
When inquiry, can first inquire in database whether there is a certain keyword expression formula, if there is and meet user's condition, then may be used
It directly to be inquired, does not need to generate expression formula again, query time can be saved;Further, empty in order to save storage
Between, it can be spaced preset time, the frequency of use of the expression formula of above-mentioned keyword is counted, if statistical result showed should
The frequency of use of the expression formula of keyword reaches preset threshold, then can continue to store;If the statistical result showed keyword
The frequency of use of expression formula be not up to preset threshold, then the expression formula of the keyword can be deleted.
In the step s 120, according to keyword, logical relation and the logical expression generation to be checked and institute
State the corresponding dictionary data of keyword to be checked.
In this example embodiment, dictionary data may include at data item, data structure, data storage and data
Reason etc.;Wherein, data item for example may include: data item number, data item title, alias, symbolic name, data type, length
Degree and value range etc.;Data structure for example may include: data structure number, data structure name, alias, summary with
And composition etc.;Data storage for example may include: data storage number, data store name, source and composition etc.;Number
It for example may include: that processing number, processing well-known city, inflow data flow, outflow data flow, process cycle and processing are patrolled according to processing
Volume etc..For example, data storage number: F01;Data store name: drug inquiry;Source: user's input;Composition: erythromycin
And enteric coated tablet and 0.125g etc..
In step s 130, the dictionary data is inquired, obtains the query result of the condition to be checked.
In this example embodiment, if the dictionary data is individual data, dictionary data can be read directly
And inquired, obtain the query result of condition to be checked;If dictionary data is multiple data, circuits sequentially and read each word
Allusion quotation data are simultaneously inquired, and the query result of the condition to be checked is obtained.Further, after obtaining query result, may be used also
It specifically may include: to judge in the query result whether to include abnormal data to be filtered to query result;If institute
Stating in query result includes the abnormal data, then is filtered to the abnormal data.Specifically, abnormal data for example can be with
It is obviously not meet the desired query result of user;Or imperfect and query result there are risk is filtered to data
Etc.;For example, be not the query result of drug in the query result of erythromycin and enteric coated tablet and 0.125g to including, or
Person does not include the query result etc. of erythromycin feature, can handle as abnormal data, can filter this out;Or occur
After a certain query result, shows that the query result is risk query result, can also directly filter this out.By using the party
Method not only increases user to the efficiency of checking of query result, while can also further improve the safety of system.
In step S140, the query result is ranked up, and the query result after sequence is shown, for
The user checks.
It, can be according to the degree of correlation size of the query result and the condition to be checked in this example embodiment;
The query result can also be ranked up according to the search order of each dictionary data;Then again by looking into after sequence
It askes result to be shown, so that user checks.Herein it should be added that, it is corresponding if it is a dictionary data
Query result can be then ranked up according to query result and the degree of correlation size of condition to be checked;If it is multiple dictionary numbers
According to corresponding query result, then can according to the search order of each dictionary data, to the corresponding query result of each dictionary data into
Row sequence;It, can also be according to the sizes related of each dictionary data corresponding query result and condition to be checked after the completion of sequence
Minor sort etc. again is carried out, there is no special restriction on this for this example.
Fig. 2 schematically shows a kind of method flow diagram being ranked up to the query result.Refering to what is shown in Fig. 2, to looking into
Asking result and being ranked up may include step S210, step S220 and step S230, be described in detail below.
In step S210, judge whether the matching degree of the query result is more than or equal to preset matching degree.
In step S220, if the matching degree of the query result is more than or equal to the preset matching degree, to described
Query result is ranked up.
In step S230, if the matching degree of the query result is less than the preset matching degree, the word is adjusted
The number of allusion quotation data is inquired again, and is ranked up to the query result inquired again.
In the following, detailed explanation and explanation will be carried out to step S210- step S230.First, it is determined that query result
Whether matching degree is more than or equal to preset matching degree;Wherein, which for example can be 100%, be also possible to 90% etc.
Deng there is no special restriction on this for this example;It then, can be with if the matching degree of query result is more than or equal to preset matching degree
According to query result with the degree of correlation size of condition to be checked or according to the search order of each dictionary data, inquiry is tied
Fruit is ranked up;Further, if the matching degree of query result is less than preset matching degree, of adjustable dictionary data
Number (such as can be the number etc. for increasing dictionary data, it specifically may include: that key to be checked is increased by prompt user
The number of word or the quantity of logical relation, and then reach the number of the quantity and dictionary data that increase logical relation expression formula
Amount) it is inquired again, and the query result inquired again is ranked up.It, can be with for example, in order to which query time can be saved
One dictionary data is set, if the matching degree of query result reaches preset matching degree, can not have to continue growing dictionary
The number of data;If the matching degree of query result is not up to preset matching degree, the number of dictionary data can be continued growing,
Until the matching degree of query result reaches preset matching degree.
Fig. 3 schematically shows another data query method of the embodiment of the present disclosure.Refering to what is shown in Fig. 3, the data query
Method can also include step S310, step S320 and step S330, be described in detail below.
In step s310, the dictionary data is identified according to the condition to be checked, and established described to be checked
The mapping relations between dictionary data after inquiry condition and mark.
In step s 320, to after the condition to be checked, the mark dictionary data and the mapping relations into
Row storage.
In step S330, it is spaced preset time, to the dictionary data after the condition to be checked of storage, the mark
And the mapping relations are updated.
In the following, will step S310- step S330 be explained and be illustrated.Firstly, according to condition to be checked to dictionary
Data are identified;Dictionary data is named etc. for example, can use keyword to be checked;Then it resettles to be checked
The mapping relations between dictionary data after condition and mark;After mapping relations are established, after querying condition, mark can be treated
Dictionary data and mapping relations stored;Wherein it is possible to store to local data base, also can store to cloud etc.
Deng there is no special restriction on this for this example;After the completion of storage, it can be spaced preset time, to local data base or cloud
The condition to be checked of storage, the dictionary data after mark and mapping relations are updated etc..Wherein, preset time one day or
Person three days, it is also possible to one week etc., there is no special restriction on this for this example.Further, to be checked with this when receiving again
Whether when the identical condition to be checked of inquiry condition, can directly retrieve in the database has dictionary corresponding with the condition to be checked
Data structure;If so, then directly reading the element in dictionary data structure as querying condition, completion is inquired
As a result.By using the program, the query time of user can be further saved, improves search efficiency.
Fig. 4 schematically shows a kind of interval preset time of the embodiment of the present disclosure, to the condition to be checked of storage, institute
The method flow diagram that dictionary data and the mapping relations after stating mark are updated.Refering to what is shown in Fig. 4, when interval is default
Between, to after the condition to be checked of storage, the mark dictionary data and the mapping relations be updated and can wrap
Step S410, step S420 and step S430 are included, carries out detailed explanation and explanation below.
In step S410, it is spaced the preset time, the dictionary data after judging the condition to be checked, the mark
And whether the frequency of use of the mapping relations is higher than preset threshold.
In the step s 420, if frequency of use is higher than the preset threshold, according to the height of frequency of use to described
Dictionary data and the mapping relations after condition to be checked, the mark are ranked up.
In step S430, if frequency of use is lower than the preset threshold, to the condition to be checked of storage, institute
Dictionary data and the mapping relations after stating mark are deleted.
In the following, will step S410- step S430 be explained and be illustrated.Firstly, being spaced above-mentioned preset time, calculate
The frequency of use of dictionary data and mapping relations after above-mentioned condition to be checked, mark;After obtaining the frequency of use, judgement
Whether the frequency of use is higher than preset threshold;Wherein, which for example can be 50 times or 60 times etc., this example pair
This does not do specifically limited;Secondly, if frequency of use is higher than preset threshold, it can be according to the height of frequency of use to storage
Mapping relations described in dictionary data after condition to be checked, mark are ranked up;For example, can be by access times coming at most
Foremost, in this way can be in order to inquiring;It further, can be to the to be checked of storage if the fish preset threshold of frequency of use
Dictionary data and mapping relations after inquiry condition, mark are deleted.In this way, not only saving query time, but also drop
The low system burden of local data base or cloud.
The disclosure additionally provides a kind of data query device.Refering to what is shown in Fig. 5, the data query device may include receiving
Module 510, dictionary data generation module 520, enquiry module 530 and display module 540.Wherein:
Receiving module 510 can be used for receiving the condition to be checked of user's input;Wherein, the condition to be checked include to
In key word of the inquiry, logical relation and the logical expression that is generated according to the keyword to be checked and the logical relation
It is one or more.
Dictionary data generation module 520 can be used for according to keyword, logical relation and the logic to be checked
Expression formula generates dictionary data corresponding with the keyword to be checked.
Enquiry module 530 can be used for inquiring the dictionary data, obtain the inquiry knot of the condition to be checked
Fruit.
Display module 540 can be used for being ranked up the query result, and the query result after sequence is opened up
Show, so that the user checks.
In a kind of illustrative embodiments of the disclosure, the dictionary data is inquired, is obtained described to be checked
If the query result of condition includes: that the dictionary data is individual data, directly reads the dictionary data and looked into
It askes, obtains the query result of the condition to be checked;If the dictionary data is multiple data, circuits sequentially and read each institute
It states dictionary data and is inquired, obtain the query result of the condition to be checked.
In a kind of illustrative embodiments of the disclosure, the query result is ranked up includes:
Judge whether the matching degree of the query result is more than or equal to preset matching degree;If the matching of the query result
Degree is more than or equal to the preset matching degree, then is ranked up to the query result;If the matching degree of the query result is small
In the preset matching degree, then the number for adjusting the dictionary data is inquired again, and to the query result inquired again
It is ranked up.
In a kind of illustrative embodiments of the disclosure, the query result is ranked up further include: according to described
The degree of correlation size of query result and the condition to be checked, and/or according to the search order of each dictionary data, to described
Query result is ranked up.
In a kind of illustrative embodiments of the disclosure, the data query device further include:
Whether judgment module can be used for judging in the query result including abnormal data;
Filtering module, if can be used in the query result including the abnormal data, to the abnormal data
It is filtered.
In a kind of illustrative embodiments of the disclosure, the data query device further include:
Mark module can be used for being identified the dictionary data according to the condition to be checked, and described in foundation
The mapping relations between dictionary data after condition to be checked and mark;
Memory module, can be used for after the condition to be checked, the mark dictionary data and the mapping close
System is stored;And
Update module can be used for being spaced preset time, to the dictionary after the condition to be checked of storage, the mark
Data and the mapping relations are updated.
In a kind of exemplary embodiment of the disclosure, it is spaced preset time, to the condition to be checked of storage, described
Dictionary data and the mapping relations after mark are updated and include:
It is spaced the preset time, dictionary data and the mapping after judging the condition to be checked, the mark
Whether the frequency of use of relationship is higher than preset threshold;
If frequency of use is higher than the preset threshold, according to the height of frequency of use to the condition to be checked, institute
Dictionary data and the mapping relations after stating mark are ranked up;
If frequency of use is lower than the preset threshold, to the word after the condition to be checked of storage, the mark
Allusion quotation data and the mapping relations are deleted.
The detail of each module has carried out in corresponding data query method in detail in above-mentioned data query device
Thin description, therefore details are not described herein again.
It should be noted that although being referred to several modules or list for acting the equipment executed in the above detailed description
Member, but this division is not enforceable.In fact, embodiment according to the present invention, it is above-described two or more
Module or the feature and function of unit can embody in a module or unit.Conversely, an above-described mould
The feature and function of block or unit can be to be embodied by multiple modules or unit with further division.
In addition, although describing each step of method in the present invention in the accompanying drawings with particular order, this does not really want
These steps must be executed in this particular order by asking or implying, or having to carry out step shown in whole could realize
Desired result.Additional or alternative, it is convenient to omit multiple steps are merged into a step and executed by certain steps, and/
Or a step is decomposed into execution of multiple steps etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server, mobile terminal or network equipment etc.) executes embodiment according to the present invention
Method.
In an exemplary embodiment of the present invention, a kind of electronic equipment that can be realized the above method is additionally provided.
Person of ordinary skill in the field it is understood that various aspects of the invention can be implemented as system, method or
Program product.Therefore, various aspects of the invention can be embodied in the following forms, it may be assumed that complete hardware embodiment, complete
The embodiment combined in terms of full Software Implementation (including firmware, microcode etc.) or hardware and software, can unite here
Referred to as circuit, " module " or " system ".
The electronic equipment 600 of this embodiment according to the present invention is described referring to Fig. 6.The electronics that Fig. 6 is shown
Equipment 600 is only an example, should not function to the embodiment of the present invention and use scope bring any restrictions.
As shown in fig. 6, electronic equipment 600 is showed in the form of universal computing device.The component of electronic equipment 600 can wrap
It includes but is not limited to: at least one above-mentioned processing unit 610, at least one above-mentioned storage unit 620, the different system components of connection
The bus 630 of (including storage unit 620 and processing unit 610).
Wherein, the storage unit is stored with program code, and said program code can be held by the processing unit 610
Row, so that various according to the present invention described in the execution of the processing unit 610 above-mentioned " illustrative methods " part of this specification
The step of illustrative embodiments.For example, the processing unit 610 can execute step S110 as shown in fig. 1: receiving and use
The condition to be checked of family input;Wherein, the condition to be checked include keyword to be checked, logical relation and according to it is described to
One of logical expression that key word of the inquiry is generated with the logical relation is a variety of;Step S120: according to described to be checked
Ask keyword, logical relation and the logical expression generate dictionary data corresponding with the keyword to be checked;Step
S130: inquiring the dictionary data, obtains the query result of the condition to be checked;Step S140: to the inquiry
As a result it is ranked up, and the query result after sequence is shown, so that the user checks.
Storage unit 620 may include the readable medium of volatile memory cell form, such as Random Access Storage Unit
(RAM) 6201 and/or cache memory unit 6202, it can further include read-only memory unit (ROM) 6203.
Storage unit 620 can also include program/utility with one group of (at least one) program module 6205
6204, such program module 6205 includes but is not limited to: operating system, one or more application program, other program moulds
It may include the realization of network environment in block and program data, each of these examples or certain combination.
Bus 630 can be to indicate one of a few class bus structures or a variety of, including storage unit bus or storage
Cell controller, peripheral bus, graphics acceleration port, processing unit use any bus structures in a variety of bus structures
Local bus.
Electronic equipment 600 can also be with one or more external equipments 700 (such as keyboard, sensing equipment, bluetooth equipment
Deng) communication, can also be enabled a user to one or more equipment interact with the electronic equipment 600 communicate, and/or with make
Any equipment (such as the router, modulation /demodulation that the electronic equipment 600 can be communicated with one or more of the other calculating equipment
Device etc.) communication.This communication can be carried out by input/output (I/O) interface 650.Also, electronic equipment 600 can be with
By network adapter 660 and one or more network (such as local area network (LAN), wide area network (WAN) and/or public network,
Such as internet) communication.As shown, network adapter 660 is communicated by bus 630 with other modules of electronic equipment 600.
It should be understood that although not shown in the drawings, other hardware and/or software module can not used in conjunction with electronic equipment 600, including but not
Be limited to: microcode, device driver, redundant processing unit, external disk drive array, RAID system, tape drive and
Data backup storage system etc..
Through the above description of the embodiments, those skilled in the art is it can be readily appreciated that example described herein is implemented
Mode can also be realized by software realization in such a way that software is in conjunction with necessary hardware.Therefore, according to the present invention
The technical solution of embodiment can be embodied in the form of software products, which can store non-volatile at one
Property storage medium (can be CD-ROM, USB flash disk, mobile hard disk etc.) in or network on, including some instructions are so that a calculating
Equipment (can be personal computer, server, terminal installation or network equipment etc.) executes embodiment according to the present invention
Method.
In an exemplary embodiment of the present invention, a kind of computer readable storage medium is additionally provided, energy is stored thereon with
Enough realize the program product of this specification above method.In some possible embodiments, various aspects of the invention may be used also
In the form of being embodied as a kind of program product comprising program code, when described program product is run on the terminal device, institute
Program code is stated for executing the terminal device described in above-mentioned " illustrative methods " part of this specification according to this hair
The step of bright various illustrative embodiments.
Refering to what is shown in Fig. 7, describing the program product for realizing the above method of embodiment according to the present invention
710, can using portable compact disc read only memory (CD-ROM) and including program code, and can in terminal device,
Such as it is run on PC.However, program product of the invention is without being limited thereto, in this document, readable storage medium storing program for executing can be with
To be any include or the tangible medium of storage program, the program can be commanded execution system, device or device use or
It is in connection.
Described program product can be using any combination of one or more readable mediums.Readable medium can be readable letter
Number medium or readable storage medium storing program for executing.Readable storage medium storing program for executing for example can be but be not limited to electricity, magnetic, optical, electromagnetic, infrared ray or
System, device or the device of semiconductor, or any above combination.The more specific example of readable storage medium storing program for executing is (non exhaustive
List) include: electrical connection with one or more conducting wires, portable disc, hard disk, random access memory (RAM), read-only
Memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read only memory
(CD-ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
In carry readable program code.The data-signal of this propagation can take various forms, including but not limited to electromagnetic signal,
Optical signal or above-mentioned any appropriate combination.Readable signal medium can also be any readable Jie other than readable storage medium storing program for executing
Matter, the readable medium can send, propagate or transmit for by instruction execution system, device or device use or and its
The program of combined use.
The program code for including on readable medium can transmit with any suitable medium, including but not limited to wirelessly, have
Line, optical cable, RF etc. or above-mentioned any appropriate combination.
The program for executing operation of the present invention can be write with any combination of one or more programming languages
Code, described program design language include object oriented program language-Java, C++ etc., further include conventional
Procedural programming language-such as " C " language or similar programming language.Program code can be fully in user
It calculates and executes in equipment, partly executes on a user device, being executed as an independent software package, partially in user's calculating
Upper side point is executed on a remote computing or is executed in remote computing device or server completely.It is being related to far
Journey calculates in the situation of equipment, and remote computing device can pass through the network of any kind, including local area network (LAN) or wide area network
(WAN), it is connected to user calculating equipment, or, it may be connected to external computing device (such as utilize ISP
To be connected by internet).
In addition, above-mentioned attached drawing is only the schematic theory of processing included by method according to an exemplary embodiment of the present invention
It is bright, rather than limit purpose.It can be readily appreciated that the time that above-mentioned processing shown in the drawings did not indicated or limited these processing is suitable
Sequence.In addition, be also easy to understand, these processing, which can be, for example either synchronously or asynchronously to be executed in multiple modules.
Those skilled in the art will readily occur to of the invention its after considering specification and the invention invented here of practice
His embodiment.This application is intended to cover any variations, uses, or adaptations of the invention, these modifications, purposes or
Adaptive change follow general principle of the invention and the common knowledge in the art do not invented including the present invention or
Conventional techniques.The description and examples are only to be considered as illustrative, and true scope and spirit of the invention are by claim
It points out.
Claims (10)
1. a kind of data query method characterized by comprising
Receive the condition to be checked of user's input;Wherein, the condition to be checked include keyword to be checked, logical relation and
One of logical expression generated according to the keyword to be checked with the logical relation is a variety of;
It is generated according to keyword, logical relation and the logical expression to be checked corresponding with the keyword to be checked
Dictionary data;
The dictionary data is inquired, the query result of the condition to be checked is obtained;
The query result is ranked up, and the query result after sequence is shown, so that the user checks.
2. data query method according to claim 1, which is characterized in that inquire the dictionary data, obtain
The query result of the condition to be checked includes:
If the dictionary data is individual data, directly reads the dictionary data and inquired, obtained described to be checked
The query result of inquiry condition;
If the dictionary data is multiple data, circuits sequentially and read each dictionary data and inquired, obtain institute
State the query result of condition to be checked.
3. data query method according to claim 2, which is characterized in that be ranked up to the query result and include:
Judge whether the matching degree of the query result is more than or equal to preset matching degree;
If the matching degree of the query result is more than or equal to the preset matching degree, the query result is ranked up;
If the matching degree of the query result is less than the preset matching degree, the number for adjusting the dictionary data is carried out again
Secondary inquiry, and the query result inquired again is ranked up.
4. data query method according to claim 2, which is characterized in that be ranked up to the query result and also wrap
It includes:
According to the degree of correlation size of the query result and the condition to be checked, and/or
According to the search order of each dictionary data, the query result is ranked up.
5. data query method according to claim 1, which is characterized in that be ranked up it to the query result
Before, the data query method further include:
Judge in the query result whether to include abnormal data;
If including the abnormal data in the query result, the abnormal data is filtered.
6. data query method according to claim 1, which is characterized in that obtaining the inquiry knot of the condition to be checked
After fruit, the data query method further include:
The dictionary data is identified according to the condition to be checked, and establishes the word after the condition to be checked and mark
Mapping relations between allusion quotation data;
To after the condition to be checked, the mark dictionary data and the mapping relations store;And
Be spaced preset time, to after the condition to be checked of storage, the mark dictionary data and the mapping relations
It is updated.
7. data query method according to claim 6, which is characterized in that interval preset time, to described in storage to
Dictionary data and the mapping relations after querying condition, the mark are updated and include:
It is spaced the preset time, dictionary data and the mapping relations after judging the condition to be checked, the mark
Frequency of use whether be higher than preset threshold;
If frequency of use is higher than the preset threshold, according to the height of frequency of use to the condition to be checked, the mark
Dictionary data and the mapping relations after knowledge are ranked up;
If frequency of use is lower than the preset threshold, to the dictionary number after the condition to be checked of storage, the mark
Accordingly and the mapping relations are deleted.
8. a kind of data query device characterized by comprising
Receiving module, for receiving the condition to be checked of user's input;Wherein, the condition to be checked includes key to be checked
One of word, logical relation and logical expression for being generated according to the keyword to be checked and the logical relation are more
Kind;
Dictionary data generation module, for being generated according to keyword, logical relation and the logical expression to be checked
Dictionary data corresponding with the keyword to be checked;
Enquiry module obtains the query result of the condition to be checked for inquiring the dictionary data;
Display module for being ranked up to the query result, and the query result after sequence is shown, for described
User checks.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program quilt
Claim 1-7 described in any item data query methods are realized when processor executes.
10. a kind of electronic equipment characterized by comprising
Processor;And
Memory, for storing the executable instruction of the processor;
Wherein, the processor is configured to require 1-7 described in any item via executing the executable instruction and carry out perform claim
Data query method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910317816.XA CN110162537A (en) | 2019-04-19 | 2019-04-19 | Data query method and device, storage medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910317816.XA CN110162537A (en) | 2019-04-19 | 2019-04-19 | Data query method and device, storage medium and electronic equipment |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110162537A true CN110162537A (en) | 2019-08-23 |
Family
ID=67639764
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910317816.XA Pending CN110162537A (en) | 2019-04-19 | 2019-04-19 | Data query method and device, storage medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110162537A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110674179A (en) * | 2019-09-24 | 2020-01-10 | 政采云有限公司 | Query interface generation method, device and medium |
CN110955686A (en) * | 2019-12-02 | 2020-04-03 | 秒针信息技术有限公司 | Data multidimensional cross processing method and device, electronic equipment and storage medium |
CN111259044A (en) * | 2020-01-15 | 2020-06-09 | 网易(杭州)网络有限公司 | Data query method, device, equipment and medium |
CN112732742A (en) * | 2021-01-12 | 2021-04-30 | 平安医疗健康管理股份有限公司 | Query page creating method and device, computer equipment and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120102060A1 (en) * | 2010-10-21 | 2012-04-26 | International Business Machines Corporation | Query Optimization |
CN106844638A (en) * | 2017-01-19 | 2017-06-13 | 王碧波 | Information retrieval method, device and electronic equipment |
CN107992630A (en) * | 2017-12-26 | 2018-05-04 | 医渡云(北京)技术有限公司 | Medical data retrieval method and device, storage medium, electronic equipment |
CN109471713A (en) * | 2017-09-07 | 2019-03-15 | 北京京东尚科信息技术有限公司 | Method and apparatus for query information |
-
2019
- 2019-04-19 CN CN201910317816.XA patent/CN110162537A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120102060A1 (en) * | 2010-10-21 | 2012-04-26 | International Business Machines Corporation | Query Optimization |
CN106844638A (en) * | 2017-01-19 | 2017-06-13 | 王碧波 | Information retrieval method, device and electronic equipment |
CN109471713A (en) * | 2017-09-07 | 2019-03-15 | 北京京东尚科信息技术有限公司 | Method and apparatus for query information |
CN107992630A (en) * | 2017-12-26 | 2018-05-04 | 医渡云(北京)技术有限公司 | Medical data retrieval method and device, storage medium, electronic equipment |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110674179A (en) * | 2019-09-24 | 2020-01-10 | 政采云有限公司 | Query interface generation method, device and medium |
CN110955686A (en) * | 2019-12-02 | 2020-04-03 | 秒针信息技术有限公司 | Data multidimensional cross processing method and device, electronic equipment and storage medium |
CN111259044A (en) * | 2020-01-15 | 2020-06-09 | 网易(杭州)网络有限公司 | Data query method, device, equipment and medium |
CN112732742A (en) * | 2021-01-12 | 2021-04-30 | 平安医疗健康管理股份有限公司 | Query page creating method and device, computer equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110162537A (en) | Data query method and device, storage medium and electronic equipment | |
CN109766497A (en) | Ranking list generation method and device, storage medium, electronic equipment | |
US11934394B2 (en) | Data query method supporting natural language, open platform, and user terminal | |
EP3958256B1 (en) | Voice processing method, apparatus, device and storage medium for vehicle-mounted device | |
WO2019081322A1 (en) | Database sharding | |
KR20160079408A (en) | Method for processing a query, electronic apparatus and server | |
CN109491989A (en) | Data processing method and device, electronic equipment, storage medium | |
CN110347564A (en) | Data creation method and device, electronic equipment, storage medium | |
EP4123474A1 (en) | Method for acquiring structured question-answering model, question-answering method and corresponding apparatus | |
CN106257452B (en) | Modifying search results based on contextual characteristics | |
US20230214689A1 (en) | Method and apparatus for processing dialogue, electronic device, and storage medium | |
CN111061766A (en) | Business data processing method and device, computer equipment and storage medium | |
US10380124B2 (en) | Searching data sets | |
CN113032420A (en) | Data query method and device and server | |
CN109783498A (en) | Data processing method and device, electronic equipment, storage medium | |
CN108874876A (en) | A kind of information push method, computer readable storage medium and terminal device | |
US20210350085A1 (en) | Method, device, and storage medium for generating response | |
CN105335466A (en) | Audio data retrieval method and apparatus | |
CN112860811A (en) | Method and device for determining data blood relationship, electronic equipment and storage medium | |
CN117555897A (en) | Data query method, device, equipment and storage medium based on large model | |
CN109241102A (en) | Data processing method and device, storage medium and electronic equipment | |
CN109783440A (en) | Date storage method and data retrieval method, device, medium, electronic equipment | |
EP4053713A1 (en) | Question and answer method and apparatus based on knowledge graph | |
US10664536B2 (en) | Consumption of user-filtered data on a client device | |
CN109783745A (en) | The method, apparatus and computer equipment of personalized typesetting are carried out to the page |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information | ||
CB02 | Change of applicant information |
Address after: 201, room 518000, building A, No. 1, front Bay Road, Qianhai Shenzhen Guangdong Shenzhen Hong Kong cooperation zone (Qianhai business secretary) Applicant after: Pingan Pu Hui Enterprise Management Co., Ltd. Address before: 518000 Guangdong city of Shenzhen province Qianhai Shenzhen Hong Kong cooperation zone before Bay Road No. 1 building 201 room A Applicant before: Pingan Pu Hui Enterprise Management Co., Ltd. |
|
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |