Method to the aerial read-write of file in the S-SIM card
Technical field
What the present invention relates to is the method in a kind of telecommunication technology field, particularly a kind of method to the aerial read-write of file in S-SIM (SuperSubscribe Identity Module is called for short: S-SIM or the high-capacity SIM) card.
Background technology
Along with developing rapidly of mobile communication technology, use the user's of telecommunications card (SIM card under the GSM network, the UIM card under the cdma network etc.) number to get more and more, how can be better and user communication, understand user's demand hobby timely, so that adjust or the improvement service, be the content that operator and service provider (SP) very are concerned about.Under traditional mode, operator and service provider need gather feedback data from user side, can be by employing professional intermediary company or special survey webpage is set on the website for field feedback, that have even adopt the mode of telephone poll, adopt which kind of mode all to have limitation: the cost height, friendly inadequately concerning the user, need take quality time of user, the data of gathering are more coarse mostly, are difficult to obtain Useful Information.
Development along with wireless communication technique and GPRS technology, operator and service provider can link up by GPRS mode and user, this mode has reduced the workload of linking up greatly, the user only need use the terminal of supporting GPRS regularly to connect GPRS and use, and just can link up with operator and service provider.The process of linking up need not intermediary or face-to-face with the user, and the up-downgoing of information (read-write) can be a data file, need not user effort energy and fills in questionnaire.This mode has brought facility for really " communications ", yet this mode is still not ideal enough: GPRS connects needs the user to initiate, and connects slowly, and needs can take user's time; GPRS connects and will collect certain expense, when the user connects but do not need to find this to serve, can bring for no reason waste to the user; When transmitted data amount is big, can influence other application of user.
Find through literature search prior art, Jinpusi (Beijing) Electronic Development Co., Ltd. is in the patent of 200510076525.4 (publication number is CN1688174A) at application number, introduced a kind of method of gathering based on the user data of SIM/UIM card, operator is by sending data SMS to the user, and user terminal is with the mode and the user interactions of straight display menu.This method has adopted short message mode to realize mutual between operator and user side, because moving to use with other, short message channel separates, when user terminal support card end is used STK/UTK, it is mutual to carry out the up-downgoing of data SMS (binary system comprises some utility commands) by short message channel and certain communication protocol (as the OTA agreement); In addition, communication process need not the user and initiates, and the stand-by period of communication is minimum, need not take user's time, even can be at the ignorant complete operation down of user.This method understands to operator and the leading subscriber client information has brought facility, has brought better experience also for simultaneously user's use.
This method is for general application, general low capacity SIM/UIM card is suitable, because data quantity transmitted is less in this application, can use a note or several cascade notes to finish, the integrality of data also can manage, simultaneously, the data that pass to card under do not need buffer memory yet.Yet, when in the big application of some transmitted data amount, because the restriction of existing protocol, the number of a up-downgoing cascade note is very limited (usually less than 10), because the memory space of common SIM/UIM card is less, this method is not provided with caching mechanism, so can't carry out unified management to the integrality of data, the input that is not suitable for carrying out big application data (bigger usually, as to reach the K level) is upgraded.
High speed development along with electronic technology, the appearance of S-SIM card (high-capacity SIM card), it has the controlled big capacity Nand Flash memory of CPU, memory space reaches the hundreds of Mbytes, deposit various application datas with wide card space for operator and service provider, mutual between operator and user will be closer, the demand of the data volume of up-downgoing is also with increasing, therefore how on the prior art basis, to come the Cavan part is improved the method for writing in the air in conjunction with the characteristics of S-SIM card, guarantee the integrality of communication data, improve user's experience, this just becomes a current technical barrier that must solve.
Summary of the invention
The objective of the invention is to overcome deficiency of the prior art, on the basis of existing wireless communications protocol specification, provide a kind of method the aerial read-write of file in the S-SIM card.Make the reciprocal process between operator and user no longer need traditional mode, and reciprocal process initiated by carrier server, adopt short message channel, do not influence other operation of user, and communication process can not produce expense; In addition, solve the problem of big data quantity transmission effectively, guaranteed the integrality of data; Make and become convenient reliable between operator and user alternately.
The present invention is achieved by the following technical solutions, and the present invention has specifically comprised following steps:
Step 1: when needs stick into when reading and writing in the line space S-SIM, operator or service provider server adopt the wireless communication protocol of agreement by short message channel, issue data SMS to customer mobile terminal earlier; Enter step 2;
Described communication protocol can be any one wireless communication protocol that adopts short message channel, as OTA, WIB or ADE etc.
Described data SMS, its feature is: be different from common text SMS, comprise certain command character, the binary format note of organizing according to certain protocol specification; Here, require communicating pair (server and customer mobile terminal) to want to support communication protocol simultaneously,, and can not be performed operation if a side does not support that the note that it received will be regarded as a text SMS; Here, to comprise following components at least in the form of data SMS: note sequence number SQN, command character INS, side-play amount OFFSET and length LEN GTH.
After the data SMS that server issues is received in step 2:S-SIM clamping, understand, carry out related command, and carry out uplink and downlink communication, carry out step 3 with server;
Described execution related command mainly comprises two aspects for the S-SIM card: read Cavan part content and write (renewal) Cavan part content.
Describedly read Cavan part content and write (renewal) Cavan part content, its feature is: the Cavan part of being read and write is generally a general file, when operator or service provider issue a certain application (as Yellow Page, recreation etc.), a certain or several files in the application should be set be used to deposit and the data of user communication (as user's clicking rate, user integral, application version number etc.), operator or service provider server should be able to clearly be known the path and the data format of this document.When S-SIM was carried out operating writing-file, S-SIM was stuck in its Flash district establishment one temporary file and is used to deposit many continuous notes that issue, and carries out relevant operating writing-file after complete reception again.
The described Cavan part content that reads, its process is:
From the data SMS that issues, obtain the parameter (path, offset address and length) of the file that continues, read the corresponding document content according to parameter, and be organized into of the response of one or more data SMS as transmitting short message, be uploaded to server, server receives this note, resolve short message content, obtained the user profile that needs.
Described writing (renewal) Cavan part content, its step is:
Step 21: when the S-SIM clamping receive under the server pass write (renewals) file data note (article one) time, in its FLASH, set up a temporary file F1 earlier, be used for interim store data note;
Step 22:S-SIM card is write the check code that obtains index X, the total number N of server data SMS to be sent (renewal) file data note and may have (look communication protocols agreed) from article one: when total number greater than 1 the time, enter step 23; When total number is 1, enter step 24;
Step 23: for the data SMS that ensuing server issues, the S-SIM card is judged its note index and note sequence number:
When and note index consistent with the note sequence number of article one was in the total number scope when the note sequence number, the S-SIM card was updated to the back of temporary file F1 with this note, and the S-SIM card is waited for and received next bar data SMS, circulation execution in step 23;
When and note bar number that receive consistent with the note sequence number of article one when the note sequence number arrived note total number N, the S-SIM card was updated to the back of temporary file F1 with this last item note, enters step 24;
When the note sequence number of the sequence number that receives note and article one is inconsistent, the S-SIM card is judged the command type of transmitting short message: if be the transaction file note, then delete the content of temporary file F1, and this transmitting short message is write (renewal) file note as article one, enter step 22; If be other type note, the S-SIM card is finished corresponding operating, keeps temporary file F1 to wait for the arrival of next bar transaction file data SMS simultaneously, arrives circulation execution in step 23 as new transmitting short message;
Step 24:S-SIM card is judged the integrality (check code) of data SMS among the temporary file F1: work as verification succeeds, the related command (transaction file) of data SMS is resolved and carried out to the S-SIM card, after executing, delete this temporary file F1, and sending " upgrading successfully " information to server according to communication protocol, process finishes; When verification was unsuccessful, the S-SIM card was not carried out the related command of data SMS, and sends error reporting according to communication protocol to server, deletes this temporary file F1 simultaneously, and process finishes;
Above-described note index, note total number, check code and determination methods, their feature is: the communication protocol according to different can have the different forms of expression and judgment expression form.
Step 3: carried out once " communication " between operator or service provider and user's the S-SIM card, carried out corresponding service measures, when needs carry out new " communication ", repeated to enter step 1 according to the result of " communication ".
Compared with prior art, advantage of the inventive method and improvement are in particular in the following aspects:
(1) advantage of method of the present invention: owing to adopted short message channel and wireless communication technology, and the file of being read and write is a general file: application program and server are shared information by file path, the form known jointly, server can select initiatively to initiate at any time operation. than SIM card OTA passage, use simple, use exploitation easily, versatility is better.
(2) whole process need not the user and initiates even need not user's participation, short message channel makes communication process not influence other operation of user, and server can experience decision according to the user and initiate the operating time, carries out as in the night or allows the user that a certain period is set and carry out;
(3) method of the present invention has made full use of the jumbo characteristics of S-SIM card, when there was big data quantity in communication process, S-SIM was stuck in its Flash zone and opens up an interim buffer memory, is used to deposit intermediate data, guarantee the integrality of data, realized the communication of big data quantity.
(3) compare with traditional survey pattern, saved expenses such as intermediary, webpage setting, telephone contact and data preparation, process need not the user and participates in, and makes " communication " mode more economically, conveniently.
(4) existing GPRS communication mode, need the user initiatively to initiate, connection procedure is slow and take other operation of user, method of the present invention by comparison, extra charge and time that the invalid connection because of the user causes have been removed from, and " communication " process do not influence the user other use, do not take user's stand-by period, give the user with better experience.
(4) compare with existing patented technology, realized the communication of big data quantity (K level), because the Flash of S-SIM card zone is enough big, can satisfy desired memory space when the descending data volume of server is very big fully, and the integrality of data can be guaranteed also.
Description of drawings
The flow chart that Fig. 1 reads and writes in the air to file in the S-SIM card.
Embodiment
Below in conjunction with accompanying drawing the embodiment of the invention is described: present embodiment is being to implement under the prerequisite with the technical solution of the present invention, provided detailed execution mode and concrete operating process, but protection scope of the present invention is not limited to following embodiment.
In order to do better explanation, now do following supposition: the A game services S of provider need with the user P " communications " that downloaded this A recreation, what assemble on the portable terminal of user P is the S-SIM card of support OTA standard.
Embodiment 1, and service provider S need read the A game data of user P: game credits, and then as shown in Figure 1, the performing step of " communication " is:
Step 1, service provider S issues a data SMS SMa (reading file request) to user P portable terminal earlier by server, short message channel is adopted in communication, agreement adopts the OTA standard, the data content of data SMS comprises at least: command type (reads the file request order, as=0x01), the note sequence number (=0x01), file path (as aaa bbb ccc.xxx, for this document, it is unified that service provider and card vendor should consult), offset address (as 0x22) and read byte length (as 0x08) in the file, enter step 2;
Step 2:S-SIM clamping is resolved this short message content after receiving the data SMS SMa that server issues: reading order type (reading the file request order), file path, document misregistration address and read length; The S-SIM card is according to these parameters, read the corresponding document content, and content is encapsulated among the data SMS SMb (data length only is 8 bytes) according to the OTA standard, be uploaded to server, the command type of SMb data SMS, note sequence number should be consistent with descending before SMa data SMS, with the response of data SMS descending before indicating to become; This data SMS of server parses has obtained the content of file, and replys a confirmation of receipt to the S-SIM of user P card; Finished and read file operation, entered step 3;
Step 3: carried out once " communication " between the S-SIM card of service provider S and user P, obtained user's A game credits, service provider S can judge whether service is made corresponding adjustment or the user is rewarded etc. according to this; When needs carry out new " communication ", repeat to enter step 1;
Embodiment 2, and service provider S need upgrade the A game version (data volume is bigger, reaches the K level) of user P, and as shown in Figure 1, the performing step of " communication " is:
Step 1, service provider S issues data SMS (transaction file operation) to user P portable terminal earlier by server, short message channel is adopted in communication, agreement adopts the OTA standard, (reach the K level according to data length to be updated, and the content-length of a data SMS mostly is 140 bytes most), the data SMS that issues reaches several 10, the data content of data SMS comprises at least: command type (transaction file order, as=0x02), the note sequence number (=0x01), file path (as aaa bbb ccc.xxx, for this document, service provider and card vendor should consult unified), offset address in the file (as 0x22) and read byte length (as 0X09f3); Issue data SMS for many of needs, the index (as X) and the total number (as N) of data SMS also need be provided; In addition, parameters such as file path, offset address, length only occur in article one note; Enter step 21;
Step 21: when article one data SMS SMc that server issues is received in the S-SIM clamping of user P, in its FLASH, set up a temporary file F1 earlier, be used for interim store data note;
Step 22:S-SIM card obtains note sequence number SQN1, index X1, total number N and the check code of server data SMS to be sent from article one note SMc: total number N enters step 23 greater than 1;
Step 23: the data SMS SMi that issues for ensuing server, the S-SIM card is judged its note index and note sequence number: when and note index Xi consistent with the note sequence number SQN1 of article one is in total number N scope as note sequence number SQNi, the S-SIM card is updated to this note the back of temporary file F1, the S-SIM card is waited for and is received next bar data SMS, circulation execution in step 23; When and note bar number that receive consistent with the note sequence number SQN1 of article one as note sequence number SQNi arrived note total number N, the S-SIM card was updated to the back of temporary file F1 with this last item note, enters step 24;
Step 24:S-SIM card is judged the integrality (verification check code) of data SMS among the temporary file F1: work as verification succeeds, the S-SIM card is integrated into an instruction in order with the data SMS among the temporary file F1, and resolve this instruction: obtain file path, offset address, data to be updated, instruction is divided into many S-SIM Cavan part update instruction carries out the transaction file operation, after executing, delete this temporary file F1, and upload a data SMS SMd to server according to the OTA standard, as response (upgrading successfully) to the transaction file operation, process finishes, and enters step 3; When verification was unsuccessful, the S-SIM card was not carried out the transaction file order of data SMS, and sends error reporting according to the OTA standard to server, deletes this temporary file F1 simultaneously, and process finishes, and enters step 3;
Step 3: carried out once " communication " between the S-SIM card of service provider S and user P, file in the user S-SIM card is upgraded, provide up-to-date game service to the user; When needs carry out new " communication ", repeat to enter step 1;
The implementation result of above embodiment shows:
(1) " communication " process adopts short message channel, and it is rapid and free to the user communicating to connect, and the process of " communication " does not influence other operation of user;
(2) " communication " initiate by server, need not the user therebetween and participate in, avoided the extra charge and the time that initiatively connect, participate in bringing because of the user;
(3) object of " communication " (file) is general file, and operator or service provider have known the definite position of desired data file when linking up, only need regularly check or upgrade this specific file, just can easily with user " communication ";
(4) in a lot of situations; the data volume of transaction file operation is very big (reaching the K level); server need be divided into many transmitting short messages; because the space in " SIM zone " is very little; and data are easily because of outage therebetween; disappearance resets; in order to guarantee the more integrality of new data; as described in Example 2; method of the present invention is stored in all transmitting short messages of transaction file operation in the Flash zone of S-SIM card; this zone is non-volatile (failure data protection); and the space is big (reaching the M level) enough; be enough to hold each independent operating data; and method of the present invention has also been carried out verification operation to the integrality of data, has well guaranteed the mutual of big data quantity.
More than these aspects all can embody difference with the prior art and advantage, implementation method of the present invention is simple, economical, gives the user with better experience.