CN110572437A - Data interaction method and system for client and server in online and offline states - Google Patents

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

Info

Publication number
CN110572437A
CN110572437A CN201910742274.0A CN201910742274A CN110572437A CN 110572437 A CN110572437 A CN 110572437A CN 201910742274 A CN201910742274 A CN 201910742274A CN 110572437 A CN110572437 A CN 110572437A
Authority
CN
China
Prior art keywords
data
client
server
uploaded
network
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.)
Pending
Application number
CN201910742274.0A
Other languages
Chinese (zh)
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 CN201910742274.0A priority Critical patent/CN110572437A/en
Publication of CN110572437A publication Critical patent/CN110572437A/en
Pending legal-status Critical Current

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 for a client and a server in an online and offline state, which comprises the following steps: judging the on-network state of the client according to the system API; marking the difference data as not uploaded and then storing the difference data to a local client; or sending the difference data to the server for interaction, generating a dynamic code at the server according to the difference data, taking out the data larger than the dynamic code according to the dynamic code, and returning the data larger than the dynamic code to the client; storing the data larger than the dynamic code and the difference data which are not uploaded in a local database of the client, identifying the data as uploaded data, and submitting the number and the data to be uploaded to a server through a request; the server side searches data larger than the submitted version number and generates a new version number; the client stores the version number in a data source of the client, processes the response synchronous data and stores the processed synchronous data to the local, and the uploading identifier of the uploaded data is set as uploaded.

Description

