Summary of the invention
At problem and the defective that prior art exists, the object of the present invention is to provide a kind of telecom intelligent card of position-based service.
For achieving the above object, the technical solution adopted in the present invention is: a kind of telecom intelligent card of position-based service comprises:
The information acquisition module is used to obtain the residing geographical location information of user;
Catalogue is provided with module, is used to be provided with the catalogue relevant with the geographical position;
Information storage module is used to store and the relevant information in user geographical position of living in.
After adopting the telecom intelligent card of position-based service of the present invention, the user is in going to the process of destination, every geographical position, just can get access to the information relevant easily by described telecom intelligent card with this geographical position, compared with prior art, the user need not inquire about own residing geographical position constantly, has saved the trouble that missing is asked the way; Memory module is provided with module with catalogue the information relevant with the geographical position is stored with catalogue form, and compared with prior art, the user can recognize the relevant information in own geographical position of living in clear, systematically, has saved the time, has improved efficient.
For solving the problems of the technologies described above, the present invention proposes the data service system of a kind of position-based service, comprise portable terminal, this portable terminal is built-in with the telecom intelligent card of position-based service, the server that carries out information exchange with portable terminal; Described telecom intelligent card comprises information acquisition module and information storage module;
The information acquisition module obtains the residing geographical location information of user;
Portable terminal sends to server with the residing geographical position of user;
Server sends to telecom intelligent card with the information relevant with the geographical position;
Information storage module gets up the information stores relevant with the geographical position.
After adopting the data service system of position-based service of the present invention, described telecom intelligent card can obtain the residing geographical location information of user, compared with prior art, the user does not need by other loaded down with trivial details approach residing geographical location information to be inquired about, and has saved the time; Store the information relevant in the described server with the geographical position, all information are stored with data format, corresponding each geographical position, the relevant information that this geographical position is all arranged, the user only need have portable terminal just can get access to this information, compared with prior art, it is convenient, quick that the user obtains the mode of information, and the information that gets access to more comprehensively.
Corresponding with the data service system of above-mentioned position-based service, the present invention proposes a kind of position-based service method, comprising:
Telecom intelligent card obtains the step of the residing geographical location information of user;
Telecom intelligent card sends to the residing geographical location information of user the step of server;
Server will the information relevant with the geographical position sends to the step of telecom intelligent card;
The step that telecom intelligent card will the information stores relevant with the geographical position gets up.
Adopt position-based service method of the present invention, after this method being applied in the data service system of above-mentioned position-based service, this intrasystem telecom intelligent card can check at any time whether the residing geographical position of user changes, when user's geographical position changes, telecom intelligent card will obtain the geographical location information at this place, and this geographical location information sent to server, after server through database finds the information relevant with this geographical position, send to telecom intelligent card, compared with prior art, the user need not pass through other loaded down with trivial details channels, just can be convenient, get access to residing geographical location information quickly, and the information relevant with the geographical position, saved the time, energy has improved work efficiency.
Embodiment
The user understands the relevant information in geographical position of living in for convenience, the present invention improves existing smart card, put the smart card after improving into portable terminal, the user can understand own residing geographical position by this portable terminal from server, and the information relevant with this geographical position.
As shown in Figure 1, the present invention comprises the improvement that existing smart card carries out: increase the information acquisition module on the basis of existing smart card, be used to obtain user's geographical location information (process of obtaining geographical location information hereinafter describes in detail); Catalogue is provided with module, is used to be provided with the catalogue relevant with the geographical position; Information storage module is used for the information relevant with the geographical position is saved under the catalogue; And output module, be used for the information output that the geographical position is relevant.Respectively catalogue being provided with module, information storage module, output module below is elaborated:
Catalogue is provided with the second-level directory that catalogue in the module comprises root, subdirectory and subdirectory, and the information that the user is got access to from smart card is clearer, more orderly.When the geographical location information that obtains when smart card is Beijing, catalogue is provided with module Beijing and is set to root, the information relevant with Beijing, be set to the subdirectory of root as the scenic spots and historical sites, local conditions and customs etc., more detailed information setting such as the concrete scenic spots and historical sites, local conditions and customs are secondary subdirectory.The directory name that different geographical position is corresponding different, the information at different levels under the different directories title are also inequality, and when the residing geographical position of user changed, catalogues at different levels all can be upgraded.
For make the user clear, immediately understand the geographical position relevant information at own place, this smart card is provided with output module, message catalog structure and corresponding information is organized exported to terminal and show.Certainly, output module also can be arranged on terminal, and the tissue that carries out structure and information after by terminal the geographical position relevant information being read shows.
Telecom intelligent card provided by the invention also comprises information management module, is used for the geographical position relevant information that receives is distinguished, and sends to the second-level directory of root, subdirectory or subdirectory respectively.Like this, the user just can understand the various information that smart card provides by selecting catalogues at different levels.
The Xidan if the user drives from Xizhimen, but the road is not yet done, only know will through in Xin Jie Kou, the safety, the compound of sand, clay, etc. for making earthenware city.The user is in Xizhimen, utilization has the portable terminal of smart card of the present invention, can obtain current geographical position, also can obtain the relevant information in Xizhimen, for example: show near the local electronic chart that amplifies Xizhimen, see the geographical position and the direction at own place easily clearly, determine the path of Xin Jie Kou, the next stop, can remove from like this and ask the trouble that the people asks the way.
Behind the arrival Xin Jie Kou of driving, can obtain the similarly information relevant equally with the geographical position.
After the user arrives the Xidan, utilization has the portable terminal of telecom intelligent card of the present invention, can obtain each market, Xidan or shopping center sales promotion, give a discount, sell fast, new product information, the user is before shopping, at first understand these information by smart card, then these information are compared, at last directly go to buy and be fit to oneself commodity needs, inexpensive.Compared with prior art, save muscle power, financial resources, saved a lot of troubles.
As shown in Figure 2, put the smart card after improving into portable terminal, portable terminal and server have been formed the data service system of position-based service.The user is as follows by the process that this portable terminal obtains the relevant information in geographical position:
1, smart card obtains the residing geographical location information of user.
After portable terminal is started working, smart card is registered the residing at that time geographical location information of user, at set intervals, perhaps the user is every when reaching a new geographical position district, and smart card upgrades the residing geographical location information of user and sets up new registration procedure.In general, the content of user's geographical location information is seven bytes, comprising: the MCC ﹠amp of three bytes; MNC (Mobile Country ﹠amp; Network Codes, national coding and network code), the Cell ID (Cell Identity Value, sub-district value) of the LAC of two bytes (Location Area Code, band of position coding) and two bytes.
With the SIM card is example, the telecommunication intelligent SIM card of using in the GSM network is supported STK (SimApplication Toolkit, STK) kit, the STK kit is made of active order, an active order is wherein arranged for obtaining geographical location information: Provide LocalInformation, by carrying out this instruction, can know the sub-district at user place exactly, according to the sub-district value, just can orient user's geographical location information.Geographical location information is stored in the positional information file of SIM card.
For make SIM card can be immediately, the residing positional information of explicit user dynamically, in SIM card, be provided with monitoring module.SIM card is the stored position information content in the message file 7F206E7E file of position, when user's position change, monitoring module location information file 7F206E7E file is monitored, and checks whether this document is rewritten, if do not rewritten, illustrate that user position information does not change; If this document is rewritten, illustrate that user position information changes, obtain new positional information with this active order of Provide Local Information.Like this, as long as user's position changes, SIM card just can be upgraded user's position and relevant information, and therefore, the user can immediately, dynamically get access to residing positional information by SIM card no matter where be positioned at.
2, geographical location information is organized into up note and sends to server.
After smart card obtains the geographical location information at user place, according to the agreement of server regulation, by portable terminal this geographical location information is organized into up note.Portable terminal sends to server with up note.The message format of up note is:
Sign |
Length (byte) |
Value |
Explanation |
TPDU_Header |
Variable |
The short message head |
TP-UDHI is 0 |
UDL |
1 |
|
Follow-up data length |
Safety application data |
Card vendor's code and protocol version |
1 |
HEX |
|
The card sequence number |
8 |
HEX |
Back 8 bytes of IMSI file |
Coincidence counter |
5 |
HEX |
|
Random number |
4 |
HEX |
|
MAC |
4 |
HEX |
|
Order data |
Command type |
1 |
HEX |
|
Order length |
1 |
HEX |
The length of command parameter in this note.(, filling out 0) as no command parameter |
Command parameter |
X |
HEX |
|
In the message format of up note, card vendor's code and protocol version are 1 byte, and be as shown in the table:
b8 |
b7 |
b6 |
b5 |
b4 |
b3 |
b2 |
b1 |
Vendor number |
Protocol version |
Wherein, high five bits (b8-b4) are the card provider numbering, and low three bits (b3-b1) are protocol version, and first version is 001.
In the message format of up note, the card sequence number is back 8 bytes of IMSI (International MobileSubscriber Identity, international mobile subscriber identity) file, is used for identifying user identity and key and disperses; Random number is used for participating in key and disperses and safety certification; The integrality that the calculating of MAC (MessageAuthentication Code, message authentication codes) is used to guarantee data.(computational process of key dispersion, safety certification, MAC value hereinafter has a detailed description)
In the message format of up note, upstream data command type and corresponding command parameter following (during application order length should be arranged) thereof:
The supported up command type of application download server is:
Sequence number |
Command type |
1 |
User's registration |
2 |
Positional information |
It is as follows that the user registers corresponding command parameter:
Project |
Title |
Length (byte) |
Value |
Explanation |
Command type |
User's registration |
1 |
01 |
|
Command parameter |
The card issuing lot number |
1 |
The numbering of different distribution of card batch |
The card issuing lot number |
The command parameter of positional information correspondence is as follows:
Project |
Title |
Length (byte) |
Value |
Explanation |
Command type |
The positional information order |
1 |
02 |
|
Command parameter |
Positional information |
7 |
HEX |
|
Use the SIM card user of this position-based service to be example with one, geographical location information is organized into the process that up note sends to server is: when the user comes eight rooms, west, Beijing, SIM card finds that geographical location information changes, and sends out the positional information note on server, and content is:
0x11FFFFFFFFFFFFFFFF000000000111223344XXXXXXXX020764F00010C6CFAF
Wherein, 0x11 is vendor code and version number, 0xFFFFFFFFFFFFFFFF is the card sequence number, the 0000000001st, Counter Value, 0x11223344 is a random number, and XXXXXXXX is the MAC value, and 0x02 is a command type, 0x07 is a length, and 0x64F00010C6CFAF is the positional information of 7 bytes.
3, after server obtained the residing geographical location information of user, catalogue that will be complementary with user's geographical location information of living in and information sets were made into downlink short message and send to SIM card.
Server intercepts command parameter from up note, promptly position information is searched the geographical location information whether coupling is arranged in the database.Described geographical location information comprises the bibliographic structure of information and the information under the catalogue.If have, then the catalogue with correspondence becomes downlink short message with the format organization that information is stipulated according to agreement, sends to SIM card.The message format of downlink short message is as follows:
Sign |
Length (byte) |
Value |
Explanation |
TPDU_Header |
Variable |
The short message head |
TP-UDHI is 0 |
UDL |
1 |
|
Follow-up data length |
Safety application data |
Sign |
3 |
0XF0F0F0 |
Message identification |
Coincidence counter |
5 |
|
Counter |
MAC |
4 |
HEX |
MAC |
Random number |
4 |
HEX |
Key disperses and key is selected to use |
Order data |
Command type |
1 |
HEX |
|
Order length |
1 |
HEX |
The length of command parameter in this note.(, filling out 0) as no command parameter |
Command parameter |
X |
HEX |
|
In the message format of downlink short message, downlink data command type and corresponding command parameter following (during application order length should be arranged) thereof:
The supported down order type of application download server is:
Sequence number |
Command type |
1 |
Directory management |
2 |
Download of information |
The command parameter of directory management correspondence is as follows:
Project |
Title |
Length (byte) |
Value |
Explanation |
Command type |
Directory management |
1 |
01 |
|
|
Total directories |
1 |
HEX |
Follow-up catalogue data sum |
Catalogue data 1 |
X |
HEX |
Catalogue ID+ length+directory name |
Action type |
1 |
HEX |
1 adds, 2 deletions, and 3 rename |
... |
|
|
|
Catalogue data n |
X |
HEX |
|
Action type |
1 |
HEX |
|
In directory management, when deleting a catalogue, the information under this catalogue also should all be deleted.When renaming a catalogue, the information under this catalogue does not change.
The command parameter of download of information correspondence is as follows:
Project |
Title |
Length (byte) |
Value |
Explanation |
Command type |
Download of information |
1 |
02 |
|
|
Catalogue ID |
1 |
HEX |
|
Information ID |
1 |
HEX |
|
Message length |
1 |
HEX |
|
The information content |
X |
|
Chinese: 80+UCS2; English ASCII |
Catalogue data defines as follows: the follow-up length+directory name of catalogue ID+, and wherein, catalogue ID is 1 byte, scope is 0x01-0xFF; The Chinese directory name is 80+UCS2, and the English-language catalogue name is called ASCII.
Information defines as follows: catalogue ID+ Information ID+follow-up length+information content, according to catalogue ID, just can know the catalogue ownership at this information place.Information ID is 1 byte, and scope is 0x01-0xFF, and the coding of the information content is identical with the coding of directory name.
Use the SIM card user of this position-based service to be example with one, server will and the catalogue that is complementary of user's geographical location information of living in and the information sets process that is made into downlink short message be: server is received the note that the user in eight rooms, west, Beijing sends, messaging format according to the rules intercepts out positional information 0x64F00010C6CFAF from up note, search whether corresponding position information is with it arranged in the database, after finding, directory information " amusement food and drink " and " house property information " are formed downlink short message.Short message content is:
0xF0F0F00000000001XXXXXXXX11121314011801020109805A314E509910996E01020980623F4EA74FE1606F01
Wherein, 0xF0F0F0 is following line identifier, 0x00000000001 is a Counter Value, XXXXXXXX is the MAC value, 0x11121314 is a random number, 0x01 is the command type directory management, and 0x02 represents two catalogues are managed, and 0x0109805A314E509910996E01020980623F4EA74FE1606F01 represents to add two catalogues " amusement food and drink " and " house property information ".
4, after SIM card is received downlink short message, the geographical position relevant information is stored with catalogue form.
After SIM card is received the downlink short message of server, at first, descending protocol according to both sides' regulation, descending identification division to this downlink short message is verified, if defined is different in the identification division of this downlink short message and the agreement, prove that then this downlink short message is not the positional information note, not by checking; If that stipulates in the identification division of this downlink short message and the agreement is identical, prove that then this downlink short message is the positional information note, by verifying.
Store for the location dependent information that SIM card is got access to, be provided with information storage module in SIM card, information storage module comprises one or more geographical position relevant information file, and the information relevant with user geographical position of living in is kept in this document.The downlink short message that SIM card receives is resolved and split, obtain the directory name and the information content, the catalogue of SIM card is provided with the second-level directory that catalogue in the module comprises root, subdirectory and subdirectory, information management module is distinguished the geographical position relevant information that receives, then, ID according to catalogue finds the information that is associated with catalogue, send to the second-level directory of root, subdirectory or subdirectory respectively, at last, these catalogues and information stores in the relevant information file of the geographical position of correspondence.
In the present embodiment, after SIM card is received downlink short message, judge whether 3 bytes are 0xF0F0F0, if then this note is the positional information note.SIM card knows that by command type 0x01 current note is directory management, intercepts out two catalogues " amusement food and drink " and " house property information " respectively according to the form of down order, and stores in the 27002E00 file.
The 27002E00 file content is defined as follows:
Identifier:′2E00′ |
Structure:linear fixed |
Mandatory |
Record length:19 |
DF:2700 |
Access Conditions: READ ADM UPDATE ADM DEACTIVATE ADM ACTIVATE ADM |
Bytes |
Descr
iption
|
M/O |
Length/byte |
1 |
Catalogue ID |
M |
1 |
1 |
Catalogue length |
|
1 |
3-19 |
Directory content |
M |
17 |
If 19 bytes of file content less than are used the 0xFF completion.
After storing catalogue " amusement food and drink " and " house property information " into the 27002E00 file, file 27002E00 thes contents are as follows:
Recording mechanism |
The content of preserving |
1 |
0109805A314E509910996E (amusement food and drink) |
2 |
020980623F4EA74FE1606F (house property information) |
After distributing directory information under the server, issue subordinate's information note of two catalogues more respectively, subordinate's information of " amusement food and drink " is the introduction of " Lido " and " most enjoyable stage sky becomes " in the database; Subordinate's information of " house property information " is the introduction of " milky way gulf " and " long-drawn-out happy the remittance ".With the introduction that issues " Lido " is example, and the downlink short message content is:
0xF0F0F00000000003XXXXXXXX11621314025201014F804E3D90FD996D5E97FF0C662F4E2D56FD7B2C4E005BB6504765E5996D5E97FF0C96C6996D5E97FF0C516C5BD3FF0C55464E1A697CFF0C56FD96455B666821548C5E7C513F56ED4E8E4E004F533002
Wherein, 0xF0F0F0 is following line identifier, and 0x00000000003 is a Counter Value, XXXXXXXX is the MAC value, and 0x11621314 is a random number, and 0x02 is the command type download of information, 0x52 is a subsequent content length, 0x0101 represents catalogue ID 0x01, and Information ID 0x01,0x4F are the follow-up content-length, 0x80 represents Chinese, the follow-up expression information content: Lido is Chinese first hand Holiday Inn, integrates restaurant, apartment, commercial building, International School and kindergarten.
After SIM card is received this note, intercept out information, store among the 27002E01 according to the form of down order 0x02.Other 3 information processings are identical with this information.
The 27002E01 file content is defined as follows:
Identifier:′2E01′ |
Structure:linear fixed |
Mandatory |
Record length:141 |
DF:2700 |
Access Conditions: READ ADM UPDATE ADM DEACTIVATE ADM ACTIVATE ADM |
Bytes |
Description |
M/O |
Length/byte |
1 |
Catalogue ID |
M |
1 |
2 |
Information ID |
M |
1 |
3 |
Message length |
M |
1 |
4-140 |
The information content |
M |
137 |
If 140 bytes of file content less than are used the 0xFF completion.
Information stores that will be relevant with " house property information " with " amusement food and drink " is behind the 27002E01 file, and file 27002E01 thes contents are as follows:
Recording mechanism |
The content of preserving |
1 |
0101+ length+80+ Lido is Chinese first hand Holiday Inn, integrates restaurant, apartment, commercial building, International School and kindergarten. |
2 |
0102+ length+80+ most enjoyable stage sky becomes club, 400 square metres of fitness centers, 10 latest version treadmills; 4 conveyers; 2 bicycles and various strengthening exercise apparatus. |
3 |
0201+ length+80+ milky way gulf, the Lido core space, 200,000 square metres of international quality garden type dwelling houses are made up of 7 in picturesque disorder high-rise slab-type apartment buildings, general layout Founder, Chaoyang in every family. |
4 |
Long-drawn-out happy remittance of 0202+ length+80+ is positioned at the wide in the Nanjing University street of core merchant district, Wangjing, and 220,000 square metres of overall floorages are collection SOHO offices, experience the commercial comprehensive project of one that is. |
When the user enters the SIM card option, output module is organized into the tabulation demonstration with catalogue " amusement food and drink " and " the house property information " of preserving among the 27002E00, if select " amusement food and drink ", output module is searched the record that is associated with catalogue among the 27002E01 according to this catalogue ID 0x01, find record 1 and record 2, again the content in these 2 records be organized into tabulation and show, the user select a certain after, the full content of display message, as follows:
In order to guarantee the safety of data, making between SIM card and the server can proper communication, in the process of described " geographical location information is organized into up note sends to server ", need calculate MAC to the data in the up note.In described " after server obtained the residing geographical location information of user, catalogue that will be complementary with user's geographical location information of living in and information sets were made into downlink short message and send to SIM card " process, need verify the MAC value in the up note.In described " SIM card receive downlink short message after, the geographical position relevant information is stored with catalogue form " process, need verify the MAC value in the downlink short message.
In the process of described " geographical location information is organized into up note sends to server ", the process of the data in the up note being calculated MAC is:
At first, carry out the key scatter operation, the process of described key scatter operation is as follows:
In smart card and server, set in advance the master key of one group of (one group 5) 16 byte length that both sides share.
Card is carried out before the key scatter operation with server, should at first produce the random number of 4 byte lengths.The method that produces random number is as follows: get random number nybble (from left to right) and carry out AND-operation with " 0X07 ", to its value of delivery 5 as a result, the result of mould 5 (between 0~4) is the call number of master key to be selected again.Select after the master key, adopt key decentralized algorithm as shown in Figure 3 that master key is carried out the two-stage scatter operation.Dispersion factor comprises the random number that card sequence number and card/server produce.
Then, adopt the MAC algorithm that the MAC value is calculated, the MAC algorithm adopts the DES-CBC algorithm of standard, and initial key KEY is 8 bytes in a left side of session key Kc.Should comprise following data when calculating MAC: card vendor's code and protocol version, brand identity, card sequence number, coincidence counter, random number, command type, order length, command parameter.
All initial data are divided into groups for one group according to per 8 bytes, if initial data is not 8 integral multiple, then need to fill at the data end " 0x20 " data of 1~7 byte according to the data length of reality, the data of calculating the required filling of MAC are not included in the uplink and downlink message data, are filled voluntarily according to up/downlink data length when calculating the MAC value by card/server.
With the key of KEY as the DES algorithm, primary data is 8 bytes " 0X00 ", data behind first grouped data and the primary data XOR are carried out computing, behind the dateout of DES algorithm and the second grouped data XOR, continuation is that key carries out the DES computing with KEY, takes turns doing down until last packet transaction to finish.Far Left 4 byte datas of 8 byte dateouts of last DES computing are the MAC value.
In described " after server obtained the residing geographical location information of user, catalogue that will be complementary with user's geographical location information of living in and information sets were made into downlink short message and send to SIM card " process, the process that the MAC value in the up note is verified is:
After server is received up note, calculate the MAC value of this up note, and compare with MAC value in the up note.If both are identical, the sender who proves this up note is a validated user, and data are not modified in transport process, delete or recombinate, and this up note is effective; Otherwise, abandon this up note.After checking, server intercepts command parameter from up note, and promptly position information is searched the positional information whether coupling is arranged in the database.If have, then the catalogue with correspondence becomes downlink short message with the format organization that information is stipulated according to agreement, sends to SIM card; If do not have, then do not send.After mobile phone is received the downlink data note, can directly note be given SIM card and handle.
In described " SIM card receive downlink short message after, position and relevant information are stored with catalogue form " process, the process that the MAC value in the downlink short message is verified is:
After SIM card is received downlink short message, calculate the MAC value of this downlink short message, and compare,, prove that this downlink short message is effective, by checking if both are identical with MAC value in the downlink short message; Otherwise, abandon this downlink short message.After checking, SIM card intercepts out directory information from downlink short message, and will store under the corresponding catalogue with the record that this catalogue is associated, and is organized into tabulation and shows.
It is example that above technology realizes with the SIM card, but notebook data operation system and method also are applicable to UIM card and PIM card, and above-mentioned catalogue is upgraded the renewal that includes but not limited to first class catalogue, also can be the renewal of multistage catalogue.