Method and device for residing short message verification code
First Claim
1. A method for residing a verification code in a short message received by a mobile device, the method comprising:
- by a processor in the mobile device,determining whether content of the short message comprises a keyword by performing keyword matching on the content of the short message received by the mobile device based on a first regular expression;
extracting a verification code from the content of the short message received by the mobile device by performing verification code matching on the content of the short message received by the mobile device based on a second regular expression, upon determining that the content of the short message comprises the keyword, wherein the verification code comprises a digit, a letter or a combination thereof;
obtaining the extracted verification code; and
displaying the verification code on a verification code input interface of a current application on a screen of the mobile device for preset time,wherein the short message is received in a short message application of the mobile device, and the current application is different from the short message application,wherein the first regular expression is a first string for detecting whether the content of the short message comprises the keyword based on a first syntactic rule, andwherein the second regular expression is a second string for detecting whether the content of the short message comprises the verification code based on a second syntactic rule.
2 Assignments
0 Petitions
Accused Products
Abstract
Provided are a method and device for residing a short message verification code. This method includes: conducting keyword matching on a short message content using a regular expression; when the short message content contains a keyword, matching a verification code for the short message content using the regular expression, to acquire a matched verification code; and displaying the verification code on a current interface and displaying a pre-set time. This method can automatically extract a verification code in a short message and display a pre-set time on a current interface. Within this pre-set time, a user can fill in a verification code on a verification code interface according to the displayed verification code without the need for the user to remember the verification code and to frequently switch between a short message application and a current application as well.
11 Citations
17 Claims
-
1. A method for residing a verification code in a short message received by a mobile device, the method comprising:
by a processor in the mobile device, determining whether content of the short message comprises a keyword by performing keyword matching on the content of the short message received by the mobile device based on a first regular expression; extracting a verification code from the content of the short message received by the mobile device by performing verification code matching on the content of the short message received by the mobile device based on a second regular expression, upon determining that the content of the short message comprises the keyword, wherein the verification code comprises a digit, a letter or a combination thereof; obtaining the extracted verification code; and displaying the verification code on a verification code input interface of a current application on a screen of the mobile device for preset time, wherein the short message is received in a short message application of the mobile device, and the current application is different from the short message application, wherein the first regular expression is a first string for detecting whether the content of the short message comprises the keyword based on a first syntactic rule, and wherein the second regular expression is a second string for detecting whether the content of the short message comprises the verification code based on a second syntactic rule. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9)
-
10. A mobile device, comprising:
-
a processor; and a memory storing instructions, which, when executed by the processor, cause the processor to; determine whether content of a short message received by the mobile device comprises a keyword by performing keyword matching on the content of the short message received by the mobile device based on a first regular expression; extract a verification code from the content of the short message received by the mobile device by performing verification code matching on the content of the short message received by the mobile device based on a second regular expression, upon determining that the content of the short message comprises the keyword, wherein the verification code comprises a digit, a letter or a combination thereof; obtain the extracted verification code; and display the verification code on verification code input interface of a current application on a screen of the mobile device for preset time, wherein the short message is received in a short message application of the mobile device, and the current application is different from the short message application, wherein the first regular expression is a first string for detecting whether the content of the short message comprises the keyword based on a first syntactic rule, and wherein the second regular expression is a second string for detecting whether the content of the short message comprises the verification code based on a second syntactic rule. - View Dependent Claims (11, 12)
-
-
13. A method for residing a verification code in a short message received by a mobile device, the method comprising:
by a processor in the mobile device, obtaining text content of the short message received by the mobile device; determining whether the text content comprises a phrase consistent with a keyword based on a first regular expression, wherein the keyword is a phrase related to the verification code; determining whether the text content comprises a string consistent with a preset format of the verification code based on a second regular expression in a case that the text content comprises the phrase consistent with the keyword, wherein the preset format of the verification code is a string comprising a digit, a letter or a combination thereof and having a length within a preset range; generating the verification code comprising the string in a case that the text content comprises the string consistent with the preset format of the verification code; and displaying the verification code in a current application on a screen of the mobile device for a preset time, wherein the short message is received in a short message application of the mobile device, and the current application is different from the short message application, wherein the first regular expression is a first string for detecting whether the text content of the short message comprises the phrase consistent with the keyword based on a first syntactic rule, and wherein the second regular expression is a second string for detecting whether the text content of the short message comprises the string consistent with the preset format of the verification code based on a second syntactic rule. - View Dependent Claims (14, 15, 16, 17)
Specification