Summary of the invention
The invention mainly solves the technical problem of providing a kind of mail synchronization method based on smart machine and function machine
And system, it can effectively promote the experience of user.
In order to solve the above technical problems, one technical scheme adopted by the invention is that: provide it is a kind of based on smart machine and
The mail synchronization method of function machine, this method comprises: smart machine receives new mail;Smart machine after receiving new mail,
RS232 serial communication protocol is emulated by bluetooth and sends new mail messages to function machine, and wherein new mail messages include mail number
According to the first E-mail instructions, mail data includes sender, theme, time and content, and the first E-mail instructions are for judging user
In the mode of operation of smart machine, mode of operation includes that whether reading state and new mail delete state to new mail;Function
Machine receives the new mail messages that smart machine is sent, and parses the mail data of new mail and the state of new mail;Function
Machine saves mail data, and shows the mode of operation of new mail, and returns to the second E-mail instructions to smart machine, wherein the second postal
Part is instructed for judging user in the mode of operation of function machine;The operation shape of function machine and smart machine simultaneous display new mail
State.
Wherein, this method further include: after function machine receives the new mail messages that smart machine is sent, pop up prompting frame to mention
Show that user has new mail.
Wherein, the step of mode of operation of function machine and smart machine simultaneous display new mail includes: that function machine display is used
New mail has been read at family, and smart machine simultaneous display new mail has been read.
Wherein, the step of mode of operation of function machine and smart machine simultaneous display new mail includes: that function machine display is used
New mail has been deleted at family, and smart machine simultaneous display new mail has been deleted.
Wherein, the data format of new mail messages is provided with recognition command, function machine ID, smart machine ID, check code, number
According to type, data length and data, the second E-mail instructions are provided with recognition command, function machine ID, smart machine ID, data class
Type, data length and data.
In order to solve the above technical problems, another technical solution used in the present invention is: providing a kind of based on smart machine
With the mail synchronization system of function machine, which includes function machine and smart machine, smart machine include the first e-mail module and
First transceiver module, function machine include the second transceiver module and the second e-mail module, in which: the first e-mail module is new for receiving
Mail;First transceiver module is used for after the first e-mail module receives new mail, emulates RS232 serial communication association by bluetooth
View sends new mail messages to the second transceiver module, and wherein new mail messages include mail data and the first E-mail instructions, mail
Data include sender, theme, time and content, the first E-mail instructions for judge user in the mode of operation of smart machine,
Mode of operation includes that whether reading state and new mail delete state to new mail;Second transceiver module is received for receiving first
The new mail messages that module is sent are sent out, and parse the mail data of new mail and the state of new mail;Second e-mail module
For saving mail data, and show the mode of operation of new mail;Second transceiver module is also used to return the second E-mail instructions extremely
First transceiver module, wherein the second E-mail instructions are for judging user in the mode of operation of function machine;First e-mail module and
The mode of operation of two e-mail module simultaneous display new mails.
Wherein, function machine further includes cue module, for receive the first transceiver module send new mail messages after, bullet
Prompting frame is out to prompt user to have new mail.
Wherein, the second e-mail module shows that user has read new mail, and the first e-mail module simultaneous display new mail has been read
It takes.
Wherein, the second e-mail module shows that user has deleted new mail, and the first e-mail module simultaneous display new mail has been deleted
It removes.
Wherein, the data format of new mail messages be provided with recognition command, function machine ID, smart machine ID, data type,
Data length and data, the second E-mail instructions are provided with recognition command, function machine ID, smart machine ID, check code, data class
Type, data length and data.
The beneficial effects of the present invention are: being in contrast to the prior art, the present invention receives new mail by smart machine;
Smart machine emulates RS232 serial communication protocol by bluetooth and sends new mail messages to function machine after receiving new mail;
Function machine receives the new mail messages that smart machine is sent, and parses the mail data of new mail and the state of new mail;
Function machine saves mail data, and shows the mode of operation of new mail, and returns to the second E-mail instructions to smart machine;Function machine
With the mode of operation of smart machine simultaneous display new mail.By the above-mentioned means, function machine and smart machine of the invention can
The mode of operation of simultaneous display new mail, it is easy to operate, effectively promote the experience of user.
Specific embodiment
The present invention is described in detail with embodiment with reference to the accompanying drawing.
As shown in Figure 1, Fig. 1 is the flow diagram of the mail synchronization method the present invention is based on smart machine and function machine,
Method includes the following steps:
Step S101: smart machine receives new mail.
Step S102: smart machine emulates RS232 serial communication protocol by bluetooth and sends newly after receiving new mail
E-mail messages are to function machine.
Firstly, here it should be particularly noted that smart machine of the invention is mainly to install setting for Android (Android) system
Standby or smart machine is the equipment of ios (Mobile operating system of Apple Inc.'s exploitation) system or smart machine is tool
The equipment for having touch function and other powerful application functions.Function machine predominantly only have the function of dialing/receiving telephone with
The equipment for receiving and dispatching SMS function, structure is simple, i.e., function machine only has simple tool, is mainly set with being provided with function button
Based on standby, that is to say, that function machine unintelligent device.
In the present embodiment, the data transmission scheme at smart machine and function machine both ends mainly uses BT SPP (bluetooth
One kind of serial port protocol) transport protocol, i.e., bluetooth emulate RS232 serial communication protocol, it define two bluetooth equipments it
Between by bluetooth emulate RS232 serial communication standard process and rule, it make based on wire transmission application have a kind of nothing
The alternative solution of line transmission-BT virtual serial port transmission.Certainly, in other embodiments, smart machine is directly sent by bluetooth
New mail messages are to function machine.
Wherein, new mail messages include mail data and the first E-mail instructions, mail data include sender, theme, when
Between, content, index value ID (Identity, identity recognition number), addressee and make a copy for people, for the size in view of a mail,
The content of mail is preferably content of text.Certainly, the content of mail may be the lesser audio or video of capacity.First mail
For judging user in the mode of operation of smart machine, mode of operation includes that whether reading state and new mail are new mail for instruction
No deletion state.
In the present embodiment, the data format of new mail messages be provided with recognition command, function machine ID, smart machine ID,
Check code, data type, data length and data.Wherein check code is for detecting whether smart machine is successfully transmitted new mail letter
It ceases to function machine.Can by check code authentication function machine and smart machine whether successful connection.
Step S103: function machine receives the new mail messages that smart machine is sent, and parses the mail data of new mail
And the state of new mail.
Wherein, function machine can identify the recognition command of new mail messages, function machine ID, smart machine ID, i.e. function machine
Judge that the data format of data with recognition command, function machine ID, smart machine ID, then judges the data for smart machine transmission
New mail messages;If function machine judges that the data format of data does not carry recognition command, function machine ID, smart machine ID,
Then judge the data not and be the new mail messages that smart machine is sent.
In step s 103, after function machine receives the new mail messages that smart machine is sent, prompting frame is popped up to prompt to use
There is new mail at family.Preferably, function machine pops up prompting frame with mode of vibration.
Step S104: function machine saves mail data, and shows the mode of operation of new mail, and returns to the second E-mail instructions
To smart machine.
Specifically, function machine shows that mailing list, mailing list show new mail, user after user clicks prompting frame
New mail can be checked and deleted on function machine.
Wherein, for the second E-mail instructions for judging user in the mode of operation of function machine, mode of operation includes that new mail is
Whether no reading state and new mail delete state.Second E-mail instructions are provided with recognition command, function machine ID, smart machine
ID, data type, data length and data.Function machine can identify that the recognition command of new mail messages, function machine ID, intelligence are set
Standby ID, i.e. function machine judge that the data format of data with recognition command, function machine ID, smart machine ID, then judges the data
The new mail messages sent for smart machine.
Step S105: the mode of operation of function machine and smart machine simultaneous display new mail.
In the present embodiment, when function machine shows that user has read new mail, smart machine simultaneous display new mail has been read
It takes;When function machine shows that user of unread takes new mail, smart machine simultaneous display new mail is unread;When function machine shows user
New mail is deleted, smart machine simultaneous display new mail has been deleted.It should be understood that function machine with smart machine be it is synchronous, i.e.,
When smart machine shows that user has read new mail, function machine simultaneous display new mail has been read;When smart machine shows user
Unread new mail, function machine simultaneous display new mail are unread;When smart machine shows that user has deleted new mail, function machine
Simultaneous display new mail has been deleted.
Certainly, in other embodiments, in order to go back on one's word after deleting mail in view of user, when function machine shows user
It after having deleted new mail, shows that new mail is not deleted in smart machine, new mail can be retransmitted by smart machine to function
Machine, to keep the mode of operation of function machine and smart machine simultaneous display new mail again.
The function machine of the present embodiment identifies intelligence by the recognition command, function machine ID and smart machine ID of data format
The new mail messages that equipment is sent, smart machine identify that function machine is sent out by recognition command, function machine ID and smart machine ID
The second E-mail instructions sent enable to the mode of operation of function machine and smart machine simultaneous display mail, effectively promotion user
Experience.In addition, function machine substitution can be used in user due to the mode of operation of function machine and smart machine simultaneous display mail
Smart machine operates mail, can use low energy consumption, Low emissivity and the small and exquisite feature easy to operate of function machine, greatly promotes use
The experience at family.
It is the flow diagram of function machine mail synchronization of the present invention with further reference to Fig. 4, Fig. 4 comprising following steps:
Step S201: function machine receives new mail messages.
Step S202: function machine pops up prompting frame.
Step S203: the mode of operation of arbitration functions machine.
Wherein, whether the step of step S203 mainly judges operation of the user on function machine, that is, judge user in function
The operation of deletion new mail can be executed on machine, whether user checks whether new mail operation or user exit prompting frame on function machine
Operation.
When user executes on function machine deletes mail action, executes step S204: deleting the new mail of function machine.It deletes
After new mail, step S205 is executed: sending and delete instruction to smart machine.So that synchronous execute of smart machine deletes new stamp
Part operation.
When user executes on function machine checks mail action, executes step S206: checking the content of new mail.It checks
After new mail, execute step S207: transmission has read instruction to smart machine.So that smart machine simultaneous display has been read newly
Mail action.
When user executes on function machine exits prompting frame operation, step S208 is executed: sending unread instruction to intelligence
It can equipment.And execute step S209: saving new mail to mailing list.So that the unread new mail of smart machine simultaneous display
Operation.In addition, executing step S209 after instruction to smart machine has been read in transmission.
It is the flow diagram of smart machine mail synchronization of the present invention with further reference to Fig. 5, Fig. 5, which includes:
Step S301: new mail or the second E-mail instructions are received.
Step S302: judge mode of operation.Wherein the mode of operation can be the mode of operation of user on intelligent devices,
Can also by the second E-mail instructions judge user function machine mode of operation.
When mode of operation is to execute to delete mail action, executes step S303: deleting the new mail of function machine.Ying Li
Solution executes step S304 when smart machine reception new mail, and after deleting new mail: sending and deletes instruction to function machine.With
So that synchronous execute of smart machine deletes new mail operation.In addition, when smart machine receives the second E-mail instructions, in intelligence
After equipment deletes new mail, this process step is exited, does not execute step S304.
When mail action is checked in mode of operation execution, executes step S305: checking the content of new mail.It should be understood that working as
Smart machine receives new mail, and after checking new mail, executes step S306: transmission has read instruction to function machine.So that
It obtains smart machine simultaneous display and has read new mail operation.In addition, when smart machine receives the second E-mail instructions, in intelligence
After equipment checks new mail, this process step is exited, does not execute step S306.
When mode of operation is to execute unread mail action, step S307 is executed: sending unread instruction to function machine.
And execute step S308: saving new mail to mailing list.So that the unread new mail operation of smart machine simultaneous display.Separately
Outside, after instruction to smart machine has been read in transmission, step S308 is executed.It should be understood that when smart machine receives new mail, and grasp
As state be execute be read mail action when, execute step S307 and step S308.Refer to when smart machine receives the second mail
When enabling, and when the second E-mail instructions judge the mode of operation of user for unread mail action, step S307 is not executed, is only carried out
Step S308.
As shown in fig. 6, Fig. 6 be the present invention is based on the structural schematic diagram of the mail synchronization system of smart machine and function machine,
Method in the system corresponding diagram 1.Smart machine of the invention is mainly the equipment for installing android system, or intelligence is set
Standby is the equipment of ios system or smart machine is the equipment with touch function and other powerful application functions.Function
Energy machine is mainly the equipment for only having the function of dialing/receiving telephone and receiving and dispatching SMS function, and structure is simple, i.e., function machine only has
There is simple tool, mainly to be provided with based on function button equipment, that is to say, that function machine unintelligent device.
The system includes smart machine 11 and function machine 12.Smart machine 11 includes that the first e-mail module 111 and first is received
Send out module 112.Function machine 12 includes the second e-mail module 121, the second transceiver module 122 and prompting frame module 123.
First e-mail module 111 is for receiving new mail.
First transceiver module 112 is used for after the first e-mail module 111 receives new mail, emulates RS232 by bluetooth
Serial communication protocol sends new mail messages to the second transceiver module 122.Wherein, new mail messages include mail data and first
E-mail instructions, mail data includes sender, theme, time, content, index value ID, addressee and makes a copy for people, in view of one
The size of mail, the content of mail is preferably content of text.Certainly, the content of mail may be the lesser audio of capacity or
Video.For first E-mail instructions for judging user in the mode of operation of smart machine, mode of operation includes whether new mail reads
Whether state and new mail delete state.
In the present embodiment, the data format of new mail messages be provided with recognition command, function machine ID, smart machine ID,
Check code, data type, data length and data.Wherein check code is for detecting whether smart machine is successfully transmitted new mail letter
It ceases to function machine.Can by check code authentication function machine and smart machine whether successful connection.
Second transceiver module 122 is used to receive the new mail messages of the first transceiver module 112 transmission, and parses new mail
Mail data and new mail state.
Cue module 123 is used for after receiving the new mail messages that the first transceiver module 112 is sent, and pops up prompting frame to mention
Show that user has new mail.
Second e-mail module 121 shows the mode of operation of new mail for saving mail data.
Second transceiver module 122 is also used to return the second E-mail instructions to the first transceiver module 112, wherein the second mail refers to
It enables for judging user in the mode of operation of function machine, the second E-mail instructions are provided with recognition command, function machine ID, smart machine
ID, check code, data type, data length and data.
The mode of operation of 121 simultaneous display new mail of first e-mail module 111 and the second e-mail module.
Specifically, the second e-mail module 121 shows that user has read new mail, 111 simultaneous display of the first e-mail module
New mail has been read.Second e-mail module 121 shows that user of unread takes new mail, 111 simultaneous display new stamp of the first e-mail module
Part is unread.Second e-mail module 121 shows that user has deleted new mail, and 111 simultaneous display new mail of the first e-mail module is
It deletes.
Certainly, in other embodiments, in order to go back on one's word after deleting mail in view of user, when the second e-mail module
After 121 display users have deleted new mail, shows that new mail is not deleted in the first e-mail module 111, the first mail mould can be passed through
Block 111 retransmits new mail to function machine, to keep the operation of function machine and smart machine simultaneous display new mail again
State.
In conclusion the present invention receives new mail by smart machine;Smart machine passes through indigo plant after receiving new mail
Tooth emulates RS232 serial communication protocol and sends new mail messages to function machine;Function machine receives the new mail that smart machine is sent
Information, and parse the mail data of new mail and the state of new mail;Function machine saves mail data, and shows new mail
Mode of operation, and return to the second E-mail instructions to smart machine;The operation of function machine and smart machine simultaneous display new mail
State.By the above-mentioned means, function machine and smart machine of the invention are capable of the mode of operation of simultaneous display new mail, operation
It is convenient, effectively promote the experience of user.In addition, due to the mode of operation of function machine and smart machine simultaneous display mail, user
Function machine substitution smart machine operation mail can be used, can use low energy consumption, Low emissivity and the small and exquisite easy behaviour of function machine
The characteristics of making greatly promotes the experience of user.
Mode the above is only the implementation of the present invention is not intended to limit the scope of the invention, all to utilize this
Equivalent structure or equivalent flow shift made by description of the invention and accompanying drawing content, it is relevant to be applied directly or indirectly in other
Technical field is included within the scope of the present invention.