Background technology
Network instant communication (IM) instrument develops into today, is accepted by most netizen.Along with the user uses the growth of the time of IM software, the number of contacts of user in IM software is also more and more, has also caused the inconvenience of searching the contact person simultaneously.For this reason, more existing application software provide the mode by other data-gatherings contact person, and it mainly contains following several scheme:
1, OutLook addressee's match pattern
In OutLook addressee's input frame, when importing certain contact person's addresses of items of mail, real-time automatically appearance of input frame meeting and user import the addresses of items of mail of fuzzy matching.But the technical scheme of this realization is based on the fuzzy matching of single source module, and promptly the user can only import a kind of input mode of appointment, for example can only import claiming of contact person, realizes fuzzy matching then; And if the user remembers may be contact person's phone number, so just can't realize real-time fuzzy matching contact person.
2, search contact person's mode and convenient input search pattern in the enterprise instant communication tool
Two kinds of modes of searching matching associated person are arranged in enterprise instant communication tool, and a kind of is the English name of input contact person in convenient input frame, and the fuzzy matching contact person is similar with OutLook in real time; Another kind is in searching dialog box, both can import contact person's numbering, also can import contact person's English name and Chinese name or the like, click the contact person that next step can find the fuzzy matching of importing with the user then, but the shortcoming of this realization technical scheme is to realize and preceding a kind of real-time fuzzy matching that realizes.
What 3, carry in the windows Mobile system of Dopod (Dopod) mobile phone searches contact schema
After opening the contacts list of mobile phone, the input contact name, real-time fuzzy matching contact person, it is the fuzzy matching based on single source module.
In a word, search the contact person in the prior art or be the single source module fuzzy matching of employing, adopt the non real-time coupling of model for multiple sources, and the real-time mode matching way of model for multiple sources can not be provided, when the user searches the contact person, still have inconvenient shortcoming.
Summary of the invention
The invention provides a kind of method and device of matching associated person information, can not be to solve prior art based on the problem of real-time fuzzy matching associated person information under the model for multiple sources.
The invention provides following technical scheme:
A kind of method of matching associated person information comprises the steps:
A, captured in real time user's input operation is also extracted the content of user's input;
B, when extracting the content of user input, obtain a plurality of data item contents of each contact person according to identification of contacts, each data item content and input content are mated, and when data item content comprises the input content the corresponding contacts entries of record;
C, present the All Contacts's clauses and subclauses that write down in the matching process to the user.
The pre-defined field item that is used for the multi-source content match, each field item sign needs the contact data item of coupling; And when coupling, travel through the content that each field item obtains the contact data item.
Step B comprises the steps:
B1, get contact person grouping;
B2, from contact person grouping, get a contacts entries and obtain this identification of contacts;
B3, from a plurality of field items corresponding, get a field item with the contact data item of needs couplings;
B4, utilize identification of contacts, obtain the data item content of pairing this contact of field item, the content of this content and user's input is mated, and determining that data item content writes down this contacts entries when comprising the content of user's input as major key;
B5, judge whether to travel through the described field item that has, if, then carry out step B6, otherwise, get next field item and continue step B4;
B6, judge whether to have traveled through the All Contacts in the grouping, if, then carry out step B7, otherwise, from contact person's grouping, get next contacts entries and obtain this identification of contacts, continue step B3;
B7, judge whether to have traveled through All Contacts grouping, if, then carry out step C, otherwise, get next contact person's grouping, continue step B2.
Mate after the content of user input and data item content be converted to string format.
Judge also after the content of extracting user's input whether this content is empty, if empty, then waits for the next input operation of catching the user, if be not empty, then carries out subsequent step.
The contact data item content that to mate after mating first is saved in internal memory, to improve follow-up matching speed.
Perhaps the server from network obtains the contact data content in this locality obtains contact data.
A kind of device of matching associated person comprises the processor that is used for process information; This device also comprises:
Be used for captured in real time user's input operation and extract first module of user input content;
Be used for when extracting the content of user input, obtain contacts entries and obtain second module of identification of contacts;
Be used for the identification of contacts that obtains according to second module,, obtain the three module of the content of pairing this contact data item of each field item from a plurality of field items of the contact data item that is used for determining that needs mate;
Be used for contact person according to the acquisition of second module, first module user input content that extracts and the contact data content item content that three module obtains are mated, and when data item content comprises the content of user's input the four module of the contacts entries of record correspondence; And
Be used to present the 5th module of All Contacts's clauses and subclauses of four module record.
Adopt the present invention in user's contact data storehouse, to search the contact person, help the user to find the contact person that oneself need find more easily and efficiently according to contact person's the real-time fuzzy matching of various personal informations.
Embodiment
Fuzzy matching generally is meant content that the user imports and a kind of matching degree of source contents, user inputs character " Chinese " for example, then " Chinese character ", " Wuhan " and " archaic Chinese " is the content that satisfies condition.
Data for the contact person is that source contents can comprise contact person's basic document, for example contact person's number, user name and title; Can also comprise contact person's remarks data, remarks title for example, the remarks contact method can also be contact person's address list data in addition, contact person's addresses of items of mail for example, contact person's phone number etc.Wherein each in basic document, remarks data and the address list data is called the contact data item.
Model for multiple sources among the present invention is meant that real-time fuzzy matching contact person's source contents both can be the content in contact person's basic document, it can also be the content in contact person's remarks data, and the data of contact person's address list, as long as be a certain the content that the user remembers this contact person, contact person's number or claim for example, perhaps phone number, perhaps addresses of items of mail, perhaps the remarks title all can correctly match the contact person who satisfies user input content in real time, reaches the real-time fuzzy matching contact person's of multi-source requirement.
In order to mate conveniently, set up user's All Contacts's the tabular array of data structure, this data structure is used for all source contents items of storing contact, and for example contact person's number claims remarks title, phone number and addresses of items of mail etc.This array of data structures tabulation is saved in the internal memory, in the process that travels through for the first time, contact data is saved in the tabular array of this data structure, so that improve follow-up matching speed.
In some cases, do not need all data item contents are all mated, and the content of just mating wherein several data items, therefore can set up the list structure of the field item of multi-source content match, correspondence is the data item that can mate in this field item, and the field project that hope is mated is put in this list structure.The field item of implication is the whole data item of coupling.
In addition, also can set up the contact person's tabular array that satisfies the fuzzy matching requirement, satisfy in the content of the content of contact person's data item and user's input and to store this contacts entries (Item) when fuzzy matching requires, this tabular array mainly is convenient to follow-up list control and the tree-shaped control that refreshes in the main window, with the contacts entries that shows that the match is successful.
Content for captured in real time user input, can adopt the Window message WM_CBN_EDITCHANGE of similar response choice box control, this message mainly be the user in choice box in the input character, Windows catches keyboard, enters concrete matching treatment flow process then.
Because the user may import contact number, therefore non-character format content such as phone number is that the processing of follow-up fuzzy matching is convenient, is converted into unified string format.
Contacts entries generally leaves in the packetized file folder (Folder) by packet mode, can obtain identification of contacts by this packetized file folder, can navigate to contact person's source contents by this identification of contacts.Source contents can leave this locality in, also can leave on the server in the network.
Consult shown in Figure 1ly, the real-time fuzzy matching contact person's of model for multiple sources mode is as follows:
Button whenstep 100, system detect and catch the user import content in choice box.
The content ofstep 110, extraction user input from choice box.
Whether the content ofstep 120, judgement input is empty, if be not empty, then carry outstep 130, if empty, then returnstep 100 wait and catches user's button next time.
Step 130, from All Contacts grouping, get contact person's grouping.
Step 135, from contact person grouping, get a contacts entries and obtain this identification of contacts.
There is incidence relation between contacts entries and the identification of contacts, generally speaking, in the data structure of contact person's grouping, contacts entries and identification of contacts are deposited together by contacts, can certainly produce association by other modes, also allowing contacts entries is exactly identification of contacts.
Step 140, from the list structure of the field item of multi-source content match, get a field item.
Step 150, utilize identification of contacts thatstep 130 obtains,, obtain this contact person's data item content according to the represented data item of field item that step 140 obtains as major key.
For example, the field contents item is " basic document---claim ", then can utilize contact person's user ID number, obtains the related content that claims in the basic document in the data bank.
During first the coupling, if the contact data item not in this locality, then obtains on specified server.
Step 160, mate after the content of this content and user input is converted to string format, and when data item content comprises the content of user's input, this contacts entries is recorded the contact person's tabular array that satisfies the fuzzy matching requirement.
If this contact person is not present in the All Contacts's of foundation the tabular array of data structure, then it is added to this tabular array, to guarantee directly from internal memory, to obtain data item content next time.
Step 170, judge whether to have traveled through the described field item that has, if, then carry outstep 190, otherwise, carry outstep 180.
Step 180, in the list structure of the field item of multi-source content match, get next field item, and changestep 150.
Step 190, judge whether to have traveled through the All Contacts in the grouping, if then carry outstep 210; Otherwise carry outstep 200.
Step 200, from contact person's packetized file folder, get next contacts entries and obtain this identification of contacts, change step 140.
Step 210, judge whether to have traveled through all groupings, if, then carry outstep 230, otherwise, carry outstep 220.
Step 220, get next contact person grouping, changestep 135.
Step 230, will satisfy that as seen each contacts entries (Item) is set in contact person's tabular array of fuzzy matching requirement, and refresh the tabulation or the tree-shaped control of main window correspondence again.So just can in user's input process, Real Time Observation reach the convenience that the user uses to satisfying the contacts list that fuzzy matching requires.
Consult shown in Figure 2, associatedperson information coalignment 50 is a device with information processing capability, except comprising thatprocessor 500 grades that are used for process information realize also comprisingfirst module 501,second module 502, threemodule 503, fourmodule 504 the5th module 505 that have annexation in logic withprocessor 500 basic element of character of computer installation.Wherein:
First module 501 is used to catch user's input operation and extracts user input content.
Second module 502 is used to obtain contacts entries and obtains identification of contacts.
Threemodule 503 is used for the identification of contacts that obtains according to second module, from a plurality of field items of the contact data item that is used for determining that needs mate, obtains the content of pairing this contact data item of each field item.
Fourmodule 504, be used for contact person according to the acquisition of second module, first module user input content that extracts and the contact data content item content that three module obtains are mated, and when data item content comprises the content of user's input the contacts entries of record correspondence.
The5th module 505 is used to present the 5th module of All Contacts's clauses and subclauses of four module record.
Described fourmodule 504 compares after the content of contact data item content and user input is converted to string format.
Obviously, those skilled in the art can carry out various changes and modification to the present invention and not break away from the spirit and scope of the present invention.Like this, if of the present invention these are revised and modification belongs within the scope of claim of the present invention and equivalent technologies thereof, then the present invention also is intended to comprise these changes and modification interior.