Summary of the invention
The invention provides method, POS and mobile terminal that a kind of POS communicates with remote server, POS can be facilitated to use, and POS cost can not be increased.
A kind of method that first aspect present invention provides POS to communicate with remote server, comprising:
POS and mobile terminal connect, and described connection is used for communicating with described mobile terminal;
Described POS sends data by described connection to described mobile terminal, according to the address of remote server, described data is sent to described remote server to make described mobile terminal;
Described POS is by the described data connected after the described remote server process receiving the transmission of described mobile terminal.
Alternatively, described connection is wired connection or wireless connections.
Alternatively, before described POS and mobile terminal connect, described method also comprises:
Described POS carries out certification to described mobile terminal;
After described POS and the mutual authentication success of described mobile terminal, described POS sets up described connection with described mobile terminal.
A kind of method that second aspect present invention provides POS to communicate with remote server, comprising:
Mobile terminal and POS connect, and described connection is used for communicating with described POS;
Described mobile terminal receives described POS and connects by described the data sent, and according to the address of remote server, described data is sent to described remote server;
Described mobile terminal receives the data after the process that described remote server returns, and by described connection, the data after described process is sent to described POS.
Alternatively, the address of described remote server is set in advance in described mobile terminal.
Third aspect present invention provides a kind of POS, comprising:
Connection establishment module, for connecting with mobile terminal, described connection is used for communicating with described mobile terminal;
Described data, for sending data by described connection to described mobile terminal, are sent to described remote server to make described mobile terminal according to the address of remote server by transceiver module;
Described transceiver module, also for receiving the data after the described remote server process of described mobile terminal transmission by described connection.
Alternatively, described connection is wired connection or wireless connections.
Alternatively, described POS also comprises:
Authentication module, for carrying out certification to described mobile terminal;
After described POS and the mutual authentication success of described mobile terminal, described connection establishment module sets up described connection with described mobile terminal.
Fourth aspect present invention provides a kind of mobile terminal, comprising:
Connection establishment module, for connecting with POS, described connection is used for communicating with described POS;
Transceiver module, for after described mobile terminal and the mutual authentication success of described POS, receives described POS and connects by described the data sent, and according to the address of remote server, described data are sent to described remote server;
Data after described process also for receiving the data after process that described remote server returns, and are sent to described POS by described connection by described transceiver module.
Alternatively, described mobile terminal also comprises:
Address arranges module, for being arranged in described mobile terminal the address of described remote server.
The method that POS of the present invention communicates with remote server, POS and mobile terminal, POS is by connecting with mobile terminal, data are sent to mobile terminal by this connection, remote server is sent the data to according to the address of remote server to make mobile terminal, POS also by the data after the remote server process of this connection mobile terminal receive transmission, thus realizes the communication of POS and remote server.Because mobile terminal can directly communicate with remote server, in the present embodiment, mobile terminal is utilized indirectly to realize communicating of POS and remote server, do not need to improve POS, the cost of POS can not be increased, and mobile terminal can move flexibly, user is facilitated to use anywhere.
Embodiment
POS adopts following two kinds of modes to be connected with remote server usually: first kind of way, and POS is first dialled up on the telephone by access landline telephone, realizes communicating with remote server.The second way, arranges GPRS module in POS, and then, in POS, insert the phonecard that can surf the Net, the phonecard that can surf the Net is connected with remote server by GPRS module.Because landline telephone position is fixed in first kind of way, cause the position of POS to be also fixed, use to user and bring inconvenience, in the second way, in POS, add GPRS module, POS cost can be caused to improve.
In order to solve the problems of the prior art, a kind of method that the embodiment of the present invention one provides POS to communicate with remote server, the present embodiment describes from POS side, the process flow diagram of the method that the POS that Fig. 1 provides for the embodiment of the present invention one communicates with remote server, as shown in Figure 1, the method that the present embodiment provides can comprise the following steps:
Step 101, POS and mobile terminal connect, and this connection is used for communicating with mobile terminal.
Conventional mobile terminal has smart mobile phone, panel computer, personal digital assistant (Personal DigitalAssistant is called for short PDA) etc.What POS and mobile terminal connected can be wired connection or wireless connections.For mobile phone, POS can by audio port, USB (universal serial bus) (the Universal Serial Bus of data line and mobile phone, be called for short USB) interface, Instrument Digital USB (Musical InstrumentDigital Interface-USB, be called for short MIDI-USB) interface, serial ports, the interfaces such as apple data line mouth connect, and realize the wired connection of POS and mobile terminal.Radio connection: comprising: Wireless Fidelity (WIreless-Fidelity, be called for short WIFI) technology, Bluetooth technology (Bluetooth), infrared, microwave etc.
Alternatively, before POS and mobile terminal connect, POS also carries out certification to mobile terminal, and after POS and the mutual authentication success of mobile terminal, POS and mobile terminal are set up this and be connected.Arrange bidirectional identification protocol between POS and mobile terminal, before each connection establishment, both sides first carry out two-way authentication, and to ensure the safety communicated, POS and mobile terminal can use any one bidirectional identification protocol existing.
Step 102, POS send data by this connection to mobile terminal, will send this remote server to make mobile terminal according to the address of remote server to data.
Because mobile terminal can communicate with remote server, therefore, in the present embodiment, mobile terminal is utilized indirectly to realize communicating of POS and remote server.POS sends the data to mobile terminal by the connection of setting up in advance, then, by mobile terminal, these data is sent to remote server.Alternatively, the address of remote server is included in these data, and mobile terminal is after receiving these data, and these data are sent to remote server by the address of the remote server comprised according to these data.Alternatively, also can not comprise the address of remote server in the data that POS sends, the address of remote server is pre-arranged in the client of mobile terminal, and mobile terminal is realized and the communicating of POS and remote server by this client.Mobile terminal upon receipt of the data, finds the address of remote server according to the mark of POS, be carried at the address of remote server in these data, the address according to this remote server sends the data to remote server.
Step 103, POS are by the data after the remote server process of this connection mobile terminal receive transmission.
Data after remote server process also can be returned to POS by mobile terminal.
In the present embodiment, POS is by connecting with mobile terminal, data are sent to mobile terminal by this connection, remote server is sent the data to according to the address of remote server to make mobile terminal, POS also by the data after the remote server process of this connection mobile terminal receive transmission, thus realizes the communication of POS and remote server.Because mobile terminal can directly communicate with remote server, in the present embodiment, mobile terminal is utilized indirectly to realize communicating of POS and remote server, do not need to improve POS, the cost of POS can not be increased, and mobile terminal can move flexibly, user is facilitated to use anywhere.
The process flow diagram of the method that the POS that Fig. 2 provides for the embodiment of the present invention two communicates with remote server, the present embodiment describes from mobile terminal side, and as shown in Figure 2, the method that the present embodiment provides can comprise the following steps:
Step 201, mobile terminal and POS connect, and this connection is used for communicating with POS.
Realize the method for the present embodiment, need to arrange client in the terminal, this client can be an application program, and this client has following functions: (1) arranges forwarding address, namely arranges the address of remote server; (2) Yu after the mutual authentication success of POS connect; (3) data that POS sends are received; (4) data that POS sends are sent to remote server; (5) data after the process that returns of remote server are received; (6) data after the remote server process received are sent to POS.
Alternatively, before mobile terminal and POS connect, mobile terminal and POS carry out mutual certification, after mutual authentication success, set up this connection, and this connection can be wired connection or wireless connections.
Step 202, mobile terminal receive the data that POS is sent by this connection, and according to the address of remote server, these data are sent to remote server.
If these data comprise the address of remote server, then these data are sent to remote server according to the address of remote server by mobile terminal.If do not comprise the address of remote server in these data, then mobile terminal finds the address of remote server according to the mark of POS, is carried the address of remote server and sends to remote server in the data.
Data after the process that step 203, mobile terminal reception remote server returns, and by this connection, the data after this process are sent to POS.
In the present embodiment, the client of mobile terminal quite with a data collector, only the data that POS and remote server send are forwarded, but do not process service logic.
In the present embodiment, POS and mobile terminal connect, mobile terminal is communicated with POS by this connection, the data that POS sends are sent to remote server, and the data after the process returned by remote server send to POS, thus indirectly POS and remote server are coupled together, realize the communication between POS and remote server.Because mobile terminal can directly communicate with remote server, in the present embodiment, mobile terminal is utilized indirectly to realize communicating of POS and remote server, do not need to improve POS, the cost of POS can not be increased, and mobile terminal can move flexibly, user is facilitated to use anywhere.
The structural representation of the POS that Fig. 3 provides for the embodiment of the present invention three, as shown in Figure 3, the present embodiment POS comprises: connection establishment module 11 and transceiver module 12.
Wherein, connection establishment module 11, for connecting with mobile terminal, described connection is used for communicating with described mobile terminal;
Described data, for sending data by described connection to described mobile terminal, are sent to described remote server to make described mobile terminal according to the address of remote server by transceiver module 12;
Described transceiver module 12, also for receiving the data after the described remote server process of described mobile terminal transmission by described connection.
Alternatively, described connection is wired connection or wireless connections.
Alternatively, described POS also comprises: authentication module 13, for carrying out certification to described mobile terminal.After described POS and the mutual authentication success of described mobile terminal, described connection establishment module 11 sets up described connection with described mobile terminal.
The POS of the present embodiment, may be used for the technical scheme performing embodiment one, it realizes principle and technique effect is similar, repeats no more herein.
The structural representation of the mobile terminal that Fig. 4 provides for the embodiment of the present invention four, as shown in Figure 4, the mobile terminal that the present embodiment provides comprises: connection establishment module 21 and transceiver module 22.
Connection establishment module 21, for connecting with POS, described connection is used for communicating with described POS;
Transceiver module 22, for after described mobile terminal and the mutual authentication success of described POS, receives described POS and connects by described the data sent, and according to the address of remote server, described data are sent to described remote server;
Data after described process also for receiving the data after process that described remote server returns, and are sent to described POS by described connection by described transceiver module 22.
Alternatively, described mobile terminal also comprises: address arranges module, for being arranged in described mobile terminal the address of described remote server.
Alternatively, described mobile terminal also comprises authentication module, for carrying out certification to described POS.After described POS and the mutual authentication success of described mobile terminal, described connection establishment module 21 sets up described connection with described POS.
The mobile terminal of the present embodiment, may be used for the technical scheme performing embodiment two, it realizes principle and technique effect is similar, repeats no more herein.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each embodiment of the method can have been come by the hardware that programmed instruction is relevant.Aforesaid program can be stored in a computer read/write memory medium.This program, when performing, performs the step comprising above-mentioned each embodiment of the method; And aforesaid storage medium comprises: ROM, RAM, magnetic disc or CD etc. various can be program code stored medium.
Last it is noted that above each embodiment is only in order to illustrate technical scheme of the present invention, be not intended to limit; Although with reference to foregoing embodiments to invention has been detailed description, those of ordinary skill in the art is to be understood that: it still can be modified to the technical scheme described in foregoing embodiments, or carries out equivalent replacement to wherein some or all of technical characteristic; And these amendments or replacement, do not make the essence of appropriate technical solution depart from the scope of various embodiments of the present invention technical scheme.