CN105792150B - The judgment method and device of short message verification code - Google Patents
The judgment method and device of short message verification code Download PDFInfo
- Publication number
- CN105792150B CN105792150B CN201610109390.5A CN201610109390A CN105792150B CN 105792150 B CN105792150 B CN 105792150B CN 201610109390 A CN201610109390 A CN 201610109390A CN 105792150 B CN105792150 B CN 105792150B
- Authority
- CN
- China
- Prior art keywords
- keyword
- identifying code
- short message
- character string
- effective
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000012795 verification Methods 0.000 title claims abstract description 45
- 239000000284 extract Substances 0.000 claims abstract description 7
- 238000012360 testing method Methods 0.000 claims description 12
- 230000007717 exclusion Effects 0.000 claims description 4
- 108010001267 Protein Subunits Proteins 0.000 claims 1
- 238000000151 deposition Methods 0.000 claims 1
- 238000000605 extraction Methods 0.000 abstract description 10
- 230000008569 process Effects 0.000 description 7
- 230000006870 function Effects 0.000 description 5
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010200 validation analysis Methods 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 238000012790 confirmation Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 238000012216 screening Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 239000002131 composite material Substances 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000006073 displacement reaction Methods 0.000 description 1
- 238000007689 inspection Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000001737 promoting effect Effects 0.000 description 1
- 230000010076 replication Effects 0.000 description 1
- 230000003362 replicative effect Effects 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 229910052709 silver Inorganic materials 0.000 description 1
- 239000004332 silver Substances 0.000 description 1
- 239000000725 suspension Substances 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/12—Messaging; Mailboxes; Announcements
- H04W4/14—Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W12/00—Security arrangements; Authentication; Protecting privacy or anonymity
- H04W12/06—Authentication
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Information Transfer Between Computers (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention is suitable for intelligent terminal, provides the judgment method and device of a kind of short message verification code, the judgment method includes: to judge whether the short message is identifying code short message when getting short message;When the short message is identifying code short message, the identifying code in the identifying code short message is judged according to keyword and identifying code character string.The present invention improves the accuracy rate of identifying code extraction, it solves the problems, such as to improve the experience sense of user when in short message including multiple identifying code keywords and/or the prior art can not correctly extract the identifying code in short message when including multiple satisfactory identifying code character strings.
Description
Technical field
The invention belongs to technical field of intelligent equipment more particularly to the judgment methods and device of a kind of short message verification code.
Background technique
Existing short message application program can be extracted after receiving short message and show the identifying code in short message content.So
And when including multiple identifying code keywords in short message and/or including multiple satisfactory identifying code character strings, the prior art
The identifying code in short message can not be correctly extracted, the accuracy rate of identifying code identification is low, poor user experience.
Summary of the invention
In consideration of it, the embodiment of the present invention provides the judgment method and device of a kind of short message verification code, mentioned with improving identifying code
The accuracy rate taken.
In a first aspect, providing a kind of judgment method of short message verification code, the judgment method includes:
When getting short message, judge whether the short message is identifying code short message;
When the short message is identifying code short message, judged in the identifying code short message according to keyword and identifying code character string
Identifying code.
Second aspect, provides a kind of judgment means of short message verification code, and the judgment means include:
First judgment module, for when getting short message, judging whether the short message is identifying code short message;
Second judgment module, for being sentenced according to keyword and identifying code character string when the short message is identifying code short message
Identifying code in the identifying code short message of breaking.
Compared with prior art, the embodiment of the present invention first determines whether the short message is verifying when getting short message
Code short message;When the short message is identifying code short message, then the identifying code short message is judged according to keyword and identifying code character string
In identifying code, thus improve identifying code extraction accuracy rate, solve when in short message include multiple identifying code keywords and/
Or the problem of prior art can not correctly extract the identifying code in short message when including multiple satisfactory identifying code character strings,
Improve the experience sense of user.The embodiment of the present invention also provides corresponding devices, and which will be described in detail below.
Detailed description of the invention
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 technical 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
Other accompanying drawings can also be obtained according to these attached drawings.
Fig. 1 is the implementation flow chart of the judgment method of short message verification code provided in an embodiment of the present invention;
Fig. 2 is the specific implementation flow of step S102 in the judgment method of short message verification code provided in an embodiment of the present invention
Figure;
Fig. 3 is the implementation flow chart of step S202 in the judgment method of short message verification code provided in an embodiment of the present invention;
Fig. 4 be in the judgment method of short message verification code provided in an embodiment of the present invention step S202 according to identifying code character string
Digit carry out identifying code judgement implementation flow chart;
Fig. 5 is the specific implementation flow of step S203 in the judgment method of short message verification code provided in an embodiment of the present invention
Figure;
Fig. 6 is the implementation flow chart of step S102 in the judgment method for the short message verification code that another embodiment provides;
Fig. 7 is the composite structural diagram of the judgment means of short message verification code provided in an embodiment of the present invention.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to the accompanying drawings and embodiments, right
The present invention is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, and
It is not used in the restriction present invention.
The embodiment of the present invention first determines whether the short message is identifying code short message when getting short message;When described short
When letter is identifying code short message, then the identifying code in the identifying code short message is judged according to keyword and identifying code character string, thus
The accuracy rate for improving identifying code extraction solves and meets when including multiple identifying code keywords in short message and/or including multiple
It is required that identifying code character string when prior art the problem of can not correctly extracting the identifying code in short message, improve the body of user
Test sense.The embodiment of the present invention also provides corresponding devices, and which will be described in detail below.
Fig. 1 shows the implementation process of the judgment method of short message verification code provided in an embodiment of the present invention.
In embodiments of the present invention, the judgment method of the short message verification code is applied to intelligent terminal, the intelligent terminal
It is able to carry out short message receiving-transmitting, including but not limited to smart phone, smartwatch etc..
Refering to fig. 1, the judgment method of the short message verification code includes:
In step s101, short message is obtained.
In step s 102, judge whether the short message is identifying code short message.
In embodiments of the present invention, after intelligent terminal gets short message, first determine whether the short message is that identifying code is short
Letter, if so, thening follow the steps S103;Otherwise, step S105 is executed, is handled in the way of normal short message.
Herein, it preferably whether there is preset keyword and identifying code character string in the short message by detecting, come true
Whether the fixed short message is identifying code short message.If detecting preset keyword and identifying code character string, it is determined that the short message
For identifying code short message.Wherein it is possible to detect the keyword by the method for keyword match, and pass through regular expression
To detect the identifying code character string.The identifying code character string is character string made of several bit digitals and/or monogram.
It should be noted that here acquired identifying code character string refer to be possible to the number for identifying code, letter or number and
The character string of letter mixing, difference and effective identifying code.It may include multiple identifying code character strings in identifying code short message.
In step s 103, the identifying code in the identifying code short message is judged according to keyword and identifying code character string.
Optionally, if detecting preset keyword and identifying code character string, it is determined that the short message is identifying code short message,
And it is shown in by way of preset suspension windows on the predeterminated position of intelligent terminal screen.The predeterminated position includes but not
It is limited to left side, right side, top, bottom or the center etc. of screen.(after putting).Then identifying code judgement is carried out.
As a preferable example of the invention, the keyword includes and similar, the similar tagged word of the identifying code meaning
Symbol, such as identifying code, Validation Code, check code, check code, check code, inspection code, activation code, activation code, confirmation
Code, confirmation code, dynamic password, registration code, redemption code etc..Fig. 2 shows short message verification codes provided in an embodiment of the present invention
The specific implementation flow of step S102 in judgment method.Referring to Fig.2, the step S102 includes:
In step s 201, the keyword all in the short message is found out.
In step S202, effective keyword is chosen in the keyword.
In step S203, the identifying code is obtained according to effective keyword.
Herein, when only one keyword in the short message, then the keyword is obtained as effective keyword, and
Identifying code is obtained with effective keyword.When the keyword there are two or more when, then by judging each keyword
Determine whether the keyword is effectively to close with the presence or absence of identifying code character string between the first punctuation mark before and after it
Key word.Wherein, the punctuation mark include but is not limited to Chinese fullstop ".", English fullstop " ", Chinese branch ";", English
Branch ";", Chinese exclamation "!", English exclamation "!" etc..Illustratively, Fig. 3 shows step provided in an embodiment of the present invention
The implementation process of S202.Refering to Fig. 3, step S202 includes:
In step S301, if the quantity of the keyword be at least two, judge each keyword and its before
It whether there is identifying code character string between first punctuation mark after and.
In step s 302, if having and existing between only one described keyword and first punctuation mark before and after it
When the identifying code character string, then choosing the keyword is effective keyword.
Illustratively, identifying code short message 1 is provided:
[hotel XX] check code is XXXX, please fill in the check code.
In above-mentioned identifying code short message 1, there is verifying between first " check code " and first punctuation mark ", " thereafter
Code character string " XXXX ", second " check code " with thereafter first punctuation mark "." between, with it before first punctuation mark
Identifying code character string is not present between ", ".It in this case, is then to have with first " check code " according to step S302
Imitate keyword.
In step S303, if there is no described between all keywords and first punctuation mark before and after it
Identifying code character string, then being chosen at the forward keyword in position in identifying code short message is effective keyword.
For example, for identifying code short message 2:
[public comment] XXXX (net mobile phone dynamic code) please use the mobile phone dynamic code to complete verifying.
At this point, between first keyword " dynamic code " and first punctuation mark " () " before and after it, second key
Word " dynamic code " and its before first punctuation mark ", " and with thereafter first punctuation mark "." between be not present identifying code
Character string then chooses first " dynamic code " and is used as effective keyword.
Further, exist between at least two keywords and first punctuation mark before and after it if it exists described
When identifying code character string, then the digit of identifying code character string is introduced, is judged to obtain according to the digit of identifying code character string effective
Keyword.Fig. 4 shows in step S202 provided in an embodiment of the present invention and carries out identifying code according to the digit of identifying code character string
The implementation process of judgement.Refering to Fig. 4, step S202 further include:
In step S401, exist between at least two keywords and first punctuation mark before and after it if it exists
When the identifying code character string, then the keyword for not meeting the first preset condition is excluded, judges the remaining keyword
Whether the digit of the corresponding identifying code character string meets preset value.
Herein, first preset condition, which refers to, has verifying between keyword and first punctuation mark before and after it
Code character string.Therefore, identifying code character string is not present between the first punctuation mark for exclusion keyword and before and after it here
Keyword.After exclusion, judge whether the digit of the corresponding identifying code character string of remaining keyword is preset value.Show
Example property, rule is arranged according to general password, the preset value can be any value in 4 to 8.Therefore, step S401 has
Body is to judge whether the digit of the corresponding identifying code character string of remaining keyword reaches 4 to 8.
In step S402, if the corresponding keyword of the identifying code character string that digit meets preset value has and only
There is one, then choosing the keyword is effective keyword.
Illustratively, for identifying code short message 3:
[public comment] mobile phone dynamic code is 2000, please completes verifying using the mobile phone dynamic code in 30 minutes.
In above-mentioned identifying code short message 3, deposited between first keyword " dynamic code " and first punctuation mark ", " thereafter
In identifying code character string " 2000 " and second keyword " dynamic code " and before it between first punctuation mark ", ", there are identifying codes
Character string " 30 ".When the preset value of digit is 4, since the digit of identifying code character string " 30 " is 2, it is unsatisfactory for preset value;And
The digit of identifying code character string " 2000 " is 4, meets preset value.Then available above-mentioned 3 median of identifying code short message meets pre-
If the corresponding keyword of the identifying code character string of value has and only one, selection is described should " dynamic code " (i.e. first
A " dynamic code ") it is effective keyword
In step S403, if the digit of the corresponding identifying code character string of all keywords be not satisfied it is default
It is forward and be effective there are the keyword of the corresponding identifying code character string to be then chosen at position in identifying code short message for value
Keyword.
Illustratively, for identifying code short message 4:
[public comment] public comment net mobile telephone registration code is 123456789, and mobile phone dynamic is please used in 30 minutes
Code completes verifying.
In above-mentioned identifying code short message 4, deposited between first keyword " registration code " and first punctuation mark ", " thereafter
In identifying code character string " 123456789 ", exists between second keyword " registration code " and its preceding first punctuation mark ", " and test
It demonstrate,proves code character string " 30 ".When the preset value of digit is 4, since the digit of identifying code character string " 30 " is 2, it is unsatisfactory for presetting
Value;And the digit of identifying code character string " 123456789 " is 4, is also unsatisfactory for preset value;The then institute in above-mentioned identifying code short message 4
There is the digit of the corresponding identifying code character string of the keyword that preset value is not satisfied, is then being tested according to step S403 selection
Position is forward in card code short message and is effective keyword there are the keyword of the corresponding identifying code character string, above-mentioned to test
First " registration code ", which should be chosen, in card code short message 4 is used as effective keyword.
Further, step S202 can also include:
In step s 404, if the corresponding keyword of the identifying code character string that digit meets preset value is at least
Two, then the keyword for not meeting the second preset condition is excluded, judges the corresponding verifying of the remaining keyword
Code character displacement is in the front or behind of the keyword.
Herein, exist between first punctuation mark of second preset condition for the keyword and before and after it and test
The digit for demonstrate,proving code character string and the identifying code character string is preset value.If digit meets the identifying code character string of preset value
The corresponding keyword is at least two, then excludes the keyword for not meeting the second preset condition;It is remaining to continue judgement
The corresponding identifying code character string of the keyword (keyword for meeting the first preset condition and the second preset condition)
Positioned at the front or rear of the keyword.
In step S405, if the identifying code character string is located at the keyword at the rear of the corresponding keyword
One and only one, then choosing the keyword is effective keyword.
According to use habit, the embodiment of the present invention preferentially chooses the keyword that identifying code character string is located at after keyword.
Illustratively, for identifying code short message 5:
Identifying code is 1234, please inputs the identifying code in the mobile phone that tail number is 0716 in 30 minutes.--- [silver of promoting trade and investment
Row]
In above-mentioned identifying code short message 5, it is assumed that the preset value of digit is 4.First keyword " identifying code " with thereafter
There are identifying code character string " 1234 " between first punctuation mark ", ", digit 4 meets preset value;Second keyword " is tested
There are identifying code character string " 0716 " between card code " and first punctuation mark ", " before it, digit 4 also meets preset value.So
Judge that the identifying code character string is positioned at the front or rear of the keyword afterwards.It is clear that only first " verifying
Its corresponding identifying code character string is located at its rear to code ", thus select this first " identifying code " as effective keyword.
In step S406, if the corresponding identifying code character string of all keywords is respectively positioned on the keyword
Front, then be chosen at position in identifying code short message it is forward and there are the keyword of the corresponding identifying code character string be have
Imitate keyword.
In step S 407, if there is the corresponding identifying code character string of at least two keywords to be respectively positioned on the pass
The rear of key word then excludes other keywords, be chosen in remaining keyword position in identifying code short message it is forward and exist pair
The keyword for the identifying code character string answered is effective keyword.
Herein, if identifying code character string is located at effective keyword after effective keyword and has multiple, have according to these
The sequencing that effect keyword occurs in identifying code short message, the forward effective key of chosen position carry out identifying code extraction.
Illustratively, for identifying code short message 6:
Identifying code is 1234, and please the identifying code is input in the mobile phone that tail number is 0716 in 30 minutes.--- it [promotes trade and investment
Bank]
In above-mentioned identifying code short message 6, it is assumed that the preset value of digit is 4.First keyword " identifying code " with thereafter
There are identifying code character string " 1234 " between first punctuation mark ", ", digit 4 meets preset value;Second keyword
" identifying code " and a punctuation mark thereafter "." between there are identifying code character string " 0716 ", digit 4 also meets preset value.
Then judge that the identifying code character string is positioned at the front or rear of the keyword.It is clear that two " identifying code "
Its corresponding identifying code character string is located at its rear, thus select this first " identifying code " as effective keyword.
After obtaining effective keyword by step S202, then the identifying code according to effective keyword selection.
Optionally, Fig. 5 shows the specific implementation flow of step S203 provided in an embodiment of the present invention.Refering to Fig. 5, the step S203
Include:
In step S501, if there are corresponding identifying code character string before or after effective keyword, extract described in
Identifying code character string is as identifying code
In step S502, if there is corresponding identifying code character string before and after effective keyword, institute is extracted
Identifying code character string after stating effective keyword is as identifying code.
Above-mentioned is a kind of general identifying code extraction scheme, is adapted to the identifying code short message of various various criterions.Pass through
Above-mentioned preferable example first passes through the effective keyword of positional relationship preliminary screening of keyword Yu identifying code character string, then basis
The digit of identifying code character string screens effective keyword again, finally according to the position between identifying code keyword and effective keyword
It sets relationship and chooses the effective keyword for carrying out identifying code extraction, to realize having to effective keyword in identifying code short message
The verifying of effect property and screening, exclude invalid keyword, effectively improve the accuracy rate of identifying code extraction.
For the identifying code short message that some modes are fixed, special rule can also be developed, to improve whole efficiency.Make
For another preferable example of the invention, it can identify that short message is identifying code short message and is directly verified by nominal key
Code extracts, the nominal key be developer according to the fixed identifying code short message of mode sum up come words.The mode
Fixed identifying code short message must include the nominal key.Fig. 6 show another embodiment of the present invention provides based on specified
The implementation process of keyword acquisition identifying code.Refering to Fig. 6, the step S102 can also include:
In step s 601, the keyword all in the short message is found out.
In step S602, judge in the keyword with the presence or absence of nominal key.
In step S603, the nominal key, then directly adopt preset rules and obtain identifying code if it exists.
In step s 604, the nominal key or identifying code can not be got by preset rules if it does not exist, then
Effective identifying code is obtained by selecting effective keyword in the keyword.
Illustratively, for identifying code short message 7:
Short message verification code: 123456, you are about to progress Internetbank now and log in, and would you please six short message verification codes completions of output and step on
Verify [industrial and commercial bank] in land.
In the short breath of logon authentication code of this industrial and commercial bank, because what its type mode was usually fixed, it can be direct
Judge that this is the short message that logs in of industrial and commercial bank by nominal key " industrial and commercial bank ", " logging in ", and because format is fixed, it can
To directly find the position of identifying code, identifying code thus can be directly extracted, so finding out pass by step S201
If it find that can directly carry out above-mentioned judgement if having nominal key after key word, held if without nominal key
The above-mentioned general identifying code extraction scheme of row.
Above-mentioned judges whether it is that specific identifying code short message can be through a designated key by nominal key
Word is for example: industrial and commercial bank or Liang Ge nominal key industrial and commercial bank and logging in, specific judgment mode is according to messaging format
Difference is in different ways.
Optionally, the preset rules include:
It is described effective using the nominal key as effective keyword when there is only unique nominal key
The corresponding identifying code character string of keyword be identifying code, the identifying code character string be located at the nominal key and it is described specify
Between first punctuation mark after keyword;
When there are at least two nominal keys, using the forward nominal key in short message as effectively
Keyword, the corresponding identifying code character string of the effective keyword is identifying code, and the identifying code is located at the nominal key
Between the first punctuation mark after the nominal key.
Illustratively, for identifying code short message 7:
Short message verification code: 123456, you are about to progress Internetbank now and log in, and would you please six short message verification codes completions of output and step on
Verify [industrial and commercial bank] in land.
If nominal key is " identifying code ", at this point, according to the above-mentioned preset rules of step, available identifying code is
123456。
By above-mentioned preferable example, realizes to directly acquire some known identifying code short messages with fixed format and test
Code, and the validation verification directly to the identifying code character string in identifying code short message are demonstrate,proved, to improve identifying code identification
Accuracy rate and efficiency improve the experience sense of user.
It optionally, in embodiments of the present invention, can also be to the duplication and stickup of the identifying code in the identifying code short message.
The judgment method of the short message verification code can also include:
When receiving the duplicate instructions of user's input, the effective identifying code is replicated;
When receiving the stickup instruction of user's input, the effective identifying code replicated is exported to specified identifying code
In input frame.
The embodiment of the present invention first determines whether the short message is identifying code short message when getting short message;When described short
When letter is identifying code short message, then keyword and identifying code character string in the identifying code short message are dissected, judge and extracted and is effective
Identifying code, thus improve identifying code extraction accuracy rate, solve when in short message include multiple identifying code keywords and/or packet
The prior art can not be extracted correctly the problem of identifying code in short message when including multiple satisfactory identifying code character strings, be promoted
The experience sense of user.
It should be noted that the above-mentioned identifying code short message 1 to 7 provided is only used for explaining only as example of the invention
The judgment method of bright short message verification code provided in an embodiment of the present invention, is not intended to restrict the invention.
Fig. 7 shows the composed structure of the judgment means of short message verification code provided in an embodiment of the present invention, for the ease of saying
Bright, only parts related to embodiments of the present invention are shown.
In embodiments of the present invention, the judgment means of the short message verification code are applied to intelligent terminal, can be and are built in
The unit of the software unit of intelligent terminal, hardware cell or software and hardware combining.Optionally, the intelligent terminal includes but unlimited
In smart phone, smartwatch etc..
Refering to Fig. 7, the judgment means of the short message verification code include:
First judgment module 71, for when getting short message, judging whether the short message is identifying code short message;
Second judgment module 72 is used for when the short message is identifying code short message, according to keyword and identifying code character string
Judge the identifying code in the identifying code short message.
Further, the first judgment module 71 is specifically used for:
When getting short message, detect in the short message with the presence or absence of preset keyword and identifying code character string;
If so, determining that the short message is identifying code short message.
As a preferable example of the invention, second judgment module 72 includes:
Query unit 721, for finding out the keyword all in the short message;
Effective keyword selection unit 722, for choosing effective keyword in the keyword;
Identifying code acquiring unit 723, for obtaining the identifying code according to effective keyword.
Further, effective keyword selection unit 722 includes:
Judgment sub-unit 7221 judges each keyword if the quantity for the keyword is at least two
It whether there is identifying code character string between the first punctuation mark before and after it;
Choose subelement 7222, if for have and only one described keyword and its before and after first punctuation mark it
Between there are when the identifying code character string, then choose the keyword be effective keyword;
If the identifying code character string is not present between all keywords and first punctuation mark before and after it,
Then being chosen at the forward keyword in position in identifying code short message is effective keyword.
Further, the judgment sub-unit 7221 further include:
There are the verifying code words between at least two keywords and first punctuation mark before and after it if it exists
When symbol string, then the keyword for not meeting the first preset condition is excluded, judges that the remaining keyword is tested described in corresponding
Whether the digit of card code character string meets preset value;
The selection subelement 7222 is also used to:
If the corresponding keyword of the identifying code character string that digit meets preset value has and only one, choose
The keyword is effective keyword;
If preset value is not satisfied in the digit of the corresponding identifying code character string of all keywords, it is chosen at and tests
Position is forward in card code short message and is effective keyword there are the keyword of the corresponding identifying code character string.
Further, the judgment sub-unit 7221 is also used to:
If the corresponding keyword of the identifying code character string that digit meets preset value is at least two, exclude not
The keyword for meeting the second preset condition judges that the corresponding identifying code character string of the remaining keyword is located at institute
State the front or behind of keyword;
The selection subelement 7222 is also used to:
If the identifying code character string be located at the rear of the corresponding keyword the keyword one and only one,
Then choosing the keyword is effective keyword;
If the corresponding identifying code character string of all keywords is respectively positioned on the front of the keyword, it is chosen at
Position is forward in identifying code short message and is effective keyword there are the keyword of the corresponding identifying code character string;
If there is the corresponding identifying code character string of at least two keywords to be respectively positioned on the rear of the keyword,
Other keywords are excluded, are chosen at that position in identifying code short message is forward and there are the corresponding identifying codes in remaining keyword
The keyword of character string is effective keyword.
Further, the identifying code acquiring unit 723 is specifically used for:
If there are corresponding identifying code character strings before or after effective keyword, extracts the identifying code character string and make
For identifying code;
If there is corresponding identifying code character string before and after effective keyword, after extracting effective keyword
Identifying code character string as identifying code.
As another preferable example of the invention, second judgment module 72 further include:
Nominal key acquiring unit 724, after all keywords in finding out the short message, judgement
It whether there is nominal key in the keyword;
Identifying code acquiring unit 723 is also used to, if it exists the nominal key, then directlys adopt preset rules acquisition and test
Demonstrate,prove code;The nominal key or identifying code can not be got by preset rules if it does not exist, then by the keyword
In select effective keyword to obtain identifying code.
Optionally, the preset rules include:
It is described effective using the nominal key as effective keyword when there is only unique nominal key
The corresponding identifying code character string of keyword be identifying code, the identifying code character string be located at the nominal key and it is described specify
Between first punctuation mark after keyword;
When there are at least two nominal keys, using the forward nominal key in short message as effectively
Keyword, the corresponding identifying code character string of the effective keyword is identifying code, and the identifying code is located at the nominal key
Between the first punctuation mark after the nominal key
By above-mentioned preferable example, the validation verification to the identifying code character string in identifying code short message is realized, is improved
The accuracy rate of identifying code identification, and then improve the experience sense of user.
It optionally, in embodiments of the present invention, can also be to the duplication and stickup of the identifying code in the identifying code short message.
The judgment means of the short message verification code can also include:
Replication module, for replicating the effective identifying code when receiving the duplicate instructions of user's input;
Stickup module, for when receiving the stickup instruction of user's input, the effective identifying code replicated to be exported
Into specified identifying code input frame.
It should be noted that the device in the embodiment of the present invention can be used to implement whole skills in above method embodiment
The function of art scheme, each functional module can be implemented according to the method in above method embodiment, specific implementation
Process can refer to the associated description in examples detailed above, and details are not described herein again.
The embodiment of the present invention first determines whether the short message is identifying code short message when getting short message;When described short
When letter is identifying code short message, then keyword and identifying code character string in the identifying code short message are dissected, judge and extracted and is effective
Identifying code, thus improve identifying code extraction accuracy rate, solve when in short message include multiple identifying code keywords and/or packet
The prior art can not be extracted correctly the problem of identifying code in short message when including multiple satisfactory identifying code character strings, be promoted
The experience sense of user.
Those of ordinary skill in the art may be aware that list described in conjunction with the examples disclosed in the embodiments of the present disclosure
Member and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These functions are actually
It is implemented in hardware or software, the specific application and design constraint depending on technical solution.Professional technician
Each specific application can be used different methods to achieve the described function, but this realization is it is not considered that exceed
The scope of the present invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the device of foregoing description
It with the specific work process of unit, can refer to corresponding processes in the foregoing method embodiment, details are not described herein.
In several embodiments provided herein, it should be understood that the judgment method of disclosed short message verification code
And device, it may be implemented in other ways.For example, the apparatus embodiments described above are merely exemplary, for example,
The division of the module, unit, only a kind of logical function partition, there may be another division manner in actual implementation, example
As multiple units or components can be combined or can be integrated into another system, or some features can be ignored or not executed.
Another point, shown or discussed mutual coupling, direct-coupling or communication connection can be through some interfaces, dress
It sets or the indirect coupling or communication connection of unit, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
In addition, each functional unit in each embodiment of the present invention, module can integrate in one processing unit,
Can be each unit, module physically exists alone, can also be integrated in one unit with two or more units, module
In.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), arbitrary access are deposited
The various media that can store program code such as reservoir (RAM, Random Access Memory), magnetic or disk.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (14)
1. a kind of judgment method of short message verification code, which is characterized in that the judgment method includes:
When getting short message, judge whether the short message is identifying code short message;
When the short message is identifying code short message, testing in the identifying code short message is judged according to keyword and identifying code character string
Demonstrate,prove code;
It is described to judge that the identifying code in the identifying code short message includes: according to keyword and identifying code character string
Find out the keyword all in the short message;
Effective keyword is chosen in the keyword, wherein depositing between effective keyword and first punctuation mark before and after it
In identifying code character string;
The identifying code is obtained according to effective keyword.
2. the judgment method of short message verification code as described in claim 1, which is characterized in that it is described when getting short message, sentence
Whether the short message of breaking is that identifying code short message includes:
When getting short message, detect in the short message with the presence or absence of preset keyword and identifying code character string;
If so, determining that the short message is identifying code short message.
3. the judgment method of short message verification code as described in claim 1, which is characterized in that described to be chosen in the keyword
Effective keyword includes:
If the quantity of the keyword is at least two, each keyword and the first punctuation mark before and after it are judged
Between whether there is identifying code character string;
If having and there are the identifying code character strings between only one described keyword and first punctuation mark before and after it
When, then choosing the keyword is effective keyword;
If the identifying code character string is not present between all keywords and first punctuation mark before and after it, select
Taking the keyword that position is forward in identifying code short message is effective keyword.
4. the judgment method of short message verification code as claimed in claim 3, which is characterized in that described to be chosen in the keyword
Effective keyword further include:
There are the identifying code character strings between at least two keywords and first punctuation mark before and after it if it exists
When, then the keyword for not meeting the first preset condition is excluded, judges the corresponding identifying code of the remaining keyword
Whether the digit of character string meets preset value;
If the corresponding keyword of the identifying code character string that digit meets preset value has and only one, described in selection
Keyword is effective keyword;
If preset value is not satisfied in the digit of the corresponding identifying code character string of all keywords, it is chosen at identifying code
Position is forward in short message and is effective keyword there are the keyword of the corresponding identifying code character string.
5. the judgment method of short message verification code as claimed in claim 4, which is characterized in that described to be chosen in the keyword
Effective keyword further include:
If the corresponding keyword of the identifying code character string that digit meets preset value is at least two, exclusion is not met
The keyword of second preset condition judges that the corresponding identifying code character string of the remaining keyword is located at the pass
The front or behind of key word;
If the identifying code character string be located at the rear of the corresponding keyword the keyword one and only one, select
Taking the keyword is effective keyword;
If the corresponding identifying code character string of all keywords is respectively positioned on the front of the keyword, it is chosen at verifying
Position is forward in code short message and is effective keyword there are the keyword of the corresponding identifying code character string;
If there is the corresponding identifying code character string of at least two keywords to be respectively positioned on the rear of the keyword, exclude
Other keywords, are chosen at that position in identifying code short message is forward and there are the corresponding verifying code characters in remaining keyword
The keyword of string is effective keyword.
6. such as the judgment method of short message verification code described in any one of claim 1 to 5, which is characterized in that described according to
Effective keyword obtains the identifying code further include:
If there are corresponding identifying code character strings before or after effective keyword, extracts the identifying code character string conduct and test
Demonstrate,prove code;
If there is corresponding identifying code character string before and after effective keyword, testing after extracting effective keyword
Code character string is demonstrate,proved as identifying code.
7. the judgment method of short message verification code as described in claim 1, which is characterized in that all in finding out the short message
After the keyword, the method also includes:
Judge in the keyword with the presence or absence of nominal key;
The nominal key if it exists then directlys adopt preset rules and obtains identifying code;
The nominal key or identifying code can not be got by preset rules if it does not exist, then by the keyword
Effective keyword is selected to obtain identifying code;
The preset rules include:
When there is only unique nominal key, using the nominal key as effective keyword, effective key
The corresponding identifying code character string of word is identifying code, and the identifying code character string is located at the nominal key and the designated key
Between first punctuation mark after word;
When there are at least two nominal keys, using the forward nominal key in short message as effective crucial
Word, the corresponding identifying code character string of the effective keyword is identifying code, and the identifying code is located at the nominal key and institute
Between first punctuation mark after stating nominal key.
8. a kind of judgment means of short message verification code, which is characterized in that the judgment means include:
First judgment module, for when getting short message, judging whether the short message is identifying code short message;
Second judgment module, for judging institute according to keyword and identifying code character string when the short message is identifying code short message
State the identifying code in identifying code short message;
Second judgment module includes:
Query unit, for finding out the keyword all in the short message;
Effective keyword selection unit, for choosing effective keyword in the keyword, wherein effective keyword and its before
There are identifying code character strings between first punctuation mark after and;
Identifying code acquiring unit, for obtaining the identifying code according to effective keyword.
9. the judgment means of short message verification code as claimed in claim 8, which is characterized in that the first judgment module is specifically used
In:
When getting short message, detect in the short message with the presence or absence of preset keyword and identifying code character string;
If so, determining that the short message is identifying code short message.
10. the judgment means of short message verification code as claimed in claim 8, which is characterized in that effective keyword selection list
Member includes:
Judgment sub-unit, if for the keyword quantity be at least two, judge each keyword and its before and
It whether there is identifying code character string between first punctuation mark afterwards;
Subelement is chosen, if for having and there are institutes between only one described keyword and first punctuation mark before and after it
When stating identifying code character string, then choosing the keyword is effective keyword;
If the identifying code character string is not present between all keywords and first punctuation mark before and after it, select
Taking the keyword that position is forward in identifying code short message is effective keyword.
11. the judgment means of short message verification code as claimed in claim 10, which is characterized in that the judgment sub-unit is also wrapped
It includes:
There are the identifying code character strings between at least two keywords and first punctuation mark before and after it if it exists
When, then the keyword for not meeting the first preset condition is excluded, judges the corresponding identifying code of the remaining keyword
Whether the digit of character string meets preset value;
The selection subelement is also used to:
If the corresponding keyword of the identifying code character string that digit meets preset value has and only one, described in selection
Keyword is effective keyword;
If preset value is not satisfied in the digit of the corresponding identifying code character string of all keywords, it is chosen at identifying code
Position is forward in short message and is effective keyword there are the keyword of the corresponding identifying code character string.
12. the judgment means of short message verification code as claimed in claim 11, which is characterized in that the judgment sub-unit is also used
In:
If the corresponding keyword of the identifying code character string that digit meets preset value is at least two, exclusion is not met
The keyword of second preset condition judges that the corresponding identifying code character string of the remaining keyword is located at the pass
The front or behind of key word;
The selection subelement is also used to:
If the identifying code character string be located at the rear of the corresponding keyword the keyword one and only one, select
Taking the keyword is effective keyword;
If the corresponding identifying code character string of all keywords is respectively positioned on the front of the keyword, it is chosen at verifying
Position is forward in code short message and is effective keyword there are the keyword of the corresponding identifying code character string;
If there is the corresponding identifying code character string of at least two keywords to be respectively positioned on the rear of the keyword, exclude
Other keywords, are chosen at that position in identifying code short message is forward and there are the corresponding verifying code characters in remaining keyword
The keyword of string is effective keyword.
13. such as the judgment means of the described in any item short message verification codes of claim 8 to 12, which is characterized in that the identifying code
Acquiring unit is specifically used for:
If there are corresponding identifying code character strings before or after effective keyword, extracts the identifying code character string conduct and test
Demonstrate,prove code;
If there is corresponding identifying code character string before and after effective keyword, testing after extracting effective keyword
Code character string is demonstrate,proved as identifying code.
14. the judgment means of short message verification code as claimed in claim 8, which is characterized in that second judgment module also wraps
It includes:
Nominal key acquiring unit judges the pass after all keywords in finding out the short message
It whether there is nominal key in key word;
Identifying code acquiring unit then directlys adopt preset rules and obtains identifying code for the nominal key if it exists;If no
Identifying code can not be got there are the nominal key or by preset rules, then by selecting in the keyword effectively
Keyword obtains identifying code;
The preset rules include:
When there is only unique nominal key, using the nominal key as effective keyword, effective key
The corresponding identifying code character string of word is identifying code, and the identifying code character string is located at the nominal key and the designated key
Between first punctuation mark after word;
When there are at least two nominal keys, using the forward nominal key in short message as effective crucial
Word, the corresponding identifying code character string of the effective keyword is identifying code, and the identifying code is located at the nominal key and institute
Between first punctuation mark after stating nominal key.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610109390.5A CN105792150B (en) | 2016-02-26 | 2016-02-26 | The judgment method and device of short message verification code |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610109390.5A CN105792150B (en) | 2016-02-26 | 2016-02-26 | The judgment method and device of short message verification code |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105792150A CN105792150A (en) | 2016-07-20 |
CN105792150B true CN105792150B (en) | 2019-03-08 |
Family
ID=56403864
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610109390.5A Active CN105792150B (en) | 2016-02-26 | 2016-02-26 | The judgment method and device of short message verification code |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105792150B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106101451A (en) * | 2016-08-18 | 2016-11-09 | 中国联合网络通信集团有限公司 | SMS processing method, mobile terminal |
CN106528305A (en) * | 2016-10-28 | 2017-03-22 | 宇龙计算机通信科技(深圳)有限公司 | Information input method and device |
CN106302139A (en) * | 2016-11-15 | 2017-01-04 | 青岛海信移动通信技术股份有限公司 | Message treatment method and device |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103546877A (en) * | 2013-10-30 | 2014-01-29 | 上海斐讯数据通信技术有限公司 | Method and system for obtaining and inputting content code and mobile terminal |
CN103902740A (en) * | 2014-04-22 | 2014-07-02 | 锤子科技(北京)有限公司 | Short message authentication code residing method and device |
CN105049607A (en) * | 2015-06-24 | 2015-11-11 | 广东欧珀移动通信有限公司 | Text message display method and mobile terminal |
CN105101122A (en) * | 2015-06-29 | 2015-11-25 | 安一恒通(北京)科技有限公司 | Verification code input method and device |
CN105263126A (en) * | 2015-08-31 | 2016-01-20 | 小米科技有限责任公司 | Method, device and system for short message verification |
-
2016
- 2016-02-26 CN CN201610109390.5A patent/CN105792150B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103546877A (en) * | 2013-10-30 | 2014-01-29 | 上海斐讯数据通信技术有限公司 | Method and system for obtaining and inputting content code and mobile terminal |
CN103902740A (en) * | 2014-04-22 | 2014-07-02 | 锤子科技(北京)有限公司 | Short message authentication code residing method and device |
CN105049607A (en) * | 2015-06-24 | 2015-11-11 | 广东欧珀移动通信有限公司 | Text message display method and mobile terminal |
CN105101122A (en) * | 2015-06-29 | 2015-11-25 | 安一恒通(北京)科技有限公司 | Verification code input method and device |
CN105263126A (en) * | 2015-08-31 | 2016-01-20 | 小米科技有限责任公司 | Method, device and system for short message verification |
Also Published As
Publication number | Publication date |
---|---|
CN105792150A (en) | 2016-07-20 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105574098B (en) | The generation method and device of knowledge mapping, entity control methods and device | |
CN106713370B (en) | A kind of identity identifying method, server and mobile terminal | |
CN103118031B (en) | Method for logging in application account and electronic equipment | |
CN104978266B (en) | A kind of application testing method and device | |
CN105792150B (en) | The judgment method and device of short message verification code | |
CN103164698A (en) | Method and device of generating fingerprint database and method and device of fingerprint matching of text to be tested | |
CN106385403B (en) | A kind of the user account register method and relevant device of self-help print equipment | |
WO2014042962A1 (en) | Determining additional information associated with geographic location information | |
CN105471811A (en) | Privacy space processing method and privacy space processing device | |
CN106445918B (en) | A kind of Chinese address processing method and system | |
CN108053545A (en) | Certificate verification method and apparatus, server, storage medium | |
CN105159475B (en) | A kind of characters input method and device | |
CN109634570A (en) | Front and back end integrated development method, device, equipment and computer readable storage medium | |
CN103310139A (en) | Input validation method and input validation device | |
CN106791036A (en) | A kind of information processing method, device and mobile terminal | |
CN107704613A (en) | A kind of approaches to IM, terminal and computer-readable recording medium | |
CN109074547A (en) | Text message sequence based on message content | |
CN104462934B (en) | A kind of information processing method and electronic equipment | |
CN114298039B (en) | Sensitive word recognition method and device, electronic equipment and storage medium | |
CN108829882A (en) | Formation gathering method, device, terminal and medium | |
CN113705164A (en) | Text processing method and device, computer equipment and readable storage medium | |
CN106874505A (en) | A kind of searching method and device | |
CN110543457A (en) | Track type document processing method and device, storage medium and electronic device | |
CN107330317A (en) | A kind of terminal unlock method and terminal | |
CN110765016B (en) | Game test instruction processing method, game test instruction processing system, server and storage device |
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 | ||
TR01 | Transfer of patent right |
Effective date of registration: 20190701 Address after: 644000 West Section of Xinggang Road, Lingang Economic and Technological Development Zone, Yibin City, Sichuan Province, 27 Patentee after: Yibin bond China smart technology Co., Ltd. Address before: 518029 Shenzhen, Futian District, Guangdong Province garden Ridge Street, Bagua road 31, Zhongxin science and Technology Building 9 storey (building 10 10) 1001 Patentee before: Zhou Qi |
|
TR01 | Transfer of patent right |