CN105868225A - Data query method, client, server and system - Google Patents
Data query method, client, server and system Download PDFInfo
- Publication number
- CN105868225A CN105868225A CN201510796753.2A CN201510796753A CN105868225A CN 105868225 A CN105868225 A CN 105868225A CN 201510796753 A CN201510796753 A CN 201510796753A CN 105868225 A CN105868225 A CN 105868225A
- Authority
- CN
- China
- Prior art keywords
- parameter
- data
- mark
- value
- server
- 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/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/958—Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
- G06F16/972—Access to data in other repository systems, e.g. legacy data or dynamic Web page generation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/95—Retrieval from the web
- G06F16/955—Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Transfer Between Computers (AREA)
Abstract
An embodiment of the invention provides a data query method, a client, a server and a system. The technical scheme includes the steps of identifying the parameter of a data search item, wherein the parameter of the data search item includes the query field name, the comparison condition and the query condition value; acquiring the parameter value corresponding to the identified parameter of the data search item; sending the identified parameter of the data search item and the corresponding parameter value to the server, so that the server converts the parameter of the data search item and the corresponding parameter value into the database query condition, and the corresponding data query result is obtained according to the database query condition. When the server responds to the client request, the server determines the parameter value corresponding to the request by the identified parameter of the data search item to acquire the data query result, and finally the client-server interaction efficiency is greatly improved.
Description
Technical field
The present embodiments relate to Internet technical field, particularly relate to a kind of method of data query, visitor
Family end, server and system.
Background technology
Website development be also referred to as web exploitation, be based on Browser/Server Mode (Browser/Server,
B/S) webpage development, typically has interactive, particularly, if the business of this website is for inquiry business,
Then relate between client and server is mutual the most frequent.
Inquiry business for web development process in, it will usually relate to client and server interaction
Process, specifically include: the operation maintenance personnel of Website development builds querying condition in the client, click on visitor
Inquiry button in the end of family, sends querying condition to server, and server receives and enters this querying condition
Row resolves, and server generates database query according to the querying condition after resolving, and looks into based on data base
Inquiry condition ergodic data storehouse, if there are the data that this database query is corresponding in this data base, then will
Query Result is back to client.
Inventor is when making to carry out data query in aforementioned manners, and there are the following problems to find it: in service
When the querying condition that client sends is resolved by device, it is made an appointment according to client and server
Resolution rules.If increasing a querying condition, then client and server are both needed to add increase inquiry
The information such as the parameter that the resolution rules of condition and this querying condition are used, increase querying condition adding
Need website programming personnel again to write code during the parameter that resolution rules and this querying condition are used, increase
Add the burden that website programming personnel is unnecessary, reduce the efficiency of client and server interaction, and then
Reduce the efficiency obtaining data query result.
Summary of the invention
The embodiment of the present invention provides a kind of method of data query, client, server and system, in order to
Solving to add in prior art increases the resolution rules of querying condition and parameter that this querying condition is used
Time, need website programming personnel again to write code, add the burden that website programming personnel is unnecessary,
Reduce the efficiency of client and server interaction, and then reduce the efficiency of data query, it is achieved client
High efficiency interactive between end and server.
First aspect, the embodiment of the present invention provides a kind of method of data query, including:
The parameter of data search terms is identified by client;Wherein, the parameter bag of described data search item
Contain: inquiry word name section, comparison condition and query condition value;
Obtain the parameter value that the parameter of the data search item after mark is corresponding;
The parameter value of the parameter of the data search item after described mark and correspondence thereof is sent to server, with
Toilet is stated server and the described parameter of data search item and the parameter value of correspondence thereof is converted to data base querying
Condition, and the data query result of its correspondence is obtained according to described database query.
Second aspect, the embodiment of the present invention provides the method for another kind of data query, including:
Server receives parameter and the parameter of correspondence thereof of the data search item after the mark that client sends
Value;Wherein, the parameter of described data search item comprises: inquiry word name section, comparison condition and inquiry bar
Part value;
The parameter of data search item after described mark and the parameter value of correspondence thereof are resolved, and by institute
State the parameter of data search item after mark and the parameter value of correspondence is converted to database query;
Data query result is obtained according to described database query;
Described data query result is sent to described client, in order to described client obtains described data
Query Result.
The third aspect, the embodiment of the present invention provides a kind of client, including:
Mark unit, for being identified the parameter of data search terms;Wherein, described data search item
Parameter comprise: inquiry word name section, comparison condition and query condition value;
Acquiring unit, is used for the ginseng that the parameter of the data search item after obtaining described mark unit marks is corresponding
Numerical value;
Transmitting element, the parameter of the data search item after the described mark that described acquiring unit is obtained
And the parameter value of correspondence sends to server, in order to described server is by the parameter of described data search item
And the parameter value of correspondence is converted to database query, and obtain according to described database query
The data query result of its correspondence.
Fourth aspect, the embodiment of the present invention provides a kind of server, including:
Receive unit, the parameter of the data search item after receiving the mark that client sends and correspondence thereof
Parameter value;Wherein, the parameter of described data search item comprises: inquiry word name section, comparison condition and
Query condition value;
Resolution unit, the parameter of the data search item after the described mark that described reception unit is received
And the parameter value of correspondence resolves;
Converting unit, the parameter of the data search item after the described mark that described resolution unit is resolved
And the parameter value of correspondence is converted to database query;
Acquiring unit, obtains data for the described database query changed according to described converting unit
Query Result;
Transmitting element, sends to described visitor for the described data query result obtained by described acquiring unit
Family end, in order to described client obtains described data query result.
5th aspect, the embodiment of the present invention provides the system of a kind of data query, and described system includes: as
Upper described client and server as above.
The method of data query, client, server and the system that the embodiment of the present invention provides, client
First the parameter of data search terms is identified, secondly, obtains the parameter of the data search item after mark
Corresponding parameter value, finally sends the parameter of the data search item after mark and the parameter value of correspondence thereof extremely
Server, is converted to data base querying by server by the parameter of data search item and the parameter value of correspondence thereof
Condition, and the data query result of its correspondence is obtained according to described database query;With prior art
Comparing, in the embodiment of the present invention, server is when the request of customer in response end, by the data after mark
The parsing of the parameter value that the parameter of search terms is corresponding, and by the parameter of the data search item after mark with
The parameter value of its correspondence is converted into database query, to obtain data query result, substantially increases
Client and the efficiency of server interaction.
Accompanying drawing explanation
In order to be illustrated more clearly that the embodiment of the present invention or technical scheme of the prior art, below will be to reality
Execute the required accompanying drawing used in example or description of the prior art to be briefly described, it should be apparent that under,
Accompanying drawing during face describes is some embodiments of the present invention, for those of ordinary skill in the art,
On the premise of not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 shows the method flow diagram of a kind of data query that the embodiment of the present invention provides;
Fig. 2 shows that the embodiment of the present invention provides a kind of client schematic diagram;
Fig. 3 shows the method flow diagram of the another kind of data query that the embodiment of the present invention provides;
Fig. 4 shows the composition frame chart of a kind of client that the embodiment of the present invention provides;
Fig. 5 shows the composition frame chart of the another kind of client that the embodiment of the present invention provides;
Fig. 6 shows the composition frame chart of a kind of server that the embodiment of the present invention provides;
Fig. 7 shows the composition frame chart of the another kind of server that the embodiment of the present invention provides;
Fig. 8 shows the composition frame chart of the system of a kind of data query that the embodiment of the present invention provides;
Fig. 9 shows the entity structure schematic diagram of a kind of server that the embodiment of the present invention provides.
Detailed description of the invention
For making the purpose of the embodiment of the present invention, technical scheme and advantage clearer, below in conjunction with this
Accompanying drawing in bright embodiment, is clearly and completely described the technical scheme in the embodiment of the present invention,
Obviously, described embodiment is a part of embodiment of the present invention rather than whole embodiments.Based on
Embodiment in the present invention, those of ordinary skill in the art are obtained under not making creative work premise
The every other embodiment obtained, broadly falls into the scope of protection of the invention.
Along with popularizing and fast-developing of Internet technology, the data in the Internet get more and more, and people obtain
The demand fetched data also gets more and more.Accordingly, it would be desirable to the special website providing inquiry business of exploitation, meet
People obtain the demand of data.During Website development, the operation maintenance personnel of Website development can be in client
In inquiry input frame in input inquiry condition, such as: name=" A ", i.e. Website development operation maintenance personnel
The content of inquiry is: inquiry name is all the elements of A.If increasing querying condition, then a client
Being both needed in end and server to add increases the resolution rules of querying condition and parameter that this querying condition is used
Etc. information, the needs when the parameter that the resolution rules and this querying condition adding increase querying condition is used
Website programming personnel writes code again, adds the burden that website programming personnel is unnecessary, reduces visitor
Family end and the efficiency of server interaction.
In order to solve the problems referred to above, the embodiment of the present invention provides a kind of method of data query, and the method should
For client, as it is shown in figure 1, the method includes:
101, the parameter of data search terms is identified by client.
Client is identified being carried out the premise of data query to the parameter of data search terms, and its purpose exists
The parameter of the data search item of mark is identified according to this mark, in order to server is according to mark in: server
The parameter acquiring corresponding data Query Result of the data search item after knowledge.
The parameter of described data search item comprises: inquiry word name section, comparison condition and query condition value.
In embodiments of the present invention, client when the parameter of data search terms is identified, can include but
It is not limited to following mode the parameter of data search terms is identified, such as: with column to inquiry
Field name is identified;With comparator, comparison condition is identified;With value to inquiry bar
Part value is identified.Wherein, about the implementation that the parameter of data search terms is identified, please join
Examining relevant description of the prior art, this is no longer repeated by the embodiment of the present invention.
102, the parameter value that the parameter of the data search item after client acquisition mark is corresponding.
In embodiments of the present invention, the parameter value that described inquiry word name section is corresponding can be server data
Storehouse stores the field name that data are corresponding;Or, it is also possible to it is not storage data in server database
Corresponding field name;Exemplary, parameter value that described inquiry word name section is corresponding be sequence number, ID,
Name etc., the parameter value that inquiry word name section is corresponding is the most specifically limited by the embodiment of the present invention, its
Need basis that the actual demand of data query result is set.
Parameter value corresponding to described comparison condition includes the content such as relational operator, logical operator, example
Property, parameter value corresponding to described comparison condition includes:>,<,=,≤,!, && etc., described
Parameter value corresponding to comparison condition may exist due to the difference of programming language that Website development is used
Difference, programming language, comparison condition that Website development is used by the concrete embodiment of the present invention are corresponding
The content such as arrange of parameter value is not defined.
The parameter value that parameter value corresponding to described query condition value is corresponding with inquiry word name section is consistent, if looking into
The parameter value asking field name corresponding is name, title etc., then the parameter value that query condition value is corresponding is word
The value of symbol type;If the parameter value that inquiry word name section is corresponding is contact method, numbering etc., then inquire about bar
The value that parameter value is value type that part value is corresponding.The ginseng that the embodiment of the present invention is corresponding to inquiry word name section
The content that specifically arranges of the parameter value that numerical value is corresponding with query condition value is not defined.
103, the parameter of the data search item after described mark and the parameter value of correspondence thereof are sent extremely by client
Server.
In embodiments of the present invention, server performs the ginseng that the essential condition of data query is data search item
Several and corresponding parameter value, the described parameter of data search item and the parameter value of correspondence thereof are turned by server
It is changed to database query, and obtains the data query knot of its correspondence according to described database query
Really.
The method of data query that the embodiment of the present invention provides, client first parameter to data search terms
It is identified, secondly, obtains the parameter value that the parameter of the data search item after mark is corresponding, finally will mark
The parameter of the data search item after knowledge and the parameter value of correspondence thereof send to server, by server by data
The parameter of search terms and the parameter value of correspondence thereof are converted to database query, and according to described data base
Querying condition obtains the data query result of its correspondence;Compared with prior art, the embodiment of the present invention takes
Business device is when the request of customer in response end, by corresponding to the parameter of data search item after mark
The parsing of parameter value, and parameter value corresponding for the parameter of the data search item after mark is converted into number
According to library inquiry condition, to obtain data query result, substantially increase the effect of client and server interaction
Rate.
It should be noted that the client described in the embodiment of the present invention is a webpage client, this webpage
Client may comprise webpage text element, Web page picture element, web-page audio element, web animation unit
Element, video web page element etc.;Client described in the embodiment of the present invention have to include webpage word
Element, its webpage text element is including at least the parameter of data search item, in order to according to data search item
Parameter inputs corresponding parameter value.The concrete embodiment of the present invention webpage unit to comprising in webpage client
Element kind is not defined.
Further, as to the refinement of above-described embodiment and extension, in step 101 client to data
When the parameter of search terms is identified, first, client extracts webpage text element, secondly, determines net
Inquiry word name section, comparison condition and query condition value in page text element, finally, to looking into of determining
Ask field name, comparison condition and query condition value to be identified.
As a kind of implementation of the embodiment of the present invention, when client extracts webpage text element, logical
Crossing the function in preset function storehouse and obtain webpage text element, wherein, described preset function storehouse is because of client
Programming language different and there are differences, such as, when client is programmed based on JavaScript, institute
Stating preset function storehouse is jQuery storehouse, extracts webpage word unit in client by the function in jQuery storehouse
Element, the function in the embodiment of the present invention preset function storehouse to using when extracting webpage text element is not carried out
Limiting, its programming language used according to exploitation client determines.
Further, the parameter value that the parameter of data search item is corresponding is carried out necessity of data query
Condition, when performing parameter value corresponding to the parameter of data search item after obtaining mark, after determining mark
The parameter of data search item, and the parameter value that the parameter that obtains the data search item after mark is corresponding.
When being embodied as the embodiment of the present invention, obtain the ginseng that the parameter of the data search item after mark is corresponding
Numerical value, can by use but be not limited to following in the way of realize, such as: when by search input frame obtain
During parameter value corresponding to the parameter of the data search item after mark, location search input frame, wherein, this is searched
Rope input frame comprises the parameter value that the parameter of this data search item is corresponding, and this search input frame and inquiry word
Name section, comparison condition and query condition value one_to_one corresponding;In client obtains search input frame, data are searched
The parameter value that the parameter of rope item is corresponding.
The embodiment of the present invention provides a kind of client schematic diagram, as in figure 2 it is shown, user can be such as Fig. 2
For the search input that inquiry word name section, comparison condition and query condition value are corresponding in shown input frame
Frame inputs corresponding contents, after user input content, clicks on " inquiry " button;Based on technology
Say in aspect, after client receives the query execution instruction that user triggers, illustrate that user is in search
In input frame, input content executed is complete, and client is successively to the parameter pair of data search item after mark
The search input frame answered positions, and obtains the parameter value of its correspondence, and client is by the data after mark
The parameter of search terms and the parameter value of correspondence thereof send to server, in order to described server is according to described number
Database query is converted to according to the parameter of search terms and the parameter value of correspondence thereof, and according to described data
Library inquiry condition obtains the data query result of its correspondence.
Exemplary, when user inputs in search input frame: inquiry word name section is ID, comparison condition
For=, query condition value is 5, then the parameter of data search item after client obtains mark and correspondence thereof
Parameter value is " column:id, comparator:=, value:5 ".These are only exemplary citing,
The content of input in search input frame is not defined by the embodiment of the present invention.
Further, the ginseng of the data search item after the mark sent according to client for the ease of server
Several and corresponding parameter value is inquired about, therefore, in the parameter by the data search item after described mark
And the parameter value of correspondence sends to before server, client based on preset format to the data after mark
The parameter value that the parameter of search terms is corresponding assembles, and the data after described mark after assembling are searched
The parameter of rope item and the parameter value of correspondence thereof send to described server.
Hold by above-mentioned example, if client obtains parameter and the ginseng of correspondence thereof of the data search item after identifying
Numerical value is " column:id, comparator:=, value:5 ", after the mark that client can will obtain
The parameter of data search item and the parameter value of correspondence carry out splicing, assembling, be assembled into
{ " column ": " id ", " comparator ": "=", " value ": " 5 ", and will assemble after mark after data search
The parameter of rope item and the parameter value of correspondence thereof send to server.
It should be noted that above example is parameter and the correspondence thereof of the data search item after identifying with a group
Parameter value as a example by the related description that carries out, in like manner, for the parameter of the data search items after many group marks
And for the parameter value of correspondence, the logical operator in client can be passed through and/or relational operator will
The parameter of data search item and the parameter value of correspondence thereof after these many groups marks are combined.To organizing mark more
When the parameter of data search item after knowledge and the parameter value of correspondence thereof are combined, due to the data after mark
The parameter of search terms and the difference of the parameter value of correspondence thereof and logical operator and/or relational operator
Difference, causes the parameter of the data search item after combination mark and the parameter value of correspondence thereof multiple situation occur,
The concrete embodiment of the present invention describes in detail the most one by one at this.
Further, the data search item after user end to server sends mark in embodiments of the present invention
Parameter and the purpose of parameter value of correspondence be to get corresponding data query result, therefore,
The parameter of the data search item after mark and the parameter value of correspondence thereof are sent after server by client,
Receive and the data query result of display server transmission.In embodiments of the present invention, if server does not has
Get with identify after the parameter of data search item and the data query knot that is consistent of corresponding parameter value
Really, then the data query result returned is sky;If server get and identify after data search item
The data query result that the parameter value of parameter and correspondence thereof is consistent, then by with mark after data search item
The content that the parameter value of parameter and correspondence thereof is consistent sends to client, in order to data query is tied by client
Fruit is shown.
Further, the embodiment of the present invention also provides for the method for another kind of data query, and the method is applied to
Server end, as it is shown on figure 3, the method includes:
The parameter of the data search item after 301, server receives the mark that client sends and the ginseng of correspondence thereof
Numerical value.
This step correspondence and the step 103 in Fig. 1, in client by the data search item after described mark
Parameter and the parameter value of correspondence send to after server, the data after server receives this mark are searched
The parameter of rope item and the parameter value of correspondence thereof.Wherein, the parameter of described data search item comprises: inquiry word
Name section, comparison condition and query condition value, the description about the parameter of data search item refer to Fig. 1
In detailed description, the embodiment of the present invention repeats the most one by one at this.
302, the parameter of data search item after described mark and the parameter value of correspondence thereof are solved by server
Analysis, and the parameter of data search item after described mark and the parameter value of correspondence thereof are converted to data base look into
Inquiry condition.
Can quickly request to client respond in order to ensure server, server will be after mark
The parameter of data search item and the parameter value of correspondence thereof are saved in the data base of its correspondence, so as to and
Time the data inquiry request of customer in response end.Server number after receiving the mark that client sends
After the parameter of search terms and the parameter value of correspondence thereof, to mark after data search item parameter and
Corresponding parameter value resolves, and by the parameter of the data search item after mark and the parameter value of correspondence thereof
Be converted to database query, it is intended that the data search item after the mark of client transmission
The parameter value of parameter and correspondence thereof can not be directly as carrying out the condition of data traversal in data base, therefore,
Server needs the parameter of data search item after identifying and the parameter value of correspondence thereof to change.
In embodiments of the present invention, the mark that between server from client, predetermined employing is different in advance is corresponding
The parameter of unique data search item.Exemplary, if the data search after the mark that receives of server
Parameter and the parameter value of correspondence be: { " column ": " id ", " comparator ": "=",
" value ": " 5 ", server resolves and obtains inquiry word name section is id, comparison condition is=and, querying condition
Value is 5;The inquiry word name section of acquisition is id by server, comparison condition is=and, query condition value is 5
Be converted to database query for " id=5 ".These are only exemplary citing, the embodiment of the present invention
Server is resolved the content obtained be not defined.
It should be noted that server is in the parameter to the data search item after mark in the embodiment of the present invention
And the process of the parameter value parsing of correspondence is the process of dynamic implement, i.e. server is to the number after mark
When resolving according to the parameter of search terms and the parameter value of correspondence thereof, only rely upon the parameter of data search item
Mark, and the content of parameter of the actual representative of parameter being not relevant for data search item.
303, server obtains data query result according to described database query.
Server is according to the database query ergodic data storehouse after conversion in step 302, in order to according to
This database query obtains the data query result of response.
304, described data query result is sent to described client by server, in order to described client obtains
Take described data query result.
The method of data query that the embodiment of the present invention provides, client first parameter to data search terms
It is identified, secondly, obtains the parameter value that the parameter of the data search item after mark is corresponding, finally will mark
The parameter of the data search item after knowledge and the parameter value of correspondence thereof send to server, by server according to number
Database query is converted to according to the parameter of search terms and the parameter value of correspondence thereof, and according to described data
Library inquiry condition obtains the data query result of its correspondence;Compared with prior art, in the embodiment of the present invention
Server is when the request of customer in response end, by corresponding to the parameter of data search item after mark
The parsing of parameter value, and parameter value corresponding for the parameter of the data search item after mark is converted into
Database query, to obtain data query result, substantially increases client and server interaction
Efficiency.
Further, as to the refinement of above-described embodiment and extension, after step 302 is to described mark
The parameter of data search item and the parameter value of correspondence when resolving, its specific operation process is as follows:
Obtain the parameter value that inquiry word name section is corresponding with query condition value, and determine the parameter of this query condition value
The data type of value correspondence is the first data type, this first data type is carried out with the second data type
Coupling, wherein, described second data type is the parameter value correspondence storing inquiry word name section in data base
Data type;If the first data type is consistent with the second data type, then continue executing with described mark
After the parameter of data search item and the parameter value of correspondence be converted to database query;If the first number
Inconsistent with the second data type according to type, described first data type is configured to described second data class
Type.So that server can get accurately with identify after the parameter of data search item and corresponding
The data query result that parameter value is corresponding.
Exemplary, it is telephone contact mode that server obtains inquiry word name section, the of query condition value
One data type is character type, and the second data type storing telephone contact mode in data base is numerical value
Type, server is in order to determine that data query result can be by the first number of telephone contact mode accurately
It is configured to numeric type according to type character type.These are only exemplary citing, the concrete embodiment of the present invention
The content such as data type of inquiry word name section, query condition value is the most specifically limited.
Further, when obtaining data query result according to described database query, can use
But be not limited to following mode, such as, server based on data library inquiry conditional log is carried out time according to storehouse
Go through, determine and obtain data query result;Server is traveling through according to storehouse according to data base's conditional log
Time, the inquiry word name section received due to server corresponds to the data search item after database purchase identifies
Parameter and the row field of parameter value of correspondence, therefore, server when data base is traveled through,
First determine row field according to database query, and look into the acquisition data that are as the criterion of the data in row field
Ask result;Improve server and obtain the speed of data query result.
Further, as to the realization of method shown in above-mentioned Fig. 1, another embodiment of the present invention also provides for
A kind of client.This device embodiment is corresponding with preceding method embodiment, the device energy in the present embodiment
Enough correspondences realize the full content in preceding method embodiment.As shown in Figure 4, this client includes:
Mark unit 41, for being identified the parameter of data search terms;Wherein, described data search
The parameter of item comprises: inquiry word name section, comparison condition and query condition value, client is to data search
The parameter of item is identified being carried out the premise of data query, its object is to: server is according to this mark
Identify the parameter of the data search item of mark, in order to server is according to the ginseng of the data search item after mark
Number obtains corresponding data Query Result;
Acquiring unit 42, the parameter pair of the data search item after obtaining described mark unit 41 mark
The parameter value answered;
Transmitting element 43, the data search item after the described mark that described acquiring unit 42 is obtained
Parameter and correspondence parameter value send to server, in order to described server is by described data search item
Parameter and the parameter value of correspondence be converted to database query, and according to described data base querying bar
Part obtains the data query result of its correspondence, and it is data search that server performs the essential condition of data query
The parameter of item and the parameter value of correspondence thereof.
Further, as it is shown in figure 5, described mark unit 41 includes:
Extraction module 411, is used for extracting webpage text element;
Determine module 412, for determining in the described webpage text element that described extraction module 411 extracts
Described inquiry word name section, described comparison condition and described query condition value;
Mark module 413, for described described inquiry word name section, the institute determining that module 412 determines
State comparison condition and described query condition value is identified.
Further, as it is shown in figure 5, described acquiring unit 42 includes:
Locating module 421, for when the parameter being obtained the data search item after mark by search input frame
During corresponding parameter value, position described search input frame;Wherein, described search input frame comprises described number
According to the parameter value that the parameter of search terms is corresponding, and with described inquiry word name section, described comparison condition and institute
State query condition value one_to_one corresponding;
Acquisition module 422, institute in the described search input frame obtaining described locating module 421 location
State the parameter value that the parameter of data search item is corresponding.
Further, as it is shown in figure 5, described client also includes:
Module units 44, is used for the ginseng of the data search item after described mark at described transmitting element 43
Several and corresponding parameter value sent before server, based on preset format to the data after described mark
The parameter value that the parameter of search terms is corresponding assembles;
Described transmitting element 43, is additionally operable to the number after the described mark after being assembled by described module units 44
Send to described server according to the parameter of search terms and the parameter value of correspondence thereof.
Further, as it is shown in figure 5, described client also includes:
Receive unit 45, be used for the ginseng of the data search item after described mark at described transmitting element 43
Several and corresponding parameter value sends after server, and the described data receiving the transmission of described server are looked into
Ask result;
Display unit 46, receives, for receiving unit 45 in search, the described data that described server sends
After Query Result, show described data query result.
Further, as to the realization of method shown in above-mentioned Fig. 3, another embodiment of the present invention also provides for
A kind of server.This device embodiment is corresponding with preceding method embodiment, the device energy in the present embodiment
Enough correspondences realize the full content in preceding method embodiment.As shown in Figure 6, this server includes:
Receive unit 61, the parameter of data search item after receiving the mark that client sends and right
The parameter value answered;Wherein, the parameter of described data search item comprises: inquiry word name section, comparison condition
And query condition value;
Resolution unit 62, the data search item after the described mark that described reception unit 61 is received
Parameter and the parameter value of correspondence resolve, server is in the parameter to the data search item after mark
And the process of the parameter value parsing of correspondence is the process of dynamic implement, i.e. server is to the number after mark
When resolving according to the parameter of search terms and the parameter value of correspondence thereof, only rely upon the parameter of data search item
Mark, and the content of parameter of the actual representative of parameter being not relevant for data search item;
Converting unit 63, the data search item after the described mark that described resolution unit 62 is resolved
Parameter and the parameter value of correspondence be converted to database query;
Acquiring unit 64, for obtaining according to the described database query of described converting unit 63 conversion
Fetch data Query Result;
Transmitting element 65, sends extremely for the described data query result obtained by described acquiring unit 64
Described client, in order to described client obtains described data query result.
Further, as it is shown in fig. 7, described resolution unit 62 includes:
Acquisition module 621, for obtaining the parameter value that described inquiry word name section is corresponding with query condition value;
Determine module 622, be used for determining that the first data type, described first data type are described inquiry
Data type corresponding to the parameter value of condition value;
Matching module 623, for determining described first data type that module 622 determines and the by described
Two data types are mated;Wherein, described second data type is to store described inquiry word in data base
The data type that the parameter value of name section is corresponding;
Configuration module 624, for described first data type mated when described matching module 623 and institute
State the second data type inconsistent time, described first data type is configured to described second data type.
Further, as it is shown in fig. 7, described acquiring unit 64 includes:
Spider module 641, for traveling through described data base according to described database query;
Determine module 642, be used for determining described data query result;
Acquisition module 643, for described determine that module 642 determines described data query result after,
Obtain described data query result.
Further, the embodiment of the present invention also provides for the system of a kind of data query, as shown in Figure 8, institute
The system of stating includes: such as Fig. 4 to the client 81 shown in 5 and if Fig. 6 is to the server 82 shown in 7.
The system of client, server and data query that the embodiment of the present invention provides, client is the most right
The parameter of data search item is identified, and secondly, the parameter obtaining the data search item after mark is corresponding
Parameter value, finally sends the parameter of the data search item after mark and the parameter value of correspondence thereof to server,
By server, the parameter of data search item and the parameter value of correspondence thereof are converted to database query, and
The data query result of its correspondence is obtained according to described database query;Compared with prior art, originally
In inventive embodiments, server is when the request of customer in response end, by the data search item after mark
The parsing of the parameter value that parameter is corresponding, and by corresponding for the parameter of the data search item after mark
Parameter value is converted into database query, to obtain data query result, substantially increase client with
The efficiency of server interaction.
It should be noted that for the system of above-mentioned client, server and data query, send out for every
The function of the unit module used in bright embodiment can pass through hardware processor (hardware
Processor) realize.
It is exemplary, as it is shown in figure 9, Fig. 9 shows a kind of server that the embodiment of the present invention provides
Entity structure schematic diagram, this server may include that processor (processor) 91, communication interface
(Communications Interface) 92, memorizer (memory) 93 and bus 94, wherein, processor
91, communication interface 92, memorizer 93 complete mutual communication by bus 94.Communication interface 92
May be used for the information transmission between server and client.Processor 91 can call in memorizer 93
Logical order, to perform following method: server receive client send mark after data search
The parameter of item and the parameter value of correspondence thereof;Wherein, the parameter of described data search item comprises: inquiry field
Title, comparison condition and query condition value;Parameter and correspondence thereof to the data search item after described mark
Parameter value resolve, and by the parameter of the data search item after described mark and the parameter value of correspondence thereof
Be converted to database query;Data query result is obtained according to described database query;By institute
State data query result to send to described client, in order to described client obtains described data query result.
Additionally, the logical order in above-mentioned memorizer 93 can be realized by the form of SFU software functional unit
And during as independent production marketing or use, can be stored in a computer read/write memory medium.
Based on such understanding, the portion that prior art is contributed by technical scheme the most in other words
Dividing or the part of this technical scheme can embody with the form of software product, this computer software produces
Product are stored in a storage medium, including some instructions with so that a computer equipment (can be
Personal computer, server, or the network equipment etc.) perform method described in each embodiment of the present invention
All or part of step.And aforesaid storage medium includes: USB flash disk, portable hard drive, read only memory (ROM,
Read-Only Memory), random access memory (RAM, Random Access Memory),
The various medium that can store program code such as magnetic disc or CD.
Device embodiment described above is only schematically, wherein said illustrates as separating component
Unit can be or may not be physically separate, the parts shown as unit can be or
Person may not be physical location, i.e. may be located at a place, or can also be distributed to multiple network
On unit.Some or all of module therein can be selected according to the actual needs to realize the present embodiment
The purpose of scheme.Those of ordinary skill in the art are not in the case of paying performing creative labour, the most permissible
Understand and implement.
Through the above description of the embodiments, those skilled in the art is it can be understood that arrive each reality
The mode of executing can add the mode of required general hardware platform by software and realize, naturally it is also possible to by firmly
Part.Based on such understanding, the portion that prior art is contributed by technique scheme the most in other words
Dividing and can embody with the form of software product, this computer software product can be stored in computer can
Read in storage medium, such as ROM/RAM, magnetic disc, CD etc., including some instructions with so that one
Computer equipment (can be personal computer, server, or the network equipment etc.) performs each to be implemented
The method described in some part of example or embodiment.
Last it is noted that above example is only in order to illustrate technical scheme, rather than to it
Limit;Although the present invention being described in detail with reference to previous embodiment, the ordinary skill of this area
Personnel it is understood that the technical scheme described in foregoing embodiments still can be modified by it, or
Person carries out equivalent to wherein portion of techniques feature;And these amendments or replacement, do not make corresponding skill
The essence of art scheme departs from the spirit and scope of various embodiments of the present invention technical scheme.
Claims (17)
1. the method for a data query, it is characterised in that including:
The parameter of data search terms is identified by client;Wherein, the parameter bag of described data search item
Contain: inquiry word name section, comparison condition and query condition value;
Obtain the parameter value that the parameter of the data search item after mark is corresponding;
The parameter value of the parameter of the data search item after described mark and correspondence thereof is sent to server, with
Toilet is stated server and the described parameter of data search item and the parameter value of correspondence thereof is converted to data base querying
Condition, and the data query result of its correspondence is obtained according to described database query.
Method the most according to claim 1, it is characterised in that the client ginseng to data search terms
Number is identified including:
Extract webpage text element;
Determine the described inquiry word name section in described webpage text element, described comparison condition and described in look into
Ask condition value;
Described inquiry word name section, described comparison condition and described query condition value are identified.
Method the most according to claim 2, it is characterised in that obtain the data search item after mark
Parameter value corresponding to parameter include:
If it is by the parameter value that the parameter of the data search item after search input frame acquisition mark is corresponding, then fixed
The described search input frame in position;Wherein, described search input frame comprises the parameter correspondence of described data search item
Parameter value, and with described inquiry word name section, described comparison condition and described query condition value one a pair
Should;
The parameter value that in obtaining described search input frame, the parameter of described data search item is corresponding.
4. according to the method according to any one of claim 1-3, it is characterised in that by described mark
After the parameter of data search item and the parameter value of correspondence sent before server, described method is also wrapped
Include:
Based on preset format, the parameter value that the parameter of the data search item after described mark is corresponding is carried out
Assemble;
The parameter value of the described parameter by the data search item after described mark and correspondence thereof sends to server
Including:
The parameter of the data search item after described mark and the parameter value of correspondence thereof after assembling send to institute
State server.
Method the most according to claim 4, it is characterised in that the data after described mark are being searched
The parameter of rope item and the parameter value of correspondence thereof send after server, and described method also includes:
Receive and show the described data query result that described server sends.
6. the method for a data query, it is characterised in that including:
Server receives parameter and the parameter of correspondence thereof of the data search item after the mark that client sends
Value;Wherein, the parameter of described data search item comprises: inquiry word name section, comparison condition and inquiry bar
Part value;
The parameter of data search item after described mark and the parameter value of correspondence thereof are resolved, and by institute
State the parameter of data search item after mark and the parameter value of correspondence is converted to database query;
Data query result is obtained according to described database query;
Described data query result is sent to described client, in order to described client obtains described data
Query Result.
Method the most according to claim 6, it is characterised in that to the data search after described mark
The parameter of item and the parameter value of correspondence thereof carry out parsing and include:
Obtain the parameter value that described inquiry word name section is corresponding with query condition value;
Determining the first data type, described first data type is right by the parameter value of described query condition value
The data type answered;
Described first data type is mated with the second data type;Wherein, described second data class
Type is to store the data type that the parameter value of described inquiry word name section is corresponding in data base;
If described first data type is inconsistent with described second data type, then by described first data class
Type is configured to described second data type.
Method the most according to claim 7, it is characterised in that according to described database query
Acquisition data query result includes:
According to described database query, described data base is traveled through;
Determine and obtain described data query result.
9. a client, it is characterised in that including:
Mark unit, for being identified the parameter of data search terms;Wherein, described data search item
Parameter comprise: inquiry word name section, comparison condition and query condition value;
Acquiring unit, is used for the ginseng that the parameter of the data search item after obtaining described mark unit marks is corresponding
Numerical value;
Transmitting element, the parameter of the data search item after the described mark that described acquiring unit is obtained
And the parameter value of correspondence sends to server, in order to described server is by the parameter of described data search item
And the parameter value of correspondence is converted to database query, and obtain according to described database query
The described data query result of its correspondence.
Client the most according to claim 9, it is characterised in that described mark unit includes:
Extraction module, is used for extracting webpage text element;
Determine module, look into described in the described webpage text element that described extraction unit extracts for determining
Ask field name, described comparison condition and described query condition value;
Mark module, for described determining described inquiry word name section that module determines, described comparing bar
Part and described query condition value are identified.
11. clients according to claim 10, it is characterised in that described acquiring unit includes:
Locating module, for when the parameter correspondence being obtained the data search item after mark by search input frame
Parameter value time, position described search input frame;Wherein, described search input frame comprises described data and searches
The parameter value that the parameter of rope item is corresponding, and with described inquiry word name section, described comparison condition and described in look into
Ask condition value one_to_one corresponding;
Acquisition module, in the described search input frame obtaining described locating module location, described data are searched
The parameter value that the parameter of rope item is corresponding.
12. according to the client according to any one of claim 9-11, it is characterised in that described client
End also includes:
Module units, for described transmitting element by the parameter of the data search item after described mark and
Corresponding parameter value sent before server, based on preset format to the data search item after described mark
The corresponding parameter value of parameter assemble;
Described transmitting element, is additionally operable to the data search after the described mark after being assembled by described module units
The parameter of item and the parameter value of correspondence thereof send to described server.
13. clients according to claim 12, it is characterised in that described client also includes:
Receive unit, for described transmitting element by the parameter of the data search item after described mark and
Corresponding parameter value sends after server, receives the data query result that described server sends;
Display unit, for search receive unit receive described server send data query result it
After, show described data query result.
14. 1 kinds of servers, it is characterised in that including:
Receive unit, the parameter of the data search item after receiving the mark that client sends and correspondence thereof
Parameter value;Wherein, the parameter of described data search item comprises: inquiry word name section, comparison condition and
Query condition value;
Resolution unit, the parameter of the data search item after the described mark that described reception unit is received
And the parameter value of correspondence resolves;
Converting unit, the parameter of the data search item after the described mark that described resolution unit is resolved
And the parameter value of correspondence is converted to database query;
Acquiring unit, obtains data for the described database query changed according to described converting unit
Query Result;
Transmitting element, sends to described visitor for the described data query result obtained by described acquiring unit
Family end, in order to described client obtains described data query result.
15. servers according to claim 14, it is characterised in that described resolution unit includes:
Acquisition module, for obtaining the parameter value that described inquiry word name section is corresponding with query condition value;
Determine module, be used for determining that the first data type, described first data type are described querying condition
The data type corresponding to parameter value of value;
Matching module, for by described described first data type and the second data class determining that module determines
Type mates;Wherein, described second data type is to store described inquiry word name section in data base
The data type that parameter value is corresponding;
Configuration module, for described first data type and described second number that mate when described matching module
During according to Type-Inconsistencies, described first data type is configured to described second data type.
16. servers according to claim 15, it is characterised in that described acquiring unit includes:
Spider module, for traveling through described data base according to described database query;
Determine module, be used for determining described data query result;
Acquisition module, for described determine that module determines described data query result after, obtain described
Data query result.
The system of 17. 1 kinds of data queries, it is characterised in that described system includes: such as claim 9
To the client according to any one of 13 and the server as according to any one of claim 14 to 16.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510796753.2A CN105868225A (en) | 2015-11-18 | 2015-11-18 | Data query method, client, server and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510796753.2A CN105868225A (en) | 2015-11-18 | 2015-11-18 | Data query method, client, server and system |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105868225A true CN105868225A (en) | 2016-08-17 |
Family
ID=56623719
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510796753.2A Pending CN105868225A (en) | 2015-11-18 | 2015-11-18 | Data query method, client, server and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105868225A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106446060A (en) * | 2016-09-06 | 2017-02-22 | 北京易游华成科技有限公司 | Information push and search device, method and system |
CN107423072A (en) * | 2017-08-11 | 2017-12-01 | 郑州云海信息技术有限公司 | The method and apparatus of web page dynamic column filter and search list data |
CN107679064A (en) * | 2017-07-31 | 2018-02-09 | 平安科技(深圳)有限公司 | Data query method, apparatus and computer-readable recording medium |
CN107679203A (en) * | 2017-10-12 | 2018-02-09 | 广州华多网络科技有限公司 | A kind of Redis internal databases call method and system |
CN111026469A (en) * | 2018-10-09 | 2020-04-17 | 阿里巴巴集团控股有限公司 | Condition processing method and device and electronic equipment |
CN111737282A (en) * | 2020-07-23 | 2020-10-02 | 福建天晴在线互动科技有限公司 | Method and system for organizing database query conditions by receiving parameters at server |
CN117891847A (en) * | 2024-03-18 | 2024-04-16 | 辽宁牧龙科技有限公司 | Data query device and method based on data center |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541529A (en) * | 2010-12-30 | 2012-07-04 | 北京亿阳信通软件研究院有限公司 | Query page generating device and method |
CN102609488A (en) * | 2012-01-20 | 2012-07-25 | 北京星网锐捷网络技术有限公司 | Client, data query method of client, server and data query system |
CN103020301A (en) * | 2012-12-31 | 2013-04-03 | 中国科学院自动化研究所 | Multidimensional data query and storage method and system |
CN104239368A (en) * | 2013-06-21 | 2014-12-24 | 苏州精易会信息技术有限公司 | Form data inquiring method based on setting |
-
2015
- 2015-11-18 CN CN201510796753.2A patent/CN105868225A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102541529A (en) * | 2010-12-30 | 2012-07-04 | 北京亿阳信通软件研究院有限公司 | Query page generating device and method |
CN102609488A (en) * | 2012-01-20 | 2012-07-25 | 北京星网锐捷网络技术有限公司 | Client, data query method of client, server and data query system |
CN103020301A (en) * | 2012-12-31 | 2013-04-03 | 中国科学院自动化研究所 | Multidimensional data query and storage method and system |
CN104239368A (en) * | 2013-06-21 | 2014-12-24 | 苏州精易会信息技术有限公司 | Form data inquiring method based on setting |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106446060A (en) * | 2016-09-06 | 2017-02-22 | 北京易游华成科技有限公司 | Information push and search device, method and system |
CN107679064A (en) * | 2017-07-31 | 2018-02-09 | 平安科技(深圳)有限公司 | Data query method, apparatus and computer-readable recording medium |
WO2019024336A1 (en) * | 2017-07-31 | 2019-02-07 | 平安科技(深圳)有限公司 | Data query method and device, and computer readable storage medium |
CN107423072A (en) * | 2017-08-11 | 2017-12-01 | 郑州云海信息技术有限公司 | The method and apparatus of web page dynamic column filter and search list data |
CN107423072B (en) * | 2017-08-11 | 2020-10-30 | 苏州浪潮智能科技有限公司 | Method and device for screening dynamic columns of web page and searching table data |
CN107679203A (en) * | 2017-10-12 | 2018-02-09 | 广州华多网络科技有限公司 | A kind of Redis internal databases call method and system |
CN107679203B (en) * | 2017-10-12 | 2020-11-13 | 广州华多网络科技有限公司 | Redis internal database calling method and system |
CN111026469A (en) * | 2018-10-09 | 2020-04-17 | 阿里巴巴集团控股有限公司 | Condition processing method and device and electronic equipment |
CN111026469B (en) * | 2018-10-09 | 2023-04-11 | 阿里巴巴集团控股有限公司 | Condition processing method and device and electronic equipment |
CN111737282A (en) * | 2020-07-23 | 2020-10-02 | 福建天晴在线互动科技有限公司 | Method and system for organizing database query conditions by receiving parameters at server |
CN111737282B (en) * | 2020-07-23 | 2022-07-26 | 福建天晴在线互动科技有限公司 | Method and system for organizing database query conditions by receiving parameters at server |
CN117891847A (en) * | 2024-03-18 | 2024-04-16 | 辽宁牧龙科技有限公司 | Data query device and method based on data center |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105868225A (en) | Data query method, client, server and system | |
KR100849420B1 (en) | Image-based searching system and method therefor | |
CN103699669B (en) | The method of message push and a kind of browser terminal is carried out in a kind of browser | |
US11561988B2 (en) | Systems and methods for harvesting data associated with fraudulent content in a networked environment | |
US10572561B1 (en) | Performing multiple related searches | |
CN106687949A (en) | Search results for native applications | |
JP2009181468A (en) | Image search log collection system, image search log collection method and program | |
US10572566B2 (en) | Image quality independent searching of screenshots of web content | |
US9886711B2 (en) | Product recommendations over multiple stores | |
CN103744987B (en) | Video website media asset aggregation method and system based on DOM tree matching | |
CN112740228A (en) | Visual search engine | |
CN105095446A (en) | Medicine search processing method, server and terminal device | |
CN108932640B (en) | Method and device for processing orders | |
CN105656979A (en) | Method for processing unstructured message, client, server, and platform | |
US20170255475A1 (en) | Automatic execution of objects in a user interface | |
US20190087415A1 (en) | Automatic translation of string collections | |
CN105808623A (en) | Search-based page access event association method and device | |
US20180025359A1 (en) | Customer journey optimized pre-fetching | |
CN111507788A (en) | Data recommendation method and device, storage medium and processor | |
CN105589863B (en) | Searching method, data processing method, device and system | |
CN109840294B (en) | Method for inquiring matching data of electronic element, storage medium and terminal | |
KR20110074423A (en) | Egf file searching system service and method therefor | |
CN107357796B (en) | Network information acquisition method, equipment and programmable equipment | |
Muthu et al. | Building a Price Predictor for an Auctioning Website _ | |
CN104899308A (en) | Method and device for information recommendation under fault in browser page |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20160817 |
|
WD01 | Invention patent application deemed withdrawn after publication |