A kind of pre-paying method and system, terminal, server
Technical field
The invention belongs to monthly payment plan field, particularly to a kind of pre-paying method and system, terminal, server.
Background technology
Social development, to today, the most still has a large portion area Severe Power Shortage or does not the most just have electricity
Power supply area, they the most also live by kerosene lamp illumination life, be limited to locality industry and the level of economic development,
It is that this problem of solution is the most straight with the civil small-scale off-network electricity generation system that solar panels, blower fan are essential core parts with energy-storage battery
Connect and maximally effective approach.But due to this kind of area the common people cannot one-time payment high price off-network generating product, this
Inhibit the desire to purchase of consumer to a certain extent.Payable by installment payment for goods, the ability to pay of the local consumer of coupling, become and add
Speed promotes solar energy off-grid system in short of electricity and the necessary basis in territory, non-Electric region.
Although some producer proposes a kind of credit management formula serial product solution that uses at present, but
It is that the regional personal credit of these less developed countries manages very imperfection, is constantly present minority terminal consumer malice and is in arrears with by stages
Money, owing to product cannot arrange the use authority of pre-payment product flexibly according to the amount of money of single payment, can only use receipts of visiting
Return the means such as product, but often consume the considerable human and material resources of enterprise, bring much to the normal operation of enterprise
Worried.
Owing to prior art cannot arrange the use authority of pre-payment product flexibly according to the amount of money of single payment, cause pre-
There is motility and the low problem of reliability in charging system.
Summary of the invention
The invention provides a kind of pre-paying method and system, terminal, server, it is intended to solve pre existing charging system institute
The motility existed and the low technical problem of reliability.
The present invention is achieved in that a kind of pre-paying method, and described pre-paying method includes:
A1. password array is generated according to cryptographic seed and iterative algorithm, and by last element of described password array
Sending to terminal as verification password, the element number of described password array is preset value;
B1. obtaining paid-for time, described paid-for time is less than or equal to paying upper limit time;
C1. checking password is obtained according to described paid-for time and described password array;
D1. described checking password is sent to described terminal so that described terminal arranges pre-payment according to described checking password
The use authority of product, and perform step B1.
Another object of the present invention is to provide a kind of pre-paying method, described pre-paying method includes:
A2. verification password is received;
B2. checking password is received;
C2. password array to be verified is generated according to described checking password and iterative algorithm, described password array to be verified
Element number is equal to the numerical value of paying upper limit time;
D2. described verification password is mated with the element in described password array to be verified;
E2., when Match of elemental composition in described verification password and described password array to be verified, described paid-for time is obtained,
And obtain total paid-for time according to described paid-for time;
F2. judge that whether described total paid-for time is more than or equal to presetting total paid-for time;
The most then open the perpetuity limit of pre-payment product;
G2-2. if it is not, then according to described paid-for time obtain remaining time, and by described verification password update be described in test
Card password;
H2. start timing to obtain timer periods, and obtain according to described remaining time and described timer periods can
Use the time;
I2. judge that whether described pot life is more than zero;
The most then open the use authority of described pre-payment product, and perform step B2;
J2-2. if it is not, then close the use authority of described pre-payment product, and step B2 is performed.
Another object of the present invention is to provide a kind of pre-paying method, described pre-paying method includes:
A3. password array is generated according to cryptographic seed and iterative algorithm, and by last element of described password array
Being transmitted as verification password, the element number of described password array is preset value;
B3. described verification password is received;
C3. obtaining paid-for time, described paid-for time is less than or equal to paying upper limit time;
D3. checking password is obtained according to described paid-for time and described password array;
E3. described checking password is sent;
F3. described checking password is received;
G3. generate password array to be verified according to received described checking password and described iterative algorithm, described in treat
The element number of verification password array is equal to the numerical value of described paying upper limit time;
H3. described verification password is mated with the element in described password array to be verified;
I3., when Match of elemental composition in described verification password and described password array to be verified, described paid-for time is obtained,
And obtain total paid-for time according to described paid-for time;
J3. judge that whether described total paid-for time is more than or equal to presetting total paid-for time;
The most then open the perpetuity limit of pre-payment product;
K3-2. if it is not, then according to described paid-for time obtain remaining time, and by described verification password update be described in test
Card password;
L3. start timing to obtain timer periods, and obtain according to described remaining time and described timer periods can
Use the time;
M3. judge that whether described pot life is more than zero;
The most then open the use authority of described pre-payment product, and perform step C3;
N3-2. if it is not, then close the use authority of described pre-payment product, and step C3 is performed.
Another object of the present invention is to provide a kind of server, described server includes:
Password array generation module, for generating password array according to cryptographic seed and iterative algorithm, and by described password
Last element of array sends to terminal as verification password, and the element number of described password array is preset value;
Paid-for time acquisition module, is used for obtaining paid-for time, and described paid-for time is less than or equal to paying upper limit time;
Checking password acquisition module, for obtaining checking password according to described paid-for time and described password array;
Checking password sending module, for sending described checking password to described terminal so that described terminal is according to described
Checking password arranges the use authority of pre-payment product.
Another object of the present invention is to provide a kind of terminal, described terminal includes:
Verification password acceptance module, is used for receiving verification password;
Authentication module receiver module, is used for receiving checking password;
Password array generation module to be verified, for generating password number to be verified according to described checking password and iterative algorithm
Group, the element number of described password array to be verified is equal to the numerical value of paying upper limit time;
Matching module, for mating described verification password with the element in described password array to be verified;
Total paid-for time acquisition module, for when the Match of elemental composition in described verification password with described password array to be verified
Time, obtain described paid-for time, and obtain total paid-for time according to described paid-for time;
Total paid-for time judge module, be used for judging described total paid-for time whether more than or equal to preset always pay time
Between;
The open module of perpetuity limit, if for judge described total paid-for time more than or equal to preset always pay time
Between, then open the perpetuity limit of pre-payment product;
Remaining time acquisition module, if for judge described total paid-for time less than preset total paid-for time, then according to institute
State paid-for time and obtain remaining time, and be described checking password by described verification password update;
Pot life acquisition module, is used for starting timing to obtain timer periods, and according to described remaining time and institute
State timer periods and obtain pot life;
Pot life judge module, is used for judging that whether described pot life is more than zero;
For pot life judge module, the open module of authority, if judging that described pot life more than zero, then opens described
The use authority of pre-payment product;
Authority closes module, if judging that described pot life is not more than zero for pot life judge module, then closes institute
State the use authority of pre-payment product.
Another object of the present invention is to provide a kind of payment system, it is characterised in that described system comprises above-mentioned
Server and above-mentioned terminal.
Technical solution of the present invention has the benefit that
Knowable to the invention described above, owing to first receiving verification password;Then clothes checking password is received;And it is close according to checking
Code and iterative algorithm generate password array to be verified, and the element number of password array to be verified is equal to the number of paying upper limit time
Value;Verification password is mated with the element in password array to be verified;When in verification password and password array to be verified
During Match of elemental composition, obtain paid-for time, and obtain total paid-for time according to paid-for time;And judge whether total paid-for time is more than
Or equal to presetting total paid-for time, the most then open the perpetuity limit of pre-payment product, if otherwise obtaining according to paid-for time
Take remaining time, and be checking password by verification password update, then start timing to obtain timer periods, and according to when remaining
Between and timer periods obtain pot life;Judge that whether pot life is more than zero;The most then open the use of pre-payment product
Authority, and perform to receive the step of checking password;If it is not, then close the use authority of pre-payment product, and perform to receive checking
The step of password;Therefore, the use authority of pre-payment product can be set flexibly according to the single payment time, improve pre-payment
System flexibility and reliability.
Accompanying drawing explanation
For the technical scheme being illustrated more clearly that in the embodiment of the present invention, in embodiment being described below required for make
Accompanying drawing be briefly described, it should be apparent that, below describe in accompanying drawing be only some embodiments of the present invention, for
From the point of view of those of ordinary skill in the art, on the premise of not paying creative work, it is also possible to obtain other according to these accompanying drawings
Accompanying drawing.
A kind of pre-paying method one flow chart that Fig. 1 provides for the embodiment of the present invention one;
A kind of pre-paying method one flow chart that Fig. 2 provides for the embodiment of the present invention two;
A kind of pre-paying method another kind flow chart that Fig. 3 provides for the embodiment of the present invention three;
A kind of server one structural representation that Fig. 4 provides for the embodiment of the present invention four;
A kind of terminal one structural representation that Fig. 5 provides for the embodiment of the present invention five;
A kind of payment system structural representation that Fig. 6 provides for the embodiment of the present invention six.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Embodiment one:
What Fig. 1 showed the pre-paying method that the present embodiment provides realizes flow process, for convenience of description, illustrate only and this
The part that embodiment is relevant, details are as follows:
In a step 101, generate password array according to cryptographic seed and iterative algorithm, and by last of password array
Element sends to terminal as verification password, and the element number of password array is preset value.
In being embodied as, step 101 can be particularly as follows: generate password according to cryptographic seed and iterative algorithm in step A1
Array, and using last element of password array as verification password send to terminal particularly as follows:
The 1st element in password array is generated, according to described hash algorithm successively according to hash algorithm and cryptographic seed
Other element of password array described in grey iterative generation, and last element of described password array is sent as verification password
To terminal.
In being embodied as, generate the 1st element in password array according to algorithm H [0]=OTP_Hash (Seed), according to
Other element of algorithm H [N]=OTP_Hash (H [N-1]) grey iterative generation password array successively, wherein, H [0] is password array
In the 1st element, H [N] is the N+1 element in password array, and Seed is cryptographic seed, and last by password array
One element sends to terminal as verification password.OTP_Hash ()=XOR_Fold160/64 (SHA_1 ());Wherein function
SHA_1 () uses the Hash security algorithm SHA1 of international recognition, inputs less than the message of 2^64 position for length, and SHA1 can produce
The eap-message digest output of one 160.Function XOR_Fold160/64 () be 160 doublings that SHA_1 () is exported be 64
Algorithm, it is therefore an objective to shorten password length, it is simple to client's practical operation.And Hash security algorithm SHA1 has following two spies
Property: input (message) can not be restored from output (eap-message digest), i.e. there is unidirectional irreversibility;Two different message are (defeated
Enter) same eap-message digest (output) will not be produced.The two characteristic itself, determines password array and has the safety of height
Property.Cryptographic seed Seed be by with pre-payment product product category code name the most one to one, product serial number and random
Character string three part is constituted so that cryptographic seed Seed has correspondence unique with pre-payment product, irreversibility.
In being embodied as, last element of password array is sent to terminal particularly as follows: pass through as verification password
Last element of password array is sent to terminal by wireless network as verification password.
In a step 102, obtaining paid-for time, paid-for time is less than or equal to paying upper limit time.
In being embodied as, step 102 also includes: send paying upper limit time to terminal.
In being embodied as, paying upper limit time is the higher limit of the paid-for time of single, and the paid-for time of single should be less than
Or equal to paying upper limit time.
In step 103, checking password is obtained according to paid-for time and password array.
When performing step 103 first, step 103 particularly as follows:
Obtain the difference of preset value and paid-for time, by the unit of the numbered difference that checking password is set in password array
Element.
When non-first perform step 103 time, step 103 particularly as follows:
Obtain numbering and the difference of paid-for time of corresponding with checking password element in password array, will verify close
The element of the numbered difference that code is updated in password array.
At step 104, checking password is sent to terminal so that terminal arranges pre-payment product according to checking password
Use authority, and perform step 102.
In being embodied as, step 104 can be particularly as follows: send checking password to terminal so that terminal by wireless network
The use authority of pre-payment product is set according to checking password, and performs step 102.
First the present embodiment by generating password array according to cryptographic seed and iterative algorithm, and last by password array
One element sends to terminal as verification password, and the element number of password array is preset value;Then obtain paid-for time, pay
Time-consuming less than or equal to paying upper limit time;Checking password is obtained further according to paid-for time and password array;Finally will checking
Password sends to terminal so that terminal arranges the use authority of pre-payment product according to checking password, and when performing to obtain paying
Between, and the step of total paid-for time is obtained according to paid-for time;This improves motility and the reliability of payment system.
Embodiment two:
What Fig. 2 showed the pre-paying method that the present embodiment provides realizes flow process, for convenience of description, illustrate only and this
The part that embodiment is relevant, details are as follows:
In step 201, verification password is received.
In step 202., checking password is received.
In step 203, generate password array to be verified according to checking password and iterative algorithm, password array to be verified
Element number is equal to the numerical value of paying upper limit time.
In being embodied as, step 203 also includes: receive paying upper limit time.
In step 204, verification password is mated with the element in password array to be verified.
In step 205, when the Match of elemental composition verified in password and password array to be verified, obtain paid-for time, and
Total paid-for time is obtained according to paid-for time.
In being embodied as, total paid-for time is the paid-for time that the most serial amount is corresponding, is this and pays by stages
The summation of the paid-for time that paid-for time corresponding to the amount of money is corresponding with former all previous serial amount.
In being embodied as, step 205 particularly as follows: when verification password with in password array to be verified when mating, acquisition is treated
The numbering of the element with verification password match in verification password array, is set to numbering by paid-for time, and according to paid-for time
Obtain total paid-for time.
In being embodied as, when verifying password and not mating with any one element in password array to be verified, then sentence
This checking password fixed is illegal.
In step 206, it is judged that whether total paid-for time is more than or equal to presetting total paid-for time.
In being embodied as, preset total paid-for time has been to pay to buy the required paying paid of pre-payment product by stages
The summation of time.
In step 207a, the most then open the perpetuity limit of pre-payment product.
In step 207b, if it is not, then obtain remaining time according to paid-for time, and by close for checking for verification password update
Code.
In a step 208, start timing to obtain timer periods, and according to remaining time and timer periods acquisition can
Use the time.
In being embodied as, step 208 can have two kinds of embodiments.
The first embodiment is: start timing to obtain timer periods, and pot life is set to remaining time with
The difference of timer periods;
The second embodiment is: start timing to obtain timer periods, and according to following formula calculating pot life:
Wherein, TKFor pot life, TSFor remaining time, TjFor timer periods.
In step 209, it is judged that whether pot life is more than zero.
In step 2010a, the most then open the use authority of pre-payment product, and perform step 202.
In step 2010b, if it is not, then close the use authority of pre-payment product, and perform step 202.
First the present embodiment by receiving verification password;Then clothes checking password is received;And according to checking password and iteration
Algorithm generates password array to be verified, and the element number of password array to be verified is equal to the numerical value of paying upper limit time;Will verification
Password mates with the element in password array to be verified;When verification password and the Match of elemental composition in password array to be verified
Time, obtain paid-for time, and obtain total paid-for time according to paid-for time;And judge that whether total paid-for time is more than or equal to pre-
If total paid-for time, the most then open the perpetuity limit of pre-payment product, if otherwise obtain residue according to paid-for time
Between, and be checking password by verification password update, then start timing to obtain timer periods, and according to remaining time and timing
The device time obtains pot life;Judge that whether pot life is more than zero;The most then open the use authority of pre-payment product, and
Perform to receive the step of checking password;If it is not, then close the use authority of pre-payment product, and perform to receive the step of checking password
Suddenly;Therefore, the use authority of pre-payment product can be set flexibly according to the single payment time, improve payment system flexible
Property and reliability.
Embodiment three:
What Fig. 3 showed the pre-paying method that the present embodiment provides realizes flow process, for convenience of description, illustrate only and this
The part that embodiment is relevant, details are as follows:
In step 301, generate password array according to cryptographic seed and iterative algorithm, and by last of password array
Element is transmitted as verification password, and the element number of password array is preset value.
In being embodied as, in step 301 in generate password array according to cryptographic seed and iterative algorithm, and by password
Last element of array is transmitted as verification password can be particularly as follows: generate close according to hash algorithm and cryptographic seed
The 1st element in yardage group, according to other element of hash algorithm successively grey iterative generation password array, and by password array
Last element is transmitted as verification password.
In step 302, verification password is received.
In step 303, obtaining paid-for time, paid-for time is less than or equal to paying upper limit time.
In being embodied as, step 303 also includes: be transmitted by paying upper limit time.
In step 304, checking password is obtained according to paid-for time and password array.
When performing step 304 first, step 304 particularly as follows:
Obtain the difference of preset value and paid-for time, by the unit of the numbered difference that checking password is set in password array
Element.
When non-first perform step 304 time, step 304 particularly as follows:
Obtain numbering and the difference of paid-for time of corresponding with checking password element in password array, will verify close
The element of the numbered difference that code is updated in password array.
In step 305, checking password is sent.
Within step 306, checking password is received.
In step 307, generate password array to be verified according to received checking password and iterative algorithm, to be verified
The element number of password array is equal to the numerical value of paying upper limit time.
In being embodied as, step 307 also includes: receive paying upper limit time.
In step 308, verification password is mated with the element in password array to be verified.
In a step 309, when the Match of elemental composition verified in password and password array to be verified, obtain paid-for time, and
Total paid-for time is obtained according to paid-for time.
In being embodied as, step 309 is particularly as follows: when the Match of elemental composition verified in password and password array to be verified, obtain
Take the numbering with the element verifying password match in password array to be verified, paid-for time is set to numbering, and according to paying
Time obtains total paid-for time.
In step 3010, it is judged that whether total paid-for time is more than or equal to presetting total paid-for time.
In step 3011a, the most then open the perpetuity limit of pre-payment product.
In step 3011b, if it is not, then obtain remaining time according to paid-for time, and it is checking by verification password update
Password.
In being embodied as, when performing step 3011b first, obtaining according to paid-for time in described step 3011b is surplus
The remaining time particularly as follows: be set to the numerical value of described paid-for time by the numerical value of remaining time;When non-step 3011b of execution first,
Described step 3011b obtains remaining time according to paid-for time particularly as follows: obtain surplus according to paid-for time and pot life
The remaining time.
In step 3012, beginning timing is to obtain timer periods, and obtains according to remaining time and timer periods
Pot life.
In being embodied as, step 3012 can have two kinds of implementations.
The first implementation is: start timing to obtain timer periods, and pot life is set to remaining time with
The difference of timer periods;
The second implementation is: start timing to obtain timer periods, and according to following formula calculating pot life:
Wherein, TKFor pot life, TSFor remaining time, TjFor timer periods.
In step 3013, it is judged that whether pot life is more than zero.
In step 3014a, the most then open the use authority of pre-payment product, and perform step 303.
In step 3014b, if it is not, then close the use authority of pre-payment product, and perform step 303.
First the present embodiment by generating password array according to cryptographic seed and iterative algorithm, and last by password array
One element is transmitted as verification password, and the element number of password array is preset value;Receive verification password;Then obtain
Paid-for time, paid-for time is less than or equal to paying upper limit time, obtains checking password also according to paid-for time and password array
It is transmitted;Receive checking password and generate password array to be verified according to received checking password and iterative algorithm, treating
The element number of verification password array is equal to the numerical value of paying upper limit time;By verification password and the unit in password array to be verified
Element mates;When the Match of elemental composition verified in password and password array to be verified, obtain paid-for time, and according to when paying
Between obtain total paid-for time;And judge that total paid-for time whether more than or equal to presetting total paid-for time, the most then opens prepayment
Take the perpetuity limit of product, if otherwise obtaining remaining time according to paid-for time, and by close for checking for verification password update
Code, starts simultaneously at timing to obtain timer periods, and according to remaining time and timer periods acquisition pot life;Finally sentence
Whether disconnected pot life is more than zero;The most then open the use authority of pre-payment product, and perform to obtain the step of paid-for time
Suddenly;If it is not, then close the use authority of pre-payment product, and the step obtaining paid-for time performed, therefore, can be according to single
Paid-for time arranges the use authority of pre-payment product flexibly, improves payment system motility and reliability.
Embodiment four:
Corresponding with a kind of pre-paying method that embodiment one provides, present invention also offers a kind of server 40, such as Fig. 4
Shown in, including password array generation module 410, paid-for time acquisition module 420, checking password acquisition module 430, checking password
Sending module 440.
Password array generation module 410, for generating password array according to cryptographic seed and iterative algorithm, and by password number
Last element of group sends to terminal as verification password, and the element number of password array is preset value.
Paid-for time acquisition module 420, is used for obtaining paid-for time, and paid-for time is less than or equal to paying upper limit time.
Checking password acquisition module 430, for obtaining checking password according to paid-for time and password array.
Checking password sending module 440, for sending checking password to terminal so that terminal is arranged according to checking password
The use authority of pre-payment product.
In being embodied as, password array generation module 410 generates password array according to cryptographic seed and iterative algorithm, and will
Last element of password array as verification password send to terminal process particularly as follows:
The 1st element in password array is generated, according to hash algorithm successively iteration according to hash algorithm and cryptographic seed
Generate other element of password array, and last element of password array is sent to terminal as verification password.
When performing to verify password acquisition module first, checking password acquisition module 430 is according to paid-for time and password number
Group obtain checking password particularly as follows:.
Obtain the difference of preset value and paid-for time, by the unit of the numbered difference that checking password is set in password array
Element.
When the non-checking password acquisition module of execution first, checking password acquisition module 430 is according to paid-for time and password
Array obtain checking password particularly as follows:
Obtain numbering and the difference of paid-for time of corresponding with checking password element in password array, will verify close
The element of the numbered difference that code is updated in password array.
First the present embodiment by generating password array according to cryptographic seed and iterative algorithm, and last by password array
One element sends to terminal as verification password, and the element number of password array is preset value;Then obtain paid-for time, pay
Time-consuming less than or equal to paying upper limit time;Checking password is obtained further according to paid-for time and password array;Finally will checking
Password sends to terminal so that terminal arranges the use authority of pre-payment product according to checking password, and when performing to obtain paying
Between, and the step of total paid-for time is obtained according to paid-for time;This improves motility and the reliability of payment system.
Embodiment five:
Corresponding with a kind of pre-paying method that embodiment two provides, present invention also offers a kind of terminal 50, such as Fig. 5 institute
Show, including verification password acceptance module 510, authentication module receiver module 520, password array generation module 530 to be verified, coupling
Module 540, permanent authority development module 550, acquisition module remaining time 560, pot life acquisition module 570, pot life
The open module 590 of judge module 580, authority and authority close module 5100.
Verification password acceptance module 510, is used for receiving verification password.
Authentication module receiver module 520, is used for receiving checking password.
Password array generation module 530 to be verified, for generating password number to be verified according to checking password and iterative algorithm
Group, the element number of password array to be verified is equal to the numerical value of paying upper limit time.
Matching module 540, for mating verification password with the element in password array to be verified.
Total paid-for time acquisition module 550, for, during when the Match of elemental composition verified in password and password array to be verified, obtaining
Fetching is time-consuming, and obtains total paid-for time according to paid-for time.
Total paid-for time judge module 560, is used for judging that whether described total paid-for time is more than or equal to presetting total paying
Time.
The open module 570 of perpetuity limit, if for judging described total paid-for time more than or equal to presetting total paying
Time, then open the perpetuity limit of pre-payment product.
Remaining time acquisition module 580, if for judge described total paid-for time less than preset total paid-for time, then basis
Described paid-for time obtains remaining time, and is described checking password by described verification password update.
Pot life acquisition module 590, is used for starting timing to obtain timer periods, and according to remaining time and timing
The device time obtains pot life.
Pot life judge module 5100, is used for judging that whether pot life is more than zero.
For pot life judge module, the open module 5110 of authority, if judging that pot life more than zero, then opens prepayment
Take the use authority of product.
Authority closes module 5120, if judging that pot life is not more than zero for pot life judge module, then closes pre-
The use authority of paying product.
In being embodied as, total paid-for time acquisition module is when the unit in described verification password with described password array to be verified
During element coupling, obtain described paid-for time, and obtain the process of total paid-for time according to described paid-for time particularly as follows: work as verification
During Match of elemental composition in password and password array to be verified, obtain the element with verification password match in password array to be verified
Numbering, paid-for time is set to numbering, and according to described paid-for time obtain total paid-for time.
Pot life acquisition module 770 starts timing to obtain timer periods, and during according to remaining time and timer
Between obtain pot life process particularly as follows:
Beginning timing is to obtain timer periods, and pot life is set to the difference of remaining time and timer periods.
Or
Start timing to obtain timer periods, and according to following formula calculating pot life:
Wherein, TKFor pot life, TSFor remaining time, TjFor timer periods.
In being embodied as when performing acquisition module 580 remaining time first, described remaining time acquisition module 580 basis
Described paid-for time obtains the process of remaining time particularly as follows: the numerical value of remaining time is set to the numerical value of described paid-for time;
When non-perform acquisition module 580 remaining time first time, described remaining time, acquisition module 580 obtained according to described paid-for time
The process of remaining time is particularly as follows: obtain remaining time according to described paid-for time and described pot life.
First the present embodiment by receiving verification password;Then clothes checking password is received;And according to checking password and iteration
Algorithm generates password array to be verified, and the element number of password array to be verified is equal to the numerical value of paying upper limit time;Will verification
Password mates with the element in password array to be verified;When verification password and the Match of elemental composition in password array to be verified
Time, obtain paid-for time, and obtain total paid-for time according to paid-for time;And judge that whether total paid-for time is more than or equal to pre-
If total paid-for time, the most then open the perpetuity limit of pre-payment product, if otherwise obtain residue according to paid-for time
Between, and be checking password by verification password update, then start timing to obtain timer periods, and according to remaining time and timing
The device time obtains pot life;Judge that whether pot life is more than zero;The most then open the use authority of pre-payment product, and
Perform to receive the step of checking password;If it is not, then close the use authority of pre-payment product, and perform to receive the step of checking password
Suddenly;Therefore, the use authority of pre-payment product can be set flexibly according to the single payment time, improve payment system flexible
Property and reliability.
Embodiment six:
Corresponding with a kind of pre-paying method the 3rd embodiment, present invention also offers a kind of payment system 60, such as Fig. 6
Shown in, including above-mentioned server (40) and above-mentioned terminal (50).
First the present embodiment by generating password array according to cryptographic seed and iterative algorithm, and last by password array
One element is transmitted as verification password, and the element number of password array is preset value;Receive verification password;Then obtain
Paid-for time, paid-for time is less than or equal to paying upper limit time, obtains checking password also according to paid-for time and password array
It is transmitted;Receive checking password and generate password array to be verified according to received checking password and iterative algorithm, treating
The element number of verification password array is equal to the numerical value of paying upper limit time;By verification password and the unit in password array to be verified
Element mates;When the Match of elemental composition verified in password and password array to be verified, obtain paid-for time, and according to when paying
Between obtain total paid-for time;And judge that total paid-for time whether more than or equal to presetting total paid-for time, the most then opens prepayment
Take the perpetuity limit of product, if otherwise obtaining remaining time according to paid-for time, and by close for checking for verification password update
Code, starts simultaneously at timing to obtain timer periods, and according to remaining time and timer periods acquisition pot life;Finally sentence
Whether disconnected pot life is more than zero;The most then open the use authority of pre-payment product, and perform to obtain the step of paid-for time
Suddenly;If it is not, then close the use authority of pre-payment product, and the step obtaining paid-for time performed, therefore, can be according to single
Paid-for time arranges the use authority of pre-payment product flexibly, improves payment system motility and reliability.
The invention described above embodiment sequence number, just to describing, does not represent the quality of embodiment.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can pass through hardware
Completing, it is also possible to instruct relevant hardware by program and complete, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read only memory, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all spirit in the present invention and
Within principle, any modification, equivalent substitution and improvement etc. made, should be included within the scope of the present invention.