Data interaction method and system for client and server in online and offline states
Technical Field
The invention relates to the field of data communication, in particular to a method and a system for data interaction between a client and a server in a network and off-network state.
Background
Data interaction of like products in the current market under an off-network state is more in a synchronization mode of actively initiating a data uploading request by a user, and data sharing and data query accuracy among multiple users are influenced because the user actively clicks an uploading button to upload data in the user data synchronization. If the user a does not click the upload button in the online state after entering data in the offline state, the user B cannot check the data generated by the user a before the user a clicks the upload button.
Data generated by existing similar products in an off-network mode are synchronized by manually clicking corresponding function buttons, the data synchronization timeliness is poor due to the manually initiated synchronization mode, and the problem that accuracy cannot be timely provided for shared data when a set of data is used by multiple people is solved.
Disclosure of Invention
The technical problem to be solved by the invention is that when data synchronization is carried out on data interaction of a client in an off-network or on-network state, manual synchronization is not needed, and synchronous data interaction can be automatically carried out only when the client is accessed to a network, so that the timeliness of data synchronization and the accuracy of data sharing by multiple persons at the same time are ensured.
the invention provides a data interaction method for a client and a server under the state of network and off-network, which solves the technical problem and comprises the following steps:
Triggering data updating, and judging the online state of the client according to a system API (application program interface) provided in an operating system;
When the data is generated off the network, marking the difference data as not uploaded and then storing the difference data to a local client; when data is generated in a network, sending differential data to a server for interaction, generating a dynamic code at the server according to the differential data, taking out data larger than the dynamic code according to the dynamic code, and returning the data larger than the dynamic code to a client through the server;
Storing the data larger than the dynamic code and the difference data which are not uploaded in a local database of the client, identifying the data as uploaded data, and submitting the number and the data to be uploaded to a server through a request;
If the client is a new installation, the uploaded version number is 0, and after the server receives the request, the server searches data larger than the submitted version number in the data source and generates a new version number as response data of the server;
After the data is responded to the client, the client stores the version number in a data source of the client, processes the responded synchronous data and stores the processed synchronous data to the local, and the uploading identifier of the uploaded data is set as uploaded.
furthermore, when data is generated in an off-network mode, the client side automatically obtains the data which are not uploaded, queries whether the data are uploaded in the database of the server side or not, and uploads the data which are not uploaded to the server.
further, the method for generating the dynamic code at the server according to the difference data is specifically a mode of millisecond number + short number sequence or a mode of service startup number + long number sequence.
The invention has the beneficial effects that:
1) In the data interaction system of the client and the server in the online and offline states, the client stores data to the local and initiates a request to the server to obtain version difference data returned by the server and stores the version difference data in the local when the data is generated in the network; the online channel for data generation is ensured; in addition, when the data is generated in an off-network mode, the generated data is stored to the local, and when the client side is in an on-network state, the data generated in the off-network mode last time and the data operated in the on-network mode this time are combined and uploaded to the server side; ensuring the off-network channel of data generation.
2) In the data interaction system with the client and the server in the online and offline states, the server is used for receiving data synchronously sent by the client and returning version difference data to the client when the client is online; and generating dynamic codes used for generating the version difference at the server side. By the server, differential synchronization is clearer, the version number created by the server is used for controlling the data which needs to be synchronized and shared by each client, and the problem that the communication process is too slow due to a large amount of data generated by all data during single interaction is solved.
3) Because the client automatically obtains the data which is not uploaded through the client and then uploads the data to the server, or the service of the client automatically obtains the data which is not uploaded and uploads the data to the server, the synchronization of the data version is realized more quickly.
Drawings
Fig. 1 is a schematic structural diagram of a data interaction system between a client and a server in an online and offline state according to an embodiment of the present invention.
fig. 2 is a sequence diagram of the interaction in fig. 1.
Fig. 3 is a schematic diagram of an embodiment of synchronization to a server by a client in fig. 1.
Fig. 4 is a flowchart illustrating a method for automatically acquiring data that is not uploaded in fig. 3.
Fig. 5 is a schematic diagram of a method for generating client-side and server-side version difference data in fig. 1.
Fig. 6 is a schematic diagram of the internal structure of the client in fig. 1.
Fig. 7 is a schematic diagram of the internal structure of the server in fig. 1.
Fig. 8 is a schematic flow chart of a data interaction method between a client and a server in an online and offline state according to an embodiment of the present invention.
Fig. 9 is a schematic flow chart of a data interaction method in a network and off-network state in combination with a server and a client in a preferred embodiment of the present invention.
Fig. 10 is a schematic structural diagram of a data interaction system between a client and a server in an online and offline state in a preferred embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to specific embodiments and the accompanying drawings.
Fig. 1 is a schematic structural diagram of a data interaction system between a client and a server in an online and offline state according to an embodiment of the present invention.
In this embodiment, the server 100 and the client 101 are included, where the server 100 is configured as one server to establish interaction with the client 101, where the interaction includes synchronization of data versions, sharing of data, and query of data. It will be understood by those skilled in the art that the client 101 may comprise a plurality of access ports for providing users with different needs to synchronize with the server data.
Fig. 2 is a sequence diagram of the interaction in fig. 1.
In this embodiment, the server 100 and the client 101 are included, and the time sequence interaction is performed according to the following steps:
The data interaction system of the client and the server in the online and offline states comprises:
At least one client 101, configured to store data to a local location when the data is generated on the network, and initiate a request to the server to obtain version difference data returned by the server, and store the version difference data locally;
When the data is generated in an off-network mode, storing the generated data to the local, and when the client is in an on-network state, combining the data generated in the off-network mode last time with the data operated in the on-network mode and uploading the data to the server;
a server 100, configured to receive data synchronously sent by a client and return version difference data to the client when the client is on the internet; and generating dynamic codes used for generating the version difference at the server side.
In the client 101, the operation is step S101, when data is generated on the network, the data is stored locally, which is shown as the case that the mobile phone is on the network, the computer is on the network, and other terminals are on the network, that is, the communication network is accessed. When data is generated on the network, the data needs to be stored locally.
And initiating a request to the server 100 to obtain the version difference data returned by the server, storing the version difference data locally, performing matching comparison on the uploaded data according to the version difference of the data to obtain the version difference data, and then storing the data obtained from the server 100 in the client 101 to finish the data synchronization during the online process.
Then, step S102 is performed in the client 101, when data is generated off-network, the generated data is stored locally, and when the client is in the on-network state, the data generated last time off-network and the data of the current on-network operation are merged and uploaded to the server. The data generated by the client 101 for the off-network is stored locally, and the client 101 is waited to access the network again. Once the client 101 is detected to be in the network state, the local data generated and stored in the last offline operation and the data generated in the current online operation are merged and then uploaded to the server 100, so that rapid and automatic data synchronization is realized.
In the server 100, performing step S103, when the client is on the network, receiving data synchronously sent by the client and returning version difference data to the client; and generating dynamic codes used for generating the version difference at the server side. When the client is on the network, the server 100 receives the data synchronously sent by the client 101, and then returns the version difference data to the client, and the sequence generated in the server 100 is an incremental number, so that the server 100 can be ensured to judge easily. For example, a millisecond + short digit sequence may be used.
Fig. 3 is a schematic diagram of an embodiment of synchronization to a server by a client in fig. 1.
in this embodiment, the step of performing synchronization is to automatically obtain the data that is not uploaded through the service in the client 101 and upload the data to the server 100. Under the Android environment, Service is generally used to perform some time-consuming operations, or perform operations in the background that do not provide a user interaction interface, such as: and (5) downloading and uploading. Initiating Service may include two ways, e.g., initiating Service by calling the startService () method anywhere in the same application, and then the system will call back onCreate () and onStart () methods of the Service class. The Service started in the above manner will run in the background until a context. Alternatively, such as the bindService () method, binds this Service to the client class that called the Service, and if this client class is called to be destroyed, the Service will also be destroyed.
In addition, the iOS environment is background transfer service, such as background transfer service (background transfer service) in the iOS7 multitasking. The function of the processing module with the function is provided by various systems, belongs to a system packaging method, and can be used by developers only through interfaces.
Or, in the client 101, the user triggers data update at the client through manual operation, for example, after the user a enters data in an off-network state, the user B does not click an upload button in the on-network state, and then the user B cannot check the data generated by the user a before the user a clicks the upload button, and needs to synchronize the data through manual operation or Service of the client.
Fig. 4 is a flowchart illustrating a method for automatically acquiring data that is not uploaded in fig. 3.
when the data is generated in the off-network mode, the generated data is stored to the local, and when the client is in the on-network state, the data generated in the off-network mode last time and the data operated in the on-network mode are combined and uploaded to the server. In this embodiment, the method for automatically obtaining the data that is not uploaded specifically includes:
step S201, when a client uploads data once, a server generates a uniform version number for all data uploaded this time and sends the uniform version number to the client through a response; and managing the unified version number for the single uploading of the client.
Step S202, the client records the version number at the corresponding position of the client data source, and changes the identification of the uploaded data of the client into the uploaded data, and the first single uploading is finished. In this embodiment, the client data source may be a table of the database.
step S203, when the client uploads the data again, the version number stored in the client and the data to be uploaded need to be delivered to the server through a request; the version number stored in the client is not updated, so that the version number and the data to be uploaded need to be delivered to the server for processing in a request mode.
step S204, if the client is a new installation, the uploaded version number is 0, and after the server receives the request, the server searches data larger than the submitted version number in the data source and generates a new version number as response data of the server; and judging the version number in the step S203, wherein the data larger than the submitted version number at this time, that is, the new version number updated later, is used as the response data of the server.
After the data response to the client in step S205, the client stores the version number in the data source of the client, and stores the processed synchronous data to the local, and sets the upload identifier of the uploaded data as uploaded. And storing the new version number at the client, storing the data responding to synchronization of the server to the local, and setting the uploading identifier of the uploaded data as uploaded.
Fig. 5 is a schematic diagram of a method for generating client-side and server-side version difference data in fig. 1.
In this embodiment, the method for generating the version difference data between the server 100 and the client 101 specifically includes:
In the server 100, the operation S401 is performed to create a data version number at the server, and obtain version difference data according to the data version number corresponding to the difference data.
Or, in the server 100, the operation step S402 is performed to synchronize or share data of each client according to the version difference data.
Fig. 6 is a schematic diagram of the internal structure of the client in fig. 1.
preferably, the client includes a client interaction data processing module 1011, a Service automatic processing module 1012, and an online determination module 1013.
The client interactive data processing module 1011 is used for packaging interactive data and then sending the interactive data to the server; the client interactive data processing module 1011 is further configured to receive the on-network or off-network status determination condition in the on-network determining module 1013. And sends the interactive data to the web determination module 1013.
A Service automatic processing module 1012, wherein the Service automatic processing module 1012 is used to automatically obtain data when the client is in a network state, and is connected to the client interactive data processing module for data synchronization. In the Android environment, Service is generally used to perform some time-consuming operations, or perform operations in the background that do not provide a user interaction interface, such as: and (5) downloading and uploading. In addition, the iOS environment is background transfer service, such as background transfer service (background transfer service) in the iOS7 multitasking. The function of the processing module with the function is provided by various systems, belongs to a system packaging method, and can be used by developers only through interfaces. Therefore, faster synchronization is realized, and manual synchronization is not needed to be carried out every time by a user.
The online determination module 1013 is configured to confirm a network state of the client when performing data interaction. When the on-network determining module 1013 detects that the client is on the network, the on-network state information is sent to the client interactive data processing module 1011, and since the client interactive data processing module 1011 is connected to a server interactive data processing module in the server, the data can be packaged and sent. When the on-network determining module 1013 detects that the client is off-network, the on-network status information is sent to the client interactive data processing module 1011, and the data generated by off-network is directly stored locally by the client. In the network determining module 1013, when entering the client interactive data processing module 1011 in any way, the network state needs to be determined and confirmed by the module.
The client 101 also comprises a corresponding data function in which a user manually operates the client, so as to generate data changes of off-network or on-network.
Fig. 7 is a schematic diagram of the internal structure of the server in fig. 1.
As a preferred embodiment in this embodiment, the server 100 includes a server interaction data processing module 1001, a data processing module 1002, and a dynamic code generation module 1003.
A server interaction data processing module 1001, where the server interaction data processing module 1001 is used to receive data sent by the client and return the data to the client; and is also connected with a client interaction data processing module 1011 in the client for data interaction.
The data processing module 1002, the data processing module 1002 is configured to process data obtained in the server interaction data processing module; specifically, the processing mode of the interactive data is determined according to the language and the requirement, such as the processing of fields, the processing of query calls of data, and the like.
and the dynamic code generation module 1003 is configured to obtain a dynamic code, confirm a version number for the data uploaded this time according to the dynamic code, and send the version number to the client of the data uploaded this time. As a preferred method in this embodiment, the method for generating the dynamic code at the server according to the difference data specifically includes that the dynamic code is a version number, and when the server generates the dynamic code, it is required to ensure that the sequence is increased in number, which ensures that the server is easier to determine. The dynamic code can be generated in various ways, such as a way of milliseconds plus a short digital sequence or; the number of service starts + the long number sequence, etc.
In this embodiment, the server 100 further includes a database or a file 1004, and when data is generated off-network, the client automatically obtains data that is not uploaded, and queries whether to upload the data in the database of the server, and uploads the data that is not uploaded to the server.
fig. 8 is a schematic flow chart of a data interaction method between a client and a server in an online and offline state according to an embodiment of the present invention.
Step S501, begin
Step S502 triggers data updating, and judges the online state of the client according to a system API provided in the operating system; for example, an API interface for communicating SGIP, an API interface for mobile short messages; and judging the on-network state of the client.
step S503, when the data is generated off-network, the difference data is marked as not uploaded and then stored to the local client; because the client cannot synchronize with the server when the client is off-line, the data with the difference needs to be marked as not uploaded and stored to the local client.
Step S504, when the data is generated in the network, the difference data is sent to the server for interaction, the dynamic code is generated in the server according to the difference data, and the client accesses the network, namely after the network, and when the data is generated in the network, the client sends the difference data to the server for interaction. The method for checking the difference data requires a dynamic code, i.e., a data version number, generated at the server according to the difference data.
Whether the dynamic code generated in step S505 is larger than the dynamic code is generally, the dynamic codes are arranged in descending order.
step S506, taking out the data larger than the dynamic code according to the dynamic code, and returning the data larger than the dynamic code to the client through the server; in step S505, the data greater than the dynamic code, that is, the data with a higher version number, is extracted from the dynamic code and updated, and the data greater than the dynamic code is returned to the client through the server.
step S507 stores the data greater than the dynamic code and the difference data not uploaded in the local database of the client, and identifies the data as uploaded. And storing the data larger than the dynamic code and the difference data which are not uploaded in the local data, realizing the synchronization from the server side to the client side, and identifying the data as uploaded.
fig. 9 is a schematic flow chart of a data interaction method in a network and off-network state in combination with a server and a client in a preferred embodiment of the present invention.
Step S601 is triggered manually, and the user manually operates the corresponding data function in the client, thereby generating an off-network or on-network data change.
Step S602 generates data, which has two channels, on-grid generation and off-grid generation.
Step S603, the client determines the module on the internet, if yes, the process goes to step S613, otherwise, the process goes to step S604; for example, the online determination module 1013 is configured to confirm the network status of the client when performing data interaction. When the on-network determining module 1013 detects that the client is on the network, the on-network state information is sent to the client interactive data processing module 1011, and since the client interactive data processing module 1011 is connected to a server interactive data processing module in the server, the data can be packaged and sent. When the on-network determining module 1013 detects that the client is off-network, the on-network status information is sent to the client interactive data processing module 1011, and the data generated by off-network is directly stored locally by the client. In the network determining module 1013, when entering the client interactive data processing module 1011 in any way, the network state needs to be determined and confirmed by the module.
Step S604, calling a client data interaction module to send data to the server, storing the data to the local when the data is generated on the network, initiating a request to the server, obtaining version difference data returned by the server, and storing the version difference data locally;
Step S605, the server data interaction module receives data, the data interaction module is a server interaction data processing module 1001,
Step S606 stores the data to the server database,
Step S607 is that the server side dynamic code generation module, for example, the dynamic code generation module 1003 is configured to obtain the dynamic code, confirm the version number for the data uploaded this time according to the dynamic code, and issue the version number to the client side of the data uploaded this time. As a preferred method in this embodiment, the method for generating the dynamic code at the server according to the difference data specifically includes that the dynamic code is a version number, and when the server generates the dynamic code, it is required to ensure that the sequence is increased in number, which ensures that the server is easier to determine. The dynamic code can be generated in various ways, such as a way of milliseconds plus a short digital sequence or; the number of service starts + the long number sequence, etc.
step S608 obtains the dynamic code of the uplink of the client and fetches the data larger than the dynamic code,
Step S609 summarizes the data extracted before and the data generated by dynamic encoding,
Step S610 delivers data to the server-side data interaction module to initiate response,
Step S611 the client data interaction module receives the response,
Step S612, storing the server return data and the local generation data in a local database and marking the server return data and the local generation data as uploaded and stored data; entering step S616;
If not, go to step S613 to mark the data as not uploaded and store the data;
Step S614 is an automatic client Service triggering module, for example, a Service automatic processing module 1012, where the Service automatic processing module 1012 is used to automatically obtain data when the client is in the network state, and is connected to the client interactive data processing module for data synchronization. In the Android environment, Service is generally used to perform some time-consuming operations, or perform operations in the background that do not provide a user interaction interface, such as: and (5) downloading and uploading. In addition, the iOS environment is background transfer service, such as background transfer service (background transfer service) in the iOS7 multitasking. The function of the processing module with the function is provided by various systems, belongs to a system packaging method, and can be used by developers only through interfaces. Therefore, faster synchronization is realized, and manual synchronization is not needed to be carried out every time by a user.
Step S615 queries data that is not uploaded from the database, i.e., data that is not marked as uploaded.
Step S616, the client data source, and the step S616 the client data source proceeds to step S604.
because there are two ways in which data is generated, on-grid generation and off-grid generation. When the network is generated, a request is directly sent to the server side except for the local storage, and the version difference data returned by the server side is obtained and stored in the local storage unit. When the client is in the network state, the data generated by the last off-network operation can be combined with the data generated by the current on-network operation to be uploaded together, or the data which is not uploaded is automatically obtained through the service of the client to be uploaded to the server.
Fig. 10 is a schematic structural diagram of a data interaction system between a client and a server in an online and offline state in a preferred embodiment of the present invention.
the server 100 includes a server interaction data processing module 1001, a data processing module 1002, and a dynamic code generation module 1003.
a server interaction data processing module 1001, where the server interaction data processing module 1001 is used to receive data sent by the client and return the data to the client; and is also connected with a client interaction data processing module 1011 in the client for data interaction.
the data processing module 1002, the data processing module 1002 is configured to process data obtained in the server interaction data processing module;
and the dynamic code generation module 1003 is configured to obtain a dynamic code, confirm a version number for the data uploaded this time according to the dynamic code, and send the version number to the client of the data uploaded this time. As a preferred method in this embodiment, the method for generating the dynamic code at the server according to the difference data specifically includes that the dynamic code is a version number, and when the server generates the dynamic code, it is required to ensure that the sequence is increased in number, which ensures that the server is easier to determine. The dynamic code can be generated in various ways, such as a way of milliseconds plus a short digital sequence or; the number of service starts + the long number sequence, etc. The method is mainly used for obtaining the dynamic codes, confirming the version number of the uploaded data, and issuing the version number to the client side of the uploaded data.
Data interaction is realized through the server interaction data processing module 1001 and the client interaction data processing module 1011 of the client.
The client includes a client interaction data processing module 1011, a Service automatic processing module 1012, and an online determination module 1013.
The client interactive data processing module 1011 is used for packaging interactive data and then sending the interactive data to the server; the client interactive data processing module 1011 is further configured to receive the on-network or off-network status determination condition in the on-network determining module 1013. And sends the interactive data to the web determination module 1013.
a Service automatic processing module 1012, wherein the Service automatic processing module 1012 is used to automatically obtain data when the client is in a network state, and is connected to the client interactive data processing module for data synchronization. In the Android environment, Service is generally used to perform some time-consuming operations, or perform operations in the background that do not provide a user interaction interface, such as: and (5) downloading and uploading. In addition, the iOS environment is background transfer service, such as background transfer service (background transfer service) in the iOS7 multitasking. The function of the processing module with the function is provided by various systems, belongs to a system packaging method, and can be used by developers only through interfaces. Therefore, faster synchronization is realized, and manual synchronization is not needed to be carried out every time by a user.
the online determination module 1013 is configured to confirm a network state of the client when performing data interaction. When the on-network determining module 1013 detects that the client is on the network, the on-network state information is sent to the client interactive data processing module 1011, and since the client interactive data processing module 1011 is connected to a server interactive data processing module in the server, the data can be packaged and sent. When the on-network determining module 1013 detects that the client is off-network, the on-network status information is sent to the client interactive data processing module 1011, and the data generated by off-network is directly stored locally by the client. In the network determining module 1013, when entering the client interactive data processing module 1011 in any way, the network state needs to be determined and confirmed by the module.
Those of ordinary skill in the art will understand that: the present invention is not limited to the above embodiments, and any modifications, equivalent substitutions, improvements, etc. within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (3)

