CN103020052B - A kind of method and apparatus identifying search need - Google Patents

A kind of method and apparatus identifying search need Download PDF

Info

Publication number
CN103020052B
CN103020052B CN201110279434.6A CN201110279434A CN103020052B CN 103020052 B CN103020052 B CN 103020052B CN 201110279434 A CN201110279434 A CN 201110279434A CN 103020052 B CN103020052 B CN 103020052B
Authority
CN
China
Prior art keywords
template
word
current
node
trie tree
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
Application number
CN201110279434.6A
Other languages
Chinese (zh)
Other versions
CN103020052A (en
Inventor
施少杰
刘建柱
薛阳阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201110279434.6A priority Critical patent/CN103020052B/en
Publication of CN103020052A publication Critical patent/CN103020052A/en
Application granted granted Critical
Publication of CN103020052B publication Critical patent/CN103020052B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a kind of method and apparatus identifying search need, the form storage dictionary set with trie (Trie) respectively in data base and demand recognition template, respectively obtain dictionary Trie tree and template Trie tree;The method includes: after receiving user search request (query), mates user query in conjunction with dictionary Trie tree and template Trie tree, determines the demand type corresponding to the template matched.The efficiency identifying search need can be improved by the present invention, reduce and search for the calculating pressure that the performance to search engine is brought.

Description

A kind of method and apparatus identifying search need
[technical field]
The present invention relates to field of computer technology, particularly to a kind of method identifying search need and dress Put.
[background technology]
In search technique, search engine is in order to return Search Results accurately to user, and it is right to need User search request (query) carries out demand identification such that it is able to return phase according to the demand identified Answer the Search Results of data resource, or according to the demand identified, Search Results is carried out corresponding form Represent.
A certain class query that user expresses is typically compliant with certain pattern, in existing search need identification skill In art, generally the query with same requirements is summed up the form forming one or more templates, Pre-build the corresponding relation of template and search need.After receiving user query, first by user Query mates with dictionary, determines each word in user query according to the matching result of dictionary Attribute, utilizes the attribute of each word determined to mate one by one with template, by corresponding for the template of coupling Search need is identified as the search need of user query.
But, in existing search need, need in the matching process one by one with the dictionary in data base Mating with each template, and the quantity of the generally dictionary in data base and template is very big, this will result in Identifying that the efficiency of the search need of user query is the lowest, every day, the property to search engine was understood in the search of magnanimity The biggest calculating pressure can be brought.
[summary of the invention]
In view of this, the invention provides a kind of method and apparatus identifying search need, in order to carry The high efficiency identifying search need, reduces the pressure that the performance of search engine is brought by search.
Concrete technical scheme is as follows:
A kind of method identifying search need, respectively with the form storage dictionary of trie Trie tree in data base With demand recognition template, respectively obtain dictionary Trie tree and template Trie tree;Described method includes:
After receiving user search request query, in conjunction with described dictionary Trie tree and template Trie tree to described User query mates, and determines the demand type corresponding to the template matched.
Wherein, root node instruction original state in described dictionary Trie tree, leaf node and part intermediate node refer to Showing the Words ' Attributes matched, the jump condition between node and node is character;
Root node instruction original state in described template Trie tree, leaf node instruction template matching success, node With the jump condition between node includes: concrete term, Words ' Attributes, asterisk wildcard or function.
Specifically, in data base, obtain dictionary Trie tree with the form storage dictionary of Trie tree to include:
A1, in data base, set up the root node of dictionary Trie tree, this root node instruction original state;
A2, from described dictionary obtain a word not yet added in dictionary Trie tree, reading currently obtain First character in the word taken, using the root node of dictionary Trie tree as current point of addition;
The transfer bar that the character that A3, judgement currently read the most Already in starts from current point of addition Part, if it is, perform step A4;Otherwise, step A6 is performed;
A4, in dictionary Trie tree, corresponding next of the jump condition existing for character that will currently read Level node is as current point of addition;
Whether the word that A5, judgement currently read exists character late, if it is, read current acquisition The character late of word, go to step A3;Otherwise, step A9 is performed;
A6, the character currently read is added to a jump condition starting from current point of addition;
Whether A7, the current word obtained of judgement exist character late, if it is, perform step A8; Otherwise, the attribute of the word currently obtained is added the next stage that the added jump condition of step A6 is corresponding to In node, perform step A9;
A8, using next stage node corresponding for added for step A6 jump condition as current point of addition, read Take the character late in the word of current acquisition, go to step A3;
A9, the adding procedure of the current word obtained of end, not yet add word to if existed in described dictionary Word in allusion quotation Trie tree, then go to step A2;Otherwise, dictionary Trie tree is obtained.
Specifically, in data base, obtain template Trie tree with the form storage template of Trie tree to include:
B1, in data base, set up the root node of template Trie tree, this root node instruction original state;
B2, obtain a template not yet added in template Trie tree, read in the template of current acquisition the The content of one template groove, using the root node of template Trie tree as current point of addition;
The content of the template groove that B3, judgement currently read the most current point of addition starts Jump condition, if it is, perform step B4;Otherwise perform step B7;
B4, in template Trie tree, by corresponding for the jump condition at the content place of template groove currently read Next stage node as current point of addition;
Whether B5, the current template groove read of judgement exist next template groove, if it is, read next The content of template groove, goes to step B3;Otherwise, step B6 is performed;
B6, in current point of addition add template matching successfully indicate, perform step B8;
B7, the content of the template groove currently read is added to a transfer bar starting from current point of addition Part, using next stage node corresponding for this jump condition as current point of addition, goes to step B5;
B8, the adding procedure of the current template obtained of end, if there is not yet adding template Trie tree to Template, then go to step B2;Otherwise, template Trie tree is obtained.
Further, can also include in described step B6: add current in current point of addition The outlet of demand type information corresponding to the template obtained, or add the current need corresponding to template obtained Seek type information.
Wherein, in conjunction with described dictionary Trie tree and template Trie tree, described user query is mated, really Surely the demand type corresponding to the template matched specifically includes:
C1, first character from described user query start to mate with described dictionary Trie tree, note Record and each take turns every content that dictionary Trie tree matches and obtain the various words full cutting knot of described user query Really, institute's predicate full cutting result includes in the attribute of word and word, and each word full cutting result Word constitutes described user query;
C2, mate, really on described template Trie tree respectively for each word full cutting result one by one Surely the demand type corresponding to the template matched.
Specifically, described step C1 may include that
C11, receive described user query after, dictionary pointer point to described user query first character Symbol;
C12, using the root node of dictionary Trie tree as current matching position;
Whether C13, the current character read of judgement match the jump condition started from current matching position, If it is, perform step C14;Otherwise, step C17 is performed;
C14, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is No deixis attribute, if it is, perform step C15;Otherwise, step C16 is performed;
C15, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Word;
C16;Judge whether the current character read exists character late in described user query, as Fruit is, reads character late and goes to described step C13;Otherwise end step C1;
C17, the shortest word in the word of record when determining current dictionary pointer position, it is judged that this shortest word Whether language exists character late in user query, if it is, dictionary pointer points to this shortest word Character late in user query, reads the character that dictionary pointer points to, goes to step C12.
Specifically, in described step C2, following steps are performed respectively for each word complete cutting result:
C21, by template pointer point to described user query first character, by the root of template Trie tree The node that node arrives as current matching;
C22, determine the word started in current word full cutting result with the character pointed by current template pointer;
Whether the attribute of C23, the current word read of judgement or this word matches in template Trie tree from working as Before the jump condition that starts of the node that matches, if it is, perform step C24;Otherwise, terminate currently The template matching of word full cutting result;
C24, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is The success of no instruction template matching, if it is, perform step C25;Otherwise, step C26 is performed;
The search need of the node instruction that C25, acquisition currently determine, end step C2;
Whether C26, the current word read of judgement exist character late in described user query, as Fruit is, performs step C27;Otherwise, end step C2;
C27, the word that the sensing of template pointer is currently read character late in described user query, Go to step C22.
It addition, combine described dictionary Trie tree and described user query is mated, really by template Trie tree Surely the demand type corresponding to the template matched specifically includes:
D1, by dictionary pointer point to user query first character;
D2, from dictionary pointer point to character start to mate with described dictionary Trie tree;
D3, one take turns after dictionary Trie tree coupling terminates, every content that epicycle dictionary Trie tree is matched The position matched at the end of last round of template Trie tree mates proceeds by coupling, described every content bag Include the attribute of word and word, after epicycle template Trie tree coupling terminates, dictionary pointer is pointed to epicycle mould Plate Trie tree coupling used word character late in user query, goes under step D2 starts One coupling taking turns dictionary Trie tree, until matching template or template Trie tree, it fails to match;Determine coupling Demand type corresponding to the template arrived.
Described step D2 specifically includes:
D21, using the root node of dictionary Trie tree as current matching position;
D22, read the character that current dictionary pointer points to, it is judged that the current character read whether match from The jump condition that current matching position starts, if it does not, epicycle dictionary Trie tree coupling terminates, records epicycle Every content that dictionary Trie tree matches;If it is, perform step D23;
D23, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is No deixis attribute, if it is, perform step D24;Otherwise, step D25 is performed;
D24, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Word, perform step D25;
Whether D25, the current character read of judgement exist character late in described user query, as Fruit is, reads character late, using the node that currently determines as current matching position, goes to described step D22;Otherwise, described step D3 is gone to.
In step D3, read every content that epicycle dictionary Trie tree matches respectively, and be respectively directed to The every content following matching process of execution read:
Whether the attribute of D31, the current word read of judgement or this word matches in template Trie tree from working as Before the jump condition that starts of the node that matches, described current matching to the initial position of node be described mould The root node of plate Trie tree;If it is, perform step D32;Otherwise, terminate for the current content read Template Trie tree coupling;
D32, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is The success of no instruction template matching, if it is, perform step D33;Otherwise, using the node that currently determines as Current matching position, dictionary pointer points to the word next one in user query in the current content read Character, goes to described step D2;
D33, determine the search need that the template matched is corresponding, terminate the mould for the current content read Plate Trie tree mates.
Specifically, it is judged that the attribute of the current word read or this word whether match in template Trie tree from Current matching to the jump condition that starts of node include:
If from current matching to the jump condition that starts of node be Words ' Attributes, read if then current The attribute of word is consistent with the Words ' Attributes in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be concrete term, read if then current Word is consistent with the concrete term in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be asterisk wildcard, then confirm both couplings, from The current word read starts to intercept length indicated by asterisk wildcard in query, using the content intercepted as working as The word of front reading;Or,
If from current matching to the jump condition that starts of node be function, then call described function from reading Word start to be identified in described user query, if recognition result meets default function requirements, Then confirming both couplings, the word corresponding to recognition result that will meet the function requirements preset is read as current The word taken.
A kind of device identifying search need, respectively with the form storage dictionary of trie Trie tree in data base With demand recognition template, respectively obtain dictionary Trie tree and template Trie tree;This device includes:
Request reception unit, is used for receiving user search request query;
Demand matching unit, is used for combining described dictionary Trie tree and template Trie tree to described user query Mate, determine the demand type corresponding to the template matched.
Wherein, root node instruction original state in described dictionary Trie tree, leaf node and part intermediate node refer to Showing the Words ' Attributes matched, the jump condition between node and node is character;
Root node instruction original state in described template Trie tree, leaf node instruction template matching success, node With the jump condition between node includes: concrete term, Words ' Attributes, asterisk wildcard or function.
Further, this device can also include: lexicographic tree sets up unit, is used for performing following operation:
A1, in data base, set up the root node of dictionary Trie tree, this root node instruction original state;
A2, from described dictionary obtain a word not yet added in dictionary Trie tree, reading currently obtain First character in the word taken, using the root node of dictionary Trie tree as current point of addition;
The transfer bar that the character that A3, judgement currently read the most Already in starts from current point of addition Part, if it is, perform operation A4;Otherwise, operation A6 is performed;
A4, in dictionary Trie tree, corresponding next of the jump condition existing for character that will currently read Level node is as current point of addition;
Whether the word that A5, judgement currently read exists character late, if it is, read current acquisition The character late of word, go to operate A3;Otherwise, operation A9 is performed;
A6, the character currently read is added to a jump condition starting from current point of addition;
Whether A7, the current word obtained of judgement exist character late, if it is, perform operation A8; Otherwise, the attribute of the word currently obtained is added to the next stage that operation the added jump condition of A6 is corresponding In node, perform operation A9;
A8, will operation next stage node corresponding to the added jump condition of A6 as current point of addition, reading Take the character late in the word of current acquisition, go to operate A3;
A9, the adding procedure of the current word obtained of end, not yet add word to if existed in described dictionary Word in allusion quotation Trie tree, then go to operate A2;Otherwise, dictionary Trie tree is obtained.
This device also includes: template tree sets up unit, is used for performing following operation:
B1, in data base, set up the root node of template Trie tree, this root node instruction original state;
B2, obtain a template not yet added in template Trie tree, read in the template of current acquisition the The content of one template groove, using the root node of template Trie tree as current point of addition;
The content of the template groove that B3, judgement currently read the most current point of addition starts Jump condition, if it is, perform operation B4;Otherwise perform operation B7;
B4, in template Trie tree, by corresponding for the jump condition at the content place of template groove currently read Next stage node as current point of addition;
Whether B5, the current template groove read of judgement exist next template groove, if it is, read next The content of template groove, goes to operate B3;Otherwise, operation B6 is performed;
B6, in current point of addition add template matching successfully indicate, perform operation B8;
B7, the content of the template groove currently read is added to a transfer bar starting from current point of addition Part, using next stage node corresponding for this jump condition as current point of addition, goes to operate B5;
B8, the adding procedure of the current template obtained of end, if there is not yet adding template Trie tree to Template, then go to operate B2;Otherwise, template Trie tree is obtained.
Further, described template tree set up unit perform described operation B6 time, be additionally operable to currently Point of addition adds the outlet of demand type information corresponding to the current template obtained, or interpolation currently obtains Demand type information corresponding to the template taken.
Wherein, described demand matching unit specifically includes: the first lexicographic tree matching module and the first template tree Join module;
Described first lexicographic tree matching module, for starting and institute from the first character of described user query Allusion quotation Trie tree mates predicate, records and each take turns every content that dictionary Trie tree matches and obtain described use The various words full cutting result of family query, institute's predicate full cutting result includes the attribute of word and word, And the word in each word full cutting result constitutes described user query;
Described first template tree matching module, for one by one for each word full cutting result respectively described Mate on template Trie tree, determine the demand type corresponding to the template matched.
Described first lexicographic tree matching module specifically performs following operation:
C11, receive described user query after, dictionary pointer point to described user query first character Symbol;
C12, using the root node of dictionary Trie tree as current matching position;
Whether C13, the current character read of judgement match the jump condition started from current matching position, If it is, perform operation C14;Otherwise, operation C17 is performed;
C14, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is No deixis attribute, if it is, perform operation C15;Otherwise, operation C16 is performed;
C15, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Word;
C16;Judge whether the current character read exists character late in described user query, as Fruit is, reads character late and goes to described operation C13;Otherwise end operation;
C17, the shortest word in the word of record when determining current dictionary pointer position, it is judged that this shortest word Whether language exists character late in user query, if it is, dictionary pointer points to this shortest word Character late in user query, reads the character that dictionary pointer points to, and goes to operate C12.
Described first template tree matching module specifically performs following operation:
C21, by template pointer point to described user query first character, by the root of template Trie tree The node that node arrives as current matching;
C22, determine the word started in current word full cutting result with the character pointed by current template pointer;
Whether the attribute of C23, the current word read of judgement or this word matches in template Trie tree from working as Before the jump condition that starts of the node that matches, if it is, perform operation C24;Otherwise, terminate currently The template matching of word full cutting result;
C24, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is The success of no instruction template matching, if it is, perform operation C25;Otherwise, operation C26 is performed;
The search need of the node instruction that C25, acquisition currently determine, end operation;
Whether C26, the current word read of judgement exist character late in described user query, as Fruit is, performs operation C27;Otherwise, end operation;
C27, the word that the sensing of template pointer is currently read character late in described user query, Go to operate C22.
Specifically, described demand matching unit may include that dictionary pointer arranges module, the second lexicographic tree Join module and the second template tree matching module;
Described dictionary pointer arranges module, for dictionary pointer points to the first character of user query;
Described second lexicographic tree matching module, starts and described dictionary for the character pointed to from dictionary pointer Trie tree mates;
Described second template tree matching module, for taking turns after dictionary Trie tree coupling terminates one, by described the Every content that two lexicographic tree matching module epicycles match dictionary Trie tree is from last round of template Trie tree The position matched at the end of joining proceeds by coupling, and described every content includes the genus of word and word Property, after epicycle template Trie tree coupling terminates, trigger described dictionary pointer and module is set by the sensing of dictionary pointer Epicycle template Trie tree coupling used word character late in user query, and trigger described the Two lexicographic tree matching modules start the coupling of next round dictionary Trie tree, until matching template or template It fails to match for Trie tree;Determine the demand type corresponding to the template matched.
Wherein, described second lexicographic tree matching module specifically performs following operation:
D21, using the root node of dictionary Trie tree as current matching position;
D22, read the character that current dictionary pointer points to, it is judged that the current character read whether match from The jump condition that current matching position starts, if it does not, epicycle dictionary Trie tree coupling terminates, records epicycle Every content that dictionary Trie tree matches;If it is, perform operation D23;
D23, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is No deixis attribute, if it is, perform operation D24;Otherwise, operation D25 is performed;
D24, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Word, perform operation D25;
Whether D25, the current character read of judgement exist character late in described user query, as Fruit is, reads character late, using the node that currently determines as current matching position, goes to described operation D22;Otherwise, epicycle dictionary Trie tree coupling terminates.
Specifically, described second template tree matching module reads described second lexicographic tree matching module epicycle respectively Every content that dictionary Tire tree matches, and it is respectively directed to the every content following matching operation of execution read:
Whether the attribute of D31, the current word read of judgement or this word matches in template Trie tree from working as Before the jump condition that starts of the node that matches, described current matching to the initial position of node be described mould The root node of plate Trie tree;If it is, perform operation D32;Otherwise, terminate for the current content read Template Trie tree coupling;
D32, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined is The success of no instruction template matching, if it is, perform operation D33;Otherwise, using the node that currently determines as Current matching position, dictionary pointer points to the word next one in user query in the current content read Character, goes to described operation D2;
D33, determine the search need that the template matched is corresponding, terminate the mould for the current content read Plate Trie tree mates.
Judge whether the attribute of the current word read or this word matches in template Trie tree from current matching To the jump condition that starts of node include:
If from current matching to the jump condition that starts of node be Words ' Attributes, read if then current The attribute of word is consistent with the Words ' Attributes in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be concrete term, read if then current Word is consistent with the concrete term in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be asterisk wildcard, then confirm both couplings, from The current word read starts to intercept length indicated by asterisk wildcard in query, using the content intercepted as working as The word of front reading;Or,
If from current matching to the jump condition that starts of node be function, then call described function from The word read starts to be identified in described user query, if recognition result meets default letter Number requirement, then confirm both couplings, by the word corresponding to the recognition result of the satisfied function requirements preset As the current word read.
As can be seen from the above technical solutions, the present invention stores dictionary and demand by the form of Trie tree Recognition template so that after receiving user query, it is possible to by combining coupling dictionary Trie tree and template The mode of Trie tree determines the demand type corresponding to the template matched, compare one by one with in data base Dictionary and each template carry out the mode mated, substantially increase the efficiency identifying search need, reduce Search for the calculating pressure that the performance to search engine is brought.
[accompanying drawing explanation]
The flow chart setting up dictionary Trie tree that Fig. 1 provides for the embodiment of the present invention one;
The instance graph of the dictionary Trie tree that Fig. 2 provides for the embodiment of the present invention one;
The flow chart setting up template Trie tree that Fig. 3 provides for the embodiment of the present invention two;
The instance graph of the template Tire tree that Fig. 4 provides for the embodiment of the present invention two;
A kind of method flow diagram determining demand type that Fig. 5 provides for the embodiment of the present invention three;
Fig. 6 determines the method flow diagram of demand type for the another kind that the embodiment of the present invention four provides;
A kind of structure drawing of device that Fig. 7 provides for the embodiment of the present invention five;
The another kind of structure drawing of device that Fig. 8 provides for the embodiment of the present invention five.
[detailed description of the invention]
In order to make the object, technical solutions and advantages of the present invention clearer, below in conjunction with the accompanying drawings and tool Body embodiment describes the present invention.
The method that the present invention provides specifically includes that the form set respectively in data base with trie (Trie) Storage dictionary and demand recognition template, respectively obtain dictionary Trie tree and template Trie tree;Receive use After the query of family, utilize dictionary Trie tree and template Trie tree that this user query is mated, determine Demand type corresponding to the template matched.
Trie tree includes the jump condition between node and node and the node of hierarchical structure, wherein, Each node instruction status information, root node instruction original state.
In dictionary Trie tree, root node instruction original state, the word that leaf node instruction matches belongs to Property.Intermediate node instruction intermediateness, it is also possible to the Words ' Attributes that matches of instruction, node and node it Between jump condition be character.
In template Trie tree, root node instruction original state, leaf node instruction template matching success, Jump condition between node and node includes: Words ' Attributes, concrete term, asterisk wildcard or function.Word Language attribute can include but not limited to: part of speech, name entity type etc..Wherein concrete term may include that Conventional entity word or the negligible word such as auxiliary word, function word.
First pass through embodiment one and dictionary Trie tree is set up process and template by embodiment two respectively The process of setting up of Trie tree is described.
Embodiment one,
The flow chart setting up dictionary Trie tree that Fig. 1 provides for the embodiment of the present invention one, as it is shown in figure 1, Comprise the following steps:
Step 101: set up the root node of dictionary Trie tree, this root node instruction original state.
In dictionary Trie tree, root node be only one coupling starting position, thereby indicate that be at the beginning of Beginning state.The foundation of this root node only needs to perform during first word in initial read dictionary.
Step 102: obtain a word not yet added in dictionary Trie tree from dictionary, read and work as First character in the word of front acquisition, using the root node of dictionary Trie tree as current point of addition.
Step 103: judge that the character currently read is the most Already in from the beginning of current point of addition Jump condition, if it is, perform step 104;Otherwise, step 106 is performed.
Step 104: in dictionary Trie tree, the jump condition pair existing for character that will currently read The next stage node answered is as current point of addition.
Step 105: judge whether there is character late in the word currently got, if it is, read Take the character late in the word of current acquisition, go to step 103;Otherwise, current acquisition is terminated The adding procedure of word, then go to step 102.
It practice, when terminating the adding procedure of the current word obtained, if dictionary exists not yet Add the word in dictionary Trie tree to, then go to step 102;Otherwise, terminate to set up dictionary Trie The flow process of tree, obtains dictionary Trie tree.
Step 106: the character currently read is added to the transfer started from current point of addition Condition.
Step 107: judge whether there is character late in the current word obtained, if it is, perform Step 108;Otherwise, add the Words ' Attributes of the word currently obtained to step 106 and added transfer In the next stage node that condition is corresponding, terminate the adding procedure of the current word obtained, go to step 102.
Equally, it practice, when terminating the adding procedure of the current word obtained, if dictionary is deposited Word in not yet adding dictionary Trie tree to, then go to step 102;Otherwise, terminate to set up dictionary The flow process of Trie tree, obtains dictionary Trie tree.
Step 108: next stage node corresponding for added for step 106 jump condition is added as current Position, reads the character late in the current word obtained, goes to step 103.
Lift a concrete example, by " three rivers ", " three Jiangkous " and " three rivers present in dictionary County " three words add in dictionary Trie tree, and these three word Words ' Attributes in dictionary is Location name.
As in figure 2 it is shown, after setting up the root node (node 1 in Fig. 2) of dictionary Trie tree, obtain word Language " three rivers ", first reads character " three ", it is assumed that do not deposit from the jump condition that root node starts " three ", then " three " are added to the jump condition started from root node, by this jump condition Corresponding next stage node (node 2 in Fig. 2) is as current point of addition.Continue to read the next one Character " river ", it is assumed that there is not " river " from the jump condition that node 2 starts, then " river " is added Adding as the jump condition started from node 2, the next stage node corresponding in this jump condition (is i.e. schemed Node 3 in 2) middle interpolation Words ' Attributes place name, the interpolation of word " three rivers " is complete.
Continue to obtain word " three Jiangkous ", first read character " three ", from turning that root node starts Shifting condition exists " three ", then by next stage node corresponding for this jump condition (i.e. in Fig. 2 Node 2) as current point of addition.Read character late " river ", the transfer started from node 2 Condition comprises character " river ", then by next stage node (i.e. Fig. 2 corresponding for this jump condition In node 3) as current point of addition.Read character late " mouth ", start from node 3 Jump condition does not exist character " mouth ", " mouth " is added to the jump condition started from node 3, And in the next stage node (i.e. node 4 in Fig. 2) that this jump condition is corresponding, add Words ' Attributes ground Name, so far, the adding procedure at " three Jiangkous " terminates.
The adding procedure in " San Jiang county " is similar with " three Jiangkous ", does not repeats them here, finally this three Individual word situation in dictionary Trie tree is as shown in Figure 2.Can be by institute in dictionary by said method Some words all represent in a dictionary Trie tree, and all words all share a root node.Follow-up When utilizing dictionary Trie tree to carry out word match, all from the beginning of the root node of dictionary Trie tree.
So far flow process shown in embodiment one terminates.
Embodiment two,
The flow chart setting up template Trie tree that Fig. 3 provides for the embodiment of the present invention two, this process utilizes Corresponding relation between each template and the demand type information that are pre-existing in forms template Trie tree, such as Fig. 3 Shown in, comprise the following steps:
Step 301: set up the root node of template Trie tree, this root node instruction original state.
In template Trie tree, root node be only one coupling starting position, thereby indicate that be at the beginning of Beginning state.The foundation of this root node only needs to perform during first template in initial read template.
Step 302: obtain a template not yet added in template Trie tree, reads current acquisition The content of first template groove in template, using the root node of template Trie tree as current point of addition.
In template, the content of each template groove can include but not limited to: Words ' Attributes, concrete term, logical Join symbol or function.When being asterisk wildcard, it is also possible to indicate the length of asterisk wildcard simultaneously.
Step 303: judge that the content of the template groove currently read the most Already in is added from current The jump condition that position starts, if it is, perform step 304;Otherwise, step 307 is performed.
Step 304: in template Trie tree, the transfer at the content place of template groove that will currently read Next stage node corresponding to condition is as current point of addition.
Step 305: judge whether the current template groove obtained exists next template groove, if it is, read Take the content of next template groove, go to step 303;Otherwise, step 306 is performed.
Step 306: add template matching in current point of addition and successfully indicate, terminate current acquisition The adding procedure of template, go to step 302.
It practice, after the adding procedure terminating the current template obtained, if there is not yet adding to The template of template Trie tree, then go to step 302;Otherwise, that terminates template Trie tree sets up process, Obtain template Trie tree.
Step 307: the content of the template groove currently obtained is added to started from current point of addition Individual jump condition, using next stage node corresponding for this jump condition as current point of addition, goes to step 305。
In above-mentioned step 306, successfully refer to except adding template matching in current point of addition Outside showing, it is also possible to add one further and point to the outlet of demand type information corresponding to this template, or Person directly adds demand type information corresponding to this template.
Lift a concrete example, it is assumed that be by template: [place name] [to] [place name], [mechanism's name] [arriving] [machine Structure name] add in Trie tree, the most corresponding train query demand of the two template and map circuit query Demand.
As shown in Figure 4, after setting up the root node (node 1 in Fig. 4) of template Trie tree, obtain mould Plate: [place name] [arriving] [place name], the content " place name " first reading first template groove (is a word Language attribute), it is assumed that from the jump condition that root node starts, there is not Words ' Attributes " place name ", then " place name " is added to the jump condition started from root node, by corresponding for this jump condition next Level node (node 2 in Fig. 4) is as current point of addition.Continue to read the interior of next template groove Hold " arriving ", it is assumed that do not exist from the jump condition that node 2 starts concrete word " to ", then will " to " it is added to a jump condition from node 2 beginning, by next stage joint corresponding for this jump condition Point (i.e. node 4 in Fig. 4) is as current point of addition.Continue to read the content of next template groove " place name ", it is assumed that from the jump condition that node 4 starts, there is not Words ' Attributes " place name ", then will " place name " is added to the jump condition started from node 4, at the next stage node of this jump condition In (node 6 in Fig. 4), instruction template matching is successful, and interpolation demand type information is: train is looked into Inquiry demand type.
The next template of continuation acquisition: [mechanism's name] [arriving] [mechanism's name], first reads first template groove Content " structure name " (being a Words ' Attributes), it is assumed that from the jump condition that root node starts also There is not Words ' Attributes " structure name ", then " structure name " is added to turn started from root node Shifting condition, adds next stage node (node 3 in Fig. 4) corresponding for this jump condition as current Position.The content continuing to read next template groove " arrives ", it is assumed that the jump condition started from node 3 In there is not concrete word and " arrive ", then will " to " be added to a transfer bar starting from node 3 Part, using next stage node (i.e. node 5 in Fig. 4) corresponding for this jump condition as currently adding position Put.Continue to read the content " mechanism's name " of next template groove, it is assumed that the transfer bar started from node 5 Part does not exist Words ' Attributes " mechanism's name ", then " mechanism's name " is added to started from node 5 Individual jump condition, instruction template in the next stage node (node 7 in Fig. 4) of this jump condition It is made into merit, and interpolation demand type information is: map circuit query demand type.
So far the process of embodiment two terminates.
When utilizing dictionary Trie tree and template Trie tree that user query is mated, actually Utilize dictionary Trie tree that user query carries out the full cutting of word to process, user query is carried out word and entirely cuts The result of divisional processing is mated with template Trie tree, thus obtains the template mated with user query, And determine the demand type that the template matched is corresponding.
Wherein, the coupling utilizing dictionary Trie tree and the coupling utilizing template Trie tree can successively be carried out, I.e. user query carried out after the full cutting of word is disposed first with dictionary Trie tree, then carry out template The coupling of Trie tree;Can also alternately, when the most often performing the coupling that takes turns dictionary Trie tree, just Word epicycle being syncopated as carries out the coupling of next node in template Trie tree, matches template After the next node of Trie tree, return dictionary Trie tree and carry out the coupling of next round.Below by Above two matching way is described in detail by embodiment three and embodiment four.
Embodiment three,
The coupling that user query first carries out dictionary Trie tree is used to carry out the full cutting of word in this embodiment After being disposed, template Trie tree carries out mating the mode determining demand type recycling.Fig. 5 is this A kind of method flow diagram determining demand type that inventive embodiments three provides, as it is shown in figure 5, the method May comprise steps of:
Step 501: receive user query, dictionary pointer points to the first character of user query, Read the character that current dictionary pointer points to.
Step 502: using the root node of dictionary Trie tree as current matching position.
Step 503: judge whether the current character read matches the transfer started from current matching position Condition, if it is not, then perform step 507;If it is, perform step 504.
Step 504: determine the next stage node that the jump condition matched is corresponding, it is judged that currently determine Node whether deixis attribute, if it is, perform step 505;Otherwise, step 506 is performed.
Step 505: the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched The word constituted, performs step 506.
Step 506: judge whether the current character read exists character late in user query, If it is, reading character late, using the node that currently determines as current matching position, go to step 503;Otherwise, step 508 is performed.
Step 507: the shortest word in the word of record when determining current dictionary pointer position, it is judged that should Whether the shortest word exists character late in user query, should if it is, pointed to by dictionary pointer The shortest word character late in user query, reads the character that dictionary pointer points to, and goes to step Rapid 502;Otherwise, step 508 is performed.
Step 508: the matching process of dictionary Trie tree terminates, utilizes record from this user query Word and attribute thereof obtain the various words full cutting result of user query, in various words full cutting result Word constitutes whole user query.
Perform respectively for various words full cutting result with the matching process of lower bolster Trie tree one by one.
Step 509: template pointer is pointed to the first character of user query, by template Trie tree The node that root node arrives as current matching.
Step 510: determine in current word full cutting result and start with the character pointed by current template pointer Word.
Step 511: judge whether the current word read or its attribute match in template Trie tree from working as Before the jump condition that starts of the node that matches, if it is, perform step 512;Otherwise, terminate working as The template matching flow process of front word full cutting result.
In this step, it is judged that whether the current content read matches in template Tire tree from current During the jump condition that the node being fitted on starts, following several situation can be there is:
If from current matching to the jump condition that starts of node be Words ' Attributes, if the most currently read In the content taken, Words ' Attributes is consistent with the Words ' Attributes in jump condition, it is determined that both couplings.
If from current matching to the jump condition that starts of node be concrete term, if the most currently read In the content taken, word is consistent with the concrete term in jump condition, it is determined that both couplings.
If from current matching to the jump condition that starts of node be asterisk wildcard, then confirm both couplings, In such a case, it is possible to start to intercept length indicated by asterisk wildcard among query from the current word read Degree, using the content that intercepts as after the current word read, then performs step 512.
Assume that user query is " from three Jiangkous to the train in three rivers ", if the current word " three read Jiangkou ", when jump condition is the asterisk wildcard indicating a length of 4 words, directly confirm both couplings, But can be using " three Jiangkous are arrived " as the current word read, next step starts from " three rivers " template Trie tree mates.
If from current matching to the jump condition that starts of node be function, then call this function from reading The word taken starts to be identified in query, if recognition result meets default function requirements, then Determining that both mate, the word corresponding to recognition result that will meet the function requirements preset is read as current After the word taken, then perform step 512.
As a example by identifying that digital function is as jump condition, if user query is " 13100000000 Ownership place ", if the current word read is from the beginning of numeral " 1 ", then call this function from " 1 " Start to identify, identify the function requirements meeting numeral, return digit length as recognition result, identification After completing, 13100000000 as the current word read, next from " " start coupling.
Step 512: determine the next stage node that the jump condition matched is corresponding, it is judged that currently determine Whether node indicates template matching success, if it is, perform step 513;Otherwise, step 514 is performed.
Step 513: obtain the search need of the node instruction currently determined, terminate flow process.
Step 514: judge whether the current word read exists character late in user query, If it is, perform step 515;Otherwise, flow process is terminated.
Step 515: template pointer is pointed to the current word read next word in user query Symbol, goes to step 510.
Lift a concrete example, it is assumed that the user query received is that " three Jiangkous are to the fire in three rivers Car ".
Mating first with the dictionary Trie tree shown in Fig. 2, dictionary pointer points to user query First character, i.e. " three ", read " three ".From the beginning of root node 1, read user in order The character not mated in query, i.e. from the beginning of " three ", it is possible to matches from root node 1 beginning Jump condition, to node 2, is reading " river ", it is possible to match the jump condition started from node 2, To node 3.Owing to node 3 has Words ' Attributes, then obtain and record " three rivers " and the word of correspondence thereof Language attribute (i.e. place name).Continue to read " mouth ", it is possible to match the jump condition started from node 3 " mouth ", to node 4, owing to node 4 has Words ' Attributes, then obtain and record " three Jiangkous " and The Words ' Attributes (i.e. place name) of its correspondence.
When current dictionary pointer position, in the word of record, the shortest word is " three rivers ", therefore, and will Dictionary pointer points to " three rivers " character late in user query, i.e. " mouth ", repeats After said process mates with dictionary Trie tree, various points obtained after user query is carried out participle The result of the full cutting of word word is: three rivers (place name), mouth (noun), to (verb), three river ( Name), (auxiliary word), train (noun);Three Jiangkous (place name), to (verb), three river ( Name), (auxiliary word), train (noun) mouth (noun), to (verb), three rivers (place name), (auxiliary word), train (noun).
Various full cutting results are mated with template Trie tree, first against the full cutting of the first word Result: template pointer is pointed to the first character " three " of user query, determines word full cutting result In the word " three rivers " that starts with the character pointed by current template pointer, first to " three rivers " from root Node i.e. node 1 starts to mate jump condition, and " three rivers " matches the laggard ingress of jump condition 2, Then by template pointer point to " three rivers " character late " mouth ", determine in word full cutting result with " mouth " is word and the attribute thereof of initial character, starts to mate with the jump condition started with node 2, Join unsuccessfully.
Mate with template Trie tree for the second word full cutting result, to " three Jiangkous " from root Node i.e. node 1 starts to mate jump condition, matches rear steering node 2, is then referred to by template pointer Character late to " three Jiangkous " " arrives ", determines in word full cutting result with " arriving " and attribute thereof, Will " to " and attribute start to mate with the jump condition from node 2, go to node 4.By template Pointer points to the character late " three " of " arriving ", determines the word " three rivers " headed by this character, Mate the jump condition started from node 4, match laggard ingress 6, template matching success, determine Demand type is train inquiry.
Embodiment four,
Use dictionary Trie tree alternately to mate with template Trie tree in this embodiment and determine demand type Mode.Fig. 6 determines the method flow diagram of demand type for the another kind that the embodiment of the present invention four provides, as Shown in Fig. 6, the method may comprise steps of:
Step 601: after receiving user query, using the root node of template Trie tree as current matching The node arrived, dictionary pointer points to the first character of user query.
Step 602: using the root node of dictionary Trie tree as current matching position.
A step 603: read the character that current dictionary pointer points to, it is judged that whether the current character read is It is fitted on the jump condition started from current matching position, if it is not, then perform step 607;If it is, Perform step 604.
Step 604: determine the next stage node that the jump condition matched is corresponding, it is judged that currently determine Node whether deixis attribute, if it is, perform step 605;Otherwise, step 606 is performed.
Step 605: the Words ' Attributes obtaining and recording the node instruction currently determined and the word matched The word that symbol is constituted, performs step 606.
Step 606: judge whether the current character read exists character late in user query, If it is, reading character late, using the node that currently determines as current matching position, go to step 603;Otherwise, step 608 is gone to.
Step 607: exit the coupling of this dictionary Trie tree, is obtained this and is remembered by dictionary Trie tree Every content of record, the most every content includes word and Words ' Attributes thereof, reads the every of record respectively Content the every content being respectively directed to read perform the matching process with lower bolster tree, i.e. start to perform step Rapid 608.
Step 608: proceed to the coupling of template Trie tree, it is judged that the current word read and Words ' Attributes thereof Whether match in template Trie tree from current matching to the jump condition that starts of node, if it is, Perform step 609;If it does not, terminate the template Trie tree coupling for the current word read.
In this step, judging whether the up-to-date word got or Words ' Attributes match template In Trie tree from current matching to node start jump condition time, can there is following several situation:
If from current matching to the jump condition that starts of node be Words ' Attributes, if the most currently obtained The Words ' Attributes got is consistent with the Words ' Attributes in jump condition, it is determined that both couplings.
If from current matching to the jump condition that starts of node be concrete term, if the most currently obtained The word got is consistent with the concrete term in jump condition, it is determined that both couplings.
If from current matching to the jump condition that starts of node be asterisk wildcard, the most directly confirm both Coupling, in such a case, it is possible to start to intercept asterisk wildcard institute among query from the current word read Indicating length, using the content that intercepts as after the current word read, then performs step 609.
Also assume that user query is " from three Jiangkous to the train in three rivers ", if the current word read Language " three Jiangkous ", when jump condition is the asterisk wildcard indicating a length of 4 words, directly confirms both Coupling, but can be using " three Jiangkous are arrived " as the current word read, if under in template Trie tree If first nodes does not indicate template matching success, next step " three " after " three Jiangkous to " Start to go to the coupling of dictionary Trie tree.
If from current matching to the jump condition that starts of node be function, then call this function from reading The word taken starts to be identified in query, if recognition result meets default function requirements, then Determining that both mate, the word corresponding to recognition result that will meet the function requirements preset is read as current After the word taken, then perform step 609.
Step 609: determine the next stage node that the jump condition matched is corresponding, it is judged that currently determine Whether node indicates template matching success, if it is, perform step 610;Otherwise, will currently determine Node is as current matching position, under the current word read of dictionary pointer sensing is in user query One character, goes to step 602.
Step 610: determine the search need that the template matched is corresponding, terminates for the current word read The template Trie tree coupling of language.
Still as a example by the user query received is " three Jiangkous are to the train in three rivers ", initially enter mould The root node of plate Trie tree.Enter the root node of dictionary Trie tree, first with the dictionary shown in Fig. 2 Trie tree mates, and from the beginning of root node 1, reads the word not mated in user query in order Symbol, i.e. from the beginning of " three ", it is possible to matches the jump condition started from root node 1, to node 2, Reading " river ", it is possible to match the jump condition started from node 2, to node 3.Due to node 3 have Words ' Attributes, then obtain and record the Words ' Attributes (i.e. place name) of " three rivers " and correspondence thereof. Continue to read " mouth ", it is possible to match the jump condition " mouth " started from node 3, to node 4, Owing to node 4 has Words ' Attributes, then obtain and record the Words ' Attributes of " three Jiangkous " and correspondence thereof (i.e. Place name)." to " can not continue to mate dictionary Trie tree, exit the coupling flow process of dictionary Trie tree, Enter template Trie tree.
Owing to the coupling of this dictionary Trie tree has obtained two contents: " three rivers (place name) " and " three Jiangkou (place name) ", therefore, therefore it is respectively directed to " three rivers (place name) " and " three Jiangkous (place name) " Enter the coupling of template Trie tree, i.e. there is the matching process of the template Trie tree of Liang Ge branch.
The matching process of the template Trie tree of first branch, by " three rivers (place name) " and from template The jump condition that the root node of Trie tree starts starts coupling, enters node 2, owing to node 2 does not refer to Show template matching success, using node 2 as behind current matching position, dictionary pointer is pointed to current reading Word character late in user query, return to the root node of dictionary Trie tree.Read current The character that dictionary pointer points to, i.e. " mouth ", it is judged that whether the current character read matches from dictionary The jump condition that Trie root vertex starts, after matching " mouth ", exits this dictionary Trie tree Coupling, owing to this content recorded by dictionary Trie tree is " mouth (noun) ", proceeds to template After the coupling of Trie tree, it is impossible to match template, terminate the coupling of this branch.
The template Trie tree matching process of second branch, by " three Jiangkous (place name) " and from template The jump condition that the root node of Trie tree starts starts coupling, enters node 2, owing to node 2 does not refer to Show template matching success, using node 2 as behind current matching position, dictionary pointer is pointed to current reading Word character late in user query, return to the root node of dictionary Trie tree.Read current The character that dictionary pointer points to, i.e. " arrives ", it is judged that whether the current character read matches from dictionary The jump condition that Trie root vertex starts, after matching " arriving ", exits this dictionary Trie tree Coupling, owing to this content recorded by dictionary Trie tree is " arriving ", proceeds to template Trie tree, Due to current matching to node be node 2, " to " match from node 2 start jump condition, Enter node 4.The node arrived as current matching by node 4, points to current reading by dictionary pointer Word character late in user query i.e. " three ", returns the root node of dictionary Trie tree. " three rivers (place name) " can be matched by the coupling of dictionary Trie tree, proceed to template Trie tree, The jump condition started from node 4 can be matched, enter node 6.Owing to node 6 indicates template It is made into merit, determines that the demand type of this user query is train inquiry.
It is above the description that method provided by the present invention is carried out, below in conjunction with embodiment five to the present invention The device identifying search need provided is described in detail.
Embodiment five,
The structure drawing of device that Fig. 7 provides for the embodiment of the present invention five, in advance respectively with Trie tree in data base Form storage dictionary and demand recognition template, respectively obtain dictionary Trie tree and template Trie tree;Such as Fig. 7 Shown in, this device may include that request reception unit 710 and demand matching unit 720.
Request reception unit 710 receives user query.
Demand matching unit 720 combines dictionary Trie tree and user query is mated by template Trie tree, Determine the demand type corresponding to the template matched.
Wherein, root node instruction original state in dictionary Trie tree, leaf node and the instruction of part intermediate node The Words ' Attributes being fitted on, the jump condition between node and node is character.
Root node instruction original state in template Trie tree, leaf node instruction template matching success, node and joint Jump condition between point can include but not limited to: concrete term, Words ' Attributes, asterisk wildcard or function.
In order to realize the foundation of dictionary Trie tree, this device can also include: lexicographic tree sets up unit 730, For performing following operation:
Operation A1, setting up the root node of dictionary Trie tree in data base, this root node indicates original state.
Operate A2, from dictionary, obtain a word not yet added in dictionary Trie tree, read current First character in the word obtained, using the root node of dictionary Trie tree as current point of addition.
The character that operation A3, judgement currently read is the most Already in from turning that current point of addition starts Shifting condition, if it is, perform operation A4;Otherwise, operation A6 is performed.
Operation A4, in dictionary Trie tree, jump condition existing for the character that will currently read correspondence Next stage node as current point of addition.
Whether the word that operation A5, judgement currently read exists character late, if it is, read current The character late of the word obtained, goes to operate A3;Otherwise, operation A9 is performed.
Operation A6, the character currently read is added to a transfer bar starting from current point of addition Part.
Whether operation A7, the current word obtained of judgement exist character late, if it is, perform operation A8;Otherwise, the attribute of the word currently obtained is added to operation the added jump condition of A6 corresponding under In first nodes, perform operation A9.
Operation A8, using operation next stage node corresponding to the added jump condition of A6 as current point of addition, Read the character late in the current word obtained, go to operate A3.
Operation A9, the adding procedure of the current word obtained of end, not yet add to if existed in dictionary Word in dictionary Trie tree, then go to operate A2;Otherwise, dictionary Trie tree is obtained.
In order to realize the foundation of template tree, this device can also include: template tree sets up unit 740, is used for Operation below performing:
Operation B1, setting up the root node of template Trie tree in data base, this root node indicates original state.
Operation B2, one template not yet added in template Trie tree of acquisition, read the current mould obtained The content of first template groove in plate, using the root node of template Trie tree as current point of addition.
The content of the template groove that operation B3, judgement currently read the most current point of addition is opened The jump condition begun, if it is, perform operation B4;Otherwise perform operation B7.
Operation B4, in template Trie tree, the transfer bar at the content place of template groove that will currently read Next stage node corresponding to part is as current point of addition.
Whether operation B5, the current template groove read of judgement exist next template groove, if it is, under Du Quing The content of one template groove, goes to operate B3;Otherwise, operation B6 is performed.
Operate B6, in current point of addition, interpolation template matching successfully indicates, and performs operation B8.
Operation B7, be added to the content of the template groove currently read start from current point of addition one turn Shifting condition, using next stage node corresponding for this jump condition as current point of addition, goes to operate B5.
Operation B8, the adding procedure of the current template obtained of end, if there is not yet adding template Trie to The template of tree, then go to operate B2;Otherwise, template Trie tree is obtained.
In embodiments of the present invention can be after the template determining coupling by searching template Trie tree, logical The corresponding relation crossing template and the demand type pre-build identifies the demand type of user query.Preferably Ground, template tree is set up unit and can also add in current point of addition currently obtain when performing operation B6 The outlet of demand type information corresponding to the template taken, or add the current demand corresponding to template obtained Type information, this makes it possible to directly determine the demand type of correspondence by searching template Trie tree.
Wherein, can there are two kinds of structures in demand matching unit 720:
The first structure, demand matching unit 720 can first pass through coupling dictionary Trie tree to user query After carrying out the full cutting of word, then determined the template of coupling by matching template Trie tree.Now, demand Join unit 720 can specifically include: the first lexicographic tree matching module 721 and the first template tree matching module 722。
First lexicographic tree matching module 721 starts to enter with dictionary Trie tree from the first character of user query Row coupling, records and each take turns every content that dictionary Trie tree matches to obtain the various words of user query complete Cutting result, word full cutting result includes in the attribute of word and word, and each word full cutting result Word constitute user query.
First template tree matching module 722 one by one for each word full cutting result respectively in template Trie tree On mate, determine the demand type corresponding to the template matched.
Wherein, above-mentioned first lexicographic tree matching module 721 specifically performs to operate below:
Operation C11, receive user query after, dictionary pointer point to user query first character.
Operation C12, using the root node of dictionary Trie tree as current matching position.
Whether operation C13, the current character read of judgement match the transfer bar started from current matching position Part, if it is, perform operation C14;Otherwise, operation C17 is performed.
Operate C14, determine the next stage node that the jump condition matched is corresponding, it is judged that the joint currently determined Point whether deixis attribute, if it is, perform operation C15;Otherwise, operation C16 is performed.
Operation C15, the Words ' Attributes obtaining and recording the node instruction currently determined and the character structure matched The word become.
Operation C16;Judge whether the current character read exists character late in user query, as Fruit is, reads character late and goes to operate C13;Otherwise end operation.
Operation C17, the shortest word in the word of record when determining current dictionary pointer position, it is judged that this is Whether short word exists character late in user query, if it is, it is the shortest that dictionary pointer is pointed to this Word character late in user query, reads the character that dictionary pointer points to, and goes to operate C12.
It addition, the first template tree matching module 722 specifically performs to operate below:
Operation C21, by template pointer point to user query first character, by the root of template Trie tree The node that node arrives as current matching.
Operation C22, determine current word full cutting result starts with the character pointed by current template pointer Word.
Whether the attribute of operation C23, the current word read of judgement or this word matches in template Trie tree From current matching to the jump condition that starts of node, if it is, perform operation C24;Otherwise, terminate right The template matching of current word full cutting result.
Operate C24, determine the next stage node that the jump condition matched is corresponding, it is judged that the joint currently determined Whether point indicates template matching success, if it is, perform operation C25;Otherwise, operation C26 is performed.
The search need of the node instruction that operation C25, acquisition currently determine, end operation.
Whether operation C26, the current word read of judgement exist character late in user query, as Fruit is, performs operation C27;Otherwise, end operation.
Operation C27, the word that the sensing of template pointer is currently read character late in user query, Go to operate C22.
The second structure: demand matching unit 720 can alternately mate dictionary Trie tree and template Trie tree, When the most often performing the coupling that takes turns dictionary Trie tree, the word just epicycle being syncopated as enters in template Trie tree The coupling of row next node, after matching the next node of template Trie tree, returns dictionary Trie tree Carry out the coupling of next round.Now, as shown in Figure 8, demand matching unit 720 can specifically include: word Allusion quotation pointer arranges module the 821, second lexicographic tree matching module 822 and the second template tree matching module 823.
Dictionary pointer arranges module 821 and dictionary pointer points to the first character of user query.
Second lexicographic tree matching module 822 starts to carry out with dictionary Trie tree from the character that dictionary pointer points to Join.
Second template tree matching module 823 is taken turns after dictionary Trie tree coupling terminates one, by the second lexicographic tree Join every content that module 822 epicycle matches in dictionary Trie tree to terminate from last round of template Trie tree coupling Time the position that matches proceed by coupling, every content includes the attribute of word and word, epicycle template After Trie tree coupling terminates, trigger dictionary pointer and module 821 is set by dictionary pointer sensing epicycle template Trie Tree coupling used word character late in user query, and trigger the second lexicographic tree matching module 822 couplings starting next round dictionary Trie trees, until matching template or template Trie tree, it fails to match; Determine the demand type corresponding to the template matched.
Wherein, the second lexicographic tree matching module 822 can specifically perform following operation:
Operation D21, using the root node of dictionary Trie tree as current matching position.
Operate D22, read the character that current dictionary pointer points to, it is judged that whether the current character read mates To the jump condition started from current matching position, if it does not, epicycle dictionary Trie tree coupling terminates, record Every content that epicycle dictionary Trie tree matches;If it is, perform operation D23.
Operate D23, determine the next stage node that the jump condition matched is corresponding, it is judged that the joint currently determined Point whether deixis attribute, if it is, perform operation D24;Otherwise, operation D25 is performed.
Operation D24, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched The word constituted, performs operation D25.
Whether operation D25, the current character read of judgement exist character late in user query, as Fruit is, reads character late, using the node that currently determines as current matching position, goes to operate D22; Otherwise, epicycle dictionary Trie tree coupling terminates.
It addition, the second template tree matching module 823 reads the second lexicographic tree matching module 822 epicycle word respectively Every content that allusion quotation Tire tree matches, and it is respectively directed to the every content following matching operation of execution read:
Whether the attribute of operation D31, the current word read of judgement or this word matches in template Trie tree From current matching to the jump condition that starts of node, current matching to the initial position of node be template The root node of Trie tree;If it is, perform operation D32;Otherwise, terminate for the current content read Template Trie tree mates.
Operate D32, determine the next stage node that the jump condition matched is corresponding, it is judged that the joint currently determined Whether point indicates template matching success, if it is, perform operation D33;Otherwise, the node that will currently determine As current matching position, under in the current content read of dictionary pointer sensing, word is in user query One character, goes to operate D2.
Operate D33, determine the search need that the template matched is corresponding, terminate for the current content read Template Trie tree coupling.
Wherein, the first template tree matching module 722 in the first structure and the second mould in the second structure Whether plate tree matching module 823 matches template Trie at the attribute judging the current word read or this word In tree from current matching to node start jump condition time, including at least one in situations below:
If from current matching to the jump condition that starts of node be Words ' Attributes, read if then current The attribute of word is consistent with the Words ' Attributes in jump condition, it is determined that both couplings.
If from current matching to the jump condition that starts of node be concrete term, read if then current Word is consistent with the concrete term in jump condition, it is determined that both couplings.
If from current matching to the jump condition that starts of node be asterisk wildcard, then confirm both couplings, from The current word read starts to intercept length indicated by asterisk wildcard in query, using the content intercepted as working as The word of front reading.
If from current matching to the jump condition that starts of node be function, then call function from the word read Language starts to be identified in user query, if recognition result meets default function requirements, then confirms Both couplings, the word corresponding to recognition result that will meet the function requirements preset is as the current word read Language.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all Within the spirit and principles in the present invention, any modification, equivalent substitution and improvement etc. done, all should comprise Within the scope of protection of the invention.

Claims (24)

1. the method identifying search need, it is characterised in that respectively with trie Trie tree in data base Form storage dictionary and demand recognition template, respectively obtain dictionary Trie tree and template Trie tree;Described side Method includes:
After receiving user search request query, in conjunction with described dictionary Trie tree and template Trie tree to described User query mates, and determines the demand type corresponding to the template matched.
Method the most according to claim 1, it is characterised in that in described dictionary Trie tree, root node refers to Show that original state, leaf node and part intermediate node indicate the Words ' Attributes matched, between node and node Jump condition be character;
Root node instruction original state in described template Trie tree, leaf node instruction template matching success, node With the jump condition between node includes: concrete term, Words ' Attributes, asterisk wildcard or function.
Method the most according to claim 1 and 2, it is characterised in that with Trie tree in data base Form storage dictionary obtains dictionary Trie tree and specifically includes:
A1, in data base, set up the root node of dictionary Trie tree, this root node instruction original state;
A2, from described dictionary obtain a word not yet added in dictionary Trie tree, reading currently obtain First character in the word taken, using the root node of dictionary Trie tree as current point of addition;
The transfer bar that the character that A3, judgement currently read the most Already in starts from current point of addition Part, if it is, perform step A4;Otherwise, step A6 is performed;
A4, in dictionary Trie tree, corresponding next of the jump condition existing for character that will currently read Level node is as current point of addition;
Whether the word that A5, judgement currently read exists character late, if it is, read current acquisition The character late of word, go to step A3;Otherwise, step A9 is performed;
A6, the character currently read is added to a jump condition starting from current point of addition;
Whether A7, the current word obtained of judgement exist character late, if it is, perform step A8; Otherwise, the attribute of the word currently obtained is added to the next stage joint that the added jump condition of step A6 is corresponding In point, perform step A9;
A8, using next stage node corresponding for added for step A6 jump condition as current point of addition, read Character late in the current word obtained, goes to step A3;
A9, the adding procedure of the current word obtained of end, not yet add word to if existed in described dictionary Word in allusion quotation Trie tree, then go to step A2;Otherwise, dictionary Trie tree is obtained.
Method the most according to claim 1 and 2, it is characterised in that with Trie tree in data base Form storage template obtains template Trie tree and specifically includes:
B1, in data base, set up the root node of template Trie tree, this root node instruction original state;
B2, obtain a template not yet added in template Trie tree, read in the template of current acquisition the The content of one template groove, using the root node of template Trie tree as current point of addition;
The content of the template groove that B3, judgement currently read the most current point of addition starts Jump condition, if it is, perform step B4;Otherwise perform step B7;
B4, in template Trie tree, by corresponding for the jump condition at the content place of template groove currently read Next stage node as current point of addition;
Whether B5, the current template groove read of judgement exist next template groove, if it is, read next The content of template groove, goes to step B3;Otherwise, step B6 is performed;
B6, in current point of addition add template matching successfully indicate, perform step B8;
B7, the content of the template groove currently read is added to a transfer bar starting from current point of addition Part, using next stage node corresponding for this jump condition as current point of addition, goes to step B5;
B8, the adding procedure of the current template obtained of end, if there is not yet adding template Trie tree to Template, then go to step B2;Otherwise, template Trie tree is obtained.
Method the most according to claim 4, it is characterised in that also include in described step B6: In current point of addition, add the outlet of demand type information corresponding to the current template obtained, or add The current demand type information corresponding to template obtained.
Method the most according to claim 1, it is characterised in that combine described dictionary Trie tree and template Described user query is mated by Trie tree, determines that the demand type corresponding to the template matched specifically is wrapped Include:
C1, first character from described user query start to mate with described dictionary Trie tree, note Record and each take turns every content that dictionary Trie tree matches and obtain the various words full cutting knot of described user query Really, institute's predicate full cutting result includes in the attribute of word and word, and each word full cutting result Word constitutes described user query;
C2, mate, really on described template Trie tree respectively for each word full cutting result one by one Surely the demand type corresponding to the template matched.
Method the most according to claim 6, it is characterised in that described step C1 specifically includes:
C11, receive described user query after, dictionary pointer point to described user query first character Symbol;
C12, using the root node of dictionary Trie tree as current matching position;
Whether C13, the current character read of judgement match the jump condition started from current matching position, as Fruit is, performs step C14;Otherwise, step C17 is performed;
C14, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Deixis attribute, if it is, perform step C15;Otherwise, step C16 is performed;
The word that C15, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Language;
C16;Judge whether the current character read exists character late in described user query, if It is to read character late and go to described step C13;Otherwise end step C1;
C17, the shortest word in the word of record when determining current dictionary pointer position, it is judged that this shortest word In user query, whether there is character late, if it is, dictionary pointer is pointed to this shortest word with Character late in the query of family, reads the character that dictionary pointer points to, goes to step C12.
Method the most according to claim 6, it is characterised in that for each in described step C2 Kind of word full cutting result performs following steps respectively:
C21, template pointer is pointed to the first character of described user query, by the root of template Trie tree joint The node that point arrives as current matching;
C22, determine the word started in current word full cutting result with the character pointed by current template pointer;
Whether the attribute of C23, the current word read of judgement or this word matches in template Trie tree from currently The jump condition that the node matched starts, if it is, perform step C24;Otherwise, end is complete to current word The template matching of cutting result;
C24, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Instruction template matching success, if it is, perform step C25;Otherwise, step C26 is performed;
The search need of the node instruction that C25, acquisition currently determine, end step C2;
Whether C26, the current word read of judgement exist character late in described user query, if It is to perform step C27;Otherwise, end step C2;
C27, the word that the sensing of template pointer is currently read character late in described user query, Go to step C22.
Method the most according to claim 1, it is characterised in that combine described dictionary Trie tree and template Described user query is mated by Trie tree, determines that the demand type corresponding to the template matched specifically is wrapped Include:
D1, by dictionary pointer point to user query first character;
D2, from dictionary pointer point to character start to mate with described dictionary Trie tree;
D3, one take turns after dictionary Trie tree coupling terminates, every content that epicycle dictionary Trie tree is matched from The position matched at the end of last round of template Trie tree coupling proceeds by coupling, and described every content includes Word and the attribute of word, after epicycle template Trie tree coupling terminates, point to epicycle template by dictionary pointer Trie tree coupling used word character late in user query, goes to step D2 and starts next round The coupling of dictionary Trie tree, until matching template or template Trie tree, it fails to match;Determine and match Demand type corresponding to template.
Method the most according to claim 9, it is characterised in that described step D2 specifically includes:
D21, using the root node of dictionary Trie tree as current matching position;
D22, read the character that current dictionary pointer points to, it is judged that whether the current character read matches from working as The jump condition that front matched position starts, if it does not, epicycle dictionary Trie tree coupling terminates, records epicycle word Every content that allusion quotation Trie tree matches;If it is, perform step D23;
D23, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Deixis attribute, if it is, perform step D24;Otherwise, step D25 is performed;
D24, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Word, performs step D25;
Whether D25, the current character read of judgement exist character late in described user query, if It is to read character late, using the node that currently determines as current matching position, goes to described step D22; Otherwise, described step D3 is gone to.
11. methods according to claim 9, it is characterised in that in step D3, read this respectively Take turns every content that dictionary Trie tree matches, and the every content being respectively directed to read performs following coupling Journey:
Whether the attribute of D31, the current word read of judgement or this word matches in template Trie tree from currently The jump condition that the node matched starts, described current matching to the initial position of node be described template The root node of Trie tree;If it is, perform step D32;Otherwise, the mould for the current content read is terminated Plate Trie tree mates;
D32, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Instruction template matching success, if it is, perform step D33;Otherwise, using the node currently determined as working as Front matched position, dictionary pointer points to the word next word in user query in the current content read Symbol, goes to described step D2;
D33, determine the search need that the template matched is corresponding, terminate the template for the current content read Trie tree mates.
Method described in 12. according to Claim 8 or 11, it is characterised in that judge the current word read Or the attribute of this word whether match in template Trie tree from current matching to the jump condition that starts of node Including:
If from current matching to the jump condition that starts of node be Words ' Attributes, read if then current The attribute of word is consistent with the Words ' Attributes in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be concrete term, read if then current Word is consistent with the concrete term in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be asterisk wildcard, then confirm both couplings, from The current word read starts to intercept length indicated by asterisk wildcard in query, using the content of intercepting as currently The word read;Or,
If from current matching to the jump condition that starts of node be function, then call described function from reading Word start to be identified in described user query, if recognition result meets default function requirements, Then confirming both couplings, the word corresponding to recognition result that will meet the function requirements preset is read as current The word taken.
13. 1 kinds of devices identifying search need, it is characterised in that respectively with trie Trie in data base The form storage dictionary of tree and demand recognition template, respectively obtain dictionary Trie tree and template Trie tree;This dress Put and include:
Request reception unit, is used for receiving user search request query;
Demand matching unit, is used for combining described dictionary Trie tree and template Trie tree to described user query Mate, determine the demand type corresponding to the template matched.
14. devices according to claim 13, it is characterised in that root node in described dictionary Trie tree Instruction original state, leaf node and part intermediate node indicate the Words ' Attributes matched, node and node it Between jump condition be character;
Root node instruction original state in described template Trie tree, leaf node instruction template matching success, node With the jump condition between node includes: concrete term, Words ' Attributes, asterisk wildcard or function.
15. according to the device described in claim 13 or 14, it is characterised in that this device also includes: word Allusion quotation tree sets up unit, is used for performing following operation:
A1, in data base, set up the root node of dictionary Trie tree, this root node instruction original state;
A2, from described dictionary obtain a word not yet added in dictionary Trie tree, reading currently obtain First character in the word taken, using the root node of dictionary Trie tree as current point of addition;
The transfer bar that the character that A3, judgement currently read the most Already in starts from current point of addition Part, if it is, perform operation A4;Otherwise, operation A6 is performed;
A4, in dictionary Trie tree, corresponding next of the jump condition existing for character that will currently read Level node is as current point of addition;
Whether the word that A5, judgement currently read exists character late, if it is, read current acquisition The character late of word, go to operate A3;Otherwise, operation A9 is performed;
A6, the character currently read is added to a jump condition starting from current point of addition;
Whether A7, the current word obtained of judgement exist character late, if it is, perform operation A8; Otherwise, the attribute of the word currently obtained is added to the next stage joint that operation the added jump condition of A6 is corresponding In point, perform operation A9;
A8, will operation next stage node corresponding to the added jump condition of A6 as current point of addition, reading Character late in the current word obtained, goes to operate A3;
A9, the adding procedure of the current word obtained of end, not yet add word to if existed in described dictionary Word in allusion quotation Trie tree, then go to operate A2;Otherwise, dictionary Trie tree is obtained.
16. according to the device described in claim 13 or 14, it is characterised in that this device also includes: mould Plate tree sets up unit, is used for performing following operation:
B1, in data base, set up the root node of template Trie tree, this root node instruction original state;
B2, obtain a template not yet added in template Trie tree, read in the template of current acquisition the The content of one template groove, using the root node of template Trie tree as current point of addition;
The content of the template groove that B3, judgement currently read the most current point of addition starts Jump condition, if it is, perform operation B4;Otherwise perform operation B7;
B4, in template Trie tree, by corresponding for the jump condition at the content place of template groove currently read Next stage node as current point of addition;
Whether B5, the current template groove read of judgement exist next template groove, if it is, read next The content of template groove, goes to operate B3;Otherwise, operation B6 is performed;
B6, in current point of addition add template matching successfully indicate, perform operation B8;
B7, the content of the template groove currently read is added to a transfer bar starting from current point of addition Part, using next stage node corresponding for this jump condition as current point of addition, goes to operate B5;
B8, the adding procedure of the current template obtained of end, if there is not yet adding template Trie tree to Template, then go to operate B2;Otherwise, template Trie tree is obtained.
17. devices according to claim 16, it is characterised in that described template tree is set up unit and holding During the described operation B6 of row, it is additionally operable in current point of addition add demand class corresponding to the current template obtained The outlet of type information, or add the current demand type information corresponding to template obtained.
18. devices according to claim 13, it is characterised in that described demand matching unit specifically wraps Include: the first lexicographic tree matching module and the first template tree matching module;
Described first lexicographic tree matching module, for starting with described from the first character of described user query Trie tree mates dictionary, records and each take turns every content that dictionary Trie tree matches and obtain described user The various words full cutting result of query, institute's predicate full cutting result includes the attribute of word and word, and often Word in a kind of word full cutting result constitutes described user query;
Described first template tree matching module, for one by one for each word full cutting result respectively described Mate on template Trie tree, determine the demand type corresponding to the template matched.
19. devices according to claim 18, it is characterised in that described first lexicographic tree matching module The following operation of concrete execution:
C11, receive described user query after, dictionary pointer point to described user query first character Symbol;
C12, using the root node of dictionary Trie tree as current matching position;
Whether C13, the current character read of judgement match the jump condition started from current matching position, as Fruit is, performs operation C14;Otherwise, operation C17 is performed;
C14, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Deixis attribute, if it is, perform operation C15;Otherwise, operation C16 is performed;
The word that C15, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Language;
C16;Judge whether the current character read exists character late in described user query, if It is to read character late and go to described operation C13;Otherwise end operation;
C17, the shortest word in the word of record when determining current dictionary pointer position, it is judged that this shortest word In user query, whether there is character late, if it is, dictionary pointer is pointed to this shortest word with Character late in the query of family, reads the character that dictionary pointer points to, and goes to operate C12.
20. devices according to claim 18, it is characterised in that described first template tree matching module The following operation of concrete execution:
C21, template pointer is pointed to the first character of described user query, by the root of template Trie tree joint The node that point arrives as current matching;
C22, determine the word started in current word full cutting result with the character pointed by current template pointer;
Whether the attribute of C23, the current word read of judgement or this word matches in template Trie tree from currently The jump condition that the node matched starts, if it is, perform operation C24;Otherwise, end is complete to current word The template matching of cutting result;
C24, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Instruction template matching success, if it is, perform operation C25;Otherwise, operation C26 is performed;
The search need of the node instruction that C25, acquisition currently determine, end operation;
Whether C26, the current word read of judgement exist character late in described user query, if It is to perform operation C27;Otherwise, end operation;
C27, the word that the sensing of template pointer is currently read character late in described user query, Go to operate C22.
21. devices according to claim 13, it is characterised in that described demand matching unit specifically wraps Include: dictionary pointer arranges module, the second lexicographic tree matching module and the second template tree matching module;
Described dictionary pointer arranges module, for dictionary pointer points to the first character of user query;
Described second lexicographic tree matching module, starts and described dictionary Trie for the character pointed to from dictionary pointer Tree mates;
Described second template tree matching module, for taking turns after dictionary Trie tree coupling terminates one, by described the Every content that two lexicographic tree matching module epicycles match dictionary Trie tree is from last round of template Trie tree The position matched at the end of joining proceeds by coupling, and described every content includes the attribute of word and word, After epicycle template Trie tree coupling terminates, trigger described dictionary pointer and module is set by dictionary pointer sensing epicycle Template Trie tree coupling used word character late in user query, and trigger described second dictionary Tree matching module starts the coupling of next round dictionary Trie tree, until matching template or template Trie tree Join unsuccessfully;Determine the demand type corresponding to the template matched.
22. devices according to claim 21, it is characterised in that described second lexicographic tree matching module The following operation of concrete execution:
D21, using the root node of dictionary Trie tree as current matching position;
D22, read the character that current dictionary pointer points to, it is judged that whether the current character read matches from working as The jump condition that front matched position starts, if it does not, epicycle dictionary Trie tree coupling terminates, records epicycle word Every content that allusion quotation Trie tree matches;If it is, perform operation D23;
D23, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Deixis attribute, if it is, perform operation D24;Otherwise, operation D25 is performed;
D24, the Words ' Attributes obtaining and recording the node instruction currently determined and the character matched are constituted Word, performs operation D25;
Whether D25, the current character read of judgement exist character late in described user query, if It is to read character late, using the node that currently determines as current matching position, goes to described operation D22; Otherwise, epicycle dictionary Trie tree coupling terminates.
23. devices according to claim 21, it is characterised in that described second template tree matching module Read every content that described second lexicographic tree matching module epicycle dictionary Tire tree matches, and difference respectively Every content following matching operation of execution for reading:
Whether the attribute of D31, the current word read of judgement or this word matches in template Trie tree from currently The jump condition that the node matched starts, described current matching to the initial position of node be described template The root node of Trie tree;If it is, perform operation D32;Otherwise, the mould for the current content read is terminated Plate Trie tree mates;
D32, determine the next stage node that the jump condition matched is corresponding, it is judged that the node currently determined whether Instruction template matching success, if it is, perform operation D33;Otherwise, using the node currently determined as working as Front matched position, dictionary pointer points to the word next word in user query in the current content read Symbol, goes to described operation D2;
D33, determine the search need that the template matched is corresponding, terminate the template for the current content read Trie tree mates.
24. according to the device described in claim 20 or 23, it is characterised in that judge the current word read The attribute of language or this word whether match in template Trie tree from current matching to the transfer bar that starts of node Part includes:
If from current matching to the jump condition that starts of node be Words ' Attributes, read if then current The attribute of word is consistent with the Words ' Attributes in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be concrete term, read if then current Word is consistent with the concrete term in jump condition, it is determined that both couplings;Or,
If from current matching to the jump condition that starts of node be asterisk wildcard, then confirm both couplings, from The current word read starts to intercept length indicated by asterisk wildcard in query, using the content of intercepting as currently The word read;Or,
If from current matching to the jump condition that starts of node be function, then call described function from reading Word start to be identified in described user query, if recognition result meets default function requirements, Then confirming both couplings, the word corresponding to recognition result that will meet the function requirements preset is read as current The word taken.
CN201110279434.6A 2011-09-20 A kind of method and apparatus identifying search need Active CN103020052B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110279434.6A CN103020052B (en) 2011-09-20 A kind of method and apparatus identifying search need

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110279434.6A CN103020052B (en) 2011-09-20 A kind of method and apparatus identifying search need

Publications (2)

Publication Number Publication Date
CN103020052A CN103020052A (en) 2013-04-03
CN103020052B true CN103020052B (en) 2016-11-30

Family

ID=

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1153356A (en) * 1995-11-10 1997-07-02 富士通株式会社 Apparatus and method for retrieving dictionary based on lattice as key
CN1294454A (en) * 1999-10-21 2001-05-09 索尼国际(欧洲)股份有限公司 SOVA Turbo decoder having normalization complexity lowered
CN101013420A (en) * 2006-12-31 2007-08-08 中国科学院计算技术研究所 Method for identifying coding form of Chinese text

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1153356A (en) * 1995-11-10 1997-07-02 富士通株式会社 Apparatus and method for retrieving dictionary based on lattice as key
CN1294454A (en) * 1999-10-21 2001-05-09 索尼国际(欧洲)股份有限公司 SOVA Turbo decoder having normalization complexity lowered
CN101013420A (en) * 2006-12-31 2007-08-08 中国科学院计算技术研究所 Method for identifying coding form of Chinese text

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
"大规模中文文本检索中的高性能索引研究";米嘉;《中国优秀博硕士学位论文全文数据库 (硕士) 信息科技辑》;20070215(第2期);第五章34-35页 *

Similar Documents

Publication Publication Date Title
CN108052547B (en) Natural language question-answering method and system based on question sentence and knowledge graph structural analysis
Antoniol et al. Using metrics to identify design patterns in object-oriented software
US6785674B2 (en) System and method for structuring data in a computer system
US7694214B2 (en) Multimodal note taking, annotation, and gaming
US8335779B2 (en) Method and apparatus for gathering, categorizing and parameterizing data
EP1758035A1 (en) Item name normalization
CN104750795A (en) Intelligent semantic searching system and method
JP2002528793A (en) Access to hierarchical data store through SQL input
CN110162522A (en) A kind of distributed data search system and method
CN106021136A (en) Serial port mapping method and device based on Linux or Unix kernel operating system
CN112380385A (en) Video time positioning method and device based on multi-modal relational graph
CN110162297A (en) A kind of source code fragment natural language description automatic generation method and system
CN106095998B (en) Topic method and device is precisely searched applied to intelligent terminal
CN110019913A (en) Picture match method, user equipment, storage medium and device
CN105335466A (en) Audio data retrieval method and apparatus
JP2007310646A (en) Search information management device, search information management program and search information management method
CN103020052B (en) A kind of method and apparatus identifying search need
WO2024087832A1 (en) Search result display method and apparatus, and search result determination method and apparatus
CN106326408A (en) Method, system and terminal for generating record through retrieval and analysis
JPH1185492A (en) Device for supporting preparation of object oriented data model
CN110209744A (en) Relevant database and its operating method and device based on alliance's chain
CN109828764A (en) Generation, method for burn-recording and its equipment of recordable paper
CN103020224B (en) A kind of intelligent search method and device
CN103020052A (en) Method and device for recognizing search demand
CN111177312A (en) Open source code searching method with grammar and semantics fused

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant