A kind of method and system of storage service data
Technical field
The present invention relates to technology of Internet of things, particularly relate to the method and system of a kind of storage service data.
Background technology
Internet of Things is as the important component part of emerging high-tech industry, by countries in the world as one of reply economic crisis, the focus technology revitalized the economy.Internet of things service can be widely applied in numerous industries, such as vehicle, electric power, finance, environmental protection, oil, individual and enterprise's security protection, the hydrology, military affairs, fire-fighting, meteorology, coal, agriculture and forestry, elevator etc..Estimate according to expert, between the coming years, internet of things service will be rapidly introduced into a lot of industry, its number of users is also by Fast Growth, estimate to the end of the year 2012, China Internet of Things based on mobile cellular communication technology number of users will be likely to be breached 3000~40,000,000, Internet of Things application also can after the several years one of core application becoming LTE, there is vast potential for future development.
At present in the application type of internet of things service, some is that after application terminal is once disposed, regular maintenance is implemented in inconvenience, some is that operation system reliability of operation is had higher requirement, and some is relatively tight to response time requirement, and also some requires that customized user identification card is to store its business datum.On the other hand, in increasing field, SIM plays the effect of key, and SIM can allow the communication between object can transmitting in a network.The SIM supply of 2009 is 3,500,000,000, it is contemplated that be up to 5,000,000,000 by 2013.During the application of actual Internet of Things, a lot of files the most linear fixed-length file such as EFadn, EFsms etc. of Subscriber Identity Module are the most idle, lack again the Deta bearer body of particular memory Internet of Things related service on Subscriber Identity Module simultaneously, a kind of solution is to design according to the requirement of internet of things service type, produce new Subscriber Identity Module, but Internet of Things applied business model is many, the cost of do so will be the hugest.
Summary of the invention
In view of this, present invention is primarily targeted at the method and system of a kind of storage service data are provided, it is not necessary to the most customized novel Subscriber Identity Module stores for internet of things service data such that it is able to cost-effective and easy to spread.
For reaching above-mentioned purpose, the technical scheme is that and be achieved in that:
A kind of method of storage service data, including:
Terminal obtains the index information of the circular file for storage service data from Subscriber Identity Module and stores;
When needing storage service data, terminal is used in the circular file of storage service data described in business datum write, and updates respective index information.
Described terminal by being used in the circular file of storage service data described in business datum write is: business datum is directly write in the circular file being used for storage service data described in Subscriber Identity Module by terminal,
Described terminal updates respective index information: terminal updates the index information of the described circular file for storage service data of self storage, and is used in the circular file of storage service data described in the index information write Subscriber Identity Module after described renewal.
The method also includes: the circular file data being used for storage service data are read in the memory block preset in terminal by terminal,
Described terminal is used in the circular file of storage service data described in business datum being write, and updates respective index information and be:
Business datum is write and is used in the circular file of storage service data described in described default memory block by terminal, and updates the index information of the described circular file for storage service data of self storage;
When satisfied imposing a condition, terminal is used in the circular file content write Subscriber Identity Module of storage service data described in described default memory block, is used in the circular file of storage service data afterwards described in the index information self preserved write Subscriber Identity Module.
The circular file data being used for storage service data are read in the memory block preset in terminal by described terminal: the circular file data being used for storage service data, according to index information or default business datum and circular file storage comparison table in Subscriber Identity Module, are read in the memory block preset in terminal by terminal.
The index information that described terminal obtains the circular file for storage service data from Subscriber Identity Module is: terminal obtains index information from the record that the described circular file for storage service data is up-to-date.
The method also includes:
When terminal needs to read business datum, terminal reads the business datum of storage in circular file according to described index information.
The system of a kind of storage service data, including terminal and Subscriber Identity Module;Wherein,
Described terminal, for obtaining the index information of the circular file for storage service data and storing from Subscriber Identity Module;And when needs storage service data, be used in the circular file of storage service data described in business datum write, and update respective index information.
Described terminal by being used in the circular file of storage service data described in business datum write is: business datum is directly write in the circular file being used for storage service data described in Subscriber Identity Module by terminal,
Described terminal updates respective index information: terminal updates the index information of the described circular file for storage service data of self storage, and is used in the circular file of storage service data described in the index information write Subscriber Identity Module after described renewal.
Described terminal, is additionally operable to read in the memory block preset in terminal by the circular file data being used for storage service data,
Described terminal is used in the circular file of storage service data described in business datum being write, and updates respective index information and be:
Business datum is write and is used in the circular file of storage service data described in described default memory block by terminal, and updates the index information of the described circular file for storage service data of self storage;
When satisfied imposing a condition, terminal is used in the circular file content write Subscriber Identity Module of storage service data described in described default memory block, is used in the circular file of storage service data afterwards described in the index information self preserved write Subscriber Identity Module.
The circular file data being used for storage service data are read in the memory block preset in terminal by described terminal: the circular file data being used for storage service data, according to index information or default business datum and circular file storage comparison table in Subscriber Identity Module, are read in the memory block preset in terminal by terminal.
The index information that described terminal obtains the circular file for storage service data from Subscriber Identity Module is: terminal obtains index information from the record that the described circular file for storage service data is up-to-date.
Described terminal, is additionally operable to, when needs read business datum, read the business datum of storage in circular file according to described index information.
The method and system of storage service data of the present invention, utilize the circular file in existing Subscriber Identity Module to store internet of things service data, the present invention is effectively utilized the circular file that existing Subscriber Identity Module is not well used in some business, need not the most customized novel Subscriber Identity Module, it is thus possible to cost-effective, and easy to spread.
Accompanying drawing explanation
Fig. 1 is the method flow schematic diagram of storage service data of the present invention;
Fig. 2 is circular file structural representation in SIM;
Fig. 3 is the embodiment of the present invention 1 circular file Index district schematic diagram;
Fig. 4 is the embodiment of the present invention 1 circular file Indexbit position schematic diagram;
Fig. 5 is the schematic flow sheet that the embodiment of the present invention 1 reads business datum;
Fig. 6 is the schematic flow sheet that the embodiment of the present invention 1 writes business datum.
Detailed description of the invention
The basic thought of the present invention is: utilize the circular file in existing Subscriber Identity Module to store internet of things service data.
Fig. 1 is the method flow schematic diagram of storage service data of the present invention, as it is shown in figure 1, the method includes:
Step 101: starting up of terminal after normal authentication, initializes Subscriber Identity Module.
After user identifying card initializing terminates, terminal needs obtain the index information of the circular file for storage service data from Subscriber Identity Module and store, concrete, terminal obtains index information from the record that the described circular file for storage service data is up-to-date.
Optionally, after user identifying card initializing terminates, the circular file data being used for storage service data, according to index information (as terminal uses the situation of single loop file storage service data) or default business datum and circular file storage comparison table (as terminal uses the situation of multiple circular file storage service data) in Subscriber Identity Module, are read in memory block default in terminal by terminal.
In the present invention, the description information of circular file in description Subscriber Identity Module is stored in corresponding circular file, concrete, respective cycle file in Subscriber Identity Module is opened up a memory block and is stored indexed by district, always using last record to be stored indexed by district, index field is to incorporate former categorical data (as whether EFlnd stores dialed number), still incorporate business datum or null term for each holding tank indicating this circular file.The example of a kind of definition is as follows: 0 represent certain holding tank be sky data, 1 represent certain holding tank storage be original data type (being exactly dialed number for EFlnd), 2 represent certain holding tank storage be business datum.
Step 102: in service application, needs storage service data.
Step 103: terminal is used in the circular file of storage service data described in business datum write, and updates respective index information.
Here, business datum is directly write in Subscriber Identity Module in the case of circular file by terminal, after updating the respective index information of terminal storage, also need in corresponding circular file in this index information write Subscriber Identity Module, concrete, in the case of the holding tank of circular file is filled with, write storage holding tank at most, in the case of the holding tank of circular file is not filled with, write next unappropriated holding tank.
In the case of the circular file data being used for storage service data are read in the memory block preset in terminal by terminal after initialization, business datum is write and is used in the circular file of storage service data described in described default memory block by terminal, and updates the index information of the described circular file for storage service data of self storage.Afterwards, by terminal when meeting certain condition (such as shutdown, intervalometer is then etc.), the circular file content being used for storage service data in described default memory block is write in Subscriber Identity Module, (the storage rule according to circular file in this circular file in the index information write Subscriber Identity Module that will preserve in terminal again, in the case of circular file holding tank is filled with, index information is write in circular file the record stored at most, in the case of circular file holding tank is not filled with, index information is write next unappropriated holding tank in circular file).
Accordingly, during starting up of terminal or when terminal is restarted, the record that terminal reads associated cyclic file on Subscriber Identity Module up-to-date as index information and stores.
Step 104: in service application, needs to read business datum.
Step 105: terminal reads the business datum of storage in circular file according to index information.
In the case of the circular file data storing business datum are read in the memory block preset in terminal by terminal after initialization, the memory block (default circular file, including index field) that terminal is preset from terminal is read related data.
It should be noted that in the present invention, terminal refers mainly to internet-of-things terminal, heretofore described Subscriber Identity Module can be SIM, RUIM card, usim card, UICC card etc..
The present invention also proposes the system of a kind of storage service data, and this system includes terminal and Subscriber Identity Module;Wherein,
Described terminal, for obtaining the index information of the circular file for storage service data and storing from Subscriber Identity Module;And when needs storage service data, be used in the circular file of storage service data described in business datum write, and update respective index information.
Described terminal by being used in the circular file of storage service data described in business datum write is: business datum is directly write in the circular file being used for storage service data described in Subscriber Identity Module by terminal,
Described terminal updates respective index information: terminal updates the index information of the described circular file for storage service data of self storage, and is used in the circular file of storage service data described in the index information write Subscriber Identity Module after described renewal.
Described terminal, is additionally operable to read in the memory block preset in terminal by the circular file data being used for storage service data,
Described terminal is used in the circular file of storage service data described in business datum being write, and updates respective index information and be:
Business datum is write and is used in the circular file of storage service data described in described default memory block by terminal, and updates the index information of the described circular file for storage service data of self storage;
When satisfied imposing a condition, terminal is used in the circular file content write Subscriber Identity Module of storage service data described in described default memory block, is used in the circular file of storage service data afterwards described in the index information self preserved write Subscriber Identity Module.
The circular file data being used for storage service data are read in the memory block preset in terminal by described terminal: the circular file data being used for storage service data, according to index information or default business datum and circular file storage comparison table in Subscriber Identity Module, are read in the memory block preset in terminal by terminal.
The index information that described terminal obtains the circular file for storage service data from Subscriber Identity Module is: terminal obtains index information from the record that the described circular file for storage service data is up-to-date.
Described terminal, is additionally operable to, when needs read business datum, read the business datum of storage in circular file according to described index information.
Below in conjunction with specific embodiment, technical scheme is described in further detail.
Embodiment 1
File on SIM, data include following four type:
(1) the system initial data being stored in by SIM production firm.
(2) network parameter injected when card being issued to user by network operation department or other operating divisions and user data.As authenticated and adding confidential information Ki (one of Kc algorithm input parameter: secret key number);International mobile subscriber number (IMSI);A3:IMSI identifying algorithm;A5: cryptographic keys generating algorithm;Before A8: secret key (Kc) generates, user's secret key (Kc) generating algorithm etc..
(3) data being stored in by user oneself.Such as, short message is stored in EFsms, phone directory is stored in EFadn, the most also Fixed Dialing, abbreviated dialing, performance parameter, telephone expenses numeration etc..
(4) user is automatically credited during with card and the network that updates continues and user profile class data.Including mobile phone position district identifier (LAI) during the last location registers, the periodic location update interval time of setting, temporarily moved subscriber number (TMSI) etc..
These data above-mentioned all leave in respective directory entry; primary sources are placed on root; when initially entering root after electric power starting; relevant subdirectory is entered further according to instruction; the data field of every kind of catalogue extremely inside all has respective identification code to protect; only the data in data field could be inquired about after verification differentiates, read and update.Primary sources generally belong to permanent data above, cannot change after being injected by SIM production firm, the specialized agency of secondary sources usual network operations department just allows to consult and update, and the major part in third and fourth class data allows users with terminal and it is carried out read/write operation.
In the present embodiment, EFlnd business datum being stored in SIM, EFlnd are exactly for depositing the circular file of business datum in Subscriber Identity Module, and in SIM, circular file structure is as shown in Figure 2.
The present embodiment always deposits index (Index) information with last record in EFlnd, described index information is for describing the dialed number data of EFlnd file, the situation of business datum storage, general, Index information takies the memory space of a record, certainly, 2 notably more records can be accounted for as required, its space size is different because of the difference of different Subscriber Identity Modules, than if any Subscriber Identity Module in one be recorded as 176 bytes, have is then 255 bytes.
Fig. 3 is the embodiment of the present invention 1 circular file Index district schematic diagram, as shown in Figure 3, from physical storage structure, Index district is made up of multiple continuous print bytes, Fig. 4 is the embodiment of the present invention 1 circular file Indexbit position schematic diagram, as shown in Figure 4, Index district is in logic by two ingredients, one example realized is, the first character selecting Index saves as indication field, and being used for indicating this field is Index field, gives specific value to it, such as " 0xAA ", this field is just other recording areas of Index and other EFlnd separately.According to our scheme, store three kinds of data in EFlnd, one is business datum, and one is common dialed number data, is exactly additionally dead slot.In the remaining field of Index, every 2 bit determine the storage data type of each holding tank, 00 represent certain holding tank be sky data, 01 represent certain holding tank storage be dial data, 10 represent certain holding tank storage be business datum time, if Bit1, Bit2 of Index are 01, indicate that first holding tank be stored in is common dialed number data, if Bit3, Bit4 are 02, what then second holding tank of instruction was stored in is business datum, if Bit5, Bit6 are 00, it indicates that the 3rd holding tank is not stored in data.
According to the method described above the Index district of EFlnd file is implemented logical partitioning again, then the field in Index district can describe the storage condition of for up to 1/2*8* (N-1) individual EFlnd holding tank, the value of N depends on different Subscriber Identity Module types, but for circular file, use a holding tank always can describe the storage condition of all records of this circular file.
Fig. 5 is the schematic flow sheet that the embodiment of the present invention 1 reads business datum, wherein, after mobile terminal receives the order reading business datum, business datum reading is carried out by searching the data in preset loop file corresponding in terminal, when carrying out read operation from default relevant circular file, the Index of first enquiry mobile terminal memory block, according to Query Result (when such as corresponding positions is 02), business datum is read in the scratchpad area (SPA) of terminal, read successfully, if a certain circular file does not read successfully, then read other circular files again according to terminal predefined procedure, until reading all default circular files, otherwise read failure.
Fig. 6 is the schematic flow sheet that the embodiment of the present invention 1 writes business datum, wherein, after mobile terminal receives the order of write business datum, the Index of first enquiry mobile terminal preset loop file storage area, according to Query Result, business datum write the idle groove of some in internal memory or cover a holding tank, if two Bit of correspondence of Index are then changed to business datum and indicate (a kind of example such as 02, represent storage is business datum) by business datum;At shutdown or intervalometer to constantly, in the circular file content write SIM that will preset in terminal in relevant EF file, EF file of the most again Index write card being above correlated with.
Being illustrated as a example by the EFLnd of SIM above, the present invention is the most applicable for other application on R-UIM, USIM and UICC, can imitate this and be similarly used, repeat no more.
The invention have the advantage that replicability is good, low cost, be effectively utilized the circular file that original Subscriber Identity Module is not well used in some business so that operator need not the most customized novel Subscriber Identity Module, has effectively saved operating cost.When practice, its business datum business can also be write in the Subscriber Identity Module issued in the past by operator by instrument or third party software, just can commence business easily.
The above, only presently preferred embodiments of the present invention, it is not intended to limit protection scope of the present invention.