CN101706792A - Chinese query clause oriented three-level inquired target analysis method - Google Patents

Chinese query clause oriented three-level inquired target analysis method Download PDF

Info

Publication number
CN101706792A
CN101706792A CN200910172770A CN200910172770A CN101706792A CN 101706792 A CN101706792 A CN 101706792A CN 200910172770 A CN200910172770 A CN 200910172770A CN 200910172770 A CN200910172770 A CN 200910172770A CN 101706792 A CN101706792 A CN 101706792A
Authority
CN
China
Prior art keywords
target
reasoning
query aim
query
direct
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN200910172770A
Other languages
Chinese (zh)
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.)
Henan University
Original Assignee
Henan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Henan University filed Critical Henan University
Priority to CN200910172770A priority Critical patent/CN101706792A/en
Publication of CN101706792A publication Critical patent/CN101706792A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a Chinese query clause orientated three-level inquired target analysis method, which comprises the following steps: according to the limited conditions of a system language, establishing a knowledge base of compound concepts and deduction rules; identifying inquired targets in the knowledge base, and classifying the inquired targets into a direct inquired target, a logical deduction target and a comparative judgment target; if the comparative judgment target is identified, extracting the corresponding logical deduction target or the direct inquired target, otherwise, directly entering the next step; if the logical deduction target is identified, converting the logical deduction target into the corresponding direct inquired target, otherwise, directly entering the next step; if the direct inquired target is identified, directly performing query conversion and converting the direct inquired target into a data extracting target for retrieving professional basic knowledge base acquiring answers by the system; and generating values answering user targets through concept synthesis and deduction according to the query and analysis results and the type of an initial inquired target in the query clause, thereby forming answer clauses fed back to users. The method can understand user query clauses of different structural forms, and express the user query clauses more freely in an expression mode.

Description

