Embodiment
For making object, technical scheme and the advantage of the embodiment of the present invention clearer, below in conjunction with embodiment and accompanying drawing, the embodiment of the present invention is described in further details.At this, schematic description and description of the present invention is used for explaining the present invention, but not as a limitation of the invention.
The flow chart of a kind of network adapting method that Fig. 1 provides for the embodiment of the present invention, the method is applied to mobile terminal, please refer to Fig. 1, and the method comprises:
Step 101: request determines that whether communication function corresponding to described application-specific request be available according to application-specific;
In the present embodiment, application-specific refers to the application being derived by some procotols, GPRS network, TDMA network or WCDMA (Wideband Code Division Multiple Access for example, Wideband Code Division Multiple Access (WCDMA)) application that network etc. is derived, these application are present in mobile terminal with the form of application program, for example, in mobile phone, and according to user, its selection is communicated by letter with network side by corresponding network, obtain data or carry out mutual etc.For example, the application of the browsing page being derived by GPRS network, refers to when user's operating handset is clicked this application, by GPRS network browsing page, obtains data.
In the present embodiment, whether communication function corresponding to application-specific request be available refers to that whether the network of this application-specific of carrying is normal, comprise, whether mobile terminal comprises the communication module of corresponding described application-specific, and whether this mobile terminal region exists network signal that should communication module, if meet above-mentioned two conditions, illustrate that communication function corresponding to this application-specific request can use.
Step 102: if communication function corresponding to described application-specific request can be used, communicate by letter with network side by specific communications module corresponding to described application-specific;
In the present embodiment, according to step 101, determined that communication function corresponding to this application-specific is normal, can communicate by communication module corresponding to this application-specific and network side.
Wherein, by communication module corresponding to this application-specific and network side, communicate and can realize by the means of prior art, do not repeat them here.
Step 103: if communication function corresponding to described application-specific request is unavailable, communicate by letter with network side by USSD communication module.
In the present embodiment, according to step 101, determine that communication function corresponding to this application-specific can not be used, the mobile terminal region of for example carrying the method for the present embodiment does not have corresponding network signal, or this mobile terminal does not possess communication module that should application-specific, so, according to the method for the present embodiment, the USSD communication module and the network side that by this mobile terminal, possess communicate.
For example, user has selected the application of access the Internet by the application program of mobile terminal, and this application is derived by GPRS network, but this mobile terminal may not supported GPRS, or this mobile terminal their location does not have GPRS signal, also communication function corresponding to i.e. this application-specific request is unavailable, according to the method for the present embodiment, can access the Internet by USSD communication module, rather than by GPRS network, access the Internet in a conventional manner.But these are all transparent to user.
In the present embodiment, because this application-specific is not the routine application of USSD, therefore, the request mode of this application-specific is the request mode according to its legacy network, therefore, according to the method for the present embodiment, can be to doing a mapping between the legacy network agreement of this application-specific and USSD procotol, and set up a protocol mapping table, to carry out conversion and the transmission of message according to these agreement mapping relations, to communicate by USSD communication module and network side, complete the function of this application-specific.
In the present embodiment, this specific communications module can be GPRS communication module, tdma communication module, or WCDMA communication module, the present embodiment is not usingd this as restriction, accordingly, the transport layer protocol of these communication modules can be TCP/IP TCP/IP (TransmissionControl Protocol/Internet Protocol), or user datagram protocol UDP (UserDatagram Protocol).
By the network adapting method of the present embodiment, can support the application that other procotols are derivative so that at least there is the mobile terminal of USSD function simultaneously.
For making the method for the present embodiment clear understandable, take specific communications module below as GPRS communication module is example, the network adapting method of the present embodiment is elaborated.
Fig. 2 is the flow chart of the network adapting method of the present embodiment, and the method is applied to mobile terminal, in the present embodiment, by ICP/IP protocol stack, the function of GPRS and USSD is carried out to adaptation, please refer to Fig. 2, and the method comprises:
Step 201: initialization ICP/IP protocol stack;
Step 202:TCP/IP protocol stack call operation system capability judges that whether GPRS function is available, if available, performs step 203, otherwise execution step 204;
Step 203:TCP/IP protocol stack is used GPRS function to communicate by letter with network side;
So far, ICP/IP protocol stack initialization success, GPRS network function can be used;
Step 204:TCP/IP protocol stack call operation system capability judges that whether USSD function is available, if available, performs step 205, otherwise ICP/IP protocol stack initialization failure, network function is unavailable;
Step 205:TCP/IP protocol stack is used USSD function to communicate by letter with network side;
So far, ICP/IP protocol stack initialization success, USSD network function can be used.
For the USSD function of the mobile terminal of the present embodiment, mobile terminal can be realized the access to Internet the Internet by GSM network and USSDC (USSD Center, USSD center).
Fig. 3 is software layer aggregated(particle) structure schematic diagram and the schematic network structure of the mobile terminal of the method for application the present embodiment, wherein, 31 is the software layer aggregated(particle) structure schematic diagram of mobile terminal, and 32 is the schematic network structure of GPRS function, and 33 is the schematic network structure of USSD function.Please refer to Fig. 3, wherein:
One of them or the combination in any that in mobile terminal, may have GPRS, two kinds of functional modules of USSD, the underlying operating system (OS) in the software layer aggregated(particle) structure 31 of mobile terminal provides the basic-level support of GPRS and/or USSD.
ICP/IP protocol stack in the software layer aggregated(particle) structure 31 of mobile terminal can be applied the network adapting method that the present embodiment provides, and GPRS or USSD function is carried out to adaptation, and provide unified interface to upper level applications.
The application-specific that application program (Applications) in the software layer aggregated(particle) structure 31 of mobile terminal is the present embodiment, it can only rely on GPRS access the Internet originally, when mobile terminal or mobile terminal location do not exist GPRS to support, according to the method for the present embodiment, can pass through the USSD module accesses the Internet of mobile terminal.
According to the mobile terminal of the network adapting method of the present embodiment, in the time need to accessing the application program of the Internet, can support the network configuration shown in the network configuration shown in 32 and 33 simultaneously, thereby at utmost bring into play the value of application program.
In the present embodiment, when ICP/IP protocol stack is used USSD function and network side to communicate, because ICP/IP protocol is different with USSD agreement, therefore also need to carry out the conversion of agreement, according to the method for the present embodiment, because ICP/IP protocol and USSD agreement are all connection-oriented, therefore can be to doing a mapping between these two agreements, as shown in Figure 4, wherein:
The message that connects of the request of connecting (SYN) message of TCP/IP and USSD is shone upon with beginning conversation message; The end session message of end connection request (FIN) message of TCP/IP and USSD and dismounting connection message are shone upon; The continuation conversation message of the data transmission requests of TCP/IP (PSH) message and USSD is shone upon.
In the present embodiment, foundation/dismounting connection request message of TCP/IP is shone upon with two orders of USSD respectively, because USSD also exists the concept of session within connecting, and in the connection of TCP/IP, there is not the concept of session, so setting up once, TCP/IP connects, corresponding to USSD, connect and set up a session, until connect, being removed front conversation end.
In the present embodiment, corresponding response message is shone upon identical with the mapping mode shown in Fig. 4, do not repeat them here.
The present embodiment using ICP/IP protocol as a warehouse compartment on operating system, application programs is visible, so that application program can shield the difference of GPRS, USSD whereby.Due to the storehouse using ICP/IP protocol stack as mobile phone operating system, to all application programs on operating system, be all transparent, all application programs can shield the difference of GPRS, USSD whereby.
By the method for the present embodiment, there is no GPRS function and only have the mobile phone of USSD function, can use the application that depends on GPRS access Internet the Internet, in the area that does not have GPRS to cover, there is the mobile phone of USSD function still can use original dependence GPRS to access the business of Internet the Internet, the availability of greatly having expanded USSD mobile phone, has improved its use value and market value.
The composition schematic diagram of a kind of network adaptive device that Fig. 5 provides for the embodiment of the present invention, please refer to Fig. 5, and this device comprises:
Determining unit 51, for according to application-specific request determine that whether communication function corresponding to described application-specific request available;
The first communication unit 52, for when communication function corresponding to described application-specific request is available, communicates by letter with network side by the specific communications module that described communication function is corresponding;
Second communication unit 53, for when communication function corresponding to described application-specific request is unavailable, communicates by letter with network side by USSD module.
According to the present embodiment execution mode, this determining unit 51 comprises:
The first judge module 511, for judging whether described mobile terminal comprises the specific communications module of carrying described application-specific request;
The second judge module 512, for judging whether the region of described mobile terminal exists signal corresponding to described specific communications module.
According to the present embodiment execution mode, this second communication unit comprises:
Extraction module 531, for extracting the transport layer protocol mapping table between described specific communications module and described USSD module;
Communication module 532, for the mapping table extracting according to described extraction module 531, communicates by letter with network side by described USSD module.
Each part of the device of the present embodiment is respectively used to realize each step of preceding method embodiment, due in preceding method embodiment, each step is had been described in detail, and does not repeat them here.
By the network adaptive device of the present embodiment, mobile terminal can utilize USSD to support the application that other procotols are derivative.
The composition schematic diagram of a kind of mobile terminal that Fig. 6 provides for the embodiment of the present invention, please refer to Fig. 6, and this mobile terminal comprises:
USSD communication module 61, for communicating by USSD and network side;
In the present embodiment, this USSD communication module 61 can realize by the means of prior art, does not repeat them here.
Network adaptive device 62, for carrying out adaptation to USSD function and other network functions.
In the present embodiment, this network adaptive device 62 can realize by network adaptive device embodiment illustrated in fig. 5, due in the embodiment shown in fig. 5, this network adaptive device is had been described in detail, and does not repeat them here.
According to the present embodiment execution mode, this mobile terminal also comprises:
Specific communications module 63, for carrying the application-specific request of mobile terminal.
In the present embodiment, this specific communications module 63 can be GPRS module, or TDMA module, or WCDMA module, and the present embodiment is not usingd this as restriction.
In the present embodiment, according to the difference of specific communications module 63 kinds, the transport layer protocol of this specific communications module 63 can be ICP/IP protocol, or udp protocol, and the present embodiment is not usingd this as restriction.
The mobile terminal of the present embodiment can utilize USSD to support the application that other procotols are derivative.
The software module that the method for describing in conjunction with embodiment disclosed herein or the step of algorithm can directly use hardware, processor to carry out, or the combination of the two is implemented.Software module can be placed in the storage medium of any other form known in random asccess memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technical field.
Above-described specific embodiment; object of the present invention, technical scheme and beneficial effect are further described; institute is understood that; the foregoing is only specific embodiments of the invention; the protection range being not intended to limit the present invention; within the spirit and principles in the present invention all, any modification of making, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.