1. The data interaction method of the client and the server under the online and offline states is characterized by comprising the following steps:
Triggering data updating, and judging the online state of the client according to a system API (application program interface) provided in an operating system;
When the data is generated off the network, marking the difference data as not uploaded and then storing the difference data to a local client; when data is generated in a network, sending differential data to a server for interaction, generating a dynamic code at the server according to the differential data, taking out data larger than the dynamic code according to the dynamic code, and returning the data larger than the dynamic code to a client through the server;
Storing the data larger than the dynamic code and the difference data which are not uploaded in a local database of the client, identifying the data as uploaded data, and submitting the number and the data to be uploaded to a server through a request;
If the client is a new installation, the uploaded version number is 0, and after the server receives the request, the server searches data larger than the submitted version number in the data source and generates a new version number as response data of the server;
After the data is responded to the client, the client stores the version number in a data source of the client, processes the responded synchronous data and stores the processed synchronous data to the local, and the uploading identifier of the uploaded data is set as uploaded.
2. The data interaction method according to claim 1, wherein when data is generated off-network, the client automatically obtains the data which is not uploaded, inquires whether the data is uploaded in the database of the server, and uploads the data which is not uploaded to the server.
3. The data interaction method according to claim 1, wherein the method for generating the dynamic code at the server according to the difference data is specifically a mode of millisecond number + short number sequence or a mode of service startup number + long number sequence.
CN201910742274.0A 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states Pending CN110572437A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
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 (2)

Application Number Priority Date Filing Date Title
CN201910742274.0A CN110572437A (en) 2016-03-01 2016-03-01 Data interaction method and system for client and server in online and offline states
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 Parent Applications (1)

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

Publications (1)

Publication Number Publication Date
CN110572437A true CN110572437A (en) 2019-12-13

Family

ID=56386802

Family Applications (3)

Application Number Title Priority Date Filing Date
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
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

Family Applications After (2)

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

Country Status (1)

Country Link
CN (3) CN110572437A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857603A (en) * 2020-07-31 2020-10-30 重庆紫光华山智安科技有限公司 Data processing method and related device

Families Citing this family (6)

* 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
CN109361767B (en) * 2018-12-06 2021-11-02 思必驰科技股份有限公司 Processing method for optimizing client data display error, server and client
CN111769800B (en) * 2020-03-19 2021-09-28 尚特杰电力科技有限公司 Data processing mechanism of photovoltaic power station data acquisition unit under off-grid state
CN112681405A (en) * 2020-12-15 2021-04-20 广东广建项目管理有限公司 Automatic deformation monitoring system of foundation ditch
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

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101064630A (en) * 2006-04-24 2007-10-31 华为技术有限公司 Data synchronization method and system
JP2011257959A (en) * 2010-06-08 2011-12-22 Toshiba Corp Difference retrieval system
EP2426611A1 (en) * 2008-03-04 2012-03-07 Apple Inc. Synchronization server process
CN102457499A (en) * 2010-10-26 2012-05-16 腾讯科技(深圳)有限公司 Offline working method for client, and offline working client
CN102571935A (en) * 2011-12-23 2012-07-11 华为技术有限公司 Data transmission method, client, server and system
CN103002010A (en) * 2012-10-29 2013-03-27 北京奇虎科技有限公司 Method, device and system for updating data based on incremental data
CN103095843A (en) * 2013-01-28 2013-05-08 刘海峰 Method and client of data backup based on version vectors
US20140067925A1 (en) * 2004-11-08 2014-03-06 SugarSync, Inc. Method and apparatus for a file sharing and synchronization system
CN103916482A (en) * 2014-04-21 2014-07-09 合肥盈云信息科技有限公司 Data synchronous transmission method based on sqlite

