CN105187633B - Mobile phone number display method and device - Google Patents
Mobile phone number display method and device Download PDFInfo
- Publication number
- CN105187633B CN105187633B CN201510478485.XA CN201510478485A CN105187633B CN 105187633 B CN105187633 B CN 105187633B CN 201510478485 A CN201510478485 A CN 201510478485A CN 105187633 B CN105187633 B CN 105187633B
- Authority
- CN
- China
- Prior art keywords
- area code
- local number
- user
- international area
- international
- 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.)
- Expired - Fee Related
Links
- 238000000034 method Methods 0.000 title claims abstract description 75
- 230000014509 gene expression Effects 0.000 claims abstract description 60
- 238000000926 separation method Methods 0.000 claims abstract description 55
- 238000004321 preservation Methods 0.000 claims description 23
- 230000008569 process Effects 0.000 description 21
- 238000004891 communication Methods 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 5
- 230000005611 electricity Effects 0.000 description 3
- 230000006870 function Effects 0.000 description 3
- 210000004556 brain Anatomy 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 210000003733 optic disk Anatomy 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 230000001902 propagating effect Effects 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Landscapes
- Telephone Function (AREA)
- Mobile Radio Communication Systems (AREA)
Abstract
The embodiment of the invention discloses a method and a device for displaying a mobile phone number, wherein a terminal determines an international area code and a target local number corresponding to the local number, determines a regular expression corresponding to the international area code according to the stored corresponding relation between each international area code and the regular expression, generates a separation format of the local number by adopting the regular expression, and displays the international area code and the target local number separated by adopting the separation format. Correspondingly, the embodiment of the invention provides a mobile phone number display device. In the embodiment of the invention, the separation format of the local number is generated, and the separation format is adopted to guide the user to input, so that the accuracy of the mobile phone number provided by the user can be improved, the failed operation of the user when the user uses the mobile phone number to register is avoided, and the user experience is improved.
Description
Technical field
The present invention relates to wireless communication system, more particularly to a kind of phone number display methods and device.
Background technology
With the fast development of Internet technology, types of applications gradually increases, and is brought very for the work and life of people
It is mostly convenient.And in mobile internet era of today, mobile terminal is increasingly becoming the important tool of people's work and life.User
In order to use the application of various functions, generally requires input handset number and registered or logged in.
Phone number includes in the world:International area code and local number, user are carrying out account using phone number
Number registration when, need to input the phone number.But due to the human-subject test of user difference, some possible users be not aware that or
It does not know the international area code of oneself the country one belongs to, therefore the phone number of input will be caused invalid, used to influence user
Related application;In addition, the local number length of country variant and differing, user usually can when carrying out local number input
The case where being inputted according to original custom, being not in inevitably few input one or multi input one, will also cause to input
Phone number it is invalid, to influence user use related application.
Invention content
The embodiment of the invention discloses a kind of phone number display methods and device, can solve how to improve phone number
Input accuracy the problem of.
In a first aspect, the embodiment of the invention discloses a kind of phone number display methods, the method is applied to terminal, institute
The method of stating includes:
Determine the corresponding international area code of local number;
Determine that the number that user inputs in precalculated position is target local number;
According to the correspondence of each of preservation international area code and regular expression, determine that the international area code is corresponding just
Then expression formula;
Using the determining regular expression, the separation format of local number is generated, shows the determining International Zone
Number and using it is described separation format separate the target local number.
It is described using the determining regular expression as another embodiment of the present invention, generate the separation of local number
After format, the method further includes:
It generates the international area code and separates the number example of local number by the separation format;
The number example is shown.
As another embodiment of the present invention, the corresponding international area code of the determining local number includes following at least one:
The Mobile Country Code MCC in client identification module SIM card is read, local number pair is determined according to the Mobile Country Code MCC
The international area code answered;
The location information of the terminal is obtained, determines the corresponding international area code of local number according to the positional information;
The IP address for reading the terminal determines the corresponding international area code of local number according to the IP address;With
International area code input by user is received, the international area code received is corresponding as determining local number
International area code.
As another embodiment of the present invention, the method further includes:
Whether judge in local number input by user comprising preset at least one forbidden character;
If so, carrying out one kind in operations described below:
Forbidden character in the local number is deleted, the prompt comprising forbidden character in the local number is generated and believes
It ceases and shows;With generate and whether delete prompt message and the display of forbidden character.
As another embodiment of the present invention, the method further includes:
Determine that digit N, the N that the international area code includes are the natural number more than 0;
Judge whether the top N of local number input by user is identical as the international number;
If so, generating the prompt message repeatedly input and being shown.
As another embodiment of the present invention, the method further includes:
Judge whether the length of local number input by user is identical as the corresponding number length of world area code of preservation;
When different, generate number error prompt message and show.
Second aspect, an embodiment of the present invention provides a kind of phone number display devices, are applied to terminal, described device packet
It includes:
First determining module, for determining the corresponding international area code of local number;Determine what user inputted in precalculated position
Number is target local number;
Second determining module determines institute for the correspondence according to each of preservation international area code and regular expression
State the corresponding regular expression of international area code;
Display module, for using the determining regular expression, generating the separation format of local number, display determines
The international area code and the target local number that is separated using the separation format.
As another embodiment of the present invention, the display module is additionally operable to generate the international area code and by described point
Separate the number example of local number every format;The number example is shown.
As another embodiment of the present invention, first determining module is specifically used for true using following at least one method
Determine the corresponding international area code of local number:The Mobile Country Code MCC in client identification module SIM card is read, according to the mobile national
Code determines the corresponding international area code of the local number;The location information for obtaining the terminal, determines according to the positional information
The corresponding international area code of the local number;The IP address for reading the terminal determines described local number according to the IP address
The corresponding international area code of code;With receive international area code input by user, using the international area code received as the institute of determination
State the corresponding international area code of local number.
As another embodiment of the present invention, described device further includes:
Judgment module, for whether judging in local number input by user comprising preset at least one forbidden character;
Execution module, for when the judging result of judgment module is to be, carrying out one kind in operations described below:By described
Forbidden character in ground number is deleted, and the prompt message comprising forbidden character and display in the local number are generated;With generation
Whether the prompt message of forbidden character and display are deleted.
As another embodiment of the present invention, described device further includes:
Judgment module, for determining that digit N, the N that the international area code includes are the natural number more than 0;Judge to use
Whether the top N of the local number of family input is identical as the international number;
Execution module, for when the judging result of judgment module is to be, generating the prompt message repeatedly input and progress
Display.
As another embodiment of the present invention, described device further includes:
Whether judgment module, the length for judging local number input by user are corresponding with the world area code of preservation
Number length is identical;
Execution module, for being when not used, to generate number error prompt message and show when the judging result of judgment module.
The third aspect, an embodiment of the present invention provides a kind of storage mediums, wherein the storage medium applies journey for storing
Sequence, the application program for executing a kind of phone number display methods described in the embodiment of the present invention at runtime.
Fourth aspect, an embodiment of the present invention provides a kind of application programs, wherein the application program for holding at runtime
A kind of phone number display methods described in the row embodiment of the present invention.
5th aspect, an embodiment of the present invention provides a kind of terminals, are shown suitable for phone number, including:
Processor, memory, communication interface and bus;
The processor, the memory are connected by the bus with the communication interface and complete mutual lead to
Letter;
The memory stores executable program code;
The processor can perform to run with described by reading the executable program code stored in the memory
The corresponding program of program code, for:
Determine the corresponding international area code of local number;
Determine that the number that user inputs in precalculated position is target local number;
According to the correspondence of each of preservation international area code and regular expression, determine that the international area code is corresponding just
Then expression formula;
Using the determining regular expression, the separation format of local number is generated, shows the determining International Zone
Number and using it is described separation format separate the target local number.
An embodiment of the present invention provides a kind of phone number display methods and device, terminal determines local number in this method
Corresponding world area code simultaneously determines target local number input by user, according to the international area code of each of preservation and regular expression
Correspondence, determine the corresponding regular expression of world area code, using the regular expression generate phone number separation
Format, the target local number for showing the international area code and being separated using the separation format.Due in embodiments of the present invention
The separation format for generating local number using separation format guiding user's input, therefore can improve the hand of user's offer
The accuracy of machine number, failure operation when user being avoided to be registered using phone number improve the experience of user.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is that a kind of phone number provided in an embodiment of the present invention shows process;
Fig. 2 is the process that another phone number provided in an embodiment of the present invention is shown;
Fig. 3 is a kind of detailed implementation process that phone number is shown provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of phone number display device provided in an embodiment of the present invention.
Specific implementation mode
In order to effectively guide user to input correct phone number, avoid carrying out the mistake using registration using phone number
It loses, provides a kind of phone number display methods and device.
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art are obtained every other without creative efforts
Embodiment shall fall within the protection scope of the present invention.
In practical applications, it needs to register in user, log in some application, or receive the scene of the identifying code of some application
Under, it may all use the phone number of oneself.The phone number includes:International area code and local number, generally in input,
Local number can be merely entered.
Fig. 1 is that a kind of phone number provided in an embodiment of the present invention shows that process, this method are applied to terminal, the process packet
Include following steps:
S101:Determine the corresponding international area code of local number.
The whole world phone number include:International area code+local number.Local number herein is described in the narrow sense for us
Phone number, such as 138****3800 etc..User generally requires whole mobile phone number when being registered using phone number,
Need international area code+local number.The international area code of country variant is different, it is therefore desirable to determine the corresponding world of local number
Area code.
The combination of a kind of method or several method may be used when determining the corresponding international area code of local number, such as
The window for carrying out international area code input can be directly provided a user, international area code input by user is corresponded to as local number
International area code, or can also be the geographical location according to terminal, the country where the terminal determined, so that it is determined that the mobile phone
Country of number home etc..
S102:Determine that the number that user inputs in precalculated position is target local number.
In order to realize the input of user's local number, corresponding input frame, terminal root are shown in the precalculated position of terminal
According to the number that user inputs in the precalculated position, using the number as target local number.
It should be noted that the limitation of execution sequence not stringent step S101 and step S102, step S102 can be with
It executes before step S101 or later, step S101 can also be performed simultaneously with step S102.The embodiment of the present invention is to this
It is not limited.
S103:According to the correspondence of each of preservation international area code and regular expression, determine that the world area code corresponds to
Regular expression.
As previously mentioned, the international area code of country variant is different, and the length of the local number of each country is also different, in order to
It prompts user to carry out the input of local number, the local number of different length is directed in embodiments of the present invention, using different
Separate format to show, each is separated format and is expressed using regular expression.Such as the local number length of China is 11,
It can be international area code-3-4-4 then to separate format, or international area code-4-3-3, each separates format point
It is not expressed with corresponding regular expression.
Therefore the correspondence of each international area code and regular expression is preserved in the terminal, each world area code can be with
A corresponding regular expression, can also correspond to more than two regular expressions.When international area code correspond to it is more than two just
Then when expression formula, when prompting user to input local number, a regular expression can be arbitrarily selected, using the regular expressions
Formula corresponding separation format shows local number.
The prior art is wherein belonged to according to the process for separating format generation regular expression, in embodiments of the present invention to this
Process is without repeating.
S104:Using the determining regular expression, the separation format of local number is generated, shows the determining world
Area code and the target local number separated using the separation format.
Due to preserving the correspondence of each international area code and regular expression in terminal, when local number pair is determined
After the international area code answered, it may be determined that the corresponding regular expression of world area code generates cell-phone number according to the regular expression
The separation format of code, which can be used for separating target local number input by user, and when being shown, display is true
Fixed international area code and the target local number separated using the separation format.Such as the separation format is:3-4-4,
Local number input by user is 13112345678, and international area code is 86, then can be according to the shape of+86-131-1234-5678
Formula shows local number, or can be shown according to the form of+86 131-1234-5678.
The process that separation format is generated according to regular expression belongs to the prior art, in embodiments of the present invention to the process
Without repeating.
Due to generating the separation format of local number in embodiments of the present invention, using the separation format, guiding user is defeated
Enter, therefore the accuracy of the local number of user's offer can be provided, user is avoided to improve the failure of application registration process
The experience of user.
The application of above-mentioned implementation process in the terminal, which is opened when being registered, to be executed, and the separation lattice of local number are generated
Formula, and the target local number input by user for showing international area code in input frame and separating according to the separation format.
When being equipped with client identification module (SIM card) in the terminal, can be obtained by the information in reading SIM card
The local number of the acquisition is shown to user by the local number of the user, after user confirms, by local number after the confirmation
Code is used as local number input by user.But with the upgrading of SIM card, operator is gradual to the secret protection of user
Reinforce, terminal possibly can not obtain the local number of user from SIM card, be used in such a case, it is possible to provide a user
The input frame of local number input, and show the corresponding international area code of local number and in input frame according to the separation format point
Every local number input by user.Wherein terminal obtains the process of the local number of user from SIM card and belongs to the prior art, this
Inventive embodiments do not repeat the process.
The terminal includes in embodiments of the present invention:The terminals such as mobile terminal, PC, tablet computer, smart television.
In order to further increase the accuracy of phone number input by user, effectively user is prompted, in this hair
In bright one embodiment, the method further includes:
It generates the international area code and separates the number example of local number by the separation format;
The number example of generation is shown to user.
It, can be according to international area code and the separation format after the separation format that regular expression generates local number is determined
Number example is generated, which is shown to user.It specifically can be in the below or above of local number input frame
Show the number example.
Fig. 2 is the process that another phone number provided in an embodiment of the present invention is shown, which includes:
S201:It determines the corresponding international area code of local number, determines that the number that user inputs in precalculated position is target sheet
Ground number.
S202:According to the correspondence of each of preservation international area code and regular expression, determine that the world area code corresponds to
Regular expression.
S203:Using the determining regular expression, the separation format of local number is generated, shows the determining world
Area code and the target local number separated using the separation format.
S204:The number example for generating the international area code and the local number separated by the separation format, will generate
The number example shown.
In a kind of specific implementation mode of the present invention, when being equipped with client identification module SIM card in the terminal, example
When such as the terminal is mobile terminal, described can be determined according to the Mobile Country Code MCC with the Mobile Country Code MCC in reading SIM card
The corresponding international area code of ground number.
It is understood that each country has unique Mobile Country Code MCC (Mobile Country Code, MCC), and
Unique world area code.Include the information of Mobile Country Code MCC MCC in SIM card, it, can be with after reading Mobile Country Code MCC MCC
According to Mobile Country Code MCC MCC, determines its corresponding international area code, which is determined as the corresponding world of local number
Area code.For example, the Mobile Country Code MCC MCC read from SIM card is 460, according to Mobile Country Code MCC MCC, it may be determined that its
Corresponding world area code is 86, and by the world, area code is determined as the corresponding international area code of local number.
In another specific implementation mode of the present invention, when the terminal does not install SIM card, such as the terminal is electricity
Brain, smart television or tablet computer etc. can obtain the location information of the terminal, according to the positional information determine described in
The corresponding international area code of local number.
When not installing SIM card in terminal used by a user, the Mobile Country Code MCC MCC in reading SIM card can not be passed through
International area code is obtained, the location information of terminal can be obtained at this time, according to the country corresponding to the location information, determine local number
The corresponding international area code of code.Specifically, can be according to global positioning system (the Global Positioning in terminal
System, GPS) module, determine the location information of the terminal.According to location information, the country corresponding to the location information is determined
Belong to the prior art, in embodiments of the present invention to the process without repeating.
In another specific implementation mode of the present invention, when the terminal does not install SIM card, such as the terminal is electricity
Brain, smart television or tablet computer etc. can also determine local according to the IP address of the terminal of reading according to the IP address
The corresponding international area code of number.This is because some terminals may not have GPS module, in order to determine the corresponding world of local number
Area code can determine the country where terminal by the IP address of reading terminals, according to the country where terminal, determine local
The corresponding international area code of number.Wherein by IP address, the country where determining terminal belongs to the prior art, implements in the present invention
To the process without repeating in example.
The international area code that user the country one belongs to perhaps can't be obtained through the above way, can provide a user state at this time
The input window of border area code, for receiving international area code input by user, using international area code input by user as the institute obtained
State the corresponding international area code of local number.In addition, the corresponding international area code of the local number ought be obtained through the above way
Afterwards, the international area code of acquisition can be shown, show user, and prompt the user whether to change, this is because if with
Family be currently located country it is non-its belong to state when, i.e., user foreign countries registered using cell-phone number when, currently determine terminal
The corresponding international area code of the international area code of the country one belongs to and the local number is different, therefore in embodiments of the present invention in order to improve
The accuracy of cell-phone number input prompts the user whether to modify, preserve after obtaining local number corresponding international area code
And show the modified international area code of user.
When determining the corresponding international area code of local number, a kind of any of the above described embodiment may be used, can also use
The combination of above-mentioned several embodiments can carry out arbitrary combination according to demand when specifically used.
In another embodiment of the present invention, in order to further improve the correct of phone number input by user
Property, the method further includes:
Judge whether the length of local number input by user is identical as the corresponding number length of world area code of preservation;
When different, generate number error prompt message and show.
It is understood that the length of the local number of country variant is different, such as its Chinese local number
It it is 11, the local number in the U.S. is 10.Therefore it according to the number length of the local number of each country, can be directed to each
International area code preserves the number length of its corresponding local number.It, can be according to the preservation after user has input local number
The corresponding number length of world area code, judge local number input by user length whether the world area code with preservation
Corresponding number length is identical, if it is different, number error prompt message is generated, to prompt its phone number for being inputted of user
Length it is problematic, it may be possible to user's multi input has input several bit digitals less, then can make length of the user to phone number
Degree is modified, so that user inputs correct phone number.
Fig. 3 is a kind of detailed implementation process that phone number is shown provided in an embodiment of the present invention, which includes following
Step:
S301:It determines the corresponding international area code of local number, determines that the number that user inputs in precalculated position is target sheet
Ground number.
S302:According to the correspondence of each of preservation international area code and regular expression, determine that the world area code corresponds to
Regular expression.
S303:Using the determining regular expression, the separation format of local number is generated, the separation format is for showing
Show local number.
S304:It generates the international area code and separates the number example of local number by the separation format, it will be described
Number example is shown.
S305:Judge the length of local number input by user number length whether corresponding with the world area code of preservation
It is identical, if not, S306 is carried out, if so, carrying out the process registered according to phone number.
S306:It generates number error prompt message and shows.
In another embodiment of the present invention, in order to further improve the correct of phone number input by user
Property, the method further includes:
Whether judge in local number input by user comprising preset at least one forbidden character;
If so, carrying out one kind in operations described below:
Forbidden character in the local number is deleted, the prompt comprising forbidden character in the local number is generated and believes
It ceases and shows;With generate and whether delete prompt message and the display of forbidden character.
Local number generally is number, and it is non-may to input some during carrying out local number input by user
The character of method, such as alphabetical O mistakes are considered that number 0 inputs, or have input other letters, punctuation mark etc. or right
For the local number of some countries, some numbers can not possibly appear in first, such as its Chinese local number
First place is unlikely to be other numbers except 1.
Therefore in order to improve accuracy input by user, each international area code can be directed to and preserve its corresponding illegal word
Symbol, the forbidden character can be directed to entire local number, such as be for the preset forbidden character of entire local number
Letter, punctuation mark etc., you can with any one that is interpreted as the local number all cannot be letter or punctuation mark.Certainly
The forbidden character can also be to be arranged for a certain position of local number, such as the first place of local number, it is non-that its is arranged
Method character is 0,2~9, i.e., the first place of the local number cannot be any number in 0 or 2~9.Each world area code
Corresponding forbidden character may be the same or different, and need the local number rule according to each country to be set, certainly
With being continuously increased for local number quantity, its possible corresponding forbidden character can also change, therefore can be as needed
Flexibly corresponding forbidden character is adjusted.
When judging in local number input by user comprising preset at least one forbidden character, following wherein one is carried out
Kind operation:Forbidden character in the local number is deleted, the prompt comprising forbidden character in the local number is generated and believes
It ceases and shows;With generate and whether delete prompt message and the display of forbidden character.To prompt its phone number for being inputted of user
In include forbidden character, it may be possible to comprising punctuation mark either letter or a certain position apparent error, then can make user couple
Phone number is modified, so that user inputs correct phone number.
In another embodiment of the present invention, in order to further improve the correct of phone number input by user
Property, the method further includes:
Determine that digit N, the N that the international area code includes are the natural number more than 0;
Judge whether the top N of local number input by user is identical as the international number;
If so, generating the prompt message repeatedly input and being shown.
The input habit of different user is different, and some users get used to inputting International Zone simultaneously when inputting local number
Number, it can lead to the international area code that repetition is contained in finally obtained phone number (international area code+local number) in this way, and because
The input space that local number is occupied for international area code leads to not get correct local number.Therefore, in the present invention
In embodiment in order to ensure input phone number accuracy, the digit N that can include according to the world area code, according to the position
Number N judges whether the top N of local number input by user is identical as the international number.When judging local number input by user
In comprising international area code when, generate the prompt message repeatedly input and shown, user is prompted to repeatedly input international area code,
So that user is modified phone number, so that user inputs correct phone number.
Fig. 4 is a kind of structural schematic diagram of phone number display device provided in an embodiment of the present invention, which is applied to
Terminal, including:
First determining module 41, for determining the corresponding international area code of local number;Determine that user inputs in precalculated position
Number be target local number;
Second determining module 42 is determined for the correspondence according to each of preservation international area code and regular expression
The corresponding regular expression of the world area code;
Display module 43, for using the determining regular expression, generating the separation format of local number, display is true
The fixed international area code and the target local number separated using the separation format.
The display module 43 is additionally operable to the local number for generating the international area code and separating by the separation format
Number example;The number example of generation is shown.
First determining module 41, specifically for determining the corresponding world of local number using following at least one method
Area code reads the Mobile Country Code MCC in client identification module SIM card, the local number pair is determined according to the Mobile Country Code MCC
The international area code answered;The location information of the terminal is obtained, determines the corresponding state of the local number according to the positional information
Border area code;The IP address for reading the terminal determines the corresponding international area code of the local number according to the IP address;With connect
International area code input by user is received, using the international area code received as the determining corresponding International Zone of the local number
Number.
Described device further includes:
Judgment module 44, for judging in local number input by user whether to include the preset illegal word of at least one
Symbol;
Execution module 45, for when the judging result of judgment module is to be, carrying out one kind in operations described below:It will be described
Forbidden character in local number is deleted, and the prompt message comprising forbidden character and display in the local number are generated;With life
At whether deleting prompt message and the display of forbidden character.
Described device further includes:
Judgment module 44, for determining that digit N, the N that the international area code includes are the natural number more than 0;Judge
Whether the top N of local number input by user is identical as the international number;
Execution module 45, for when the judging result of judgment module is to be, generating the prompt message repeatedly input and going forward side by side
Row display.
Described device further includes:
Whether judgment module 44, the length for judging local number input by user are corresponding with the world area code of preservation
Number length it is identical;
Execution module 45, for being when not used, to generate number error prompt message and show when the judging result of judgment module
Show.
To achieve the goals above, the embodiment of the present invention additionally provides a kind of storage medium, wherein the storage medium is used for
Application program is stored, the application program for executing a kind of phone number display side described in the embodiment of the present invention at runtime
Method.Wherein, a kind of phone number display methods described in the embodiment of the present invention includes:
Determine the corresponding international area code of local number;
Determine that the number that user inputs in precalculated position is target local number;
According to the correspondence of each of preservation international area code and regular expression, determine that the international area code is corresponding just
Then expression formula;
Using the determining regular expression, the separation format of local number is generated, shows the determining International Zone
Number and using it is described separation format separate the target local number.
To achieve the goals above, the embodiment of the present invention additionally provides a kind of application program, wherein the application program is used for
A kind of phone number display methods described in the embodiment of the present invention is executed at runtime.Wherein, one described in the embodiment of the present invention
Kind phone number display methods, including:
Determine the corresponding international area code of local number;
Determine that the number that user inputs in precalculated position is target local number;
According to the correspondence of each of preservation international area code and regular expression, determine that the international area code is corresponding just
Then expression formula;
Using the determining regular expression, the separation format of local number is generated, shows the determining International Zone
Number and using it is described separation format separate the target local number.
The embodiment of the present invention additionally provides a kind of terminal, is shown suitable for phone number, including:
Processor, memory, communication interface and bus;
The processor, the memory are connected by the bus with the communication interface and complete mutual lead to
Letter;
The memory stores executable program code;
The processor can perform to run with described by reading the executable program code stored in the memory
The corresponding program of program code, for:
Determine the corresponding international area code of local number;
Determine that the number that user inputs in precalculated position is target local number;
According to the correspondence of each of preservation international area code and regular expression, determine that the international area code is corresponding just
Then expression formula;
Using the determining regular expression, the separation format of local number is generated, shows the determining International Zone
Number and using it is described separation format separate the target local number.
An embodiment of the present invention provides a kind of phone number display methods and device, terminal determines local number in this method
Corresponding world area code simultaneously determines target local number input by user, according to the international area code of each of preservation and regular expression
Correspondence, determine the corresponding regular expression of world area code, using the regular expression generate phone number separation
Format, the target local number for showing the international area code and being separated using the separation format.Due in embodiments of the present invention
The separation format for generating local number using separation format guiding user's input, therefore can improve the hand of user's offer
The accuracy of machine number, failure operation when user being avoided to be registered using phone number improve the experience of user.
For systems/devices embodiment, since it is substantially similar to the method embodiment, so the comparison of description is simple
Single, the relevent part can refer to the partial explaination of embodiments of method.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality
Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation
In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to
Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those
Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment
Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that
There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment
Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality
For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method
Part explanation.
Expression or logic and/or step described otherwise above herein in flow charts, for example, being considered use
In the order list for the executable instruction for realizing logic function, may be embodied in any computer-readable medium, for
Instruction execution system, device or equipment (system of such as computer based system including processor or other can be held from instruction
The instruction fetch of row system, device or equipment and the system executed instruction) it uses, or combine these instruction execution systems, device or set
It is standby and use.For the purpose of this specification, " computer-readable medium " can any can be included, store, communicating, propagating or passing
Defeated program is for instruction execution system, device or equipment or the dress used in conjunction with these instruction execution systems, device or equipment
It sets.The more specific example (non-exhaustive list) of computer-readable medium includes following:Electricity with one or more wiring
Interconnecting piece (electronic device), portable computer diskette box (magnetic device), random access memory (RAM), read-only memory
(ROM), erasable edit read-only storage (EPROM or flash memory), fiber device and portable optic disk is read-only deposits
Reservoir (CDROM).In addition, computer-readable medium can even is that the paper that can print described program on it or other are suitable
Medium, because can be for example by carrying out optical scanner to paper or other media, then into edlin, interpretation or when necessary with it
His suitable method is handled electronically to obtain described program, is then stored in computer storage.
It should be appreciated that each section of the present invention can be realized with hardware, software, firmware or combination thereof.Above-mentioned
In embodiment, software that multiple steps or method can in memory and by suitable instruction execution system be executed with storage
Or firmware is realized.It, and in another embodiment, can be under well known in the art for example, if realized with hardware
Any one of row technology or their combination are realized:With the logic gates for realizing logic function to data-signal
Discrete logic, with suitable combinational logic gate circuit application-specific integrated circuit, programmable gate array (PGA), scene
Programmable gate array (FPGA) etc..
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all
Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention
It is interior.
Claims (10)
1. a kind of phone number display methods, which is characterized in that the method is applied to terminal, the method includes:
Determine the corresponding international area code of local number;
Determine that the number that user inputs in precalculated position is target local number;
According to the correspondence of each of preservation international area code and regular expression, the corresponding canonical table of the international area code is determined
Up to formula;
Using the determining regular expression, the separation format of local number is generated, generate the international area code and passes through institute
It states and separates the number example that format separates local number, the number example is shown, shows the determining International Zone
Number and using it is described separation format separate the target local number.
2. the method as described in claim 1, which is characterized in that the corresponding international area code of the determining local number includes following
It is at least one:
The Mobile Country Code MCC in client identification module SIM card is read, determines that local number is corresponding according to the Mobile Country Code MCC
International area code;
The location information of the terminal is obtained, determines the corresponding international area code of local number according to the positional information;
The IP address for reading the terminal determines the corresponding international area code of local number according to the IP address;With
International area code input by user is received, using the international area code received as the determining corresponding world of local number
Area code.
3. such as claim 1-2 any one of them methods, which is characterized in that the method further includes:
Whether judge in local number input by user comprising preset at least one forbidden character;
If so, carrying out one kind in operations described below:
By in the local number forbidden character delete, generate in the local number comprising forbidden character prompt message simultaneously
Display;With generate and whether delete prompt message and the display of forbidden character.
4. such as claim 1-2 any one of them methods, which is characterized in that the method further includes:
Determine that digit N, the N that the international area code includes are the natural number more than 0;
Judge whether the top N of local number input by user is identical as the international area code;
If so, generating the prompt message repeatedly input and being shown.
5. such as claim 1-2 any one of them methods, which is characterized in that the method further includes:
Judge whether the length of local number input by user is identical as the corresponding number length of world area code of preservation;
When different, generate number error prompt message and show.
6. a kind of phone number display device, which is characterized in that be applied to terminal, described device includes:
First determining module, for determining the corresponding international area code of local number;Determine the number that user inputs in precalculated position
For target local number;
Second determining module determines the state for the correspondence according to each of preservation international area code and regular expression
The corresponding regular expression of border area code;
Display module, for using the determining regular expression, generating the separation format of local number, generating the world
Area code and the number example for separating local number by the separation format, the number example are shown, display determines
The international area code and the target local number that is separated using the separation format.
7. device as claimed in claim 6, which is characterized in that it is following at least to be specifically used for use for first determining module
A kind of method determines the corresponding international area code of local number:The Mobile Country Code MCC in client identification module SIM card is read, according to institute
It states Mobile Country Code MCC and determines the corresponding international area code of the local number;The location information for obtaining the terminal, according to institute's rheme
Confidence breath determines the corresponding international area code of the local number;The IP address for reading the terminal is determined according to the IP address
The corresponding international area code of the local number;With reception international area code input by user, the international area code that will be received is made
For the determining corresponding international area code of the local number.
8. such as claim 6-7 any one of them devices, which is characterized in that described device further includes:
Judgment module, for whether judging in local number input by user comprising preset at least one forbidden character;
Execution module, for when the judging result of judgment module is to be, carrying out one kind in operations described below:By described local number
Forbidden character in code is deleted, and the prompt message comprising forbidden character and display in the local number are generated;With, generate whether
Delete the prompt message of forbidden character and display.
9. such as claim 6-7 any one of them devices, which is characterized in that described device further includes:
Judgment module, for determining that digit N, the N that the international area code includes are the natural number more than 0;Judge that user is defeated
Whether the top N of the local number entered is identical as the international area code;
Execution module, for when the judging result of judgment module is to be, generating the prompt message repeatedly input and being shown.
10. such as claim 6-7 any one of them devices, which is characterized in that described device further includes:
Judgment module, for judging the length of local number input by user number whether corresponding with the world area code of preservation
Length is identical;
Execution module, for being when not used, to generate number error prompt message and show when the judging result of judgment module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510478485.XA CN105187633B (en) | 2015-08-06 | 2015-08-06 | Mobile phone number display method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510478485.XA CN105187633B (en) | 2015-08-06 | 2015-08-06 | Mobile phone number display method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105187633A CN105187633A (en) | 2015-12-23 |
CN105187633B true CN105187633B (en) | 2018-09-11 |
Family
ID=54909470
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510478485.XA Expired - Fee Related CN105187633B (en) | 2015-08-06 | 2015-08-06 | Mobile phone number display method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105187633B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107623945B (en) * | 2017-10-09 | 2020-06-05 | 上海连尚网络科技有限公司 | Method, system and computer storage medium for locating area of mobile device |
CN108810893B (en) * | 2018-05-30 | 2021-09-21 | 厦门盈趣科技股份有限公司 | International version software user login interaction method and system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5991383A (en) * | 1998-05-26 | 1999-11-23 | Siemens Information And Communication Networks, Inc. | Partitioning of display for calling party numbers |
CN101753673A (en) * | 2009-12-25 | 2010-06-23 | 深圳市杰普林数码科技有限公司 | Telephone number segment display system and method |
CN102843468A (en) * | 2012-08-14 | 2012-12-26 | 广东欧珀移动通信有限公司 | Digital character string display method and mobile intelligent terminal |
CN103051784A (en) * | 2012-12-10 | 2013-04-17 | 广东欧珀移动通信有限公司 | Smart dialing method |
-
2015
- 2015-08-06 CN CN201510478485.XA patent/CN105187633B/en not_active Expired - Fee Related
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5991383A (en) * | 1998-05-26 | 1999-11-23 | Siemens Information And Communication Networks, Inc. | Partitioning of display for calling party numbers |
CN101753673A (en) * | 2009-12-25 | 2010-06-23 | 深圳市杰普林数码科技有限公司 | Telephone number segment display system and method |
CN102843468A (en) * | 2012-08-14 | 2012-12-26 | 广东欧珀移动通信有限公司 | Digital character string display method and mobile intelligent terminal |
CN103051784A (en) * | 2012-12-10 | 2013-04-17 | 广东欧珀移动通信有限公司 | Smart dialing method |
Also Published As
Publication number | Publication date |
---|---|
CN105187633A (en) | 2015-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104899016B (en) | Allocating stack Relation acquisition method and device | |
CN104182666B (en) | Password resetting method and device | |
CN103425914A (en) | Login method of application program and communication terminal | |
CN105005429B (en) | A kind of method and terminal of terminal display picture | |
CN103118031A (en) | Method and electronic device for logging in application account | |
CN104301875B (en) | SMS processing and device | |
CN105827499B (en) | A kind of amending method having sent information, electronic equipment and application server | |
CN105187632B (en) | Method and device for determining mobile phone number | |
CN105320595A (en) | Application test method and device | |
CN106792699A (en) | A kind of Wireless Fidelity Wi Fi connection methods and mobile terminal | |
CN105187633B (en) | Mobile phone number display method and device | |
CN106294480A (en) | A kind of file layout change-over method, device and examination question import system | |
CN104375814A (en) | Generation method and device of an interface document | |
CN107734474A (en) | The applied statistical method and system of bound phone number | |
CN104750864A (en) | Universal text checking method | |
CN104182479B (en) | A kind of method and device handling information | |
CN104572454B (en) | A kind of method and device of locating resource | |
CN107516036A (en) | software login method, device and storage medium | |
CN109302503A (en) | The sharing method and device of the generation method of signature, signature template | |
CN100571428C (en) | The user management method of mobile communication terminal | |
CN105893250A (en) | Code debugging method and device | |
CN106559554A (en) | A kind of communication processing method, device | |
WO2016018743A1 (en) | Password configuration and login | |
CN109324973A (en) | A kind of method for testing software, device, equipment and computer readable storage medium | |
CN107784064A (en) | Web data processing method, device, computer equipment and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
CF01 | Termination of patent right due to non-payment of annual fee | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20180911 |