A kind of three grades of query aim analytical approachs towards the Chinese Query sentence
Technical field
The present invention relates to the query aim analytical approach, particularly a kind of three grades of query aim analytical approachs towards the Chinese Query sentence.
Background technology
In the system of civilian natural language querying in use, its basic processing flow process is: the Chinese Query sentence that is adopted natural language to provide to comprise querying condition and query aim by the user, system carries out the analysis and the understanding of sentence structure, morphology, semanteme to this inquiry sentence, therefrom identify relevant querying condition and query aim, and constitute retrieve statement to knowledge base with this, obtain correct option, generate Chinese answer sentence and feed back to the user, to finish the process of one query.In whole flow process, for the analysis of inquiry sentence, the identification for query aim is the first step of the correct work of total system in other words.If for the query aim profiling error,, also will directly have influence on the work efficiency and the correctness of system with directly causing knowledge retrieval and answering the mistake that sentence generates.
In general, Chang Yong query aim analytical approach has methods such as template matches and similarity calculating.Template matching method is that the question sentence a large amount of commonly used that is obtained by statistics is represented in formal mode when using, and as template, requires user's institutional framework in strict accordance with template when carrying out information inquiry to explain query intention.The closed test accuracy of this method is very high, but the use restriction for the user is more, be difficult to reach the desirable accessible interchange of natural language querying, in case the expression form of user inquiring sentence has exceeded the scope of system template, it is powerless that system then can seem.Therefore, in the inquiry work in modern times, this method is discerned query aim as a kind of supplementary means mostly.Similarity calculating method, mainly be by calculating and statistics to contents such as word co-occurrence probabilities, feature utility frequency of word in the inquiry sentence after the lexical analysis, obtain inquiring about in the sentence each several part content as the probable value of query aim---be similarity, determine query aim with the size of this similarity.This method is less relatively for user's import-restriction, but because the property versatile and flexible of Chinese, the probability that the feasible similarity that calculates according to statistics is hit query aim reduces, and occurs the situation of giving an irrelevant answer during question answering in natural language sometimes.
Because technical limitation, the system of present Chinese natural language querying mostly all with restricted language as process object, adopt knowledge base that statistics obtains as the inquiry foundation, perhaps add probability statistics on this basis.But because Chinese is no matter on version, still on the form of presentation, perhaps word is all very flexible and changeable on selecting, so adopts above-mentioned processing mode can't satisfy the actual queries demand.For example, when carrying out information inquiry, the version of inquiry sentence can be to refer in particular to question sentence, yes-no question, A-not-A question, alternative question, even can also be imperative sentence, the Query Information amount that different question sentence forms is comprised and also all tangible difference can be arranged for the expression of query aim.For another example, in some inquiry, its end value should be that certain of a plurality of thresholdings concerns result of calculation in the knowledge base, and singly is not some thresholdings; Perhaps, in the statement of inquiry sentence, a lot of dissimilar word and notions can be arranged corresponding to the inquiry in the same territory in the knowledge base.These all can cause Chinese natural language query system to be in awkward condition when reply complex sentence inquiry and knowledge base are irredundant.And the key point of above these problems just is for any one inquiry sentence, whether system can correctly identify its query aim apace, the follow-up work of only having found query aim to inquire about.
In sum, improve the discrimination to query aim in the Chinese Query sentence, be far from being enough from scale and the increase probability calculation that enlarges knowledge base, rule base merely.This inquiry restriction of Gonna breakthrough must have a kind of new method to come the identification problem of query aim is improved.
Summary of the invention
The object of the invention is to provide a kind of three grades of query aim analytical approachs towards the Chinese Query sentence, this method is based on the query aim analytical approach of the Chinese Query sentence of restricted language, can understand the user inquiring sentence of different structure form, the user inquiring sentence is more free on form of presentation.
To achieve these goals, the present invention adopts following technical scheme: a kind of three grades of query aim analytical approachs towards the Chinese Query sentence is characterized in that: may further comprise the steps:
(1) according to the limited situation of system language,, sets up the knowledge base of compound notion and rule of inference by extensive language material analysis and statistics;
(2) on sentence structure and basis of lexical analysis, inquiry sentence is carried out semantic understanding, identify query aim wherein, and this query aim is classified as direct query aim, reasoning from logic target, relatively judges target;
(3) relatively judge target as if identifying,, extract the reasoning from logic target or the direct query aim of correspondence then according to the difference of inquiring about a sentence type, comparison element relation, comparison element value source and comparative result type content; If incomparably judge and target then directly enter step (4);
(4) if identify the reasoning from logic target, then system need decompose or the rule deduction through notion, is converted into corresponding direct query aim; If no reasoning from logic target then directly enters step (5);
(5) if identify direct query aim, system can directly carry out query conversion, is converted into the data extract target, is used to retrieve professional ABC storehouse and obtains answer;
(6) according to inquiry and analysis result, and the type of inquiring about initial query target in the sentence, synthetic and reasoning produces the value of answering ownership goal by notion, and forms the sentence of answering that feeds back to the user with this.
In the described step (1), the knowledge base of compound notion and rule of inference refers to the compound conceptual knowledge base and the logical concept inferenctial knowledge storehouse of the affiliated application of system; Described compound notion just is meant and can be decomposed into a plurality of standard concepts, or the notion of the arithmetical operation formula of standard concept and constant; Relational expression between compound notion and the standard concept is created as compound conceptual knowledge base, and the notion that only maintains the standard in the ABC storehouse is decomposed into standard concept with compound notion, thereby understands query intention when the analysis and consult sentence; Described logical concept just is meant the notion that can derive from a plurality of standard concepts; Logical concept inferenctial knowledge storehouse then is the rule of inference that is used to preserve between logical concept and the standard concept, and form is the logic production.
In the described step (2), inquiry sentence comprises direct query aim, reasoning from logic target, relatively judges in the target one or more levels, to multi-form and inquiry sentence complexity, adopt different levels and level else to deduce conversion process, this notion conversion process can step by step or be bypassed the immediate leadership and be carried out.
In the described step (3), relatively judge the inquiry sentence of target corresponding to various versions, analyze the reasoning from logic target or the direct query aim that need compare and judge the target from relatively judging, carry out the knowledge base inquiry by reasoning from logic target or direct query aim then, and then oppositely deduce out the result, synthesize the value of answering ownership goal again.
In the described step (4), the reasoning from logic target is divided into direct loic reasoning target and indirect logic reasoning target; Direct loic reasoning target is meant the knowledge objective that occurs in the production conclusion in logical concept inferenctial knowledge storehouse; Indirect logic reasoning target is meant that decomposing equivalence transformation through notion finally is transformed to the knowledge objective that occurs in the production conclusion in logical concept inferenctial knowledge storehouse; It is the production backward inference of direct loic reasoning target through logical concept inferenctial knowledge storehouse that the reasoning from logic target is dissolved the conversion process of deducing conversion, can be exchanged into direct query aim; Reasoning from logic target evaluation is deduced the knowledge result of conversion process for inquiring for direct query aim of conversion, and the production reasoning through logical concept inferenctial knowledge storehouse is converted to direct loic reasoning order target value again, is used for generating and answers sentence.
In the described step (5), directly query aim is a kind of query aim corresponding to standard concept; Direct query aim according in the inquiry sentence can directly carry out search operaqtion to knowledge base and obtain data, or these data obtain the result through the synthetic equivalence transformation of simple notion; Directly query aim divides simple directly query aim and compound direct query aim, and simple directly query aim is meant the target that only comprises domain name and aggregate function; Compound direct query aim is meant by simple directly query aim through the target of the synthetic equivalence transformation of notion; Can be divided into dominance target, query target again and assemble target three classes for the simple directly query aim that aggregate function can occur; The dominance target is meant the target that directly provides with domain name; The query target is meant the target that provides with interrogative; Assemble target and be meant the target that provides with aggregate function.
In the described step (6), answer ownership goal and be meant that the natural language querying sentence requires the content of system answer, described content is relatively to judge target, reasoning from logic target or direct query aim.
Answer ownership goal and query aim and directly has following several corresponding relations: 1. when answering ownership goal=direct query aim, the content of direct query aim is exactly the value of answer ownership goal; 2. when answering ownership goal=reasoning from logic target, the content of reasoning from logic target is exactly to answer the value of ownership goal; 3. when answering ownership goal=relatively judge target, and to have only a comparison person and the person of being compared, a comparison person be direct query aim or reasoning from logic target, the person of being compared for constant or directly when query aim or reasoning from logic target, and the value of then answering ownership goal is the logical value of the two comparative result; 4. when answering ownership goal=relatively judge target, and to have only a comparison person and a plurality of person of being compared, comparison person be direct query aim or reasoning from logic target, when the person of being compared is constant, the value of then answering ownership goal is that comparative result is the genuine corresponding person of being compared; 5. when answering ownership goal=relatively judge target, and to have only a comparison person and a plurality of person of being compared, comparison person be direct query aim or reasoning from logic target, when the person of being compared is direct query aim or reasoning from logic target, the value of then answering ownership goal is that comparative result is the querying condition piece that really is not compared person's correspondence.
The present invention has abandoned the disposable definite mode that does not all the time have type to divide for query aim, query aim is divided into direct query aim, reasoning from logic target, relatively judges three grades of targets, make inquiry system go for Chinese imperative sentence, refer in particular to interrogative sentence, the inquiry sentence of various ways such as yes-no question, A-not-A question, alternative question, and can be by the operations such as deduction variation of dissimilar query aims, to such as judging that relatively type etc. carries out the analysis of query intention than the complex query sentence.
The present invention compares with general query aim analytical approach, has the following advantages:
(1) can understand the user inquiring sentence of different structure form.Three grades of query aims in the technical solution of the present invention; be aimed at that various dissimilar inquiry sentences are provided with; this just makes the system that adopts this recognition methods to be applicable to and refers in particular to the inquiry sentence; can also understand to pray and make inquiry sentence, or even the inquiry sentence of forms such as yes-no question, A-not-A question, alternative question also can normal response.So just relaxed restriction, made user's query context wider for the user input query sentence.
(2) the user inquiring sentence is more free on form of presentation.The setting of the compound conceptual knowledge base in the technical solution of the present invention makes system be not limited only to the standard concept in ABC storehouse for the understanding of inquiry sentence, and compound conceptual rule can also be set neatly, and understanding wider really accomplished the interchange of natural language.
Description of drawings
Fig. 1 is a query aim graph of a relation of the present invention.
Embodiment
Three grades of related in technical solution of the present invention query aims are not what isolate, be to have certain conversion and derivation relationship between them, the graph of a relation of each query aim is as shown in Figure 1. and when query aim was discerned, the overall algorithm of concrete query aim analytic process was as shown in table 1:
Table 1:
INPUT: inquiry composition chained list ql, semantic template xtempnum and sentence model xsentnum, knowledge base aimb; OUTPUT: the chained list of query aims at different levels; Begin (1) is according to the result of morphology, syntactic analysis---and a semantic template xtempnum and a model xsentnum find corresponding inquiry sentence record from the aimb of ABC storehouse, and extract from this record and judge comparison object xcompaim, reasoning from logic target xlogaim, direct query aim information xdqaim; (2) if xcompaim ≠ " " then change the 3rd the step else
If xlogaim ≠ " " then changes the 5th step else and changeed for the 7th step }; (3), set up the nodal point number (being generally) in the compaim chained list according to the number of relatively judging target; To compare set-point or comparison notion is filled up in the judgement comparison object table; (4) if compares the direct query aim then of notion ∈ changeed for the 7th step; (5) if xlogaim ∈ indirect logic reasoning target then calls notion to decompose equivalence transformation is direct loic reasoning target, produces compound notion and decomposes chained list logconcl, and set up the queue chain dlogq of direct loic reasoning target; (6) calling logic reasoning target is dissolved the deduction transforming function transformation function, is simple directly several set of query aim with direct loic reasoning object transformation; (7) the compound direct query aim then of if xdqaim ∈ calls notion and decomposes equivalence transformation and decompose chained list dqconcl for several set of simple directly query aim produce compound notion simultaneously, sets up direct query aim chained list dqaiml; (8) which among 6 of COUNT, SUM, MAX, MIN, AVG, the SELECT etc. the operation speech of determining each Knowledge Extraction target be; Direct query aim chained list dqaiml is expanded to the secondary chained list; (9) output finishes.End
Main step is as follows:
Step (1) by extensive language material analysis and statistics, is set up the knowledge base of compound notion and rule of inference according to the limited situation of system language.
Step (2) is carried out semantic understanding to inquiry sentence on sentence structure and basis of lexical analysis, identify query aim wherein, and this query aim may be direct query aim, reasoning from logic target, relatively judge a kind of in the target.
Step (3) is relatively judged target as if identifying, and then according to the difference of inquiring about contents such as a sentence type, comparison element relation, comparison element value source and comparative result type, extracts the reasoning from logic target or the direct query aim of correspondence.If incomparably judge and target then directly enter step (4).
Step (4) is if identify the reasoning from logic target, and then system need decompose or the rule deduction through notion, is translated into corresponding direct query aim.If no reasoning from logic target then directly enters step (5).
Step (5) is if identify direct query aim, and system can directly carry out query conversion, is converted into the data extract target, is used to retrieve professional ABC storehouse and obtains answer.
Step (6) is according to inquiry and analysis result, and the type of inquiring about initial query target in the sentence, and synthetic and reasoning produces the value of answering ownership goal by notion, and forms the sentence of answering that feeds back to the user with this.
In described step (1), the knowledge base of compound notion and rule of inference refers generally to the compound conceptual knowledge base compb and the logical concept inferenctial knowledge storehouse logicb of the affiliated application of system.So-called compound notion just is meant and can be decomposed into a plurality of standard concepts, or the notion of the arithmetical operation formula of standard concept and constant.Relational expression between compound notion and the standard concept is created as knowledge base compb, the notion that can only in the ABC storehouse, maintain the standard, but can when the analysis and consult sentence, compound notion be decomposed into standard concept, thus understand query intention.So-called logical concept just is meant can be with the notion of a plurality of standard concepts derivations.Knowledge base logicb then is the rule of inference that is used to preserve between logical concept and the standard concept, and general type is the logic production.
In described step (2), be not that any one inquiry sentence all comprises three grades of all query aims, often have only one-level query aim or two-stage query aim, according to the type of the query aim that identifies in this step, its follow-up treatment step also can be different.To multi-form and inquiry sentence complexity, adopt different levels and level else to deduce conversion process, this notion conversion process can step by step or be bypassed the immediate leadership and be carried out.
In described step (3), judge that relatively target is a comparatively complicated query target, general inquiry sentence corresponding to versions such as yes-no question, alternative question, A-not-A questions.The desired result of this type of inquiry sentence, the two or more often similar reasoning from logic targets or the fiducial value of direct query aim, numerical value source relatively can be the Query Result of knowledge base, it also can be the source data that has in the inquiry sentence, and can be certain numerical result after the comparison for the result of expectation, also may be a logical value.If relatively judged the end value of target, then must at first extract the reasoning from logic target or the direct query aim that wherein comprise.
In described step (4), the reasoning from logic target is divided into direct loic reasoning target and indirect logic reasoning target.Direct loic reasoning target is meant the knowledge objective that occurs in the production conclusion of logicb knowledge base.Indirect logic reasoning target is meant that decomposing equivalence transformation through notion finally is transformed to the knowledge objective that occurs in the production conclusion of logicb knowledge base.
Direct loic reasoning target can be exchanged into direct query aim through the production backward inference of logicb knowledge base, and this conversion process is called the reasoning from logic target and dissolves the deduction conversion.For the knowledge result that direct query aim inquires, the production reasoning through the logicb knowledge base is converted to direct loic reasoning order target value again, is used for generating and answers sentence, and this conversion process is called reasoning from logic target evaluation and deduces conversion.
In described step (5), directly query aim is a kind of query aim corresponding to standard concept. according to the direct query aim in the inquiry sentence, can directly carry out search operaqtion and obtain data, or these data obtain the result through the synthetic equivalence transformation of simple notion knowledge base.
Directly query aim divides simple directly query aim and compound direct query aim, and simple directly query aim is meant the target that only comprises domain name and aggregate function; Compound direct query aim is meant by simple directly query aim through the target of the synthetic equivalence transformation of notion.Can be divided into dominance target, query target again and assemble target three classes for the simple directly query aim that aggregate function can occur.The dominance target is meant the target that directly provides with domain name.The query target is meant the target that provides with interrogative.Assemble target and be meant the target that provides with aggregate function.
In described step (6), answer ownership goal and be meant that the natural language querying sentence requires the content of system answer, it may be relatively judge target, also may be reasoning from logic target or direct query aim.In the technical solution of the present invention, its pairing answer ownership goal of dissimilar inquiry sentences also is different.In general, answer ownership goal and query aim and directly have following several corresponding relations:
1. when answering the query aim of ownership goal=directly, directly the content of query aim is exactly to answer the value of ownership goal;
2. when answering ownership goal=reasoning from logic target, the content of reasoning from logic target is exactly to answer the value of ownership goal;
3. when answering ownership goal=judgement comparison object, and to have only a comparison person and the person of being compared (yes-no question or A-not-A question), comparison person be direct query aim or reasoning from logic target, the person of being compared for constant or directly when query aim or reasoning from logic target, and the value of then answering ownership goal is the logical value of the two comparative result;
4. when answering ownership goal=judgement comparison object, and to have only a comparison person and a plurality of person of being compared (alternative question), comparison person be direct query aim or reasoning from logic target, when the person of being compared is constant, the value of then answering ownership goal is that comparative result is the genuine corresponding person of being compared;
5. when answering ownership goal=judgement comparison object, and to have only a comparison person and a plurality of person of being compared (alternative question), comparison person be direct query aim or reasoning from logic target, when the person of being compared is direct query aim or reasoning from logic target, the value of then answering ownership goal is that comparative result is the querying condition piece that really is not compared person's correspondence.
With imperative sentence or refer in particular to question sentence when inquiry, answer ownership goal and generally equal direct query aim or reasoning from logic target; When inquiring about, answer ownership goal and generally equal to judge comparison object with modes such as yes-no question, A-not-A question, alternative questions.
Below in conjunction with accompanying drawing the present invention is done further implementation.
Step (1) is set up knowledge base---compound conceptual knowledge base compb of application and the application logical concept inferenctial knowledge storehouse logicb that the query aim notion is compound and deduction is required.
Wherein, the compound conceptual knowledge base compb of application should comprise compound notion, concern main Attribute domains such as formula and concept type, reference data structure is: compb (the compound notion of cconcept-, relaform-concerns formula, the typecode-concept type).Among the application logical concept inferenctial knowledge storehouse logicb, can divide static store and two kinds of forms of dynamic memory for the storage of logical concept.So-called static store is meant the store status when system is in off-duty, adopts the two-dimentional relation table, and reference data structure is (logconcept-logical concept, reason-former piece combined expression, a result-conclusion expression formula).Dynamic memory is meant the store status after the system start-up, adopts the secondary chained list, and loglink is the logical concept list structure, and subloglink is the child list of the corresponding different production of same logical concept, and the association attributes domain name claims and implication can be defined as follows:
structure?loglink
{
Char logconcept[16] // logical concept
Loglink * next // next node pointer
The child list pointer of subloglink * subp // same logical concept
}
structure subloglink
{
Char logconcept[16] // logical concept
Char reason[50] // the former piece combined expression
Char result[30] // the conclusion expression formula
Subloglink * next // next node pointer
}
System is converted into the dynamic memory state with the knowledge of static store state automatically when starting.When system's operation, when logical concept is analyzed, only the knowledge that is in the dynamic memory state is operated.
Step (2) is carried out semantic understanding to concrete inquiry sentence, identifies query aim wherein.
Step (3) is if comprise in the inquiry sentence and relatively judge target, then availablely judges that relatively target chained list comparelink represents this query aim.The comparelink chained list is the chained list of an one-to-many, i.e. a comparison person and a plurality of person of being compared.In this chained list, should clearly identify following information:
1. the result type of relatively judging.The result is logical value or arithmetic value, can determine to answer the type of ownership goal.
2. comparison.This will determine relatively to judge the action type that will do, two common element comparisons mainly be greater than, equal, less than etc.; The comparison of a plurality of elements has maximum, minimum, sequential scheduling; If an element and a set are relatively, then common comparison is a relation of inclusion.
3. compare the person and the person's of being compared concept type, wherein, comparison person's concept type can be direct query aim or reasoning from logic target, and the person's of being compared concept type can also be the constant that comprises in the inquiry sentence.
4. the relatively person and the person's of being compared notion and value are just wanted the domain name or the attribute of query contents.After this is relatively judged target analysis, just can come evaluation according to comparison person and the person's of being compared concept type, carry out computing by comparison again after obtaining occurrence, thus the result of obtaining.
Step (4) is if comprise the reasoning from logic target in the inquiry sentence, the deduction of perhaps passing through step (3) obtains the reasoning from logic target, may comprise indirect logic reasoning target and direct loic reasoning target, these reasoning targets still can't generate the directly data extract target of Query Database, need reasoning further to be transformed into direct query aim.
Wherein, if comprise indirect logic reasoning target, at first by decomposing equivalence transformation through notion it is transformed to direct loic reasoning target, its essence process is exactly the decomposition of compound notion.Carrying out compound notion when decomposing, need to adopt multistage chained list describe this process.Each territory and the implication that are comprised in the chained list are respectively: concept---notion; Typecode---concept type code; Next---point to the pointer of next concept node at the same level; Op---with the operational symbol of next one concept node at the same level; Value---calculate the notion value that gets; Subp---point to the pointer of lower conceptual node.Notion in first node of chained list is an initial concept, and its next is NULL (sky), and subp points to the chained list of a series of sub-notion formation of this notion decomposition.The notion per minute is separated once, and the many one decks of chained list are till all concept types are domain name or logical concept; Each protonotion that need decompose forms a multistage chained list with node headed by it.
The general algorithm of compound notion decomposition equivalence transformation is as shown in table 2.
Table 2:
INPUT: compound notion xconc, the compound conceptual knowledge base compb of application, the knowledge base stanb2 of application standard concept; OUTPUT: compound notion is decomposed equivalence transformation chained list concl; Begin (1) is definition chain list index concl earlier, and xnew: compound notion equivalence transformation chained list conceptlink (2) creates a node with xnew; Conc l=xnew; Xnew → concept=xconc; Xnew → typecode=7; Xnew → op=" " (null character string); Xnew → next=null; (3) call recursive function decompose (xconc, 7, xnew → subp); Call function generates the child list that the xconc notion is decomposed, and the head pointer of child list is composed to xnew → subp; (4) return compound notion and decompose equivalence transformation chained list concl; End
In the 3rd step of this algorithm, used recursive function decompose (yconc, ytypecode, ypoint), its major function is: if ytypecode=7 (being that yconc is compound notion), output is that the compound notion of pointer is decomposed the next stage child list (node that does not comprise yconc notion itself) of equivalence transformation with ypoint, otherwise puts ypoint=null.
If only comprise direct loic reasoning target in the inquiry sentence, that then will carry out reasoning from logic target as shown in table 3 dissolves the deduction mapping algorithm, generates direct query aim.
Table 3:
INPUT: direct loic reasoning object chain formation dlogq; Logical concept inferenctial knowledge storehouse longicb; OUTPUT: direct query aim chained list dqaiml; (1) object chain of the definition reasoning from logic earlier Q:dlogqueue of queue pointer; Q is pointed to first node of dlogq; Q=dlogq; Define direct query aim chain list index P, R:dqaimlink; Define a S set, T, wherein S={}; (2) be that pointer is created a Knowledge Extraction destination node with R; P=R; Dqaiml=P; (3) initialization inferenctial knowledge storehouse logicb knowledge scan pointer J points to article one inferenctial knowledge with J; (4) carry out circulation, make J move on to the production that contains above-mentioned logical concept in the production conclusion of indication; { J points to next bar production to while ((J ≠ END) and (not Q → oncept ∈ longicb.Result)), is about to; (5) if J=END then changes (7); (6) all domain names in the former piece of the production of T={J indication }; S:=TUS; J is moved on to next bar production; Change (4); (7) P-〉fieldns=S; Q=Q → next; (8) if Q ≠ NULL then is that pointer is created a Knowledge Extraction destination node with R; P-〉next=R; P=P-〉next; Change (3); End
The deduction mapping algorithm of dissolving of so-called reasoning from logic target is meant through the production backward inference in the logicb knowledge base, promptly by the reasoning of conclusion to prerequisite, is the process of direct query aim with direct loic reasoning Target Transformation.The main thought of this algorithm is to search in all production of application logical concept inferenctial knowledge storehouse logicb, find the production result identical with this direct loic reasoning target concept, separate the domain name in each production former piece, the set that all these domain names constitute is exactly the direct query aim that will change.
Step (5) is if having only direct query aim in the inquiry sentence, then can directly be converted to the data extract target for each direct query aim system, is used to retrieve professional ABC storehouse and obtains answer.
Through the conversion of above step, each inquiry sentence finally can be corresponding a direct query aim chained list.This chained list is a secondary chained list that is made of main chain table dqaimlink and child list dqsubaimlink, and wherein each Attribute domain title and implication can be defined as follows:
struct?dqsubaimlink
{
Char fieldid[8]; // domain name identifier field_id
Char fieldval[20]; // thresholding field_value
Dqsubaimlink * next; The pointer of the next node of // sensing
}
struct dqaimlink
{
Char operate[10]; // operation speech code (not being Chinese word)
Dqaimlink * next; The pointer of the next node of // sensing
Char fieldns[20] // standards on domain name Chinese character name set field_name_set
Condtree * condp; The pointer of // sensing condition tree root node
The pointer of antityqueue * antip // sensing entity queue
Dqsubaimlink * subp; The pointer of // sensing child list
}
Directly the main chain table of query aim chained list is made up of the Knowledge Extraction target, and child list is made up of the Knowledge Extraction sub-goal.Each node can be converted to a SQL statement in the main chain table, is used for the generated query statement and carries out the answer retrieval.
Step (6) is after finishing the knowledge base retrieval, obtain be direct query aim return the answer value, form the answer ownership goal that finally feeds back to the user, also need through with above-mentioned query aim conversion process contrary to synthetic transfer algorithm, thereby produce the sentence of answering of natural language.Comprising standard concept to synthetic, the immediate reasoning desired value of compound notion to the conversion of mediate inference desired value and the calculating of relatively judging the target answer.

Claims (9)

1. three grades of query aim analytical approachs towards the Chinese Query sentence is characterized in that: may further comprise the steps:
(1) according to the limited situation of system language,, sets up the knowledge base of compound notion and rule of inference by extensive language material analysis and statistics;
(2) on sentence structure and basis of lexical analysis, inquiry sentence is carried out semantic understanding, identify query aim wherein, and this query aim is classified as direct query aim, reasoning from logic target, relatively judges target;
(3) relatively judge target as if identifying,, extract the reasoning from logic target or the direct query aim of correspondence then according to the difference of inquiring about a sentence type, comparison element relation, comparison element value source and comparative result type content; If incomparably judge and target then directly enter step (4);
(4) if identify the reasoning from logic target, then system need decompose or the rule deduction through notion, is converted into corresponding direct query aim; If no reasoning from logic target then directly enters step (5);
(5) if identify direct query aim, system can directly carry out query conversion, is converted into the data extract target, is used to retrieve professional ABC storehouse and obtains answer;
(6) according to inquiry and analysis result, and the type of inquiring about initial query target in the sentence, synthetic and reasoning produces the value of answering ownership goal by notion, and forms the sentence of answering that feeds back to the user with this.
2. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1, it is characterized in that: in the described step (1), the knowledge base of compound notion and rule of inference refers to the compound conceptual knowledge base and the logical concept inferenctial knowledge storehouse of the affiliated application of system; Described compound notion just is meant and can be decomposed into a plurality of standard concepts, or the notion of the arithmetical operation formula of standard concept and constant; Relational expression between compound notion and the standard concept is created as compound conceptual knowledge base, and the notion that only maintains the standard in the ABC storehouse is decomposed into standard concept with compound notion, thereby understands query intention when the analysis and consult sentence; Described logical concept just is meant the notion that can derive from a plurality of standard concepts; Logical concept inferenctial knowledge storehouse then is the rule of inference that is used to preserve between logical concept and the standard concept, and form is the logic production.
3. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1, it is characterized in that: in the described step (2), inquiry sentence comprises direct query aim, reasoning from logic target, relatively judges in the target one or more levels, to multi-form and inquiry sentence complexity, adopt different levels and level else to deduce conversion process, this notion conversion process can step by step or be bypassed the immediate leadership and be carried out.
4. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1, it is characterized in that: in the described step (3), relatively judge the inquiry sentence of target corresponding to various versions, analyze the reasoning from logic target or the direct query aim that need compare and judge the target from relatively judging, carry out the knowledge base inquiry by reasoning from logic target or direct query aim then, and then oppositely deduce out the result, synthesize the value of answering ownership goal again.
5. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1 is characterized in that: in the described step (4), the reasoning from logic target is divided into direct loic reasoning target and indirect logic reasoning target; Direct loic reasoning target is meant the knowledge objective that occurs in the production conclusion in logical concept inferenctial knowledge storehouse; Indirect logic reasoning target is meant that decomposing equivalence transformation through notion finally is transformed to the knowledge objective that occurs in the production conclusion in logical concept inferenctial knowledge storehouse; It is the production backward inference of direct loic reasoning target through logical concept inferenctial knowledge storehouse that the reasoning from logic target is dissolved the conversion process of deducing conversion, can be exchanged into direct query aim; Reasoning from logic target evaluation is deduced the knowledge result of conversion process for inquiring for direct query aim of conversion, and the production reasoning through logical concept inferenctial knowledge storehouse is converted to direct loic reasoning order target value again, is used for generating and answers sentence.
6. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1 is characterized in that: in the described step (5), directly query aim is a kind of query aim corresponding to standard concept; Direct query aim according in the inquiry sentence can directly carry out search operaqtion to knowledge base and obtain data, or these data obtain the result through the synthetic equivalence transformation of simple notion;
Directly query aim divides simple directly query aim and compound direct query aim, and simple directly query aim is meant the target that only comprises domain name and aggregate function; Compound direct query aim is meant by simple directly query aim through the target of the synthetic equivalence transformation of notion;
Can be divided into dominance target, query target again and assemble target three classes for the simple directly query aim that aggregate function can occur; The dominance target is meant the target that directly provides with domain name; The query target is meant the target that provides with interrogative; Assemble target and be meant the target that provides with aggregate function.
7. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1, it is characterized in that: in the described step (6), answer ownership goal and be meant that the natural language querying sentence requires the content of system answer, described content is relatively to judge target, reasoning from logic target or direct query aim.
8. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1 is characterized in that: answer ownership goal and query aim and directly have following several corresponding relations:
1. when answering the query aim of ownership goal=directly, directly the content of query aim is exactly to answer the value of ownership goal;
2. when answering ownership goal=reasoning from logic target, the content of reasoning from logic target is exactly to answer the value of ownership goal;
3. when answering ownership goal=relatively judge target, and to have only a comparison person and the person of being compared, a comparison person be direct query aim or reasoning from logic target, the person of being compared for constant or directly when query aim or reasoning from logic target, and the value of then answering ownership goal is the logical value of the two comparative result;
4. when answering ownership goal=relatively judge target, and to have only a comparison person and a plurality of person of being compared, comparison person be direct query aim or reasoning from logic target, when the person of being compared is constant, the value of then answering ownership goal is that comparative result is the genuine corresponding person of being compared;
5. when answering ownership goal=relatively judge target, and to have only a comparison person and a plurality of person of being compared, comparison person be direct query aim or reasoning from logic target, when the person of being compared is direct query aim or reasoning from logic target, the value of then answering ownership goal is that comparative result is the querying condition piece that really is not compared person's correspondence.
9. three grades of query aim analytical approachs towards the Chinese Query sentence according to claim 1, it is characterized in that: in the described step (1), the knowledge base of compound notion and rule of inference refers to the compound conceptual knowledge base and the logical concept inferenctial knowledge storehouse of the affiliated application of system; Described compound notion just is meant and can be decomposed into a plurality of standard concepts, or the notion of the arithmetical operation formula of standard concept and constant; Relational expression between compound notion and the standard concept is created as compound conceptual knowledge base, and the notion that only maintains the standard in the ABC storehouse is decomposed into standard concept with compound notion, thereby understands query intention when the analysis and consult sentence; Described logical concept just is meant the notion that can derive from a plurality of standard concepts; Logical concept inferenctial knowledge storehouse then is the rule of inference that is used to preserve between logical concept and the standard concept, and form is the logic production;
In the described step (2), inquiry sentence comprises direct query aim, reasoning from logic target, relatively judges in the target one or more levels, to multi-form and inquiry sentence complexity, adopt different levels and level else to deduce conversion process, this notion conversion process can step by step or be bypassed the immediate leadership and be carried out;
In the described step (3), relatively judge the inquiry sentence of target corresponding to various versions, analyze the reasoning from logic target or the direct query aim that need compare and judge the target from relatively judging, carry out the knowledge base inquiry by reasoning from logic target or direct query aim then, and then oppositely deduce out the result, synthesize the value of answering ownership goal again;
In the described step (4), the reasoning from logic target is divided into direct loic reasoning target and indirect logic reasoning target; Direct loic reasoning target is meant the knowledge objective that occurs in the production conclusion in logical concept inferenctial knowledge storehouse; Indirect logic reasoning target is meant that decomposing equivalence transformation through notion finally is transformed to the knowledge objective that occurs in the production conclusion in logical concept inferenctial knowledge storehouse; It is the production backward inference of direct loic reasoning target through logical concept inferenctial knowledge storehouse that the reasoning from logic target is dissolved the conversion process of deducing conversion, can be exchanged into direct query aim; Reasoning from logic target evaluation is deduced the knowledge result of conversion process for inquiring for direct query aim of conversion, and the production reasoning through logical concept inferenctial knowledge storehouse is converted to direct loic reasoning order target value again, is used for generating and answers sentence;
In the described step (5), directly query aim is a kind of query aim corresponding to standard concept; Direct query aim according in the inquiry sentence can directly carry out search operaqtion to knowledge base and obtain data, or these data obtain the result through the synthetic equivalence transformation of simple notion; Directly query aim divides simple directly query aim and compound direct query aim, and simple directly query aim is meant the target that only comprises domain name and aggregate function; Compound direct query aim is meant by simple directly query aim through the target of the synthetic equivalence transformation of notion; Can be divided into dominance target, query target again and assemble target three classes for the simple directly query aim that aggregate function can occur; The dominance target is meant the target that directly provides with domain name; The query target is meant the target that provides with interrogative; Assemble target and be meant the target that provides with aggregate function;
In the described step (6), answer ownership goal and be meant that the natural language querying sentence requires the content of system answer, described content is relatively to judge target, reasoning from logic target or direct query aim;
Answer ownership goal and query aim and directly has following several corresponding relations: 1. when answering ownership goal=direct query aim, the content of direct query aim is exactly the value of answer ownership goal; 2. when answering ownership goal=reasoning from logic target, the content of reasoning from logic target is exactly to answer the value of ownership goal; 3. when answering ownership goal=relatively judge target, and to have only a comparison person and the person of being compared, a comparison person be direct query aim or reasoning from logic target, the person of being compared for constant or directly when query aim or reasoning from logic target, and the value of then answering ownership goal is the logical value of the two comparative result; 4. when answering ownership goal=relatively judge target, and to have only a comparison person and a plurality of person of being compared, comparison person be direct query aim or reasoning from logic target, when the person of being compared is constant, the value of then answering ownership goal is that comparative result is the genuine corresponding person of being compared; 5. when answering ownership goal=relatively judge target, and to have only a comparison person and a plurality of person of being compared, comparison person be direct query aim or reasoning from logic target, when the person of being compared is direct query aim or reasoning from logic target, the value of then answering ownership goal is that comparative result is the querying condition piece that really is not compared person's correspondence.
CN200910172770A 2009-11-27 2009-11-27 Chinese query clause oriented three-level inquired target analysis method Pending CN101706792A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN200910172770A CN101706792A (en) 2009-11-27 2009-11-27 Chinese query clause oriented three-level inquired target analysis method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN200910172770A CN101706792A (en) 2009-11-27 2009-11-27 Chinese query clause oriented three-level inquired target analysis method

Publications (1)

Publication Number Publication Date
CN101706792A true CN101706792A (en) 2010-05-12

Family

ID=42377018

Family Applications (1)

Application Number Title Priority Date Filing Date
CN200910172770A Pending CN101706792A (en) 2009-11-27 2009-11-27 Chinese query clause oriented three-level inquired target analysis method

Country Status (1)

Country Link
CN (1) CN101706792A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729350A (en) * 2017-08-29 2018-02-23 百度在线网络技术(北京)有限公司 Route quality querying method, device, equipment and storage medium
CN110489752A (en) * 2019-08-14 2019-11-22 梁冰 A kind of semantic recurrence expression system of natural language
CN110781685A (en) * 2019-10-18 2020-02-11 四川长虹电器股份有限公司 Method for automatically marking correctness of semantic analysis result based on user feedback
CN112860940A (en) * 2021-02-05 2021-05-28 陕西师范大学 Music resource retrieval method based on sequential concept space on description logic knowledge base
CN114722163A (en) * 2022-06-10 2022-07-08 科大讯飞股份有限公司 Data query method and device, electronic equipment and storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107729350A (en) * 2017-08-29 2018-02-23 百度在线网络技术(北京)有限公司 Route quality querying method, device, equipment and storage medium
CN110489752A (en) * 2019-08-14 2019-11-22 梁冰 A kind of semantic recurrence expression system of natural language
CN110489752B (en) * 2019-08-14 2021-06-22 梁冰 Semantic recursion representation system of natural language
CN110781685A (en) * 2019-10-18 2020-02-11 四川长虹电器股份有限公司 Method for automatically marking correctness of semantic analysis result based on user feedback
CN110781685B (en) * 2019-10-18 2022-08-19 四川长虹电器股份有限公司 Method for automatically marking correctness of semantic analysis result based on user feedback
CN112860940A (en) * 2021-02-05 2021-05-28 陕西师范大学 Music resource retrieval method based on sequential concept space on description logic knowledge base
CN112860940B (en) * 2021-02-05 2022-11-25 陕西师范大学 Music resource retrieval method based on sequential concept space on description logic knowledge base
CN114722163A (en) * 2022-06-10 2022-07-08 科大讯飞股份有限公司 Data query method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
Yu et al. Typesql: Knowledge-based type-aware neural text-to-sql generation
CN104361127B (en) The multilingual quick constructive method of question and answer interface based on domain body and template logic
CN110968699B (en) Logic map construction and early warning method and device based on fact recommendation
Cilibrasi et al. Automatic meaning discovery using Google
US9280535B2 (en) Natural language querying with cascaded conditional random fields
CN111159330B (en) Database query statement generation method and device
CN115576984A (en) Method for generating SQL (structured query language) statement and cross-database query by Chinese natural language
CN110597844B (en) Unified access method for heterogeneous database data and related equipment
CN101706792A (en) Chinese query clause oriented three-level inquired target analysis method
CN110909126A (en) Information query method and device
CN114625748A (en) SQL query statement generation method and device, electronic equipment and readable storage medium
CN112445894A (en) Business intelligent system based on artificial intelligence and analysis method thereof
CN109446277A (en) Relational data intelligent search method and system based on Chinese natural language
Korobkin et al. Methods for extracting the descriptions of sci-tech effects and morphological features of technical systems from patents
Chen et al. Mining schema matching between heterogeneous databases
KR101359039B1 (en) Analysis device and method for analysis of compound nouns
CN103838794A (en) Word segmentation method suitable for specialized search engine
Szczuka et al. Using domain knowledge in initial stages of KDD: Optimization of compound object processing
Wu et al. Research of knowledge graph technology and its applications in agricultural information consultation field
Yi An english pos tagging approach based on maximum entropy
Padhi et al. FlashProfile: Interactive Synthesis of Syntactic Profiles.
CN108536819B (en) Method, device, server and storage medium for comparing integer column and character string
CN112965998A (en) Compound database establishing and searching method and system
Hu et al. Study on Similar Engineering Decision Problem Identification Based on Combination of Improved Edit-Distance and Skeletal Dependency Tree with POS
CN115168408B (en) Query optimization method, device, equipment and storage medium based on reinforcement learning

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C12 Rejection of a patent application after its publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20100512