Family Cites Families (8)

* 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
US7337239B2 (en) * 2002-11-19 2008-02-26 Microsoft Corporation Atomic message division
CN1852137A (en) * 2005-07-20 2006-10-25 华为技术有限公司 Method for realizing synchronization of client end data and server end data
CN101127960B (en) * 2007-09-20 2011-05-11 中兴通讯股份有限公司 A system and method for differential update of electronic service guidance
US8504519B1 (en) * 2012-06-27 2013-08-06 Dropbox, Inc. Determining a preferred modified version from among multiple modified versions for synchronized files
CN103634445B (en) * 2013-11-19 2016-08-17 云宏信息科技股份有限公司 Incoming display method and device
CN104488248B (en) * 2014-04-15 2017-09-08 华为技术有限公司 A kind of file synchronisation method, server and terminal
CN103997525B (en) * 2014-05-21 2017-10-20 北京天禾元创软件股份有限公司 A kind of Distributed Data Synchronization method and system

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140067925A1 (en) * 2004-11-08 2014-03-06 SugarSync, Inc. Method and apparatus for a file sharing and synchronization system
CN101064630A (en) * 2006-04-24 2007-10-31 华为技术有限公司 Data synchronization method and system
EP2426611A1 (en) * 2008-03-04 2012-03-07 Apple Inc. Synchronization server process
JP2011257959A (en) * 2010-06-08 2011-12-22 Toshiba Corp Difference retrieval system
CN102457499A (en) * 2010-10-26 2012-05-16 腾讯科技(深圳)有限公司 Offline working method for client, and offline working client
CN102571935A (en) * 2011-12-23 2012-07-11 华为技术有限公司 Data transmission method, client, server and system
CN103002010A (en) * 2012-10-29 2013-03-27 北京奇虎科技有限公司 Method, device and system for updating data based on incremental data
CN103095843A (en) * 2013-01-28 2013-05-08 刘海峰 Method and client of data backup based on version vectors
CN103916482A (en) * 2014-04-21 2014-07-09 合肥盈云信息科技有限公司 Data synchronous transmission method based on sqlite

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111857603A (en) * 2020-07-31 2020-10-30 重庆紫光华山智安科技有限公司 Data processing method and related device
CN111857603B (en) * 2020-07-31 2022-12-02 重庆紫光华山智安科技有限公司 Data processing method and related device

