CN105224696B - Web page Text Entry is automatically performed implementation method and device - Google Patents
Web page Text Entry is automatically performed implementation method and device Download PDFInfo
- Publication number
- CN105224696B CN105224696B CN201510779435.5A CN201510779435A CN105224696B CN 105224696 B CN105224696 B CN 105224696B CN 201510779435 A CN201510779435 A CN 201510779435A CN 105224696 B CN105224696 B CN 105224696B
- Authority
- CN
- China
- Prior art keywords
- entry
- display
- key
- automatically performed
- service parameter
- 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.)
- Active
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/245—Query processing
- G06F16/2455—Query execution
- G06F16/24564—Applying rules; Deductive queries
-
- 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/951—Indexing; Web crawling techniques
Abstract
The embodiment of the present invention is claimed web page Text Entry and is automatically performed implementation method and device.In embodiments of the present invention, the Text Entry of the web page, which is loaded with, is automatically performed script.Be automatically performed in script and pre-set service parameter, after sending service parameter and entry, server end executes general polling method, with obtain meeting service parameter requirement and with the matched query result of entry.In embodiments of the present invention, general polling method is equivalent to machine, and service parameter is equivalent to raw material.The raw material being added is different, and the product that machine produces also will be different.In this way, same general polling method can be used in different business, to without writing individual implementation method for the auto-complete function that different business is used.
Description
Technical field
The present invention relates to computer realms, and implementation method and dress are automatically performed more particularly to web page Text Entry
It sets.
Background technology
When using Web page faceted search, entry is keyed in the Text Entry of web page, can be keyed in user aobvious
Show matching entry to save the time, here it is auto-complete functions.Text Entry being automatically performed and prompting in Web page
Function can help user to quickly finish operation, be extraordinary user experience.
When doing Information-based Item, often uses and be automatically performed in different business functions.Such as in Added Business
When need selection personnel, if at this point, inputting " money " in Text Entry, can occur combobox automatically, display surname is " money "
The name of people (money is fragrant, Qian Na, and money is refined etc.).If continuing to input " text " in Text Entry, can occur combobox automatically, show
Name includes the name of the people of " money text " (Qian Wenzhong, money is gentle and quiet, and money is civil and military).
When implementing the invention, inventor has found:Because of the service class involved by business difference and tables of data
Difference, so to be directed to the auto-complete function that different business is used writes individual implementation method.
Invention content
The purpose of the embodiment of the present invention is to provide page text input frame and is automatically performed implementation method and device, to solve to need
To be the problem of different business writes individual implementation method.
To achieve the above object, the present invention provides following schemes:
A kind of web page Text Entry is automatically performed implementation method, the Text Entry of the web page be loaded with from
Dynamic to complete script, described be automatically performed in script includes pre-set service parameter, the service parameter include restrictive condition,
The number of Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display, the number indicate
For N;
The implementation method includes:
The script that is automatically performed receives entry input by user by the Text Entry;
The script that is automatically performed sends the entry and the service parameter, the entry and the industry to server end
Parameter of being engaged in executes general polling method for server end, obtains meeting the service parameter requirement and matched with the entry
Query result;
The script that is automatically performed receives the query result that the server returns;The query result includes most
N number of key-value pair character string, each key-value pair include the attribute value of the attribute value and corresponding preservation of display, the display
Attribute value includes the entry;
The script parsing key-value pair character string that is automatically performed obtains analysis result, and shows that the analysis result is made
For the occurrence of the entry.
A kind of web page Text Entry is automatically performed implementation method, the Text Entry of the web page be loaded with from
Dynamic to complete script, described be automatically performed in script includes pre-set service parameter, the service parameter include restrictive condition,
The number of Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display, the number indicate
For N;
The method includes:
Server is automatically performed the service parameter and entry that script is sent described in receiving, and the entry is defeated by user
Enter;
Server executes general polling method according to the entry and the service parameter, obtains meeting the service parameter
It is required that and with the matched query result of the entry;The query result includes most N number of key-value pair character strings;
Server returns to the query result;
The general polling method includes:With the restrictive condition, Business Entity class name, the Property Name of display and institute
Predicate item forms the HQL query statements of object-oriented, executes the HQL query statements, obtains query result data set;It is described to look into
It includes M key-value pair, M to ask result data concentration>=0;Each key-value pair includes the category of the attribute value and corresponding preservation of display
Property value, the attribute value of the display includes the entry;
According to the principle that the Property Name of the Business Entity class name and display, creating java language with reflection can know
Other object and acquisition methods;
Most N number of key-value pairs are obtained from the query result data set using the acquisition methods;
The key-value pair got is combined into key-value pair character string as the query result.
A kind of web page Text Entry is automatically performed realization device, and the Text Entry load of the web page is
It states and is automatically performed realization device, the realization device that is automatically performed pre-sets service parameter, and the service parameter includes limit
The number of condition processed, Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display, it is described
Number is expressed as N;
The realization device that is automatically performed includes:
First receiving unit, for receiving entry input by user by the Text Entry;
Transmission unit, for sending the entry and the service parameter, the entry and the business to server end
Parameter executes general polling method for server end, obtains meeting the service parameter requirement and matched with the entry
Query result;
Second receiving unit, the query result returned for receiving the server;The query result includes most
Mostly N number of key-value pair character string, each key-value pair include the attribute value of the attribute value and corresponding preservation of display, the display
Attribute value include the entry;
Display unit is parsed, obtains analysis result for parsing the key-value pair character string, and show the analysis result
Occurrence as the entry.
A kind of web page Text Entry is automatically performed realization device, the Text Entry of the web page be loaded with from
Dynamic to complete script, described be automatically performed in script includes pre-set service parameter, the service parameter include restrictive condition,
The number of Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display, the number indicate
For N;
The realization device that is automatically performed includes:
Data receipt unit, for receiving the service parameter and entry for being automatically performed script transmission, institute's predicate
Item is inputted by user;
Execution unit obtains meeting described for executing general polling method according to the entry and the service parameter
Service parameter require and with the matched query result of the entry;The query result includes most N number of key-value pair character strings;
Returning unit, for returning to the query result;
The general polling method includes:
Object-oriented is formed with the restrictive condition, Business Entity class name, the Property Name of display and the entry
HQL query statements execute the HQL query statements, obtain query result data set;The query result data set includes M
A key-value pair, M>=0;Each key-value pair includes the attribute value of the attribute value and corresponding preservation of display, the attribute of the display
Value includes the entry;
According to the principle that the Property Name of the Business Entity class name and display, creating java language with reflection can know
Other object and acquisition methods;
Most N number of key-value pairs are obtained from the query result data set using the acquisition methods;
The key-value pair got is combined into key-value pair character string as the query result.
In embodiments of the present invention, it is automatically performed in script and pre-sets service parameter, sending service parameter and word
After item, server end execute general polling method, with obtain meeting service parameter requirement and with the matched query result of entry.
In general polling method machine, industry are equivalent to using service parameter composition query statement and acquisition methods, general polling method
Business parameter is equivalent to raw material.The raw material being added is different, and the product that machine produces also will be different.In this way, different business can
Using same general polling method, to without writing individual implementation method for the auto-complete function that different business is used.
Description of the drawings
It in order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, below will be to institute in embodiment
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the present invention
Example, for those of ordinary skill in the art, without having to pay creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 a, 1b are that web browser provided in an embodiment of the present invention realizes the flow being automatically performed with server end interaction
Schematic diagram;
Fig. 2 a, 2c are automatically performed reality to be provided in an embodiment of the present invention by being automatically performed performed by script for web page
Existing method flow schematic diagram;
Fig. 2 b are the schematic diagram that analysis result is presented in the display mode provided in an embodiment of the present invention with combobox;
Fig. 3 is provided in an embodiment of the present invention by being automatically performed implementation method flow diagram performed by server;
Fig. 4 a, Fig. 4 b and Fig. 5 are loaded with above-mentioned automatic complete for the Text Entry of web page provided in an embodiment of the present invention
At realization device.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other
Embodiment shall fall within the protection scope of the present invention.
In order to make the foregoing objectives, features and advantages of the present invention clearer and more comprehensible, below in conjunction with the accompanying drawings and specific real
Applying mode, the present invention is described in further detail.
It is automatic to realize this invention is intended to protect web page Text Entry to be automatically performed implementation method and relevant apparatus
Complete function.
It is a kind of more popular at present technology that Text Entry, which is automatically performed, is realized using the AjaX technologies of JS scripts
It without refreshing prompt facility, or is automatically performed without refreshing using ripe jQuery library components realization and prompt facility, helps me
Easily added in website input frame be automatically performed and automatic prompting function.
Signified Text Entry of the invention is automatically performed, input frame note different from the memory function of the input frame of browser
The function of recalling is to prompt the content inputted before when inputting again after we inputted a thing, is existed several times before being exactly
The information of the machine input has temporary memory.The function of input frame memory is without coding, it is only necessary to will be automatic complete in browser
It is chosen at option.
It is the entry in specific entry or database that signified Text Entry of the invention, which is automatically performed matched range, and
It is not limited to the information of matching the machine input.
Specific entry refers to the value of fixed range, such as how many national province, and value range is fixed.Specific entry
It can be stored in program and be stored in database.
Fig. 1 a show that web browser (in be automatically performed script) realizes the flow being automatically performed with server end interaction
Schematic diagram.Web browser and the interactive step of server are as follows:
S101:The script that is automatically performed in web browser (page) receives entry input by user by Text Entry.
Above-mentioned be automatically performed in script includes pre-set service parameter.Wherein, service parameter may include restrictive condition,
The number of Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display, above-mentioned number indicate
For N.
For example, Business Entity class name can be " personnel ", and the restrictive condition of setting can be " on-job ";The attribute of display
Title can be " personnel's title ", and the Property Name of preservation can be " person number ";The occurrence number of display can be 6 namely N=
6。
It should be noted that above-mentioned service parameter defines the displayable type of business of web page Text Entry.
S102:Web browser (being automatically performed script) to server end send above-mentioned entry (it is assumed that entry is " opening ") and
Above-mentioned service parameter.
S103:Server executes general polling method according to entry and service parameter, obtains meeting above-mentioned service parameter and want
Ask and with the matched query result of above-mentioned entry.
Above-mentioned general polling method may include following steps:
A:Object-oriented is formed with above-mentioned restrictive condition, Business Entity class name, the Property Name of display and above-mentioned entry
HQL query statements, execute above-mentioned HQL query statements, obtain query result data set.
Wherein, query result data set includes M key-value pair, M>=0;Each key-value pair include display attribute value and
The attribute value of corresponding preservation, and the attribute value shown includes above-mentioned entry.
Precedent is still continued to use, user inputs entry " opening ", and the key-value pair in query result data set may include:
Zhang Ming -0001, rich quotient -0011, Zhang Qin -0111, Zhang Miao -1000, Zhang Wenda -1001, Zhang Xing -1010, Zhang Min -
1011, Zhang Xinran -1111 etc..Wherein, Zhang Ming, Zhang Fengshang, Zhang Qin, vast etc. for display attribute value comprising entry
" opening ";And 0001,0011,0111,1000 etc. be the attribute value preserved.
It should be noted that in general procedure design, what the page was shown is such as name, and what is preserved in real data is this
The coding of name, name and code set are at key-value pair.
B:According to the principle that the Property Name of above-mentioned Business Entity class name and display, creating java language with reflection can
The object and acquisition methods of identification obtain most N number of key-value pairs using above-mentioned acquisition methods from above-mentioned query result data set;
JAVA reflex mechanisms are, for any one class, can to know all properties of this class in operating status
And method;For any one object, its any one method can be called.The information and dynamic of this dynamic access
The function of the method for object is called to be known as the reflex mechanism of java language.
Java reflex mechanisms mainly provide following functions:The class belonging to any one object is judged at runtime;It is transporting
The object of any one class is constructed when row.
How to create object and create acquisition methods and can be found in the prior art, therefore not to repeat here.
When the key-value pair in query result data set more than it is N number of when, can query result data centralized cycle obtain provide
Quantity (namely N number of) key-value pair.And if the key-value pair quantity in data set is less than N, does not execute step B, directly executes step
C。
C:The key-value pair got is combined into key-value pair character string as above-mentioned query result.
Above-mentioned query result includes most N number of key-value pair character strings.In combination, with " Zhang Ming -0001 " this key-value pair
For, separator " | " can be added between, form " Zhang Ming | 0001 " character string.
Above-mentioned at most N number of key-value pair character string can be carried in same message.
S104:Server returns to above-mentioned query result.
S105:Web browser (being automatically performed script) parses above-mentioned key-value pair character string and obtains analysis result, and shows
State occurrence of the analysis result as above-mentioned entry.
Web browser (being automatically performed script) has preset resolution rules, after server returns to query result, utilizes parsing
Rule can parse key-value pair character string and obtain the attribute value shown in key-value pair or key-value pair.
For example, it in resolving, for key-value pair character string " Zhang Ming | 0001 ", can be extracted according to separator
The attribute value " Zhang Ming " of display, and " Zhang Ming " is shown as occurrence.
Certainly, if server does not inquire matched key-value pair, null character string is can return to as query result, web is clear
Device of looking at does not show the occurrence with entry then.
As it can be seen that in embodiments of the present invention, being automatically performed in script and pre-setting service parameter, service parameter is being sent
After entry, server end execute general polling method, with obtain meeting service parameter requirement and with the matched inquiry of entry
As a result.It is equivalent to machine using service parameter composition query statement and acquisition methods, general polling method in general polling method,
Service parameter is equivalent to raw material.The raw material being added is different, and the product that machine produces also will be different.In this way, different business
Same general polling method can be corresponded to, to without writing individual realization side for the auto-complete function that different business is used
Method.
In other embodiments of the present invention, Fig. 1 b are referred to, before receiving entry input by user, above-described embodiment is also
It may include following steps:Above-mentioned service parameter is set.It will be subsequently introduced herein to service parameter how is arranged.
Based on exchange method shown in Fig. 1 a, Fig. 2 a illustrated embodiments are being automatically performed performed by script by web page
Be automatically performed implementation method.This is automatically performed script load at web page Text Entry.Wherein, above-mentioned to be automatically performed
In script include pre-set service parameter, above-mentioned service parameter include restrictive condition, Business Entity class name, display category
The number (N) of the occurrence of property title, the Property Name of preservation and display.
The implementation method for being automatically performed script execution may include following steps:
S201:It is automatically performed script and entry input by user is received by Text Entry;
More specifically, it can be jQuery Autocomplete components that this, which is automatically performed script,.More specifically, it may include
Jquery.js, jquery.autocomplete.css and jquery.autocomplete.js file.
S202:It is automatically performed script and sends above-mentioned entry and above-mentioned service parameter to server end.
Wherein, entry and service parameter execute general polling method for server end, obtain meeting above-mentioned service parameter
It is required that and with the matched query result of above-mentioned entry.
S203:It is automatically performed script and receives the query result that above-mentioned server returns.
Wherein, above-mentioned query result includes most N number of key-value pair character strings, each key-value pair include display attribute value and
The attribute value of the attribute value of corresponding preservation, above-mentioned display includes above-mentioned entry.
For example, user inputs entry " opening ", Business Entity class name is known as " name ", then the key assignments in query result data set
To may include:
Zhang Ming -0001, rich quotient -0011, Zhang Qin -0111, Zhang Miao -1000, Zhang Wenda -1001, Zhang Xing -1010, Zhang Min -
1011, Zhang Xinran -1111 etc..Wherein, Zhang Ming, Zhang Fengshang, Zhang Qin, vast etc. for display attribute value comprising entry
" opening ";And 0001,0011,0111,1000 etc. be the attribute value preserved.
S204:It is automatically performed the above-mentioned key-value pair character string of script parsing and obtains analysis result, and show above-mentioned analysis result
Occurrence as above-mentioned entry.
Further, in other embodiments of the present invention, " showing above-mentioned analysis result " in above-mentioned all embodiments can
It specifically includes:
Above-mentioned analysis result is presented with the display mode of combobox at Text Entry.
For example, it is assumed that analysis result includes Zhang Ming, Zhang Fengshang, Zhang Qin, Zhang Miao, Zhang Wenda, Zhang Xing, then with combobox
(referring to Fig. 2 b) shows Zhang Ming, Zhang Fengshang, Zhang Qin, Zhang Miao, Zhang Wenda, Zhang Xing.
In other embodiments of the present invention, Fig. 2 c are referred to, before receiving entry input by user, above-mentioned all implementations
Example may also include the steps of:
S200:Above-mentioned service parameter is set.
Include service parameter field in being automatically performed script, when not carrying out any setting, service parameter field is sky
Wrongly written or mispronounced character section.
Generally, service parameter can be configured by developer.
For example, setting Business Entity class name:
ObjNameTemp=" persistent.project.acgpm.TBnsPrjmSetprojectdirect;Wherein,
Equal sign is followed by the title of an entity class class, and objNameTemp=is fixed, the different subsequent entity class of business equal sign
Title is different.
Restrictive condition is set:(conditionTemp=is fixed to conditionTemp=" deleteFlag=' 0 ' "
, it is different behind different restrictive condition equal signs);
The Property Name that display is arranged is personnel's title (searchNameTemp=" userName ") etc..
Based on exchange method shown in Fig. 1 a, embodiment illustrated in fig. 3 is by being automatically performed realization side performed by server
Method may include following steps:
S301:Server receives the service parameter and entry for being automatically performed script transmission.
Above-mentioned entry is inputted by user.
This is automatically performed script load at web page Text Entry.Wherein, above-mentioned to be automatically performed in script comprising pre-
The service parameter being first arranged, above-mentioned service parameter include restrictive condition, Business Entity class name, the Property Name of display, preservation
Property Name and display occurrence number (N).
S302:Server executes general polling method according to above-mentioned entry and above-mentioned service parameter, obtains meeting above-mentioned industry
Be engaged in parameter request and with the matched query result of above-mentioned entry.
Above-mentioned query result includes most N number of key-value pair character strings, each above-mentioned key-value pair include display attribute value and
The attribute value of the attribute value of corresponding preservation, above-mentioned display includes above-mentioned entry;
S303:Server returns to above-mentioned query result.
Wherein, above-mentioned general polling method includes the following steps:
A:Object-oriented is formed with above-mentioned restrictive condition, Business Entity class name, the Property Name of display and above-mentioned entry
HQL query statements, execute above-mentioned HQL query statements, obtain query result data set.
Wherein, query result data set includes M key-value pair, M>=0;Each key-value pair include display attribute value and
The attribute value of corresponding preservation, and the attribute value shown includes above-mentioned entry.
Precedent is still continued to use, user inputs entry " opening ", and the key-value pair in query result data set may include:
Zhang Ming -0001, rich quotient -0011, Zhang Qin -0111, Zhang Miao -1000, Zhang Wenda -1001, Zhang Xing -1010, Zhang Min -
1011, Zhang Xinran -1111 etc..Wherein, Zhang Ming, Zhang Fengshang, Zhang Qin, vast etc. for display attribute value comprising entry
" opening ", and 0001,0011,0111,1000 etc. be the attribute value preserved.
It should be noted that in general procedure design, what the page was shown is such as name, and what is preserved in real data is this
The coding of name, name and code set are at key-value pair.
B:According to the principle that the Property Name of above-mentioned Business Entity class name and display, creating java language with reflection can
The object and acquisition methods of identification obtain most N number of key-value pairs using above-mentioned acquisition methods from above-mentioned query result data set.
When the key-value pair in query result data set more than it is N number of when, can query result data centralized cycle obtain provide
Quantity (namely N number of) key-value pair.And if the key-value pair quantity in data set is less than N, does not execute step B, directly executes step
C。
C:The key-value pair got is combined into key-value pair character string as above-mentioned query result.
Above-mentioned query result includes most N number of key-value pair character strings.In combination, with Zhang Ming -0001, this key-value pair is
Separator " | " can be added in example between, form " Zhang Ming | 0001 " character string.
More specifically, above-mentioned steps B may include following steps:
B1:According to the principle that above-mentioned Business Entity class name, the identifiable object of java language is created with reflection;
The realization method that can refer to the prior art how is specifically created, therefore not to repeat here.
B2:According to the principle that the Property Name of above-mentioned display, the identifiable acquisition methods of java language are created with reflection.
The realization method that can refer to the prior art how is specifically created, therefore not to repeat here.
Presented hereinbefore is to be automatically performed implementation method, and web page Text Entry is explained below and is automatically performed reality
Existing device.
Refer to Fig. 4 a, the Text Entry of above-mentioned web page, which is loaded with, above-mentioned is automatically performed realization device 400.
The above-mentioned realization device 400 that is automatically performed may include:
First receiving unit 401, for receiving entry input by user by above-mentioned Text Entry.
Transmission unit 402, for sending above-mentioned entry and above-mentioned service parameter to server end.
It is automatically performed realization device and pre-sets service parameter.Further, service parameter may include restrictive condition, industry
The number (N) of entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display.
Above-mentioned entry and above-mentioned service parameter can be used for server end and execute general polling method, obtain meeting service parameter
It is required that and with the matched query result of entry;
Second receiving unit 403, the above-mentioned query result returned for receiving above-mentioned server.
Above-mentioned query result includes most N number of key-value pair character strings, and each key-value pair includes the attribute value and correspondence of display
Preservation attribute value, the attribute value of above-mentioned display includes above-mentioned entry.
Display unit 404 is parsed, obtains analysis result for parsing above-mentioned key-value pair character string, and show above-mentioned parsing knot
Occurrence of the fruit as above-mentioned entry.
Particular content refers to record described previously herein, and therefore not to repeat here.
In other embodiments of the present invention, in terms of " showing above-mentioned analysis result ", the solution in above-mentioned all embodiments
Analysis display unit 404 can be specifically used for:
The analysis result is presented with the display mode of combobox at Text Entry.
In other embodiments of the present invention, Fig. 4 b are referred to, above-mentioned device 400 may also include:
Setting unit 405, for before receiving entry input by user, above-mentioned service parameter to be arranged.
Fig. 5 shows that another web page Text Entry is automatically performed realization device 500 (server).
The above-mentioned realization device 500 that is automatically performed includes:
Data receipt unit 501, for receive be automatically performed script transmission service parameter and entry, above-mentioned entry by with
Family inputs.
This is automatically performed script load at web page Text Entry.Wherein, above-mentioned to be automatically performed in script comprising pre-
The service parameter being first arranged, above-mentioned service parameter include restrictive condition, Business Entity class name, the Property Name of display, preservation
Property Name and display occurrence number (N).
Execution unit 502 is met for executing general polling method according to above-mentioned entry and above-mentioned service parameter
State service parameter requirement and with the matched query result of above-mentioned entry
Above-mentioned query result includes most N number of key-value pair character strings, each above-mentioned key-value pair include display attribute value and
The attribute value of the attribute value of corresponding preservation, above-mentioned display includes above-mentioned entry;
Returning unit 503, for returning to above-mentioned query result.
Wherein, above-mentioned general polling method may include following steps:
A:Object-oriented is formed with above-mentioned restrictive condition, Business Entity class name, the Property Name of display and above-mentioned entry
HQL query statements, execute above-mentioned HQL query statements, obtain query result data set.
Wherein, query result data set includes M key-value pair, M>=0;Each key-value pair include display attribute value and
The attribute value of corresponding preservation, and the attribute value shown includes above-mentioned entry.
Precedent is still continued to use, user inputs entry " opening ", and the key-value pair in query result data set may include:
Zhang Ming -0001, rich quotient -0011, Zhang Qin -0111, Zhang Miao -1000, Zhang Wenda -1001, Zhang Xing -1010, Zhang Min -
1011, Zhang Xinran -1111 etc..Wherein, Zhang Ming, Zhang Fengshang, Zhang Qin, vast etc. for display attribute value comprising entry
" opening ", and 0001,0011,0111,1000 etc. be the attribute value preserved.
It should be noted that in general procedure design, what the page was shown is such as name, and what is preserved in real data is this
The coding of name, name and code set are at key-value pair.
B:According to the principle that the Property Name of above-mentioned Business Entity class name and display, creating java language with reflection can
The object and acquisition methods of identification obtain most N number of key-value pairs using above-mentioned acquisition methods from above-mentioned query result data set.
When the key-value pair in query result data set more than it is N number of when, can query result data centralized cycle obtain provide
Quantity (namely N number of) key-value pair.And if the key-value pair quantity in data set is less than N, does not execute step B, directly executes step
C。
C:The key-value pair got is combined into key-value pair character string as above-mentioned query result.
Above-mentioned query result includes most N number of key-value pair character strings.In combination, with Zhang Ming -0001, this key-value pair is
Separator " | " can be added in example between, form Zhang Ming | 0001 character string.
In other embodiments of the present invention, in the above-mentioned Property Name according to above-mentioned Business Entity class name and display, fortune
The aspect of java language identifiable object and acquisition methods is created with the principle of reflection, above-mentioned execution unit 502 can be used specifically
In:
According to the principle that above-mentioned Business Entity class name, the identifiable object of java language is created with reflection;
According to the principle that the Property Name of above-mentioned display, the identifiable acquisition methods of java language are created with reflection.
Each embodiment is described by the way of progressive in this specification, the highlights of each of the examples are with other
The difference of embodiment, just to refer each other for identical similar portion between each embodiment.For system disclosed in embodiment
For, since it is corresponded to the methods disclosed in the examples, so description is fairly simple, related place is said referring to method part
It is bright.
Principle and implementation of the present invention are described for specific case used herein, and above example is said
The bright method and its core concept for being merely used to help understand the present invention;Meanwhile for those of ordinary skill in the art, foundation
The thought of the present invention, there will be changes in the specific implementation manner and application range.In conclusion the content of the present specification is not
It is interpreted as limitation of the present invention.
Claims (10)
1. a kind of web page Text Entry is automatically performed implementation method, which is characterized in that the text input of the web page
Frame, which is loaded with, is automatically performed script, and described be automatically performed in script includes pre-set service parameter, the service parameter packet
Include restrictive condition, Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display number,
The number is expressed as N;
The implementation method includes:
The script that is automatically performed receives entry input by user by the Text Entry;
The script that is automatically performed sends the entry and the service parameter, the entry and business ginseng to server end
Number executes general polling method for server ends, obtain meeting the service parameter requirement and with the matched inquiry of the entry
As a result;
The script that is automatically performed receives the query result that the server returns;The query result includes at most N number of
Key-value pair character string, the key-value pair character string are composed of key-value pair, and each key-value pair includes the attribute value of display
Attribute value with the attribute value of corresponding preservation, the display includes the entry;
The script parsing key-value pair character string that is automatically performed obtains analysis result, and shows the analysis result as institute
The occurrence of predicate item.
2. the method as described in claim 1, which is characterized in that before receiving entry input by user, further include:Setting institute
State service parameter.
3. method as claimed in claim 1 or 2, which is characterized in that described to show that the analysis result includes:
The analysis result is presented with the display mode of combobox at the Text Entry.
4. the method as described in claim 1, which is characterized in that in the key-value pair character string, the attribute value of display and right
There are separators between the attribute value for the preservation answered.
5. a kind of web page Text Entry is automatically performed implementation method, which is characterized in that the text input of the web page
Frame, which is loaded with, is automatically performed script, and described be automatically performed in script includes pre-set service parameter, the service parameter packet
Include restrictive condition, Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display number,
The number is expressed as N;
The method includes:
Server is automatically performed the service parameter and entry that script is sent described in receiving, and the entry is inputted by user;
Server executes general polling method according to the entry and the service parameter, obtains meeting the service parameter requirement
And with the matched query result of the entry;The query result includes most N number of key-value pair character strings;
Server returns to the query result;
The general polling method includes:With the restrictive condition, Business Entity class name, the Property Name of display and institute's predicate
Item forms the HQL query statements of object-oriented, executes the HQL query statements, obtains query result data set;The inquiry knot
Fruit data set includes M key-value pair, M>=0;Each key-value pair includes the attribute value of the attribute value and corresponding preservation of display,
The attribute value of the display includes the entry;
According to the principle that the Property Name of the Business Entity class name and display, it is identifiable to create java language with reflection
Object and acquisition methods;
Most N number of key-value pairs are obtained from the query result data set using the acquisition methods;
The key-value pair got is combined into key-value pair character string as the query result.
6. method as claimed in claim 5, which is characterized in that the attribute according to the Business Entity class name and display
Title creates the identifiable object of java language with the principle of reflection and acquisition methods includes:
According to the principle that the Business Entity class name, the identifiable object of java language is created with reflection;
According to the principle that the Property Name of the display, the identifiable acquisition methods of java language are created with reflection.
7. a kind of web page Text Entry is automatically performed realization device, which is characterized in that the text input of the web page
Frame is automatically performed realization device described in being loaded with, and the realization device that is automatically performed pre-sets service parameter, the business
Parameter include restrictive condition, Business Entity class name, the Property Name of display, the Property Name of preservation and display occurrence
Number, the number are expressed as N;
The realization device that is automatically performed includes:
First receiving unit, for receiving entry input by user by the Text Entry;
Transmission unit, for sending the entry and the service parameter, the entry and the service parameter to server end
Execute general polling method for server end, obtain meeting the service parameter requirement and with the matched inquiry of the entry
As a result;
Second receiving unit, the query result returned for receiving the server;The query result includes at most N number of
Key-value pair character string, the key-value pair character string are composed of key-value pair, and each key-value pair includes the attribute value of display
Attribute value with the attribute value of corresponding preservation, the display includes the entry;
Display unit is parsed, obtains analysis result for parsing the key-value pair character string, and show the analysis result conduct
The occurrence of the entry.
8. device as claimed in claim 7, which is characterized in that further include:
Setting unit, for before receiving entry input by user, the service parameter to be arranged.
9. a kind of web page Text Entry is automatically performed realization device, which is characterized in that the text input of the web page
Frame, which is loaded with, is automatically performed script, and described be automatically performed in script includes pre-set service parameter, the service parameter packet
Include restrictive condition, Business Entity class name, the Property Name of display, the Property Name of preservation and the occurrence of display number,
The number is expressed as N;
The realization device that is automatically performed includes:
Data receipt unit, for receiving the service parameter and entry for being automatically performed script transmission, the entry by
User inputs;
Execution unit obtains meeting the business for executing general polling method according to the entry and the service parameter
Parameter request and with the matched query result of the entry;The query result includes most N number of key-value pair character strings;
Returning unit, for returning to the query result;
The general polling method includes:
The HQL that object-oriented is formed with the restrictive condition, Business Entity class name, the Property Name of display and the entry is looked into
Sentence is ask, the HQL query statements is executed, obtains query result data set;The query result data set includes M key assignments
It is right, M>=0;Each key-value pair includes the attribute value of the attribute value and corresponding preservation of display, and the attribute value of the display includes
The entry;
According to the principle that the Property Name of the Business Entity class name and display, it is identifiable to create java language with reflection
Object and acquisition methods;
Most N number of key-value pairs are obtained from the query result data set using the acquisition methods;
The key-value pair got is combined into key-value pair character string as the query result.
10. device as claimed in claim 9, which is characterized in that described according to the Business Entity class name and display
Property Name creates the aspect of java language identifiable object and acquisition methods, the execution unit with the principle of reflection
It is specifically used for:
According to the principle that the Business Entity class name, the identifiable object of java language is created with reflection;
According to the principle that the Property Name of the display, the identifiable acquisition methods of java language are created with reflection.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510779435.5A CN105224696B (en) | 2015-11-13 | 2015-11-13 | Web page Text Entry is automatically performed implementation method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510779435.5A CN105224696B (en) | 2015-11-13 | 2015-11-13 | Web page Text Entry is automatically performed implementation method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105224696A CN105224696A (en) | 2016-01-06 |
CN105224696B true CN105224696B (en) | 2018-09-18 |
Family
ID=54993664
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510779435.5A Active CN105224696B (en) | 2015-11-13 | 2015-11-13 | Web page Text Entry is automatically performed implementation method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105224696B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108108429B (en) * | 2017-12-01 | 2020-08-18 | 深圳市小牛在线互联网信息咨询有限公司 | Data storage method and device of terminal equipment, storage medium and computer equipment |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1936894A (en) * | 2006-10-12 | 2007-03-28 | 魏新成 | Method for searching key word and inputting in turn search service character symbol on address search column |
CN101022619A (en) * | 2007-03-15 | 2007-08-22 | 魏新成 | Immediate online searching operation after cellphone standly state inputting alphabet string |
CN101266608A (en) * | 2008-05-09 | 2008-09-17 | 魏新成 | Method for on-line searching for computer screen displayed text character string |
CN102207816A (en) * | 2010-07-16 | 2011-10-05 | 北京搜狗科技发展有限公司 | Method for performing adaptive input based on input environment, and input method system |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030195879A1 (en) * | 2002-04-12 | 2003-10-16 | Arsen Pereymer | Data collection technology useful for form manipulation |
-
2015
- 2015-11-13 CN CN201510779435.5A patent/CN105224696B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1936894A (en) * | 2006-10-12 | 2007-03-28 | 魏新成 | Method for searching key word and inputting in turn search service character symbol on address search column |
CN101022619A (en) * | 2007-03-15 | 2007-08-22 | 魏新成 | Immediate online searching operation after cellphone standly state inputting alphabet string |
CN101266608A (en) * | 2008-05-09 | 2008-09-17 | 魏新成 | Method for on-line searching for computer screen displayed text character string |
CN102207816A (en) * | 2010-07-16 | 2011-10-05 | 北京搜狗科技发展有限公司 | Method for performing adaptive input based on input environment, and input method system |
Also Published As
Publication number | Publication date |
---|---|
CN105224696A (en) | 2016-01-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10817409B2 (en) | System and method for testing software applications in a software defined network | |
Xanthopoulos et al. | A comparative analysis of cross-platform development approaches for mobile applications | |
CN104572114B (en) | A kind of binding device, using updating device and method | |
US20170091293A1 (en) | Generation of data flow from syntax tree | |
CN101398845B (en) | Multi-language binding method and system in web applications | |
CN105446874B (en) | A kind of detection method and device of resource distribution file | |
CN104598218B (en) | For merging and reusing the method and system of gateway information | |
US8990070B2 (en) | Computer-based construction of arbitrarily complex formal grammar expressions | |
CN110727782A (en) | Question and answer corpus generation method and system | |
US11275625B2 (en) | System and method for automated application programming interface generation | |
Greiner et al. | Non-interference with what-declassification in component-based systems | |
Tsai et al. | Service-oriented user interface modeling and composition | |
US10331643B2 (en) | Generating context tree data based on a tailored data model | |
CN105224696B (en) | Web page Text Entry is automatically performed implementation method and device | |
CN106371987A (en) | Test method and device | |
Sampaio et al. | Sound and mechanised compositional verification of input‐output conformance | |
CN104572095B (en) | A kind of adaptive approach that Ajax applications are built towards end user | |
US20110131552A1 (en) | Augmenting visualization of a call stack | |
US10983813B2 (en) | Automatic repetition of context-specific code edits | |
CN109976713A (en) | Script processing method and device for Service Assembly | |
CN109634647B (en) | Construction method and system of large-scale front-end project | |
CN107977304A (en) | A kind of system debug method and apparatus | |
CN111026371B (en) | Game development method and device, electronic equipment and storage medium | |
CN101996255A (en) | Method for constructing required-interface oriented cloud computing searching system | |
US20200019452A1 (en) | System architecture framework |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |