CN103002010B - A kind of data-updating method based on incremental data, device and system - Google Patents
A kind of data-updating method based on incremental data, device and system Download PDFInfo
- Publication number
- CN103002010B CN103002010B CN201210421027.9A CN201210421027A CN103002010B CN 103002010 B CN103002010 B CN 103002010B CN 201210421027 A CN201210421027 A CN 201210421027A CN 103002010 B CN103002010 B CN 103002010B
- Authority
- CN
- China
- Prior art keywords
- data
- server
- incremental
- processing equipment
- client
- 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.)
- Active
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
本发明公开了一种用于进行数据更新的方法、装置和系统,所述系统包括上传数据处理装置、下载数据处理装置和服务器,上传数据处理装置和下载数据处理装置中保存有当前版本的数据,上传数据处理装置用于根据更新前的数据和更新后的数据生成增量数据,并将该增量数据发送到该服务器,其中增量数据是指更新后的数据相对于更新前的数据的变化的数据;服务器接收并保存该增量数据,并将该增量数据发送到下载数据处理装置;下载数据处理装置用于从服务器接收增量数据,并根据该下载数据处理装置保存的待更新的数据与该增量数据产生经更新的数据。本发明能够减小数据更新时所占用的网络带宽、提高更新的速度、效率和实时性。
The invention discloses a method, device and system for updating data. The system includes an upload data processing device, a download data processing device and a server, and the current version of data is stored in the upload data processing device and the download data processing device. , the upload data processing device is used to generate incremental data according to the data before updating and the data after updating, and send the incremental data to the server, wherein the incremental data refers to the difference between the data after updating and the data before updating Changed data; the server receives and saves the incremental data, and sends the incremental data to the download data processing device; the download data processing device is used to receive incremental data from the server, and according to the data to be updated stored by the download data processing device The data and the delta data produce updated data. The invention can reduce the network bandwidth occupied by data updating, and improve the updating speed, efficiency and real-time performance.
Description
技术领域technical field
本发明属于通信领域,具体涉及数字信息的传输,特别是一种基于增量数据的数据更新方法与装置。The invention belongs to the field of communication, in particular to the transmission of digital information, in particular to a method and device for updating data based on incremental data.
背景技术Background technique
在网络通信系统实现的计算架构中,经常需要在不同的计算实体之间传送并在各个计算实体中存储不同版本的数据。例如,当用户对其个人电脑(PC)的浏览器的收藏夹进行改变时,每进行一次改变就会产生不同版本的收藏夹。在需要通过服务器与客户端进行同步的新兴计算应用领域,通常要求在客户端和服务器之间进行数据的传送,并在各计算实体中存储和实时更新数据,比如所述收藏夹的信息。下面示例性地说明在现有技术中存在的几种同步和更新数据的场景。In the computing architecture implemented by the network communication system, it is often necessary to transmit and store different versions of data between different computing entities. For example, when the user changes the favorites of the browser of his personal computer (PC), different versions of the favorites will be generated every time the change is made. In emerging computing application fields that need to be synchronized by the server and the client, it is usually required to transmit data between the client and the server, and store and update data in each computing entity in real time, such as the information of the favorites. Several scenarios of synchronizing and updating data in the prior art are exemplarily described below.
图1是现有技术中在多个客户端之间同步数据的场景示意图。该场景为:同一用户可以登录不同的客户端(例如手机和PC),为了进行数据分享与同步,各客户端均与一服务器相连。当用户在登录其中一个客户端(例如PC)时更改了某一数据,例如收藏夹,则在该客户端上就会存储一个更新版本的收藏夹。为了该用户能够在下次登录另一客户端时使用该更新过的收藏夹,该客户端先将该更新的收藏夹传送到服务器,并且,当该用户登录另一客户端时,该服务器就将该更新的收藏夹传送给该用户当前登录的另一客户端(例如手机)。在该场景中,即使一个客户端的数据发生微小变化,也需要将整个更新后的数据(或全量的更新后的数据)在客户端和服务器之间进行传送。这对于需要频繁更新的数据或数据量巨大的数据,无疑会极大的占用网络带宽,耗费大量资源。FIG. 1 is a schematic diagram of a scenario of synchronizing data among multiple clients in the prior art. The scenario is: the same user can log in to different clients (such as a mobile phone and a PC), and each client is connected to a server for data sharing and synchronization. When the user changes certain data, such as favorites, when logging into one of the clients (such as a PC), an updated version of the favorites will be stored on the client. When the user can log in another client next time to use this updated favorites, the client first transmits the updated favorites to the server, and when the user logs in another client, the server will send the updated favorites to the server. The updated favorites are sent to another client (such as a mobile phone) currently logged in by the user. In this scenario, even if the data of a client changes slightly, the entire updated data (or a full amount of updated data) needs to be transmitted between the client and the server. For data that needs to be updated frequently or data with a huge amount of data, it will undoubtedly greatly occupy network bandwidth and consume a lot of resources.
图2是现有技术中在主从服务器之间同步数据的场景示意图。该场景为,数据共享网络中包括主服务器和从服务器,当主服务器中的一个数据发生了变化时,该主服务器需要将整个更新后的数据传送给从服务器。该数据例如是一个文件,或者是文件中的部分数据。同样,该场景中也不区分数据更新量的大小,而是直接将整个更新后的数据在主、从服务器之间进行传送。Fig. 2 is a schematic diagram of a scenario of synchronizing data between master and slave servers in the prior art. In this scenario, the data sharing network includes a master server and a slave server. When a piece of data in the master server changes, the master server needs to transmit the entire updated data to the slave server. The data is, for example, a file, or part of data in the file. Similarly, in this scenario, the amount of data update is not distinguished, but the entire updated data is directly transmitted between the master and slave servers.
由此可见,现有技术中极需一种更加资源集约化的数据更新方法,以降低数据更新带来的带宽占用和资源消耗。It can be seen that a more resource-intensive data update method is extremely needed in the prior art to reduce bandwidth occupation and resource consumption caused by data update.
发明内容Contents of the invention
鉴于上述问题,提出了本发明以便提供一种克服上述问题或者至少部分地解决上述问题的基于增量数据的数据更新方法与装置。In view of the above problems, the present invention is proposed to provide a data update method and device based on incremental data that overcomes the above problems or at least partially solves the above problems.
依据本发明的一个方面,提供了一种由数据处理装置共享更新数据的方法,所述数据处理装置存储有更新前的数据和更新后的数据,且能够与一个服务器进行数据交换,该方法包括如下步骤:所述数据处理装置根据更新前的数据和更新后的数据生成增量数据,并将该增量数据发送到该服务器,以便该服务器向其他连接于服务器的数据处理装置共享该更新后的数据,其中所述增量数据是指更新后的数据相对于更新前的数据的变化的数据。According to one aspect of the present invention, a method for sharing updated data by a data processing device is provided, the data processing device stores data before updating and data after updating, and can exchange data with a server, the method includes The following steps: the data processing device generates incremental data according to the data before updating and the data after updating, and sends the incremental data to the server, so that the server can share the updated data with other data processing devices connected to the server. The data, wherein the incremental data refers to the data of the change of the updated data relative to the data before the update.
本发明还提出一种基于服务器的数据更新方法,所述服务器能够与若干数据处理装置进行数据交换,该方法包括如下步骤:所述服务器从一个数据处理装置接收数据,并将该数据保存在该服务器中,该数据包括增量数据,所述增量数据是指该数据处理装置中更新后的数据相对于更新前数据的变化的数据;所述服务器将其保存的数据的至少一部分发送到另一个数据处理装置,该另一个数据处理装置根据其待更新的数据和接收到的数据生成经更新的数据。The present invention also proposes a server-based data update method, the server can exchange data with several data processing devices, the method includes the following steps: the server receives data from a data processing device, and saves the data in the In the server, the data includes incremental data, and the incremental data refers to the data of the data after the update in the data processing device relative to the data before the update; the server sends at least a part of the stored data to another A data processing device, the other data processing device generates updated data based on its data to be updated and received data.
本发明还提出一种获取更新数据的方法,应用于数据处理装置中,所述数据处理装置中保存有待更新的数据,且其能够与一个服务器进行数据交换,该方法包括:所述数据处理装置从所述服务器中接收数据,所述数据包括增量数据;所述数据处理装置根据其保存的待更新的数据与所接收的该数据产生经更新的数据,其中,所述增量数据是指更新后的数据相对于更新前的数据的变化的数据。本发明还提出一种数据处理装置,用于共享更新数据,所述数据处理装置存储有更新前的数据和更新后的数据,且能够与一个服务器进行数据交换,该数据处理装置包括:增量数据生成模块,用于根据更新前的数据和更新后的数据生成增量数据,其中所述增量数据是指更新后的数据相对于更新前的数据的变化的数据;通信模块,用于将数据发送到所述服务器,所述数据包括该增量数据。本发明还提出一种数据处理装置,用于接收更新数据,所述数据处理装置存储有待更新的数据,且能够与一个服务器进行数据交换,该数据处理装置包括:通信模块,用于从所述服务器接收数据,所述数据包括增量数据,所述增量数据是指更新后的数据相对于更新前的数据的变化的数据;数据更新模块,用于根据该待更新的数据与该获取到的数据产生经更新的数据。本发明还提出一种服务器,用于提供数据更新服务,所述服务器能够与若干数据处理装置进行数据交换,该服务器包括:通信模块,用于从一个数据处理装置接收数据,所述数据包括增量数据,所述增量数据是指更新后的数据相对于更新前的数据的变化的数据;数据存储模块,用于保存从所述数据处理装置接收的数据。The present invention also proposes a method for acquiring updated data, which is applied to a data processing device, wherein the data processing device stores data to be updated, and can exchange data with a server, the method comprising: the data processing device Receive data from the server, the data includes incremental data; the data processing device generates updated data according to the data to be updated stored by it and the received data, wherein the incremental data refers to The data of the change of the updated data with respect to the data before the update. The present invention also proposes a data processing device for sharing updated data. The data processing device stores data before updating and data after updating, and can exchange data with a server. The data processing device includes: incremental The data generation module is used to generate incremental data according to the data before updating and the data after updating, wherein the incremental data refers to the data of the data after updating relative to the data before updating; the communication module is used to Data is sent to the server, the data including the incremental data. The present invention also proposes a data processing device for receiving update data, the data processing device stores data to be updated, and can exchange data with a server, the data processing device includes: a communication module, used for The server receives data, and the data includes incremental data, and the incremental data refers to the data of the data after the update relative to the data before the update; the data update module is used to update the data according to the acquired data The data for produces updated data. The present invention also proposes a server for providing data update service, the server can exchange data with several data processing devices, the server includes: a communication module for receiving data from a data processing device, the data includes Quantitative data, the incremental data refers to the data of the change of the updated data relative to the data before the update; the data storage module is used to save the data received from the data processing device.
本发明还提出一种用于进行数据更新的系统,包括上传数据处理装置、下载数据处理装置和服务器,所述上传数据处理装置和下载数据处理装置中保存有数据,且均能够与该服务器进行数据交换,其特征在于:所述上传数据处理装置用于根据更新前的数据和更新后的数据生成增量数据,其中所述增量数据是指更新后的数据相对于更新前的数据的变化的数据,所述上传数据处理装置还用于将数据发送到该服务器;所述服务器接收并保存该数据,并将该数据中的至少一部分发送到所述下载数据处理装置;所述下载数据处理装置用于从所述服务器接收所述数据,并根据待更新的数据与该接收的数据产生经更新的数据。根据本发明的数据更新方法和系统基于增量数据,由于增量数据的数据量小于全量的更新后的数据,因此能够大大减小数据更新时所占用的网络带宽、提高更新的速度、效率和实时性。The present invention also proposes a system for updating data, including an upload data processing device, a download data processing device, and a server. Data are stored in the upload data processing device and the download data processing device, and both can communicate with the server. Data exchange, characterized in that: the uploaded data processing device is used to generate incremental data according to the data before updating and the data after updating, wherein the incremental data refers to the change of the data after updating relative to the data before updating The upload data processing device is also used to send the data to the server; the server receives and saves the data, and sends at least a part of the data to the download data processing device; the download data processing The device is used for receiving the data from the server, and generating updated data according to the data to be updated and the received data. According to the data update method and system of the present invention, based on incremental data, since the amount of incremental data is less than the full amount of updated data, it can greatly reduce the network bandwidth occupied by data update, improve the update speed, efficiency and real-time.
上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention, it can be implemented according to the contents of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and understandable , the specific embodiments of the present invention are enumerated below.
附图说明Description of drawings
通过阅读下文优选实施方式的详细描述,各种其他的优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式的目的,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiment. The drawings are only for the purpose of illustrating a preferred embodiment and are not to be considered as limiting the invention. Also throughout the drawings, the same reference numerals are used to designate the same parts. In the attached picture:
图1是现有技术中在多个客户端之间同步数据的场景示意图;FIG. 1 is a schematic diagram of a scenario of synchronizing data between multiple clients in the prior art;
图2是现有技术中在主、从服务器之间同步数据的场景示意图;FIG. 2 is a schematic diagram of a scenario of synchronizing data between master and slave servers in the prior art;
图3是本发明的基于增量数据的数据更新方法的基本步骤流程图;Fig. 3 is the flow chart of basic steps of the data update method based on incremental data of the present invention;
图4是本发明的第一实施例的基于增量数据的数据更新方法的场景示意图;FIG. 4 is a schematic diagram of a scenario of a method for updating data based on incremental data according to the first embodiment of the present invention;
图5是本发明的第一实施例的基于增量数据的数据更新方法的流程图;Fig. 5 is the flow chart of the data update method based on incremental data of the first embodiment of the present invention;
图6是本发明的第一实施例的基于增量数据的数据更新系统的架构示意图;FIG. 6 is a schematic structural diagram of a data update system based on incremental data according to the first embodiment of the present invention;
图7是本发明的第二实施例的基于增量数据的数据更新方法的流程图;FIG. 7 is a flow chart of a method for updating data based on incremental data according to the second embodiment of the present invention;
图8是本发明的第二实施例的基于增量数据的数据更新系统的架构示意图。FIG. 8 is a schematic structural diagram of a data update system based on incremental data according to a second embodiment of the present invention.
具体实施方式detailed description
下面将参照附图更详细地描述本公开的示例性实施例。虽然附图中显示了本公开的示例性实施例,然而应当理解,可以以各种形式实现本公开而不应被这里阐述的实施例所限制。相反,提供这些实施例是为了能够更透彻地理解本公开,并且能够将本公开的范围完整的传达给本领域的技术人员。Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided for more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
本发明提出一种新的数据更新方法和相应的装置,本发明的方法和装置适合应用于任何具有数据处理能力的数据处理设备,包括固定或移动的数据处理设备,例如个人电脑(PC)、服务器、掌上电脑、智能手机等。The present invention proposes a new data update method and corresponding device. The method and device of the present invention are suitable for any data processing equipment with data processing capabilities, including fixed or mobile data processing equipment, such as personal computers (PCs), Servers, PDAs, Smartphones, etc.
假定一个数据处理设备中存储有一数据文件,该数据文件可能不断地需要更新,以下简称数据。为了避免在数据更新时传送用于替代更新前的数据的整个更新后的数据,本发明中提出“增量数据”的概念。Assuming that a data processing device stores a data file, the data file may need to be continuously updated, hereinafter referred to as data. In order to avoid transmitting the entire updated data used to replace the data before the update when the data is updated, the concept of "incremental data" is proposed in the present invention.
在说明“增量数据”之前,我们首先定义本发明中的“全量数据”的概念。我们将全量数据定义为:不依赖待更新的数据就能对该待更新的数据进行更新的数据。也就是说,只要将全量数据传到数据处理设备中,并将它取代待更新的数据,就完成了数据的更新,而不需要进行任何其他的操作。可见,现有技术的数据更新方法其实就是直接使用全量的更新后的数据取代待更新的数据得到全量的经更新的数据的方法。例如,待更新的数据为一个收藏夹,该收藏夹包括多个收藏项目,那么,一个全量的更新后的数据就是一个不同于原收藏夹的新收藏夹。该新收藏夹可以包含原始收藏夹中的一些项目,也可以完全不包含原始收藏夹中的项目,只要将该新的收藏夹取代原始的收藏夹,就完成了数据更新。使用全量的更新后的数据来进行数据更新的好处是不需要考虑原始数据的数据内容是什么,也无论其是什么类型的数据,都能直接进行数据更新。但是,如前所述,其缺点是数据传送量大,浪费系统资源。Before explaining "incremental data", we first define the concept of "full data" in the present invention. We define full data as: data that can update the data to be updated without relying on the data to be updated. That is to say, as long as the full amount of data is transmitted to the data processing device and replaced by the data to be updated, the data update is completed without any other operations. It can be seen that the data update method in the prior art is actually a method of directly using the full amount of updated data to replace the data to be updated to obtain the full amount of updated data. For example, the data to be updated is a favorite, and the favorite includes multiple favorite items. Then, a full amount of updated data is a new favorite different from the original favorite. The new collection may contain some items in the original collection, or may not contain the items in the original collection at all, as long as the new collection replaces the original collection, the data update is completed. The advantage of using the full amount of updated data for data update is that it does not need to consider the data content of the original data, and no matter what type of data it is, the data update can be performed directly. However, as mentioned earlier, its disadvantage is that the amount of data transmission is large, which wastes system resources.
由此,本发明提出基于“增量数据”的数据更新方法、装置和系统,本发明提出的“增量数据”是指更新后的数据相对于更新前数据的变化的数据。所谓的变化表示的是更新后的数据与更新前的数据的区别。也就是说,增量数据是将更新前的数据和更新后的数据进行某种运算得到的数据。而具体采用何种运算,则可根据数据的类型来决定。Therefore, the present invention proposes a data update method, device and system based on "incremental data", and the "incremental data" proposed by the present invention refers to the data after updating relative to the data before updating. The so-called change represents the difference between the updated data and the data before the update. That is to say, incremental data is data obtained by performing certain operations on the data before updating and the data after updating. The specific operation to be used can be determined according to the type of data.
若更新前的数据和更新后的数据均为数字,则所述运算方法可以是简单的数学运算。例如,当更新前的数据为2,更新后的数据为3,则增量数据可以等于更新后的数据减去更新前的数据,即增量数据为=3-2=1。If both the data before updating and the data after updating are numbers, the operation method can be a simple mathematical operation. For example, when the data before updating is 2 and the data after updating is 3, the incremental data may be equal to the data after updating minus the data before updating, that is, the incremental data is =3−2=1.
若更新前的数据和更新后的数据均为收藏夹,则所述运算方法可以是一种比较算法。例如,更新前的收藏夹包括“网址1”、“网址2”、“网址3”,而更新后的收藏夹的包括“网址1”、“网址2”、“网址3”和“网址4”,则经由比较计算,得到增量数据为“网址4”。If both the data before updating and the data after updating are favorites, the calculation method may be a comparison algorithm. For example, the pre-update favorites include "URL 1", "URL 2", "URL 3", while the updated favorites include "URL 1", "URL 2", "URL 3" and "URL 4" , then the incremental data is obtained as "URL 4" through comparison and calculation.
当然,以上例子均为数据类型比较简单的情况,本发明可以扩展到任何的数据类型,只要存在更新前的数据和更新后的数据之间的适当的计算方法,均可以通过该计算方法得到增量数据。Of course, the above examples are all cases where the data type is relatively simple, and the present invention can be extended to any data type, as long as there is an appropriate calculation method between the data before updating and the data after updating, it can be increased by this calculation method. Quantitative data.
在目前的网络通信中,针对数据处理设备和数据传输系统而言,最广泛应用的数据分为两种,一种是描述性数据,另一种是二进制数据。描述性数据是用能够被人理解的语言来描述信息的数据,适用于人机交互,例如自然语言数据、超文本语言数据(诸如HTML、XML和Json等)和高级编程语言(C语言、Javascript等)的程序代码数据,等等。对于描述性数据,本发明可以根据现有的数据格式来选择计算方法,也可以在现有的数据格式中设定专门的数据标签,以利于计算的进行。例如,对于XML格式的数据,可以依据XML文件中既有的标签来计算增量数据,也可以自己定义用于增量数据计算的专用标签。In current network communications, for data processing equipment and data transmission systems, the most widely used data are divided into two types, one is descriptive data, and the other is binary data. Descriptive data is data that describes information in a language that can be understood by humans, and is suitable for human-computer interaction, such as natural language data, hypertext language data (such as HTML, XML, and Json, etc.) and high-level programming languages (C language, Javascript, etc.) etc.), program code data, etc. For the descriptive data, the present invention can select the calculation method according to the existing data format, or set a special data label in the existing data format, so as to facilitate the calculation. For example, for data in XML format, incremental data can be calculated based on existing tags in the XML file, or special tags for incremental data calculation can be defined by yourself.
例如,对于如下需要更新的XML的代码为:For example, the code for the following XML that needs to be updated is:
用于更新的全量数据的XML代码为:The XML code for the updated full amount of data is:
则增量数据可以为Then the incremental data can be
{0114,creattime,Rep,2010.08.21},{0114, creattime, Rep, 2010.08.21},
其中“0114“表示更新前的数据的id,creattime表示该id下的标签名,Rep表示“替换”,2010.08.21表示替换内容。Among them, "0114" indicates the id of the data before updating, creattime indicates the tag name under the id, Rep indicates "replacement", and 2010.08.21 indicates the replacement content.
由此可见,在更新描述性数据时,增量数据也可以是用于描述变化量的描述性数据,通常来说,增量数据的数据量相比于全量的更新后的数据会小很多,特别是对于更新前的数据庞大,而变化量不太大的情况。It can be seen that when updating descriptive data, incremental data can also be descriptive data used to describe the amount of change. Generally speaking, the data volume of incremental data will be much smaller than that of the full updated data. Especially for the case where the data before the update is huge and the amount of change is not too large.
另一种情况是,更新前的数据和更新后的数据均为二进制数据,二进制数据在此指的是适合于数据处理设备存储、传输的数据,二进制数据通用、稳定、不需要针对不同应用二次开发,例如各种计算机文件(包括图片、视频)、编译后的程序代码等。In another case, both the data before updating and the data after updating are binary data. Binary data here refers to data suitable for storage and transmission of data processing equipment. Binary data is universal, stable, and does not need to be used for different applications. Secondary development, such as various computer files (including pictures, videos), compiled program codes, etc.
在现有技术中已存在一些针对通用的二进制数据进行比较的计算方法。本发明可以直接采用现有技术中的计算方法,本领域普通技术人员也可以通过对已知的算法进行适应性的变化来设计专门用于特定数据类型的增量数据的计算方法。In the prior art, there are already some calculation methods for comparing general binary data. The present invention can directly adopt the calculation method in the prior art, and those skilled in the art can also design a calculation method specially used for incremental data of a specific data type by making adaptive changes to known algorithms.
需要注意的是,本发明采用的计算方法优选为可逆算法。It should be noted that the calculation method used in the present invention is preferably a reversible algorithm.
基于上述关于增量数据的原理,本发明的用于数据处理设备的数据更新方法包括如下两个基本步骤,如图3所示。Based on the above-mentioned principle about incremental data, the data update method for data processing equipment of the present invention includes the following two basic steps, as shown in FIG. 3 .
(1)将由更新前的数据和更新后的数据生成的增量数据发送到一个数据处理设备;(1) sending the incremental data generated by the data before updating and the data after updating to a data processing device;
(2)在该数据处理设备中,根据待更新的数据和该增量数据形成经更新的数据。(2) In the data processing apparatus, updated data is formed from the data to be updated and the incremental data.
前文中已经说明了如何生成增量数据,在利用本发明进行数据更新时,还需要根据待更新的数据和增量数据生成经更新的数据。也就是说,本发明还需要生成全量的经更新的数据,并使生成的全量的经更新的数据来取代待更新的数据。How to generate incremental data has been described above. When using the present invention to update data, it is also necessary to generate updated data according to the data to be updated and the incremental data. That is to say, the present invention also needs to generate a full amount of updated data, and make the generated full amount of updated data replace the data to be updated.
根据本发明,生成经更新的数据的过程可以是生成增量数据的逆运算,当生成增量数据的计算方法是可逆算法时,使得根据待更新的数据和增量数据生成全量的经更新的数据成为可能。例如,对于前面例子中的纯数学运算,若更新前的数据为2,更新后的数据为3,待更新的数据与更新前的数据相同,也为2,计算增量数据的算法为更新后的数据减去更新前的数据,即增量数据为=3-2=1,那么,生成全量的经更新的数据的算法为上述算法的逆运算,即待更新的数据加上增量数据,即经更新的数据为=2+1=3。According to the present invention, the process of generating updated data can be the inverse operation of generating incremental data. When the calculation method for generating incremental data is a reversible algorithm, a full amount of updated data can be generated based on the data to be updated and the incremental data. Data made possible. For example, for the pure mathematical operation in the previous example, if the data before the update is 2 and the data after the update is 3, the data to be updated is the same as the data before the update, which is also 2, and the algorithm for calculating the incremental data is after the update The data before the update is subtracted from the data before the update, that is, the incremental data is =3-2=1, then, the algorithm for generating the full amount of updated data is the inverse operation of the above algorithm, that is, the data to be updated plus the incremental data, That is, the updated data is =2+1=3.
对于描述性增量数据,则所述的逆运算可以是解析所述描述性增量数据来产生经更新的数据。例如,对于描述性增量数据{0114,creattime,Rep,2010.08.21},可以将其解析为对ID为0114中的标签creattime的值替换为2010.08.21。For descriptive incremental data, the inverse operation may be parsing the descriptive incremental data to generate updated data. For example, for the descriptive incremental data {0114, creattime, Rep, 2010.08.21}, it can be parsed as replacing the value of the tag creattime in ID 0114 with 2010.08.21.
同理,对于二进制数据,可以使用前述的针对二进制数据计算增量数据的算法的逆算法来由待更新的数据和增量数据生成经更新的数据。为使本发明的目的、技术方案和优点更加清楚明白,以下结合具体实施例,并参照附图,对本发明作进一步的详细说明。Similarly, for binary data, the inverse algorithm of the aforementioned algorithm for calculating incremental data for binary data may be used to generate updated data from the data to be updated and the incremental data. In order to make the object, technical solution and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with specific embodiments and with reference to the accompanying drawings.
<第一实施例><First embodiment>
图4是本发明的第一实施例的基于增量数据的数据更新方法的场景示意图。从图4可以看出,该第一实施例的方法与图1所示的方法的系统架构类似。该实施例实现的是一种在客户端之间同步数据的方法,所述客户端包括上传客户端和下载客户端,上传客户端和下载客户端均能够与一个服务器进行数据交换。Fig. 4 is a schematic diagram of a scenario of a method for updating data based on incremental data according to the first embodiment of the present invention. It can be seen from FIG. 4 that the method of the first embodiment is similar to the system architecture of the method shown in FIG. 1 . This embodiment implements a method for synchronizing data between clients, where the clients include an upload client and a download client, both of which can exchange data with a server.
所述上传客户端是指用于将数据传送至所述服务器的客户端,所述下载客户端是指用于从服务器下载数据的客户端。The upload client refers to a client for transmitting data to the server, and the download client refers to a client for downloading data from the server.
为了区分每次更新后的数据,也为了描述方便,在此使用了版本这一概念。在本发明中,原始数据以及在原始数据基础之上进行的每一次更新都对应一个版本。版本用版本号来表示。例如设定原始数据的版本号可以是1.0.0.0,第一次更新的数据版本号为1.0.0.1,第二次更新的数据版本号为1.0.0.2,以此类推。根据本发明,原始数据也可为空数据。In order to distinguish the data after each update, and for the convenience of description, the concept of version is used here. In the present invention, the original data and each update based on the original data correspond to a version. Versions are indicated by version numbers. For example, the version number of the original data may be set to 1.0.0.0, the version number of the data updated for the first time is 1.0.0.1, the version number of the data updated for the second time is 1.0.0.2, and so on. According to the present invention, the original data can also be empty data.
图5是本发明的第一实施例的基于增量数据的数据更新方法的流程图。如图5所示。本发明的方法包括三个步骤:Fig. 5 is a flow chart of the method for updating data based on incremental data according to the first embodiment of the present invention. As shown in Figure 5. The method of the present invention comprises three steps:
首先,上传客户端根据更新前的数据和更新后的数据产生增量数据,并将该增量数据上传到服务器中;First, the upload client generates incremental data according to the data before updating and the data after updating, and uploads the incremental data to the server;
接着,所述服务器接收由所述上传客户端传送的所述增量数据,并将该增量数据在该服务器上进行保存;Next, the server receives the incremental data transmitted by the upload client, and saves the incremental data on the server;
最后,所述服务器将所述增量数据发送到下载客户端,下载客户端根据所述待更新的数据和该增量数据生成经更新的数据。Finally, the server sends the incremental data to the download client, and the download client generates updated data according to the data to be updated and the incremental data.
上述方法能够实现的前提是上传客户端保存有更新前的数据和更新后的数据,下载客户端中保存有待更新的数据,待更新数据可以为空。此外,服务器中可以只保存增量数据,也可以同时保存全量的更新后的数据。The premise that the above method can be realized is that the uploading client stores the data before updating and the data after updating, and the downloading client stores the data to be updated, and the data to be updated can be empty. In addition, only incremental data may be saved in the server, or a full amount of updated data may be saved at the same time.
根据本发明,所述上传客户端和下载客户端均可以是能够与所述服务器进行数据交换的任一客户端,对其个数并不限定。According to the present invention, both the uploading client and the downloading client may be any client capable of exchanging data with the server, and the number thereof is not limited.
根据本发明,将增量数据发送给与该服务器连接的下载客户端时,可以依据预先设置发送增量数据,该预先设置可以是一定的规则,所述规则可以是自动转发规则,也可以是按请求规则。According to the present invention, when the incremental data is sent to the download client connected to the server, the incremental data can be sent according to the preset, the preset can be a certain rule, and the rule can be an automatic forwarding rule or a By request rules.
自动转发规则例如是:所述服务器一旦接收到由上传客户端上传的增量数据时,就向所有与之相连接的客户端发送数据更新通知,询问其是否需要更新数据,当任一客户端返回接收更新数据时,向该客户端发送增量数据。又例如,所述服务器一旦接收到由上传客户端上传的增量数据时,就向同一用户的所有其他客户端发送增量数据。当然,自动转发规则也可以有别的设定,例如定时询问和发送,或者一旦客户端与该服务器相连,则进行询问和发送,等等。The automatic forwarding rule is, for example: once the server receives the incremental data uploaded by the uploading client, it will send a data update notification to all connected clients, asking whether it needs to update the data, when any client When returning to receive update data, send incremental data to the client. For another example, once the server receives the incremental data uploaded by the uploading client, it sends the incremental data to all other clients of the same user. Of course, the automatic forwarding rules can also have other settings, such as timing query and sending, or once the client is connected to the server, then query and send, and so on.
按请求规则是服务器按照客户端的请求发送增量数据。也就是说,服务器在只有接收到数据更新请求时,才向发出请求的客户端发送增量数据。The rule of request is that the server sends incremental data according to the client's request. That is to say, the server sends incremental data to the requesting client only when it receives a data update request.
该第一实施例的数据更新系统的架构如图6所示,其中1为服务器,2~5均为客户端。服务器包括有通信模块和数据存储模块,客户端包括有通信模块和数据更新模块。服务器1的通信模块与各客户端2~5的通信模块均能进行数据交换。所述客户端2~5可以分别作为上传客户端或者下载客户端,也可以同时既作为上传客户端,又作为下载客户端。The architecture of the data updating system in the first embodiment is shown in FIG. 6 , where 1 is a server, and 2 to 5 are clients. The server includes a communication module and a data storage module, and the client includes a communication module and a data update module. The communication module of the server 1 can exchange data with the communication modules of the clients 2-5. The clients 2-5 can be used as uploading clients or downloading clients respectively, or can be used as both uploading clients and downloading clients at the same time.
当作为上传客户端时,数据更新模块用于根据更新前的数据和更新后的数据产生增量数据;通信模块用于将包括增量数据的数据发送到所述服务器。When used as an upload client, the data updating module is used to generate incremental data according to the data before updating and the data after updating; the communication module is used to send the data including the incremental data to the server.
当作为下载客户端时,通信模块用于从所述服务器接收数据,该数据包括增量数据,数据更新模块用于根据该客户端保存的待更新的数据与该接收的数据产生经更新的数据。When used as a download client, the communication module is used to receive data from the server, the data includes incremental data, and the data update module is used to generate updated data according to the data to be updated saved by the client and the received data .
在本实施例中,各客户端的数据更新模块既能够根据更新前的数据及更新后的数据产生增量数据,也能够根据待更新的数据和增量数据生成经更新的数据。通信模块既能够用于上传数据,也用于下载数据。当客户端2~5中的任一客户端产生了增量数据并通过其通信模块将包括增量数据的数据发送到服务器1时,该客户端即作为此次更新的上传客户端;当客户端2~5中的任一客户端通过其通信模块从服务器下载数据时,该客户端即为此次更新的下载客户端。In this embodiment, the data update module of each client can generate incremental data according to the data before updating and the data after updating, and can also generate updated data according to the data to be updated and the incremental data. The communication module can be used for both uploading data and downloading data. When any one of the clients 2-5 generates incremental data and sends the data including the incremental data to server 1 through its communication module, the client acts as the upload client for this update; when the client When any client in terminals 2-5 downloads data from the server through its communication module, this client is the download client for this update.
服务器的数据存储模块用于存储由上传客户端上传的增量数据。根据本发明的一种实施方式,服务器在保存增量数据时,还保存该增量数据的版本信息,例如是一个版本号。The data storage module of the server is used for storing the incremental data uploaded by the uploading client. According to an embodiment of the present invention, when the server saves the incremental data, it also saves version information of the incremental data, such as a version number.
服务器的通信模块一方面用于从上传客户端接收增量数据,另一面,还用于根据一定的规则,将该增量数据发送到任一需要进行数据更新的下载客户端,以便该下载客户端根据该增量数据进行更新。所述的规则如前所述,在此不再赘述。On the one hand, the communication module of the server is used to receive incremental data from the upload client, and on the other hand, it is also used to send the incremental data to any download client that needs to update the data according to certain rules, so that the download client The terminal is updated according to the incremental data. The rules are as mentioned above, and will not be repeated here.
图5所示的客户端数量为4个,但这仅仅是示意情况。如前所述,本发明对于客户端的数量不作限制。The number of clients shown in FIG. 5 is four, but this is only an illustrative situation. As mentioned above, the present invention does not limit the number of clients.
<第二实施例><Second Embodiment>
图7是本发明的第二实施例的基于增量数据的数据更新方法的流程图。Fig. 7 is a flow chart of a data update method based on incremental data according to the second embodiment of the present invention.
如前所述,第一实施例描述了根据本发明的数据更新方法进行一次数据更新的流程。该第二实施例是在第一实施例的基础上实现基于增量数据的多次更新。As mentioned above, the first embodiment describes the process of performing a data update according to the data update method of the present invention. The second embodiment implements multiple updates based on incremental data on the basis of the first embodiment.
对于进行了多次更新之后产生的增量数据,由于其是在原始数据的基础之上进行了多次计算,因此其数据的冗余问题可能会比较严重。在这种情况下,继续采用增量数据更新可能不能够取得相对更加优良的效果。因此,该第二实施例中,在服务器中设定一个第一阈值,当数据的版本数目达到该第一阈值时,该服务器要求上传客户端将该最新版本的全量的更新后的数据发送到该服务器,并在该服务器上保存该全量的更新后的数据。For the incremental data generated after multiple updates, since it is calculated multiple times on the basis of the original data, the data redundancy problem may be serious. In this case, continuing to use incremental data updates may not be able to achieve relatively better results. Therefore, in the second embodiment, a first threshold is set in the server, and when the number of versions of the data reaches the first threshold, the server requires the upload client to send the latest version of the full amount of updated data to the server, and save the full amount of updated data on the server.
根据本发明的一种具体实施方式,在服务器上也同时保存该全量的更新后的数据的版本信息。对于同一次更新时的全量的更新后的数据和增量数据,其可以共享一个版本号。According to a specific implementation manner of the present invention, version information of the entire amount of updated data is also saved on the server at the same time. For the full amount of updated data and incremental data in the same update, they can share a version number.
例如,若服务器设定第一阈值为20,而服务器中保存了如下版本的数据,For example, if the server sets the first threshold to 20, and the server stores data of the following versions,
1.0.0.0 原1.0.0.0 original
1.0.0.1 增1.0.0.1 added
1.0.0.2 增1.0.0.2 added
……...
1.0.0.18 增1.0.0.18 added
1.0.0.19 增(达到第20个版本)1.0.0.19 added (up to version 20)
(其中,“原”表示原始数据,“增”表示增量数据,可以没有原始数据)(Wherein, "original" means original data, "increment" means incremental data, and there may be no original data)
此时,服务器要求发送1.0.0.19版的增量数据的上传客户端将1.0.0.19版的全量的更新后的数据也发送到该服务器。于是,服务器中保存如下版本的数据:At this time, the server requires the uploading client that sends the incremental data of version 1.0.0.19 to also send the full amount of updated data of version 1.0.0.19 to the server. Therefore, the following versions of data are saved in the server:
1.0.0.0 原1.0.0.0 original
1.0.0.1 增1.0.0.1 added
1.0.0.2 增1.0.0.2 added
……...
1.0.0.18 增1.0.0.18 added
1.0.0.19 增1.0.0.19 added
1.0.0.19 全1.0.0.19 full
(其中,“全”表示全量的更新后的数据)。(Wherein, "full" means the full amount of updated data).
根据本发明的其他实施例,也可以由上传客户端来决定是否上传全量的更新后的数据到服务器中。According to other embodiments of the present invention, the upload client may also decide whether to upload the full amount of updated data to the server.
如前所述,在服务器中保存增量数据,当经过多次更新之后,在服务器中就保存有原始数据和基于该原始数据的多个版本的增量数据。通常,受限于硬件条件或者基于系统资源的考虑,对于某个数据(例如一个软件或一个文件),在服务器上能够保存的数据版本的数量不可能无限大。因此,还可以为服务器上的数据版本的数量设定另一个上限值,在此称为第二阈值。根据本发明的该实施例,当服务器上的数据版本数量达到该第二阈值时,必须删除较旧版本的数据,以保持数据版本的数目不多于该第二阈值。As mentioned above, the incremental data is saved in the server, and after multiple updates, the original data and multiple versions of the incremental data based on the original data are saved in the server. Usually, limited by hardware conditions or based on system resource considerations, for a certain data (such as a piece of software or a file), the number of data versions that can be stored on the server cannot be infinite. Therefore, another upper limit may also be set for the number of data versions on the server, which is referred to as a second threshold here. According to this embodiment of the present invention, when the number of data versions on the server reaches the second threshold, older versions of data must be deleted so as to keep the number of data versions not more than the second threshold.
根据本发明的一种具体实施方式,所述第二阈值大于所述第一阈值。并且,在删除较早版本的数据时,至少保留一个全量的更新后的数据或原始数据。更优选的为,当具有多个全量的更新后的数据时,至少保留与当前版本最接近的版本的全量的更新后的数据。According to a specific implementation manner of the present invention, the second threshold is greater than the first threshold. And, when deleting earlier versions of data, at least one full amount of updated data or original data is retained. More preferably, when there are multiple full amounts of updated data, at least the full amount of updated data of the version closest to the current version is retained.
例如,第二阈值为30,那么结合以下示例说明根据第二阈值的版本操作过程。假设在服务器中保存如下版本的数据:For example, if the second threshold is 30, then the version operation process according to the second threshold will be described with reference to the following example. Assume that the following versions of data are saved in the server:
1.0.0.0 原1.0.0.0 original
1.0.0.1 增1.0.0.1 added
1.0.0.2 增1.0.0.2 added
……...
1.0.0.18 增1.0.0.18 added
1.0.0.19 增1.0.0.19 added
1.0.0.19 全1.0.0.19 full
1.0.0.20 增1.0.0.20 added
……...
1.0.0.28 增1.0.0.28 added
当此时再有客户端向服务器更新该数据,从而在服务器中保存新的数据版本1.0.0.29时,该数据的版本数达到第二阈值30。从而服务器删除较早的版本1.0.0.0。在服务器保存的数据版本1.0.0.1至1.0.0.29中,包括至少一个全量的数据,例如在本例中是版本1.0.0.19全。At this time, when the client updates the data to the server again, thereby saving the new data version 1.0.0.29 in the server, the version number of the data reaches the second threshold 30. Thus the server deletes the earlier version 1.0.0.0. The data versions 1.0.0.1 to 1.0.0.29 stored on the server include at least one full amount of data, for example, version 1.0.0.19 full in this example.
版本更新new version update
在该第二实施例中,服务器上可能存在有原始数据、多个版本的增量数据,也可能存在由上传服务器传送的至少一个全量的更新后的数据。在这种情况下,本发明的数据更新方法可进行更进一步的优化。对于客户端来说,其版本更新操作可以如下所述:In the second embodiment, there may be original data, multiple versions of incremental data on the server, or at least one full amount of updated data transmitted by the upload server. In this case, the data update method of the present invention can be further optimized. For the client, its version update operation can be described as follows:
假如服务器上存在如下版本的数据:If the following versions of data exist on the server:
1.0.0.0 原1.0.0.0 original
1.0.0.1 增1.0.0.1 added
1.0.0.2 增1.0.0.2 added
……...
1.0.0.18 增1.0.0.18 added
1.0.0.19 增1.0.0.19 added
1.0.0.19 全1.0.0.19 full
1.0.0.20 增1.0.0.20 added
1.0.0.21 增1.0.0.21 added
1.0.0.22 增1.0.0.22 added
1.0.0.23 增1.0.0.23 added
根据本发明的一种实施方式,每次客户端向服务器请求更新数据时,服务器将最新版本的更新数据发送到该客户端。该最新版本的更新数据可能是增量数据,也可能是全量的更新后的数据。根据本发明的优选实施方式,当存在同一版本的增量数据和全量的更新后的数据,服务器将全量的更新后的数据发送给客户端。According to an embodiment of the present invention, each time a client requests the server for updating data, the server sends the latest version of the updating data to the client. The updated data of the latest version may be incremental data, or may be full updated data. According to a preferred embodiment of the present invention, when there are incremental data of the same version and full updated data, the server sends the full updated data to the client.
根据本发明的优选实施方式,客户端向服务器请求更新数据时会附上该客户端上的待更新的数据的版本信息,例如版本号。这时,服务器可以根据该版本号与服务器上所有的数据版本号进行比较,以此决定向该客户端发送哪些版本的数据。According to a preferred embodiment of the present invention, when the client requests the server to update data, it will attach version information of the data to be updated on the client, such as a version number. At this time, the server can compare the version number with all data version numbers on the server to determine which versions of data to send to the client.
在这种情况下,更优选的为,当服务器上存在高于客户端当前版本的全量的更新后的数据时,服务器只选择将该版本的全量的更新后的数据和版本高于该全量的更新后的数据的增量数据进行发送;更优选的为,当服务器上存在不止一个高于客户端版本的全量的更新后的数据时,服务器只选择将最高版本的全量的更新后的数据和高于该全量的更新后的数据的版本的增量数据进行发送。In this case, it is more preferable that when there is updated data higher than the full amount of the current version of the client on the server, the server only selects the updated data of the full amount of the version and the updated data of the version higher than the full amount. The incremental data of the updated data is sent; more preferably, when there is more than one full amount of updated data higher than the client version on the server, the server only selects the highest version of the full amount of updated data and Incremental data of a version higher than the full amount of updated data is sent.
例如,在上面给出的例子中,For example, in the example given above,
(1)当客户端当前的数据版本(即随请求发送给服务器的数据版本)为“1.0.0.22”时,服务器可以只向客户端发送:(1) When the current data version of the client (that is, the data version sent to the server with the request) is "1.0.0.22", the server can only send to the client:
1.0.0.23 增1.0.0.23 added
(2)当客户端当前的数据版本(即随请求发送给服务器的数据版本)为“1.0.0.18”时,服务器可以向客户端发送:(2) When the current data version of the client (that is, the data version sent to the server with the request) is "1.0.0.18", the server can send to the client:
1.0.0.19 增1.0.0.19 added
1.0.0.20 增1.0.0.20 added
1.0.0.21 增1.0.0.21 added
1.0.0.22 增1.0.0.22 added
1.0.0.23 增1.0.0.23 added
也可以发送:It is also possible to send:
1.0.0.19 全1.0.0.19 full
1.0.0.20 增1.0.0.20 added
1.0.0.21 增1.0.0.21 added
1.0.0.22 增1.0.0.22 added
1.0.0.23 增。1.0.0.23 added.
此时,服务器可以做出选择,通常可以根据所发送的数据量来决定,选择发送数据量小的。在该例子中,一般来说,全量的更新后的数据大于同一版本的增量数据。此时,前一种方式发送的数据量更小,这时可以选择以前一种方式发送。At this point, the server can make a choice, usually based on the amount of data sent, and choose the one with the smallest amount of data to send. In this example, generally speaking, the full amount of updated data is greater than the incremental data of the same version. At this time, the amount of data sent by the former method is smaller, so you can choose to send it by the former method.
(3)当客户端当前的数据版本(即随请求发送给服务器的数据版本)为“1.0.0.1”时,服务器可以向客户端发送:(3) When the current data version of the client (that is, the data version sent to the server with the request) is "1.0.0.1", the server can send to the client:
1.0.0.2 增1.0.0.2 added
……...
1.0.0.19 增1.0.0.19 added
1.0.0.20 增1.0.0.20 added
1.0.0.21 增1.0.0.21 added
1.0.0.22 增1.0.0.22 added
1.0.0.23 增1.0.0.23 added
也可以仅发送:It is also possible to just send:
1.0.0.19 全1.0.0.19 full
1.0.0.20 增1.0.0.20 added
1.0.0.21 增1.0.0.21 added
1.0.0.22 增1.0.0.22 added
1.0.0.23 增1.0.0.23 added
而此时,由于前一种方式需要发送的增量数据的版本更多,使得发送的数据量可能大于后一种方式,服务器可以选择后一种方式进行发送。At this time, since the former method needs to send more versions of the incremental data, the amount of data sent may be larger than the latter method, and the server can choose the latter method to send.
然而,上面所述的仅仅是示例,在具体选择以何种方式发送时,可以根据实际情况具体设定。例如,在上述的第(2)种情况下,尽管当前更新时以前一种方式进行发送时的数据量更小。但是,若考虑到下一次更新或接下来的更新时,综合考虑总的发送数据量,也可以选择第二种方式。However, what is described above is only an example, and when a specific transmission method is selected, specific settings may be made according to actual conditions. For example, in the above-mentioned case (2), although the data volume when the current update is sent in the previous method is smaller. However, if the next update or the next update is taken into consideration and the total amount of sent data is taken into consideration, the second method can also be selected.
版本恢复version recovery
根据本发明的该第二实施例,当服务器上存储有多个版本的数据时,客户端还可以向服务器请求“版本恢复”。所谓版本恢复是指客户端请求从服务器恢复指定版本的数据。According to the second embodiment of the present invention, when multiple versions of data are stored on the server, the client can also request "version recovery" from the server. The so-called version recovery means that the client requests to restore the data of the specified version from the server.
当客户端向服务器发送一个版本恢复请求时,同时附上需要恢复的版本信息,例如是一个版本号。此时,服务器通过检查其上存储的数据的版本,选择向该客户端发送至少一个全量数据和基于该全量数据的增量数据。When the client sends a version restoration request to the server, it also attaches the version information to be restored, such as a version number. At this point, the server chooses to send at least one full amount of data and incremental data based on the full amount of data to the client by checking the version of the data stored thereon.
例如,当客户端请求从服务器恢复1.0.0.21版本的数据,而服务器上存储有:For example, when the client requests to restore version 1.0.0.21 data from the server, and the server stores:
1.0.0.0 原1.0.0.0 original
1.0.0.1 增1.0.0.1 added
1.0.0.2 增1.0.0.2 added
……...
1.0.0.18 增1.0.0.18 added
1.0.0.19 增1.0.0.19 added
1.0.0.19 全1.0.0.19 full
1.0.0.20 增1.0.0.20 added
1.0.0.21 增1.0.0.21 added
1.0.0.22 增1.0.0.22 added
1.0.0.23 增1.0.0.23 added
此时,服务器可以选择向该客户端发送At this point, the server may choose to send the client a
1.0.0.0 原1.0.0.0 original
1.0.0.1 增1.0.0.1 added
1.0.0.2 增1.0.0.2 added
……...
1.0.0.19 增1.0.0.19 added
1.0.0.20 增1.0.0.20 added
1.0.0.21 增,1.0.0.21 added,
也可以选择向客户端发送You can also choose to send the client
1.0.0.19 全1.0.0.19 full
1.0.0.20 增1.0.0.20 added
1.0.0.21 增。1.0.0.21 added.
根据一种优选实施方式,服务器可以根据发送的数据量的大小来决定以哪种方式发送数据。在此示例中,如果后者的数据量更小,可以选择只发送1.0.0190版的全量数据和1.0.0.20和1.0.0.21版的增量数据。According to a preferred implementation manner, the server may decide which way to send the data according to the amount of data to be sent. In this example, if the latter data volume is smaller, you can choose to send only the full data of version 1.0.0190 and the incremental data of versions 1.0.0.20 and 1.0.0.21.
图8显示了根据本发明的第二实施例的数据更新方法的系统架构图。如图8所示,基本架构与第一实施例类似。FIG. 8 shows a system architecture diagram of a data updating method according to a second embodiment of the present invention. As shown in Fig. 8, the basic structure is similar to that of the first embodiment.
但是,该第二实施例的服务器中还包括一个阈值控制模块,其用于设定所述第一阈值和第二阈值,并且根据第一阈值,控制该通信模块向上传服务器发出上传全量的更新后的数据的指令,以及根据第二阈值,控制该服务器的数据存储模块删除较早版本的数据,使所存储的数据版本不多于第二阈值。However, the server in the second embodiment also includes a threshold control module, which is used to set the first threshold and the second threshold, and according to the first threshold, control the communication module to send an update to upload the full amount to the upload server According to the instruction of the later data, and according to the second threshold, control the data storage module of the server to delete the data of the earlier version, so that the stored data version is not more than the second threshold.
并且,该阈值控制模块还用于控制通信模块向下载客户端发送哪些版本的数据。具体的控制方法如前所述,在此不再赘述。Moreover, the threshold control module is also used to control which versions of data the communication module sends to the download client. The specific control method is as described above, and will not be repeated here.
在此提供的算法和显示不与任何特定计算机、虚拟系统或者其它设备固有相关。各种通用系统也可以与基于在此的示教一起使用。根据上面的描述,构造这类系统所要求的结构是显而易见的。此外,本发明也不针对任何特定编程语言。应当明白,可以利用各种编程语言实现在此描述的本发明的内容,并且上面对特定语言所做的描述是为了披露本发明的最佳实施方式。The algorithms and displays presented herein are not inherently related to any particular computer, virtual system, or other device. Various generic systems can also be used with the teachings based on this. The structure required to construct such a system is apparent from the above description. Furthermore, the present invention is not specific to any particular programming language. It should be understood that various programming languages can be used to implement the content of the present invention described herein, and the above description of specific languages is for disclosing the best mode of the present invention.
在此处所提供的说明书中,说明了大量具体细节。然而,能够理解,本发明的实施例可以在没有这些具体细节的情况下实践。在一些实例中,并未详细示出公知的方法、结构和技术,以便不模糊对本说明书的理解。In the description provided herein, numerous specific details are set forth. However, it is understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure the understanding of this description.
类似地,应当理解,为了精简本公开并帮助理解各个发明方面中的一个或多个,在上面对本发明的示例性实施例的描述中,本发明的各个特征有时被一起分组到单个实施例、图、或者对其的描述中。然而,并不应将该公开的方法解释成反映如下意图:即所要求保护的本发明要求比在每个权利要求中所明确记载的特征更多的特征。更确切地说,如下面的权利要求书所反映的那样,发明方面在于少于前面公开的单个实施例的所有特征。因此,遵循具体实施方式的权利要求书由此明确地并入该具体实施方式,其中每个权利要求本身都作为本发明的单独实施例。Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, in order to streamline this disclosure and to facilitate an understanding of one or more of the various inventive aspects, various features of the invention are sometimes grouped together in a single embodiment, figure, or its description. This method of disclosure, however, is not to be interpreted as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the Detailed Description are hereby expressly incorporated into this Detailed Description, with each claim standing on its own as a separate embodiment of this invention.
本领域那些技术人员可以理解,可以对实施例中的设备中的模块进行自适应性地改变并且把它们设置在与该实施例不同的一个或多个设备中。可以把实施例中的模块或单元或组件组合成一个模块或单元或组件,以及此外可以把它们分成多个子模块或子单元或子组件。除了这样的特征和/或过程或者单元中的至少一些是相互排斥之外,可以采用任何组合对本说明书(包括伴随的权利要求、摘要和附图)中公开的所有特征以及如此公开的任何方法或者设备的所有过程或单元进行组合。除非另外明确陈述,本说明书(包括伴随的权利要求、摘要和附图)中公开的每个特征可以由提供相同、等同或相似目的的替代特征来代替。Those skilled in the art can understand that the modules in the device in the embodiment can be adaptively changed and arranged in one or more devices different from the embodiment. Modules or units or components in the embodiments may be combined into one module or unit or component, and furthermore may be divided into a plurality of sub-modules or sub-units or sub-assemblies. All features disclosed in this specification (including accompanying claims, abstract and drawings) and any method or method so disclosed may be used in any combination, except that at least some of such features and/or processes or units are mutually exclusive. All processes or units of equipment are combined. Each feature disclosed in this specification (including accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
此外,本领域的技术人员能够理解,尽管在此所述的一些实施例包括其它实施例中所包括的某些特征而不是其它特征,但是不同实施例的特征的组合意味着处于本发明的范围之内并且形成不同的实施例。例如,在下面的权利要求书中,所要求保护的实施例的任意之一都可以以任意的组合方式来使用。Furthermore, those skilled in the art will understand that although some embodiments described herein include some features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the invention. and form different embodiments. For example, in the following claims, any of the claimed embodiments may be used in any combination.
本发明的各个部件实施例可以以硬件实现,或者以在一个或者多个处理器上运行的软件模块实现,或者以它们的组合实现。本领域的技术人员应当理解,可以在实践中使用微处理器或者数字信号处理器(DSP)来实现根据本发明实施例的装置中的一些或者全部部件的一些或者全部功能。本发明还可以实现为用于执行这里所描述的方法的一部分或者全部的设备或者装置程序(例如,计算机程序和计算机程序产品)。这样的实现本发明的程序可以存储在计算机可读介质上,或者可以具有一个或者多个信号的形式。这样的信号可以从因特网网站上下载得到,或者在载体信号上提供,或者以任何其他形式提供。The various component embodiments of the present invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art should understand that a microprocessor or a digital signal processor (DSP) may be used in practice to implement some or all functions of some or all components in the device according to the embodiments of the present invention. The present invention can also be implemented as an apparatus or an apparatus program (for example, a computer program and a computer program product) for performing a part or all of the methods described herein. Such a program for realizing the present invention may be stored on a computer-readable medium, or may be in the form of one or more signals. Such a signal may be downloaded from an Internet site, or provided on a carrier signal, or provided in any other form.
应该注意的是上述实施例对本发明进行说明而不是对本发明进行限制,并且本领域技术人员在不脱离所附权利要求的范围的情况下可设计出替换实施例。在权利要求中,不应将位于括号之间的任何参考符号构造成对权利要求的限制。单词“包含”不排除存在未列在权利要求中的元件或步骤。位于元件之前的单词“一”或“一个”不排除存在多个这样的元件。本发明可以借助于包括有若干不同元件的硬件以及借助于适当编程的计算机来实现。在列举了若干装置的单元权利要求中,这些装置中的若干个可以是通过同一个硬件项来具体体现。单词第一、第二、以及第三等的使用不表示任何顺序。可将这些单词解释为名称。It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In a unit claim enumerating several means, several of these means can be embodied by one and the same item of hardware. The use of the words first, second, and third, etc. does not indicate any order. These words can be interpreted as names.
Claims (9)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210421027.9A CN103002010B (en) | 2012-10-29 | 2012-10-29 | A kind of data-updating method based on incremental data, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210421027.9A CN103002010B (en) | 2012-10-29 | 2012-10-29 | A kind of data-updating method based on incremental data, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103002010A CN103002010A (en) | 2013-03-27 |
CN103002010B true CN103002010B (en) | 2016-09-28 |
Family
ID=47930143
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201210421027.9A Active CN103002010B (en) | 2012-10-29 | 2012-10-29 | A kind of data-updating method based on incremental data, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103002010B (en) |
Families Citing this family (29)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103796041A (en) * | 2013-11-01 | 2014-05-14 | 中兴通讯股份有限公司 | Updating method and apparatus of IPTV system |
CN103678494B (en) * | 2013-11-15 | 2018-09-11 | 北京奇虎科技有限公司 | Client synchronization services the method and device of end data |
CN104714812B (en) * | 2013-12-13 | 2018-03-23 | 中国电信股份有限公司 | Rapid deployment and the method and system of loading Java applications in cloud environment |
CN103763380B (en) * | 2014-01-24 | 2019-04-23 | 深圳联友科技有限公司 | A kind of method and system of synchronous demonstrating data |
CN104052815A (en) * | 2014-06-24 | 2014-09-17 | 滕俊平 | K line synchronization method and system capable of saving traffic volume |
CN104216672A (en) * | 2014-08-20 | 2014-12-17 | 小米科技有限责任公司 | Display control method and display control device |
CN104572082A (en) * | 2014-12-19 | 2015-04-29 | 龙凤娇 | Product upgrading method and device |
CN105260202A (en) * | 2015-09-15 | 2016-01-20 | 中国联合网络通信集团有限公司 | Client file updating method and system |
CN105306585B (en) * | 2015-11-12 | 2019-02-05 | 焦点科技股份有限公司 | A kind of method of data synchronization of multiple data centers |
CN110557441B (en) * | 2016-03-01 | 2022-02-22 | 张君 | Data interaction method and system for client and server in online and offline states |
CN105991770B (en) * | 2016-05-05 | 2018-01-30 | 广州阿里巴巴文学信息技术有限公司 | Data-updating method, client and server |
CN106055559A (en) * | 2016-05-17 | 2016-10-26 | 北京金山安全管理系统技术有限公司 | Data synchronization method and data synchronization device |
CN105893640B (en) * | 2016-06-30 | 2020-04-07 | 北京奇虎科技有限公司 | Favorite merging method and device |
CN108156015B (en) * | 2016-12-06 | 2021-01-22 | 阿里巴巴集团控股有限公司 | Data updating method and device |
CN106790129A (en) * | 2016-12-27 | 2017-05-31 | 中国银联股份有限公司 | A kind of identity authentication method and device |
CN106897103B (en) * | 2017-03-03 | 2020-11-06 | 广州四三九九信息科技有限公司 | Method for quickly and thermally updating version of mobile terminal network game |
CN107018150A (en) * | 2017-05-24 | 2017-08-04 | 维沃移动通信有限公司 | Data transmission method and device |
CN109582433B (en) | 2017-09-29 | 2022-02-01 | 腾讯科技(深圳)有限公司 | Resource scheduling method and device, cloud computing system and storage medium |
CN110019126A (en) * | 2017-11-27 | 2019-07-16 | 航天信息股份有限公司 | A kind of data-updating method and device |
CN109842661A (en) * | 2017-11-28 | 2019-06-04 | 珠海市君天电子科技有限公司 | A kind of data transmission method, device, electronic equipment and storage medium |
CN109246247A (en) * | 2018-10-31 | 2019-01-18 | 广州市百果园信息技术有限公司 | Address book synchronization method, device, computer storage medium and terminal |
CN109660602B (en) * | 2018-11-28 | 2022-08-09 | 天津字节跳动科技有限公司 | Data increment transmission method and device |
CN109962980A (en) * | 2019-03-20 | 2019-07-02 | 北京易沃特科技有限公司 | A kind of data uploading method based on Internet of Things, device, equipment and medium |
CN110837382B (en) * | 2019-09-26 | 2021-01-08 | 北京和德宇航技术有限公司 | Service framework-based narrowband space-based Internet of things terminal upgrading method and system |
CN111045715B (en) * | 2019-10-28 | 2024-02-23 | 咪咕互动娱乐有限公司 | Cloud game hot updating method, system and readable storage medium |
CN113177053A (en) * | 2021-05-21 | 2021-07-27 | 滨州职业学院 | Computer data updating method and related device |
CN113206891B (en) * | 2021-05-31 | 2022-10-14 | 浙江大华技术股份有限公司 | Scheduling method, storage system, scheduling device and storage medium for metadata reporting |
CN113610661A (en) * | 2021-07-23 | 2021-11-05 | 国电南瑞南京控制系统有限公司 | Graph database-based power grid topology version management tool and method |
CN114255120B (en) * | 2021-12-27 | 2025-04-22 | 中国农业银行股份有限公司 | Collection data updating method and related device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102238197A (en) * | 2010-04-20 | 2011-11-09 | 上海博路信息技术有限公司 | Mobile reading multi-screen synchronization method |
CN102693324A (en) * | 2012-01-09 | 2012-09-26 | 西安电子科技大学 | Distributed database synchronization system, synchronization method and node management method |
CN102724308A (en) * | 2012-06-13 | 2012-10-10 | 腾讯科技(深圳)有限公司 | Software update method and software update system |
CN102750283A (en) * | 2011-04-20 | 2012-10-24 | 阿里巴巴集团控股有限公司 | Massive data synchronization system and method |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20110137859A1 (en) * | 2009-12-08 | 2011-06-09 | David Dickman | Staged Data Conversion |
-
2012
- 2012-10-29 CN CN201210421027.9A patent/CN103002010B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102238197A (en) * | 2010-04-20 | 2011-11-09 | 上海博路信息技术有限公司 | Mobile reading multi-screen synchronization method |
CN102750283A (en) * | 2011-04-20 | 2012-10-24 | 阿里巴巴集团控股有限公司 | Massive data synchronization system and method |
CN102693324A (en) * | 2012-01-09 | 2012-09-26 | 西安电子科技大学 | Distributed database synchronization system, synchronization method and node management method |
CN102724308A (en) * | 2012-06-13 | 2012-10-10 | 腾讯科技(深圳)有限公司 | Software update method and software update system |
Also Published As
Publication number | Publication date |
---|---|
CN103002010A (en) | 2013-03-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103002010B (en) | A kind of data-updating method based on incremental data, device and system | |
CN103002011B (en) | Data-updating method and server based on server | |
CN109976667B (en) | Mirror image management method, device and system | |
JP5232876B2 (en) | Automatic content transmission technology to mobile devices based on feeds | |
JP5658820B2 (en) | Media presentation description delta file for HTTP streaming | |
US8825749B2 (en) | Method of tracking offline user interaction in a rendered document on a mobile device | |
CN102955717B (en) | Message management equipment and method in distributed message processing system | |
US9282137B2 (en) | Dynamic package creation for predictive page load optimization | |
US9690568B2 (en) | Client-side script bundle management system | |
CN102981911B (en) | A distributed message processing system and its equipment and method | |
US20100100952A1 (en) | Network aggregator | |
CN105743945B (en) | Document down loading method and system based on switching loading source | |
CN103812882A (en) | Method and system for transferring files | |
CN102368785B (en) | Network file upload method, device and system | |
WO2013170715A1 (en) | Method and system for loading file in webgame | |
CN103401926B (en) | A kind of method and device improving network resource accession speed | |
CN102567339A (en) | Method, device and system for acquiring start page | |
US20190245827A1 (en) | Method and apparatus for synchronizing contact information and medium | |
US9282159B2 (en) | System and method for providing a proxy with a browser cache and a native cache | |
CN113342837B (en) | Data transmission method, device, electronic equipment and computer readable medium | |
KR101376320B1 (en) | Server, device, and the method for increasing efficiency of caching in a Web environment | |
US20130110912A1 (en) | System and method for providing anonymous internet browsing | |
CN112688980B (en) | Resource distribution method and device, and computer equipment | |
US10296580B1 (en) | Delivering parsed content items | |
CN104462223B (en) | A kind of Web browser method and device based on peer-to-peer network pattern |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
C53 | Correction of patent of invention or patent application | ||
CB03 | Change of inventor or designer information |
Inventor after: Xue Xiangxu Inventor after: Jiang Kuan Inventor after: Wu Hao Inventor after: Liu Wu Inventor after: Liu Qiming Inventor after: Wang Youcun Inventor after: Ren Huan Inventor before: Xue Xiangxu Inventor before: Jiang Kuan Inventor before: Wu Hao Inventor before: Liu Wu Inventor before: Liu Qiming Inventor before: Wang Youcun Inventor before: Ren Huan |
|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right | ||
TR01 | Transfer of patent right |
Effective date of registration: 20220718 Address after: Room 801, 8th floor, No. 104, floors 1-19, building 2, yard 6, Jiuxianqiao Road, Chaoyang District, Beijing 100015 Patentee after: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Address before: 100088 room 112, block D, 28 new street, new street, Xicheng District, Beijing (Desheng Park) Patentee before: BEIJING QIHOO TECHNOLOGY Co.,Ltd. Patentee before: Qizhi software (Beijing) Co.,Ltd. |