Also Published As

Publication number Publication date
CN105791401A (en) 2016-07-20
CN110557441B (en) 2022-02-22
CN110557441A (en) 2019-12-10
CN105791401B (en) 2019-09-20

Similar Documents

Publication Publication Date Title
CN110557441B (en) Data interaction method and system for client and server in online and offline states
WO2018219178A1 (en) Data synchronization method and apparatus, server, and storage medium
KR100976429B1 (en) System and method for data synchronization between service portals and access platforms for services using such a synchronization system
CN101426017B (en) Address book processing method and system
CN101427556B (en) Accessing a calendar server to facilitate initiation of a scheduled call
CN109542529B (en) Function name-based point burying method and device, computer equipment and storage medium
EP2656251B1 (en) Generating maps of private spaces using mobile computing device sensors
WO2020248375A1 (en) Method and system for synchronizing data between databases, computer device and storage medium
CN106790131B (en) Parameter modification method and device and distributed platform
CN109067896B (en) Interaction method, interaction device, computer equipment and storage medium
CN111880858A (en) Document processing and instant messaging method, device, electronic equipment and storage medium
EP2075975A1 (en) Relay server and relay communication system
CN113469736A (en) Resource distribution control method, device, system, electronic device and storage medium
CN114691779A (en) Data synchronization method and system, computer readable storage medium
US8843587B2 (en) Retrieving availability information from published calendars
CN115562757A (en) Data processing method, configuration center system, electronic device, and storage medium
CN110661851A (en) Data exchange method and device
CN106028311A (en) Terminal register method and device
CN111314221A (en) Service processing method, device, equipment and computer readable storage medium
JP2019533254A (en) Information acquisition
CN105009557A (en) Display and manipulate call forwarding on no reply timer in called terminal
US11336615B2 (en) Global load balancing achieved by using distributed DNS reflection
CN111726417B (en) Delay control method, device, server and storage medium
WO2021103644A1 (en) Data structure, communication method and apparatus, storage medium and device
CN114706923A (en) Data synchronization method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191213