Summary of the invention
The present invention provides a kind of information query method and system, to improve the matching degree of variation inquiry, meets user certainly
By the demand inquired about.
To this end, the present invention provides following technical scheme:
A kind of information query method, including:
Obtain the data base that user provides, described data base comprises the customized information entry of user;
Based on the basic syntax extended model built in advance, described customized information entry is extended, generates with described
The extension information that data base is corresponding, described basic syntax extended model is for describing the propagation law of customized information;
After receiving user's Query Information to described data base, inquire about the extension information corresponding with described data base,
Obtain the Query Result corresponding with described Query Information.
Preferably, described method also includes: build described basic syntax extended model in the following manner:
Obtain the customized information entry of different user;
Described customized information entry is carried out attribute labeling, obtains sequence of attributes;
Training is for describing the marking model of the mapping relations between specifying information and described sequence of attributes;
The attribute extension model for describing Message structure pattern is generated according to described sequence of attributes.
Preferably, described generate for describing the attribute extension model bag of Message structure pattern according to described sequence of attributes
Include:
Add up the frequency of various structural modelss in described sequence of attributes;
Select to meet pre-conditioned structural models as the attribute for describing Message structure pattern according to described frequency
Extended model.
Alternatively, described according to described frequency select meet pre-conditioned structural models as describing message structure
The attribute extension model of pattern includes:
Select the frequency structural models more than the frequency threshold set as described attribute extension model;Or
Select the structural models setting number as described attribute extension model from high to low according to frequency.
Preferably, described based on the basic syntax extended model built in advance, described customized information entry is expanded
Exhibition, generates the extension information corresponding with described data base and includes:
The fundamental unit of described customized information entry is determined according to described marking model;
According to described attribute extension model, described fundamental unit is extended, obtains and described customized information word
The extension entry that bar is corresponding, and formed corresponding described customized information word by described customized information entry and described extension entry
The extension information of bar.
A kind of information query system, including:
Data base's acquiring unit, for obtaining the data base that user provides, comprises the personalization of user in described data base
Information entry;
Entry expanding element, for entering described customized information entry based on the basic syntax extended model built in advance
Row extension, generates the extension information corresponding with described data base, and described basic syntax extended model is used for describing customized information
Propagation law;
Receive unit, for receiving user's Query Information to described data base;
Query unit, for after described reception unit receives user's Query Information to described data base, inquiry with
The extension information that described data base is corresponding, obtains the Query Result corresponding with described Query Information.
Preferably, described system also includes:
Extended model construction unit, is used for building described basic syntax extended model;Described extended model construction unit bag
Include:
Entry acquiring unit, for obtaining the customized information entry of different user;
Attribute labeling unit, for described customized information entry is carried out attribute labeling, obtains sequence of attributes;
Marking model training unit, for training for describing the mapping relations between specifying information and described sequence of attributes
Marking model;
Attribute extension model generation unit, for generating the genus for describing Message structure pattern according to described sequence of attributes
Property extended model.
Preferably, described attribute extension model generation unit includes:
Statistics subelement, for adding up the frequency of various structural modelss in described sequence of attributes;
Select subelement, for selecting to meet pre-conditioned structural models as describing information according to described frequency
The attribute extension model of structural models.
Alternatively, described selection subelement, specifically for selecting frequency to make more than the structural models of the frequency threshold set
For described attribute extension model;Or select the structural models setting number as described attribute extension from high to low according to frequency
Model.
Preferably, described entry expanding element includes:
Determine subelement, for determining the fundamental unit of customized information entry according to described marking model;
Extension subelement, for described fundamental unit being extended according to described attribute extension model, obtain with
The extension entry that described customized information entry is corresponding, and formed correspondence by described customized information entry and described extension entry
The extension information of described customized information entry.
The information query method of embodiment of the present invention offer and system, be in advance based on for describing customized information extension rule
The basic syntax extended model of rule, is extended the customized information entry of user, and be expanded information, so so that institute
State extension information and can support more freely describing mode more to user personalized information.In the inquiry receiving user's input
After information, inquire about in the entry set the most described extension information of extension, obtain target information, thus be effectively improved inquiry
Degree of freedom and accuracy rate, preferably meet the demand that user freely inquires about.
Detailed description of the invention
In order to make those skilled in the art be more fully understood that the scheme of the embodiment of the present invention, below in conjunction with the accompanying drawings and implement
The embodiment of the present invention is described in further detail by mode.
The information query method of embodiment of the present invention offer and system, be in advance based on for describing customized information extension rule
The basic syntax extended model of rule, is extended the customized information entry of user, and be expanded information, so so that institute
State extension information and can support more freely describing mode more to user personalized information.In the inquiry receiving user's input
After information, inquire about in the entry set the most described extension information of extension, obtain target information, thus be effectively improved inquiry
Degree of freedom and accuracy rate, preferably meet the demand that user freely inquires about.
As it is shown in figure 1, be the flow chart of embodiment of the present invention information query method, comprise the following steps:
Step 101, obtains the data base that user provides, comprises the customized information entry of user in described data base.
Described user personalized information entry refers to that some that user oneself preserves have certain particular community or feature
One class entry, the title catalogue etc. that such as address list, user are liked.
Step 102, is extended described customized information entry based on the basic syntax extended model built in advance, raw
Becoming the extension information corresponding with described data base, described basic syntax extended model is for describing the extension rule of customized information
Rule.
User personalized information entry is extended obtaining by described extension information based on basic syntax extended model
Entry set.
Described basic syntax extended model, for describing the propagation law of customized information, can use the side of off-line training
Formula, according to a large amount of customized informations gathered, such as contact information of customer (address list that such as user uploads), training in advance
Obtaining, concrete building process will be described in detail later.
Due to user preserve above-mentioned customized information entry time, different entries may be used different forms and
Component content, such as, for the contact person in address list, can use herein below and form: name, name+position, and surname+
Position, mechanism+name, etc..When therefore can cause inquiry, the Query Information of input cannot be with described user personalized information word
The situation that entry in bar matches, it is impossible to obtain corresponding Query Result.
To this end, in embodiments of the present invention, basic syntax extended model based on the propagation law describing customized information,
Being extended user personalized information entry, the entry set enabling extension to obtain more freely describes original entry and is wrapped
The information contained.
Such as, an associated person information in the address list of user is " Xun Feiwang intelligence state president ", after above-mentioned extension
Can obtain following new entry:
A) Wang Zhiguo;
B) Xun Feiwang intelligence state;
C) news fly Wang president;
D) king president.
Concrete extended mode will be described in detail later.
Step 103, after receiving user's Query Information to described data base, inquires about the expansion corresponding with described data base
Exhibition information, obtains the Query Result corresponding with described Query Information.
Above-mentioned Query Information can be contact person's Query Information, such as, and " news fly Zhang Kai ", naturally it is also possible to be other inquiries
Information.
Specifically, can be by modes such as coupling or identifications, from described extension information, knot is inquired about in inquiry accordingly
Really.
It should be noted that in actual applications, in addition it is also necessary to Query Result is returned to user, the inquiry returned to user
Result can be the link that the original entry in the data base that user provides is corresponding, such as telephone number.In order to be further ensured that
The accuracy of Query Result, to user return Query Result can also is that the original entry in the data base that user provides and
The link that this entry is corresponding, is judged whether correctly by user.
According to different application, if the entry matched with the Query Information of user's input is according in described data base
Original entry extend the extension entry that obtains, it is also possible to using the link of this extension entry and correspondence as Query Result, certainly,
What extension entry was corresponding links link corresponding with original entry is same.
Visible, compared with prior art, owing to the information query method of the embodiment of the present invention is not directly at original number
Inquire about according in storehouse, but based on basic syntax extended model, the user personalized information entry in data base is being expanded
The entry set that exhibition obtains is inquired about, thus is effectively improved inquiry degree of freedom and accuracy rate, preferably meet use
The demand that family is freely inquired about.
It should be noted that the information query method of the embodiment of the present invention can be applied not only to the inquiry of user contact
Environment, it is also possible to be applied in the inquiry environment of other customized informations, this embodiment of the present invention is not limited.
In actual applications, the structure of described basic syntax extended model can adopted in the way of using off-line training in a large number
On the user personalized information such as associated person information of collection, training in advance obtains.
As in figure 2 it is shown, be the flow chart building basic syntax extended model in the embodiment of the present invention, comprise the following steps:
Step 201, obtains the customized information entry of user.
Step 202, carries out attribute labeling to described customized information entry, obtains sequence of attributes.
The attribute needing mark can determine according to the feature of user personalized information, such as, records for user communication
In associated person information, user's the biggest existing randomness when typing also has certain rule to follow.In general user's connection
It is that people's entry has generally comprised key element: surname, name, appellation (such as " father "), exabyte (such as " news fly "), position or title are (such as " warp
Reason "), occupation (such as " finishing "), relation (such as " colleague "), differentiating words (such as " newly "), number (such as " 2 "), other correlates (as
" Gas Company ") etc..To this end, can be according to default contact person's common properties, such as " surname ", " name ", " company " etc. is to specifically
Entry carries out attribute labeling.
Equally, for other customized informations, it is also possible to preset the common properties of its correspondence, then belong to according to these
Property carries out attribute labeling to each concrete entry.
So, corresponding each entry, i.e. can get a sequence of attributes.
Step 203, training is for describing the marking model of the mapping relations between specifying information and described sequence of attributes.
Specifically, statistical model, such as CRF(Conditional Random Field, condition random field can be used)
These mapping relations are described by model, HMM (Hidden Markov Model, hidden Markov model) etc., and above-mentioned
On mark entry, training obtains model parameter, including hop frequencies and each shape probability of state etc., and concrete training process and tradition
Training process be similar to, be not described in detail at this.
Step 204, generates the attribute extension model for describing Message structure pattern according to described sequence of attributes.
From the training data of sequence of attributes corresponding to a large number of users customized information entry gathered, statistics obtains various
The frequency of structural models, and select the multiple structural modelss meeting systemic presupposition condition to generate for describing Message structure pattern
Attribute extension model.
Described systemic presupposition condition for controlling the scale of the plurality of structure, can use setting structure number or
Structure frequency controls more than the method for predetermined threshold value.
Such as, for associated person information, common structural models is exemplified below shown in table 1.
Table 1
Structural models |
Sample |
Name |
Li Fei |
Appellation |
Mother-in-law |
Surname+appellation |
All brothers |
Name+appellation |
Beautiful elder sister |
Company+name |
Scenery with hills and waters Zhang Liuhua |
Name+company |
Zhang Kai Tengxun |
Company+surname+position |
Green baby Zhangs manager |
Surname+position |
Lu factory director |
Surname+position+company |
Li handles Hua Bi |
Occupation+surname |
Booking Xu |
Surname+position+operator |
Section chief Zhao moves |
Name+numeral |
Open roc 3 |
Name+differentiating words |
Zhang Lei is new |
Name+operator |
Li Yan telecommunications |
It should be noted that the training of above-mentioned basic syntax extended model can customized information word based on different user
Bar is trained obtaining, and the information after so can making extension preferably supports the inquiry of the customized information of different user.
It should be noted that the basic syntax extended model in the embodiment of the present invention includes that above-mentioned marking model and attribute expand
Exhibition model, based on this basic syntax extended model, is extended one by one to the customized information entry in customer data base, generates
The extension information corresponding with described data base, it is achieved the support to user personalized information more more free descriptions mode.
As it is shown on figure 3, be the flow chart in the embodiment of the present invention, user personalized information entry being extended, including with
Lower step:
Step 301, determines the fundamental unit of customized information entry according to marking model.
Specifically, first customized information entry text can be carried out word segmentation processing, obtain the participle of the corresponding text
Sequence;Then calculate this segmentation sequence path probability in described marking model, and select the path of wherein maximum probability to be
The attribute labeling that described participle is corresponding;Finally according to needs, attribute labeling is merged, obtain each key element unit.
Such as, the entry to " news fly Zhang Kai ", by acquisition " news "-" mechanism 1 " after factor analysis, " flying "-" mechanism 2 ",
" open "-" surname ", the markup information of " triumphant "-" name 1 ".Finally markup information is merged acquisition key element unit, i.e. " news fly "-
" mechanism ", " Zhang Kai "-" name ".
By said process, complete the conversion from concrete content of text to attribute.
Step 302, is extended described fundamental unit according to described attribute extension model, obtains and described individual character
Change the extension entry that information entry is corresponding.
It is to say, according to the structural models obtained in above-mentioned basic syntax spread training, to current Personalized information word
Bar is extended, and obtains the structural models of other common customized informations so that it is can be compatible various when follow-up is inquired about
Customized information structural models.
Such as, when customized information entry " Xun Feiwang intelligence state president " is extended, the first composition to this entry
Pattern analysis obtains: " surname " is " king ", and " name " is " intelligence state ", Business Name " news fly ", and position is element structures such as " presidents ";So
Afterwards according to the structural models obtained in basic syntax spread training, such as " surname+name ", " company+surname+name ", " surname+position " etc., right
The entry of " Xun Feiwang intelligence state president " extends and obtains following many new terms:
A) " surname+name ": Wang Zhiguo
B) " company+surname+name ": Xun Feiwang intelligence state
C) " company+surname+position ": news fly Wang president
D) " surname+position ": king president
Step 303, is formed corresponding described customized information entry by described customized information entry and described extension entry
Extension information.
It is to say, above-mentioned extension information not only includes the original customized information entry in customer data base, and
Include the extension entry obtained through extension.
As such, it is possible to formed a new data base by the extension entry of original entry and corresponding each original entry, this number
Extension information above-mentioned is included according to storehouse.
Visible, the extension of customized information entry improves the degree of freedom of user's inquiry, it is to avoid Query Information and entry
Not to the problem providing Query Result during correspondence.
It should be noted that the method for the embodiment of the present invention is applicable not only to network environment based on cloud computing, it is also possible to
Various digital devices are implanted as Embedded Application.Under cloud computing environment, it is respective that server acquisition different user is uploaded
Customized information (such as associated person information), completes the customized information extended operation of specific user, i.e. generates and specific user
Corresponding extension information.Server is after receiving the Query Information of user subsequently, obtains user identity, to should user
Extension information is inquired about corresponding entry and completes inquiry operation, and Query Result is supplied to user.And should in embedded system
In with, owing to user is unique, therefore can complete user personalized information extension when system initialization and look at follow-up
During inquiry, extend from user breath is inquired about corresponding entry complete inquiry operation.
Correspondingly, the embodiment of the present invention also provides for a kind of information query system, as shown in Figure 4, is a kind of knot of this system
Structure schematic diagram.
In this embodiment, described system includes:
Data base's acquiring unit 401, for obtaining the data base that user provides, comprises the individual character of user in described data base
Change information entry;
Entry expanding element 402, is used for based on the basic syntax extended model built in advance described customized information word
Bar is extended, and generates the extension information corresponding with described data base, and described basic syntax extended model is used for describing personalization
The propagation law of information;
Receive unit 403, for receiving user's Query Information to described data base;
Query unit 404, is used for after described reception unit 403 receives user's Query Information to described data base,
Inquire about the extension information corresponding with described data base, obtain the Query Result corresponding with described Query Information.
Described user personalized information entry refers to that some that user oneself preserves have certain particular community or feature
One class entry, the title catalogue etc. that such as address list, user are liked.
Described basic syntax extended model, for describing the propagation law of customized information, can use the side of off-line training
Formula, according to a large amount of customized informations gathered, such as contact information of customer (address list that such as user uploads), training in advance
Obtain.
Based on above-mentioned basic syntax extended model, user personalized information entry is extended, makes the word that extension obtains
Bar set can more freely describe the information that original entry is comprised.
Above-mentioned Query Information can be contact person's Query Information, such as, and " news fly Zhang Kai ", naturally it is also possible to be other inquiries
Information.Query unit 404 specifically can be inquired about looked into accordingly by modes such as coupling or identifications from described extension information
Ask result.
In actual applications, described system also can farther include: output unit (not shown), for by query unit
404 Query Results obtained return to user.
It should be noted that described Query Result can be the chain that the original entry in the data base that user provides is corresponding
Connect, such as telephone number, or the original entry in the data base that provides of user and link corresponding to this entry, by user
Judge whether correct, or extend entry and the link etc. of correspondence, this embodiment of the present invention is not limited.
Visible, compared with prior art, owing to the information query system of the embodiment of the present invention is not directly at original number
Inquire about according in storehouse, but based on basic syntax extended model, the user personalized information entry in data base is being expanded
The entry set that exhibition obtains is inquired about, thus is effectively improved inquiry degree of freedom and accuracy rate, preferably meet use
The demand that family is freely inquired about.
It should be noted that the information query system of the embodiment of the present invention can be applied not only to the inquiry of user contact
Environment, it is also possible to be applied in the inquiry environment of other customized informations, this embodiment of the present invention is not limited.
In actual applications, the structure of described basic syntax extended model can adopted in the way of using off-line training in a large number
On the user personalized information such as associated person information of collection, training in advance obtains, and is loaded into when described information query system starts.
The structure of described basic syntax extended model can also be completed when system initialization.
As it is shown in figure 5, be another structural representation of embodiment of the present invention information query system.
Unlike 4 illustrated embodiments, in this embodiment, described system also includes:
Extended model construction unit 501, is used for building basic syntax extended model.Described extended model construction unit 501
Including:
Entry acquiring unit 511, for obtaining the customized information entry of different user;
Attribute labeling unit 512, for described customized information entry is carried out attribute labeling, obtains sequence of attributes;
Marking model training unit 513, for training for describing the mapping between specifying information and described sequence of attributes
The marking model of relation;
Attribute extension model generation unit 514, is used for describing Message structure pattern for generating according to described sequence of attributes
Attribute extension model.
The attribute needing mark can determine according to the feature of user personalized information, such as, records for user communication
In associated person information, user's the biggest existing randomness when typing also has certain rule to follow.In general user's connection
It is that people's entry has generally comprised key element: surname, name, appellation (such as " father "), exabyte (such as " news fly "), position or title are (such as " warp
Reason "), occupation (such as " finishing "), relation (such as " colleague "), differentiating words (such as " newly "), number (such as " 2 "), other correlates (as
" Gas Company ") etc..To this end, attribute labeling unit 512 can be according to default contact person's common properties, such as " surname ", " name ",
" company " etc. carry out attribute labeling to concrete entry.
Equally, for other customized informations, it is also possible to preset the common properties of its correspondence, then belong to according to these
Property carries out attribute labeling to each concrete entry.
So, corresponding each entry, i.e. can get a sequence of attributes.
Marking model training unit 513 specifically can use statistical model, and such as CRF model, HMM etc., to specifying information
And the mapping relations between attribute are described, and training obtains model parameter, including hop frequencies on above-mentioned mark entry
And each shape probability of state etc., concrete training process is similar with traditional training process, is not described in detail at this.
A kind of specific embodiment of described attribute extension model generation unit 514 includes: statistics subelement and selection are single
Unit (not shown).Wherein:
Described statistics subelement, for adding up the frequency of various structural modelss in described sequence of attributes;
Described selection subelement, for selecting to meet pre-conditioned structural models as describing according to described frequency
The attribute extension model of Message structure pattern.
Described systemic presupposition condition for controlling the scale of the plurality of structure, can use setting structure number or
Structure frequency controls more than the method for predetermined threshold value.Such as, described selection subelement specifically can select frequency to be more than setting
The structural models of frequency threshold is as described attribute extension model;Or select to set the structure of number from high to low according to frequency
Pattern is as described attribute extension model.
It should be noted that the training of above-mentioned basic syntax extended model can customized information word based on different user
Bar is trained obtaining, and the information after so can making extension preferably supports the inquiry of the customized information of different user.
Based on above-mentioned basic syntax extended model, the one of entry expanding element in embodiment of the present invention information query system
Structure is as shown in Figure 6.
In this embodiment, described entry expanding element includes:
Determine subelement 601, for determining customized information entry according to the marking model in basic syntax extended model
Fundamental unit.
Specifically, it is determined that first subelement 601 can carry out word segmentation processing to customized information entry text, obtain correspondence
The segmentation sequence of the text;Then calculate this segmentation sequence path probability in described marking model, and select wherein probability
Maximum path is the attribute labeling that described participle is corresponding;Finally according to needs, attribute labeling is merged, obtain each key element
Unit.By said process, complete the conversion from concrete content of text to attribute.
Extension subelement 602, is used for according to the attribute extension model in basic syntax extended model described fundamental
Unit is extended, and obtains the extension entry corresponding with customized information entry, and by described customized information entry and described
Extension entry forms the extension information of corresponding described customized information entry.
It is to say, according to the structural models obtained in above-mentioned basic syntax spread training, to current Personalized information word
Bar is extended, and obtains the structural models of other common customized informations so that it is can be compatible various when follow-up is inquired about
Customized information structural models.As such, it is possible to by the extension entry of original entry and corresponding each original entry form one new
Data base, this data base includes extension information above-mentioned.
Visible, the extension of customized information entry improves the degree of freedom of user's inquiry, it is to avoid Query Information and entry
Not to the problem providing Query Result during correspondence.
It should be noted that the information query system of the embodiment of the present invention is applicable not only to network rings based on cloud computing
Border, it is also possible to implant various digital devices as Embedded Application.
Each embodiment in this specification all uses the mode gone forward one by one to describe, identical similar portion between each embodiment
Dividing and see mutually, what each embodiment stressed is the difference with other embodiments.Real especially for system
For executing example, owing to it is substantially similar to embodiment of the method, so describing fairly simple, relevant part sees embodiment of the method
Part illustrate.System embodiment described above is only schematically, wherein said illustrates as separating component
Unit can be or may not be physically separate, the parts shown as unit can be or may not be
Physical location, i.e. may be located at a place, or can also be distributed on multiple NE.Can be according to the actual needs
Select some or all of module therein to realize the purpose of the present embodiment scheme.Those of ordinary skill in the art are not paying
In the case of creative work, i.e. it is appreciated that and implements.
Being described in detail the embodiment of the present invention above, the present invention is carried out by detailed description of the invention used herein
Illustrating, the explanation of above example is only intended to help to understand the method and apparatus of the present invention;Simultaneously for this area one
As technical staff, according to the thought of the present invention, the most all will change, to sum up institute
Stating, this specification content should not be construed as limitation of the present invention.