Summary of the invention
For the deficiencies in the prior art, a kind of contact person convenient to operation is the object of the present invention is to provide to dial searching method.
Another object of the present invention is to provide a kind of contact person of mobile terminal to dial search system.
For achieving the above object, the technical solution used in the present invention is as follows: a kind of contact person of mobile terminal dials searching method, and the method comprises the following steps:
Set up dialed digit and alphabetical corresponding relation;
Read the contact data of mobile terminal system to go forward side by side row cache;
Extract the title of contact person and number, respectively title and number and dialed digit are set up search relation;
According to the dialed digit of search box input, match search is carried out to the title of contact person and number and in display box display of search results.
Further, described match search is searched for according to following rule:
The Chinese of contact person is converted into phonetic alphabet, and phonetic alphabet are carried out spelling respectively, initial mixes with syllable, the permutation and combination of simple initial,
The combination of the alphanumeric arrangement of gained is set up search relation with dialed digit,
Dialed digit according to search box input utilizes substring searching algorithm to carry out match search to contact name and number, provides preliminary Search Results.
Preferably, described method is further comprising the steps of:
According to coupling priority, general's choosing is carried out to Search Results, reject irrational Search Results, be specially: if Search Results is not with the beginning of the initial of corresponding relationship people, then think that Search Results is unreasonable, directly priority is decided to be negative, Search Results is directly rejected according to during prioritization;
Rational Search Results is sorted according to priority.
Preferably, the sequence of described priority is carried out according to following principle:
1) name search result is preferential, and number search result is taken second place;
2) starting point is mated preferential by the former;
3) the shorter person of string length is mated preferential;
4) Chinese initial search: when search string length is more than or equal to target strings length, target strings is that elder is preferential;
5) English search: when search string length is less than target strings length, target strings is that short person is preferential.
Further, in described display box, present the head portrait of contact person, title and number, when clicking head portrait, title, number wherein, namely triggering and dialing this number event.
Further, described method is further comprising the steps of:
Record the contact person searched for through search box in buffer memory to dial search result data;
After user directly leaves, when again entering program, in display box, show the Search Results of last registration in buffer memory.
In order to realize another object of the present invention, the present invention also adopts following technical scheme: a kind of contact person of mobile terminal dials search system, and this system comprises:
Set up the creation module of the corresponding relation of dialed digit and letter;
Read the contact data of mobile terminal system to go forward side by side the reading cache module of row cache;
Extract the title of contact person and number, respectively title and number and dialed digit are set up the conversion module of search relation;
According to the dialed digit of search box input, match search is carried out to the title of contact person and number and in display box the search module of display of search results.
Further, described search module is searched for according to following rule:
The Chinese of contact person is converted into phonetic alphabet, and phonetic alphabet are carried out spelling respectively, initial mixes with syllable, the permutation and combination of simple initial,
The combination of the alphanumeric arrangement of gained is set up search relation with dialed digit,
Dialed digit according to search box input utilizes substring searching algorithm to carry out match search to contact name and number, provides preliminary Search Results.
Preferably, described system also comprises:
Handsome modeling block, according to coupling priority, general's choosing is carried out to Search Results, reject irrational Search Results, be specially: if Search Results is not start with the initial of corresponding relationship people, then think that Search Results is unreasonable, directly priority is decided to be negative, Search Results is directly rejected according to during prioritization;
Order module, sorts rational Search Results according to priority.
Preferably, the sequence of described priority is carried out according to following principle:
1) name search result is preferential, and number search result is taken second place;
2) starting point is mated preferential by the former;
3) the shorter person of string length is mated preferential;
4) Chinese initial search: when search string length is more than or equal to target strings length, target strings is that elder is preferential;
5) English search: when search string length is less than target strings length, target strings is that short person is preferential.
Relative to prior art, technical solutions according to the invention are by setting up dialed digit and alphabetical corresponding relation; Read the contact data of mobile terminal system to go forward side by side row cache; Extract the title of contact person and number, respectively title and number and dialed digit are set up search relation; According to the dialed digit of search box input, match search is carried out to the title of contact person and number and in display box display of search results, dialing search is utilized to simplify input and search procedure, search operation is efficient and convenient, and according to prioritization display of search results, can meet the individual demand of user.
In order to understand object of the present invention, characteristic sum effect fully, be described further below with reference to the technique effect of accompanying drawing to design of the present invention, concrete structure and generation.
Embodiment
Describe the present invention in detail below in conjunction with accompanying drawing and specific implementation method, be used for explaining the present invention in exemplary embodiment and description of the present invention, but not as a limitation of the invention.
Embodiment one
As shown in Figure 1, a kind of contact person of mobile terminal dials search system, and this system comprises:
Set up the creation module of the corresponding relation of dialed digit and letter;
Read the contact data of mobile terminal system to go forward side by side the reading cache module of row cache;
Extract the title of contact person and number, respectively title and number and dialed digit are set up the conversion module of search relation;
According to the dialed digit of search box input, match search is carried out to the title of contact person and number and in display box the search module of display of search results, described search module is searched for according to following rule:
The Chinese of contact person is converted into phonetic alphabet, and phonetic alphabet are carried out spelling respectively, initial mixes with syllable, the permutation and combination of simple initial,
The combination of the alphanumeric arrangement of gained is set up search relation with dialed digit,
Dialed digit according to search box input utilizes substring searching algorithm to carry out match search to contact name and number, provides preliminary Search Results.
As shown in Figure 2, a kind of contact person of mobile terminal dials searching method, and the method comprises the following steps:
S101: set up dialed digit and alphabetical corresponding relation; During search, English alphabet with the corresponding relation of numeral is: abc → 2, def → 3, ghi → 4, jkl → 5, mno → 6, prqs → 7, tuv → 8, wxyz → 9.
S102: read the contact data of mobile terminal system and to go forward side by side row cache;
S103: extract the title of contact person and number, sets up search relation by title and number and dialed digit respectively;
S104: according to the dialed digit of search box input, match search is carried out to the title of contact person and number and in display box display of search results, described match search is searched for according to following rule: the Chinese of contact person is converted into phonetic alphabet, and phonetic alphabet are carried out spelling respectively, initial mixes with syllable, the permutation and combination of simple initial, the combination of the alphanumeric arrangement of gained is set up search relation with dialed digit, dialed digit according to search box input utilizes substring searching algorithm to carry out match search to contact name and number, provide preliminary Search Results.
For search " Zhang Shaohan "; " Zhang Shaohan " corresponding phonetic alphabet are " Zhang ShaoHan (94,264 7,426 426) "; also include in mobile terminal " Zhang Ziyi ", " Zhao Wei "; " Yang Liwei " wait contact person, the phonetic alphabet of its correspondence be respectively " Zhang Zi Yi (94,264 94 94) ", " Zhang Wei (94,264 934) ", " Yang Li Wei (9,264 54 934) ".
First corresponding to the initial character " Z " of input numeral is that " 9 " mate the character trail { Zhang Shao Han (94,264 7,426 426), Zhang ZiYi (94,264 94 94) ", " Zhao Wei (9,426 934), " Yang Li Wei (9,264 54 934) } filtering out and include " 9 " one by one in string data; Zhang Shaohan, Zhang Ziyi, Zhao Wei, the contact name of Yang Liwei and the Search Results of number is shown in display box;
Then corresponding to second character " h " of input numeral is that " 4 " are concentrated in character string and mated one by one, filters out the character string collected works character trail { Zhang Shao Han (94,264 7426426), Zhang Zi Yi (94,264 94 94) ", " Zhao Wei (9,426 934) } including " 94 "; Zhang Shaohan, Zhang Ziyi, Zhao Wei, the contact name of Yang Liwei and the Search Results of number is shown in display box;
Then corresponding to the 345 character " ang " of input numeral is that " 264 " are concentrated in character string and mated one by one, filters out the character string collected works character trail { Zhang ShaoHan (94,264 7,426 426), Zhang Zi Yi (94,264 94 94) " } including " 94264 "; Zhang Shaohan, the contact name of Zhang Ziyi and the Search Results of number is shown in display box;
Then corresponding to second character " S " of input numeral is that " 7 " are concentrated in character string and mated one by one, filters out the character string collected works character trail { Zhang Shao Han (942,647,426 426) } including " 94,264 7 "; The contact name of Zhang Shaohan and the Search Results of number is shown in display box.
Embodiment two
As shown in Figure 3, a kind of contact person of mobile terminal dials search system, comprising:
Contact data for reading mobile terminal system is gone forward side by side the reading cache module of row cache;
Title and number are also converted into numerical data by title and number for extracting each contact person respectively, use these numerical datas to set up suffix search tree and the conversion module be cached;
Numeral for inputting according to search box carries out the search module of match search in suffix search tree data; Described search module is searched for according to following rule: first corresponding to the initial character of input numeral is mated one by one in string data, filters out the character trail including initial character; Then to input the second character character string concentrate mate one by one, filter out the substring collection including the second character; By that analogy, step by step screening is mated according to above-mentioned rule to the character of follow-up input, draws the Search Results of coupling;
According to coupling priority, general's choosing is carried out to Search Results, reject the handsome modeling block of irrational Search Results, be specially: if Search Results is not start with the initial of corresponding relationship people, then think that Search Results is unreasonable, directly priority is decided to be negative, Search Results is directly rejected according to during prioritization;
Rational Search Results is carried out the order module sorted according to priority, the sequence of described priority is carried out according to following principle:
1) name search result is preferential, and number search result is taken second place.
As: Zhang Shaohan Zhang Shao Han (94,264 7,426 426): 18755554444 and Yang Liwei " Yang Li Wei (9,264 54 934): 18742637799.Search " 426 " match the title of Zhang Shaohan and the number of Yang Liwei, then simultaneously Zhang Shaohan is preferential.
2) starting point is mated preferential by the former.
Luo Zi Yi (586 94 94) as firm in Luo Zi ", Zhao Wei " Zhao Wei (9,426 934).Search " 99 " match Luo Ziyi and Zhao Wei simultaneously, but the coupling starting point of Zhao Wei is forward, therefore Zhao Wei is preferential.
3) the shorter person of string length is mated preferential.
Shorter person is preferential for coupling string length.As Zhang Ziqiang Zhang Zi Qiang (94,264 94 74264) ", Zhao Wei " Zhao Wei (9,426 934).Search " 99 " match Luo Ziyi and Zhao Wei simultaneously, but the coupling string ZW of Zhao Wei is shorter than the coupling string ZZQ of Zhang Ziqiang, therefore Zhao Wei is preferential.
4) Chinese initial search: when search string length is more than or equal to target strings length, target strings is that elder is preferential.
When search string length is more than or equal to target strings length, target strings be elder's preferential (corresponding Chinese initial search) as Chinese initial search time, as Zhao Wei Zhao Wei (9,426 934), with Zhang Zifeng Zhang Zi Feng (94,264 94 3364), search " 99 " match Zhang Zifeng and Zhao Wei simultaneously, but the target strings of Zhao Wei " Zhao Wei " is shorter than Zhang Zifeng target strings " Zhang Zifeng ", therefore Zhao Wei is preferential.
5) English search: when search string length is less than target strings length, target strings is that short person is preferential.
As English search for time, Abcde 22233 and target strings bbd 223. search string 22, bbd shorter than Abcde, then preferentially.
Present the head portrait of contact person, title and number in described display box, when clicking head portrait, title, number wherein, namely triggering and dialing this number event.
Record the contact person searched for through search box in buffer memory to dial search result data;
After user directly leaves, when again entering program, in display box, show the Search Results of last registration in buffer memory.
As shown in Figure 4, a kind of contact person of mobile terminal dials searching method, and the method comprises the following steps:
S201: set up dialed digit and alphabetical corresponding relation;
S202: read the contact data of mobile terminal system and to go forward side by side row cache;
S203: extract the title of contact person and number, sets up search relation by title and number and dialed digit respectively;
S204: according to the dialed digit of search box input, match search is carried out to the title of contact person and number and in display box display of search results, described match search is searched for according to following rule: the Chinese of contact person is converted into phonetic alphabet, and phonetic alphabet are carried out spelling respectively, initial mixes with syllable, the permutation and combination of simple initial, the combination of the alphanumeric arrangement of gained is set up search relation with dialed digit, dialed digit according to search box input utilizes substring searching algorithm to carry out match search to contact name and number, provide preliminary Search Results.
S205: according to coupling priority, general's choosing is carried out to Search Results, reject irrational Search Results, be specially: if Search Results is not start with the initial of corresponding relationship people, then think that Search Results is unreasonable, directly priority is decided to be negative, Search Results is directly rejected according to during prioritization; Rational Search Results is sorted according to priority.The sequence of described priority is carried out according to following principle:
1) name search result is preferential, and number search result is taken second place;
2) starting point is mated preferential by the former;
3) the shorter person of string length is mated preferential;
4) Chinese initial search: when search string length is more than or equal to target strings length, target strings is that elder is preferential;
5) English search: when search string length is less than target strings length, target strings is that short person is preferential.
S206: present the head portrait of contact person, title and number in described display box, when clicking head portrait, title, number wherein, namely triggering and dialing this number event.
S207: record the contact person searched for through search box in buffer memory and to dial search result data; After user directly leaves, when again entering program, in display box, show the Search Results of last registration in buffer memory.
Technical solutions according to the invention are by setting up dialed digit and alphabetical corresponding relation; Read the contact data of mobile terminal system to go forward side by side row cache; Extract the title of contact person and number, respectively title and number and dialed digit are set up search relation; According to the dialed digit of search box input, match search is carried out to the title of contact person and number and in display box display of search results, dialing search is utilized to simplify input and search procedure, search operation is efficient and convenient, and according to prioritization display of search results, can meet the individual demand of user.
If the function described in the present embodiment using the form of SFU software functional unit realize and as independently production marketing or use time, can be stored in a computing equipment read/write memory medium.Based on such understanding, the part of the part that the embodiment of the present invention contributes to prior art or this technical scheme can embody with the form of software product, this software product is stored in a storage medium, comprising some instructions in order to make a computing equipment (can be personal computer, server, mobile computing device or the network equipment etc.) perform all or part of step of method described in each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disc or CD etc. various can be program code stored medium.In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiment, between each embodiment same or similar part mutually see.
To the above-mentioned explanation of the disclosed embodiments, professional and technical personnel in the field are realized or uses the present invention.To be apparent for those skilled in the art to the multiple amendment of these embodiments, General Principle as defined herein can without departing from the spirit or scope of the present invention, realize in other embodiments.Therefore, the present invention can not be restricted to these embodiments shown in this article, but will meet the widest scope consistent with principle disclosed herein and features of novelty.