CN109902147A - Method, apparatus, equipment and storage medium for query processing - Google Patents
Method, apparatus, equipment and storage medium for query processing Download PDFInfo
- Publication number
- CN109902147A CN109902147A CN201910116218.6A CN201910116218A CN109902147A CN 109902147 A CN109902147 A CN 109902147A CN 201910116218 A CN201910116218 A CN 201910116218A CN 109902147 A CN109902147 A CN 109902147A
- Authority
- CN
- China
- Prior art keywords
- attribute
- entity
- inquiry
- group
- pair
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This disclosure relates to inquiry processing method, device, equipment and storage medium.According to an example implementations, a kind of inquiry processing method is provided.In the method, in response to the inquiry received, a group object and one group of attribute are extracted from the text of inquiry.Based on a group object and one group of attribute, at least one entity attribute pair of the information for describe to inquire is generated, an entity attribute of at least one entity attribute centering is to including an entity in a group object and an attribute in one group of attribute.For at least one entity attribute centering corresponding entity attribute to assessing.Assessment based at least one entity attribute pair as a result, from least one entity attribute centering select an entity attribute to for describe inquire information.Using above-mentioned implementation, the information of inquiry can be determined in a manner of more accurate and is efficient in the case where being not necessarily to manual intervention.
Description
Technical field
The implementation of present disclosure broadly relates to processing inquiry, and more particularly, to for determining inquiry
Information method, apparatus, equipment and computer storage medium.
Background technique
Diversified search engine has been had already appeared at present.User can into search engine input inquiry to obtain
Query result.However, user may use diversified language in search since the language expression of users is accustomed to difference
Speech statement, for example, may include various oral expressions or duplicate contents in inquiry.This causes search engine indigestion to be used
The information of inquiry is wished at family, and then accurately cannot return to query result to user.Therefore, it is desired to be able to provide one kind with more
Convenient and effective mode determines the technical solution of the information of inquiry.
Summary of the invention
According to the sample implementation of present disclosure, provide a kind of for query processing scheme.
In the first aspect of present disclosure, provide a kind of for inquiry processing method.In the method, in response to
A group object and one group of attribute are extracted in the inquiry received from the text of inquiry.Based on a group object and one group of attribute, generate
For describing at least one entity attribute pair of the information of inquiry, an entity attribute of at least one entity attribute centering is to packet
Include an entity in a group object and an attribute in one group of attribute.For at least one entity attribute pair
In corresponding entity attribute to assessing.Assessment based at least one entity attribute pair as a result, from least one entity
Attribute centering selects an entity attribute to the information for describing inquiry.
In in the second aspect of the present disclosure, a kind of query processing device is provided.The device includes: extraction module,
It is configured to the inquiry in response to receiving, a group object and one group of attribute are extracted from the text of inquiry;Generation module, configuration
For be based on a group object and one group of attribute, generate for describe inquire information at least one entity attribute pair, at least one
One entity attribute of a entity attribute centering is to including an entity in a group object and in one group of attribute
An attribute;Evaluation module is configured to corresponding entity attribute at least one entity attribute centering to assessing;
And selecting module, be configured to the assessment based at least one entity attribute pair as a result, from least one entity attribute pair
One entity attribute of middle selection is to the information for describing inquiry.
In the third aspect of present disclosure, a kind of equipment is provided.The equipment includes one or more processors;With
And storage device, for storing one or more programs, when one or more programs are executed by one or more processors, so that
The method that one or more processors realize the first aspect according to present disclosure.
In the fourth aspect of present disclosure, a kind of computer-readable Jie for being stored thereon with computer program is provided
Matter, the method which realizes the first aspect according to present disclosure when being executed by processor.
It should be appreciated that content described in Summary is not intended to limit the implementation of present disclosure
Crucial or important feature, it is also non-for limiting the scope of the disclosure.Other features of present disclosure will be by below
Description is easy to understand.
Detailed description of the invention
It refers to the following detailed description in conjunction with the accompanying drawings, it is the above and other feature of each implementation of present disclosure, excellent
Point and aspect will be apparent.In the accompanying drawings, the same or similar appended drawing reference indicates the same or similar element,
In:
Fig. 1 diagrammatically illustrates the diagram of the inquiry of user's input;
Fig. 2 diagrammatically illustrates the frame of the technical solution of the example implementations query processing according to present disclosure
Figure;
Fig. 3 diagrammatically illustrates the flow chart of the inquiry processing method of the example implementations according to present disclosure;
Fig. 4 is diagrammatically illustrated to be relied on according to the grammer for an inquiry of the example implementations of present disclosure
The block diagram of tree;
Fig. 5 is diagrammatically illustrated to be relied on according to the grammer for another inquiry of the example implementations of present disclosure
The block diagram of tree;
Fig. 6 diagrammatically illustrates showing for the feature of the entity attribute pair of the example implementations according to present disclosure
Example;
Fig. 7 diagrammatically illustrate according to the example implementations of present disclosure based on the assessment of entity attribute pair come
Determine the block diagram of the information of inquiry;
Fig. 8 diagrammatically illustrates the block diagram of the query processing device according to the example implementations of present disclosure;With
And
Fig. 9 shows the block diagram that can implement the calculating equipment of multiple implementations of present disclosure.
Specific embodiment
The implementation of present disclosure is more fully described below with reference to accompanying drawings.Although showing the disclosure in attached drawing
Certain implementations of content, it should be understood that, present disclosure can be realized by various forms, and not answered
This is construed as limited to the implementation illustrated here, provides these on the contrary and is achieved in that for more thorough and complete geography
Solve present disclosure.It should be understood that the attached drawing and being given for example only property of implementation of present disclosure act on, it is not intended to
Limit the protection scope of present disclosure.
In the description of the implementation of present disclosure, term " includes " and its similar term should be understood as opening
Include, i.e., " including but not limited to ".Term "based" should be understood as " being based at least partially on ".Term " implementation "
Or " implementation " should be understood as " at least one implementation ".Term " first ", " second " etc. may refer to difference
Or identical object.Hereafter it is also possible that other specific and implicit definition.
Diversified search engine has been had already appeared at present.User can into search engine input inquiry to obtain
Query result.For ease of description, the example of user query is described referring first to Fig. 1.Fig. 1 diagrammatically illustrates user's input
The diagram 100 of inquiry.As shown in Figure 1, user can input description inquiry in the query frame 120 provided by search engine 110
The query text of information.Query information in this for example can be user and it is expected the problem of understanding.For example, when user it is expected inquiry
When whom the wife of famous movie star " Zhang Ming " is, " whom the wife of Zhang Ming is " can be inputted into query frame 120.In another example when with
At the time of certain bus is inquired in family expectation when table, " No. 103 bus timetable " can be inputted.Then, search engine 110 can be with
Subsequent searches are executed according to the information parsed from inquiry.However, since the language expression of users is accustomed to different, use
Family may use diversified language expression in search, for example, may include various oral expressions or again in inquiry
Multiple content.This leads to the query information of 110 indigestion user of search engine and then accurately cannot return to inquiry knot to user
Fruit.
It has been proposed determining the special entity for including in inquiry based on constraint (for example, entity class and attribute) at present
Attribute technical solution, however the entity in inquiring may and be unsatisfactory for constraint condition, thus cause mistake.It also proposes at present
User is helped based on search key is prompted the user with to determine the technical solution of the information of inquiry.For example, when user inputs
When " Zhang Ming ", the user can be prompted " birthday ", " height ", the attributes such as " first signature song " are in order to user's selection.However, the technology
Scheme provides prompt based on limited attribute set predetermined, can not cover the various query informations of users.This
When, how to determine that the query information of user becomes a problem to be solved.
In order at least be partially solved the deficiency in above-mentioned technical proposal, according to the exemplary realization of the disclosure, provide
A kind of technical solution of query processing.Hereinafter, it will refer to the exemplary realization that Fig. 2 is broadly described the disclosure.Fig. 2 is schematic
Show the block diagram 200 of the technical solution of the example implementations query processing according to present disclosure.As shown in Fig. 2, can
To receive true inquiry 210 from the user, and a group object 220 and one group of category are determined from inquiry 210 from the user
Property 230.Multiple entities and attribute can be respectively included in a group object 220 and one group of attribute 230 in this.
At least one reality of the alternate information of description inquiry can be generated based on a group object 220 and one group of attribute 230
Body attribute is to 240.Entity attribute in this may rely on physical quantities in a group object 220 and one group to 240 quantity
Number of attributes in attribute 230.It then, can be for each entity attribute to assessing.According to the exemplary reality of the disclosure
Existing mode, can be come in a manner of scoring quantitative evaluation as a result, for example, can be commented with the numerical value in the section 0-100 to determine
Point, or discrete way can also be waited to determine scoring using high, medium and low.For example, can be determined based on historical experience each
The assessment 250 of entity attribute pair, and select an entity attribute to use (for example, selection scoring is highest) based on assessment 250
In the information 260 of description inquiry.
It is realized using above-mentioned example, the content of text in inquiry 210 inputted by actual analysis user can extract
The problem of with user associated potential entity and attribute.Then, by composite entity and attribute and to combined entity attribute
To assessing, the information for assessing and then determining the expectation inquiry of user's most probable can be determined based on historical experience.By this method,
User's expectation can be accurately obtained to solve the problems, such as.Further, it is also based on acquired entity attribute pair, is searched to construct
Index other downstream models in holding up.
According to the example implementations of the disclosure, since entity in this and attribute are not predetermined, but
It is directly obtained from user query, may adapt to handle various user query, and can contribute to find new entity-
Relation on attributes.It can directly be handled for a large amount of inquiries from the user, and to obtain more accurate result.
Hereinafter, the more details of information of Fig. 3 description in relation to determining inquiry be will refer to.Fig. 3 diagrammatically illustrates root
According to the flow chart of the inquiry processing method 300 of the example implementations of present disclosure.At frame 310, it is determined whether receive
To inquiry 210, such as inquiry from the user.If it is determined that receiving inquiry 210 from the user, then method 300 advances to
Frame 320.At frame 320, a group object 220 and one group of attribute 230 can be extracted from the text of inquiry 210.Hereinafter, will
Describe respectively how from inquiry 210 text in extract entity and attribute more details.According to the exemplary realization of the disclosure
Mode can execute text analyzing for inquiry 210 to extract one group of keyword from inquiry 210.
Keyword in this is, for example, the notional word in text with certain sense, including name, place name, mechanism name, proprietary
Noun etc..For inquiry " whom the wife of Zhang Ming is ", keyword for example may include: Zhang Ming, wife.It then, can be with base
The entity in a group object is determined in a set of keyword of extraction.At this point, a group object may include two entities: Zhang Ming, wife
Son.For inquiry " No. 103 bus timetable ", keyword for example must include: bus, timetable.
According to the example implementations of the disclosure, attribute library can be pre-defined (for example, attribute dictionary or with other
The attribute list of format storage).Attribute dictionary in this may include description candidate attribute associated with inquiry.It can be based on
Historical experience carrys out defined attribute dictionary.For example, the certain information that can be frequently inquired based on a large number of users are come defined attribute dictionary.
According to the example implementations of the disclosure, attribute dictionary may include: that the users such as wife, timetable, height, birthday may close
The information of note.Then, it can be extracted from inquiry 210 and be matched with the text of attribute dictionary using as the attribute in one group of attribute.
For example, attribute may include " wife " for inquiry " what the wife of Zhang Ming cries ".In another example if belonging to
" what " property dictionary further include, then one group of attribute may include two attributes at this time: wife, what.In another example for inquiry
For " No. 103 bus timetable ", since attribute dictionary includes " timetable ", then one group of attribute may include a category at this time
Property, that is, timetable.
In some cases, the inquiry 210 of user's input may include complicated syntactic structure.According to the example of the disclosure
Property implementation, for inquiry 210 execute syntactic analysis, generate description inquiry 210 in word between grammer dependence
Dependent tree, and a group object and one group of attribute are extended based on dependent tree.It hereinafter will refer to Fig. 4 and describe related language
The more details of method dependent tree.Fig. 4 diagrammatically illustrates looking into for one according to the example implementations of present disclosure
The block diagram of the syntactic dependency tree 400 of inquiry.
In Fig. 4, the text that each expression of node 410,420,430,440 and 450 is extracted from inquiry 210, and node
Between line indicate two texts between grammer dependence.For example, the relationship 462 between node 410 and node 420
Indicate DE relationship, that is, used between the text of former and later two nodes " " connection of word structure.Similarly, in node 420 and node
Relationship 464 between 430 also illustrates that DE relationship.Thus, node 410,420 and 430 collectively constitutes a phrase " wife of Zhang Ming
Son ".The expression subject-predicate relationship of relationship 466 between node 430 " wife " and node 440 " crying ", and node 440 " crying " and node
Relationship 468 between 450 " what " indicates dynamic guest's relationship.
Typically, if between two texts being relationship (referred to as fixed middle relationship, the abbreviation between attribute and centre word
For ATT), then attribute plays modification or restriction effect to centre word.It needs to extend centre word using attribute at this time, so as to accurately simultaneously
And comprehensively obtain entity/attribute meaning.In the syntactic dependency tree 400 described above with reference to Fig. 4 and there is no fixed middle passes
System, thus at this time without extension.
For inquiry " No. 103 bus timetable ", it can determine that a group object includes public affairs using method as described above
Vehicle is handed over, and one group of attribute includes timetable.Fig. 5 diagrammatically illustrates being directed to according to the example implementations of present disclosure
The block diagram of the syntactic dependency tree 500 of another inquiry.Fig. 5 shows based on analysis inquiry " No. 103 bus timetable " and determines
Syntactic dependency tree 500.In Fig. 5, node 510,520,530 is the text for including respectively in inquiry, and relationship 542 and 544
Respectively illustrate the relationship between corresponding node.For example, relationship 542 indicates node 510 " 103 tunnel " and 520 " public transport of node
Relationship between vehicle " is surely middle relationship, then can extend the entity " bus " having determined based on node 510 at this time.
Although the relationship 544 between node 520 " bus " and node 530 " timetable " remains as relationship in surely, by
In at this time, " timetable " has been labeled as " attribute ", thus is no longer extended.Entity after extension is " 103 tunnel public transport
Vehicle ".In this way, it is possible to determine the real content of entity in a manner of more accurate and is comprehensive.At this point,
At frame 330, it is based on a group object 220 and one group of attribute 230, generates the information 260 for being used to describe inquiry extremely
A few entity attribute is to 240.At least one entity attribute is to an entity attribute in 240 to including coming from a group object
An entity in 220 and an attribute in one group of attribute 230.
Specifically, a category can be selected from one entity of selection in a group object 220 and from one group of attribute 230
Property.Can entity and attribute based on selection, generate an entity attribute pair.For inquiry " what wife of Zhang Ming cries ", institute
The group object and one group of attribute extracted can be expressed as follows:
One group object: { Zhang Ming, wife };
One group of attribute: wife, what.
At this point, 4 entity attributes pair can be obtained by composite entity and attribute: (Zhang Ming, wife), (Zhang Ming, it is assorted
), (wife, wife), (wife, what).It will be understood that since entity and attribute should be indicated with different texts, then
(wife, wife) can be deleted from above-mentioned entity attribute centering at this time, and finally obtain following three entity attributes pair: (
It is bright, wife), (Zhang Ming, what), (wife, what).
For inquiry " No. 103 bus timetable ", an extracted group object and one group of attribute can be expressed as follows:
One group object: { No. 103 bus };
One group of attribute: { timetable }.
At this point, by composite entity and attribute 1 entity attribute pair can be obtained: (No. 103 buses, timetable).
Return to Fig. 3, at frame 340, at least one entity attribute centering corresponding entity attribute to assessing.Root
According to the example implementations of the disclosure, the assessment of each entity attribute pair can be determined based on historical experience.For example, being directed to
The given entity attribute pair of at least one entity attribute centering, the scoring of available entity attribute pair and the spy of entity attribute pair
Mapping relations between sign.In the operational process of search engine, which kind of shape can be obtained from the historical search of a large number of users
The entity attribute of formula is to can obtain higher scoring, and the entity attribute of which kind of form is to can obtain lower scoring.
Here, for some entity attribute for, it can be with the feature of the entity attribute pair as the mark entity
The identifier of attribute pair.Further, mapping relations can be the assessment based on one group of sample entity attribute pair and one group of sample
The training of the feature of entity attribute pair and obtain.Thus, the feature based on mapping relations and given entity attribute pair can be true
Surely the assessment of given entity attribute pair.
According to the example implementations of the disclosure, above-mentioned mapping relations can be trained based on the method for machine learning.
For example, some sample entity attributes of the problem of may be selected that correct reflection user during the training period are to training the mapping
Relationship, so that the mapping relations can export higher scoring when receiving the input similar to sample entity attribute pair.
In another example can choose not some sample entity attributes of the problem of can correctly reflect user during the training period to training this to reflect
Relationship is penetrated, so that the mapping relations can export lower comment when receiving the input similar to sample entity attribute pair
Point.
According to the example implementations of the disclosure, during subsequent operation, it is also based on subsequently received reality
The information of body attribute pair updates the mapping relations.In this way, it is possible to make determining information that can more be reflected in specific time
The interior concern the most of section.For example, it is assumed that frequently occurring user query " what wife of Zhang Ming cries " or similar in the recent period
Inquiry can then update mapping relations so that higher scoring is provided to (Zhang Ming, wife) for entity attribute, so as to more
Accurate mode determines the information of user query.
According to the example implementations of the disclosure, the feature for giving entity attribute pair includes various contents.For example,
It may include at least any one in following: the position of the entity of entity attribute centering in queries;The length of entity;Entity category
The position of the attribute of property centering in queries;The length of attribute;The ratio of the length of the total length and inquiry of entity and attribute;With
And the text distance between entity and attribute;The distance of entity and attribute in dependent tree.
Hereinafter, the more details that Fig. 6 describes the feature in relation to entity attribute pair be will refer to.Fig. 6 is diagrammatically illustrated
According to the example 600 of the feature of the entity attribute pair of the example implementations of present disclosure.As shown in fig. 6,610 table of field
Show the position of the entity of entity attribute centering in queries, the length of 620 presentation-entity of field, 630 presentation-entity attribute of field
The position of the attribute of centering in queries;The length of the expression attribute of field 640;The total length of field 650 presentation-entity and attribute
With the ratio of the length of inquiry;Text distance between 660 presentation-entity of field and attribute;And 670 presentation-entity of field and
Distance of the attribute in dependent tree.
Hereinafter, it will describe how to determine each of entity attribute pair to (Zhang Ming, wife) is example with entity attribute
A feature.It will be understood that entity " Zhang Ming " is located at the 1-2 word in inquiry " what the wife of Zhang Ming cries ", thus can be true
The position for determining entity is 1.Entity " Zhang Ming " includes two words, thus the length of entity is 2.Attribute " wife " is in inquiry " Zhang Ming
Wife what is cried " in be located at the 4-5 word, thus can determine entity position be 4.Attribute " wife " includes two words,
Thus the length of attribute is 2.The total length of entity " Zhang Ming " and attribute " wife " is 4, and the length inquired is 8, thus, entity
Ratio with the length of the total length and inquiry of attribute is 4/8=0.5.Text distance between entity and attribute is 4-1=3.
According to the example implementations of the disclosure, the distance of entity and attribute in dependent tree is also based on to determine
The numerical value of field 670.Fig. 4 is returned to, due to including 2 relationships between the node 410 of presentation-entity and the node 430 of expression wife
462 and 464, thus can determine that the distance of entity and attribute in dependent tree is 2.Thus, entity attribute is to (Zhang Ming, wife)
Feature vector can be expressed as shown in Figure 6 (1,2,4,2,0.5,3,2).
Similarly, it for inquiry " what the wife of Zhang Ming cries ", is also based on aforesaid way and determines following two
The feature vector of entity attribute pair: (Zhang Ming, what) and (wife, what).It will be understood that only schematically showing referring to Fig. 6 above
An example for having gone out feature vector, according to the example implementations of the disclosure, feature vector can also include it is more or
Less dimension.Then, can mapping relations and each entity attribute pair based on acquisition feature vector, to determine each reality
The scoring of body attribute pair.
Fig. 3 is returned, at frame 350, after being directed at least one entity attribute to assessing, can be based on commenting
Estimate result (that is, scoring) to select an entity attribute to the letter for describing inquiry from least one entity attribute centering
Breath.Hereinafter, more details of Fig. 7 description in relation to determining query information be will refer to.Fig. 7 is diagrammatically illustrated according to the disclosure
The block diagram 700 of the information that inquiry is determined based on the scoring of entity attribute pair of the example implementations of content.
Entity attribute is shown in FIG. 7 to 710,720 and 730.According to method as described above it is obtained scoring from
Low to high sequence is ranked up, then entity attribute is highest to 730 scoring.At this point it is possible to select (Zhang Ming, wife) to make
The information 740 solved it is expected for user.For inquiry " No. 103 bus timetable " above, since there is only one at this time
A entity attribute, then at this time can be directly by the entity attribute to the information as inquiry to (No. 103 buses, timetable).
It hereinbefore describes how to determine information associated with the query to Fig. 7 referring to fig. 2.However, in some feelings
Identified entity attribute really it is expected the problem of understanding to that may not can accurately reflect user under condition.Thus, really
Entity attribute is determined to later, post-processing can also be performed, and does not meet expected entity attribute pair to filter out.
According to the example implementations of the disclosure, if the attribute of the entity attribute centering of selection includes predetermined word
(such as the word for indicating query), can be to remove predetermined word in dependence.Assuming that attribute includes " whom wife is " similar knot
Structure, then can be to delete word as " whom is " in dependence.
It, can be based on the word of the text of the attribute of the entity attribute centering of selection according to the example implementations of the disclosure
Property carrys out Filtering entity attribute pair.For example, for inquiry " lip one encloses rubescent and pain ", it is assumed that the entity attribute selected to for
(lip, rubescent).It is found by analysis, it is verb property that attribute is " rubescent " at this time.Thus it can consider determining information not
It is accurate thus can abandon selected entity attribute pair.
It, can be based on the length of the text of the attribute of the entity attribute centering of selection according to the example implementations of the disclosure
Degree, carrys out Filtering entity attribute pair.In this implementation, the threshold value of the text size of attribute can be set.When the entity of selection
When the text size of the attribute of attribute centering is more than the threshold value, then selected entity attribute pair can be abandoned.
According to the example implementations of the disclosure, can the entity attribute centering based on selection whether include except one group real
Other notional words other than body and one group of attribute, carry out Filtering entity attribute pair.For example, for inquiry " method of bamboo production cup ",
Assuming that the entity attribute selected is to for (bamboo, make cup).It further include notional word " side in inquiry by analysis inquiry discovery
Method ", and the notional word is not in the entity attribute pair of selection.At this time it is considered that determine information miss inquiry in it is interior
Hold, thus selected entity attribute pair can be abandoned.
The multiple implementations for how handling the method 300 of inquiry are hereinbefore described in detail.According to the disclosure
Example implementations, additionally provide for determine inquiry information 260 device.Hereinafter, it will refer to Fig. 8 to retouch in detail
It states.
Fig. 8 diagrammatically illustrates the block diagram of the query processing device 800 according to the example implementations of present disclosure.
The device 800 includes: extraction module 810, is configured to the inquiry in response to receiving, and one group of reality is extracted from the text of inquiry
Body and one group of attribute;Generation module 820 is configured to generate the letter for describing inquiry based on a group object and one group of attribute
At least one entity attribute pair of breath, an entity attribute of at least one entity attribute centering is to including in a group object
An entity and an attribute in one group of attribute;Evaluation module 830 is configured at least one entity category
The corresponding entity attribute of property centering is to assessing;And selecting module 840, it is configured to based at least one entity attribute pair
Assessment as a result, from least one entity attribute centering select an entity attribute to for describe inquire information.
According to the example implementations of the disclosure, extraction module 810 includes: keyword-extraction module, is configured to needle
To query execution text analyzing to extract one group of keyword from inquiry;And entity determining module, it is configured to based on one group of pass
Key word determines the entity in a group object.
According to the example implementations of the disclosure, extraction module 810 further comprises: syntax Analysis Module, and configuration is used
In being directed to query execution syntactic analysis, the dependent tree of the grammer dependence between the word in description inquiry is generated;And expand
Module is opened up, is configured to extend a group object and one group of attribute based on dependent tree.
According to the example implementations of the disclosure, extraction module 810 includes: that dictionary obtains module, is configured to obtain
The attribute dictionary of candidate attribute associated with inquiry is described;And matching module, it is configured to extract from inquiry and is matched with
The text of attribute dictionary is using as the attribute in one group of attribute.
According to the example implementations of the disclosure, extraction module 810 further comprises: removal module is configured to ring
It should include predetermined word in attribute, predetermined word is removed in dependence.
According to the example implementations of the disclosure, generation module 820 includes: entity selection module, is configured to from one
An entity is selected in group object;Attribute module is configured to select an attribute from one group of attribute, and entity has with attribute
Different text representations;And pairing generation module, it is configured to entity and attribute based on selection, generates an entity attribute
It is right.
According to the example implementations of the disclosure, evaluation module 830 includes: at least one entity attribute centering
Given entity attribute pair, mapping obtain module, be configured to obtain the scoring of entity attribute pair and entity attribute pair feature it
Between mapping relations, mapping relations are the spies of scoring and one group of sample entity attribute pair based on one group of sample entity attribute pair
The training of sign and obtain;And mapping evaluation module, it is configured to the feature based on mapping relations and given entity attribute pair,
Determine the scoring of given entity attribute pair.
According to the example implementations of the disclosure, it includes at least any in following for giving the feature of entity attribute pair
: the position of the entity of entity attribute centering in queries;The length of entity;The position of the attribute of entity attribute centering in queries
It sets;The length of attribute;The ratio of the length of the total length and inquiry of entity and attribute;And the text between entity and attribute away from
From.
According to the example implementations of the disclosure, the feature of given entity attribute pair further comprises: entity and attribute
Distance in dependent tree.
According to the example implementations of the disclosure, further comprise filtering module, be configured to: based in following extremely
Any one of few entity attribute pair to filter selection, the part of speech of the text of the attribute of the entity attribute centering of selection;The reality of selection
The length of the text of the attribute of body attribute centering;And whether including other realities not in the entity attribute pair of selection in inquiry
Word.
Fig. 9 shows the block diagram that can implement the calculating equipment 900 of multiple implementations of present disclosure.Equipment 900
The method that can be used to implement Fig. 3 description.As shown, equipment 800 includes central processing unit (CPU) 901, it can basis
The computer program instructions that are stored in read-only memory (ROM) 902 are loaded into random access storage from storage unit 908
Computer program instructions in device (RAM) 903, to execute various movements appropriate and processing.In RAM 903, can also it store
Equipment 900 operates required various programs and data.CPU901, ROM 902 and RAM 903 is connected with each other by bus 904.
Input/output (I/O) interface 905 is also connected to bus 904.
Multiple components in equipment 900 are connected to I/O interface 905, comprising: input unit 906, such as keyboard, mouse etc.;
Output unit 907, such as various types of displays, loudspeaker etc.;Storage unit 908, such as disk, CD etc.;And it is logical
Believe unit 909, such as network interface card, modem, wireless communication transceiver etc..Communication unit 909 allows equipment 900 by such as
The computer network of internet and/or various telecommunication networks exchange information/data with other equipment.
Processing unit 901 executes each method as described above and processing, such as method 300.For example, in some realizations
In mode, method 300 can be implemented as computer software programs, be tangibly embodied in machine readable media, such as store
Unit 908.In some implementations, some or all of of computer program can be via ROM 902 and/or communication unit
909 and be loaded into and/or be installed in equipment 900.When computer program loads to RAM 903 and by CPU 901 execute when, can
To execute the one or more steps of procedures described above 400.Alternatively, in other implementations, CPU 901 can lead to
It crosses other any modes (for example, by means of firmware) appropriate and is configured as execution method 300.
According to the example implementations of present disclosure, a kind of computer for being stored thereon with computer program is provided
Readable storage medium storing program for executing.Method described in the disclosure is realized when program is executed by processor.
Function described herein can be executed at least partly by one or more hardware logic components.Example
Such as, without limitation, the hardware logic component for the exemplary type that can be used includes: field programmable gate array (FPGA), dedicated
Integrated circuit (ASIC), Application Specific Standard Product (ASSP), the system (SOC) of system on chip, load programmable logic device
(CPLD) etc..
Program code for implementing the method for present disclosure can be using any group of one or more programming languages
It closes to write.These program codes can be supplied to general purpose computer, special purpose computer or other programmable data processing units
Processor or controller so that program code when by processor or controller execution when make to be advised in flowchart and or block diagram
Fixed function/operation is carried out.Program code can be executed completely on machine, partly be executed on machine, as independence
Software package partly executes on machine and partly executes or hold on remote machine or server on the remote machine completely
Row.
In the context of present disclosure, machine readable media can be tangible medium, may include or stores
The program for using or being used in combination with instruction execution system, device or equipment for instruction execution system, device or equipment.Machine
Device readable medium can be machine-readable signal medium or machine-readable storage medium.Machine readable media may include but unlimited
In times of electronics, magnetic, optical, electromagnetism, infrared or semiconductor system, device or equipment or above content
What appropriate combination.The more specific example of machine readable storage medium will include the electrical connection of line based on one or more, portable
Formula computer disks, hard disk, random access memory (RAM), read-only memory (ROM), Erasable Programmable Read Only Memory EPROM
(EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage are set
Standby or above content any appropriate combination.
Although this should be understood as requiring operating in this way with shown in addition, depicting each operation using certain order
Certain order out executes in sequential order, or requires the operation of all diagrams that should be performed to obtain desired result.
Under certain environment, multitask and parallel processing be may be advantageous.Similarly, although containing several tools in being discussed above
Body realize details, but these be not construed as to scope of the present disclosure limitation.In individual implementation
Certain features described in context can also be realized in combination in single realize.On the contrary, in the context individually realized
Described in various features can also realize individually or in any suitable subcombination in multiple realizations.
Although having used specific to this theme of the language description of structure feature and/or method logical action, answer
When understanding that theme defined in the appended claims is not necessarily limited to special characteristic described above or movement.On on the contrary,
Special characteristic described in face and movement are only to realize the exemplary forms of claims.
Claims (22)
1. a kind of inquiry processing method, comprising:
In response to the inquiry being connected to, a group object and one group of attribute are extracted from the text of the inquiry;
Based on a group object and one group of attribute, at least one entity category for describing the information of the inquiry is generated
Property pair, an entity attribute of at least one entity attribute centering is to including an entity in a group object
An and attribute in one group of attribute;
For at least one entity attribute centering corresponding entity attribute to assessing;And
It is based on the assessment as a result, selecting an entity attribute to for describing from least one described entity attribute centering
The information of the inquiry.
2. according to the method described in claim 1, wherein extracting a group object from the text of the inquiry and including:
For the query execution text analyzing to extract one group of keyword from the inquiry;And it is based on a set of keyword
Determine the entity in a group object.
3. according to the method described in claim 1, further comprising:
For the query execution syntactic analysis, the dependence for describing the grammer dependence between the word in the inquiry is generated
Tree;And
A group object and one group of attribute are extended based on the dependent tree.
4. according to the method described in claim 1, wherein extracting one group of attribute from the text of the inquiry and including:
Obtain the attribute dictionary for describing candidate attribute associated with inquiry;And
The text of the attribute dictionary is matched with using as the attribute in one group of attribute from extracting in the inquiry.
5. according to the method described in claim 4, further comprising:
Include predetermined word in response to the attribute, the predetermined word is removed from the attribute.
6. according to the method described in claim 1, wherein generating at least one entity category of the information for describing the inquiry
Property is to including:
An entity is selected from a group object;
An attribute is selected from one group of attribute, the entity has different text representations from the attribute;And
The entity and the attribute based on selection, generate an entity attribute pair.
7. according to the method described in claim 1, wherein for the corresponding entity attribute of at least one entity attribute centering
It include: the given entity attribute pair at least one entity attribute centering to assessment is carried out,
The mapping relations between the assessment of entity attribute pair and the feature of the entity attribute pair are obtained, the mapping relations are bases
In the feature of the assessment and one group of sample entity attribute pair of one group of sample entity attribute pair training and obtain;And
Feature based on the mapping relations and the given entity attribute pair, for the given entity attribute to commenting
Estimate.
8. according to the method described in claim 7, wherein the feature of the given entity attribute pair includes at least appointing in following
One:
Position of the entity of the entity attribute centering in the inquiry;
The length of the entity;
Position of the attribute of the entity attribute centering in the inquiry;
The length of the attribute;
The ratio of the total length of the entity and the attribute and the length of the inquiry;And
Text distance between the entity and the attribute.
9. according to the method described in claim 8, further comprising:
For the query execution syntactic analysis, the dependence for describing the grammer dependence between the word in the inquiry is generated
Tree;And
The feature of the given entity attribute pair further comprises: the entity and the attribute in the dependent tree away from
From.
10. according to the method described in claim 1, further comprising: any one of at least filtering selection based in following
The entity attribute pair,
The part of speech of the text of the attribute of the entity attribute centering of selection;
The length of the text of the attribute of the entity attribute centering of selection;And
Whether including not other notional words in the entity attribute pair of selection in the inquiry.
11. a kind of query processing device, comprising:
Extraction module is configured to the inquiry in response to receiving, and a group object and one group are extracted from the text of the inquiry
Attribute;
Generation module is configured to generate the information for describing the inquiry based on a group object and one group of attribute
At least one entity attribute pair, an entity attribute of at least one entity attribute centering is to including real from described one group
An entity in body and an attribute in one group of attribute;
Evaluation module is configured to corresponding entity attribute at least one entity attribute centering to assessing;With
And
Selecting module, be configured to the assessment based at least one entity attribute pair as a result, from described at least one
A entity attribute centering selects an entity attribute to the information for describing the inquiry.
12. device according to claim 11, wherein the extraction module includes:
Keyword-extraction module is configured to for the query execution text analyzing to extract one group of key from the inquiry
Word;And
Entity determining module is configured to determine the entity in a group object based on a set of keyword.
13. device according to claim 11, wherein the extraction module further comprises:
Syntax Analysis Module, be configured to the word generated for the query execution syntactic analysis describe in the inquiry it
Between grammer dependence dependent tree;And
Expansion module is configured to extend a group object and one group of attribute based on the dependent tree.
14. device according to claim 11, wherein the extraction module includes:
Dictionary obtains module, is configured to obtain the attribute dictionary for describing candidate attribute associated with inquiry;And
Matching module, is configured to extract from the inquiry and is matched with the text of the attribute dictionary using as one group of category
Attribute in property.
15. device according to claim 14, wherein the extraction module further comprises:
Module is removed, is configured in response to the attribute include predetermined word, the predetermined word is removed from the attribute.
16. device according to claim 11, wherein the generation module includes:
Entity selection module is configured to select an entity from a group object;
Attribute module is configured to select an attribute from one group of attribute, and the entity has different from the attribute
Text representation;And
Generation module is matched, the entity and the attribute based on selection is configured to, generates an entity attribute pair.
17. device according to claim 11, wherein the evaluation module includes: at least one described entity attribute
The given entity attribute pair of centering,
Mapping obtains module, is configured to obtain the mapping between the assessment of entity attribute pair and the feature of the entity attribute pair
Relationship, the mapping relations are the spies of assessment and one group of sample entity attribute pair based on one group of sample entity attribute pair
The training of sign and obtain;And
Evaluation module is mapped, the feature based on the mapping relations and the given entity attribute pair is configured to, for described
Given entity attribute is to assessing.
18. device according to claim 17, wherein the feature of the given entity attribute pair include in following at least
Any one:
Position of the entity of the entity attribute centering in the inquiry;
The length of the entity;
Position of the attribute of the entity attribute centering in the inquiry;
The length of the attribute;
The ratio of the total length of the entity and the attribute and the length of the inquiry;And
Text distance between the entity and the attribute.
19. device according to claim 18, further comprises:
Syntax Analysis Module, be configured to the word generated for the query execution syntactic analysis describe in the inquiry it
Between grammer dependence dependent tree;And
The feature of the given entity attribute pair further comprises: the entity and the attribute in the dependent tree away from
From.
20. device according to claim 11 further comprises filtering module, is configured to: based in following at least
Any one filters the entity attribute pair of selection,
The part of speech of the text of the attribute of the entity attribute centering of selection;
The length of the text of the attribute of the entity attribute centering of selection;And
Whether including not other notional words in the entity attribute pair of selection in the inquiry.
21. a kind of query processing equipment, the equipment include:
One or more processors;And
Storage device, for storing one or more programs, when one or more of programs are by one or more of processing
Device executes, so that one or more of processors realize method according to claim 1 to 10.
22. a kind of computer readable storage medium is stored thereon with computer program, realization when described program is executed by processor
Method according to claim 1 to 10.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910116218.6A CN109902147A (en) | 2019-02-13 | 2019-02-13 | Method, apparatus, equipment and storage medium for query processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910116218.6A CN109902147A (en) | 2019-02-13 | 2019-02-13 | Method, apparatus, equipment and storage medium for query processing |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109902147A true CN109902147A (en) | 2019-06-18 |
Family
ID=66944802
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910116218.6A Pending CN109902147A (en) | 2019-02-13 | 2019-02-13 | Method, apparatus, equipment and storage medium for query processing |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109902147A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112115697A (en) * | 2020-09-25 | 2020-12-22 | 北京百度网讯科技有限公司 | Method, device, server and storage medium for determining target text |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777275A (en) * | 2016-12-29 | 2017-05-31 | 北京理工大学 | Entity attribute and property value extracting method based on many granularity semantic chunks |
CN106777274A (en) * | 2016-06-16 | 2017-05-31 | 北京理工大学 | A kind of Chinese tour field knowledge mapping construction method and system |
CN106919655A (en) * | 2017-01-24 | 2017-07-04 | 网易(杭州)网络有限公司 | A kind of answer provides method and apparatus |
CN107957991A (en) * | 2017-12-05 | 2018-04-24 | 湖南星汉数智科技有限公司 | A kind of entity attribute information extraction method and device relied on based on syntax |
CN107977368A (en) * | 2016-10-21 | 2018-05-01 | 京东方科技集团股份有限公司 | Information extracting method and system |
CN108256070A (en) * | 2018-01-17 | 2018-07-06 | 北京百度网讯科技有限公司 | For generating the method and apparatus of information |
-
2019
- 2019-02-13 CN CN201910116218.6A patent/CN109902147A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106777274A (en) * | 2016-06-16 | 2017-05-31 | 北京理工大学 | A kind of Chinese tour field knowledge mapping construction method and system |
CN107977368A (en) * | 2016-10-21 | 2018-05-01 | 京东方科技集团股份有限公司 | Information extracting method and system |
CN106777275A (en) * | 2016-12-29 | 2017-05-31 | 北京理工大学 | Entity attribute and property value extracting method based on many granularity semantic chunks |
CN106919655A (en) * | 2017-01-24 | 2017-07-04 | 网易(杭州)网络有限公司 | A kind of answer provides method and apparatus |
CN107957991A (en) * | 2017-12-05 | 2018-04-24 | 湖南星汉数智科技有限公司 | A kind of entity attribute information extraction method and device relied on based on syntax |
CN108256070A (en) * | 2018-01-17 | 2018-07-06 | 北京百度网讯科技有限公司 | For generating the method and apparatus of information |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112115697A (en) * | 2020-09-25 | 2020-12-22 | 北京百度网讯科技有限公司 | Method, device, server and storage medium for determining target text |
CN112115697B (en) * | 2020-09-25 | 2024-03-12 | 北京百度网讯科技有限公司 | Method, device, server and storage medium for determining target text |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
TWI746690B (en) | Method, device and server for generating natural language question answer | |
CN110609902B (en) | Text processing method and device based on fusion knowledge graph | |
US20140351228A1 (en) | Dialog system, redundant message removal method and redundant message removal program | |
JP6163607B2 (en) | Method and apparatus for constructing event knowledge database | |
CN109582799B (en) | Method and device for determining knowledge sample data set and electronic equipment | |
CN109522465A (en) | The semantic searching method and device of knowledge based map | |
US20160260033A1 (en) | Systems and Methods for Similarity and Context Measures for Trademark and Service Mark Analysis and Repository Searchess | |
CN107451153A (en) | The method and apparatus of export structure query statement | |
WO2022237253A1 (en) | Test case generation method, apparatus and device | |
US20150286943A1 (en) | Decision Making and Planning/Prediction System for Human Intention Resolution | |
CN110096573B (en) | Text parsing method and device | |
CN111309863B (en) | Natural language question-answering method and device based on knowledge graph | |
CN112417846B (en) | Text automatic generation method and device, electronic equipment and storage medium | |
JP2022073981A (en) | Source code retrieval | |
GB2513537A (en) | Natural language processing | |
CN110502227A (en) | The method and device of code completion, storage medium, electronic equipment | |
CN111104803B (en) | Semantic understanding processing method, device, equipment and readable storage medium | |
TWI735380B (en) | Natural language processing method and computing apparatus thereof | |
CN112328800A (en) | System and method for automatically generating programming specification question answers | |
CN112559709A (en) | Knowledge graph-based question and answer method, device, terminal and storage medium | |
CN107967285A (en) | Data processing method and data processing equipment | |
CN109840255A (en) | Reply document creation method, device, equipment and storage medium | |
JP2020113129A (en) | Document evaluation device, document evaluation method, and program | |
CN113297251A (en) | Multi-source data retrieval method, device, equipment and storage medium | |
JP6092493B1 (en) | Database management apparatus and method thereof |
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 |