Service data interaction method, terminal, server and system
Technical field
The present invention relates to computer realm, more particularly to service data interaction method, terminal, server and system.
Background technology
Industrial application software refers to the special applications software developed for certain industry demand, such as, it is adaptable to logistics
The logistic management system of industry, the sale management system etc. suitable for sales industry.
Generally need to provide reporting, inquire about and repairing for business datum between different clients due to industrial application software
The service such as change, along with the development of mobile Internet, many industrial application softwares all start using " mobile terminal+cloud service
The form of device " is realized.Under this implementation so that each mobile terminal can serve as a client to be come by wired
Or wireless network with server quickly and easily carries out interacting for business datum.Wherein, mobile terminal can be intelligent hand
Machine, panel computer, E-book reader and specific embedded handhold equipment etc..
When industrial application software is realized in the form of " mobile terminal+cloud server ", common implementation has two
Kind:
Under the first technique, based on SIM(Subscriber Identity Module, client identification module)Card is carried out
Industrial application software is developed, then by corresponding software kit " firing " to SIM.The SIM is inserted into smart mobile phone,
The smart mobile phone can both be used as industrial application software client.
Under a second technique, industrial application software is developed based on specific embedded device, this is specific embedded
Equipment can give full play to the hardware condition of itself after corresponding software program is combined, and realize powerful function and close friend's
User interface.
Realize it is of the invention during, inventor find prior art at least there is problems with:
First, when developing industrial application software based on SIM, it is limited to that SIM self-capacities are limited and ardware feature, exploitation
Process is relatively complicated and scaling difficulty, and significant software upgrading is equal to and redeploys;
Second, it is necessary to consider the ardware feature of different embedded devices when being developed based on embedded device, cross-platform adaptation
Need construction cycle and more development cost more long;
3rd, above-mentioned mobile terminal be required to server real-time interconnection, authentication, and business number can be completed
According to the function such as report, inquire about and change, when mobile terminal is in the networks such as underground garage, elevator or remoter environment area
During obstructed environment, the service data interaction and server between cannot be just realized.
The content of the invention
In order to solve the problems, such as that terminal needs and server real-time interconnection in the prior art, the embodiment of the invention provides one
Plant service data interaction method, terminal, server and system.The technical scheme is as follows:
First aspect, there is provided a kind of service data interaction method, methods described includes:
Show login interface in a browser, the login interface be the terminal in historical log and unobstructed network from
The login interface that server is obtained and cached;
Authentication is completed by the login interface for showing;
In authentication success, the interface of client is shown in the browser, the client is described
The client that terminal is obtained and cached in history authentication success and unobstructed network from the server;
Service data interaction is carried out with the server by the client.
It is described that authentication is completed by the login interface for showing, including:
Receive identity and checking password that user is input into the login interface;
When user's selection server authentication, and network are unobstructed, by the identity of the user input and checking password
The server is sent to, so that the server carries out identity and test according to the identity of the user input and checking password
Card;Receive the result that the server is returned;
Whether when user does not select server authentication, it is cached with the detection terminal corresponding with the identity
Checking password;
If testing result is that the checking password corresponding with the identity is cached with the terminal, according to described
Corresponding with the identity checking cached in the identity of user input and checking password and the terminal is close
Code carries out authentication;
If testing result be it is uncached in the terminal have the checking password corresponding with the identity, and network is logical
Freely, then from the server obtain the checking password corresponding with the identity and cache, and according to the user
The identity of input and checking password and the checking password corresponding with the identity carry out authentication;
Wherein, the checking password corresponding with the identity be the server irreversibly to encrypt after
Checking password.
It is described show login interface in a browser before, methods described also includes:
When network is unobstructed, detect whether the login interface of the caching needs to update;
If the login interface need update, from the server download latest edition login interface, and with download
The login interface of the latest edition update the login interface of the caching.
Before the interface for showing client in the browser, methods described also includes:
When network is unobstructed, detect whether the client of the caching needs to update;
If the client need update, from the server download latest edition client, and with download institute
The client for stating latest edition updates the client of the caching.
It is described that service data interaction is carried out by the client and the server, including:
When network is unobstructed, looked into the server according to data query operation of the user in the interface of the client
Ask business datum.
It is described that service data interaction is carried out by the client and the server, including:
Business datum to be reported is received by the interface of the client shown in the browser;
When network is obstructed, by business datum described in the client-cache, and when next network is unobstructed, to clothes
Business device reports the business datum;
When network is unobstructed, directly the business datum is reported to the server.
Second aspect, there is provided a kind of service data interaction method, methods described includes:
When the network of terminal logs in and the terminal is unobstructed, login interface is provided to the terminal, so as to the terminal
Cache the login interface;And the login interface is shown in a browser;And body is completed by the login interface for showing
Part checking;
The terminal identity be proved to be successful and the terminal network it is unobstructed when, to the terminal provide client, with
Toilet states client described in terminal buffers;And the interface of the client is shown in the browser;And by the client
The interface at end carries out data interaction with the server.
Methods described also includes:
When the network of the terminal is unobstructed, receives the terminal sends, user and be input into the login interface
Identity and checking password;
The identity and checking password according to receiving carry out authentication;
The result is returned into the terminal.
Methods described also includes:
There is provided the checking password corresponding with the identity to the terminal, so as to described in the terminal buffers with institute
The corresponding checking password of identity is stated, and the identity and checking being input into the login interface according to the user
The checking password described corresponding with the identity of password and caching carries out authentication;
Wherein, the checking password corresponding with the identity is close with the checking after irreversibly encrypting
Code.
Methods described also includes:
When the terminal detect the login interface of the caching need update, and the terminal network it is unobstructed when, to
The terminal provides the login interface of latest edition.
Methods described also includes:
When the terminal detect the client of the caching need update, and the terminal network it is unobstructed when, to institute
State the client that terminal provides latest edition.
Methods described also includes:
When the network of the terminal is unobstructed, business datum is provided to the terminal;The business datum is the user
The data corresponding to data query operation in the interface of the client shown in the browser.
Methods described also includes:
Receive the business datum of the terminal to report;
Wherein, the business datum includes:
When the network of the terminal is obstructed, the interface of client of the terminal by being shown in the browser
The business datum for receiving and caching;
And/or, when the network of the terminal is unobstructed, the terminal is by the client of display in the browser
The business datum that interface receives.
The third aspect, there is provided a kind of terminal, the terminal includes:
Login interface display module, for showing login interface in a browser, the login interface exists for the terminal
The login interface for obtaining and caching from server when historical log and unobstructed network;
First authentication module, the login interface for being shown by the login interface display module is completed identity and tested
Card;
Client end interface display module, in authentication success, client being shown in the browser
Interface, the client be the terminal history authentication success and network it is unobstructed when obtain and delay from the server
The client deposited;
Data interaction module, for carrying out service data interaction with the server by the client.
First authentication module, including:
First receiving unit, for receiving identity and the checking password that user is input into the login interface;
First transmitting element, for when user's selection server authentication, and network are unobstructed, by the body of the user input
Part mark and checking password are sent to the server, so that the server is according to the identity of the user input and tests
Card password carries out authentication;
Second receiving unit, for receiving the result that the server is returned;
Detection unit, for when user does not select server authentication, detect whether be cached with the terminal with it is described
The corresponding checking password of identity;
First authentication unit, if being to be cached with corresponding with the identity testing in the terminal for testing result
Card password, then the identity according to the user input and checking password and the terminal in caching with the identity mark
Sensible corresponding checking password carries out authentication;
Password acquiring unit, if being uncached in the terminal have corresponding with the identity for testing result
Checking password, and network is unobstructed, then obtain the checking password corresponding with the identity from the server;
Password buffer unit, for cache the password acquiring unit get described in it is corresponding with the identity
Checking password;
Second authentication unit, for the identity according to the user input and checking password and described with the body
The corresponding checking password of part mark carries out authentication;
Wherein, the checking password corresponding with the identity be the server irreversibly to encrypt after
Checking password.
The terminal also includes:
First detection module, for before the login interface display module shows login interface in a browser, when
When network is unobstructed, detect whether the login interface of the caching needs to update;
First download module, if needing to update for the login interface, latest edition is downloaded from the server
Login interface;
First update module, the login interface of the latest edition for being downloaded with first download module updates institute
State the login interface of caching.
The terminal also includes:
Second detection module, the boundary for showing client in the browser in the client end interface display module
Before face, when network is unobstructed, detect whether the client of the caching needs to update;
Second download module, if needing to update for the client, the visitor of latest edition is downloaded from the server
Family end;
Second update module, the client of the latest edition for being downloaded with second download module updates described
The client of caching.
The data interaction module, including:
Data query unit, for when network is unobstructed, according to data query of the user in the interface of the client
Operate to the server lookup business datum.
The data interaction module, including:
Data receipt unit, the interface for the client by being shown in the browser receives to be reported
Business datum;
Data buffer storage unit, for when network is obstructed, by business datum described in the client-cache;
First reporting unit, for when next network is unobstructed, reporting what the data buffer storage unit was cached to server
Business datum;
Second reporting unit, for when network is unobstructed, directly reporting the data receipt unit to connect to the server
The business datum for receiving.
Fourth aspect, there is provided a kind of server, the server includes:
First login interface provide module, for the network in terminal logs in and the terminal it is unobstructed when, to the terminal
Login interface is provided, so as to login interface described in the terminal buffers;And the login interface is shown in a browser;And pass through
The login interface of display completes authentication;
First client provide module, for the terminal identity be proved to be successful and the terminal network it is unobstructed when,
Client is provided to the terminal, so as to client described in the terminal buffers;And the client is shown in the browser
The interface at end;And the interface by the client carries out data interaction with the server.
The server also includes:
First receiver module, for the network in the terminal it is unobstructed when, receive the terminal sends, user described
The identity being input into login interface and checking password;
Second authentication module, the identity and checking password for being received according to first receiver module are entered
Row authentication;
The result returns to module, for the result of second authentication module to be returned into the terminal.
The server also includes:
Checking password provisioning module, for providing the checking password corresponding with the identity to the terminal, with
Toilet states checking password corresponding with the identity described in terminal buffers, and according to the user in the login interface
The identity of middle input and the checking password described corresponding with the identity of checking password and caching carry out body
Part checking;
Wherein, the checking password corresponding with the identity is close with the checking after irreversibly encrypting
Code.
The server also includes:
Second login interface provides module, and the login interface for detecting the caching when the terminal needs to update,
And the terminal network it is unobstructed when, to the terminal provide latest edition login interface.
The server also includes:
Second client provides module, and the client for detecting the caching when the terminal needs to update, and institute
State terminal network it is unobstructed when, to the terminal provide latest edition client.
The server also includes:
Data providing module, for when the network of the terminal is unobstructed, business datum being provided to the terminal;The industry
Business data are the data corresponding to the data query operation in the interface of the client that the user shows in the browser.
The server also includes:
Data reception module, the business datum for receiving the terminal to report;
Wherein, the business datum includes:
When the network of the terminal is obstructed, the interface of client of the terminal by being shown in the browser
The business datum for receiving and caching;
And/or, when the network of the terminal is unobstructed, the terminal is by the client of display in the browser
The business datum that interface receives.
5th aspect, there is provided a kind of service data interaction system, the system includes:
Terminal as described in the above-mentioned third aspect and the server as described in above-mentioned fourth aspect.
The beneficial effect that technical scheme provided in an embodiment of the present invention is brought is:
By showing login interface in a browser, the login interface is first logged into and when network is unobstructed for the terminal
The login interface for being obtained from server and being cached;Authentication is completed by the login interface for showing;Tested in the identity
Demonstrate,prove when successfully, the interface of client is shown in the browser, the client is terminal authentication first success
And network it is unobstructed when the client that obtains and cache from the server;Business is carried out with the server by the client
Data interaction.Because terminal can also complete stepping on for client when network is obstructed with cache entries interface and client
Record, solves the problems, such as that terminal needs and server real-time interconnection in the prior art, reaches when terminal is obstructed in network
The purpose of the service data interaction and server between can also be realized under environment.
Brief description of the drawings
Technical scheme in order to illustrate more clearly the embodiments of the present invention, below will be to that will make needed for embodiment description
Accompanying drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the present invention, for
For those of ordinary skill in the art, on the premise of not paying creative work, other can also be obtained according to these accompanying drawings
Accompanying drawing.
Fig. 1 is the implementation environment schematic diagram of the service data interaction method that the specific embodiment of the invention is provided;
Fig. 2 is the method flow diagram of the service data interaction method that the embodiment of the present invention one is provided;
Fig. 3 is the method flow diagram of the service data interaction method that the embodiment of the present invention two is provided;
Fig. 4 is the method flow diagram of the service data interaction method that the embodiment of the present invention three is provided;
Fig. 5 is the method flow diagram of the service data interaction method that the embodiment of the present invention four is provided;
Fig. 6 is the method flow diagram of the service data interaction method that the embodiment of the present invention five is provided;
Fig. 7 is the equipment pie graph of the terminal that the embodiment of the present invention six is provided;
Fig. 8 is the equipment pie graph of the terminal that the embodiment of the present invention seven is provided;
Fig. 9 is the equipment pie graph of the server that the embodiment of the present invention eight is provided;
Figure 10 is the equipment pie graph of the server that the embodiment of the present invention nine is provided;
Figure 11 is the system pie graph of the service data interaction system that the embodiment of the present invention ten is provided.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing to embodiment party of the present invention
Formula is described in further detail.
Fig. 1 is referred to, the implementation ring of the service data interaction method provided it illustrates the specific embodiment of the invention
Border schematic diagram.Wherein, terminal can be the mobile terminal of the browser for including, such as smart mobile phone, panel computer or electricity
Philosophical works reader etc..Login interface and client that terminal is downloaded in historical log from server are cached with browser.Its
In, login interface and client use HTML(Hypertext Markup Language, HTML)5+
JavaScript+CSS(Cascading Style Sheet, Cascading Style Sheet)Overall architecture, the login interface and client
Interface can be directly displayed in the same browser for supporting HTML5, JavaScript and CSS.By the present invention is carried
The client of confession is developed using the framework of HTML5+JavaScript+CSS, relative in the prior art based on specific embedding
For the industrial application software for entering formula equipment to develop, development efficiency can be significantly improved, shorten the construction cycle, and then can be with
Significantly save development cost.
Embodiment one
Fig. 2 is refer to, the method flow diagram of the service data interaction method provided it illustrates the embodiment of the present invention one.Should
The implementation environment of data interactive method is as shown in figure 1, can apply to carry out data based on browser and server in the terminal
Interaction.The data interactive method can include:
Step 102, shows login interface in a browser, and the login interface is for the terminal is in historical log and network is unobstructed
When the login interface that obtains and cache from server;
Step 104, authentication is completed by the login interface for showing;
Step 106, in authentication success, shows the interface of client in the browser, and the client is should
The client that terminal is obtained and cached in history authentication success and unobstructed network from the server;
Step 108, service data interaction is carried out by the client and the server.
In sum, the embodiment of the present invention one provide service data interaction method, in a browser display terminal going through
The login interface and client obtained from server when history is logged in and network is unobstructed, and industry is entered by the client and server
Business data interaction.Because terminal can also complete client when network is obstructed with cache entries interface and client
Log in, solve the problems, such as that terminal needs and server real-time interconnection in the prior art, reach when terminal is obstructed in network
In the environment of can also to server upload business datum purpose;Secondly, the business datum that the embodiment of the present invention one is provided is handed over
Mutual method, login interface and client are developed using the framework of HTML5+JavaScript+CSS, solve prior art
In when being developed based on embedded device, it is necessary to consider the ardware feature of different embedded devices, cross-platform adaptation needs more long
Construction cycle and the problem of more development cost, reach raising development efficiency, shorten the construction cycle, significantly save development cost
Purpose.
Embodiment two
The scheme being more highly preferred to of the service data interaction method provided based on above-described embodiment one, refer to Fig. 3, and it shows
The method flow diagram of the service data interaction method of the offer of the embodiment of the present invention two has been provided.The implementation environment of the data interactive method
As shown in figure 1, can apply to carry out data interaction based on browser and server in the terminal.The data interactive method can be with
Including:
Step 202, terminal shows login interface in a browser, and the login interface is the terminal in historical log and network
The login interface for obtaining and caching from server when unobstructed;
Specifically, when user is input into the network address specified in a browser, terminal can detect that whether local being cached with is stepped on
Record interface:
If there is no cache entries interface in terminal, and terminal current network is unobstructed, then terminal can be obtained from server and is somebody's turn to do
Login interface is simultaneously buffered in locally, and show the login interface in a browser;Such as, terminal to server sends to obtain and logs in
The request at interface, after server receives the request, the terminal is sent to by the login interface.
If login interface is cached with terminal, and terminal current network is obstructed, then terminal is directly displayed in a browser
The login interface of caching;
If login interface is cached with terminal, and terminal current network is unobstructed, then terminal can first detect stepping on for caching
Whether record interface needs to update, if the login interface of caching needs to update, login circle of latest edition is downloaded from server
Face, and with download latest edition login interface update caching login interface, and in a browser show update after, be somebody's turn to do
The login interface of latest edition.Such as, terminal can obtain the version number of latest edition login interface from server, and will obtain
To version number compare with the version number of the login interface of local cache, if both are inconsistent, are sent to server and obtained
The request of the login interface of latest edition is taken, after server receives the request of the login interface of the acquisition latest edition, will most
The login interface of redaction is sent to the terminal, the login interface of the terminal storage latest edition, and shows in a browser.
Step 204, terminal receives identity and the checking password that user is input into the login interface;
Wherein, the identity of user input can be the login account for registering in the server in advance, such as note
Sequence number of volume user name, registration mailbox number or server-assignment etc..
Step 206, the identity and checking password that terminal is input into by user in the login interface completes identity and tests
Card;
Can include in the login interface for showing in a browser whether from server end checking option, if user hook
The option is selected, then selects server end checking, if user does not choose the option, do not select server authentication, but in terminal
In carry out authentication.Specifically:
When user selects server authentication, and terminal network it is unobstructed when, terminal by the identity of the user input and
Checking password is sent to server, so that server carries out identity and test according to the identity of the user input and checking password
Card;Terminal receives the result of server return;
When user does not select server authentication, whether terminal is detected and be cached with the terminal corresponding with the identity
Checking password;Wherein, checking password corresponding with the identity is server with the checking after irreversibly encrypting
Password;
If testing result is to be cached with the checking password corresponding with the identity in the terminal, terminal is according to user
The checking password corresponding with the identity cached in the identity of input and checking password and the terminal carries out body
Part checking;
If testing result be it is uncached in the terminal have the checking password corresponding with the identity, and terminal is current
Network is unobstructed, then terminal obtains the checking password corresponding with the identity and caches from server, and according to user input
Identity and checking password and the checking password corresponding with the identity that gets carry out authentication.
Step 208, terminal shows the interface of client, the client in authentication success in the browser
For the client that the terminal is obtained and cached in history authentication success and unobstructed network from the server;
Specifically, when the result that terminal receives server return is authentication success, or, existed according to user
The identity that is input into terminal and verify password and the checking password authentification corresponding with the identity that gets into
During work(, whether can detect locally be cached with client:
If there is no cache client in terminal, and terminal current network is unobstructed, then terminal obtains the client from server
And cache, and the interface of the client is shown in the browser;
If client is cached with terminal, and terminal current network is obstructed, then terminal directly displays slow in a browser
The interface of the client deposited;
If client is cached with terminal, and terminal current network is unobstructed, then terminal can first detect the client of caching
Whether end needs to update, if the client needs to update, the client of latest edition is downloaded from server, and with download most
The client of redaction updates the client of caching, and shows the client of after the updating, latest edition in a browser
Interface.
Wherein, the step of the step of terminal is obtained and updates client obtains with above-mentioned terminal and updates login interface
Similar, here is omitted.
Step 210, terminal carries out service data interaction by the client and the server.
Wherein, service data interaction can include that business datum inquiry and business datum are reported.
When user carries out business datum to be inquired about, if the current network of terminal is unobstructed, terminal can be according to user in client
Data query operation in the interface at end(Such as click on the inquiry button of a certain item business datum)To server lookup business number
According to.
When user given the correct time in business datum, the interface reception that terminal passes through the client for showing in a browser is treated
The business datum of report;
If the current network of terminal is obstructed, terminal is by the client-cache business datum and logical in next network
When smooth, the business datum is reported to server;
If the current network of terminal is unobstructed, terminal directly reports the business datum to server.
Above-mentioned service data interaction method can be implemented as the sector applications such as logistic management system or sale management system
In software.Specifically, by taking the sale management system of certain company as an example, business personnel A is in the bad place of network signal, such as underground
When in warehouse or garage, the URL of the server of sale management system is input into the browser address bar on smart mobile phone
(Uniform Resource Locator, URL)Address, smart mobile phone shows local cache in a browser
The sale management system login interface.Business personnel A is input into identity and checking password in the login interface, while not
The option of " from server authentication " is chosen, smart mobile phone is tested in identity locally to user input and checking password
Card, if being proved to be successful, smart mobile phone shows the interface of the client of the sale management system of local cache in a browser.
Business personnel A is input into business datum to be reported, such as the number such as the sales volume of all types of products or stock in the interface of client
According to be buffered in the business datum being input into locally by smart mobile phone, and has attempted to connect network.When business personnel A is moved to net
Smart mobile phone is successfully connected network and the business datum of caching is reported into server during network unobstructed place.In whole data
During report, smart mobile phone is automatically performed the process that data receiver, network connection and data are reported, and business personnel A does not have network
The wait experience of connection.
Meanwhile, manager B in office is input into the clothes of sale management system in the browser address bar on PC
The URL addresses of business device, computer shows local cache or the login interface obtained from server in a browser.Manager B is at this
Identity and checking password are input into login interface, while choose the option of " from server authentication ", computer is by user input
Identity and checking password be sent to server and verified, if server authentication success, computer shows in a browser
Show the interface of local cache or the client obtained from server.Manager B can be by the operation in the interface of client
Query traffic data, such as, manager B can click on sales volume and the stock of the product for inquiring about a certain model, and computer is sent out to server
The request of the sales volume and stock that obtain the product is sent, after server receives the request, the sales volume and inventory of the product is returned to
According to computer shows the sales volume and inventory data of the product in the interface of the client.
In sum, the embodiment of the present invention two provide service data interaction method, in a browser display terminal going through
The login interface and client obtained from server when history is logged in and network is unobstructed, and industry is entered by the client and server
Business data interaction.Because terminal can also complete client when network is obstructed with cache entries interface and client
Log in, solve the problems, such as that terminal needs and server real-time interconnection in the prior art, reach when terminal is obstructed in network
In the environment of can also to server upload business datum purpose;In addition, the business datum that the embodiment of the present invention two is provided is handed over
Mutual method, terminal obtains or updates login interface and client automatically, and solving prior art and being limited to SIM self-capacities has
Limit and ardware feature, development process is relatively complicated and problem of scaling difficulty, reaches the purpose for simplifying deployment and escalation process;Most
Afterwards, the service data interaction method that the embodiment of the present invention two is provided, login interface and client use HTML5+JavaScript+
The framework of CSS is developed, and is solved when being developed based on embedded device in the prior art, it is necessary to consider different embedded devices
Ardware feature, cross-platform adaptation needs the problem of construction cycle more long and more development cost, reaches raising exploitation effect
Rate, shortens the construction cycle, significantly saves the purpose of development cost.
Embodiment three
Fig. 4 is refer to, the method flow diagram of the service data interaction method provided it illustrates the embodiment of the present invention three.Should
The implementation environment of data interactive method is as shown in figure 1, can apply to carry out data interaction with terminal in the server.The data
Exchange method can include:
Step 302, when the network of terminal logs in and the terminal is unobstructed, provides login interface, so as to the end to the terminal
End caches the login interface;And the login interface is shown in a browser;And tested by the login interface completion identity for showing
Card;
Step 304, the terminal identity be proved to be successful and the terminal network it is unobstructed when, to the terminal provide client,
So as to the terminal buffers client;And the interface of the client is shown in the browser;And the interface for passing through the client
Data interaction is carried out with the server.
In sum, the service data interaction method that the embodiment of the present invention three is provided, when terminal network is unobstructed to terminal
Login interface and client are provided, the interface of the login interface and client is shown in a browser so as to terminal.Due to terminal
The login of client can also be completed when network is obstructed with cache entries interface and client, solve prior art
Middle terminal needs the problem with server real-time interconnection, and reaching can also be to service under terminal is in the obstructed environment of network
Device uploads the purpose of business datum;Secondly, the service data interaction method that the embodiment of the present invention three is provided, login interface and client
End is developed using the framework of HTML5+JavaScript+CSS, is solved and is developed based on embedded device in the prior art
When, it is necessary to consider the ardware feature of different embedded devices, cross-platform adaptation needs construction cycle and more exploitation more long
The problem of cost, reaches raising development efficiency, shortens the construction cycle, significantly saves the purpose of development cost.
Example IV
The scheme being more highly preferred to of the service data interaction method provided based on above-described embodiment three, refer to Fig. 5, and it shows
The method flow diagram of the service data interaction method of the offer of the embodiment of the present invention four has been provided.The implementation environment of the data interactive method
As shown in figure 1, can apply to carry out data interaction with terminal in the server.The data interactive method can include:
Step 402, server provides login interface when the network of terminal logs in and the terminal is unobstructed to the terminal, with
Just terminal buffers login interface, and the login interface is shown in a browser, and the login interface for passing through to show is completed
Authentication;
Specifically, when user's login service device in the terminal, and terminal detect local uncached login interface, eventually
End can send login interface and obtain request to server, after server receives the request, the login interface is sent into this
Terminal.
Wherein, when terminal completes authentication by the login interface for showing, authentication can be completed by server
Step, it is also possible to the step of authentication is voluntarily completed by terminal.Specifically,
When the network of the terminal is unobstructed, server receives the terminal sends, user and is input into the login interface
Identity and checking password;The identity and checking password according to receiving carry out authentication;And by the result
Return to the terminal.
Or, server provides the checking password corresponding with the identity to the terminal, so as to the terminal buffers and
The corresponding checking password of the identity, and the identity that is input into the login interface according to user and checking password,
And the checking password corresponding with the identity of caching carries out authentication;Wherein, it is corresponding with the identity
Checking password is server to be sent to the checking password of the terminal after irreversibly encrypting.
In addition, when the terminal detect the login interface of caching need update, and the terminal network it is unobstructed when, server
The login interface of latest edition is provided to the terminal.Specifically, before the login interface of terminal display caching, can also be from clothes
Business device obtains the version number of the login interface of latest edition, and detects the version number of the latest edition and the login of storage in terminal
Whether the version number at interface is consistent, if both are inconsistent, terminal can send login circle for obtaining latest edition to server
The request in face, after server receives the request, the terminal is returned to by the login interface of latest edition.
Step 404, server the terminal identity be proved to be successful and the terminal network it is unobstructed when, to the terminal provide visitor
Family end, the interface of the client is shown so as to the terminal buffers client and in the browser;
In addition, when the terminal detect the client of caching need update, and the terminal network it is unobstructed when, server can
To provide the client of latest edition to the terminal.
Wherein, server provide the terminal with client specific steps it is similar with the step of providing the terminal with login interface,
Here is omitted.
Step 406, server carries out data interaction by the interface of the client with the terminal.
Wherein, data interaction can include providing business datum inquiry service to client, or, receive client and report
Business datum.Specifically:
When the network of the terminal is unobstructed, server can provide business datum to the terminal;The business datum is user
The data query operation carried out in the interface of the client for showing in a browser(Such as click on the inquiry of a certain item business datum
Button)Corresponding data.
Server can also receive the business datum of the terminal to report;Wherein, the business datum includes:
When the network of the terminal is obstructed, the interface that the terminal passes through the client for showing in a browser receives and delays
The business datum deposited;
And/or, when the network of the terminal is unobstructed, the interface that the terminal passes through the client for showing in a browser receives
The business datum for arriving.
In sum, the service data interaction method that the embodiment of the present invention four is provided, when terminal network is unobstructed to terminal
Login interface and client are provided, the interface of the login interface and client is shown in a browser so as to terminal.Due to terminal
The login of client can also be completed when network is obstructed with cache entries interface and client, solve prior art
Middle terminal needs the problem with server real-time interconnection, and reaching can also be to service under terminal is in the obstructed environment of network
Device uploads the purpose of business datum;Secondly, the service data interaction method that the embodiment of the present invention four is provided, server is from trend end
End provides login interface and client, solves prior art and is limited to that SIM self-capacities are limited and ardware feature, development process
Relatively complicated and scaling difficulty problem, reaches the purpose for simplifying deployment and escalation process;Finally, the embodiment of the present invention four is provided
Service data interaction method, login interface and client developed using the framework of HTML5+JavaScript+CSS, is solved
Determine when being developed based on embedded device in the prior art, it is necessary to consider the ardware feature of different embedded devices, it is cross-platform suitable
Problem with needs construction cycle more long and more development cost, reaches raising development efficiency, shortens the construction cycle, significantly
Save the purpose of development cost.
Embodiment five
Fig. 6 is refer to, the method flow diagram of the service data interaction method provided it illustrates the embodiment of the present invention five.Should
The implementation environment of data interactive method is as shown in Figure 1.As a example by being applied to certain sale management system, the service data interaction method
Can include:
Step 502, mobile terminal detects user and is input into specified URL in a browser when network is obstructed, is browsing
The login interface of caching in advance is shown in device;
When user is in the obstructed region, such as basement of network, service is input into the browser of mobile terminal
The URL of device, mobile terminal detects local cache login interface, then show in a browser the login interface.The login
Interface be mobile terminal when network is unobstructed, the mobile terminal is sent to by server.
Step 504, mobile terminal receives identity and the checking password that user is input into the login interface;
The identity can be login account registered in advance, such as mailbox number or user name.
Step 506, mobile terminal is cached according in the identity of user input and checking password and the mobile terminal
The checking password corresponding with the identity carry out authentication;
Wherein, it is movement that the checking password corresponding with the identity for being cached in the mobile terminal carries out authentication
When terminal is in network unobstructed region, checking password of the server to be sent after irreversibly encrypting.
Step 508, after authentication success, mobile terminal shows the boundary of the client of local cache in a browser
Face;
Likewise, the client be mobile terminal when network is unobstructed, the mobile terminal is sent to by server.
Step 510, mobile terminal receives business datum that user is input into the interface of client, to be uploaded, and will
The business datum is buffered in locally;
Mobile terminal detect network it is obstructed when, the business datum that will be received is buffered in locally, and continuously attempts to
Connection network.
Step 512, when mobile terminal is moved to the unobstructed place of network, by business datum cache, to be uploaded
It is transmitted to server;
After mobile terminal connection network success, business datum cache, to be uploaded is sent to server.
Step 514, mobile terminal detects user's data query operation in the interface of client, is sent to server and looked into
Ask the request of corresponding business datum;
Step 516, after server receives the request, inquires about corresponding business datum;
Step 518, the business datum that server will be inquired is sent to mobile terminal;
Step 520, mobile terminal shows the business datum for receiving to user.
In sum, the embodiment of the present invention five provide service data interaction method, mobile terminal when network is obstructed,
The interface of the login interface of display caching and client in a browser.Because mobile terminal can be with cache entries interface and client
End, the login of client can also be completed when network is obstructed, and solving mobile terminal in the prior art needs and server
The problem of real-time interconnection, reaching can also upload business datum under mobile terminal is in the obstructed environment of network to server
Purpose;Secondly, the service data interaction method that the embodiment of the present invention five is provided, server provides login from trend mobile terminal
Interface and client, solve prior art and are limited to that SIM self-capacities are limited and ardware feature, development process it is relatively complicated and
The problem of scaling difficulty, reaches the purpose for simplifying deployment and escalation process;Finally, the business datum that the embodiment of the present invention five is provided
Exchange method, login interface and client are developed using the framework of HTML5+JavaScript+CSS, solve existing skill
, it is necessary to consider the ardware feature of different embedded devices when being developed based on embedded device in art, cross-platform adaptation needs more long
Construction cycle and more development cost problem, reach raising development efficiency, shorten the construction cycle, significantly save and develop into
This purpose.
Embodiment six
Fig. 7 is refer to, the equipment pie graph of the terminal provided it illustrates the embodiment of the present invention six.The terminal can be realized
It is terminal as shown in Figure 1.The terminal can include:
Login interface display module 601, for showing login interface in a browser, the login interface is the terminal
The login interface for obtaining and caching from server in historical log and unobstructed network;
First authentication module 602, the login interface for being shown by the login interface display module 601 is completed
Authentication;
Client end interface display module 603, in authentication success, client being shown in the browser
The interface at end, the client is that the terminal is obtained simultaneously in history authentication success and unobstructed network from the server
The client of caching;
Data interaction module 604, for carrying out service data interaction with the server by the client.
In sum, the terminal that the embodiment of the present invention six is provided, display terminal is in historical log and network in a browser
The login interface and client obtained from server when unobstructed, and service data interaction is carried out by the client and server.
Because terminal can also complete the login of client when network is obstructed with cache entries interface and client, solve
Terminal needs the problem with server real-time interconnection in the prior art, reaches and also may be used under terminal is in the obstructed environment of network
To upload the purpose of business datum to server;Secondly, the terminal that the embodiment of the present invention six is provided, login interface and client are adopted
Developed with the framework of HTML5+JavaScript+CSS, solved when being developed based on embedded device in the prior art, needed
Consider the ardware feature of different embedded devices, cross-platform adaptation needs construction cycle more long and more development cost
Problem, reaches raising development efficiency, shortens the construction cycle, significantly saves the purpose of development cost.
Embodiment seven
The scheme being more highly preferred to of the terminal provided based on above-described embodiment six, refer to Fig. 8, it illustrates of the invention real
The equipment pie graph of the terminal of the offer of example seven is provided.The terminal can be implemented as terminal as shown in Figure 1, such as smart mobile phone, flat
Plate computer or E-book reader etc..The terminal can include:
Login interface display module 701, for showing login interface in a browser, the login interface is the terminal
The login interface for obtaining and caching from server in historical log and unobstructed network;
First authentication module 702, the login interface for being shown by the login interface display module 701 is completed
Authentication;
Client end interface display module 703, in authentication success, client being shown in the browser
The interface at end, the client is that the terminal is obtained simultaneously in history authentication success and unobstructed network from the server
The client of caching;
Data interaction module 704, for carrying out service data interaction with the server by the client.
First authentication module 702, including:
First receiving unit 702a, it is close for receiving identity that user is input into the login interface and checking
Code;
First transmitting element 702b, for when user's selection server authentication, and network are unobstructed, by the user input
Identity and checking password be sent to the server, so that the server is according to the identity of the user input
Authentication is carried out with checking password;
Second receiving unit 702c, for receiving the result that the server is returned;
Detection unit 702d, for when user does not select server authentication, detect whether be cached with the terminal with
The corresponding checking password of the identity;
First authentication unit 702e, if for detection unit 702d testing result for be cached with the terminal with it is described
The corresponding checking password of identity, then in the identity according to the user input and checking password and the terminal
The checking password corresponding with the identity of caching carries out authentication;
Password acquiring unit 702f, if having and institute for uncached in the terminal for the testing result of detection unit 702d
The corresponding checking password of identity is stated, and network is unobstructed, then obtain described with the identity phase from the server
Corresponding checking password;
Password buffer unit 702g, for cache the password acquiring unit 702f get described in the identity mark
Sensible corresponding checking password;
Second authentication unit 702h, for the identity according to the user input and checking password and described and institute
Stating the corresponding checking password of identity carries out authentication;
Wherein, the checking password corresponding with the identity be the server irreversibly to encrypt after
Checking password.
The terminal also includes:
First detection module 705, for the login interface display module 701 show in a browser login interface it
Before, when network is unobstructed, detect whether the login interface of the caching needs to update;
First download module 706, if needing to update for the login interface, latest edition is downloaded from the server
Login interface;
First update module 707, the login interface of the latest edition for being downloaded with first download module 706
Update the login interface of the caching.
The terminal also includes:
Second detection module 708, for showing client in the browser in the client end interface display module 703
Before the interface at end, when network is unobstructed, detect whether the client of the caching needs to update;
Second download module 709, if needing to update for the client, latest edition is downloaded from the server
Client;
Second update module 710, for the client of the latest edition downloaded with second download module 709 more
The client of the new caching.
The data interaction module 704, including:
Data query unit 704a, for when network is unobstructed, according to data of the user in the interface of the client
Inquiry operation is to the server lookup business datum.
The data interaction module 704, including:
Data receipt unit 704b, receives for the interface by the client shown in the browser and treats
The business datum of report;
Data buffer storage unit 704c, for when network is obstructed, by business datum described in the client-cache;
First reporting unit 704d, for when next network is unobstructed, the data buffer storage unit being reported to server
The business datum of 704c cachings;
Second reporting unit 704e, for when network is unobstructed, directly reporting the data receiver list to the server
The business datum that first 704b is received.
In sum, the terminal that the embodiment of the present invention seven is provided, display terminal is in historical log and network in a browser
The login interface and client obtained from server when unobstructed, and service data interaction is carried out by the client and server.
Because terminal can also complete the login of client when network is obstructed with cache entries interface and client, solve
Terminal needs the problem with server real-time interconnection in the prior art, reaches and also may be used under terminal is in the obstructed environment of network
To upload the purpose of business datum to server;In addition, the terminal that the embodiment of the present invention seven is provided, automatic to obtain or more Xindeng
Record interface and client, solve prior art and are limited to that SIM self-capacities are limited and ardware feature, and development process is relatively complicated
And the problem of scaling difficulty, reach the purpose for simplifying deployment and escalation process;Finally, the terminal that the embodiment of the present invention seven is provided,
Login interface and client are developed using the framework of HTML5+JavaScript+CSS, are solved in the prior art based on embedding
, it is necessary to consider the ardware feature of different embedded devices when entering formula equipment development, cross-platform adaptation needs the construction cycle more long
With the problem of more development cost, raising development efficiency is reached, shorten the construction cycle, significantly save the purpose of development cost.
Embodiment eight
Fig. 9 is refer to, the equipment pie graph of the server provided it illustrates the embodiment of the present invention eight.The server can be with
It is embodied as server as shown in Figure 1.The server can include:
First login interface provide module 801, for the network in terminal logs in and the terminal it is unobstructed when, to the end
End provides login interface, so as to login interface described in the terminal buffers;And the login interface is shown in a browser;And lead to
The login interface for crossing display completes authentication;
First client provides module 802, for being proved to be successful in the terminal identity and the network of the terminal is unobstructed
When, client is provided to the terminal, so as to client described in the terminal buffers;And the visitor is shown in the browser
The interface at family end;And the interface by the client carries out data interaction with the server.
In sum, the server that the embodiment of the present invention eight is provided, login circle is provided the terminal with when terminal network is unobstructed
Face and client, the interface of the login interface and client is shown so as to terminal in a browser.Stepped on because terminal can be cached
Record interface and client, the login of client can also be completed when network is obstructed, solve terminal needs in the prior art
With the problem of server real-time interconnection, reaching can also upload business under terminal is in the obstructed environment of network to server
The purpose of data;Secondly, the server that the embodiment of the present invention eight is provided, login interface and client use HTML5+
The framework of JavaScript+CSS is developed, and is solved when being developed based on embedded device in the prior art, it is necessary to consider not
With the ardware feature of embedded device, the problem of cross-platform adaptation needs construction cycle more long and more development cost reaches
To development efficiency is improved, shorten the construction cycle, significantly save the purpose of development cost.
Embodiment nine
The scheme being more highly preferred to of the server provided based on above-described embodiment eight, refer to Figure 10, it illustrates this hair
The equipment pie graph of the server that bright embodiment nine is provided.The server can be implemented as server as shown in Figure 1.The clothes
Business device can include:
First login interface provide module 901, for the network in terminal logs in and the terminal it is unobstructed when, to the end
End provides login interface, so as to login interface described in the terminal buffers;And the login interface is shown in a browser;And lead to
The login interface for crossing display completes authentication;
First client provides module 902, for being proved to be successful in the terminal identity and the network of the terminal is unobstructed
When, client is provided to the terminal, so as to client described in the terminal buffers;And the visitor is shown in the browser
The interface at family end;And the interface by the client carries out data interaction with the server.
The server also includes:
First receiver module 903, for the network in the terminal it is unobstructed when, receive the terminal sends, Yong Hu
The identity being input into the login interface and checking password;
Second authentication module 904, for the identity and checking that are received according to first receiver module 903
Password carries out authentication;
The result returns to module 905, for the result of second authentication module 904 to be returned into the end
End.
The server also includes:
Checking password provisioning module 906, for providing the checking password corresponding with the identity to the terminal,
So as to checking password corresponding with the identity described in the terminal buffers, and according to the user in login circle
The identity being input into face and the checking password described corresponding with the identity of checking password and caching are carried out
Authentication;
Wherein, the checking password corresponding with the identity is close with the checking after irreversibly encrypting
Code.
The server also includes:
Second login interface provides module 907, and the login interface for detecting the caching when the terminal needs more
Newly, and the terminal network it is unobstructed when, to the terminal provide latest edition login interface.
The server also includes:
Second client provides module 908, and the client for detecting the caching when the terminal needs to update, and
When the network of the terminal is unobstructed, the client of latest edition is provided to the terminal.
The server also includes:
Data providing module 909, for when the network of the terminal is unobstructed, business datum being provided to the terminal;Institute
State corresponding to the data query operation in the interface that business datum is the client that the user shows in the browser
Data.
The server also includes:
Data reception module 910, the business datum for receiving the terminal to report;
Wherein, the business datum includes:
When the network of the terminal is obstructed, the interface of client of the terminal by being shown in the browser
The business datum for receiving and caching;
And/or, when the network of the terminal is unobstructed, the terminal is by the client of display in the browser
The business datum that interface receives.
In sum, the server that the embodiment of the present invention nine is provided, login circle is provided the terminal with when terminal network is unobstructed
Face and client, the interface of the login interface and client is shown so as to terminal in a browser.Stepped on because terminal can be cached
Record interface and client, the login of client can also be completed when network is obstructed, solve terminal needs in the prior art
With the problem of server real-time interconnection, reaching can also upload business under terminal is in the obstructed environment of network to server
The purpose of data;Secondly, the server that the embodiment of the present invention nine is provided, provides the terminal with login interface and client automatically, solves
Prior art of having determined is limited to that SIM self-capacities are limited and ardware feature, and development process is relatively complicated and problem of scaling difficulty,
Reach the purpose for simplifying deployment and escalation process;Finally, the server that the embodiment of the present invention nine is provided, login interface and client
Developed using the framework of HTML5+JavaScript+CSS, solved when being developed based on embedded device in the prior art,
Need to consider the ardware feature of different embedded devices, cross-platform adaptation needs construction cycle and more development cost more long
Problem, reach raising development efficiency, shorten the construction cycle, significantly save the purpose of development cost.
Embodiment ten
Figure 11 is refer to, the system pie graph of the service data interaction system provided it illustrates the embodiment of the present invention nine.
The service data interaction system can be implemented in implementation environment as shown in Figure 1.The service data interaction system can include:
Terminal 001 as shown in above-mentioned embodiment five or embodiment six and such as above-mentioned embodiment seven or embodiment eight
Shown server 002.
In sum, the service data interaction system that the embodiment of the present invention ten is provided, terminal is displayed in goes through in a browser
The login interface and client obtained from server when history is logged in and network is unobstructed, and industry is entered by the client and server
Business data interaction.Because terminal can also complete client when network is obstructed with cache entries interface and client
Log in, solve the problems, such as that terminal needs and server real-time interconnection in the prior art, reach when terminal is obstructed in network
In the environment of can also to server upload business datum purpose;In addition, the system that the embodiment of the present invention ten is provided, terminal is certainly
It is dynamic to obtain or update login interface and client, solve prior art and be limited to that SIM self-capacities are limited and ardware feature,
Development process is relatively complicated and problem of scaling difficulty, reaches the purpose for simplifying deployment and escalation process;Finally, the present invention is implemented
The system that example ten is provided, login interface and client are developed using the framework of HTML5+JavaScript+CSS, solved
, it is necessary to consider the ardware feature of different embedded devices when being developed based on embedded device in the prior art, cross-platform adaptation is needed
Construction cycle that will be more long and the problem of more development cost, reach raising development efficiency, shorten the construction cycle, significantly save
The purpose of development cost.
It should be noted that:Above-described embodiment provide terminal and server when service data interaction is carried out, only more than
Stating the division of each functional module is carried out for example, in practical application, as needed can distribute by difference above-mentioned functions
Functional module complete, will the internal structure of equipment be divided into different functional modules, with complete it is described above whole or
Person's partial function.In addition, the terminal and server of above-described embodiment offer belong to same with service data interaction embodiment of the method
Design, it implements process and refers to embodiment of the method, repeats no more here.
The embodiments of the present invention are for illustration only, and the quality of embodiment is not represented.
One of ordinary skill in the art will appreciate that realizing that all or part of step of above-described embodiment can be by hardware
To complete, it is also possible to instruct the hardware of correlation to complete by program, described program can be stored in a kind of computer-readable
In storage medium, storage medium mentioned above can be read-only storage, disk or CD etc..
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all it is of the invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc. should be included within the scope of the present invention.