Summary of the invention
The present invention provides a kind of method and apparatus of air card-writing, and the preset IMSI in SIM card is not needed before writing card,
So as to avoid the waste problem of IMSI.
First aspect present invention provides a kind of method of air card-writing, comprising:
Terminal establishes Wireless Fidelity (WIreless-Fidelity, abbreviation WIFI) connection;
The terminal is connected to air card-writing server by the WIFI and sends air card-writing request message, described aerial
Write card request message for request be user identity identification SIM card be written personal data, the SIM card be empty calorie;
The terminal receives the air card-writing response message that the air card-writing server returns by the WIFI connection,
It include personal data in the air card-writing response message, the personal data is the air card-writing server according to institute
State the generation of air card-writing request message;
The SIM card is written in the personal data by the terminal.
Optionally, in the air card-writing request message include MSISDN so that the air card-writing server according to
The MSISDN generates the personal data.
It optionally, further include user information in the air card-writing request, so that the air card-writing server is established
The corresponding relationship of the user information and the personal data.
Wherein, the personal data includes: MSISDN, IMSI, short message service parameter (Short Message
Service Parameter, abbreviation SMSP) and personal identification number unlock code (Personal Identification Number
Unlocking Key, abbreviation PUK).
Second aspect of the present invention provides a kind of method of air card-writing, comprising:
Air card-writing server receiving terminal sends air card-writing request message by WIFI connection, and the air card-writing is asked
Ask message for request be user identity identification SIM card be written personal data, the SIM card be empty calorie;
The air card-writing server generates personal data according to the air card-writing request message;
The air card-writing server personal data carrying is write in the sky be sent in card response message it is described
Terminal.
It optionally, include MSISDN in the air card-writing request message, the air card-writing server is according to the sky
In write card request message generate personal data, comprising:
The air card-writing server generates the personal data according to the MSISDN.
It optionally, further include user information in the air card-writing request, then the air card-writing server is according to
After air card-writing request message generates personal data, the method also includes:
The air card-writing server establishes corresponding relationship according to the user information and the personal data, and saves
The corresponding relationship of the user information and the personal data.
Wherein, the personal data includes: MSISDN, IMSI, SMSP and PUK.
Third aspect present invention provides a kind of terminal, comprising:
Module is established, for establishing Wireless Fidelity WIFI connection;
Sending module sends air card-writing request message, institute for connecting by the WIFI to air card-writing server
State air card-writing request message for request be user identity identification SIM card be written personal data, the SIM card be empty calorie;
Receiving module, for receiving the air card-writing response that the air card-writing server returns by the WIFI connection
Message includes personal data in the air card-writing response message, and the personal data is the air card-writing server
It is generated according to the air card-writing request message;
Writing module, for the SIM card to be written in the personal data.
Optionally, in the air card-writing request message include MSISDN so that the air card-writing server according to
The MSISDN generates the personal data.
It optionally, further include user information in the air card-writing request, so that the air card-writing server is established
The corresponding relationship of the user information and the personal data.
Wherein, the personal data includes: MSISDN, IMSI, SMSP and PUK.
Fourth aspect present invention provides a kind of air card-writing server, comprising:
Receiving module sends air card-writing request message by WIFI connection for receiving terminal, and the air card-writing is asked
Ask message for request be user identity identification SIM card be written personal data, the SIM card be empty calorie;
Generation module, for generating personal data according to the air card-writing request message;
Sending module is sent to the terminal for writing personal data carrying in the sky in card response message.
It optionally, include MSISDN in the air card-writing request message, then the generation module is specifically used for: according to institute
It states MSISDN and generates the personal data.
It optionally, further include user information in the air card-writing request;The then air card-writing server further include:
Corresponding relation building module, for establishing corresponding relationship according to the user information and the personal data, and
Save the corresponding relationship of the user information Yu the personal data.
Wherein, the personal data includes: MSISDN, IMSI, SMSP and PUK.
The method and apparatus of air card-writing provided by the invention, terminal are established WIFI connection, are connected by WIFI to aerial
It writes card server and sends air card-writing request message, air card-writing request message is used to request to be written for empty SIM card individualized
Data, and the air card-writing response message that air card-writing server returns, air card-writing response message are received by WIFI connection
In include personal data, terminal will be in the empty SIM card of personal data write-in.The method completes SIM by WIFI connection
Writing for card snaps past journey, does not need to predict IMSI in SIM card, avoids the waste of IMSI resource.
Specific embodiment
Fig. 1 is the flow chart of the method for the air card-writing that the embodiment of the present invention one provides, as shown in Figure 1, the present embodiment
Method may comprise steps of:
Step 101, terminal establish WIFI connection.
In the present embodiment, terminal is communicated by WIFI connection with air card-writing server, and therefore, terminal will first be established
WIFI connection.
Step 102, terminal, which are connected by WIFI to air card-writing server, sends air card-writing request message, the writing over air
Card request message is that personal data is written in SIM card for requesting, which is empty calorie.
In the present embodiment, SIM card is empty calorie before writing card, and SIM card is not have preset individualized number in empty calorie, that is, SIM card
According to terminal will be conversed by SIM card, be surfed the Internet etc. must be written personal data in SIM card.Personal data includes:
The information such as IMSI, MSISDN, SMSP.
In the present embodiment, terminal accesses network and air card-writing server communication by WIFI connection, and WIFI connection is built
Vertical not need through SIM card, therefore, SIM card can be empty calorie.User can be led to by business hall on WIFI connection debarkation net
It crosses online business hall and submits the aerial request that networks, the Integrated Circuit Card Identity including submitting networking place, SIM card back up
(IC Card Identity, abbreviation ICCID) number and PUK carry out business verification, self-service can be selected by user after verification
Number (i.e. MSISDN), set meal and rate type, and networking data is filled in, after price raising networking data, online business hall meeting
The transmission of air card-writing request message is triggered, optional user can not also select MSISDN, and by online business hall or in the air
Card server is write to distribute automatically.
If user does not select MSISDN, and MSISDN is not also distributed automatically for user in online business hall, then in the air
What writes in card request message can not include with, and server is after receiving in air card-writing request, from available MSISDN
Distribute a MSISDN for user, and personal data generated according to MSISDN, preserve on air card-writing server it is multiple can
MSISDN.
If user has selected MSISDN, alternatively, online business hall is that user is assigned with MSISDN automatically, then air card-writing
In request message include selection MSISDN, server receive air card-writing request in after, according to air card-writing request in wrap
The MSISDN included generates personal data.
Optionally, air card-writing request in can also include user information, user information, that is, user ID card No.,
ICCID, networking place, PUK, set meal and rate type of SIM card etc., air card-writing service receive air card-writing request after,
The legitimacy for verifying the ID card No. of user, the ICCID of SIM card, networking place and PUK etc., is determining above- mentioned information
After legitimacy, personal data is generated according to MSISDN, can also include package information in personal data.Air card-writing request
In message other than carrying MSISDN and user information, some safety check information can also be carried, for example, media access control
Make (Media Access Control, abbreviation MAC) check value.
Air card-writing server can also further establish personal data and user information after generating personal data
Corresponding relationship, and the corresponding relationship of personal data and user information is saved, convenient for the subsequent management to SIM.
It should be noted that the personal data that is generated in the present embodiment and the in the prior art individuation data in SIM card
It is identical, it is all personal data not to be described in detail here.And the present invention is not to the tool of air card-writing request message
Body form is defined, and can be used existing air card-writing request message, can also be defined new air card-writing request message.
Step 103, terminal receive the air card-writing response message that air card-writing server returns by WIFI connection, in the air
Writing includes personal data in card response message, and personal data is that air card-writing server is raw according to air card-writing request message
At.
The personal data carrying of generation is write card response message in the sky and is sent to terminal by air card-writing server.This reality
It applies in example and the concrete form of air card-writing response message is not defined, can be disappeared using the response of existing air card-writing
Breath, can also define new air card-writing response message.It mainly include two parts data in air card-writing response message: encryption
Personal data and external authentication data, wherein the personal data in air card-writing response message can use type, length
Degree, value (Type Length Value, abbreviation TLV) structure, as shown in table 1:
Table 1
The SIM card is written in personal data by step 104, terminal.
Specifically, air card-writing response message is sent to SIM card by terminal, SIM is wrapped according in air card-writing response message
The external authentication data included carry out external authentication and further solve to the personal data of encryption if external authentication passes through
It is close, personal data is obtained, if external authentication fails, writes card crash message to the transmission of air card-writing server, notice is aerial
It writes card server and writes card crash.After obtaining personal data, SIM card is carried out to write card and power-off protection, if writing card success,
Then terminal carries out cold reset, and card process is write in end, and SIM card is activated after user restarts terminal.If writing card crash, terminal to
Card crash message is write in the transmission of air card-writing server, and notice air card-writing server writes card crash.
In the present embodiment, terminal establishes WIFI connection, is connected by WIFI to air card-writing server and sends air card-writing
Request message, air card-writing request message is used to request to be written personal data for empty SIM card, and is received by WIFI connection
The air card-writing response message that air card-writing server returns, includes personal data in air card-writing response message, and terminal will
In the empty SIM card of personal data write-in.The method completes writing for SIM card by WIFI connection and snaps past journey, do not need
IMSI is predicted in SIM card, avoids the waste of IMSI resource.
It is further to note that compare in the present embodiment and art methods, write-in process is simpler, write-in effect
Rate is higher.Specifically, the prior art is write and snaps past journey and communicated by way of short message, due to needing short message to have the limit of number of words
System needs to send multiple short messages and sends numerical selection request respectively, write card request, write card instruction, write in card during writing card
Hold etc., it could complete to write card.And hypertext markup language (HyperText Markup can be used in the present embodiment
Language, abbreviation HTML) agreement transmission air card-writing request message and air card-writing response message, it is only necessary to primary interaction is just
It can complete to write to snap past journey.
Fig. 2 is the flow chart of the method for air card-writing provided by Embodiment 2 of the present invention, and the present embodiment takes from air card-writing
The angle of device of being engaged in describes, as shown in Fig. 2, method provided in this embodiment may comprise steps of:
Step 201, air card-writing server receiving terminal send air card-writing request message, writing over air by WIFI connection
Card request message is that personal data is written in SIM card for requesting, and SIM card is empty calorie.
Step 202, air card-writing server generate personal data according to air card-writing request message.
If without carrying MSISDN in air card-writing request message, air card-writing server is to use from available MSISDN
Family selects a MSISDN, generates personal data according to selected MSISDN.If including in air card-writing request message
MSISDN, air card-writing server generate personal data according to the MSISDN for including in air card-writing request message.
The personal data includes: MSISDN, IMSI, SMSP and PUK etc..
Step 203, air card-writing server write personal data carrying in card response message in the sky is sent to terminal.
Terminal is receiving air card-writing response message, obtains personal data, and personal data is written in SIM card.
The specific implementation of step 201-203 can refer to the associated description of embodiment one, and which is not described herein again.
In the present embodiment, air card-writing server receiving terminal sends air card-writing request message by WIFI connection, empty
In write card request message personal data be written for empty SIM card for request, then, according to the generation of air card-writing request message
Personal data carrying is write in card response message in the sky and is sent to terminal by personal data.The method is connected by WIFI
It connects writing for SIM card of completion and snaps past journey, do not need to predict IMSI in SIM card, avoid the waste of IMSI resource.
It further include user information in air card-writing request optionally on the basis of above-described embodiment two;Then air card-writing
Server according to air card-writing request message generate personal data after, also perform the following operations: according to user information and
Peopleization data establish corresponding relationship, and save the corresponding relationship of user information and personal data.
Fig. 3 is the structural schematic diagram for the terminal that inventive embodiments three provide, as shown in figure 3, terminal provided in this embodiment
It include: to establish module 11, sending module 12, receiving module 13 and writing module 14.
Wherein, module 11 is established, for establishing WIFI connection;
Sending module 12 sends air card-writing request message for connecting by the WIFI to air card-writing server,
The air card-writing request message is that personal data is written in user identity identification SIM card for requesting, and the SIM card is sky
Card;
Receiving module 13 is rung for receiving the air card-writing that the air card-writing server returns by the WIFI connection
Message is answered, includes personal data in the air card-writing response message, the personal data is the air card-writing service
Device is generated according to the air card-writing request message;
Writing module 14, for the SIM card to be written in the personal data.
Wherein, the personal data includes: MSISDN, IMSI, SMSP and PUK.
It optionally, include mobile subscriber's International Integrated Services digital network number in the air card-writing request message
MSISDN, so that the air card-writing server generates the personal data according to the MSISDN.
It optionally, further include user information in the air card-writing request, so that the air card-writing server is established
The corresponding relationship of the user information and the personal data.
The terminal of the present embodiment can be used for executing the method for embodiment one, and specific implementation is similar with technical effect, this
In repeat no more.
Fig. 4 is the structural schematic diagram for the air card-writing server that the embodiment of the present invention four provides, as shown in figure 4, this implementation
The air card-writing server that example provides includes: receiving module 21, generation module 22 and sending module 23.
Wherein, receiving module 21 send air card-writing request message by Wireless Fidelity WIFI connection for receiving terminal,
The air card-writing request message is that personal data is written in user identity identification SIM card for requesting, and the SIM card is sky
Card;
Generation module 22, for generating personal data according to the air card-writing request message;
Sending module 23 is sent to the end for writing personal data carrying in the sky in card response message
End.
Wherein, the personal data includes: MSISDN, IMSI, SMSP and PUK.
It optionally, include MSISDN in the air card-writing request message, then the generation module is specifically used for: according to institute
It states MSISDN and generates the personal data.
It optionally, further include user information in the air card-writing request, corresponding air card-writing server can also wrap
Include: corresponding relation building module for establishing corresponding relationship according to the user information and the personal data, and saves institute
State the corresponding relationship of user information Yu the personal data.
The air card-writing server of the present embodiment, can be used for executing the method for embodiment two, specific implementation and technology
Effect is similar, and which is not described herein again.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above-mentioned each method embodiment can lead to
The relevant hardware of program instruction is crossed to complete.Program above-mentioned can be stored in a computer readable storage medium.The journey
When being executed, execution includes the steps that above-mentioned each method embodiment to sequence;And storage medium above-mentioned include: ROM, RAM, magnetic disk or
The various media that can store program code such as person's CD.
Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent
Pipe present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: its according to
So be possible to modify the technical solutions described in the foregoing embodiments, or to some or all of the technical features into
Row equivalent replacement;And these are modified or replaceed, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution
The range of scheme.