CN108717441A - The determination method and device of predicate corresponding to question template - Google Patents
The determination method and device of predicate corresponding to question template Download PDFInfo
- Publication number
- CN108717441A CN108717441A CN201810468186.1A CN201810468186A CN108717441A CN 108717441 A CN108717441 A CN 108717441A CN 201810468186 A CN201810468186 A CN 201810468186A CN 108717441 A CN108717441 A CN 108717441A
- Authority
- CN
- China
- Prior art keywords
- predicate
- information
- template
- correspondence
- answer
- 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.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
- G06F40/216—Parsing using statistical methods
Abstract
The invention discloses a kind of determination method and devices of the predicate corresponding to question template.Wherein, this method includes:It obtains the target problem template with correspondence and answers information, and obtain predicate and content information with correspondence;Each predicate answered corresponding to information is determined according to the similarity between information and the content information is each answered in the answer information;The most predicate of the corresponding quantity for answering information in the predicate is determined as the target predicate corresponding to the target problem template.Efficiency lower technical problem when the present invention solves the predicate determined in the related technology corresponding to question template.
Description
Technical field
The present invention relates to computer realms, in particular to a kind of determination method of the predicate corresponding to question template
And device.
Background technology
The relevant technologies are typically using the method for rule when processing template is intended to, and are exactly artificial hand-written rule, system
Determine mapping ruler.Such as:Artificial is much this year you, you today how old, how old are you age, you are which year birth
, the problems such as your, your how old at age in this year, is mapped as " age " at much ages in this year, but the defect of this scheme is non-
Chang Mingxian:It is limited to artificial experience, and can not possibly be complete.If user becomes a saying:How much is your age, if the way to put questions
Not within rule, then this sentence can not be handled.Current technology problem essentially consists in artificial knowledge and ability is limited,
And the way to put questions of user is multifarious, is made a lot of variety.Therefore, artificial scheme is only possible to reply partial picture, it is impossible to answer
To all situations, support can not be just provided for the rule that do not summarize manually.In addition, excessive also can be manually team
Increase appropriation budget, this is a kind of way got half the result with twice the effort, the effect for having spent money also not necessarily to have.
For above-mentioned problem, currently no effective solution has been proposed.
Invention content
An embodiment of the present invention provides a kind of determination method and devices of the predicate corresponding to question template, at least to solve
Efficiency lower technical problem when determining the predicate corresponding to question template in the related technology.
One side according to the ... of the embodiment of the present invention provides a kind of determination method of the predicate corresponding to question template,
Including:It obtains the target problem template with correspondence and answers information, and obtain with the predicate of correspondence and interior
Hold information;It is determined described each time according to the similarity each answered in the answer information between information and the content information
Answer the predicate corresponding to information;The most predicate of the corresponding quantity for answering information in the predicate is determined as the target problem
Target predicate corresponding to template.
Another aspect according to the ... of the embodiment of the present invention, additionally provide the predicate corresponding to a kind of question template determines dress
It sets, including:First acquisition module, for obtaining target problem template and answer information with correspondence, and acquisition tool
There are the predicate and content information of correspondence;First determining module, for according to each answered in the answer information information and
Similarity between the content information determines each predicate answered corresponding to information;Second determining module, being used for will
The most predicate of the corresponding quantity for answering information is determined as the target predicate corresponding to the target problem template in the predicate.
Another aspect according to the ... of the embodiment of the present invention additionally provides a kind of storage medium, which is characterized in that the storage is situated between
Computer program is stored in matter, wherein the computer program is arranged to execute described in any of the above-described when operation
Method.
Another aspect according to the ... of the embodiment of the present invention additionally provides a kind of electronic device, including memory and processor,
It is characterized in that, computer program is stored in the memory, and the processor is arranged to hold by the computer program
Method described in row any of the above-described.
In embodiments of the present invention, it using the target problem template and answer information obtained with correspondence, and obtains
Take predicate and content information with correspondence;According to each answered in the answer information information and the content information it
Between similarity determine it is described it is each answer information corresponding to predicate;The corresponding quantity for answering information in the predicate is most
Predicate be determined as the mode of the target predicate corresponding to the target problem template, obtain the target problem with correspondence
Template and answer information and the predicate with correspondence and content information, further according to each answers information and content information it
Between similarity establish each correspondence answered between information and predicate, by the most meaning of the corresponding quantity for answering information
Word is determined as the corresponding position of target problem template, to by the way of ballot, be pressed automatically for each target problem template
It votes predicate according to similarity, and establishes the correspondence between each target problem template and the highest predicate of poll,
To be that question template determines its corresponding predicate automatically, improved when determining the predicate corresponding to question template to realize
The technique effect of efficiency, and then solve efficiency lower technology when determining the predicate corresponding to question template in the related technology and ask
Topic.
Description of the drawings
Attached drawing described herein is used to provide further understanding of the present invention, and is constituted part of this application, this hair
Bright illustrative embodiments and their description are not constituted improper limitations of the present invention for explaining the present invention.In the accompanying drawings:
Fig. 1 is the signal of the determination method of the predicate corresponding to a kind of optional question template according to the ... of the embodiment of the present invention
Figure;
Fig. 2 is the application of the determination method of the predicate corresponding to a kind of optional question template according to the ... of the embodiment of the present invention
Environment schematic;
Fig. 3 is the determination side of the predicate corresponding to a kind of optional question template according to optional embodiment of the invention
The schematic diagram of method;
Fig. 4 is the determination of the predicate corresponding to the optional question template of another kind according to optional embodiment of the invention
The schematic diagram of method;
Fig. 5 is the signal of the determining device of the predicate corresponding to a kind of optional question template according to the ... of the embodiment of the present invention
Figure;
Fig. 6 is the application of the determination method of the predicate corresponding to a kind of optional question template according to the ... of the embodiment of the present invention
Schematic diagram of a scenario;And
Fig. 7 is a kind of schematic diagram of optional electronic device according to the ... of the embodiment of the present invention.
Specific implementation mode
In order to enable those skilled in the art to better understand the solution of the present invention, below in conjunction in the embodiment of the present invention
Attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is only
The embodiment of a part of the invention, instead of all the embodiments.Based on the embodiments of the present invention, ordinary skill people
The every other embodiment that member is obtained without making creative work should all belong to the model that the present invention protects
It encloses.
It should be noted that term " first " in description and claims of this specification and above-mentioned attached drawing, "
Two " etc. be for distinguishing similar object, without being used to describe specific sequence or precedence.It should be appreciated that using in this way
Data can be interchanged in the appropriate case, so as to the embodiment of the present invention described herein can in addition to illustrating herein or
Sequence other than those of description is implemented.In addition, term " comprising " and " having " and their any deformation, it is intended that cover
It includes to be not necessarily limited to for example, containing the process of series of steps or unit, method, system, product or equipment to cover non-exclusive
Those of clearly list step or unit, but may include not listing clearly or for these processes, method, product
Or the other steps or unit that equipment is intrinsic.
One side according to the ... of the embodiment of the present invention provides a kind of determination method of the predicate corresponding to question template,
As shown in Figure 1, this method includes:
S102 obtains the target problem template with correspondence and answers information, and obtains with correspondence
Predicate and content information;
S104 determines each answer information according to the similarity each answered in answer information between information and content information
Corresponding predicate;
The most predicate of the corresponding quantity for answering information in predicate is determined as the mesh corresponding to target problem template by S106
Mark predicate.
Optionally, in the present embodiment, the determination method of the predicate corresponding to above problem template can be applied to such as Fig. 2
Shown in the hardware environment that is constituted of equipment 202.As shown in Fig. 2, equipment 202 obtains the target problem mould with correspondence
Plate and answer information, and obtain predicate and content information with correspondence;Information is each answered according to answering in information
Similarity between content information determines each predicate answered corresponding to information;By the corresponding quantity for answering information in predicate
Most predicates is determined as the target predicate corresponding to target problem template.
Optionally, in the present embodiment, the determination method of the predicate corresponding to above problem template can be, but not limited to answer
For determining between question template and predicate in the scene of correspondence.Wherein, the predicate corresponding to above problem template is really
The method of determining can be, but not limited to be applied to various types of applications, for example, online education application, instant messaging application, community's sky
Between apply, game application, shopping application, browser application, financial application, multimedia application, live streaming application, medical applications, with
And interactive application of Intelligent hardware etc. (wherein, Intelligent hardware can be, but not limited to include:Smart home device, intelligence wearing are set
Standby, intelligent transportation tool etc.).Specifically, can be, but not limited to be applied in above-mentioned browser application determine question template with
Between predicate in the scene of correspondence, or can with but be not limited to be applied to above-mentioned game application determine question template with meaning
Between word in the scene of correspondence, the efficiency when predicate corresponding to question template is determined to improve.Above-mentioned is only that one kind is shown
, do not do any restriction to this in the present embodiment.
Optionally, in the present embodiment, the determination method of the predicate corresponding to above problem template can be, but not limited to answer
For in the scene of natural language processing.Such as:Knowledge base question and answer (KnowledgeBase Question Answering, letter
Referred to as KB-QA), natural language problem (Query) is given, by carrying out semantic understanding and parsing to problem, and then utilizes knowledge
Library is inquired, reasoning obtains answer (Answer).
Such as:As shown in figure 3, there is the knowledge mapping of part Liu, asked now there are one user:The wife of Liu
Whom is.This Query by template generation processing after template be:Whom the wife of [singer] is, if the template reflected
The predicate penetrated is wife, so whom the wife of [singer], which is, corresponds to wife.Knowledge base (knowledge base, referred to as
KB the entity that singer is Liu is found in), predicate is wife, and it is Zhu that can find result, finally returns to result Zhu
So-and-so.
Optionally, in the present embodiment, information triple is typically expressed as in knowledge mapping:Subject (subject), predicate
(predicate), object (object), subject and object are typically all entity, and what predicate indicated is the relationship between two entities
Or the attribute of subject.Wherein, entity refers to the base unit for indicating a concept.Such as:From the point of view of data processing, reality
Objective things in the world can be referred to as entity, it be it is any in real world distinguish, identifiable things.Entity can be with
Refer to people, such as teacher, student, object, such as book, warehouse can also be referred to.It can not only refer to the objective objects that can be touched, can be with
Refer to abstract event, such as performance, football match.
Optionally, in the present embodiment, template can be a kind of general clause with extension sample, and question template is exactly
A kind of general problem clause with extension sample.Such as:For problem 1:Whom the wife of Zhang San is, problem 2:Li Si's is old
Whom mother-in-law is, problem 3:Whom the wife of king five is, problem 4:The wife of Zhao six is for whom, is all to ask although subject is different
It asks that whom whose wife is to so-and-so, the same question template is arrived it is possible to which problem 1 to problem 4 is concluded:[person] wife is
Who.
Optionally, in the present embodiment, the target problem template with correspondence and answer information can be obtained from advance
It is obtained in the question and answer pair taken, such as:The question and answer pair for obtaining 6,000,000 in advance, by 6,000,000 question and answer to the problems in be converted to ask one by one
Inscribe template.Transformed question template is integrated, then one or more may have been corresponded under the same question template
This corresponding answer of one or more problem is determined as the corresponding answer information of the template by problem, to obtain have pair
The target problem template and answer information that should be related to.
Optionally, in the present embodiment, the predicate with correspondence and content information can be, but not limited to from knowledge base
Middle acquisition, with correspondence predicate and content information can be, but not limited to be integrated according to subject, can also but
It is not limited to be integrated according to predicate.
Such as:By taking disease knowledge as an example, the relevant knowledge of 9600 diseases is got as knowledge base, from this 9600 diseases
The predicate of this knowledge is extracted in each of the relevant knowledge of disease, and is believed this knowledge as the corresponding content of the predicate
Breath, a plurality of knowledge may extract identical predicate, be integrated to predicate, and it is one or more corresponding to obtain each predicate
A content information, to obtain the predicate with correspondence and content information.Alternatively, can also be according to subject to relevant knowledge
It is integrated, then extracts predicate under each subject, and establish the correspondence between predicate and content information, will had and correspond to
Subject, predicate and the content information of relationship are determined as above-mentioned predicate and content information with correspondence.
In an optional embodiment, as shown in figure 4, by taking disease areas as an example, 6,000,000 question and answer pair are obtained, from
Target problem template and answer information of the 6000000 question and answer centering extraction with correspondence.Obtain the correlation of 9600 diseases
Knowledge is as knowledge base, predicate and content information of the extraction with correspondence from knowledge base.It is each in information according to answering
It answers the similarity between information and content information and determines each predicate answered corresponding to information, then count each predicate and correspond to
Answer information quantity, the most predicate of the corresponding quantity for answering information in predicate is determined as corresponding to target problem template
Target predicate.
As it can be seen that through the above steps, obtain target problem template with correspondence and answer information and with pair
The predicate and content information that should be related to are established each answer further according to the similarity between each answer information and content information and are believed
The most predicate of the corresponding quantity for answering information is determined as target problem template and corresponded to by the correspondence between breath and predicate
Position, to using vote by the way of, vote automatically predicate according to similarity for each target problem template, and
The correspondence between each target problem template and the highest predicate of poll is established, to be that question template determines that its is right automatically
The predicate answered to realize the technique effect for improving efficiency when determining the predicate corresponding to question template, and then solves
Efficiency lower technical problem when determining the predicate corresponding to question template in the related technology.
As a kind of optional scheme, obtains the target problem template with correspondence and answer information includes:
Each problem of question and answer centering is converted to question template, wherein the problem of question and answer are to for correspondence by S1
And answer;
S2 obtains mutually different question template from question template, obtains target problem template;
Answer corresponding the problem of belonging to target problem template is determined as the corresponding answer of target problem template and believed by S3
Breath obtains the target problem template with correspondence and answers information.
Optionally, in the present embodiment, during problem is converted into question template, it is possible that multiple problems
The case where being converted to the same question template, such as:How scapulohumeral periarthritis treats, which the therapeutic modality of cervical spondylosis has, how
The problems such as treatment varicella etc., can be converted to the same question template:How [sickname] treats.That is, for M
A problem can be converted to Q mutually different question templates, and wherein Q is less than or equal to M, different by this Q
The problem of template be determined as target problem template.
Optionally, in the present embodiment, the corresponding answer of all the problem of being converted into same problem template is determined as
The corresponding answer information of the problem.Such as:Problem:How scapulohumeral periarthritis treats, which the therapeutic modality of cervical spondylosis has, how to treat
Varicella is converted to target problem template:How [sickname] treats.Problem:How scapulohumeral periarthritis prevent, the prevention side of cervical spondylosis
Which formula, which has, how to prevent varicella is converted to target problem template:How [sickname] prevents.So can by scapulohumeral periarthritis why
Treat corresponding answer 1, which corresponding answer 2 therapeutic modality of cervical spondylosis has, how treating varicella, corresponding answer 3 is true
It is set to target problem template:How [sickname] treats corresponding answer information, and how scapulohumeral periarthritis is prevented corresponding answer
4, which corresponding answer 5 precautionary approach of cervical spondylosis has, how to prevent the corresponding answer of varicella 6 and be determined as target problem mould
Plate:How [sickname] prevents corresponding answer information.Obtain the target problem template with correspondence:[sickname]
How to treat and answer information:Answer 1, answer 2, answer 3, and the target problem template with correspondence:
How [sickname] prevents and answers information:Answer 4, answer 5, answer 6.
As a kind of optional scheme, mutually different question template is obtained from question template, obtains target problem mould
Plate includes:
S1 obtains mutually different question template from question template;
S2 obtains template the problem of question template type in mutually different question template belongs to binary fact type problem;
S3, by template the problem of the most destination number of corresponding problematic amount in template the problem of binary fact type problem
It is determined as target problem template.
Optionally, in the present embodiment, binary fact type problem (Binary Factoid Question, referred to as
BFQ), the problem of generally referring to the attribute of inquiry entity in a certain respect.
Optionally, in the present embodiment, frequency highest can be selected from magnanimity target problem template and belongs to BFQ problems
200 templates.
As a kind of optional scheme, obtaining predicate and content information with correspondence includes:
S1 obtains the knowledge data of target domain;
S2 establishes the knowledge mapping of target domain according to knowledge data;
S3 obtains subject, predicate and object with correspondence from the information triple of knowledge mapping;
S4, by with correspondence predicate and object be determined as the predicate with correspondence and content information, alternatively,
By with correspondence under subject predicate and object be determined as corresponding predicate and the content letter with correspondence of subject
Breath.
Optionally, in the present embodiment, knowledge mapping is also known as mapping knowledge domains, is known as knowledge domain in books and information group
Visualization or ken map map, are explicit knowledge's development process and a series of a variety of different figures of structural relation,
With visualization technique Description of Knowledge resource and its carrier, excavation, analysis, structure, drafting and explicit knowledge and the phase between them
Mutually contact.
Such as:9600 relevant knowledge data for obtaining disease areas, the content of 9600 initial data is also closed
Keyword extracts.Such as:The predicate of scapulohumeral periarthritis has:Treatment, common sympton, complication etc., wherein the pass of " treatment " this predicate
Keyword extracts result:Analgesic, adhesion, drug, operation, Chinese medicine;The keyword extraction result of " common sympton " this predicate is:
Chronic, pain, diffusion, shoulder mobility is limited, shoulder ache, and head movement is limited, shoulder pain.
Optionally, in the present embodiment, the predicate with correspondence and content information can be, but not limited to be according to master
What language was classified, i.e., every knowledge data extracts subject, predicate and content information, by each knowledge data according to subject into
Row classification, the knowledge data of identical subject are integrated together, and each subject has corresponded to predicate, and each predicate has corresponded to content letter again
Breath.Alternatively, what predicate and content information with correspondence can also but be not limited to not distinguish according to subject, also
It is to say, every knowledge data extracts a predicate and content information with correspondence.
Optionally, in the present embodiment, it can be, but not limited to determine that each to answer information institute right one of in the following manner
The predicate answered:
The predicate for having correspondence and object are being determined as the predicate with correspondence and content information by mode one
In the case of, determine each the first similarity for answering information content information corresponding with each first predicate, wherein the first meaning
Word is the predicate in predicate and content information with correspondence;
Highest first predicate of corresponding first similarity is determined as the predicate corresponding to each answer information.
Mode two, by with correspondence under subject predicate and object be determined as that subject is corresponding to close with corresponding
In the case of the predicate and content information of system, the second predicate and content information with correspondence are obtained, wherein the second predicate
Identical subject corresponding with each answer information;
Determine each the second similarity for answering information content information corresponding with each second predicate;
Highest second predicate of corresponding second similarity is determined as the predicate corresponding to each answer information.
It is true according to the similarity each answered in answer information between information and content information as a kind of optional scheme
Determining each predicate answered corresponding to information includes:
S1 extracts keyword from each answer information, and obtaining, there is each of correspondence, which to answer information and first, closes
Keyword set;
S2 extracts keyword from the corresponding content information of each predicate, obtain having correspondence content information and
Second keyword set;
S3 obtains each corresponding first keyword set of information corresponding with each content information second of answering and closes respectively
Similarity between keyword set, and the similarity between the first keyword set and the second keyword set is determined as each
Answer the similarity between information and content information;
Predicate corresponding each highest object content information of similarity answered between information is determined as each by S4
Answer the predicate corresponding to information.
Optionally, in the present embodiment, determine each similarity for answering information and content information mode can with but not
It is limited to include the similarity determined between each keyword and the keyword of content information for answering information.
Optionally, in the present embodiment, determine that the mode of the similarity between keyword and keyword can be, but not limited to
Including:Obtain the outstanding card similarity between keyword and keyword.For two set x and y, outstanding card similarity calculation
Formula isI.e. outstanding card similarity J is two intersection of sets divided by two unions of sets.
It should be noted that other similarity calculating methods can also be used when above-mentioned calculating similarity, such as
The computational methods based on term vector may be used.
As a kind of optional scheme, asked the most predicate of the corresponding quantity for answering information in predicate is determined as target
After inscribing the target predicate corresponding to template, further include:
S1, using with correspondence target problem template and target predicate to obtain first problem input by user institute right
First answered is answered;
S2 is answered first and is returned to user as the response message of first problem.
Optionally, in the present embodiment, the target problem template and target with correspondence got can be utilized
Predicate carries out further natural language processing, such as:Obtain the answer etc. that user is asked a question.
As a kind of optional scheme, using with correspondence target problem template and target predicate to obtain user defeated
Corresponding to the first problem entered first answer include:
S1 obtains first problem input by user, and the first subject is extracted from first problem;
First problem is converted to first problem template by S2;
S3, from correspondence target problem template and target predicate in obtain first problem template corresponding first
Predicate;
S4 obtains the corresponding knowledge mapping of the first subject from the knowledge base of first problem fields;
S5, obtains the corresponding answer information of the first predicate from the corresponding knowledge mapping of the first subject, and by the first predicate
Corresponding answer information is determined as the first answer.
Optionally, in the present embodiment, it gets after target problem template with correspondence and target predicate just
Quick predicate can be carried out to problem input by user to predict, first problem input by user is converted into first problem mould
Plate, then from correspondence target problem template and target predicate in predict the first problem template it is corresponding first meaning
The corresponding answer information of first predicate is obtained as first time in word, then knowledge mapping corresponding to the subject of first problem
It answers and returns to user.
It should be noted that for each method embodiment above-mentioned, for simple description, therefore it is all expressed as a series of
Combination of actions, but those skilled in the art should understand that, the present invention is not limited by the described action sequence because
According to the present invention, certain steps can be performed in other orders or simultaneously.Secondly, those skilled in the art should also know
It knows, embodiment described in this description belongs to preferred embodiment, and involved action and module are not necessarily of the invention
It is necessary.
Through the above description of the embodiments, those skilled in the art can be understood that according to above-mentioned implementation
The method of example can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but it is very much
In the case of the former be more preferably embodiment.Based on this understanding, technical scheme of the present invention is substantially in other words to existing
The part that technology contributes can be expressed in the form of software products, which is stored in a storage
In medium (such as ROM/RAM, magnetic disc, CD), including some instructions are used so that a station terminal equipment (can be mobile phone, calculate
Machine, server or network equipment etc.) execute method described in each embodiment of the present invention.
Other side according to the ... of the embodiment of the present invention additionally provides a kind of for implementing corresponding to above problem template
The determining device of predicate corresponding to the problem of determination method of predicate template, as shown in figure 5, the device includes:
First acquisition module 52, for obtaining target problem template and answer information with correspondence, and acquisition
Predicate with correspondence and content information;
First determining module 54, for true according to the similarity each answered in answer information between information and content information
Fixed each predicate answered corresponding to information;
Second determining module 56, for the most predicate of the corresponding quantity for answering information in predicate to be determined as target problem
Target predicate corresponding to template.
Optionally, in the present embodiment, the determining device of the predicate corresponding to above problem template can be applied to such as Fig. 2
Shown in the hardware environment that is constituted of equipment 202.As shown in Fig. 2, equipment 202 obtains the target problem mould with correspondence
Plate and answer information, and obtain predicate and content information with correspondence;Information is each answered according to answering in information
Similarity between content information determines each predicate answered corresponding to information;By the corresponding quantity for answering information in predicate
Most predicates is determined as the target predicate corresponding to target problem template.
Optionally, in the present embodiment, the determining device of the predicate corresponding to above problem template can be, but not limited to answer
For determining between question template and predicate in the scene of correspondence.Wherein, the predicate corresponding to above problem template is really
The method of determining can be, but not limited to be applied to various types of applications, for example, online education application, instant messaging application, community's sky
Between apply, game application, shopping application, browser application, financial application, multimedia application, live streaming application, medical applications, with
And interactive application of Intelligent hardware etc. (wherein, Intelligent hardware can be, but not limited to include:Smart home device, intelligence wearing are set
Standby, intelligent transportation tool etc.).Specifically, can be, but not limited to be applied in above-mentioned browser application determine question template with
Between predicate in the scene of correspondence, or can with but be not limited to be applied to above-mentioned game application determine question template with meaning
Between word in the scene of correspondence, the efficiency when predicate corresponding to question template is determined to improve.Above-mentioned is only that one kind is shown
, do not do any restriction to this in the present embodiment.
Optionally, in the present embodiment, the determining device of the predicate corresponding to above problem template can be, but not limited to answer
For in the scene of natural language processing.Such as:Knowledge base question and answer (Knowledge Base Question Answering, letter
Referred to as KB-QA), natural language problem (Query) is given, by carrying out semantic understanding and parsing to problem, and then utilizes knowledge
Library is inquired, reasoning obtains answer (Answer).
Such as:As shown in figure 3, there is the knowledge mapping of part Liu, asked now there are one user:The wife of Liu
Whom is.This Query by template generation processing after template be:Whom the wife of [singer] is, if the template reflected
The predicate penetrated is wife, so whom the wife of [singer], which is, corresponds to wife.Knowledge base (knowledge base, referred to as
KB the entity that singer is Liu is found in), predicate is wife, and it is Zhu that can find result, finally returns to result Zhu
So-and-so.
Optionally, in the present embodiment, information triple is typically expressed as in knowledge mapping:Subject (subject), predicate
(predicate), object (object), subject and object are typically all entity, and what predicate indicated is the relationship between two entities
Or the attribute of subject.Wherein, entity refers to the base unit for indicating a concept.Such as:From the point of view of data processing, reality
Objective things in the world can be referred to as entity, it be it is any in real world distinguish, identifiable things.Entity can be with
Refer to people, such as teacher, student, object, such as book, warehouse can also be referred to.It can not only refer to the objective objects that can be touched, can be with
Refer to abstract event, such as performance, football match.
Optionally, in the present embodiment, template can be a kind of general clause with extension sample, and question template is exactly
A kind of general problem clause with extension sample.Such as:For problem 1:Whom the wife of Zhang San is, problem 2:Li Si's is old
Whom mother-in-law is, problem 3:Whom the wife of king five is, problem 4:The wife of Zhao six is for whom, is all to ask although subject is different
It asks that whom whose wife is to so-and-so, the same question template is arrived it is possible to which problem 1 to problem 4 is concluded:[person] wife is
Who.
Optionally, in the present embodiment, the target problem template with correspondence and answer information can be obtained from advance
It is obtained in the question and answer pair taken, such as:The question and answer pair for obtaining 6,000,000 in advance, by 6,000,000 question and answer to the problems in be converted to ask one by one
Inscribe template.Transformed question template is integrated, then one or more may have been corresponded under the same question template
This corresponding answer of one or more problem is determined as the corresponding answer information of the template by problem, to obtain have pair
The target problem template and answer information that should be related to.
Optionally, in the present embodiment, the predicate with correspondence and content information can be, but not limited to from knowledge base
Middle acquisition, with correspondence predicate and content information can be, but not limited to be integrated according to subject, can also but
It is not limited to be integrated according to predicate.
Such as:By taking disease knowledge as an example, the relevant knowledge of 9600 diseases is got as knowledge base, from this 9600 diseases
The predicate of this knowledge is extracted in each of the relevant knowledge of disease, and is believed this knowledge as the corresponding content of the predicate
Breath, a plurality of knowledge may extract identical predicate, be integrated to predicate, and it is one or more corresponding to obtain each predicate
A content information, to obtain the predicate with correspondence and content information.Alternatively, can also be according to subject to relevant knowledge
It is integrated, then extracts predicate under each subject, and establish the correspondence between predicate and content information, will had and correspond to
Subject, predicate and the content information of relationship are determined as above-mentioned predicate and content information with correspondence.
In an optional embodiment, as shown in figure 4, by taking disease areas as an example, 6,000,000 question and answer pair are obtained, from
Target problem template and answer information of the 6000000 question and answer centering extraction with correspondence.Obtain the correlation of 9600 diseases
Knowledge is as knowledge base, predicate and content information of the extraction with correspondence from knowledge base.It is each in information according to answering
It answers the similarity between information and content information and determines each predicate answered corresponding to information, corresponded to counting each predicate
Answer information quantity, the most predicate of the corresponding quantity for answering information in predicate is determined as corresponding to target problem template
Target predicate.
As it can be seen that by above-mentioned apparatus, obtain target problem template with correspondence and answer information and with pair
The predicate and content information that should be related to are established each answer further according to the similarity between each answer information and content information and are believed
The most predicate of the corresponding quantity for answering information is determined as target problem template and corresponded to by the correspondence between breath and predicate
Position, to using vote by the way of, vote automatically predicate according to similarity for each target problem template, and
The correspondence between each target problem template and the highest predicate of poll is established, to be that question template determines that its is right automatically
The predicate answered to realize the technique effect for improving efficiency when determining the predicate corresponding to question template, and then solves
Efficiency lower technical problem when determining the predicate corresponding to question template in the related technology.
As a kind of optional scheme, the first acquisition module includes:
First converting unit, for each problem of question and answer centering to be converted to question template, wherein question and answer to for
The problem of correspondence and answer;
First acquisition unit obtains target problem template for obtaining mutually different question template from question template;
First determination unit, for answer corresponding the problem of belonging to target problem template to be determined as target problem mould
The corresponding answer information of plate obtains the target problem template with correspondence and answers information.
Optionally, in the present embodiment, during problem is converted into question template, it is possible that multiple problems
The case where being converted to the same question template, such as:How scapulohumeral periarthritis treats, which the therapeutic modality of cervical spondylosis has, how
The problems such as treatment varicella etc., can be converted to the same question template:How [sickname] treats.That is, for M
A problem can be converted to Q mutually different question templates, and wherein Q is less than or equal to M, different by this Q
The problem of template be determined as target problem template.
Optionally, in the present embodiment, the corresponding answer of all the problem of being converted into same problem template is determined as
The corresponding answer information of the problem.Such as:Problem:How scapulohumeral periarthritis treats, which the therapeutic modality of cervical spondylosis has, how to treat
Varicella is converted to target problem template:How [sickname] treats.Problem:How scapulohumeral periarthritis prevent, the prevention side of cervical spondylosis
Which formula, which has, how to prevent varicella is converted to target problem template:How [sickname] prevents.So can by scapulohumeral periarthritis why
Treat corresponding answer 1, which corresponding answer 2 therapeutic modality of cervical spondylosis has, how treating varicella, corresponding answer 3 is true
It is set to target problem template:How [sickname] treats corresponding answer information, and how scapulohumeral periarthritis is prevented corresponding answer
4, which corresponding answer 5 precautionary approach of cervical spondylosis has, how to prevent the corresponding answer of varicella 6 and be determined as target problem mould
Plate:How [sickname] prevents corresponding answer information.Obtain the target problem template with correspondence:[sickname]
How to treat and answer information:Answer 1, answer 2, answer 3, and the target problem template with correspondence:
How [sickname] prevents and answers information:Answer 4, answer 5, answer 6.
As a kind of optional scheme, first acquisition unit includes:
First obtains subelement, for obtaining mutually different question template from question template;
Second obtains subelement, belongs to binary fact type for obtaining question template type in mutually different question template
The problem of problem template;
Determination subelement is used for the most number of targets of corresponding problematic amount in template the problem of binary fact type problem
The problem of amount, template was determined as target problem template.
Optionally, in the present embodiment, binary fact type problem (Binary Factoid Question, referred to as
BFQ), the problem of generally referring to the attribute of inquiry entity in a certain respect.
Optionally, in the present embodiment, frequency highest can be selected from magnanimity target problem template and belongs to BFQ problems
200 templates.
As a kind of optional scheme, the first acquisition module includes:
Second acquisition unit, the knowledge data for obtaining target domain;
Unit is established, the knowledge mapping for establishing target domain according to knowledge data;
Third acquiring unit, for obtaining subject, predicate with correspondence from the information triple of knowledge mapping
And object;
Second determination unit, predicate for the predicate with correspondence and object to be determined as having correspondence and
Content information, alternatively, by with correspondence under subject predicate and object to be determined as subject corresponding with correspondence
Predicate and content information.
Optionally, in the present embodiment, knowledge mapping is also known as mapping knowledge domains, is known as knowledge domain in books and information group
Visualization or ken map map, are explicit knowledge's development process and a series of a variety of different figures of structural relation,
With visualization technique Description of Knowledge resource and its carrier, excavation, analysis, structure, drafting and explicit knowledge and the phase between them
Mutually contact.
Such as:9600 relevant knowledge data for obtaining disease areas, the content of 9600 initial data is also closed
Keyword extracts.Such as:The predicate of scapulohumeral periarthritis has:Treatment, common sympton, complication etc., wherein the pass of " treatment " this predicate
Keyword extracts result:Analgesic, adhesion, drug, operation, Chinese medicine;The keyword extraction result of " common sympton " this predicate is:
Chronic, pain, diffusion, shoulder mobility is limited, shoulder ache, and head movement is limited, shoulder pain.
Optionally, in the present embodiment, the predicate with correspondence and content information can be, but not limited to be according to master
What language was classified, i.e., every knowledge data extracts subject, predicate and content information, by each knowledge data according to subject into
Row classification, the knowledge data of identical subject are integrated together, and each subject has corresponded to predicate, and each predicate has corresponded to content letter again
Breath.Alternatively, what predicate and content information with correspondence can also but be not limited to not distinguish according to subject, also
It is to say, every knowledge data extracts a predicate and content information with correspondence.
Optionally, in the present embodiment, the second determining module is used for:It is determined in the predicate and object that will have correspondence
In the case of predicate and content information with correspondence, determine that each answer information is corresponding with each first predicate interior
Hold the first similarity of information, wherein the first predicate is the predicate in predicate and content information with correspondence;It will correspond to
Highest first predicate of the first similarity be determined as it is each answer information corresponding to predicate.
Optionally, in the present embodiment, the second determining module is used for:By with correspondence under subject predicate and
In the case that object is determined as subject corresponding predicate and content information with correspondence, the with correspondence is obtained
Two predicates and content information, wherein the second predicate identical subject corresponding with each answer information;Determine it is each answer information with
Second similarity of the corresponding content information of each second predicate;Highest second predicate of corresponding second similarity is determined as
Each predicate answered corresponding to information.
As a kind of optional scheme, the second determining module includes:
First extraction unit obtains that there is each of correspondence to return for extracting keyword from each answer information
Answer information and the first keyword set;
Second extraction unit obtains having corresponding close for extracting keyword from the corresponding content information of each predicate
The content information of system and the second keyword set;
4th acquiring unit is believed for obtaining each corresponding first keyword set of information of answering respectively with each content
Cease the similarity between corresponding second keyword set, and by the phase between the first keyword set and the second keyword set
It is determined as the similarity between each answer information and content information like degree;
Third determination unit, for the highest object content information of similarity between each answer information is corresponding
Predicate is determined as the predicate corresponding to each answer information.
Optionally, in the present embodiment, determine each similarity for answering information and content information mode can with but not
It is limited to include the similarity determined between each keyword and the keyword of content information for answering information.
Optionally, in the present embodiment, determine that the mode of the similarity between keyword and keyword can be, but not limited to
Including:Obtain the outstanding card similarity between keyword and keyword.For two set x and y, outstanding card similarity calculation
Formula isI.e. outstanding card similarity J is two intersection of sets divided by two unions of sets.
It should be noted that other similarity calculating methods can also be used when above-mentioned calculating similarity, such as
The computational methods based on term vector may be used.
As a kind of optional scheme, above-mentioned apparatus further includes:
Second acquisition module is inputted for being obtained user using the target problem template and target predicate with correspondence
First problem corresponding to first answer;
Module being returned, user is returned to as the response message of first problem for answering first.
Optionally, in the present embodiment, the target problem template and target with correspondence got can be utilized
Predicate carries out further natural language processing, such as:Obtain the answer etc. that user is asked a question.
As a kind of optional scheme, the second acquisition module includes:
5th acquiring unit for obtaining first problem input by user, and extracts the first subject from first problem;
Second converting unit, for first problem to be converted to first problem template;
6th acquiring unit, for from correspondence target problem template and target predicate in obtain first problem
Corresponding first predicate of template;
7th acquiring unit, for obtaining the corresponding knowledge graph of the first subject from the knowledge base of first problem fields
Spectrum;
8th acquiring unit, for obtaining the corresponding answer letter of the first predicate from the corresponding knowledge mapping of the first subject
Breath, and the corresponding answer information of the first predicate is determined as the first answer.
Optionally, in the present embodiment, it gets after target problem template with correspondence and target predicate just
Quick predicate can be carried out to problem input by user to predict, first problem input by user is converted into first problem mould
Plate, then from correspondence target problem template and target predicate in predict the first problem template it is corresponding first meaning
The corresponding answer information of first predicate is obtained as first time in word, then knowledge mapping corresponding to the subject of first problem
It answers and returns to user.
The application environment of the embodiment of the present invention can be, but not limited to reference to the application environment in above-described embodiment, the present embodiment
In this is repeated no more.An embodiment of the present invention provides the optional tools of one kind of the connection method for implementing above-mentioned real-time Communication for Power
Body application example.
As a kind of optional embodiment, the determination method of the predicate corresponding to above problem template can be, but not limited to answer
In scene for determining the corresponding answer of the problem of receiving in natural language processing as shown in FIG. 6.In this scene, carry
The template for having gone out a kind of knowledge based question and answer library is intended to method for digging, finds the mapping relations between template and knowledge base predicate,
The true intention (prediction predicate) for understanding user, then finds answer according to predicate in the database.This method generates each
Then the corresponding template of problem is intended to method for digging using the template of knowledge based collection of illustrative plates to template and carries out between template and predicate
Mapping, the algorithm of keyword extraction, outstanding card similarity calculation and ballot, final choice poll are used in mapping method
Predicate of the highest predicate as the template can finally integrate the mapping relations between all templates and predicate.
Optionally, in the present embodiment, the existing knowledge for using knowledge based collection of illustrative plates, in conjunction with the related field of excavation
Query and answer carry out the prediction of predicate using the method for ballot, finally obtain and vote between most template and predicate
A kind of mapping relations, the supplement as existing knowledge base.Arbitrarily carry out a query after handling in this way, it can be by finding it
Mapping relations of the template in knowledge base find its corresponding predicate, finally find answer in the database.Obvious this method
More intelligence copes with the magnanimity way to put questions of user with effectively in the case of data volume abundance.
Optionally, in this scene, it is proposed that a kind of knowledge based collection of illustrative plates comes the mapping method of prediction module intention, user
Query to directly generate template, and the method for being then based on knowledge mapping passes through the mapping process of template to predicate, so that it may to look for
To the corresponding predicate of the template, knot of the predicate result of corresponding entity as the query is finally found in knowledge mapping again
Fruit.
Optionally, in this scene, the template that the above method can be applied to the every field of dobby intelligence assistants is dug
Pick.When creating some field, a large amount of language materials in the field and a large amount of related entities in the field may be collected,
But the way to put questions of user is ever-changing, limited sentence can not possibly include all ways to put questions.Therefore, template is for field
Effect seems particularly significant, and good template can include the ever-changing way to put questions in the field, therefore pass through language material and relevant entity
It is suitble to the template in the field to seem particularly significant to excavate.For already existing field, if it find that some ways to put questions can't
It supports, template can also be excavated by these ways to put questions and related entities, promote the recall rate and semantic understanding ability in the field.
Therefore, the mining ability of template all seems particularly significant for having field and new field.
This method mainly applies to the answer at the chat end of product and relevant knowledge question, to necks such as health, diseases
Domain is extremely important, in addition, being also very important for the knowledge question of general field.After the query in any field has come
Corresponding template can be generated, then the predicate of corresponding templates is found by trained mapping relations, passes through correspondence
Entity and predicate can easily find answer, return to user.
In order to illustrate being how to carry out template Intention Anticipation using knowledge mapping in this scene, illustrate herein
It is bright, in the present embodiment, excavates the 6000000 and relevant qa of disease and the relevant knowledge of (question and answer to) and 9600 diseases has been made
For KB, it is therefore an objective to obtain the mapping relations between the template of disease areas and corresponding predicate.As shown in fig. 6, whole process packet
Include following steps:
Step 1, template is excavated:The template for first having to carry out 6,000,000 query is excavated, and (entity therein is exactly 9600 diseases
Disease), that is, complete the conversion from query to template.(for example obtain:How [sick_name], [sick_name] control
The template for the treatment of ... ..., etc..)
Step 2, the BFQ templates of top200 are found out:The problem of that knowledge question is supported is BFQ, therefore can be from magnanimity mould
Frequency highest is selected in plate and belongs to 200 templates of BFQ problems.(such as selection:How [sick_name] treats,
Which the symptom of [sick_name] has ... ...)
Step 3, all answer of each template are recalled and extract answer keyword:Find all of each template
Answer, so as to the basis as ballot.And interminable answer is subjected to keyword extraction.(such as:" how is [sick_name]
The answer of this query for the treatment of " has many hundreds, is respectively:1. scapulohumeral periarthritis obtained after should western medical treatment scapulohumeral periarthritis it is general
Using drug therapy with operative treatment, drug therapy is mainly the drug for allowing patient to take orally anti-inflammatory analgetic class, but most of trouble
Person can recur after being discontinued, and be treated with operation method, adhesion be easily caused, so general treatment scapulohumeral periarthritis
All compare and recommends Chinese traditional treatment method.2…….Then to each answer carry out keyword extraction, such as first answer
Keyword extraction result is as follows:Scapulohumeral periarthritis, drug are performed the operation, and are taken orally, and are relieved pain, recurrence, adhesion, Chinese medicine).Keyword herein carries
It takes and Textrank4 algorithms may be used, extract 50 keywords in every section of words.
Step 4,9600 initial data carry out predicate and keyword extraction, as KB:In order to facilitate processing, by 9600
The content of initial data also carries out keyword extraction.(such as:The predicate of scapulohumeral periarthritis has:Treatment, common sympton, complication ...
The keyword extraction result for wherein " treating " this predicate is:Analgesic, adhesion, drug, operation, Chinese medicine;" common sympton " this
The keyword extraction result of predicate is:Chronic, pain, diffusion, shoulder mobility is limited, shoulder ache, and head movement is limited, shoulder
Bitterly).
Step 5, template is intended to ballot:Each of template, which is answered, can only vote to some intention, finally for a certain
Highest intention of winning the vote for a template is exactly its prediction intention or true intention, such as:How [sick_name] treats
{ predicate " treatment ":30, predicate " Diet ":20, predicate " CommonCause ":10 ... }, then for this template
For how [sick_name] treats, final voting results are exactly " treatment ", that is to say, that this template is asked just
It is treatment-related information.Each template has hundreds of thousands of to answer, each answer needs to carry out each intention of KB
Outstanding card similarity calculation, and voted according to result of calculation and give similarity highest predicate, it is counted after final all answer ballots
The highest predicate of ticket is intended to result as the prediction of template.(such as:First template for example, perform the operation by scapulohumeral periarthritis, drug,
It is oral, relieve pain, recurrence, adhesion, Chinese medicine these keywords need and KB in corresponding entity " scapulohumeral periarthritis " be possible to call
The outstanding card similarity of keyword progress of word is calculated, and (for two set x and y, outstanding card calculating formula of similarity isThat is two intersection of sets divided by two unions of sets), select highest scoring, such as first answer and predicate
The highest scoring of " treatment " is answered for final hundreds of thousands of and is voted respectively, " treatment ":500 tickets, " common sympton ":100 tickets, " simultaneously
Send out disease ":The final prediction that 50 tickets ... at this moment can select first template is intended to result and is:" treatment ").
Another aspect according to the ... of the embodiment of the present invention additionally provides a kind of for implementing corresponding to above problem template
The electronic device of the determination of predicate, as shown in fig. 7, the electronic device includes:One or more (one is only shown in figure) processing
Device 702, memory 704, sensor 706, encoder 708 and transmitting device 710 are stored with computer journey in the memory
Sequence, the processor are arranged to execute the step in any of the above-described embodiment of the method by computer program.
Optionally, in the present embodiment, above-mentioned electronic device can be located in multiple network equipments of computer network
At least one network equipment.
Optionally, in the present embodiment, above-mentioned processor can be set to execute following steps by computer program:
S1 obtains the target problem template with correspondence and answers information, and obtains the meaning with correspondence
Word and content information;
S2 determines each answer information institute according to the similarity each answered in answer information between information and content information
Corresponding predicate;
The most predicate of the corresponding quantity for answering information in predicate is determined as the target corresponding to target problem template by S3
Predicate.
Optionally, it will appreciated by the skilled person that structure shown in Fig. 7 is only to illustrate, electronic device also may be used
To be smart mobile phone (such as Android phone, iOS mobile phones), tablet computer, palm PC and mobile internet device
The terminal devices such as (Mobile Internet Devices, MID), PAD.Fig. 7 it does not cause the structure of above-mentioned electronic device
It limits.For example, electronic device may also include more than shown in Fig. 7 or less component (such as network interface, display device
Deng), or with the configuration different from shown in Fig. 7.
Wherein, memory 702 can be used for storing software program and module, such as the problems in embodiment of the present invention template institute
Corresponding program instruction/the module of determination method and apparatus of corresponding predicate, processor 704 are stored in memory by operation
Software program in 702 and module realize above-mentioned target element to perform various functions application and data processing
Control method.Memory 702 may include high speed random access memory, can also include nonvolatile memory, such as one or
Multiple magnetic storage devices, flash memory or other non-volatile solid state memories.In some instances, memory 702 can be into one
Step includes the memory remotely located relative to processor 704, these remote memories can pass through network connection to terminal.On
The example for stating network includes but not limited to internet, intranet, LAN, mobile radio communication and combinations thereof.
Above-mentioned transmitting device 710 is used to receive via a network or transmission data.Above-mentioned network specific example
It may include cable network and wireless network.In an example, transmitting device 710 includes a network adapter (Network
Interface Controller, NIC), can be connected with other network equipments with router by cable so as to interconnection
Net or LAN are communicated.In an example, transmitting device 710 is radio frequency (Radio Frequency, RF) module,
For wirelessly being communicated with internet.
Wherein, specifically, memory 702 is for storing application program.
The embodiments of the present invention also provide a kind of storage medium, computer program is stored in the storage medium, wherein
The computer program is arranged to execute the step in any of the above-described embodiment of the method when operation.
Optionally, in the present embodiment, above-mentioned storage medium can be set to store by executing based on following steps
Calculation machine program:
S1 obtains the target problem template with correspondence and answers information, and obtains the meaning with correspondence
Word and content information;
S2 determines each answer information institute according to the similarity each answered in answer information between information and content information
Corresponding predicate;
The most predicate of the corresponding quantity for answering information in predicate is determined as the target corresponding to target problem template by S3
Predicate.
Optionally, storage medium is also configured to store for executing step included in the method in above-described embodiment
Computer program, this is repeated no more in the present embodiment.
Optionally, in the present embodiment, one of ordinary skill in the art will appreciate that in the various methods of above-described embodiment
All or part of step be that can be completed come command terminal device-dependent hardware by program, which can be stored in
In one computer readable storage medium, storage medium may include:Flash disk, read-only memory (Read-Only Memory,
ROM), random access device (Random Access Memory, RAM), disk or CD etc..
The embodiments of the present invention are for illustration only, can not represent the quality of embodiment.
If the integrated unit in above-described embodiment is realized in the form of SFU software functional unit and as independent product
Sale in use, can be stored in the storage medium that above computer can be read.Based on this understanding, skill of the invention
Substantially all or part of the part that contributes to existing technology or the technical solution can be with soft in other words for art scheme
The form of part product embodies, which is stored in a storage medium, including some instructions are used so that one
Platform or multiple stage computers equipment (can be personal computer, server or network equipment etc.) execute each embodiment institute of the present invention
State all or part of step of method.
In the above embodiment of the present invention, all emphasizes particularly on different fields to the description of each embodiment, do not have in some embodiment
The part of detailed description may refer to the associated description of other embodiment.
In several embodiments provided herein, it should be understood that disclosed client, it can be by others side
Formula is realized.Wherein, the apparatus embodiments described above are merely exemplary, for example, the unit division, only one
Kind of division of logic function, formula that in actual implementation, there may be another division manner, such as multiple units or component can combine or
It is desirably integrated into another system, or some features can be ignored or not executed.Another point, it is shown or discussed it is mutual it
Between coupling, direct-coupling or communication connection can be INDIRECT COUPLING or communication link by some interfaces, unit or module
It connects, can be electrical or other forms.
The unit illustrated as separating component may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, you can be located at a place, or may be distributed over multiple
In network element.Some or all of unit therein can be selected according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
The above is only a preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art
For member, various improvements and modifications may be made without departing from the principle of the present invention, these improvements and modifications are also answered
It is considered as protection scope of the present invention.
Claims (15)
1. a kind of determination method of the predicate corresponding to question template, which is characterized in that including:
It obtains the target problem template with correspondence and answers information, and obtain predicate and content with correspondence
Information;
Each answer is determined according to the similarity between information and the content information is each answered in the answer information
Predicate corresponding to information;
The most predicate of the corresponding quantity for answering information in the predicate is determined as the mesh corresponding to the target problem template
Mark predicate.
2. according to the method described in claim 1, it is characterized in that, obtaining the target problem template with correspondence and answer
Information includes:
Each problem of question and answer centering is converted into question template, wherein the problem of question and answer are to for correspondence and
It answers;
Mutually different question template is obtained from described problem template, obtains the target problem template;
It is corresponding described that answer corresponding the problem of belonging to the target problem template is determined as the target problem template
Information is answered, the target problem template with correspondence and the answer information are obtained.
3. according to the method described in claim 2, it is characterized in that, obtaining different problem mould from described problem template
Plate, obtaining the target problem template includes:
The mutually different question template is obtained from described problem template;
Obtain template the problem of question template type in the mutually different question template belongs to binary fact type problem;
Template the problem of the most destination number of corresponding problematic amount in template the problem of the binary fact type problem is true
It is set to the target problem template.
4. according to the method described in claim 1, it is characterized in that, obtaining the predicate and content information packet with correspondence
It includes:
Obtain the knowledge data of target domain;
The knowledge mapping of the target domain is established according to the knowledge data;
Subject, predicate and object with correspondence are obtained from the information triple of the knowledge mapping;
By with correspondence predicate and object be determined as the predicate and content information with correspondence, alternatively, general
Predicate with correspondence and object under the subject are determined as the corresponding meaning with correspondence of the subject
Word and content information.
5. according to the method described in claim 4, it is characterized in that, according to information and described is each answered in the answer information
Similarity between content information determines that each predicate answered corresponding to information includes:
The case where the predicate with correspondence and object are determined as the predicate and content information with correspondence
Under, determine each first similarity for answering information content information corresponding with each first predicate, wherein described first
Predicate is the predicate in the predicate and content information with correspondence;
Corresponding highest first predicate of first similarity is determined as each meaning answered corresponding to information
Word.
6. according to the method described in claim 4, it is characterized in that, according to information and described is each answered in the answer information
Similarity between content information determines that each predicate answered corresponding to information includes:
By with correspondence under the subject predicate and object be determined as that the subject is corresponding described to have correspondence
In the case of the predicate and content information of relationship, the second predicate and content information with correspondence are obtained, wherein described the
Two predicates identical subject corresponding with each answer information;
Determine each second similarity for answering information content information corresponding with each second predicate;
Corresponding highest second predicate of second similarity is determined as each meaning answered corresponding to information
Word.
7. according to the method described in claim 1, it is characterized in that, according to information and described is each answered in the answer information
Similarity between content information determines that each predicate answered corresponding to information includes:
Keyword is extracted from each answer information, each answer information with correspondence and first is obtained and closes
Keyword set;
Extract keyword from the corresponding content information of each predicate, obtain having correspondence the content information and
Second keyword set;
Corresponding first keyword set of each answer information and each content information corresponding second are obtained respectively
Similarity between keyword set, and by the similarity between first keyword set and second keyword set
It is determined as each similarity answered between information and the content information;
It will be determined as each corresponding predicate of the highest object content information of similarity answered between information described every
Predicate corresponding to a answer information.
8. method according to any one of claim 1 to 6, which is characterized in that answering letter by corresponding in the predicate
The predicate that the quantity of breath is most is determined as after the target predicate corresponding to the target problem template, and the method further includes:
Using with correspondence the target problem template and the target predicate obtain first problem institute input by user
Corresponding first answers;
Described first is answered and returns to the user as the response message of the first problem.
9. according to the method described in claim 8, it is characterized in that, using with correspondence the target problem template and
The target predicate obtains the first answer corresponding to first problem input by user:
First problem input by user is obtained, and extracts the first subject from the first problem;
The first problem is converted into first problem template;
From with correspondence the target problem template and the target predicate in obtain the first problem template and correspond to
The first predicate;
The corresponding knowledge mapping of first subject is obtained from the knowledge base of the first problem fields;
Obtain the corresponding answer information of first predicate from the corresponding knowledge mapping of first subject, and by described first
The corresponding answer information of predicate is determined as described first and answers.
10. a kind of determining device of the predicate corresponding to question template, which is characterized in that including:
First acquisition module, for obtains with correspondence target problem template and answer information, and obtain with pair
The predicate and content information that should be related to;
First determining module, for according to the similarity each answered in the answer information between information and the content information
Determine each predicate answered corresponding to information;
Second determining module is asked for the most predicate of the corresponding quantity for answering information in the predicate to be determined as the target
Inscribe the target predicate corresponding to template.
11. device according to claim 10, which is characterized in that first acquisition module includes:
First converting unit, for each problem of question and answer centering to be converted to question template, wherein the question and answer to for
The problem of correspondence and answer;
First acquisition unit obtains the target problem for obtaining mutually different question template from described problem template
Template;
First determination unit is asked for answer corresponding the problem of belonging to the target problem template to be determined as the target
The corresponding answer information of template is inscribed, the target problem template with correspondence and the answer information are obtained.
12. device according to claim 10, which is characterized in that first acquisition module includes:
Second acquisition unit, the knowledge data for obtaining target domain;
Unit is established, the knowledge mapping for establishing the target domain according to the knowledge data;
Third acquiring unit, for obtaining subject, predicate with correspondence from the information triple of the knowledge mapping
And object;
Second determination unit, for by the predicate with correspondence and object be determined as the predicate with correspondence and
Content information, alternatively, by with correspondence under the subject predicate and object to be determined as the subject corresponding described
Predicate with correspondence and content information.
13. device according to claim 10, which is characterized in that second determining module includes:
First extraction unit obtains having the described every of correspondence for extracting keyword from each answer information
A answer information and the first keyword set;
Second extraction unit obtains having corresponding close for extracting keyword from the corresponding content information of each predicate
The content information and the second keyword set of system;
4th acquiring unit, for obtain respectively corresponding first keyword set of each answer information with it is each it is described in
Hold the similarity between corresponding second keyword set of information, and by first keyword set and second keyword
Similarity between set is determined as each similarity answered between information and the content information;
Third determination unit, being used for will be corresponding with each highest object content information of similarity answered between information
Predicate is determined as each predicate answered corresponding to information.
14. a kind of storage medium, which is characterized in that be stored with computer program in the storage medium, wherein the computer
Program is arranged to execute the method described in any one of claim 1 to 9 when operation.
15. a kind of electronic device, including memory and processor, which is characterized in that be stored with computer journey in the memory
Sequence, the processor are arranged to execute the side described in any one of claim 1 to 9 by the computer program
Method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810468186.1A CN108717441B (en) | 2018-05-16 | 2018-05-16 | Method and device for determining predicates corresponding to problem templates |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810468186.1A CN108717441B (en) | 2018-05-16 | 2018-05-16 | Method and device for determining predicates corresponding to problem templates |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108717441A true CN108717441A (en) | 2018-10-30 |
CN108717441B CN108717441B (en) | 2023-01-17 |
Family
ID=63900077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810468186.1A Active CN108717441B (en) | 2018-05-16 | 2018-05-16 | Method and device for determining predicates corresponding to problem templates |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108717441B (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110110096A (en) * | 2019-05-13 | 2019-08-09 | 上海乂学教育科技有限公司 | Artificial intelligence K12 knowledge mapping makes management system and implementation method |
CN110309321A (en) * | 2019-07-10 | 2019-10-08 | 电子科技大学 | A kind of representation of knowledge learning method indicating study based on map |
CN110597957A (en) * | 2019-09-11 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Text information retrieval method and related device |
CN110807325A (en) * | 2019-10-18 | 2020-02-18 | 腾讯科技(深圳)有限公司 | Predicate identification method and device and storage medium |
CN110991183A (en) * | 2019-12-06 | 2020-04-10 | 北京百度网讯科技有限公司 | Method, device, equipment and storage medium for determining predicate of problem |
CN111538844A (en) * | 2020-03-20 | 2020-08-14 | 华为技术有限公司 | Target field knowledge base generation and problem solution method and device |
WO2020168702A1 (en) * | 2019-02-21 | 2020-08-27 | 扬州大学 | Template-based automatic software defect question and answer method |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1794233A (en) * | 2005-12-28 | 2006-06-28 | 刘文印 | Network user interactive asking answering method and its system |
US20070118519A1 (en) * | 2005-11-21 | 2007-05-24 | Fuji Xerox Co., Ltd. | Question answering system, data search method, and computer program |
US20160147737A1 (en) * | 2014-11-20 | 2016-05-26 | Electronics And Telecommunications Research Institute | Question answering system and method for structured knowledgebase using deep natual language question analysis |
CN106934012A (en) * | 2017-03-10 | 2017-07-07 | 上海数眼科技发展有限公司 | A kind of question answering in natural language method and system of knowledge based collection of illustrative plates |
CN106997399A (en) * | 2017-05-24 | 2017-08-01 | 海南大学 | A kind of classification question answering system design method that framework is associated based on data collection of illustrative plates, Information Atlas, knowledge mapping and wisdom collection of illustrative plates |
CN107729468A (en) * | 2017-10-12 | 2018-02-23 | 华中科技大学 | Answer extracting method and system based on deep learning |
-
2018
- 2018-05-16 CN CN201810468186.1A patent/CN108717441B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070118519A1 (en) * | 2005-11-21 | 2007-05-24 | Fuji Xerox Co., Ltd. | Question answering system, data search method, and computer program |
CN1794233A (en) * | 2005-12-28 | 2006-06-28 | 刘文印 | Network user interactive asking answering method and its system |
US20160147737A1 (en) * | 2014-11-20 | 2016-05-26 | Electronics And Telecommunications Research Institute | Question answering system and method for structured knowledgebase using deep natual language question analysis |
CN106934012A (en) * | 2017-03-10 | 2017-07-07 | 上海数眼科技发展有限公司 | A kind of question answering in natural language method and system of knowledge based collection of illustrative plates |
CN106997399A (en) * | 2017-05-24 | 2017-08-01 | 海南大学 | A kind of classification question answering system design method that framework is associated based on data collection of illustrative plates, Information Atlas, knowledge mapping and wisdom collection of illustrative plates |
CN107729468A (en) * | 2017-10-12 | 2018-02-23 | 华中科技大学 | Answer extracting method and system based on deep learning |
Non-Patent Citations (1)
Title |
---|
冯小萍等: "基于谓词逻辑的答疑系统", 《现代工业经济和信息化》 * |
Cited By (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11487795B2 (en) | 2019-02-21 | 2022-11-01 | Yangzhou University | Template-based automatic software bug question and answer method |
WO2020168702A1 (en) * | 2019-02-21 | 2020-08-27 | 扬州大学 | Template-based automatic software defect question and answer method |
CN110110096B (en) * | 2019-05-13 | 2021-07-09 | 上海松鼠课堂人工智能科技有限公司 | Artificial intelligence K12 knowledge graph making management system and implementation method |
CN110110096A (en) * | 2019-05-13 | 2019-08-09 | 上海乂学教育科技有限公司 | Artificial intelligence K12 knowledge mapping makes management system and implementation method |
CN110309321A (en) * | 2019-07-10 | 2019-10-08 | 电子科技大学 | A kind of representation of knowledge learning method indicating study based on map |
CN110309321B (en) * | 2019-07-10 | 2021-05-18 | 电子科技大学 | Knowledge representation learning method based on graph representation learning |
CN110597957A (en) * | 2019-09-11 | 2019-12-20 | 腾讯科技(深圳)有限公司 | Text information retrieval method and related device |
CN110597957B (en) * | 2019-09-11 | 2022-04-22 | 腾讯科技(深圳)有限公司 | Text information retrieval method and related device |
CN110807325A (en) * | 2019-10-18 | 2020-02-18 | 腾讯科技(深圳)有限公司 | Predicate identification method and device and storage medium |
CN110807325B (en) * | 2019-10-18 | 2023-05-26 | 腾讯科技(深圳)有限公司 | Predicate identification method, predicate identification device and storage medium |
CN110991183A (en) * | 2019-12-06 | 2020-04-10 | 北京百度网讯科技有限公司 | Method, device, equipment and storage medium for determining predicate of problem |
CN111538844B (en) * | 2020-03-20 | 2022-03-25 | 华为技术有限公司 | Target field knowledge base generation and problem solution method and device |
CN111538844A (en) * | 2020-03-20 | 2020-08-14 | 华为技术有限公司 | Target field knowledge base generation and problem solution method and device |
Also Published As
Publication number | Publication date |
---|---|
CN108717441B (en) | 2023-01-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108717441A (en) | The determination method and device of predicate corresponding to question template | |
CN108595494B (en) | Method and device for acquiring reply information | |
Al_Janabi | Smart system to create an optimal higher education environment using IDA and IOTs | |
CN111538894B (en) | Query feedback method and device, computer equipment and storage medium | |
CN110209897B (en) | Intelligent dialogue method, device, storage medium and equipment | |
Bhattacharya et al. | Why does a visual question have different answers? | |
CN108491486B (en) | Method, device, terminal equipment and storage medium for simulating patient inquiry dialogue | |
CN110489755A (en) | Document creation method and device | |
CN110532360A (en) | Medical field knowledge mapping question and answer processing method, device, equipment and storage medium | |
CN110032647A (en) | Method, apparatus and storage medium based on industrial circle building knowledge mapping | |
CN104050243B (en) | It is a kind of to search for the network search method combined with social activity and its system | |
CN109345417A (en) | The on-line examination method and terminal device of the business personnel of identity-based certification | |
CN115544241B (en) | Intelligent pushing method and device for online operation | |
CN108920530A (en) | A kind of information processing method, device, storage medium and electronic equipment | |
Hong et al. | Selective residual learning for visual question answering | |
CN114416929A (en) | Sample generation method, device, equipment and storage medium of entity recall model | |
CN107256224A (en) | A kind of generation method of the key element structure of knowledge, searching method, apparatus and system | |
JP2019185388A (en) | Question-and-answer system using artificial intelligence, and method for constructing q&a database used in the same system | |
Martín et al. | Improving learning tasks for mentally handicapped people using AmI environments based on cyber-physical systems | |
Tannert et al. | FlowchartQA: the first large-scale benchmark for reasoning over flowcharts | |
CN112035567B (en) | Data processing method, device and computer readable storage medium | |
Du et al. | Elba: Exceptional learning behavior analysis | |
Schulte et al. | Industrial Data Science-Interdisciplinary Competence for Machine Learning in Industrial Production | |
CN114625986A (en) | Method, device and equipment for sorting search results and storage medium | |
CN113407696A (en) | Collection table processing method, device, equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |