Summary of the invention
Embodiments of the invention provide a kind of expansion of many wallets, the method and apparatus of transaction initiation, can realize the many wallet expansions under the same application, improve user experience quality.
The technical scheme that the embodiment of the invention adopts is:
A kind of extended method of many wallets comprises:
Set up at least two stored value card files in smart card, each stored value card file is provided with unique stored value card file identification;
Form to smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card.
A kind of expanding unit of many wallets comprises:
Set up module, be used for setting up at least two stored value card files at smart card, each stored value card file is provided with unique stored value card file identification;
First is provided with module, be used for the form of smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card.
A kind of method of transaction initiation comprises:
The transaction initiation message that receiving terminal apparatus sends, wherein, described transaction initiation message comprises physical length, the data field in the order data territory that transaction initiation type identification, stored value card sign, terminal are sent, the greatest hope length of response data;
Judge whether the value that corresponding parameter among the result is set of preserving in value and the smart card of greatest hope length of physical length, response data in the order data territory that transaction initiation type identification, terminal are sent in the described transaction initiation message equates;
If equate, then select corresponding stored value card file according to the value of described stored value card sign;
Judge whether selected stored value card file satisfies authority;
If satisfy authority, then preserve dealing money, type of transaction;
Generate the transaction initiation response message;
Send described transaction initiation response message to terminal device.
A kind of smart card comprises:
Receiver module, be used for the transaction initiation message that receiving terminal apparatus sends, described transaction initiation message comprises physical length, the data field in the order data territory that transaction initiation type identification, stored value card sign, terminal are sent, the greatest hope length of response data;
Whether the value that corresponding parameter among the result is set of preserving in first judge module, the value of the physical length in the order data territory that is used for judging that described transaction initiation message transaction initiation type identification, terminal are sent, the greatest hope length of response data and smart card equates;
Select module, when the value that corresponding parameter among the result is set that is used for preserving in value and the smart card of greatest hope length of physical length, response data when the order data territory that described transaction initiation message transaction initiation type identification, terminal are sent equates, select corresponding stored value card file according to the value of described stored value card sign;
Second judge module is used to judge whether selected stored value card file satisfies authority;
Preserve module, be used for when selected stored value card file satisfies authority, preserve dealing money, type of transaction;
Generation module is used to generate the transaction initiation response message;
Sending module is used for sending the transaction initiation response message to terminal device.
The expansion of the many wallets of the embodiment of the invention, the method and apparatus of transaction initiation, under application of smart card, set up a plurality of stored value card files, each stored value card file is provided with unique stored value card file identification, form to smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card, when smart card receives the transaction initiation message, the result that is provided with who preserves in each parameter in the message and the smart card is compared, select corresponding stored value card file, carry out transaction initiation.Compared with prior art, the present invention can realize the many wallets expansions under the same application on based on the basis of PBOC stored value card standard, satisfies user's different demands, improves user experience quality.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making all other embodiment that obtained under the creative work prerequisite.
For the advantage that makes technical solution of the present invention is clearer, the present invention is elaborated below in conjunction with drawings and Examples.
Embodiment one
Present embodiment provides a kind of extended method of many wallets, and as shown in Figure 1, the extended method of described many wallets comprises:
101, set up at least two stored value card files in smart card, each stored value card file is provided with unique stored value card file identification;
In the present embodiment, under same application, establish 16 stored value card files, as shown in Figure 2, the stored value card file identification that different stored value card files is corresponding different, each e-file sign comprises the sexadecimal number of two bytes.
102, the form to smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card.
Particularly, described form setting to smart card transaction initiation message to be received comprises: the form of circle being deposited the transaction initiation message is provided with and the form of consuming the transaction initiation message is provided with.
(1) form that circle is deposited the transaction initiation message is provided with.
As shown in Figure 3, the formatting of circle being deposited the transaction initiation message is for comprising parameters C LA, INS, P1, P2, Lc, DATA and Le, and CLA, INS, P1, P2 are the command header of four fixing bytes, and Lc, DATA and Le are adjustable length command body; Wherein, CLA is the classification byte of command message, INS is the command byte of command message, P1 is the transaction initiation type identification, P2 is a stored value card sign, and Lc is the physical length in the terminal device order data territory of sending, and DATA is a data field, comprise key identifier, dealing money, Terminal Equipment Identifier, Le is the greatest hope length of response data; Wherein, CLA, INS, P1, Lc and Le are constant, and P2, DATA are variable.:
Because 16 wallets are supported in described application, when the transmission circle is deposited the transaction initiation message, utilize the value of P2 to distinguish different wallets, P2=0xX2, X is the numerical value of 0-F, refers to which wallet is concluded the business.
(2) form to consumption transaction initiation message is provided with.
As shown in Figure 4, for comprising parameters C LA, INS, P1, P2, Lc, DATA and Le, CLA, INS, P1, P2 are the command header of four fixing bytes with the formatting of consumer sale Initial message, and Lc, DATA and Le are adjustable length command body; Wherein, CLA is the classification byte of command message, INS is the command byte of command message, P1 is the transaction initiation type identification, P2 is a stored value card sign, and Lc is the physical length in the terminal order data territory of sending, and DATA is a data field, comprise key identifier, dealing money, Terminal Equipment Identifier, Le is the greatest hope length of response data; Wherein, CLA, INS, P1, Lc and Le are constant, and P2, DATA are variable.
Because 16 wallets are supported in described application, when sending the consumer sale Initial message, utilize the value of P2 to distinguish different wallets, P2=0xX2, X is the numerical value of 0-F, refers to which wallet is concluded the business.
Wherein, the value of corresponding parameter is unequal in the described circle value of depositing parameter P1 in the transaction initiation message and the consumer sale Initial message.
Comprise described parameter P2 in the stored value card file identification of described each stored value card file correspondence, the value of different stored value card file corresponding parameters P2 is unequal.
103, the form to the type of transaction sign is provided with, and wherein, described type of transaction sign comprises the sign of the type of transaction that stored value card sign and this stored value card are carried out.
Because same application is supported 16 stored value cards down, therefore, the type of transaction sign also will be revised thereupon.As shown in Figure 5, in the present embodiment, the type of transaction sign is the stored value card sign with a byte representation, preceding four bits, and which stored value card expression is; Four bits in back are the sign of the type of transaction that this stored value card carried out.If preceding four bits are 0, then represent first wallet; If preceding four bits are 1, then represent second wallet; By that analogy.If back four bits are 2, what then represent this stored value card and carried out is that circle is deposited transaction, if back four bits are 6, what then represent this stored value card and carried out is consumer sale.
104, the form to the transaction details file is provided with, and wherein, comprises described type of transaction sign in the described transaction details file.
As shown in Figure 6, described transaction details file comprises 23 bytes, and the 10th byte is the type of transaction sign, corresponding with the type of transaction sign that is provided with in the step 103, thereby,, can know which kind of transaction which wallet file is carried out easily by the transaction details file.
The extended method of the many wallets of the embodiment of the invention, under application of smart card, set up a plurality of stored value card files, each stored value card file is provided with unique stored value card file identification, form to smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card, when smart card receives the transaction initiation message, the result that is provided with who preserves in each parameter in the message and the smart card is compared, select corresponding stored value card file, carry out transaction initiation.Compared with prior art, the present invention can realize the many wallets expansions under the same application on based on the basis of PBOC stored value card standard, satisfies user's different demands, improves user experience quality.
Embodiment two
In the present embodiment, under an application, support 16 stored value cards at most.
The method that present embodiment provides an Artenkreis to deposit transaction initiation, as shown in Figure 7, the method that described circle is deposited transaction initiation comprises:
701, the circle of receiving terminal apparatus transmission is deposited the transaction initiation message, and wherein, described circle is deposited the transaction initiation message and comprised parameters C LA, INS, P1, P2, Lc, DATA and Le.
702, judge whether the value that corresponding parameter among the result is set of preserving in value that described circle deposits parameters C LA, INS, P1, Lc and Le in the transaction initiation message and the smart card equates.If equate that then execution in step 703; If unequal, then execution in step 704.
703, select corresponding stored value card file according to the value of parameter P2.
704, return error code, and withdraw from.
705, judge whether selected stored value card file satisfies authority.
706, if satisfy authority, the information such as dealing money, type of transaction of then preserving are to buffer memory; If do not satisfy authority, then be back to step 704.
707, search the key of smart card, according to the value of described cipher key calculation parameter MAC1.
708, generate circle and deposit the transaction initiation response message.
709, send described circle to terminal device and deposit the transaction initiation response message.
Embodiment of the invention circle is deposited the method for transaction initiation, under application of smart card, set up a plurality of stored value card files, each stored value card file is provided with unique stored value card file identification, form to smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card, when smart card receives circle when depositing the transaction initiation message, the result that is provided with who preserves in each parameter in the message and the smart card is compared, select corresponding stored value card file, enclose and deposit transaction initiation.Compared with prior art, the present invention can realize the many wallets expansions under the same application on based on the basis of PBOC stored value card standard, satisfies user's different demands, improves user experience quality.
Embodiment three
In the present embodiment, under an application, support 16 stored value cards at most.
Present embodiment provides a kind of consumer sale initialized method, and as shown in Figure 8, the initialized method of described consumer sale comprises:
801, the consumer sale Initial message of receiving terminal apparatus transmission, wherein, described consumer sale Initial message comprises parameters C LA, INS, P1, P2, Lc, DATA and Le.
802, whether the value that corresponding parameter among the result is set of preserving in the value of judging parameters C LA, INS, P1, Lc and Le in the described consumer sale Initial message and the smart card equates.If equate that then execution in step 803; If unequal, then execution in step 804.
803, select corresponding stored value card file according to the value of parameter P2.
804, return error code, and withdraw from.
805, judge whether selected stored value card file satisfies authority.
806, if satisfy authority, the information such as dealing money, type of transaction of then preserving are to buffer memory; If do not satisfy authority, then be back to step 804.
807, generate consumer sale initialization response message.
808, send described consumer sale initialization response message to terminal device.
The initialized method of embodiment of the invention consumer sale, under application of smart card, set up a plurality of stored value card files, each stored value card file is provided with unique stored value card file identification, form to smart card consumer sale Initial message to be received is provided with, and preservation is provided with the result in smart card, when smart card receives the consumer sale Initial message, the result that is provided with who preserves in each parameter in the message and the smart card is compared, select corresponding stored value card file, carry out transaction initiation.Compared with prior art, the present invention can realize the many wallets expansions under the same application on based on the basis of PBOC stored value card standard, satisfies user's different demands, improves user experience quality.
Embodiment four
Present embodiment provides a kind of expanding unit of many wallets, and as shown in Figure 9, the expanding unit of described many wallets comprises:
Set up module 901, be used for setting up at least two stored value card files at smart card, each stored value card file is provided with unique stored value card file identification;
First is provided with module 902, be used for the form of smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card.
Further, the expanding unit of described many wallets can also comprise:
Second is provided with module 903, is used for the form of type of transaction sign is provided with, and wherein, described type of transaction sign comprises the sign of the type of transaction that stored value card sign and this stored value card are carried out.
The 3rd is provided with module 904, is used for the form of transaction details file is provided with, and wherein, comprises described type of transaction sign in the described transaction details file.
The concrete workflow of the expanding unit of the many wallets of present embodiment can not repeat them here with reference to described in the embodiment one.
The expanding unit of the many wallets of the embodiment of the invention, under application of smart card, set up a plurality of stored value card files, each stored value card file is provided with unique stored value card file identification, form to smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card, when smart card receives the transaction initiation message, the result that is provided with who preserves in each parameter in the message and the smart card is compared, select corresponding stored value card file, carry out transaction initiation.Compared with prior art, the present invention can realize the many wallets expansions under the same application on based on the basis of PBOC stored value card standard, satisfies user's different demands, improves user experience quality.
Embodiment five
Present embodiment provides a kind of smart card, and as shown in figure 10, described smart card comprises:
Receiver module 1001 is used for the transaction initiation message that receiving terminal apparatus sends, and described transaction initiation message comprises parameters C LA, INS, P1, P2, Lc, DATA and Le;
Whether the value that corresponding parameter among the result is set of preserving in first judge module 1002, the value that is used for judging described transaction initiation message parameters C LA, INS, P1, Lc and Le and smart card equates;
Select module 1003, be used for the value that corresponding parameter among the result is set of in the value of described transaction initiation message parameters C LA, INS, P1, Lc and Le and smart card, preserving when equal, select corresponding stored value card file according to the value of parameter P2;
Second judge module 1004 is used to judge whether selected stored value card file satisfies authority;
Preserve module 1005, be used for when selected stored value card file satisfies authority, preserve dealing money, type of transaction;
Generation module 1006 is used to generate the transaction initiation response message;
Sending module 1007 is used for sending the transaction initiation response message to terminal device.
Wherein, described smart card can also comprise:
Search and computing module 1008, be used to search the key of smart card, according to the value of described cipher key calculation parameter MAC1;
Comprise described parameter MAC1 in the transaction initiation response message that then described generation module 1006 generates.
The concrete workflow of present embodiment smart card can not repeat them here with reference to described in the embodiment one.
Embodiment of the invention smart card, under application of smart card, set up a plurality of stored value card files, each stored value card file is provided with unique stored value card file identification, form to smart card transaction initiation message to be received is provided with, and preservation is provided with the result in smart card, when smart card receives the transaction initiation message, the result that is provided with who preserves in each parameter in the message and the smart card is compared, select corresponding stored value card file, carry out transaction initiation.Compared with prior art, the present invention can realize the many wallets expansions under the same application on based on the basis of PBOC stored value card standard, satisfies user's different demands, improves user experience quality.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method, be to instruct relevant hardware to finish by computer program, described program can be stored in the computer read/write memory medium, this program can comprise the flow process as the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of claim.