CN105791401A - Data interaction method and system of client and server in online and offline states - Google Patents

Data interaction method and system of client and server in online and offline states Download PDF

Info

Publication number
CN105791401A
CN105791401A CN201610115320.0A CN201610115320A CN105791401A CN 105791401 A CN105791401 A CN 105791401A CN 201610115320 A CN201610115320 A CN 201610115320A CN 105791401 A CN105791401 A CN 105791401A
Authority
CN
China
Prior art keywords
data
client
service end
net
interaction
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201610115320.0A
Other languages
Chinese (zh)
Other versions
CN105791401B (en
Inventor
张君
张明轩
张玺
张红霞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Individual
Original Assignee
Individual
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Individual filed Critical Individual
Priority to CN201610115320.0A priority Critical patent/CN105791401B/en
Priority to CN201910742273.6A priority patent/CN110557441B/en
Priority to CN201910742274.0A priority patent/CN110572437A/en
Publication of CN105791401A publication Critical patent/CN105791401A/en
Application granted granted Critical
Publication of CN105791401B publication Critical patent/CN105791401B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/54Presence management, e.g. monitoring or registration for receipt of user log-on information, or the connection status of the users

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The invention discloses a data interaction method and system of a client and a server in online and offline states. The system comprises the client which is used for storing data locally when the data is generated online, initiates a request to the server, obtaining version difference data returned by the server, storing the data locally, storing data generated this time locally when the data is generated offline, combining the data generated offline last time and the data operated online this time when the client is in the online state, and uploading the combined data to the server; and the server which is used for receiving the data sent by the client synchronously when the client is online, and returning the version difference data to the client. Dynamic codes for generating version differences are generated at the server. When data synchronization is carried out through data interaction in the online and offline states of the client, manual synchronization is unnecessary. When the client accesses a network, the synchronization data interaction can be automatically carried. Data synchronization timeliness and accuracy of sharing the data synchronously by many people are ensured.

Description

Client and service end data interactive method, system under net with off-network state
Technical field
The present invention relates to data communication field, particularly to client and service end data interactive method, system under net with off-network state.
Background technology
The data interaction under net off-network state of like product in the market is more the method for synchronization using and actively being initiated data upload requests by user, because the synchronization of user data is actively clicked upload button and uploaded by user, data sharing between multi-user, data query accuracy can be produced impact.After logging data under user's A off-network state, under net state and do not click on upload button, then user B cannot check the user A data produced before user A clicks upload button.
The data that existing close product off-network produces are to utilize the artificial mode clicking corresponding function button to carry out data syn-chronization, the method of synchronization of this artificial initiation can cause data syn-chronization promptness poor, and many people use simultaneously cannot provide the problems such as accuracy during a sets of data timely for shared data.
Summary of the invention
The technical problem to be solved in the present invention is, client data interaction under net, off-network state is when carrying out data syn-chronization, without manual synchronization, only can automatically carry out synchronous data interaction when accessing network, it is ensured that the promptness of data syn-chronization and many people share the accuracy of data simultaneously.
Solve above-mentioned technical problem, the invention provides a kind of client and the service end data interaction system under net with off-network state, including:
At least one client, in order to when data produce at net, to store data to local, and to initiate request to service end, it is thus achieved that the difference in version data that service end returns, and to store in this locality;
When data off-network produces, the data of this generation are stored to local, when client is presented on net state, the data that last time, off-network produced are uploaded to service end with this after the data of net operation merge;
One service end, in order in described client when net, receive data that client synchronization sends and return difference in version data to client;And generate the dynamic coding in order to generate difference in version in service end.
Further, automatically obtained the data do not uploaded by described client and upload to service end again.
Further, automatically obtain the method for the data do not uploaded particularly as follows:
When 3-1) client single uploads data, service end is the unified version numbers of these all data genaration uploaded, and mails to client by response;
3-2) version number is recorded in the relevant position of source of client data by client, and the mark that this client has been uploaded data changes into and uploading;
Version number stored in this client need to be transferred to service end with the data that need to upload by request when 3-3) uploading data after client again;
If 3-4) client is new clothes, upload version number is 0, after service end receives request, submits the data of version number to more than this by searching in data source and generates new version number, as the response data of service end;
After 3-5) data are responsive to client, version number is stored in the data source of client by client, and the synchrodata of response is persisted to this locality after treatment, and the mark of uploading that this has uploaded data is set to and uploads.
Further, the generation method of described difference in version data is,
By creating versions of data number in service end, and correspond to variance data according to versions of data number and obtain difference in version data,
And according to described difference in version data, the data of each client are synchronized or shared.
Further, user manually operates and updates in client trigger data.
Further, described client includes,
Client interaction data processing module, described client interaction data processing module is in order to send to service end after being packed by interaction data;
Service automatically processes module, and described Service automatically processes module in order to automatically obtain data when client is under net state, and is connected with client interaction data processing module and carries out data syn-chronization;Service automatically processes module and includes but not limited to, Service under Android environment, and usual Service is used for performing some time-consuming operations, or backstage performs not provide the operation of User Interface, for instance: download.It is BackgroundTransferService under iOS environment, the background transfer services (BackgroundTransferService) in such as iOS7 multitasking.The function of the processing module of this function is provided by various systems, belongs to system method for packing, and developer is only used by interface.
At net judge module, described at net judge module in order to confirm the network state of client when carrying out data interaction.Further, described service end includes,
Server interaction data processing module, described server interaction data processing module is in order to receive the data of described client transmission and to return data to client;
Data processing module, described data processing module is in order to data obtained in processing server interaction data processing module;
Dynamic coding generation module, described dynamic coding generation module, in order to obtain dynamic coding, is uploaded data validation version number according to described dynamic coding for this, and is issued in this client uploading data.
Based on said system, present invention also offers client and the service end data interactive method under net with off-network state, including,
Trigger data update, the system api interface provided by various different operating systems judge client at net state.Various different operating systems all can provide corresponding api interface, and developer only needs to call api interface and whether known network connects normal.
When data off-network produces, then variance data is labeled as after not uploading and stores to local client;
When data produce at net, then send variance data to service end to interact, generate dynamic coding according to described variance data in service end, take out more than the data of this dynamic coding according to described dynamic coding, return the described data more than this dynamic coding to client by described server;
It is stored in described in the local data base of client more than the data of this dynamic coding and the above-mentioned variance data do not uploaded, and is designated and uploads.
Whether, further, when data off-network produces, described client automatically obtains the data do not uploaded, and inquire about in the data base of described service end and upload, and the data do not uploaded is uploaded onto the server.
Further, generating the method for dynamic coding particularly as follows: dynamic coding is version number according to described variance data in service end, service end need to ensure that sequence is ascending numerical when generating, and has ensured that service end is easier to judge.The generating mode of dynamic coding can with multiple.Such as, the mode of millisecond number+short Serial No. is adopted;The mode etc. of the service number of starts+long Serial No. can also be adopted.
Beneficial effects of the present invention:
1) due in the client and service end data interaction system under net with off-network state of the present invention, by client, when data produce at net, data are stored to local, and initiate request to service end, it is thus achieved that the difference in version data that service end returns, and store in this locality;Ensure that data produce at net channel;It addition, when data off-network produces, store the data of this generation to local, when client is presented on net state, the data that last time, off-network produced are uploaded to service end with this after the data of net operation merge;Ensure that the off-network channel that data produce.
2) due in the data interaction system under net with off-network state of client and the service end in the present invention, service end, in order in described client when net, receive data that client synchronization sends and return difference in version data to client;And generate the dynamic coding in order to generate difference in version in service end.By described service end, become apparent from the synchronization of differentiation, utilize each client of version number control that service end creates to need the data synchronizing, sharing, it is to avoid the mass data that when single is mutual, all data produce causes the problem that communication process is excessively slow.
3) due in described client, automatically obtained the data do not uploaded by described client and upload to service end again, or automatically obtain, by the service of your client, the data do not uploaded and upload onto the server, achieve the synchronization of versions of data more quickly.
Accompanying drawing explanation
Fig. 1 is the client in one embodiment of the invention and service end data interaction system structural representation under net with off-network state.
Fig. 2 is the mutual sequential chart in Fig. 1.
The client that utilizes that Fig. 3 is in Fig. 1 carries out the embodiment schematic diagram synchronized to service end.
Fig. 4 is the method flow schematic diagram automatically obtaining the data do not uploaded in Fig. 3.
Fig. 5 is the generation method schematic diagram of the client in Fig. 1 and service end difference in version data.
Fig. 6 is the client internal structure schematic diagram in Fig. 1.
Fig. 7 is the service end internal structure schematic diagram in Fig. 1.
Fig. 8 is the client in one embodiment of the invention and service end data interactive method schematic flow sheet under net with off-network state.
Fig. 9 is in conjunction with service end and client, the data interactive method schematic flow sheet under net with off-network state in one embodiment of the present invention.
Figure 10 is the client in one embodiment of the present invention and service end data interaction system structural representation under net with off-network state.
Detailed description of the invention
For making the object, technical solutions and advantages of the present invention clearly understand, below in conjunction with specific embodiment, and with reference to accompanying drawing, the present invention is described in more detail.
Fig. 1 is the client in one embodiment of the invention and service end data interaction system structural representation under net with off-network state.
In the present embodiment, including service end 100 and client 101, wherein service end 100 is set to one, in order to set up alternately with described client 101, described include alternately the synchronization of versions of data, data share, the inquiry of data.Skilled person can understand, client 101 can include multiple, in order to provide the access port with service end data syn-chronization to the user of different demands.
Fig. 2 is the mutual sequential chart in Fig. 1.
In the present embodiment, including service end 100 and client 101, carry out sequential in accordance with the following steps mutual:
Client and the service end data interaction system under net with off-network state, including:
At least one client 101, in order to when data produce at net, to store data to local, and to initiate request to service end, it is thus achieved that the difference in version data that service end returns, and to store in this locality;
When data off-network produces, the data of this generation are stored to local, when client is presented on net state, the data that last time, off-network produced are uploaded to service end with this after the data of net operation merge;
One service end 100, in order in described client when net, receive data that client synchronization sends and return difference in version data to client;And generate the dynamic coding in order to generate difference in version in service end.
In described client 101, operate as step S101, when data produce at net, data stored to local, netlist be shown as mobile phone at net, computer in net and other terminal at net, i.e. the situation of incoming communication network.When data produce at net, it is necessary to data are stored to local.
Request is initiated to service end 100, obtain the difference in version data that service end returns, and store in this locality, difference in version according to data, the data uploaded are carried out matching ratio relatively, obtain difference in version data, then the data obtained from service end 100 are stored in client 101, complete the data syn-chronization when net.
Then, carry out step S102 in client 101, when data off-network produces, the data of this generation are stored to local, when client is presented on net state, the data that last time, off-network produced are uploaded to service end with this after the data of net operation merge.Data off-network produced in client 101 store to local, wait that client 101 accesses network again.Once detect that described client 101 is presented on net state, that produce time then by last off-network and locally stored data merge with these data produced when net operation after together be uploaded to service end 100, and then achieve data syn-chronization quick, automatic.
In service end 100, carry out step S103, in described client when net, receive data that client synchronization sends and return difference in version data to client;And generate the dynamic coding in order to generate difference in version in service end.When described client is when net, service end 100 receives the data of client 101 synchronized transmission, then returning again to difference in version data to client, the sequence generated in described service end 100 is incremental numeral, so can ensure that service end 100 is easier to judge.Such as, the mode of a millisecond number+short Serial No. can be adopted.
The client that utilizes that Fig. 3 is in Fig. 1 carries out the embodiment schematic diagram synchronized to service end.
In the present embodiment, the step carrying out synchronizing is, automatically obtains, by the service in described client 101, the data do not uploaded and uploads to service end 100 again.Service under Android environment, usual Service are used for performing some time-consuming operations, or backstage performs not provide the operation of User Interface, for instance: download, upload.Start Service and can include two ways, as, calling startService () method Anywhere in same application and just can start Service, then system can adjust back onCreate () and the onStart () method of Service class.The Service started by the way can operate in backstage always, until Context.stopService () or selfStop () method are called.Another mode, such as bindService () method, this Service with call the customer class of Service and tie up, if it is destroyed to call this customer class, Service also can be destroyed.
Background transfer services (BackgroundTransferService) it addition, be BackgroundTransferService under iOS environment, in such as iOS7 multitasking.The function of the processing module of this function is provided by various systems, belongs to system method for packing, and developer is only used by interface.
Or, in described client 101, user manually operates and updates in client trigger data, such as use, under the A off-network state of family after logging data, under net state and do not click on upload button, then user B cannot check the user A data produced before user A clicks upload button, it is necessary to manually the Service of operation or client carries out synchrodata.
Fig. 4 is the method flow schematic diagram automatically obtaining the data do not uploaded in Fig. 3.
When data off-network produces, the data of this generation are stored to local, when client is presented on net state, the data that last time, off-network produced are uploaded to service end with this after the data of net operation merge.In the present embodiment, automatically obtain the method for the data do not uploaded described in particularly as follows:
When step S201 client single uploads data, service end is the unified version numbers of these all data genaration uploaded, and mails to client by response;Single for client is uploaded, and carries out unifying the management of version number.
Version number is recorded in the relevant position of source of client data by step S202 client, and the mark that this client has been uploaded data changes into and uploading, and single uploads end first.In the present embodiment, in source of client data can be some table of data base herein.
Version number stored in this client need to be transferred to service end with the data that need to upload by request when uploading data after step S203 client again;Described version number stored in client does not update, so needing to transfer to service end to process with needing the data uploaded by the mode asked version number.
If step S204 client is new clothes, upload version number is 0, after service end receives request, submits the data of version number to more than this by searching in data source and generates new version number, as the response data of service end;Version number in described step S203 is judged, more than the new version number that namely data of this submission version number update afterwards, as the response data of service end.
After step S205 data are responsive to client, version number is stored in the data source of client by client, and the synchrodata of response is persisted to this locality after treatment, and the mark of uploading that this has uploaded data is set to and uploads.In described client, new version number is stored, the data that service end response synchronizes are preserved to local, and the data this uploaded are uploaded mark and are set to upload.
Fig. 5 is the generation method schematic diagram of the client in Fig. 1 and service end difference in version data.
In the present embodiment, the difference in version data between described service end 100 and client 101 generation method particularly as follows:
In described service end 100, it is operated step S401, by creating versions of data number in service end, and corresponds to variance data according to versions of data number and obtain difference in version data.
Or, in described service end 100, it is operated step S402, according to described difference in version data, the data of each client is synchronized or shared.
Fig. 6 is the client internal structure schematic diagram in Fig. 1.
Preferred as in the present embodiment, client includes, and client interaction data processing module 1011, Service automatically process module 1012, at net judge module 1013.
Client interaction data processing module 1011, described client interaction data processing module 1011 is in order to send to service end after being packed by interaction data;Described client interaction data processing module 1011 be additionally operable to receive described in net judge module 1013 in net or off-grid condition adjudgement situation.And send mutual data to described net judge module 1013.
Service automatically processes module 1012, and described Service automatically processes module 1012 in order to automatically obtain data when client is under net state, and is connected with client interaction data processing module and carries out data syn-chronization.Service under Android environment, usual Service are used for performing some time-consuming operations, or backstage performs not provide the operation of User Interface, for instance: download, upload.Background transfer services (BackgroundTransferService) it addition, be BackgroundTransferService under iOS environment, in such as iOS7 multitasking.The function of the processing module of this function is provided by various systems, belongs to system method for packing, and developer is only used by interface.Thus realizing synchronizing more efficiently, carry out manual synchronization without user every time.
At net judge module 1013, described at net judge module 1013 in order to confirm the network state of client when carrying out data interaction.Detect that client is when net when described at net judge module 1013, then will send to client interaction data processing module 1011 in net state information, owing to client interaction data processing module 1011 is connected with the server interaction data processing module in service end, it is possible to send after data are packed.When described client off-network detected at net judge module 1013 time, then will send to client interaction data processing module 1011 in net state information, then the data that off-network produces are directly locally stored by described client.At described net judge module 1013, when any-mode enters client interaction data processing module 1011, all require over this module and judge and confirm network state.
In described client 101, also include the corresponding data function in user's manual operation client, and then produce off-network or the data variation at net.
Fig. 7 is the service end internal structure schematic diagram in Fig. 1.
Preferred as in the present embodiment, service end 100 includes, server interaction data processing module 1001, data processing module 1002, dynamic coding generation module 1003.
Server interaction data processing module 1001, described server interaction data processing module 1001 is in order to receive the data of described client transmission and to return data to client;Also it is connected with the client interaction data processing module 1011 in client, carries out data interaction.
Data processing module 1002, described data processing module 1002 is in order to data obtained in processing server interaction data processing module;Specifically, the processing mode of interaction data is determined according to language and demand, such as to the process of field, query calls process etc. to data.
Dynamic coding generation module 1003, described dynamic coding generation module 1003, in order to obtain dynamic coding, is uploaded data validation version number according to described dynamic coding for this, and is issued in this client uploading data.Preferred as in the present embodiment, generates the method for dynamic coding specifically, dynamic coding is version number according to described variance data in service end, and service end need to ensure that sequence is ascending numerical when generating, and has ensured that service end is easier to judge.The generating mode of dynamic coding can with multiple, such as the mode of millisecond number+short Serial No. or;The mode etc. of the service number of starts+long Serial No..
Whether in the present embodiment, in service end 100, also including data base or file 1004, when data off-network produces, described client automatically obtains the data do not uploaded, and inquire about in the data base of described service end and upload, and the data do not uploaded is uploaded onto the server.
Fig. 8 is the client in one embodiment of the invention and service end data interactive method schematic flow sheet under net with off-network state.
Step S501, starts
Step S502 trigger data update, according in operating system provide system api interface, it is judged that client at net state;Such as, the api interface of UNICOM SGIP, the api interface of SMS;Judge client at net state.
Variance data when data off-network produces, is then labeled as after not uploading and stores to local client by step S503;During due to off-network, client with server synchronization, so needing discrepant for tool data markers for not upload, and cannot store to local client.
Step S504 is when data produce at net, then send variance data to service end to interact, generate dynamic coding according to described variance data in service end, access network in client, namely after net when data produce at net, then client sends variance data to service end and interacts.The method of calibration of variance data needs the dynamic coding generated according to variance data, i.e. versions of data number in service end.
Whether the dynamic coding that step S505 generates is more than this dynamic coding, it is however generally that, dynamic coding arranges to little order according to from big.
Step S506 takes out more than the data of this dynamic coding according to described dynamic coding, returns the described data more than this dynamic coding to client by described server;Obtaining dynamic coding in step S505 to take out more than the data of this dynamic coding, the data that namely version number is higher are updated, and by the return of described server more than the data of this dynamic coding to client.
Step S507 is stored in described in the local data base of client more than the data of this dynamic coding and the above-mentioned variance data do not uploaded, and is designated and uploads.Will be greater than in the data of dynamic coding and the locally stored data of the variance data do not uploaded, it is achieved that service end is to the synchronization of client, and data is all designated and uploads.
Fig. 9 is in conjunction with service end and client, the data interactive method schematic flow sheet under net with off-network state in one embodiment of the present invention.
Step S601 manually triggers, the corresponding data function in user's manual operation client, and then produces off-network or the data variation at net.
Step S602 produces data, owing to there being two kinds of channels when data produce, produces to produce with off-network at net.
Step S603 client, at net judge module, if so, then enters step S613, if it is not, then enter step S604;Such as, at net judge module 1013, described at net judge module 1013 in order to confirm the network state of client when carrying out data interaction.Detect that client is when net when described at net judge module 1013, then will send to client interaction data processing module 1011 in net state information, owing to client interaction data processing module 1011 is connected with the server interaction data processing module in service end, it is possible to send after data are packed.When described client off-network detected at net judge module 1013 time, then will send to client interaction data processing module 1011 in net state information, then the data that off-network produces are directly locally stored by described client.At described net judge module 1013, when any-mode enters client interaction data processing module 1011, all require over this module and judge and confirm network state.
Step S604 calls client data interactive module and sends data to service end, in order to when data produce at net, to store data to local, and to initiate request to service end, it is thus achieved that the difference in version data that service end returns, and to store in this locality;
Step S605 service end data interaction module receives data, and described data interaction module is server interaction data processing module 1001,
Step S606 stores data into service end data base,
Step S607 service end dynamic coding generation module, such as, dynamic coding generation module 1003, described dynamic coding generation module 1003 is in order to obtain dynamic coding, upload data validation version number according to described dynamic coding for this, and be issued in this client uploading data.Preferred as in the present embodiment, generates the method for dynamic coding specifically, dynamic coding is version number according to described variance data in service end, and service end need to ensure that sequence is ascending numerical when generating, and has ensured that service end is easier to judge.The generating mode of dynamic coding can with multiple, such as the mode of millisecond number+short Serial No. or;The mode etc. of the service number of starts+long Serial No..
Step S608 obtains the up dynamic coding of client and will be greater than the data taking-up of this dynamic coding,
Step S609 will take out data before and produce data summarization with dynamic coding,
Data are transferred to service end data interaction module to initiate response by step S610,
Step S611 client data interactive module receives response,
Server is returned data by step S612 and locally generated data are stored in local data base and are designated and upload and store data;Enter step S616;
If it is not, then enter step S613 by Data Identification for not upload and to store data;
The automatic trigger module of step S614 client service, such as, Service automatically processes module 1012, and described Service automatically processes module 1012 in order to automatically obtain data when client is under net state, and is connected with client interaction data processing module and carries out data syn-chronization.Service under Android environment, usual Service are used for performing some time-consuming operations, or backstage performs not provide the operation of User Interface, for instance: download, upload.Background transfer services (BackgroundTransferService) it addition, be BackgroundTransferService under iOS environment, in such as iOS7 multitasking.The function of the processing module of this function is provided by various systems, belongs to system method for packing, and developer is only used by interface.Thus realizing synchronizing more efficiently, carry out manual synchronization without user every time.
Step S615 inquires about the data that data base does not upload, and is not namely labeled as the data uploaded.
Step S616 source of client data, described step S616 source of client data enters step S604.
Owing to there being two kinds of channels when data produce, produce to produce with off-network at net.When net produces, directly will initiate request to service end except locally stored, and obtain the difference in version data that service end returns, be stored in locally stored unit.When off-network produces, locally stored, when client is presented on net state, the data that last time, off-network produced can merge this and produce to upload together in the data of net operation, or automatically obtain, by the service of client, the data do not uploaded and upload onto the server.
Figure 10 is the client in one embodiment of the present invention and service end data interaction system structural representation under net with off-network state.
Include in service end 100, server interaction data processing module 1001, data processing module 1002, dynamic coding generation module 1003.
Server interaction data processing module 1001, described server interaction data processing module 1001 is in order to receive the data of described client transmission and to return data to client;Also it is connected with the client interaction data processing module 1011 in client, carries out data interaction.
Data processing module 1002, described data processing module 1002 is in order to data obtained in processing server interaction data processing module;
Dynamic coding generation module 1003, described dynamic coding generation module 1003, in order to obtain dynamic coding, is uploaded data validation version number according to described dynamic coding for this, and is issued in this client uploading data.Preferred as in the present embodiment, generates the method for dynamic coding specifically, dynamic coding is version number according to described variance data in service end, and service end need to ensure that sequence is ascending numerical when generating, and has ensured that service end is easier to judge.The generating mode of dynamic coding can with multiple, such as the mode of millisecond number+short Serial No. or;The mode etc. of the service number of starts+long Serial No..It is mainly used in obtaining dynamic coding, uploads data validation version number for this, and be issued to this client uploading data.
Client interaction data processing module 1011 by described server interaction data processing module 1001 with client, it is achieved data interaction.
Including in client, client interaction data processing module 1011, Service automatically process module 1012, at net judge module 1013.
Client interaction data processing module 1011, described client interaction data processing module 1011 is in order to send to service end after being packed by interaction data;Described client interaction data processing module 1011 be additionally operable to receive described in net judge module 1013 in net or off-grid condition adjudgement situation.And send mutual data to described net judge module 1013.
Service automatically processes module 1012, and described Service automatically processes module 1012 in order to automatically obtain data when client is under net state, and is connected with client interaction data processing module and carries out data syn-chronization.Service under Android environment, usual Service are used for performing some time-consuming operations, or backstage performs not provide the operation of User Interface, for instance: download, upload.Background transfer services (BackgroundTransferService) it addition, be BackgroundTransferService under iOS environment, in such as iOS7 multitasking.The function of the processing module of this function is provided by various systems, belongs to system method for packing, and developer is only used by interface.Thus realizing synchronizing more efficiently, carry out manual synchronization without user every time.
At net judge module 1013, described at net judge module 1013 in order to confirm the network state of client when carrying out data interaction.Detect that client is when net when described at net judge module 1013, then will send to client interaction data processing module 1011 in net state information, owing to client interaction data processing module 1011 is connected with the server interaction data processing module in service end, it is possible to send after data are packed.When described client off-network detected at net judge module 1013 time, then will send to client interaction data processing module 1011 in net state information, then the data that off-network produces are directly locally stored by described client.At described net judge module 1013, when any-mode enters client interaction data processing module 1011, all require over this module and judge and confirm network state.
Those of ordinary skill in the field it is understood that more than; described be only specific embodiments of the invention, be not limited to the present invention, all within the spirit and principles in the present invention; any amendment of being made, equivalent replacement, improvement etc., should be included within protection scope of the present invention.

