Summary of the invention
Based on above-mentioned situation, the present invention proposes a kind of terminal data synchro system and method, so that task data can synchronize at different terminals.
A kind of terminal data synchro system, including back-end server and two or more terminal,
Described terminal, receives user and logs in, and sends certification request to described back-end server;
Described back-end server, receives described certification request and active user is authenticated, and after certification is passed through, by the task that is not fully complete being director with active user, and described abortive last execution terminal sends to described terminal;
Described terminal, receives the selection of active user, it is determined that described in task that to be not fully complete in task this terminal pending; The task that this terminal is pending is carried out identification, it is judged that it finally performs whether terminal is this terminal, if this terminal, then keep the pending task of this terminal constant in the service data of this terminal; If non-terminal, then send to described back-end server wake that this task finally performs terminal up wake notice up;
Described back-end server, after waking notice up described in receiving, judge that the pending task of described terminal finally performs the current state of terminal, if current state is off-line and upper subnormal exits, then by the service data of pending for described terminal task at the final updating time feedbacking of book server to described terminal; If current state is for improper exiting online or last time, then finally performs terminal to this and send instruction and obtain the up-to-date service data of this task, and by the final updating time feedbacking of this up-to-date service data to described terminal;
Described terminal, the final updating time of the service data of the pending task of this terminal fed back by described back-end server, compares in the final updating time of this terminal with the service data of this task; If the final updating time fed back than described back-end server in the final updating time of this terminal updates, then keep the pending task of this terminal constant in the service data of this terminal; If the final updating time of described back-end server feedback updated than the final updating time in this terminal, or the pending task of this terminal does not have service data in this terminal, then to the service data that the request of described back-end server is up-to-date, receive the up-to-date service data of described back-end server return and update to this terminal.
A kind of terminal data synchronous method, including step:
When user's registration terminal and by, after the certification of back-end server, obtaining the task that is not fully complete being director with active user and described abortive last execution terminal from described back-end server;
Receive the selection of active user, it is determined that described in task that to be not fully complete in task present terminal pending;
The task that present terminal is pending is carried out identification, it is judged that it finally performs whether terminal is present terminal;
If the last terminal that performs of the pending task of present terminal is present terminal, then keep the pending task of present terminal constant in the service data of present terminal;
If the last terminal that performs of the pending task of present terminal is non-present terminal, then judge the last current state performing terminal of the pending task of present terminal, if current state is off-line and upper subnormal exits, then obtain the final updating time of these task run data from back-end server; If current state is for improper exiting online or last time, then finally performs terminal from this and obtain up-to-date service data and the final updating time of this task, and up-to-date service data is uploaded to back-end server;
The final updating time of acquisition is compared in the final updating time of present terminal with the service data of the pending task of present terminal;
If the service data of the pending task of present terminal updated than the final updating time obtained in the final updating time of present terminal, then keep the pending task of present terminal constant in the service data of present terminal;
If the service data of the final updating time task more pending than present terminal obtained updated in the final updating time of present terminal, then obtain the up-to-date service data of this task from back-end server and update to present terminal.
Terminal data synchro system of the present invention and method, being not fully complete of task and related data can be uploaded to back-end server by terminal, make user when converting terminal, it is possible to from back-end server, being not fully complete of task and task related data to be synchronized to present terminal, and continues executing with. So, user performs task not by the restriction of terminal, and the task of improve completes efficiency.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearly understand, below in conjunction with drawings and Examples, the present invention is described in further detail. Should be appreciated that detailed description of the invention described herein is only in order to explain the present invention, does not limit protection scope of the present invention.
Fig. 1 is the structural representation of terminal data synchro system of the present invention, it can be seen that native system includes the terminal of 1 back-end server and 2 or more than 2. Each terminal keeps communicating with back-end server each through wired or wireless network, and each use can log in each terminal of use per family. Back-end server management field operating systems assignment database, task data comprises mission bit stream and task run data. Mission bit stream all comprises clear and definite person liable, corresponding with the terminal use downloading this task. Mission bit stream all comprises unique mark (ID) to distinguish over other tasks. Mission bit stream comprises description task run data and finally performs the information of terminal. Mission bit stream also comprises the details to task definition, mission requirements and tasks carrying standard. Task run data are many data that task produces in the process of implementation, wherein also comprise and uniquely identify the data uniquely identified to distinguish over other tasks that (ID) is consistent with mission bit stream. Task run data contain final updating time record, with year, month, day, hour, minute, second represents. Terminal has unique mark (TID) to distinguish over other-end equipment. Terminal opens one piece of memory space for each login user, in order to preserve user-dependent mission bit stream and task run data.
User is after terminal logs in, and whether terminal periodic polling exists back-end server is assigned to the task of user, if it is, carry out task download immediately and be saved in local user storage space, otherwise waits for performing poll next time. User is using terminal to perform in the process of task, the task run data of generation, as: the records such as the table meter table code value made a copy of, the power distribution room of tour, will first be stored in local terminal, back-end server can be upload the data under following scene:
Data to time-sensitive, as emphasis examines time point data, will upload immediately after typing;
After tasks carrying completes, data will be uploaded;
Arrive the timing node regularly uploading data, as task run data are uploaded on backstage for 15 minutes;
If user normally logs off, all task run data do not uploaded all will be uploaded immediately.
After task run data are uploaded onto the server, the task run data final updating time in server immediate updating assignment database, it is that data upload place terminal that the task in mission bit stream that simultaneously arranges finally performs terminal.
After user logs in certain terminal of terminal data synchro system of the present invention, the terminal of native system and the workflow of back-end server are as follows:
Described terminal, receives user and logs in, and sends certification request to described back-end server;
Described back-end server, receives described certification request and active user is authenticated, and after certification is passed through, by the task that is not fully complete being director with active user, and described abortive last execution terminal sends to described terminal. Herein, it is possible to be only abortive ID and the last TID performing terminal is sent to described terminal.
Described terminal, receives the selection of active user, it is determined that described in task that to be not fully complete in task this terminal pending; The task that this terminal is pending is carried out identification, it is judged that it finally performs whether terminal is this terminal, if this terminal, then keep the pending task of this terminal constant in the service data of this terminal; If non-terminal, then send to described back-end server wake that this task finally performs terminal up wake notice up.
Described back-end server, after waking notice up described in receiving, judge that the pending task of described terminal finally performs the current state of terminal, if current state is off-line and upper subnormal exits, then by the service data of pending for described terminal task at the final updating time feedbacking of book server to described terminal; If current state is for improper exiting online or last time, then finally performs terminal to this and send instruction and obtain the up-to-date service data of this task, and by the final updating time feedbacking of this up-to-date service data to described terminal.
Described terminal, the final updating time of the service data of the pending task of this terminal fed back by described back-end server, compares in the final updating time of this terminal with the service data of this task; If the final updating time fed back than described back-end server in the final updating time of this terminal updates, then keep the pending task of this terminal constant in the service data of this terminal; If the final updating time of described back-end server feedback updated than the final updating time in this terminal, or the pending task of this terminal does not have service data in this terminal, then to the service data that the request of described back-end server is up-to-date, receive the up-to-date service data of described back-end server return and update to this terminal.
As a preferred embodiment, the up-to-date service data of described terminal request is sent to described terminal by described back-end server, also the last terminal that performs of task corresponding for this up-to-date service data is set to described terminal. Described terminal also will be responsible for the local task of artificial non-present user and removes, in order to avoid perform by mistake.
The work process of terminal and back-end server is carried out combing, obtains the schematic flow sheet of the user registration terminal A shown in Fig. 2, wherein comprise the steps of
Step 201, user log at terminal A;
Step 202, back-end server receive user's logging request, after normal user authentication, all are not fully complete task ID and the last terminal that performs uniquely identifies TID and returns to terminal A by what be director with user;
Step 203, user select to wish in locally executing of task in the task list obtained from step 202;
Step 204, terminal A carry out identification one by one for mission bit stream user-selected in step 203, if the last terminal that performs of task is terminal A, then perform 205, if it is not, then perform 206;
The local task run data of step 205, terminal A reservation are not done and are changed;
Step 206, back-end server receive the terminal A request for the up-to-date service data of appointed task, the last terminal that performs of these tasks is not A, waking the former execution terminal of task up by remote command immediately, former execution terminal uploads up-to-date service data immediately to background server;
Step 207, back-end server are by the final updating time feedbacking of up-to-date service data to terminal A;
The final updating time of the up-to-date service data that step 208, terminal A obtain according to step 207 compares in the local final updating time with this task, if the renewal time returned updates, then perform 209, if the renewal time of this locality updates, then perform 205;
Step 209, according to the task of needing to update service data obtained in step 208, the backend service device complete task run data of request, receive and update local data base;
The last terminal that performs of the mission bit stream related in step 209 and step 205 is set to terminal A by step 210, server;
Step 211, for be not included in step 202 return the local task being not fully complete in task list, will perform this locality remove;
Step 212, user log in and terminate.
Fig. 3 is that back-end server wakes terminal flow chart up, wherein comprises the steps of
Step 301, back-end server judge this terminal whether off-line and upper subnormal exit, if present offline and normally exiting, task run data will be updated in a timely manner, then perform 305, if improper exited online or last time, then perform 302;
Step 302, back-end server send command request terminal and submit up-to-date task run data to;
After step 303, terminal receive the instruction that back-end server is sent, the task run data that retrieval this locality is not yet submitted to, submit data to after setting up the network channel with back-end server simultaneously;
Step 304, back-end server are saved in the final updating time of system database task run data after receiving the up-to-date task run data that terminal is submitted to;
Step 305, wake terminal procedures up and terminate.
Fig. 4 is that back-end server updates terminal data flow process figure, wherein comprises the steps of
The final updating time of task ID and service data thereof is sent to terminal by step 401, back-end server;
After step 402, terminal receive the data transmitted in step 401, in local retrieval tasks and service data final updating time thereof, and the final updating time that final updating time and back-end server transmit is contrasted;
Step 403, in the contrast of step 402, if it find that the task run data final updating time that back-end server is sent is newer, then perform 404, if it find that the local task run data final updating time is old unlike the final updating time that back-end server is sent, then perform 405;
The request of data of the up-to-date task run data for a certain task initiated by step 404, terminal backend service device, updates the task run data of this locality after receiving the data of return;
Step 405, whole terminal data more new technological process terminate.
Terminal data synchronous method of the present invention, as it is shown in figure 5, include step:
Step S501, when user's registration terminal and by, after the certification of back-end server, obtaining the task that is not fully complete being director with active user and described abortive last execution terminal from described back-end server;
Step S502, receive the selection of active user, it is determined that described in task that to be not fully complete in task present terminal pending;
Step S503, the task that present terminal is pending is carried out identification, it is judged that it finally performs whether terminal is present terminal;
If the last terminal that performs of the pending task of step S504 present terminal is present terminal, then keep the pending task of present terminal constant in the service data of present terminal;
If the last terminal that performs of the pending task of step S505 present terminal is non-present terminal, then judge the last current state performing terminal of the pending task of present terminal;
If step S506 current state is off-line and upper subnormal exits, then obtain the final updating time of these task run data from back-end server;
If step S507 current state is for improper exiting online or last time, then finally performs terminal from this and obtain up-to-date service data and the final updating time of this task, and up-to-date service data is uploaded to back-end server;
Step S508, the service data of the pending task of final updating time and present terminal of acquisition was compared in the final updating time of present terminal;
If the service data of the pending task of step S509 present terminal updated than the final updating time obtained in the final updating time of present terminal, then keep the pending task of present terminal constant in the service data of present terminal;
If the service data of the final updating time task more pending than present terminal that step S500 obtains updated in the final updating time of present terminal, then obtain the up-to-date service data of this task from back-end server and update to present terminal.
As a preferred embodiment, if the last terminal that performs of the pending task of present terminal is non-present terminal, the last terminal that performs of this task can also be set to present terminal by this method.
As a preferred embodiment, this method can also include step: to the local task being responsible for artificial non-present user, removes from present terminal.
Adopt terminal data synchro system and the method for the present invention, user logs in from any terminal, its being not fully complete of task will be synchronized to this terminal, so that this user continues executing with task on the terminal, without returning to former terminal, save the time, improve efficiency, facilitate user, be conducive to being rapidly completed of task.
Embodiment described above only have expressed the several embodiments of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention. It should be pointed out that, for the person of ordinary skill of the art, without departing from the inventive concept of the premise, it is also possible to making some deformation and improvement, these broadly fall into protection scope of the present invention. Therefore, the protection domain of patent of the present invention should be as the criterion with claims.