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:
In smart card, set up at least two 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 receiving the transaction initiation message with convenient smart card; 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;
Said 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.
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, when receiving the transaction initiation message with convenient smart card, 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;
Said first is provided with module specifically is used for the form that circle is deposited the transaction initiation message is provided with and the form of consumption transaction initiation message is provided with.
A kind of method of transaction initiation comprises:
The transaction initiation message that receiving terminal apparatus sends, wherein, said transaction initiation message comprises physical length, the data field in the order data territory that send at transaction initiation type identification, stored value card sign, terminal, 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 send at transaction initiation type identification, terminal in the said transaction initiation message equates;
If equate, then select corresponding stored value card file according to the value of said stored value card sign, wherein, have a plurality of stored value card files in the smart card, each stored value card file has unique stored value card file identification;
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 said 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, said transaction initiation message comprises physical length, the data field in the order data territory that send at transaction initiation type identification, stored value card sign, terminal, 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 said 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 of preserving in the value of the physical length in the order data territory that is used for sending when said transaction initiation message transaction initiation type identification, terminal, the greatest hope length of response data and the smart card equates; Value according to said stored value card sign is selected corresponding stored value card file; Wherein, have a plurality of stored value card files in the smart card, each stored value card file has unique stored value card file identification;
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, the form of smart card transaction initiation message to be received is provided with, and in smart card, preserves the result is set; 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 wallet expansions under the same application on based on the basis of PBOC stored value card standard, satisfy user's different demands, improves user experience quality.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, 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 are not making all other embodiment that obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
For the advantage that makes technical scheme of the present invention is clearer, the present invention is elaborated below in conjunction with accompanying drawing and embodiment.
Embodiment one
Present embodiment provides a kind of extended method of many wallets, and is as shown in Figure 1, and the extended method of said many wallets comprises:
101, in smart card, set up at least two stored value card files, 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, said 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 of circle being 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, and 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 said 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, and 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 order data territory of sending, terminal, 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 said 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 said circle value of depositing parameter P1 in the transaction initiation message and the consumer sale Initial message.
Comprise said parameter P2 in the stored value card file identification of said 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, said 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, type of transaction identifies with a byte representation, and preceding four bits are the stored value card sign, 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 said type of transaction sign in the said transaction details file.
As shown in Figure 6, said 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 through 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, the form of smart card transaction initiation message to be received is provided with, and in smart card, preserves the result is set; 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 wallet expansions under the same application on based on the basis of PBOC stored value card standard, satisfy 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 said circle is deposited transaction initiation comprises:
701, the circle of receiving terminal apparatus transmission is deposited the transaction initiation message, and wherein, said 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 said 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 said key calculation parameter MAC1.
708, generate circle and deposit the transaction initiation response message.
709, send said 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, the form of smart card transaction initiation message to be received is provided with, and in smart card, preserves the result is set; 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 wallet expansions under the same application on based on the basis of PBOC stored value card standard, satisfy 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 is as shown in Figure 8, and the initialized method of said consumer sale comprises:
801, the consumer sale Initial message of receiving terminal apparatus transmission, wherein, said consumer sale Initial 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 the value of 802, judging parameters C LA, INS, P1, Lc and Le in the said 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 said 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, the form of smart card consumer sale Initial message to be received is provided with, and in smart card, preserves the result is set; 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 wallet expansions under the same application on based on the basis of PBOC stored value card standard, satisfy user's different demands, improves user experience quality.
Embodiment four
Present embodiment provides a kind of expanding unit of many wallets, and is as shown in Figure 9, and the expanding unit of said 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 said 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, said 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 said type of transaction sign in the said transaction details file.
The concrete workflow of the expanding unit of the many wallets of present embodiment can repeat no more at this 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, the form of smart card transaction initiation message to be received is provided with, and in smart card, preserves the result is set; 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 wallet expansions under the same application on based on the basis of PBOC stored value card standard, satisfy user's different demands, improves user experience quality.
Embodiment five
Present embodiment provides a kind of smart card, and is shown in figure 10, and said smart card comprises:
Receiver module 1001 is used for the transaction initiation message that receiving terminal apparatus sends, and said 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 said transaction initiation message parameters C LA, INS, P1, Lc and Le and smart card equates;
Select module 1003, when the value that corresponding parameter among the result is set that is used in the value of said transaction initiation message parameters C LA, INS, P1, Lc and Le and smart card, preserving is 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, said smart card can also comprise:
Search and computing module 1008, be used to search the key of smart card, according to the value of said key calculation parameter MAC1;
Comprise said parameter MAC1 in the transaction initiation response message that then said generation module 1006 generates.
The concrete workflow of present embodiment smart card can repeat no more at this with reference to described in the embodiment one.
Embodiment of the invention smart card is set up a plurality of stored value card files under application of 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, 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 wallet expansions under the same application on based on the basis of PBOC stored value card standard, satisfy 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 accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like 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; Be merely embodiment of the present invention, but protection scope of the present invention is not limited thereto, any technician who is familiar with the present technique field is 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.