Summary of the invention
The technical problem that the present invention mainly solves is to provide a kind of mail synchronization method based on smart machine and function machine and system, effectively can promote the experience of user.
For solving the problems of the technologies described above, the technical scheme that the present invention adopts is: provide a kind of mail synchronization method based on smart machine and function machine, the method comprises: smart machine receives new mail; Smart machine is after receiving new mail, new mail messages is sent to function machine by bluetooth emulation RS232 serial communication protocol, wherein new mail messages comprises mail data and the first E-mail instructions, mail data comprises sender, theme, time and content, first E-mail instructions is for judging the mode of operation of user at smart machine, and mode of operation comprises new mail, and whether reading state and new mail delete state; Function machine receives the new mail messages that smart machine sends, and parses the mail data of new mail and the state of new mail; Function machine preserves mail data, and shows the mode of operation of new mail, and returns the second E-mail instructions to smart machine, and wherein the second E-mail instructions is for judging the mode of operation of user at function machine; The mode of operation of function machine and smart machine simultaneous display new mail.
Wherein, the method also comprises: after function machine receives the new mail messages of smart machine transmission, and ejecting prompting frame has new mail to point out user.
Wherein, the step of the mode of operation of function machine and smart machine simultaneous display new mail comprises: function machine display user reads new mail, and smart machine simultaneous display new mail reads.
Wherein, the step of the mode of operation of function machine and smart machine simultaneous display new mail comprises: function machine display user deletes new mail, and smart machine simultaneous display new mail is deleted.
Wherein, the data format of new mail messages is provided with recognition command, function machine ID, smart machine ID, check code, data type, data length and data, and the second E-mail instructions is provided with recognition command, function machine ID, smart machine ID, data type, data length and data.
For solving the problems of the technologies described above, another technical solution used in the present invention is: provide a kind of mail synchronization system based on smart machine and function machine, this system comprises function machine and smart machine, smart machine comprises the first e-mail module and the first transceiver module, function machine comprises the second transceiver module and the second e-mail module, wherein: the first e-mail module is for receiving new mail; First transceiver module is used for after the first e-mail module receives new mail, new mail messages to the second transceiver module is sent by bluetooth emulation RS232 serial communication protocol, wherein new mail messages comprises mail data and the first E-mail instructions, mail data comprises sender, theme, time and content, first E-mail instructions is for judging the mode of operation of user at smart machine, and mode of operation comprises new mail, and whether reading state and new mail delete state; The new mail messages that second transceiver module sends for receiving the first transceiver module, and parse the mail data of new mail and the state of new mail; Second e-mail module for preserving mail data, and shows the mode of operation of new mail; Second transceiver module is also for returning the second E-mail instructions to the first transceiver module, and wherein the second E-mail instructions is for judging the mode of operation of user at function machine; The mode of operation of the first e-mail module and the second e-mail module simultaneous display new mail.
Wherein, function machine also comprises reminding module, and for after the new mail messages that sends at reception first transceiver module, ejecting prompting frame has new mail to point out user.
Wherein, the second e-mail module display user reads new mail, and the first e-mail module simultaneous display new mail reads.
Wherein, the second e-mail module display user deletes new mail, and the first e-mail module simultaneous display new mail is deleted.
Wherein, the data format of new mail messages is provided with recognition command, function machine ID, smart machine ID, data type, data length and data, and the second E-mail instructions is provided with recognition command, function machine ID, smart machine ID, check code, data type, data length and data.
The invention has the beneficial effects as follows: the situation being different from prior art, the present invention receives new mail by smart machine; Smart machine, after receiving new mail, sends new mail messages to function machine by bluetooth emulation RS232 serial communication protocol; Function machine receives the new mail messages that smart machine sends, and parses the mail data of new mail and the state of new mail; Function machine preserves mail data, and shows the mode of operation of new mail, and returns the second E-mail instructions to smart machine; The mode of operation of function machine and smart machine simultaneous display new mail.By the way, function machine of the present invention and smart machine can the modes of operation of simultaneous display new mail, and it is easy to operate, effectively promotes the experience of user.
Embodiment
Below in conjunction with drawings and embodiments, the present invention is described in detail.
As shown in Figure 1, Fig. 1 is the schematic flow sheet of the mail synchronization method that the present invention is based on smart machine and function machine, and the method comprises the following steps:
Step S101: smart machine receives new mail.
Step S102: smart machine, after receiving new mail, sends new mail messages to function machine by bluetooth emulation RS232 serial communication protocol.
First, here should be specifically noted that, smart machine of the present invention is mainly the equipment installing Android (Android) system, or smart machine is the equipment of ios (Mobile operating system of Apple's exploitation) system, or smart machine is the equipment with touch function and other powerful application functions.Function machine is mainly the equipment only with dialing/receiving telephone function and transmitting-receiving SMS, and its structure is simple, and namely function machine only has simple instrument, mainly to be provided with function button equipment, that is, and function machine unintelligent device.
In the present embodiment, the data transmission scheme at smart machine and function machine two ends mainly adopts the host-host protocol of BT SPP (one of bluetooth serial ports agreement), i.e. bluetooth emulation RS232 serial communication protocol, it define the process Sum fanction by bluetooth emulation RS232 serial communication standard between two bluetooth equipments, its application based on wire transmission is had a kind of replacement scheme of wireless transmission-BT virtual serial port transmission.Certainly, in other embodiments, smart machine directly sends new mail messages to function machine by bluetooth.
Wherein, new mail messages comprises mail data and the first E-mail instructions, mail data comprises sender, theme, time, content, index value ID (Identity, identity recognition number), addressee and the people that makes a copy for, for considering the size of a mail, the content of mail is preferably content of text.Certainly, the content of mail also can be the audio or video that capacity is less.First E-mail instructions is for judging the mode of operation of user at smart machine, and mode of operation comprises new mail, and whether reading state and new mail delete state.
In the present embodiment, the data format of new mail messages is provided with recognition command, function machine ID, smart machine ID, check code, data type, data length and data.Wherein whether check code successfully sends new mail messages to function machine for detecting smart machine.Namely by the whether successful connection of check code authentication function machine and smart machine.
Step S103: function machine receives the new mail messages that smart machine sends, and parses the mail data of new mail and the state of new mail.
Wherein, function machine can identify recognition command, function machine ID, the smart machine ID of new mail messages, namely function machine judges that the data format of data is with recognition command, function machine ID, smart machine ID, then judge that these data are the new mail messages that smart machine sends; If function machine judges that the data format of data does not carry recognition command, function machine ID, smart machine ID, then judge these data not as the new mail messages of smart machine transmission.
In step s 103, after function machine receives the new mail messages of smart machine transmission, ejecting prompting frame has new mail to point out user.Preferably, function machine ejects prompting frame with mode of vibration.
Step S104: function machine preserves mail data, and shows the mode of operation of new mail, and returns the second E-mail instructions to smart machine.
Specifically, after user clicks prompting frame, function machine display mail tabulation, mail tabulation display new mail, user can check and delete new mail on function machine.
Wherein, the second E-mail instructions is for judging the mode of operation of user at function machine, and mode of operation comprises new mail, and whether reading state and new mail delete state.Second E-mail instructions is provided with recognition command, function machine ID, smart machine ID, data type, data length and data.Function machine can identify recognition command, function machine ID, the smart machine ID of new mail messages, and namely function machine judges that the data format of data is with recognition command, function machine ID, smart machine ID, then judge that these data are the new mail messages that smart machine sends.
Step S105: the mode of operation of function machine and smart machine simultaneous display new mail.
In the present embodiment, when function machine display user reads new mail, smart machine simultaneous display new mail reads; When function machine display user of unread gets new mail, smart machine simultaneous display new mail does not read; When function machine display user deletes new mail, smart machine simultaneous display new mail is deleted.Should be understood that function machine and smart machine are synchronous, namely when smart machine display user reads new mail, function machine simultaneous display new mail reads; When smart machine display user of unread gets new mail, function machine simultaneous display new mail does not read; When smart machine display user deletes new mail, function machine simultaneous display new mail is deleted.
Certainly, in other embodiments, in order to consider that user can go back on one's word after deletion mail, after function machine display user deletes new mail, do not delete at smart machine display new mail, resend new mail to function machine by smart machine, thus again keep the mode of operation of function machine and smart machine simultaneous display new mail.
The function machine of the present embodiment identifies by the recognition command of data format, function machine ID and smart machine ID the new mail messages that smart machine sends, smart machine identifies the second E-mail instructions of function machine transmission by recognition command, function machine ID and smart machine ID, the mode of operation of function machine and smart machine simultaneous display mail can be made, effectively promote the experience of user.In addition, due to the mode of operation of function machine and smart machine simultaneous display mail, user can substitute smart machine operation mail by using function machine, can utilize the low energy consumption of function machine, Low emissivity and small and exquisite maneuverable feature, greatly promote the experience of user.
With further reference to the schematic flow sheet that Fig. 4, Fig. 4 are function machine mail synchronization of the present invention, it comprises the following steps:
Step S201: function machine receives new mail messages.
Step S202: function machine ejects prompting frame.
Step S203: the mode of operation of arbitration functions machine.
Wherein, the step of step S203 mainly judges the operation of user on function machine, namely judges whether user performs the operation of deletion new mail on function machine, whether user checks on function machine whether new mail operation or user exit prompting frame operation.
When user performs deletion mail action on function machine, perform step S204: the new mail of delete function machine.After deleting new mail, perform step S205: send delete instruction to smart machine.Synchronously perform to make smart machine and delete new mail operation.
When user perform on function machine check mail action time, perform step S206: the content of checking new mail.After checking new mail, perform step S207: send reading command to smart machine.New mail operation has been read to make smart machine simultaneous display.
When user perform on function machine exit prompting frame operation time, perform step S208: send non-reading command to smart machine.And perform step S209: preserve new mail to mail tabulation.New mail operation is not read to make smart machine simultaneous display.In addition, when sending after reading command to smart machine, step S209 is performed.
With further reference to the schematic flow sheet that Fig. 5, Fig. 5 are smart machine mail synchronization of the present invention, this step comprises:
Step S301: receive new mail or the second E-mail instructions.
Step S302: judge mode of operation.Wherein this mode of operation can be the mode of operation of user on smart machine, and the user that also can be judged by the second E-mail instructions is at the mode of operation of function machine.
When mode of operation deletes mail action for performing, perform step S303: the new mail of delete function machine.Should be understood that when smart machine receives new mail, and after deletion new mail, perform step S304: send delete instruction to function machine.Synchronously perform to make smart machine and delete new mail operation.In addition, when smart machine receives the second E-mail instructions, after smart machine deletes new mail, exit this process step, do not perform step S304.
When mail action is checked in mode of operation execution, perform step S305: the content of checking new mail.Should be understood that when smart machine receives new mail, and after checking new mail, perform step S306: send reading command to function machine.New mail operation has been read to make smart machine simultaneous display.In addition, when smart machine receives the second E-mail instructions, after smart machine checks new mail, exit this process step, do not perform step S306.
When mode of operation does not read mail action for performing, perform step S307: send non-reading command to function machine.And perform step S308: preserve new mail to mail tabulation.New mail operation is not read to make smart machine simultaneous display.In addition, when sending after reading command to smart machine, step S308 is performed.Should be understood that when smart machine receives new mail, and mode of operation is, when reading mail action, perform step S307 and step S308 for performing.When smart machine receives the second E-mail instructions, and when the second E-mail instructions judges the mode of operation of user as not reading mail action, not performing step S307, only performing step S308.
As shown in Figure 6, Fig. 6 is the structural representation of the mail synchronization system that the present invention is based on smart machine and function machine, the method in this system corresponding diagram 1.Smart machine of the present invention is mainly the equipment installing android system, or smart machine is the equipment of ios system, or smart machine is the equipment with touch function and other powerful application functions.Function machine is mainly the equipment only with dialing/receiving telephone function and transmitting-receiving SMS, and its structure is simple, and namely function machine only has simple instrument, mainly to be provided with function button equipment, that is, and function machine unintelligent device.
This system comprises smart machine 11 and function machine 12.Smart machine 11 comprises the first e-mail module 111 and the first transceiver module 112.Function machine 12 comprises the second e-mail module 121, second transceiver module 122 and prompting frame module 123.
First e-mail module 111 is for receiving new mail.
First transceiver module 112, for after the first e-mail module 111 receives new mail, sends new mail messages to the second transceiver module 122 by bluetooth emulation RS232 serial communication protocol.Wherein, new mail messages comprises mail data and the first E-mail instructions, and mail data comprises sender, theme, time, content, index value ID, addressee and the people that makes a copy for, and for considering the size of a mail, the content of mail is preferably content of text.Certainly, the content of mail also can be the audio or video that capacity is less.First E-mail instructions is for judging the mode of operation of user at smart machine, and mode of operation comprises new mail, and whether reading state and new mail delete state.
In the present embodiment, the data format of new mail messages is provided with recognition command, function machine ID, smart machine ID, check code, data type, data length and data.Wherein whether check code successfully sends new mail messages to function machine for detecting smart machine.Namely by the whether successful connection of check code authentication function machine and smart machine.
The new mail messages that second transceiver module 122 sends for receiving the first transceiver module 112, and parse the mail data of new mail and the state of new mail.
Reminding module 123 is for after the new mail messages that sends at reception first transceiver module 112, and ejecting prompting frame has new mail to point out user.
Second e-mail module 121 for preserving mail data, and shows the mode of operation of new mail.
Second transceiver module 122 is also for returning the second E-mail instructions to the first transceiver module 112, wherein the second E-mail instructions is for judging the mode of operation of user at function machine, and the second E-mail instructions is provided with recognition command, function machine ID, smart machine ID, check code, data type, data length and data.
The mode of operation of the first e-mail module 111 and the second e-mail module 121 simultaneous display new mail.
Specifically, the second e-mail module 121 shows user and reads new mail, and the first e-mail module 111 simultaneous display new mail reads.Second e-mail module 121 shows user of unread and gets new mail, and the first e-mail module 111 simultaneous display new mail does not read.Second e-mail module 121 shows user and deletes new mail, and the first e-mail module 111 simultaneous display new mail is deleted.
Certainly, in other embodiments, in order to consider that user can go back on one's word after deletion mail, when the second e-mail module 121 shows after user deletes new mail, show new mail at the first e-mail module 111 not delete, resend new mail to function machine by the first e-mail module 111, thus again keep the mode of operation of function machine and smart machine simultaneous display new mail.
In sum, the present invention receives new mail by smart machine; Smart machine, after receiving new mail, sends new mail messages to function machine by bluetooth emulation RS232 serial communication protocol; Function machine receives the new mail messages that smart machine sends, and parses the mail data of new mail and the state of new mail; Function machine preserves mail data, and shows the mode of operation of new mail, and returns the second E-mail instructions to smart machine; The mode of operation of function machine and smart machine simultaneous display new mail.By the way, function machine of the present invention and smart machine can the modes of operation of simultaneous display new mail, and it is easy to operate, effectively promotes the experience of user.In addition, due to the mode of operation of function machine and smart machine simultaneous display mail, user can substitute smart machine operation mail by using function machine, can utilize the low energy consumption of function machine, Low emissivity and small and exquisite maneuverable feature, greatly promote the experience of user.
The foregoing is only embodiments of the present invention; not thereby the scope of the claims of the present invention is limited; every utilize specification of the present invention and accompanying drawing content to do equivalent structure or equivalent flow process conversion; or be directly or indirectly used in other relevant technical fields, be all in like manner included in scope of patent protection of the present invention.