Claims (10)

1. client and the service end data interaction system under net with off-network state, it is characterised in that including:
At least one client, in order to when data produce at net, to store data to local, and to initiate request to service end, it is thus achieved that the difference in version data that service end returns, and to store in this locality;
When data off-network produces, the data of this generation are stored to local, when client is presented on net state, the data that last time, off-network produced are uploaded to service end with this after the data of net operation merge;
One service end, in order in described client when net, receive data that client synchronization sends and return difference in version data to client;And generate the dynamic coding in order to generate difference in version in service end.
2. data interaction system according to claim 1, it is characterised in that automatically obtained the data do not uploaded by described client service and upload to service end again.
3. data interaction system according to claim 2, it is characterised in that automatically obtain the method for the data do not uploaded particularly as follows:
When 3-1) client single uploads data, service end is the unified version numbers of these all data genaration uploaded, and mails to client by response;
3-2) version number is recorded in the relevant position of source of client data by client, and the mark that this client has been uploaded data changes into and uploading;
Version number stored in this client need to be transferred to service end with the data that need to upload by request when 3-3) uploading data after client again;
If 3-4) client is new clothes, upload version number is 0, after service end receives request, submits the data of version number to more than this by searching in data source and generates new version number, as the response data of service end;
After 3-5) data are responsive to client, version number is stored in the data source of client by client, and the synchrodata of response is persisted to this locality after treatment, and the mark of uploading that this has uploaded data is set to and uploads.
4. data interaction system according to claim 1, it is characterised in that the generation method of described difference in version data is,
By creating versions of data number in service end, and correspond to variance data according to versions of data number and obtain difference in version data,
And according to described difference in version data, the data of each client are synchronized or shared.
5. data interaction system according to claim 1, it is characterised in that user manually operates and updates in client trigger data.
6. data interaction system according to claim 1, it is characterised in that described client includes,
Client interaction data processing module, described client interaction data processing module is in order to send to service end after being packed by interaction data;
Service automatically processes module, and described Service automatically processes module in order to automatically obtain data when client is under net state, and is connected with client interaction data processing module and carries out data syn-chronization;
At net judge module, described at net judge module in order to confirm the network state of client when carrying out data interaction.
7. data interaction system according to claim 1, it is characterised in that described service end includes,
Server interaction data processing module, described server interaction data processing module is in order to receive the data of described client transmission and to return data to client;
Data processing module, described data processing module is in order to data obtained in processing server interaction data processing module;
Dynamic coding generation module, described dynamic coding generation module, in order to obtain dynamic coding, is uploaded data validation version number according to described dynamic coding for this, and is issued in this client uploading data.
8. client and the service end data interactive method under net with off-network state, it is characterised in that include,
Trigger data update, according in operating system provide system api interface, it is judged that client at net state;
When data off-network produces, then variance data is labeled as after not uploading and stores to local client;
When data produce at net, then send variance data to service end to interact, generate dynamic coding according to described variance data in service end, take out more than the data of this dynamic coding according to described dynamic coding, return the described data more than this dynamic coding to client by described server;
It is stored in described in the local data base of client more than the data of this dynamic coding and the above-mentioned variance data do not uploaded, and is designated and uploads.
9. data interactive method according to claim 8, it is characterised in that when data off-network produces, whether described client automatically obtains the data do not uploaded, and inquire about in the data base of described service end and upload, and the data do not uploaded is uploaded onto the server.
10. data interactive method according to claim 8, it is characterised in that according to described variance data service end generate dynamic coding method specifically, millisecond number+short Serial No. mode or service the number of starts+long Serial No. mode.
CN201610115320.0A 2016-03-01 2016-03-01 Client and server-side data interactive method, system under net and off-network state Active CN105791401B (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201610115320.0A CN105791401B (en) 2016-03-01 2016-03-01 Client and server-side data interactive method, system under net and off-network state
CN201910742273.6A CN110557441B (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states
CN201910742274.0A CN110572437A (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610115320.0A CN105791401B (en) 2016-03-01 2016-03-01 Client and server-side data interactive method, system under net and off-network state

Related Child Applications (2)

Application Number Title Priority Date Filing Date
CN201910742274.0A Division CN110572437A (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states
CN201910742273.6A Division CN110557441B (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states

Publications (2)

Publication Number Publication Date
CN105791401A true CN105791401A (en) 2016-07-20
CN105791401B CN105791401B (en) 2019-09-20

Family

ID=56386802

Family Applications (3)

Application Number Title Priority Date Filing Date
CN201610115320.0A Active CN105791401B (en) 2016-03-01 2016-03-01 Client and server-side data interactive method, system under net and off-network state
CN201910742273.6A Active CN110557441B (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states
CN201910742274.0A Pending CN110572437A (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states

Family Applications After (2)

Application Number Title Priority Date Filing Date
CN201910742273.6A Active CN110557441B (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states
CN201910742274.0A Pending CN110572437A (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states

Country Status (1)

Country Link
CN (3) CN105791401B (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106355358A (en) * 2016-10-21 2017-01-25 用友网络科技股份有限公司 Data manipulation method with double modes in mobile ERP system and ERP system
CN109361767A (en) * 2018-12-06 2019-02-19 苏州思必驰信息科技有限公司 Optimize server-side, client process method and the server of client data display error, be able to carry out the client that data are shown
CN111769800A (en) * 2020-03-19 2020-10-13 尚特杰电力科技有限公司 Data processing mechanism of photovoltaic power station data acquisition unit under off-grid state
CN112905553A (en) * 2021-02-07 2021-06-04 全链通有限公司 Data sharing method, device and system based on block chain
CN113762890A (en) * 2021-08-17 2021-12-07 广州快批信息科技有限公司 Goods offline checking method and device based on PDA local storage

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857603B (en) * 2020-07-31 2022-12-02 重庆紫光华山智安科技有限公司 Data processing method and related device
CN112681405A (en) * 2020-12-15 2021-04-20 广东广建项目管理有限公司 Automatic deformation monitoring system of foundation ditch

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103141A1 (en) * 2002-11-19 2004-05-27 Miller Quentin S. Atomic message division
CN102457499A (en) * 2010-10-26 2012-05-16 腾讯科技(深圳)有限公司 Offline working method for client, and offline working client
CN103997525A (en) * 2014-05-21 2014-08-20 北京紫光天禾软件系统技术有限公司 Distributed data synchronization method and system

Family Cites Families (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6912591B2 (en) * 2001-05-02 2005-06-28 Science Application International Corporation System and method for patch enabled data transmissions
WO2006053019A2 (en) * 2004-11-08 2006-05-18 Sharpcast, Inc. Method and apparatus for a file sharing and synchronization system
CN1852137A (en) * 2005-07-20 2006-10-25 华为技术有限公司 Method for realizing synchronization of client end data and server end data
CN101064630B (en) * 2006-04-24 2011-09-21 华为技术有限公司 Data synchronization method and system
CN101127960B (en) * 2007-09-20 2011-05-11 中兴通讯股份有限公司 A system and method for differential update of electronic service guidance
US7991740B2 (en) * 2008-03-04 2011-08-02 Apple Inc. Synchronization server process
JP2011257959A (en) * 2010-06-08 2011-12-22 Toshiba Corp Difference retrieval system
CN102571935B (en) * 2011-12-23 2015-11-25 华为技术有限公司 A kind of method of transfer of data, client, server and system
US8504519B1 (en) * 2012-06-27 2013-08-06 Dropbox, Inc. Determining a preferred modified version from among multiple modified versions for synchronized files
CN103002010B (en) * 2012-10-29 2016-09-28 北京奇虎科技有限公司 A kind of data-updating method based on incremental data, device and system
CN103095843B (en) * 2013-01-28 2018-01-30 刘海峰 A kind of data back up method and client based on version vector
CN103634445B (en) * 2013-11-19 2016-08-17 云宏信息科技股份有限公司 Incoming display method and device
WO2015157904A1 (en) * 2014-04-15 2015-10-22 华为技术有限公司 File synchronization method, server, and terminal
CN103916482B (en) * 2014-04-21 2017-02-08 合肥盈云信息科技有限公司 Data synchronous transmission method based on sqlite

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040103141A1 (en) * 2002-11-19 2004-05-27 Miller Quentin S. Atomic message division
CN102457499A (en) * 2010-10-26 2012-05-16 腾讯科技(深圳)有限公司 Offline working method for client, and offline working client
CN103997525A (en) * 2014-05-21 2014-08-20 北京紫光天禾软件系统技术有限公司 Distributed data synchronization method and system

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106355358A (en) * 2016-10-21 2017-01-25 用友网络科技股份有限公司 Data manipulation method with double modes in mobile ERP system and ERP system
CN109361767A (en) * 2018-12-06 2019-02-19 苏州思必驰信息科技有限公司 Optimize server-side, client process method and the server of client data display error, be able to carry out the client that data are shown
CN109361767B (en) * 2018-12-06 2021-11-02 思必驰科技股份有限公司 Processing method for optimizing client data display error, server and client
CN111769800A (en) * 2020-03-19 2020-10-13 尚特杰电力科技有限公司 Data processing mechanism of photovoltaic power station data acquisition unit under off-grid state
CN111769800B (en) * 2020-03-19 2021-09-28 尚特杰电力科技有限公司 Data processing mechanism of photovoltaic power station data acquisition unit under off-grid state
CN112905553A (en) * 2021-02-07 2021-06-04 全链通有限公司 Data sharing method, device and system based on block chain
CN113762890A (en) * 2021-08-17 2021-12-07 广州快批信息科技有限公司 Goods offline checking method and device based on PDA local storage

Also Published As

Publication number Publication date
CN110572437A (en) 2019-12-13
CN110557441B (en) 2022-02-22
CN110557441A (en) 2019-12-10
CN105791401B (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN105791401A (en) Data interaction method and system of client and server in online and offline states
US11036754B2 (en) Database table conversion
KR101485613B1 (en) Two-way and multi-master synchronization over web syndications
KR101750429B1 (en) Document editing system and method for collaborative editing
CN103023933B (en) A kind of log-on message Integrated Processing System and method
CN102075580B (en) Method and system for storing synchronous data in distributive network equipment
US20170161291A1 (en) Database table conversion
CN106886371B (en) Caching data processing method and device
CN111404702A (en) Group entering method, group entering device, group management system, computer equipment and storage medium
CN102769709B (en) A kind of for providing the method and apparatus of service contact information to user
CN105049252A (en) Method and device for managing configuration information
CN101000619A (en) Data synchronous method and device based on SQL
EP2618278B1 (en) Synchronizing endpoint data stores having disparate schemas
US11226982B2 (en) Synchronization of offline instances
CN109067896B (en) Interaction method, interaction device, computer equipment and storage medium
EP4050850A1 (en) Service upgrading method, device and system
US20190250962A1 (en) Method for updating instance-based message maps using metadata
CN102905000A (en) Address book synchronization method and device
CN111090803A (en) Data processing method and device, electronic equipment and storage medium
CN106028311A (en) Terminal register method and device
US20090016508A1 (en) System and method for generating a personalized bill using a personal address book
US11914612B2 (en) Selective synchronization of linked records
WO2022033291A1 (en) Ranking list service system, ranking list generation method, server, and storage medium
CN111506644B (en) Application data processing method and device and electronic equipment
US20160036766A1 (en) Method and system for synchronizing program masks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant