Specific embodiment
To explain the technical content, the achieved purpose and the effect of the present invention in detail, below in conjunction with embodiment and cooperate attached
Figure is explained in detail.
The design of most critical of the present invention are as follows: receive the service request data that multiple first terminals are sent, and respectively to each
The service request data that a first terminal is sent is handled;By service request data treated processing data store to local
Sqlite database in, and push the processing data respectively to each first terminal.
Fig. 1 is please referred to, the present invention provides a kind of method for processing business, comprising the following steps:
S1: the service request data that multiple first terminals are sent, and the industry sent respectively to each first terminal are received
Business request data is handled;
S2: by service request data, treated that processing data are stored into local Sqlite database, and pushes away respectively
Send the processing data to each first terminal.
As can be seen from the above description, the present invention provides a kind of method for processing business, by receiving multiple first terminal hairs
The service request data sent, and the service request data sent respectively to each first terminal is handled;By service request
Processing data after data processing are stored into local Sqlite database, and push respectively the processing data to each
First terminal.In terms of business, first terminal receives the machine for the service request data that multiple first terminals are sent as passenger plane
As host, business operation can be carried out on any one first terminal, and the service request data of business operation is sent out
It send to host, after handling and storing on host, feeds back information to all first terminals, so that the institute being connect with host networking
There is first terminal can receive simultaneously processing result and refresh interface, can be applied to meal ordering system, so that all first
Terminal can order food business operation to the customer of any one parlor or dining table, and all first terminals receive a little simultaneously
Meal service processing result improves point to hold first terminal and can to timely feedback near the waiter of customer to customer
The efficiency and Customer Experience of meal system.The present invention carries out data storage by local Sqlite database simultaneously, is not necessarily to volume
Outer offer large database reduces the use cost of business processing as shared data bank.
Wherein, Sqlite database is a light-duty database, is the Relational DBMS in accordance with ACID.
Further, the S2 specifically:
By service request data, treated that processing data are stored into local Sqlite database, and pushes institute respectively
It states in processing data to first user interface of the machine and in the user interface of each first terminal.
As can be seen from the above description, can receive above-mentioned service request data processing on the machine and all first terminals
Processing data afterwards, so that the machine (host) can receive processing data, so that each terminal and the machine can be timely
The processing result of service request data is obtained, can make full use of the machine, is improved resource utilization, and can notify to care in time
Visitor.
Further, the S1 specifically:
The service request data that multiple first terminals are sent is received, and respectively to the first service request number manipulated in the machine
According to and each first terminal send service request data handled.
As can be seen from the above description, the machine can not only serve as the function of server, additionally it is possible to play carry out business operation, send out
The function of playing service request, substantially increases local resource utilization rate.
Further, if a service request data processing failure, shows processing failure reason, and at transmission in the machine
The service request data of the reason of reason failure and processing failure is to each first terminal.
As can be seen from the above description, can the above method, can show service request on each first terminal and the machine
The result and reason of data processing failure, to handle in time the above-mentioned corresponding service request of service request data,
The user experience of business processing is can be improved.
Further, the S2 specifically:
Processing data after service request data is successfully processed are stored to local Sqlite database, and described in judgement
Whether processing data store success, if it is not, then rollback data, show storage failure cause in the machine, and send storage failure
Reason and the service request data of storage failure are to each first terminal;
If so, sending the processing data respectively to all first terminals, so that each first terminal receives
To after the processing data, processing data are stored in the database on first terminal, and according to processing data, refresh first
Interface display information in terminal.
As can be seen from the above description, can show service request on each first terminal and the machine by the above method
The result and reason of the processing data storage failure of data, so as in time to the above-mentioned corresponding service request of service request data
It is handled, can be improved the user experience of business processing.And deposit processing data store successfully after, can notify in time often
One first terminal and the machine, improve user experience.
Further, before the S1 further include:
WLAN is established respectively with the multiple first terminal to connect.
As can be seen from the above description, the rate that data are transmitted between the machine and first terminal can be improved by the above method,
And the safety of internal data transfer can be ensured to a certain extent.
Further, after sending the processing data to all first terminals respectively further include:
Judge whether for the processing data to be successfully transmitted to each first terminal;
If it is not, then disconnecting the connection relationship with the first terminal for sending failure.
As can be seen from the above description, by the above method first terminal of failure can be disconnected, in time to improve the machine
The rate interacted between other first terminals.
Further, a kind of method for processing business, further includes:
When establishing connection for the first time with first terminal, data in local Sqlite database are synchronized to described first eventually
In the database at end.
As can be seen from the above description, can guarantee each first terminal and native database of connection by the above method
Middle storage content is identical, so that other first terminal quickly networkings, carry out business operation.
Further, every preset time, judge in the machine Sqlite database and all first terminal databases
Whether data synchronize, if asynchronous, carry out data simultaneously operating.
Preferably, preset time is 3-48 hours.
Further, it is established with first terminal before WLAN connect further include:
The connection request and connection request data that first terminal is sent are received, the connection request data include Target IP
Location;
Judge whether the IP address of the target ip address and the machine is consistent, if unanimously, responding the connection request;It is no
Then, refuse the connection request.
Further, it is established with first terminal before WLAN connect further include:
The connection request and connection request data that first terminal is sent are received, the connection request data include first terminal
The first IP address and first terminal subnet mask;
According to the first IP address and subnet mask, judge whether to handle same network segment with first terminal, if so, response institute
State connection request;Otherwise, refuse the connection request.
As can be seen from the above description, the identity information of first terminal is able to verify that, to guarantee in the machine by the above method
Data safety.
Referring to figure 2., the present invention provides a kind of transaction processing system, including second terminal and multiple first terminals, institutes
Second terminal is stated to include memory 1, processor 2 and be stored in the computer journey that can be run on memory 1 and on processor 2
Sequence, the processor 2 perform the steps of when executing the computer program
S1: the service request data that multiple first terminals are sent, and the industry sent respectively to each first terminal are received
Business request data is handled;
S2: by service request data, treated that processing data are stored into local Sqlite database, and pushes away respectively
Send the processing data to each first terminal.
As can be seen from the above description, the present invention provides a kind of service process terminal, by receiving multiple first terminal hairs
The service request data sent, and the service request data sent respectively to each first terminal is handled;By service request
Processing data after data processing are stored into local Sqlite database, and push respectively the processing data to each
First terminal.In terms of business, first terminal receives the machine for the service request data that multiple first terminals are sent as passenger plane
As host (second terminal), business operation can be carried out on any one first terminal, and by the business of business operation
Request data is sent to host (second terminal), after handling and store in second terminal, feeds back information to all first eventually
End, so that all first terminals connecting with second terminal networking can receive simultaneously processing result and refresh interface, it can
Applied to meal ordering system, so that all first terminals can order food business behaviour to the customer of any one parlor or dining table
Make, and all first terminals receive service processing result of ordering simultaneously, to hold first terminal and near the clothes of customer
Business person can timely feedback the efficiency and Customer Experience that meal ordering system is improved to customer.The present invention passes through local simultaneously
Sqlite database, which carries out data storage, reduces business processing without being additionally provided large database as shared data bank
Use cost.
Further, a kind of transaction processing system, the S2 specifically:
By service request data, treated that processing data are stored into local Sqlite database, and pushes institute respectively
It states in processing data to first user interface of the machine and in the user interface of each first terminal.
As can be seen from the above description, can receive above-mentioned service request data processing on the machine and all first terminals
Processing data afterwards, so that the machine (second terminal) can receive processing data, so that each terminal and the machine can
Obtain the processing result of service request data in time, can make full use of second terminal, improve resource utilization, and can and
Customer Shi Tongzhi.
Further, a kind of transaction processing system, the S1 specifically:
The service request data that multiple first terminals are sent is received, and respectively to the first service request number manipulated in the machine
According to and each first terminal send service request data handled.
As can be seen from the above description, the machine can not only serve as the function of server, additionally it is possible to play carry out business operation, send out
The function of playing service request, substantially increases local resource utilization rate.
Further, a kind of transaction processing system is shown in the machine if a service request data processing failure
The service request data of the reason of showing processing failure reason, and sending processing failure and processing failure is to each first terminal.
As can be seen from the above description, can above system, can show service request on each first terminal and the machine
The result and reason of data processing failure, to handle in time the above-mentioned corresponding service request of service request data,
The user experience of business processing is can be improved.
Further, a kind of transaction processing system, the S2 specifically:
Processing data after service request data is successfully processed are stored to local Sqlite database, and described in judgement
Whether processing data store success, if it is not, then rollback data, show storage failure cause in the machine, and send storage failure
Reason and the service request data of storage failure are to each first terminal;
If so, sending the processing data respectively to all first terminals, so that each first terminal receives
To after the processing data, processing data are stored in the database on first terminal, and according to processing data, refresh first
Interface display information in terminal.
As can be seen from the above description, can show service request on each first terminal and the machine by above system
The result and reason of the processing data storage failure of data, so as in time to the above-mentioned corresponding service request of service request data
It is handled, can be improved the user experience of business processing.And deposit processing data store successfully after, can notify in time often
One first terminal and the machine, improve user experience.
Further, a kind of transaction processing system, before the S1 further include:
WLAN is established respectively with the multiple first terminal to connect.
As can be seen from the above description, the rate that data are transmitted between the machine and first terminal can be improved by above system,
And the safety of internal data transfer can be ensured to a certain extent.
Further, a kind of transaction processing system sends the processing data to all first terminals respectively
Later further include:
Judge whether for the processing data to be successfully transmitted to each first terminal;
If it is not, then disconnecting the connection relationship with the first terminal for sending failure.
As can be seen from the above description, by above system the first terminal of failure can be disconnected, in time to improve the machine
The rate interacted between other first terminals.
Further, a kind of transaction processing system, the processor executes to be realized when the computer program
Step further include:
When establishing connection for the first time with first terminal, data in local Sqlite database are synchronized to described first eventually
In the database at end.
As can be seen from the above description, can guarantee each first terminal and native database of connection by above system
Middle storage content is identical, so that other first terminal quickly networkings, carry out business operation.
Further, a kind of transaction processing system, the processor executes to be realized when the computer program
Step further include: every preset time, judge that the machine Sqlite database is with the data in all first terminal databases
No synchronization carries out data simultaneously operating if asynchronous.
Preferably, preset time is 3-48 hours.
Further, a kind of transaction processing system is established before WLAN is connect with first terminal and is also wrapped
It includes:
The connection request and connection request data that first terminal is sent are received, the connection request data include Target IP
Location;
Judge whether the IP address of the target ip address and the machine is consistent, if unanimously, responding the connection request;It is no
Then, refuse the connection request.
Further, a kind of transaction processing system is established before WLAN is connect with first terminal and is also wrapped
It includes:
The connection request and connection request data that first terminal is sent are received, the connection request data include first terminal
The first IP address and first terminal subnet mask;
According to the first IP address and subnet mask, judge whether to handle same network segment with first terminal, if so, response institute
State connection request;Otherwise, refuse the connection request.
As can be seen from the above description, the identity information of first terminal is able to verify that, to guarantee in the machine by above system
Data safety.
Please refer to Fig. 1, the embodiment of the present invention one are as follows:
The present invention provides a kind of bluetooth localization methods, comprising the following steps:
S1: the service request data that multiple first terminals are sent, and the industry sent respectively to each first terminal are received
Business request data is handled;
Wherein, the S1 specifically:
The service request data that multiple first terminals are sent is received, and respectively to the first service request number manipulated in the machine
According to and each first terminal send service request data handled.
S2: by service request data, treated that processing data are stored into local Sqlite database, and pushes away respectively
Send the processing data to each first terminal.
Wherein, the S2 specifically:
By service request data, treated that processing data are stored into local Sqlite database, and pushes institute respectively
It states in processing data to first user interface of the machine and in the user interface of each first terminal.
Wherein, the first user face is the user interface in the machine.
The embodiment of the present invention two are as follows:
The present invention provides a kind of method for processing business, comprising the following steps:
S0: WLAN is established respectively with the multiple first terminal and is connect;
Wherein, when establishing connection for the first time with first terminal, data in local Sqlite database are synchronized to described
In the database of first terminal.
Wherein, it is established with first terminal before WLAN connect further include:
The connection request and connection request data that first terminal is sent are received, the connection request data include Target IP
Location;Judge whether the IP address of the target ip address and the machine is consistent, if unanimously, responding the connection request;Otherwise, it refuses
The exhausted connection request.
Wherein, it is established with first terminal before WLAN connect further include:
The connection request and connection request data that first terminal is sent are received, the connection request data include first terminal
The first IP address and first terminal subnet mask;According to the first IP address and subnet mask, judge whether and first terminal
Same network segment is handled, if so, responding the connection request;Otherwise, refuse the connection request.
S1: the service request data that multiple first terminals are sent, and the industry sent respectively to each first terminal are received
Business request data is handled;
Wherein, the S1 specifically:
The service request data that multiple first terminals are sent is received, and respectively to the first service request number manipulated in the machine
According to and each first terminal send service request data handled.
Wherein, it if a service request data processing failure, shows processing failure reason in the machine, and sends processing and loses
The service request data of the reason of losing and processing failure is to each first terminal.
S2: by service request data, treated that processing data are stored into local Sqlite database, and pushes away respectively
Send the processing data to each first terminal.
Wherein, the S2 specifically:
Processing data after service request data is successfully processed are stored to local Sqlite database, and described in judgement
Whether processing data store success, if it is not, then rollback data, show storage failure cause in the machine, and send storage failure
Reason and the service request data of storage failure are to each first terminal;
If so, sending the processing data respectively to all first terminals, so that each first terminal receives
To after the processing data, processing data are stored in the database on first terminal, and according to processing data, refresh first
Interface display information in terminal.
Wherein, after sending the processing data to all first terminals respectively further include:
Judge whether for the processing data to be successfully transmitted to each first terminal;If it is not, then disconnecting and sending failure
First terminal connection relationship.
Wherein, above-mentioned all first terminals and second terminal are android terminal.
Referring to figure 2., the embodiment of the present invention three are as follows:
The present invention provides a kind of transaction processing system, including second terminal and multiple first terminals, the second terminals
Including memory 1, processor 2 and it is stored in the computer program that can be run on memory 1 and on processor 2, the processing
Device 2 performs the steps of when executing the computer program
S1: the service request data that multiple first terminals are sent, and the industry sent respectively to each first terminal are received
Business request data is handled;
Wherein, the S1 specifically:
The service request data that multiple first terminals are sent is received, and respectively to the first service request number manipulated in the machine
According to and each first terminal send service request data handled.
S2: by service request data, treated that processing data are stored into local Sqlite database, and pushes away respectively
Send the processing data to each first terminal.
Wherein, the S2 specifically:
By service request data, treated that processing data are stored into local Sqlite database, and pushes institute respectively
It states in processing data to first user interface of the machine and in the user interface of each first terminal.
The embodiment of the present invention four are as follows:
The present invention provides a kind of transaction processing system, including second terminal and multiple first terminals, the second terminals
Including memory 1, processor 2 and it is stored in the computer program that can be run on memory 1 and on processor 2, the processing
Device 2 performs the steps of when executing the computer program
S0: WLAN is established respectively with the multiple first terminal and is connect;
Wherein, when establishing connection for the first time with first terminal, data in local Sqlite database are synchronized to described
In the database of first terminal.
Wherein, it is established with first terminal before WLAN connect further include:
The connection request and connection request data that first terminal is sent are received, the connection request data include Target IP
Location;Judge whether the IP address of the target ip address and the machine is consistent, if unanimously, responding the connection request;Otherwise, it refuses
The exhausted connection request.
Wherein, it is established with first terminal before WLAN connect further include:
The connection request and connection request data that first terminal is sent are received, the connection request data include first terminal
The first IP address and first terminal subnet mask;According to the first IP address and subnet mask, judge whether and first terminal
Same network segment is handled, if so, responding the connection request;Otherwise, refuse the connection request.
S1: the service request data that multiple first terminals are sent, and the industry sent respectively to each first terminal are received
Business request data is handled;
Wherein, the S1 specifically:
The service request data that multiple first terminals are sent is received, and respectively to the first service request number manipulated in the machine
According to and each first terminal send service request data handled.
Wherein, it if a service request data processing failure, shows processing failure reason in the machine, and sends processing and loses
The service request data of the reason of losing and processing failure is to each first terminal.
S2: by service request data, treated that processing data are stored into local Sqlite database, and pushes away respectively
Send the processing data to each first terminal.
Wherein, the S2 specifically:
Processing data after service request data is successfully processed are stored to local Sqlite database, and described in judgement
Whether processing data store success, if it is not, then rollback data, show storage failure cause in the machine, and send storage failure
Reason and the service request data of storage failure are to each first terminal;
If so, sending the processing data respectively to all first terminals, so that each first terminal receives
To after the processing data, processing data are stored in the database on first terminal, and according to processing data, refresh first
Interface display information in terminal.
Wherein, after sending the processing data to all first terminals respectively further include:
Judge whether for the processing data to be successfully transmitted to each first terminal;If it is not, then disconnecting and sending failure
First terminal connection relationship.
The embodiment of the present invention five are as follows:
1, the present invention provides a method for processing business, and the office of ERP business can be set up using more android terminals
Domain net has saved the cost of user networking, improves the utilization rate to terminal, takes full advantage of the performance of terminal.2, service network
For a terminal in network as host module of the invention, the as host (second terminal) of business network, other terminals are visitor
Machine (first terminal) when passenger plane access service system, first passes through local area network and obtains data information in host data base, and
It stores data in the application database of its terminal (passenger plane).Application database uses the light weight number built in android
According to library Sqlite, the operation carried out in any terminal of operation system all sends data to host by network, on host
After managing and storing, all terminals (passenger plane) in business network are fed back information to.The data of passenger plane update own database.In this way
User can not use large database, reduce the expense that client buys commercialization SQLServer database, pass through
Android terminal replaces performance server more than needed, saves hardware spending.3, all business are all carried out by host application
Reason, and notify the service application of other terminals, optimize the drawbacks of more terminals can not carry out business movement simultaneously in old scheme.
In operation system, the business operation carried out on any terminal (host or passenger plane) is all transmitted data at host
Reason, and refresh the UI (user interface) of host.After host completion processing, all terminals in business network can be fed back information to
(passenger plane) notifies it to refresh the data of display, improves the experience of user.4, under network frame of the invention, user can be with
By business procedure find in local area network it is all under same network segment can the host terminal of business network that builds up of group.Pass through business journey
Sequence directly chooses host, is connected into business network.It can also be found in local area network not by the address ip of input host terminal
Host terminal under same network segment.5, the characteristics of the present invention is based on 2, each terminal being connected into system have a current business
The backup of data.When the terminal damage of role any in network, can be replaced at once using another terminal, in system
Business datum will not because of terminal damage and lose.6, in the process of development, present invention provides the code skeleton of exploitation,
It allows developer only to need to handle the success, failure and the logic notified of current business movement, does not need to be concerned about that the movement occurs
In the terminal under which platform or any situation.
In conclusion the present invention provides a kind of method for processing business and system, by receiving multiple first terminal hairs
The service request data sent, and the service request data sent respectively to each first terminal is handled;By service request
Processing data after data processing are stored into local Sqlite database, and push respectively the processing data to each
First terminal.In terms of business, first terminal receives the machine for the service request data that multiple first terminals are sent as passenger plane
(second terminal) is used as host, can carry out business operation on any one first terminal, and by the business of business operation
Request data is sent to second terminal, after handling and storing in second terminal, feeds back information to all first terminals, so that
All first terminals connecting with the machine networking can receive simultaneously processing result and refresh interface, and can be applied to order is
System, so that all first terminals can order food business operation to the customer of any one parlor or dining table, and all the
One terminal receives service processing result of ordering simultaneously, to hold first terminal and can be timely near the waiter of customer
Customer is fed back to, the efficiency and Customer Experience of meal ordering system are improved.Simultaneously the present invention by local Sqlite database into
The storage of row data, without being additionally provided large database as shared data bank, reduces the use cost of business processing.
The above description is only an embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalents made by bright specification and accompanying drawing content are applied directly or indirectly in other relevant technical fields, similarly
It is included within the scope of the present invention.