Abstract:
The disclosed is a method and device for accessing data. In the method, a Bearer Independent Protocol (BIP) sends a data access instruction to a Universal Integrated Circuit Card (UICC) through a Serial Peripheral Interface (SPI); and the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI. According to the technical scheme provided by the disclosure, access speed is improved for the user and large data transmission is implemented for the web server in the UICC.

Description:
FIELD 
       [0001]    The disclosure relates to the field of communications, in particular to a method and device for accessing data. 
       BACKGROUND 
       [0002]    According to the requirements of the Global System for Mobile Communications Alliance (GSMA) on the eNFC mobile phone which supports the convergence of mobile phone and smart card, the mobile phone needs to realize the function of a Smart Card Web Server (SCWS). Namely, a web server is embedded into a Subscriber Identity Module (SIM) card. The application of a terminal may access the resources and service on the SIM card through the HyperText Transfer Protocol (HTTP). A web browser may be used as the user interface of the application because the data is exchanged through the HTTP. According to the SCWS standard of the Open Mobile Alliance (OMA) of International Standardization Organization (ISO), the WWW web access address and Transmission Control Protocol (TCP) port that the SIM card provides for the mobile phone are 127.0.0.1 and 3516 respectively, thereby, a mobile phone user may access the SCWS only by inputting http: “127.0.0.1:3516. 
         [0003]    Along with the increasing share of the smart phone in the market, its architecture generally includes one Application Processor (AP) and one or more Communication Processors (CPs), wherein the AP is mainly responsible for processing the application on the mobile phone and further includes a browser, a TCP/IP stack, a WIFI, a Bluetooth and the like; and the CP is responsible for related events of an air interface of a communication network and includes a radio frequency signal processor, a communication protocol stack, a Universal Integrated Circuit Card (UICC) interface of the ISO-7816 standard and the like. 
         [0004]      FIG. 1  is a block diagram showing the structure of a system for accessing data according to the related arts. As shown in  FIG. 1 , the UICC is connected with the CP through port  7816 . A proxy server listens for the connection request of a port of the TCP. When a browser user inputs “http://127.0.0.1:port” on a browser, the proxy server is connected with the browser and forwards http data packets through an AT module and the CP. After receiving the HTTP data from the AT module, a protocol conversion module identifies a request for the SIM card and forwards the request which has been converted into one supported by the Bearer Independent Protocol (BIP) to the SIM card through port  7816 . Thereby, the web server of the SIM card is accessed and the response data of the server is sent along this channel to a browser to be displayed. 
         [0005]    However, in this mode, the user accesses the web server on the SIM card through the browser, and data must be transmitted through the channel between two processors and port  7816  between the CP and the SIM card. The speed of the two channels limits the transmission speed of data. Meanwhile, an AT command is always transmitted slowly and the transmission speed of port  7816  is generally 230 kbps, so that the display is slow when a user browses a web on the UICC. 
       SUMMARY 
       [0006]    The disclosure provides a method and device for accessing data, in order to at least solve the problem that data is transmitted slowly through the channel between an AP and a CP and port  7816  in the related arts. 
         [0007]    According to one aspect of the disclosure, a method for accessing data is provided. 
         [0008]    The method for accessing data is applied to an AP, which includes: a BIP gateway. The method includes: the BIP gateway sends a data access instruction to a UICC through a Serial Peripheral Interface (SPI); and the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI. 
         [0009]    Preferably, before the BIP gateway sends the data access instruction to the UICC through the SPI, the method further includes: the BIP gateway receives a connection establishment request message from a network browser; and the BIP gateway establishes a channel between itself and the UICC. 
         [0010]    Preferably, the step that the BIP gateway establishes the channel between itself and the UICC includes: the BIP gateway performs protocol conversion on the connection establishment request message and then sends it to the UICC; the BIP gateway receives a channel establishment request message from the UICC; and the BIP gateway sends a channel establishment success message to the UICC. 
         [0011]    Preferably, the step that the BIP gateway sends the data access instruction to the UICC through the SPI includes: the BIP gateway receives a data access instruction from a network browser; the BIP gateway sends a notification message to the UICC through the SPI; the BIP gateway receives a response message for the receiving request of the data access instruction from the UICC through the SPI; and the BIP gateway performs protocol conversion on the data access instruction and then sends it to the UICC through the SPI. 
         [0012]    Preferably, the step that the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI includes: the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI; and the BIP sends a notification message that the data corresponding to the data access instruction has been received to the UICC through the SPI and sends the data corresponding to the data access instruction to the network browser. 
         [0013]    Preferably, after the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI, the method further includes: the BIP gateway receives a channel closing request message from the UICC through the SPI; the BIP gateway closes the channel; and the BIP gateway sends a channel closing acknowledgement message to the UICC through the SPI and sends a channel closing notification message to the network browser. 
         [0014]    According to another aspect of the disclosure, a device for accessing data is provided. 
         [0015]    The device for accessing data includes: a BIP gateway, including: a first receiving unit, configured to receive a data access instruction from a network browser, a first sending unit, configured to send the data access instruction to the UICC through an SPI, a second receiving unit, configured to receive the data corresponding to the data access instruction from the UICC through the SPI, and a second sending unit, configured to send the data corresponding to the data access instruction to the network browser. 
         [0016]    Preferably, the BIP gateway further includes: a third receiving unit, configured to receive a connection establishment request message from the network browser, and an establishment unit, configured to establish a channel between the BIP gateway and the UICC. 
         [0017]    Preferably, the establishment unit includes: a conversion unit, configured to perform protocol conversion on the connection establishment request message and then send it to the UICC through the SPI, a fourth receiving unit, configured to receive a channel establishment request message from the UICC through the SPI, and a third sending unit, configured to send a channel establishment success message to the UICC through the SPI. 
         [0018]    Preferably, the BIP gateway further includes: a fifth receiving unit, configured to receive a channel closing request message from the UICC through the SPI, a closing unit, configured to close the channel, and a fourth sending unit, configured to send a channel closing acknowledgment message to the UICC through the SPI and send a channel closing notification message to the network browser. 
         [0019]    Through the disclosure, the BIP gateway in the CP is re-configured in the AP, and the network browser accesses the data on the UICC by the BIP gateway through the SPI, so that the problem that data is transmitted slowly through the channel between the AP and CP and port  7816  in the related arts is solved. Consequently, access speed is improved for the user and large data transmission is implemented for the web server in the UICC. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0020]    The drawings illustrated here are to provide further understanding of the disclosure and constitute one part of the application, and the exemplary embodiments of the disclosure and the explanations thereof are intended to explain the disclosure, instead of improperly limiting the disclosure. In the drawings: 
           [0021]      FIG. 1  is a block diagram showing the structure of a system for accessing data according to the related arts; 
           [0022]      FIG. 2  is a flowchart of a method for accessing data according to an embodiment of the disclosure; 
           [0023]      FIG. 3  is a flowchart of a method for accessing data according to a preferred embodiment of the disclosure; 
           [0024]      FIG. 4  is a block diagram showing the structure of a device for accessing data according to an embodiment of the disclosure; 
           [0025]      FIG. 5  is a block diagram showing the structure of a device for accessing data according to a preferred embodiment of the disclosure; and 
           [0026]      FIG. 6  is a block diagram showing the structure of a system for accessing data according to an embodiment of the disclosure. 
       
    
    
     DETAILED DESCRIPTION OF THE EMBODIMENTS 
       [0027]    The disclosure will be described below with reference to the drawings and embodiments in detail. It should be noted that, in the case of no conflict, the embodiments of the application and features therein may be combined with each other. 
         [0028]      FIG. 2  is a flowchart of a method for accessing data according to an embodiment of the disclosure. As shown in  FIG. 2 , the method is applied to an AP. The AP includes a network browser and a BIP gateway. The method mainly includes the following steps. 
         [0029]    Step  202 : The BIP gateway sends a data access instruction to a UICC through an SPI. 
         [0030]    Step  204 : The BIP gateway receives data corresponding to the data access instruction from the UICC through the SPI. 
         [0031]    In the related arts, data is transmitted slowly through the channel between the AP and the CP and port  7816 . By the method shown in  FIG. 2 , the BIP gateway is configured in the AP and the network browser accesses the data on the UICC by the BIP gateway through the SPI, so that the problem that data is transmitted slowly through the channel between the AP and CP and port  7816  in the related arts is solved. Consequently, access speed is improved for the user and large data transmission is implemented for the web server in the UICC. 
         [0032]    Preferably, before the BIP gateway sends the data access instruction to the UICC through the SPI, the method further includes: 
         [0033]    (1) the BIP gateway receives a connection establishment request message from the network browser; and 
         [0034]    (2) the BIP gateway establishes a channel between itself and the UICC. 
         [0035]    In a preferred implementation process, the step that the BIP gateway establishes the channel between itself and the UICC may further include: 
         [0036]    (1) the BIP gateway performs protocol conversion on the connection establishment request message and then sends the connection establishment request message subjected to the protocol conversion to the UICC; 
         [0037]    (2) the BIP gateway receives a channel establishment request message from the UICC; and 
         [0038]    (3) the BIP gateway sends a channel establishment success message to the UICC. 
         [0039]    Of course, besides the channel establishment way, the BIP gateway may establish the channel between itself and the UICC in other ways. 
         [0040]    Preferably, the interface corresponding to the channel may be but not limited to one of the following: SPI and ISO-7816 standard interface. 
         [0041]    Namely, data may be actually transmitted through both the SPI and the ISO-7816 standard interface. Of course, data may also be transmitted through other interfaces. It should be noted that data is transmitted in a high speed through the SPI so that the SPI is suitable for large data transmission. 
         [0042]    Preferably, the step that the BIP gateway sends the data access instruction to the UICC through the SPI includes: 
         [0043]    (1) the BIP gateway receives the data access instruction from the network browser; 
         [0044]    (2) the BIP gateway sends a notification message to the UICC through the SPI; 
         [0045]    (3) the BIP gateway receives a response message requesting to receive the data access instruction, wherein the response message is from the UICC through the SPI; and 
         [0046]    (4) the BIP gateway performs protocol conversion on the data access instruction and then sends the data access instruction subjected to the protocol conversion to the UICC through the SPI. 
         [0047]    Preferably, the step that the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI includes: 
         [0048]    (1) the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI; and 
         [0049]    (2) the BIP gateway sends a notification message that the data corresponding to the data access instruction has been received to the UICC through the SPI and sends the data corresponding to the data access instruction to a network browser. 
         [0050]    Preferably, after the BIP gateway receives the data corresponding to the data access instruction from the UICC through the SPI, the method further includes: 
         [0051]    (1) the BIP gateway receives a channel closing request message from the UICC through the SPI; 
         [0052]    (2) the BIP gateway closes the channel; and 
         [0053]    (3) the BIP gateway sends a channel closing acknowledgement message to the UICC through the SPI and sends a channel closing notification message to the network browser. 
         [0054]    The preferred implementation process is further described below in conjunction with  FIG. 3 . 
         [0055]      FIG. 3  is a flowchart of a method for accessing data according to a preferred embodiment of the disclosure. As shown in  FIG. 3 , the method may include the following steps: 
         [0056]    Step  302 : The network browser is connecting with the UICC; and the network browser sends a connection request which is transmitted using the TCP/IP through a TCP/IP stack. 
         [0057]    It should be noted that a user may complete the steps above in the following ways: 
         [0058]    1, inputting http://127.0.0.1:port (wherein the port corresponds to the UICC service port) on the network browser; 
         [0059]    2, selecting a bookmark, which is http://127.0.0.1:port and is preset in the browser, to replace the manual input of the address; and 
         [0060]    3, accessing the menu in the SCWS by accessing “call browser” in the SIM Tool Kit (STK) of the UICC. 
         [0061]    Step  304 : A proxy server monitors the UICC service port of the TCP all the time so that it may receive a connection request in time to establish connection with the browser and send a channel opening request (OpenChannelReq) to a BIP module at the same time. 
         [0062]    Step  306 : The BIP module converts the connection request to a request for establishing connection with the UICC, wherein the request is transmitted using the BIP through the SPI. The BIP module notifies the UICC of the connection event through an envelope (local connecting). 
         [0063]    Step  308 : After the UICC receives the notification, the channel opening request is sent to the BIP module through the SPI. 
         [0064]    Step  310 : The BIP module returns a terminal response for successful connection and a channel ID to the UICC, and a channel opening success message (Open Channel Cnf) and the channel ID information to the proxy server. 
         [0065]    Step  312 : The network browser sends HTTP access data which is transmitted using the TCP/IP to the proxy server. 
         [0066]    Step  314 : The proxy server sends a data access request (Receive Data Req) to the BIP module, wherein the request carries data and channel ID. 
         [0067]    Step  316 : The BIP module converts the HTTP data into those transmitted using the BIP and sends them to the UICC through the SPI; and the BIP module sends an envelope (channel data available) to notify the UICC of the transmission of access data. 
         [0068]    Step  318 : The UICC returns “Fetch: receive data” to request to receive the access data through the SPI. 
         [0069]    Step  320 : The BIP module sends the access data to the UICC through terminal response (data) and sends “Receive Data Cnf” to the proxy server to indicate that the data is sent successfully. 
         [0070]    Step  322 : The UICC sends the HTTP response data which is transmitted using the BIP to the BIP module through the SPI, and the UICC sends the response data to the BIP module through “Fetch: send data”. 
         [0071]    Step  324 : After receiving the response data, the BIP module notifies the UICC that the response data has been received by the terminal response and sends the response data to the proxy server through “Send Data Ind (data, channel id)”. 
         [0072]    Step  326 : After receiving the response data, the proxy server converts them into those transmitted using the TCP/IP and returns them to the network browser through a TCP/IP module; and the browser parses an http data packet and then displays it thereon. 
         [0073]    Steps  312  to  326  are repeated till all the data on the UICC are sent. 
         [0074]    Step  328 : The UICC sends “Fetch: close channel (channel id)” to the BIP module through the SPI to request to close the channel. 
         [0075]    Step  330 : After closing the connection, the BIP module sends a terminal response (channel status: link not established) to the UICC through the SPI to confirm the closing of the channel, and sends a closing notification “Close Channel Ind (channel id)” to the proxy server. 
         [0076]    Step  332 : The proxy server returns a connection closing message to the network browser through the TCP/IP module. 
         [0077]      FIG. 4  is a block diagram showing the structure of a device for accessing data according to an embodiment of the disclosure. As shown in  FIG. 4 , the device for accessing data includes: a BIP gateway. The BIP gateway may include: a first receiving unit  400 , configured to receive a data access instruction from a network browser, a first sending unit  402 , configured to send the data access instruction to a UICC through an SPI, a second receiving unit  404 , configured to receive data corresponding to the data access instruction from the UICC through the SPI, and a second sending unit  406 , configured to send the data corresponding to the data access instruction to the network browser. 
         [0078]    Through the device for accessing data shown in  FIG. 4 , firstly, the BIP gateway receives the data access instruction from the network browser by the first receiving unit  400 ; secondly, it sends the data access instruction to the UICC by the first sending unit  402  through the SPI; thirdly, it receives the data corresponding to the data access instruction from the UICC by the second receiving unit  404  through the SPI; and finally, it sends the data corresponding to the data access instruction to the network browser by the second sending unit  406 . Therefore, the problem that data is transmitted slowly through the channel between the AP and CP and port  7816  in the related arts is solved. Consequently, access speed is improved for the user and large data transmission is implemented for the web server in the UICC. 
         [0079]    Preferably, as shown in  FIG. 5 , the BIP gateway may further include: a third receiving unit  408 , configured to receive a connection establishment request message from the network browser, and an establishment unit  410 , configured to establish a channel between the BIP gateway and the UICC. 
         [0080]    In a preferred implementation process, the establishment unit  410  may include: a conversion unit (not shown in  FIG. 5 ), configured to perform protocol conversion on the connection establishment request message and then send the connection establishment request message subjected to protocol conversion to the UICC through the SPI, a fourth receiving unit (not shown in  FIG. 5 ), configured to receive a channel establishment request from the UICC through the SPI, and a third sending unit, configured to send a channel establishment success message to the UICC through the SPI. 
         [0081]    Preferably, as shown in  FIG. 5 , the BIP gateway may further include: a fifth receiving unit  412 , configured to receive a channel closing request message from the UICC through the SPI, a closing unit  414 , configured to close the channel, and a fourth sending unit  416 , configured to send a channel closing acknowledgement message to the UICC through the SPI and send a channel closing notification message to the network browser. 
         [0082]    The system for accessing data is further described below in conjunction with  FIG. 6 . 
         [0083]      FIG. 6  is a block diagram showing the structure of a system for accessing data according to an embodiment of the disclosure. As shown in  FIG. 6 , the system for accessing data may include: an AP, one or more CPs, a UICC and a channel between the processors. The AP may include: a network browser, a TCP/IP stack, a proxy server and a BIP gateway which is connected to the UICC by a channel established through the SPI interface. The CP is connected with the UICC through port  7816 . 
         [0084]    A user inputs a data access instruction on a network browser; the data access instruction is transmitted using the TCP/IP through the TCP/IP stack; the TCP/IP stack sends the HTTP data access instruction to the proxy server; the proxy server sends the received data access instruction to the BIP gateway; the BIP gateway converts the HTTP data access instruction into one transmitted using the BIP and sends it to the UICC through the SPI; the UICC sends HTTP response data which is transmitted according to the BIP to the BIP gateway through the SPI; the BIP gateway receives the response data and then sends them to the proxy server; after receiving the response data, the proxy server converts them into those transmitted using the TCP/IP and returns them to the network browser through the TCP/IP stack; and the network browser parses the HTTP data packet and then displays it thereon. 
         [0085]    It should be noted that, in the system for accessing data, the existing channel between the AP and CP is not changed, and it is unnecessary to change the internal structure of the communication processor, thereby, a user may access the data on the UICC still in the conventional way. 
         [0086]    As is seen from the description, the disclosure has the following technical effects: the data access system, which is simple in implementation architecture and faster for the user to access, is suitable for the large data transmission of web server on the UICC. 
         [0087]    Obviously, those skilled in the art shall understand that the modules or steps of the disclosure may be implemented by general computing apparatus and centralized in a single computing apparatus or distributed in a network consisting of multiple computing apparatus. Optionally, the modules or steps may be implemented by program codes executable by the computing apparatus, so that they may be stored in a storage apparatus and executed by the computing apparatus, and, in some cases, the steps may be executed in a sequence different from the illustrated or described sequence, or they are respectively made into the integrated circuit modules or many of them are made into a single integrated circuit module. By doing so, the disclosure is not limited to any specific combination of hardware and software. 
         [0088]    What said above are only the preferred embodiments of the disclosure and not intended to limit the disclosure. For those skilled in the art, various modifications and changes may be made in the disclosure. Any modifications, equivalent replacements, improvements and the like within the spirit and principle of the disclosure shall fall within the scope of protection of the disclosure.