DE102011012444A1 - Synchronizing volume of data memorized on various hosts that are not connected with one another by wireless ad-hoc-network, comprises combining several nodes into superordinate node and calculating node hash value from hash values of nodes - Google Patents

Synchronizing volume of data memorized on various hosts that are not connected with one another by wireless ad-hoc-network, comprises combining several nodes into superordinate node and calculating node hash value from hash values of nodes Download PDF

Info

Publication number
DE102011012444A1
DE102011012444A1 DE102011012444A DE102011012444A DE102011012444A1 DE 102011012444 A1 DE102011012444 A1 DE 102011012444A1 DE 102011012444 A DE102011012444 A DE 102011012444A DE 102011012444 A DE102011012444 A DE 102011012444A DE 102011012444 A1 DE102011012444 A1 DE 102011012444A1
Authority
DE
Germany
Prior art keywords
hash
node
host
hosts
hash values
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.)
Ceased
Application number
DE102011012444A
Other languages
German (de)
Inventor
Dr. Angermann Michael
Martin Frassl
Michael Lichtenstern
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.)
Deutsches Zentrum fuer Luft und Raumfahrt eV
Original Assignee
Deutsches Zentrum fuer Luft und Raumfahrt eV
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 Deutsches Zentrum fuer Luft und Raumfahrt eV filed Critical Deutsches Zentrum fuer Luft und Raumfahrt eV
Priority to DE102011012444A priority Critical patent/DE102011012444A1/en
Publication of DE102011012444A1 publication Critical patent/DE102011012444A1/en
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The method of synchronizing volume of data that is memorized on various hosts, which are not connected with one another by a wireless ad-hoc-network, comprises combining several nodes into a superordinate node, calculating a node hash value from hash values of the nodes, which were combined into a superordinate node, combining several superordinate nodes into a root node, and calculating a root node hash value from the node hash values of the nodes, which are combined into the root node. A hash tree is formed from the data elements in the data of each host. The method of synchronizing volume of data that is memorized on various hosts, which are not connected with one another by a wireless ad-hoc-network, comprises combining several nodes into a superordinate node, calculating a node hash value from hash values of the nodes, which were combined into a superordinate node, combining several superordinate nodes into a root node, and calculating a root node hash value from the node hash values of the nodes, which are combined into the root node. A hash tree is formed from the data elements in the data of each host by calculating the hash value for each data element of the data bases on different hosts, merging multiple data elements to the node and calculating a node hash value of a top level of the hash-tree such as the root node hash value from the hash values of the data elements, which belong to the node. The data elements between the different hosts to be exchanged for synchronization are determined by transmitting the root node hash value of the data set of a first host (A) to a second host (B), comparing the root node hash value of the second host received from the first host with the node hash value of the top level of the hash-tree, terminating the synchronization process if the root node hash values of the first and second hosts are identical, and continuing the synchronization process if the root node hash values of the first and second hosts are not same. The transmitting step comprises transmitting the second highest level of the hash tree from the second host to the first host or vice versa. The method further comprises: continuing the synchronization process for all data elements or nodes, whose hash values in the first and second host are not identical, by transmitting the data elements of the first host to the second host or vice versa if the non-identical hash values in the first and second hosts belong to the data elements so that the synchronization process is finished or by transmitting the hash values of the nodes that are combined to form the identified nodes, whose hash values in the first and second host are not identical, from the first host to the second host or vice versa; comparing the hash values received by the first and/or second host with the appropriate hash values of the first and/or second host in its own volume of data; and continuing the synchronization process for all data elements or nodes, whose hash values in the first and second host are not-identical, where the nodes of one plane of the hash tree are summarized to a parent node or root node. The hash tree for the data set of each host is created in a unique manner, and a change in the data elements in the database is updated by recalculation or by the alteration of the volume of data concerned superordinate hash value. One message per plane of the hash tree is precisely exchanged for the determination of the data elements exchanged between the hosts for synchronization. The synchronized data elements and/or hash values are transferred between the hosts. The data elements exchanged between two hosts for synchronization are determined as given in the specification. The hash values are bit by bit transferred between the hosts. The data elements that are altered themselves in the same period under the same node are summarized.

Description

Die Erfindung betrifft ein Verfahren zum Synchronisieren von Datenbeständen, die auf verschiedenen Hosts gespeichert sind.The invention relates to a method for synchronizing data stored on different hosts.

In vielen Anwendungen, in denen Daten zwischen verschiedenen Datenspeichervorrichtungen, nämlich Hosts, ausgetauscht werden, wird von der Annahme ausgegangen, dass eine ständige Verbindung zwischen diesen Hosts besteht. Unter einem Host wird jegliche Vorrichtung verstanden, die zum Speichern von Daten geeignet ist, beispielsweise ein Computer, eine Datenbank oder sonstige Vorrichtungen. Die o. g. Annahme der ständigen Verfügbarkeit von Netzwerkverbindungen hat beispielsweise bei drahtlosen Ad-hoc-Netzwerken keine Gültigkeit. Eine derartige Anwendung, bei der verschiedene Hosts nicht kontinuierlich miteinander verbunden sind, ist beispielsweise im Rahmen eines Disaster-Management-Tools (DMT) möglich. Ein derartiges DMT ist beispielsweise beschrieben in M. Frassl, M. Lichtenstern, M. Khider, and M. Angermann, ”Developing a system for information management in disaster relief – methodology and requirements,” in ISCRAM '10: Proceedings of the 7th International ISCRAM Conference, May 2010 .In many applications where data is exchanged between different data storage devices, namely hosts, it is assumed that there is a permanent connection between these hosts. A host is understood to mean any device that is suitable for storing data, such as a computer, database, or other device. The above assumption of permanent availability of network connections, for example, in wireless ad hoc networks is not valid. Such an application, in which different hosts are not continuously interconnected, is possible, for example, as part of a disaster management tool (DMT). Such a DMT is described for example in M. Frassl, M. Lichtenstern, M. Khider, and M. Angermann, "Developing a System for Information Management in Disaster Relief - Methodology and Requirements," in ISCRAM '10: Proceedings of the 7th International ISCRAM Conference, May 2010 ,

Problematisch in diesem Zusammenhang ist, dass beispielsweise bei einem Einsatz von mehreren DMTs die Daten zwischen den einzelnen Tools synchronisiert werden müssen. Wie oben dargestellt, muss hierbei von der Annahme ausgegangen werden dass nur eine sporadische Netzwerkverbindung besteht. Dennoch müssen die Systeme kontinuierlich ihre Funktionalität bereitstellen, die darin besteht, den Nutzern Informationen über die momentane Situation zu präsentieren und ihnen zu erlauben, neue Ereignisse einzutragen. Somit muss jeder Host (nämlich jedes DMT) autark sein und die verfügbaren Daten lokal speichern, so dass den Nutzern ein ununterbrochener Zugang zu diesen Daten ermöglicht wird. Dieser Zugang ermöglicht es jederzeit Datenelemente zu kreieren, zu lesen, zu aktualisieren und zu löschen. Immer wenn Hosts datentechnisch verbunden werden, müssen sie ihre lokal gespeicherten Daten synchronisieren, so dass ihren jeweiligen Benutzern aktualisierte Informationen über die momentane Situation zur Verfügung stehen.A problem in this context is that, for example, when using multiple DMTs, the data must be synchronized between each tool. As shown above, it must be assumed that there is only a sporadic network connection. Nevertheless, the systems must continually provide their functionality, which is to present the users with information about the current situation and allow them to enter new events. Thus, each host (namely, each DMT) must be self-contained and store the available data locally, allowing users uninterrupted access to that data. This access makes it possible to create, read, update and delete data elements at any time. Whenever hosts are data-joined, they need to synchronize their locally-stored data so that their respective users have updated information about the current situation.

Da die Bandbreite und die verfügbare Energie knappe Ressourcen darstellen und da ferner die Zeit, in der eine Netzwerkverbindung besteht, kurz sein kann, muss die Synchronisation so wenig Netzwerkkapazität wie möglich beanspruchen.Since bandwidth and available power are scarce resources and, in addition, because the time a network connection is made can be short, synchronization must use as little network capacity as possible.

In einem ersten sehr einfachen Ansatz, um zwei Hosts miteinander zu synchronisieren, ist es möglich, dass Host A seine gesamten Daten an Host B sendet. Anschließend sendet Host B alle seine Daten, die nicht in den von Host A übertragenen Daten vorhanden sind, zurück an Host A. Dieses Vorgehen verschwendet selbstverständlich Netzwerkressourcen, da viele oder auch alle Datenelemente, die durch A gesendet werden, möglicherweise schon in Host B vorhanden sind.In a first very simple approach to synchronize two hosts, it is possible for Host A to send all of its data to Host B. Host B then sends back all of its data, which is not in the data transferred from Host A, back to Host A. Of course, this procedure wastes network resources because many or all of the data sent by A may already be present in Host B. are.

Gemäß einem fortgeschritteneren Ansatz ist es möglich, den Synchronisierungsprozess in zwei Abschnitte zu unterteilen, um die Menge der übertragenen Daten zu verringern. In dem ersten Abschnitt bestimmen die beiden Hosts die Unterschiede zwischen ihren jeweiligen Datenbeständen. In dem zweiten Abschnitt übermitteln die Hosts lediglich diejenigen Datenelemente, die im anderen Host nicht vorhanden sind.According to a more advanced approach, it is possible to divide the synchronization process into two sections to reduce the amount of data transmitted. In the first section, the two hosts determine the differences between their respective datasets. In the second section, the hosts pass only those data items that are not present in the other host.

Beispielsweise ist es gemäß dem Rsync-Verfahren bekannt, ein Bytearray des Hosts A in Subarrays mit einer festen Länge aufzuteilen. Diese Subarrays werden nun in dem Bytearray des Hosts B gesucht. Die Überprüfung, ob die Subarrays, die auf Host B vorhanden sind, identisch mit denen auf Host A sind, wird unter Verwendung von Hash-Werten durchgeführt. Diese Hash-Werte werden für jedes einzelne dieser Subarrays berechnet. Aus dem Rsync-Verfahren ist es ferner bekannt, zwei verschiedene Hash-Funktionen zu verwenden, nämlich eine schwächere für eine schnelle Berechnung und eine stärkere, die seltener verwendet wird, um die Identität von Daten in einem Subarray zu verifizieren. Gemäß Rsync wird bei jedem Synchronisationszyklus die gesamte Liste aller vorhandener Hash-Werte übertragen und verglichen. Dies verursacht eine große Menge an zu übertragenden Daten im Netzwerk, sofern davon ausgegangen wird, dass die Menge der Dateien und die Synchronisationshäufigkeit ansteigt. In den eingangs beschriebenen Szenarien, beispielsweise im Rahmen eines DMT, wäre dies von Nachteil, da die beiden in Kontakt stehenden Hosts eine große Anzahl von Hashes austauschen müssten und somit die Kommunikation zwischen anderen Hosts blockieren würden, auch wenn ihre Datenbestände sich gar nicht unterscheiden.For example, according to the Rsync method, it is known to divide a byte array of the host A into sub-arrays of a fixed length. These subarrays are now searched in the byte array of host B. Verifying that the subarrays present on host B are identical to those on host A is performed using hash values. These hash values are calculated for each of these subarrays. It is further known from the Rsync method to use two different hash functions, one weaker for a fast computation and one stronger, which is less commonly used to verify the identity of data in a subarray. According to Rsync, the entire list of all existing hash values is transmitted and compared during each synchronization cycle. This causes a large amount of data to be transmitted on the network, assuming that the amount of files and the frequency of synchronization increases. In the scenarios described above, for example in the context of a DMT, this would be disadvantageous because the two in contact hosts would have to exchange a large number of hashes and thus would block the communication between other hosts, even if their data sets do not differ.

Aufgabe der Erfindung ist es, ein Verfahren zum Synchronisieren von Datenbeständen, die auf verschiedenen Hosts gespeichert sind, bereitzustellen, das eine geringere Menge an zu übertragenden Daten erfordert.The object of the invention is to provide a method for synchronizing data stored on different hosts, which requires a smaller amount of data to be transmitted.

Die Lösung der Aufgabe erfolgt erfindungsgemäß durch die Merkmale des Anspruchs 1. Die Hosts auf denen die zu synchronisierenden Datenbestände gespeichert sind, sind insbesondere durch ein vorzugsweise kabelloses Adhoc-Netzwerk nicht kontinuierlich miteinander verbunden. The object is achieved according to the invention by the features of claim 1. The hosts on which the databases to be synchronized are stored are not continuously connected to one another, in particular by a preferably wireless adhoc network.

Im erfindungsgemäßen Verfahren wird aus den Datenelementen im Bestand eines jeden Hosts ein Hash-Tree gebildet. Dies erfolgt durch die folgenden Verfahrensschritte:

  • a) Zunächst wird ein Hash-Wert für jedes Datenelement der Datenbestände auf den verschiedenen Hosts berechnet. Unter einem Datenelement wird beispielsweise eine einzelne Datei verstanden. Ein Datenelement ist eine geordnete Menge von Bits, über die ein Hashwert gebildet werden kann. Konkrete Beispiele wären neben Dateien z. B. auch Datenbankeinträge oder Messwerte. Es wird somit zu jedem Datenelement auf jedem der verschiedenen Hosts ein Hash-Wert durch eine Hash-Funktion gebildet.
  • b) Mehrere Datenelemente werden zu einem Node zusammengefasst. Je nachdem wie viele Ebenen der zu erstellende Hash-Tree hat, kann es sich bei diesem Node um den Root-Node handeln. Auch kann es sich hierbei um einen Node in einer Zwischenebene des Hash-Trees handeln, wobei je nach Struktur der zu übertragenden Daten verschiedene Anzahlen von Ebenen möglich sind.
  • c) Aus den Hash-Werten der Datenelemente, die zu einem Node gehören, wird ein Node-Hash-Wert berechnet. Sofern der Hash-Tree lediglich zwei Ebenen hat, nämlich nur aus der untersten Ebene mit den Hash-Werten der Datenelemente und aus dem Root-Hash-Wert besteht, ist der berechnete Node-Hash-Wert der Root-Node-Hash-Wert. Der Root-Node-Hash-Wert ist ein Hash-Wert, auf den jeder Datenelement im Datenbestand eines Hosts Einfluss hat. D. h. dass eine Änderung in einem einzigen Datenelement, eine Änderung des Root-Hash-Wertes verursachen wird. Jedoch wird die Änderung in diesem Datenelement keine Änderung sämtlicher Hash-Werte in dem gebildeten Hash-Tree verursachen. Vielmehr wird mindestens ein Hash-Wert, in der Realität meist eine größere Menge an Hash-Werten unverändert bleiben. Dies trifft auch dann zu, wenn anstelle eines einzelnen mehrere Datenelemente geändert wurden. Auch in diesem Fall werden durch diese Änderungen lediglich die übergeordneten Hash-Werte und der Root-Hash-Wert geändert, während eine große Anzahl der übrigen, nebengeordneten Hash-Werte unverändert bleibt.
In the method according to the invention, a hash tree is formed from the data elements in the inventory of each host. This is done by the following process steps:
  • a) First, a hash value is calculated for each data element of the databases on the various hosts. For example, a data item is understood to mean a single file. A data item is an ordered set of bits over which a hash value can be formed. Concrete examples would be in addition to files z. B. also database entries or measured values. Thus, a hash value for each data element on each of the different hosts is formed by a hash function.
  • b) Several data elements are combined into one node. Depending on how many levels the hash tree has to create, this node can be the root node. This can also be a node in an intermediate level of the hash tree, wherein different numbers of levels are possible depending on the structure of the data to be transmitted.
  • c) From the hash values of the data elements that belong to a node, a node hash value is calculated. If the hash tree has only two levels, namely only the lowest level with the hash values of the data elements and the root hash value, the calculated node hash value is the root node hash value. The root node hash value is a hash value that affects every piece of data in a host's dataset. Ie. a change in a single data item will cause a change in the root hash value. However, the change in this data item will not cause any change in all hash values in the formed hash tree. Rather, at least one hash value, in reality usually a larger amount of hash values remain unchanged. This is true even if multiple data items have been changed instead of a single one. Again, these changes change only the parent hash values and the root hash value, while leaving a large number of remaining, hashed hash values unchanged.

Durch die gerade beschriebenen Verfahrensschritte a), b), c) wird somit für den Datenbestand eines jeden Hosts ein Hash-Tree gebildet.As a result of the method steps a), b), c) just described, a hash tree is thus formed for the dataset of each host.

Die zwischen den verschiedenen Hosts zur Synchronisierung auszutauschenden Datenelemente werden erfindungsgemäß durch die folgenden Schritte bestimmt.

  • d) Der Node-Hash-Wert der obersten Ebene des Hash-Trees, nämlich der Root-Node-Hash-Wert, des Datenbestandes eines ersten Hosts, wird an einen zweiten Host übermittelt.
  • e) Der vom ersten Host empfangene Root-Node-Hash-Wert wird durch den zweiten Host mit dem Node-Hash-Wert der obersten Ebene des Hash-Trees, nämlich dem Root-Node-Hash-Wert, seines eigenen Datenbestandes verglichen.
  • f) Der Synchronisierungsvorgang wird beendet, sofern der Root-Node-Hash-Wert des ersten und zweiten Hosts identisch sind. Sofern somit die Datenbestände zweier Hosts identisch sind, wird der Root-Node-Hash-Wert ebenfalls identisch sein, so dass es zur Synchronisierung der Datenbestände dieser beiden Hosts lediglich notwendig ist, einen einzigen Hash-Wert, nämlich den Root-Node Hash-Wert zu übertragen. Weitere Hash-Werte müssen nicht übertragen werden, so dass eine erheblich Einsparung der zu übertragenden Datenmenge beim Synchronisierungsvorgang erreicht werden kann.
  • g) Der Synchronisierungsvorgang wird fortgeführt, sofern der Root-Node-Hash-Wert des ersten und zweiten Hosts nicht identisch sind. Dies erfolgt durch die folgenden Verfahrensschritt:
  • h) Die Hash-Werte der zweitobersten Ebene des Hash-Trees werden vom zweiten Host zum ersten Host oder umgekehrt übermittelt. Bei diesen Hash-Werten kann es sich um sogenannte ”Data-Hashes” handeln, nämlich um Hash-Werte, die direkt aus Datenelementen gebildet sind. Ferner kann es sich um Node-Hash-Werte handeln, nämlich um Hash-Werte, die wiederum aus anderen Hash-Werten untergeordneter Ebenen des Hash-Trees berechnet werden.
  • i) Die vom zweiten bzw. ersten Host empfangenen Hash-Werte oder Node-Hash-Werte werden durch den ersten bzw. zweiten Host mit den entsprechenden Hash-Werten oder Node-Hash-Werten seines eigenen Datenbestandes verglichen. Unter einem entsprechenden Hash-Wert wird in diesem Zusammenhang ein Hash-Wert verstanden, der sich an derselben Stelle des Hash-Trees des Datenbestandes zweier Hosts befindet.
  • j) Der Synchronisierungsvorgang wird für alle Datenelemente oder Nodes, deren Hash-Werte bzw. Node-Hash-Wert im ersten und zweiten Host nicht identisch sind, durch die folgenden Schritte forgeführt:
  • k) Sofern der oder die nicht identischen Hash-Werte im ersten und zweiten Host zu einem oder mehreren Datenelementen gehörten, werden diese Datenelemente vom ersten zum zweiten Host oder umgekehrt übertragen. Sobald sämtliche nicht-identische Datenelemente, die durch die nicht identischen Hash-Werte identifiziert wurden, übertragen worden sind, sind die Datenbestände der beiden Hosts synchronisiert, so dass der Synchronisierungsvorgang beendet wird. Der Austausch weiterer Hash-Werte außer den bisher genannten, ist nicht notwendig. Es ist somit in dem erfindungsgemäßen Verfahren nicht notwendig, untergeordnete Hash-Werte, d. h. Hash-Werte aus untergeordneten Ebenen des Hash-Trees, zu übertragen, sofern bereits herausgefunden wurde, dass ihre übergeordneten Hash-Werte, d. h. die Hash-Werte aus den übergeordneten Ebenen des Hash-Trees, auf den synchronisierenden Hosts identisch sind. Anders ausgedrückt, findet somit die Prüfung hinsichtlich der Identität der Daten zwischen den Hosts hierarchisch statt, indem die Hash-Werte in einer hierarchischen Struktur angeordnet werden und wie oben dargestellt verglichen werden.
  • l) Sofern der oder die nicht-identischen Node-Hash-Werte, die im Verfahrensschritt i) ermittelt wurden, nicht zu einem oder mehreren Datenelementen gehören, sondern auf Basis weiterer untergeordneter Hash-Werte berechnet wurden, werden diese Node-Hash-Werte, die zu dem oder den identifizierten Nodes zusammengefasst sind, deren Hash-Werte im ersten und zweiten Host im Verfahrensschritt i) als nicht-identisch identifiziert wurde, vom ersten zum zweiten Host oder umgekehrt übertragen.
  • m) Die vom ersten bzw. zweiten Host empfangenen Hash-Werte werden durch den ersten bzw. zweiten Host mit den entsprechenden Hash-Werten seines eigenen Datenbestands verglichen.
  • n) Der Synchronisierungsvorgang wird für alle Datenelemente oder Nodes, deren Hash-Werte im ersten und zweiten Host nicht identisch sind, durch Wiederholen der letzten drei Verfahrensschritte k), l), m) solange fortgeführt, bis alle nicht identischen Datenelemente übermittelt wurden.
The data elements to be exchanged for synchronization between the various hosts are determined according to the invention by the following steps.
  • d) The top-level hash value of the hash tree, namely the root node hash value of the data of a first host, is transmitted to a second host.
  • e) The root node hash value received from the first host is compared by the second host with the top-level node hash value of the hash tree, namely the root node hash value, of its own dataset.
  • f) The synchronization process is terminated if the root node hash value of the first and second hosts are identical. Thus, if the data sets of two hosts are identical, the root node hash value will also be identical, so that it is only necessary to synchronize the databases of these two hosts, a single hash value, namely the root node hash value transferred to. Further hash values do not have to be transmitted, so that a considerable saving in the amount of data to be transmitted can be achieved during the synchronization process.
  • g) The synchronization process continues unless the root node hash value of the first and second hosts are identical. This is done by the following process step:
  • h) The hash values of the second highest level of the hash tree are transmitted from the second host to the first host or vice versa. These hash values can be so-called "data hashes", namely hash values which are formed directly from data elements. Furthermore, they can be node hash values, namely hash values, which in turn are calculated from other hash values of subordinate levels of the hash tree.
  • i) The hash values or node hash values received by the second or first host are compared by the first or second host with the corresponding hash values or node hash values of its own data store. In this context, a corresponding hash value is understood to mean a hash value that is located at the same location of the hash tree of the dataset of two hosts.
  • j) The synchronization procedure is performed for all data elements or nodes whose hash values or node hash values are not identical in the first and second host by the following steps:
  • k) If the one or more non-identical hash values in the first and second hosts belonged to one or more data elements, these data elements are transmitted from the first to the second host or vice versa. Once all non-identical data items by the non-identical hash values have been transmitted, the data sets of the two hosts are synchronized, so that the synchronization process is terminated. The replacement of other hash values other than those mentioned above is not necessary. Thus, it is not necessary in the method according to the invention to transfer sub hash values, ie hash values from subordinate levels of the hash tree, if it has already been found that their higher hash values, ie the hash values from the higher level Levels of the hash tree on which synchronizing hosts are identical. In other words, thus checking for the identity of the data between the hosts takes place hierarchically by arranging the hash values in a hierarchical structure and comparing them as shown above.
  • l) If the one or more non-identical node hash values, which were determined in method step i), do not belong to one or more data elements but were calculated on the basis of further subordinate hash values, these node hash values, which are combined to the identified node or nodes whose hash values in the first and second host were identified as non-identical in method step i), transferred from the first to the second host or vice versa.
  • m) The hash values received by the first or second host are compared by the first or second host, respectively, with the corresponding hash values of its own database.
  • n) The synchronization process is continued for all data elements or nodes whose hash values are not identical in the first and second host by repeating the last three process steps k), l), m) until all non-identical data elements have been transmitted.

Durch das erfindungsgemäße Verfahren ist es somit, wie bereits dargestellt, möglich, die zu übertragende Datenmenge beim Synchronisieren von Datenbeständen zwischen zwei Hosts zu verringern. Hierdurch wird es möglich, Datenbestände verschiedener Hosts innerhalb eines Ad-hoc-Netzwerks, beispielsweise im Rahmen eines Disaster-Management-Tools schnell und zuverlässig zu synchronisieren.The method according to the invention thus makes it possible, as already described, to reduce the amount of data to be transferred when synchronizing databases between two hosts. This makes it possible to quickly and reliably synchronize databases of different hosts within an ad hoc network, for example as part of a disaster management tool.

Das erfindungsgemäße Verfahren nimmt somit in besonderer Weise auf die technischen Gegebenheiten eines Datenverarbeitungssystems, wie beispielsweise eines kabellosen Ad-hoc-Netzwerks, Rücksicht, bei dem keine ständige Datenverbindung zwischen den einzelnen Hosts besteht.The inventive method thus takes in a special way on the technical conditions of a data processing system, such as a wireless ad hoc network, consideration, in which there is no permanent data connection between the individual hosts.

Bevorzugt umfasst das erfindungsgemäße Verfahren nach dem Verfahrensschritt c) die folgenden Verfahrensschritte: Mehrere Nodes werden zu einem übergeordneten Node zusammengefasst. Es wird ein Node-Hash Wert aus den Hash-Werten der Nodes, die zu einem übergeordneten Node zusammengefasst wurden, berechnet. Mehrere übergeordnete Nodes werden zu einem Root-Node zusammengefasst. Aus den Node-Hash-Werten der Nodes, die zum Root-Node zusammengefasst wurden, wird ein Root-Node-Hash-Wert berechnet.The method according to the invention preferably comprises the following method steps after method step c): Several nodes are combined to form a higher-level node. A node hash value is calculated from the hash values of the nodes grouped together to form a parent node. Multiple parent nodes are grouped together to form a root node. The node hash values of the nodes that have been combined into the root node are used to calculate a root node hash value.

Weiterhin ist es bevorzugt, dass Nodes aus genau einer Ebene des Hash-Trees zu einem übergeordneten Node oder Root-Node zusammengefasst werden.Furthermore, it is preferred that nodes from exactly one level of the hash tree be combined into a higher level node or root node.

Der Hash-Tree für den Datenbestand jedes Hosts kann einmalig erstellt werden. Er kann bei Änderung eines oder mehrerer Datenelemente im Datenbestand durch eine Neuberechnung des oder der durch die Änderung des Datenelementes betroffenen übergeordneten Hash-Werte aktualisiert werden. Wird somit ein Datenelement geändert, so ist es lediglich notwendig, die Hash-Werte, die von diesem Datenelement abhängen, in den übergeordneten Ebenen des Hash-Trees neu zu berechnen, wobei die restlichen Hash-Werte des Hash-Trees unverändert bleiben.The hash tree for each host's dataset can be created once. It can be updated when changing one or more data elements in the database by recalculating the parent hash value (s) affected by the change in the data item. Thus, if a data item is changed, it is only necessary to recalculate the hash values that depend on that data item in the higher levels of the hash tree, leaving the hash values of the hash tree unchanged.

Bevorzugt wird zur Bestimmung der zwischen den Hosts zur Synchronisierung auszutauschenden Datenelemente genau eine Nachricht pro Ebene des Hash-Trees ausgetauscht. Dies bedeutet, dass ein Host die komplette Menge von Node-Hashes (bzw. Node-Hash-Groups) auf einmal übermitteln kann. Dies ist bei einem bitweisen Vergleichen der Hash-Werte nicht der Fall, da hier für jedes Bit eine Nachricht gesendet werden muss, auf die der Synchronisierungspartner dann antwortet. Eine geringere Anzahl an Nachrichten ist von Vorteil bei der Verwendung in Netzwerken mit hohen Latenzzeiten (z. B. Satellitenverbindungen), wogegen der bitweise Vergleich die zu übertragende Datenmenge verringert.Preferably, to determine the data elements to be exchanged between the hosts for synchronization, exactly one message is exchanged per level of the hash tree. This means that a host can transmit the entire set of node hashes (or node hash groups) at once. This is not the case with a bitwise comparison of the hash values, since here a message must be sent for each bit, to which the synchronization partner then responds. A lower number of messages is beneficial when used in high-latency networks (eg, satellite links), whereas bit-wise comparison reduces the amount of data to be transmitted.

Weiterhin ist es bevorzugt, dass ausschließlich diejenigen Datenelemente und/oder Hash-Werte zwischen zu synchronisierenden Hosts übertragen werden, die zu Nodes zusammengefasst sind, deren Hash-Werte in den zwei Hosts nicht identisch sind. Dies kann selbstverständlich auch auf eine gleichzeitige Synchronisierung eines ersten Host mit mehreren weiteren Hosts übertragen werden. Hierzu tauscht ein Host mit mehreren weiteren Hosts gleichzeitig Hash-Werte aus seinem Hash-Tree aus, um die zur Synchronisierung auszutauschenden Datenelemente zu bestimmen.Furthermore, it is preferred that only those data elements and / or hash values are transmitted between hosts to be synchronized, which are combined into nodes whose hash values are not identical in the two hosts. Of course, this can also be transferred to a simultaneous synchronization of a first host with several other hosts. For this purpose, a host exchanges hash values from its hash tree with several other hosts at the same time in order to determine the data elements to be exchanged for synchronization.

Es ist weiterhin bevorzugt, dass die zur Synchronisierung auszutauschenden Datenelemente zwischen zwei Hosts durch folgenden Algorithmus bestimmt werden:

Figure 00100001
It is further preferred that the data elements to be exchanged for synchronization between two hosts are determined by the following algorithm:
Figure 00100001

Bevorzugt werden Hash-Werte zwischen zwei Hosts inkrementell, beispielsweise bitweise, übertragen, bis in mindestens einem Bit ein Unterschied zwischen zwei sich entsprechenden Hash-Werten auf zwei zu synchronisierenden Hosts gefunden wird, oder bis das Ende des Hash-Wertes erreicht ist. Hierdurch kann das zu übertragende Datenvolumen zwischen den beiden Hosts weiter reduziert werden. Das genannte Merkmal nutzt die Tatsache aus, dass es ausreichend ist, ein einziges nicht übereinstimmendes Bit in zwei Hash-Werten zu identifizieren, um feststellen zu können, dass sich diese beiden Hash-Werte unterscheiden. Hieraus ergibt sich die Notwendigkeit, die nächste Ebene an Hash-Werten im Hash-Tree miteinander zu vergleichen.Preferably, hash values between two hosts are incrementally transmitted, for example, bit by bit, until at least one bit finds a difference between two corresponding hash values on two hosts to be synchronized, or until the end of the hash value has been reached. This further reduces the volume of data to be transferred between the two hosts. The above feature takes advantage of the fact that it is sufficient to identify a single mismatched bit in two hash values to determine that these two hash values are different. This implies the need to compare the next level of hash values in the hash tree.

Das genannte Merkmal kann besonders effektiv in den oberen Ebenen eines Hash-Trees eingesetzt werden, in denen sich Hash-Werte mit einer hohen Wahrscheinlichkeit unterscheiden. Die Reduzierung des Datentransfers wird bestimmt durch einen Vergleich der Länge des vollständigen Hash-Wertes lH mit l*H = E{bitsidentical}, nämlich der zu erwartenden Anzahl der notwendigen Vergleichsschritte, um ein nicht übereinstimmendes Bit in zwei nicht-identischen Hash-Werten zu finden. Hierbei ist Pr(i) die Wahrscheinlichkeit genau i Bit-Vergleichsschritte zu benötigen, um ein nicht übereinstimmendes Bit zu finden, nämlich:

Figure 00110001
The said feature can be used particularly effectively in the upper levels of a hash tree in which hash values differ with a high probability. The reduction of the data transfer is determined by a comparison of the length of the complete hash value l H with l * H = E {bits identical }, namely the expected number of necessary comparison steps to obtain a mismatched bit in two non-identical hashs. To find values. Here, Pr (i) is the probability of requiring exactly i bit comparison steps to find a mismatched bit, namely:
Figure 00110001

Die durchschnittliche Anzahl an ausgetauschten Bits für zwei nicht-identische Hash-Werte ist:

Figure 00110002
The average number of exchanged bits for two non-identical hash values is:
Figure 00110002

Für einen Hash-Wert der Länge lH = 128 Bit führt dies zu l*H ≈ 2. D. h. dass weniger als 1,6% an Datenvolumen entsteht (verglichen zu 100%, wenn der oben beschriebene inkrementelle Bit-Vergleich nicht angewendet wird).For a hash value of length l H = 128 bits this leads to l * H ≈ 2. D. h. less than 1.6% of data volume is created (compared to 100% if the above-described incremental bit comparison is not applied).

Die genannten Merkmale können weiter verbessert werden, indem die beschriebene Technik an bestimmte Netzwerktopologien angepasst wird, so dass Gruppen von Bits oder Bytes ausgetauscht werden, die im jeweiligen Netzwerk besonders gut übertragen werden können.The features mentioned can be further improved by adapting the described technique to specific network topologies, so that groups of bits or bytes are exchanged, which can be transmitted particularly well in the respective network.

Weiterhin ist es bevorzugt, die Datenelemente, die zu einem Node-Hash-Wert zusammengefasst werden, nicht beliebig auszuwählen. Beispielsweise ist es möglich, eine Ordnung der Hash-Werte basierend auf dem Faktor Zeit vorzunehmen, so dass Datenelemente, in denen Änderungen im gleichen Zeitabschnitt stattgefunden haben, unter demselben Node gruppiert werden. Furthermore, it is preferable not to arbitrarily select the data elements that are combined into a node hash value. For example, it is possible to order the hash values based on the time factor so that data items in which changes have occurred in the same time period are grouped under the same node.

Im Folgenden werden bevorzugte Ausführungsformen der Erfindung anhand von Figuren erläutert:In the following, preferred embodiments of the invention will be explained with reference to figures:

Es zeigen:Show it:

1 einen Hash-Tree, der durch das erfindungsgemäße Verfahren erstellt wurde, 1 a hash tree, which was created by the method according to the invention,

2 eine schematische Darstellung einer Node-Hash-Group, 2 a schematic representation of a node hash group,

3 eine graphische Darstellung von Simulationsergebnissen, die das erfindungsgemäße Verfahren mit dem Stand der Technik vergleichen, 3 a graphical representation of simulation results that compare the inventive method with the prior art,

4 eine weitere Darstellung von Simulationsergebnissen, 4 another presentation of simulation results,

5 eine Darstellung eines Vergleichs zwischen zwei Hash-Werten. 5 a representation of a comparison between two hash values.

Ein Beispiel eines Hash-Trees, der durch das erfindungsgemäße Verfahren (Verfahrensschritte a–c) erstellt wurde, ist in 1 dargestellt. Erfindungsgemäß wird unter einer Hash-Funktion eine Funktion verstanden, die einen Hash-Wert berechnet, so dass eine zufällige oder beabsichtigte Veränderung der gehashten Daten zu einer Änderung des Hash-Werts führt.An example of a hash tree that was created by the method according to the invention (method steps a-c) is in 1 shown. According to the invention, a hash function is understood to mean a function which calculates a hash value, such that a random or intended change in the hashed data leads to a change in the hash value.

Aus 1 wird deutlich, dass je näher sich ein Node an dem Root-Node befindet, er um so mehr Hash-Werte einschließt. Wenn Teile des Datenbestandes, d. h. einer oder mehrere Datenelemente identisch sind, kann dies schon durch die Nodes in der oberen Ebenen des Hash-Trees festgestellt werden, so dass Rechenzeit und Übertragungskapazität eingespart werden können. Im besten Fall, nämlich wenn die Datenbestände identisch sind, muss nur ein Hash-Wert, nämlich der Root-Hash-Wert, verglichen werden, so dass der Algorithmus dann beendet wird. Der Hash-Wert, der für ein bestimmtes Datenelement berechnet wird, wird als ”Data-Hash” bezeichnet. Für jedes Datenelement im Datenbestand eines jeden Hosts wird ein solcher Data-Hash berechnet. Alle Data-Hashes werden dann als sogenannte ”Leaves” in einen Prefix-Tree eingefügt, wobei sie gemäß ihren Prefix-Bits sortiert werden. Es wird bevorzugt kein binärer Hash-Tree verwendet. Stattdessen wird auf jeder Ebene eine Anzahl von m Bits verwendet. Somit hat jeder Node Ni in dem Hash-Tree M = 2m Child-Nodes. M ist hierbei der Spreadfaktor. Bewegt man sich in dem Hash-Tree eine Ebene nach unten, so wird die Anzahl der Nodes mit M multipliziert. In Abhängigkeit von der Hash-Länge und dem Spreadfaktor ergibt sich die Anzahl der Ebenen inklusiv der Ebene des Root-Hash-Werts Hroot zu:

Figure 00130001
Out 1 It becomes clear that the closer a node is to the root node, the more hash values it includes. If parts of the dataset, ie one or more data elements, are identical, this can already be determined by the nodes in the upper levels of the hash tree, so that computing time and transmission capacity can be saved. In the best case, namely, if the data stocks are identical, only one hash value, namely the root hash value, must be compared, so that the algorithm is then terminated. The hash value calculated for a particular data item is called a "data hash." For each data item in the dataset of each host, such a data hash is calculated. All data hashes are then inserted as so-called "leaves" in a prefix tree, where they are sorted according to their prefix bits. It is preferable not to use a binary hash tree. Instead, a number of m bits is used at each level. Thus, each node N i has 2 m child nodes in the hash tree M =. M is the spread factor. If you move one level down in the hash tree, the number of nodes is multiplied by M. Depending on the hash length and the spread factor, the number of levels, including the level of the root hash value H root, will be:
Figure 00130001

In der Ebene n des Hash-Trees enthält jeder Node nacheinander alle Hash-Werte, deren erste n * m Bits gleich sind. Dadurch kann der Node durch den Node-Prefix, nämlich seinen zugeordneten Prefix-Bits (die genau den ersten n * m Bits entsprechen), identifiziert werden.In the level n of the hash tree, each node contains successively all hash values whose first n * m bits are equal. This allows the node to be identified by the node prefix, namely its associated prefix bits (which correspond exactly to the first n * m bits).

Nachdem die Data-Hashes in den Hash-Tree eingesetzt wurden, können die Node-Hash-Werte berechnet werden. Der Node-Hash-Wert für den Node mit dem Node-Prefix 00 wird als H0|0 bezeichnet. Die Node-Hash-Werte sind Hash-Werte, die für jeden Node in dem Hash-Tree berechnet werden, wobei alle Daten unter dem jeweiligen Node gehasht werden. Er wird berechnet aus den Node-Hash-Werten seiner Node-Children, nämlich der untergeordneten Nodes. Mit h als der Node-Hash-Funktion ergibt sich für den Node-Hash-Wert i in der Ebene l: Hl,i = h(Hl+1,i|1, Hl+1,i|2, ..., Hl+1,i|M) After the data hashes are inserted into the hash tree, the node hash values can be calculated. The node hash value for the node with the node prefix 00 is called H 0 | 0 . The node hash values are hash values calculated for each node in the hash tree, with all data being hashed under the particular node. It is calculated from the node hash values of its node children, namely the child nodes. With h as the node hash function, the node hash value i in the level l results: H l, i = h (H l + 1, i | 1 , H l + 1, i | 2 , ..., H l + 1, i | M )

Somit bestehen in dem Hash-Tree zwei verschiedene Arten von Hash-Werten, nämlich Data-Hashes und Node-Hashes, nämlich Node-Hash-Werte. Node-Hash-Werte werden rekursiv auf Basis von Data-Hashes oder anderen Node-Hash-Werten berechnet.Thus, there are two different types of hash values in the hash tree, namely data hashes and node hashes, namely node hash values. Node hash values are calculated recursively based on data hashes or other node hash values.

Der Hash-Tree muss für einen bestimmten Datenbestand einmal erstellt werden. Anschließend ist es ausreichend, diesen bei einer Änderung eines Datenelementes zu aktualisieren. In dem Fall ist es notwendig, den Node-Hash-Wert für jede Ebene bzw. für

Figure 00140001
Knoten erneut zu berechnen. The hash tree must be created once for a specific dataset. Subsequently, it is sufficient to update this when changing a data element. In that case, it is necessary to set the node hash value for each level
Figure 00140001
Recalculate node.

Jeder Node-Hash-Wert repräsentiert eine Anzahl an Child-Hashes. Je näher sich der Node an dem Root-Node befindet, um so mehr Data-Hashes schließt er ein, sofern von gleichmäßig verteilten Tree-Einträgen ausgegangen wird. Sofern die Data-Hashes in einer solchen Gruppe in den Datenbeständen zweier Hosts identisch sind, wird der Node-Hash dieser Gruppe identisch sein, so dass es zum Synchronisieren der Datenbestände ausreichend ist, diesen Node-Hash zu vergleichen.Each node hash value represents a number of child hashes. The closer the node is to the root node, the more data hashes it includes, assuming evenly distributed tree entries. If the data hashes in such a group are identical in the datasets of two hosts, the node hash of that group will be identical, so that it is sufficient to synchronize the datasets to compare this node hash.

In 2 ist der Aufbau einer Node-Hash-Group dargestellt. Ein erster Host sendet eine Node-Hash-Group zu dem Host, mit dem er seinen Datenbestand synchronisieren will, wenn zwei nicht identische Node-Hash-Werte identifiziert wurden.In 2 the structure of a node hash group is shown. A first host sends a node hash group to the host to which it intends to synchronize its dataset when two non-identical node hash values have been identified.

Der Algorithmus, durch den die zur Synchronisierung auszutauschenden Datenelemente bestimmt werden, wird im Folgenden beschrieben. Es wird davon ausgegangen, dass Host A die Synchronisierung startet und die beiden Hosts A und B einander vorher nicht kannten, aber dennoch teilweise identische Datenelemente aufweisen können (|DA ∩ DB| > 0).The algorithm by which the data elements to be exchanged for synchronization are determined will be described below. It is assumed that host A starts the synchronization and the two hosts A and B did not know each other before, but can still have partially identical data elements (| D A ∩ D B |> 0).

Host A startet den Synchronisierungsvorgang durch Übermitteln seines Root-Hash-Werts, d. h. des Node-Hash-Werts des Root-Nodes H A / root an Host B. Dieser Node-Hash-Wert umfasst Informationen über jedes Datenelement in dem Datenbestand. Host B vergleicht den empfangenen Hash-Wert H A / root mit H B / root , um zu überprüfen, ob diese beiden Werte identisch sind. Ist dies der Fall, wird davon ausgegangen, dass die beiden Datenbestände identisch sind. Sind die Root-Hash-Werte nicht identisch, sendet Host B die Node-Hashes der Child-Nodes seines Roots zurück an Host A. Die Daten, die an A gesendet werden, können als eine Node-Hash-Group gruppiert werden (NHGroot, siehe 2).Host A starts the synchronization process by transmitting its root hash value, that is, the root nodes node hash value HA / root to host B. This node hash value includes information about each data item in the dataset. Host B compares the received hash value HA / root With HB / root to check if these two values are identical. If this is the case, it is assumed that the two databases are identical. If the root hash values are not identical, host B sends the node hashes of the child nodes of its root back to host A. The data sent to A can be grouped as a node hash group (NHG root , please refer 2 ).

Derartige Node-Hash-Groups können für jeden Node in dem Hash-Tree erstellt werden. Sie enthalten genau diejenigen Informationen, die für den erfindungsgemäßen Algorithmus notwendig sind und stellen somit die grundlegenden Datenelemente dar, die zwischen den zu synchronisierenden Hosts ausgetauscht werden. Jedes Mal wenn ein Node-Hash-Wert empfangen wird und dieser zu dem lokal auf dem empfangenen Host vorhandenen nicht identisch ist ( H A / i ≠ H B / i ) wird die Node-Hash-Group für diesen Hash (NHGi) übermittelt. Dieser rekursive Teil des Algorithmus, der beispielsweise auf Host B ablaufen kann, wird im Folgenden beschrieben:

Figure 00150001
Figure 00160001
Such node hash groups can be created for each node in the hash tree. They contain exactly the information that is necessary for the algorithm according to the invention and thus represent the basic data elements that are exchanged between the hosts to be synchronized. Each time a node hash value is received and it is not identical to the one present locally on the host received ( HA / i ≠ HB / i ), the node hash group for this hash (NHG i ) is transmitted. This recursive part of the algorithm, which for example can run on host B, is described below:
Figure 00150001
Figure 00160001

Es wurden Simulationen zu dem erfindungsgemäßen Verfahren durchgeführt. Hierbei wurden MD5-Hashes mit einer Länge von 128 Bit und einem Spreadfaktor M von 256 (m = 8) verwendet, die zu einem Hash-Tree mit 16 Ebenen führen.Simulations of the method according to the invention were carried out. It used MD5 hashes with a length of 128 bits and a spread factor M of 256 (m = 8), resulting in a hash tree with 16 levels.

Es sind zwei Datenbestände DA und DB gegeben, deren Unterschiede festgestellt werden müssen. Die Datenbestände sind mit zufälligen Bytearrays (Random-Bytearrays) gefüllt, die durch ihre 128 Bit Hashes repräsentiert werden. Die Größe der Datenbestände ist vorgegeben, ebenso die Anzahl der Unterschiede zwischen den Datenbeständen. Wird beispielsweise von einer Größe des Datenbestands von 1000 und einer Anzahl von 100 Unterschieden ausgegangen, so umfasst jeder Datenbestand 950 identische und 50 nicht-identische Elemente zu Beginn des Synchronisierungsvorgangs.There are two databases D A and D B whose differences must be determined. The datasets are filled with random byte arrays (random byte arrays) represented by their 128 bit hashes. The size of the databases is given as well as the number of differences between the databases. For example, assuming a size of the dataset of 1000 and a number of 100 differences, each dataset will contain 950 identical and 50 non-identical elements at the beginning of the synchronization process.

Simulationen wurden für eine festgelegte Datenbestandsgröße durchgeführt, als auch für eine festgelegte Anzahl an Unterschieden zwischen den zwei Datenbeständen. Der erfindungsgemäße Algorithmus, der auch als HashSync-Algorithmus bezeichnet wird, wurde mit einem modifizierten Slow-Sync-Algorithmus verglichen, bei dem eine Liste aller Hash-Werte in dem Datenbestand für jeden Synchronisierungszyklus übermittelt wird.Simulations were performed for a fixed dataset size as well as for a fixed number of differences between the two datasets. The algorithm according to the invention, which is also referred to as a HashSync algorithm, has been compared with a modified slow sync algorithm in which a list of all hash values in the database is transmitted for each synchronization cycle.

Als Hash-Funktion für die Node-Hashes wird ein einfaches XOR verwendet: H00 wird berechnet aus H0000 ⊕ H0001 ⊕ H0010 ⊕ H0011 (mit m = 2).The hash function for the node hashes uses a simple XOR: H 00 is calculated from H 0000 ⊕ H 0001 ⊕ H 0010 ⊕ H 0011 (with m = 2).

Es wurden die folgenden Veränderungen am Algorithmus vorgenommen: Der Prozess wird an einem Node angehalten, wenn nur noch ein Datenelement unter diesem Node vorhanden ist. Somit kann die Anzahl an Ebenen des Hash-Trees, die untersucht werden müssen, erheblich reduziert werden, was zu einer verringerten Anzahl an zu übertragenden Daten führt. Diese Information, d. h. ein Bit zusätzlich zu dem Node-Hash-Wert des Nodes mit dem einzelnen Datenelement, wird ebenfalls zum Synchronisierungspartner gesendet. Der Partner kann somit alle restlichen Datenelemente unter diesem Node als Unterschiede identifizieren. Befindet sich unterhalb eines beliebigen Nodes im Hashtree eines Datasets A nur ein Data-Hash (d. h. es gibt nur einen Data-Hash, der mit den prefix-bits des Nodes beginnt), kann der Algorithmus für diesen Zweig bereits frühzeitig unterbrochen werden: Der Node-Hash ist bei Verwendung der XOR-Funktion identisch mit dem Data-Hash. Die Information, dass dies der Fall ist, kann mit einem weiteren Bit übertragen werden. Der Synchronisationspartner mit Dataset B kann diese Information dann verwenden und weiß entweder dass seine Daten identisch sind (bei gleichem Node-Hashwert, also dem gleichen vorhandenen Data-Hash), oder kann mit Hilfe der bei ihm vorhandenen Data-Hashes unterhalb des betrachteten Nodes feststellen, welche Unterschiede bestehen. Sind bei ihm mehrere Data-Hashes vorhanden, ist sofort bekannt, dass die zugehörigen Daten in Dataset A nicht vorhanden sind.The following changes have been made to the algorithm: The process is stopped at a node when there is only one more data element under that node. Thus, the number of levels of hash trees that need to be examined can be significantly reduced, resulting in a reduced number of data to be transmitted. This information, d. H. one bit in addition to the node hash value of the node with the single data element is also sent to the synchronization partner. The partner can thus identify all remaining data elements under this node as differences. If there is only one data hash (ie, there is only one data hash starting with the node's prefix bits) below any node in the hashtree of a dataset A, the algorithm for that branch can be broken early: the node Hash is the same as the data hash when using the XOR function. The information that this is the case can be transmitted with another bit. The synchronization partner with dataset B can then use this information and either knows that its data is identical (with the same node hash value, ie the same existing data hash), or can determine with the aid of the existing data hashes below the considered node which differences exist. If there are several data hashes in it, it is immediately known that the corresponding data in Dataset A is not available.

In 3 sind die Ergebnisse für eine festgelegte Anzahl von 106 Datenelementen dargestellt. Der Slow-Sync-Algorithmus verursacht konstant eine Datenmenge von 12,8 MBit (ungefähr 1,5 MByte). Dies ist exakt die Hash-Größe von 128 Bit multipliziert mit der Anzahl der Hash-Werte. Es ist erkennbar, dass das erfindungsgemäße Verfahren signifikante Verbesserungen ermöglicht. Die Leistungsfähigkeit des erfindungsgemäßen Verfahrens ist besonders groß, wenn die Anzahl der Unterschiede verglichen zu der Gesamtgröße des Datenbestands gering ist. Bei größeren Verhältnissen wächst die Anzahl der zu übermittelnden Daten bis zu einem Maximum von etwa 10,3 MBit (1,22 MByte), verbleibt jedoch immer unter dem Wert für das Slow-Sync-Verfahren. Bemerkenswert ist, dass die Größe der zu übertragenden Daten bei einer großen Anzahl von unterschiedlichen Datenelementen wieder sinkt. Dies resultiert aus der oben beschriebenen Information, die hinsichtlich der Nodes übermittelt wird, die ein einzelnes Datenelement enthalten.In 3 the results are shown for a fixed number of 10 6 data elements. The slow sync algorithm constantly causes a data volume of 12.8 MBit (about 1.5 MByte). This is exactly the hash size of 128 bits multiplied by the number of hash values. It can be seen that the method according to the invention enables significant improvements. The performance of the The method according to the invention is particularly large when the number of differences is small compared to the total size of the data. In larger circumstances, the number of data to be transmitted increases up to a maximum of about 10.3 MBit (1.22 MB), but always remains below the value for the slow sync method. It is noteworthy that the size of the data to be transmitted decreases again for a large number of different data elements. This results from the information described above, which is transmitted with respect to the nodes containing a single data element.

In 4 sind Simulationsergebnisse für eine festgelegte Anzahl an Unterschieden dargestellt, nämlich für 10 und 100 sich unterscheidende Datenelemente aus einer Gesamtmenge von 106 Datenelementen. Die zu übertragende Datenmenge für Slow-Sync steigt konstant bis zu 12,8 MBit an (ungefähr 1,5 MByte), während der Wert für das erfindungsgemäße Verfahren signifikant unter diesem Wert bleibt. Für 100 Unterschiede müssen 2,3 MBit (0,27 MByte) und für 10 Unterschiede 290 Kbit (0,03 MByte) übermittelt werden.In 4 For example, simulation results are presented for a fixed number of differences, namely 10 and 100 differing data elements out of a total of 10 6 data elements. The amount of data to be transferred for slow sync increases constantly up to 12.8 MBit (about 1.5 MByte), while the value for the inventive method remains significantly below this value. For 100 differences, 2.3 MBit (0.27 MByte) and for 10 differences 290 Kbit (0.03 MByte) must be transmitted.

ZITATE ENTHALTEN IN DER BESCHREIBUNG QUOTES INCLUDE IN THE DESCRIPTION

Diese Liste der vom Anmelder aufgeführten Dokumente wurde automatisiert erzeugt und ist ausschließlich zur besseren Information des Lesers aufgenommen. Die Liste ist nicht Bestandteil der deutschen Patent- bzw. Gebrauchsmusteranmeldung. Das DPMA übernimmt keinerlei Haftung für etwaige Fehler oder Auslassungen.This list of the documents listed by the applicant has been generated automatically and is included solely for the better information of the reader. The list is not part of the German patent or utility model application. The DPMA assumes no liability for any errors or omissions.

Zitierte Nicht-PatentliteraturCited non-patent literature

  • M. Frassl, M. Lichtenstern, M. Khider, and M. Angermann, ”Developing a system for information management in disaster relief – methodology and requirements,” in ISCRAM '10: Proceedings of the 7th International ISCRAM Conference, May 2010 [0002] M. Frassl, M. Lichtenstern, M. Khider, and M. Angermann, "Developing a System for Information Management in Disaster Relief - Methodology and Requirements," in ISCRAM '10: Proceedings of the 7th International ISCRAM Conference, May 2010 [0002 ]

Claims (10)

Verfahren zum Synchronisieren von Datenbeständen, die auf verschiedenen Hosts gespeichert sind, wobei diese Hosts insbesondere durch ein vorzugsweise kabelloses Ad-hoc-Netzwerk nicht kontinuierlich miteinander verbunden sind, dadurch gekennzeichnet, dass aus den Datenelementen im Datenbestand eines jeden Hosts ein Hash-Tree durch die folgenden Schritte gebildet wird: a) Berechnen eines Hash-Wertes (H0–HM, H0|0–HM|M oder H0|0|0–HM|M|M) für jeden Datenelement der Datenbestände auf den verschiedenen Hosts, b) Zusammenfassen mehrerer Datenelemente zu einem Node, c) Berechnen eines Node-Hash-Wertes (Hroot, H0–HM oder H0|0–HM|M) aus den Hash-Werten der Datenelemente (H0–HM, H0|0–HM|M oder H0|0|0–HM|M|M), die zu einem Node gehören, wobei die zwischen den verschiedenen Hosts (A, B) zur Synchronisierung auszutauschenden Datenelemente durch folgende Schritte bestimmt werden: d) Übermitteln des Node-Hash-Wertes, der obersten Ebene des Hash-Trees, nämlich des Root-Node-Hash-Wertes (Hroot) des Datenbestandes eines ersten Hosts (A) an einen zweiten Hosts (B), e) Vergleichen des vom ersten Host (A) empfangenen Root-Node-Hash-Wertes (Hroot) durch den zweiten Host (B), mit dem Node-Hash-Wert der obersten Ebene des Hash-Trees, nämlich dem Root-Node-Hash-Wert (Hroot), seines eigenes Datenbestandes, f) Beenden des Synchronisierungsvorgangs, sofern die Root-Node-Hash-Werte (Hroot) des ersten und zweiten Hosts (A, B) identisch sind, g) Fortführen des Synchronisierungsvorgangs durch folgende Schritte, sofern die Root-Node-Hash-Werte (Hroot) des ersten und zweiten Hosts (A, B) nicht identisch sind: h) Übermitteln der Hash-Werte (H0–HM) der zweitobersten Ebene des Hash-Trees vom zweiten Host zum ersten Host oder umgekehrt, i) Vergleichen der vom zweiten bzw. ersten Host (B, A) empfangenen Hash-Werte (H0–HM) durch den ersten bzw. zweiten Host (A, B) mit den entsprechenden Hash-Werten (H0–HM) seines eigenen Datenbestands, j) Fortführen des Synchronisierungsvorgangs für alle Datenelemente oder Nodes, deren Hash-Werte (H0–HM) im ersten und zweiten Host (A, B) nicht identisch sind, durch die folgenden Schritte: k) Übermitteln dieser Datenelemente vom ersten Host (A) zum zweiten Host (B) oder umgekehrt, sofern der oder die nicht-identischen Hash-Werte (H0–HM) im ersten und zweiten Host (A, B) zu einem oder mehreren Datenelementen gehörten, so dass der Synchronisierungsvorgang beendet ist oder l) Übermitteln der Hash-Werte (H0|0–HM|M) der Nodes, die zu dem oder den identifizierten Nodes zusammengefasst sind, deren Hash-Werte (H0–HM) im ersten und zweiten Host (A, B) in Verfahrensschritt i) als nicht-identisch identifiziert wurden, vom ersten zum zweiten Host (A, B) oder umgekehrt, sofern der oder die nicht-identischen Hash-Werte (H0–HM) im ersten und zweiten Host (A, B), die im Verfahrensschritt i) ermittelt wurden, aus mehreren Hash-Werten (H0|0–HM|M) einer untergeordneten Ebene des Hash-Trees berechnet wurden, m) Vergleichen der vom ersten bzw. zweiten Host (A, B) empfangenen Hash-Werte (H0|0–HM|M) durch den ersten bzw. zweiten Host (A, B) mit den entsprechenden Hash-Werten (H0|0–HM|M) seines eigenen Datenbestands, n) Fortführen des Synchronisierungsvorgangs für alle Datenelemente oder Nodes, deren Hash-Werte (H0|0–HM|M) im ersten und zweiten Host (A, B) nicht identisch sind, durch Wiederholen der letzten drei Verfahrensschritte k), l), m), solange bis alle nicht-identischen Datenelemente übermittelt wurden.A method for synchronizing data stored on different hosts, these hosts are not continuously connected, in particular by a preferably wireless ad hoc network, characterized in that from the data elements in the database of each host a hash tree through the the following steps are formed: a) calculating a hash value (H 0 -H M , H 0 | 0 -H M | M or H 0 | 0 | 0 -H M | M | M ) for each data element of the data stocks on the b) combining several data elements into one node, c) calculating a node hash value (H root , H 0 -H M or H 0 | 0 -H M | M ) from the hash values of the data elements (H 0 -H M , H 0 | 0 -H M | M or H 0 | 0 | 0 -H M | M | M ) belonging to a node, the ones to be exchanged between the different hosts (A, B) for synchronization Data elements are determined by the following steps: d) transmitting the node hash value, the top level of the hash tree s, namely the root node hash value (H root ) of the dataset of a first host (A) to a second host (B), e) comparing the root node hash value received from the first host (A) ( H root ) by the second host (B), with the top-level hash value of the hash tree, namely the root node hash value (H root ), of its own data store, f) terminating the synchronization process, if the root node hash values (H root ) of the first and second hosts (A, B) are identical, g) continue the synchronization process by the following steps, provided that the root node hash values (H root ) of the first and second hosts (A, B) are not identical: h) transmitting the hash values (H 0 -H M ) of the second highest level of the hash tree from the second host to the first host, or vice versa; first host (B, A) received hash values (H 0 -H M ) by the first and second hosts (A, B), respectively, with the corresponding hash values (H 0 -H M ) of its own D Maintaining the synchronization process for all data elements or nodes whose hash values (H 0 -H M ) in the first and second host (A, B) are not identical, by the following steps: k) transmitting these data elements from the first one Host (A) to the second host (B) or vice versa, provided that the one or more non-identical hash values (H 0 -H M ) in the first and second host (A, B) belonged to one or more data elements, so that Or l) transmitting the hash values (H 0 | 0 -H M | M ) of the nodes that are combined to the identified node or nodes whose hash values (H 0 -H M ) in the first and second nodes Host (A, B) were identified in step i) as non-identical, from the first to the second host (A, B) or vice versa, provided that the one or more non-identical hash values (H 0 -H M ) in the first and second host (A, B), which were determined in step i), from a plurality of hash values (H 0 | 0 -H M | M ) e m) comparing the hash values (H 0 | 0 -H M | M ) received by the first and second hosts (A, B), respectively, by the first and second hosts (A, B) B) with the corresponding hash values (H 0 | 0 -H M | M ) of its own data stock, n) continuing the synchronization process for all data elements or nodes whose hash values (H 0 | 0 -H M | M ) in first and second hosts (A, B) are not identical, by repeating the last three process steps k), l), m) until all non-identical data elements have been transmitted. Verfahren zum Synchronisieren von Datenbeständen nach Anspruch 1, gekennzeichnet durch folgende Verfahrensschritte nach dem Verfahrensschritt c): – Zusammenfassen mehrerer Nodes zu einem übergeordneten Node, – Berechnen eines Node-Hash-Wertes (H0–HM) aus den Hash-Werten (H0|0–HM|M) der Nodes, die zu einem übergeordneten Node zusammengefasst wurden, – Zusammenfassen mehrerer übergeordneter Nodes zu einem Root-Node, – Berechnen eines Root-Node-Hash-Wertes (Hroot) aus den Node-Hash-Werten (H0–HM) der Nodes, die zum Root-Node zusammengefasst sind.Method for synchronizing databases according to claim 1, characterized by the following method steps after method step c): - combining several nodes into a higher level node, - calculating a node hash value (H 0 -H M ) from the hash values (H 0 | 0 -H M | M ) of the nodes that have been merged to form a parent node, - combine multiple parent nodes into a root node, - calculate a root node hash value (H root ) from the node hash Values (H 0 -H M ) of the nodes grouped into the root node. Verfahren zum Synchronisieren von Datenbeständen nach Anspruch 2, dadurch gekennzeichnet, dass Nodes aus genau einer Ebene des Hash-Trees zu einem übergeordneten Node oder Root-Node zusammengefasst werden.Method for synchronizing databases according to claim 2, characterized in that nodes are combined from exactly one level of the hash tree to a parent node or root node. Verfahren zum Synchronisieren von Datenbeständen nach einem der Ansprüche 1 bis 3, dadurch gekennzeichnet, dass der Hash-Tree für den Datenbestand jedes Hosts einmalig erstellt wird und bei Änderung eines oder mehrerer Datenelemente im Datenbestand durch Neuberechnung des oder der durch die Änderung des Datenbestands betroffenen übergeordneten Hash-Werte aktualisiert wird.Method for synchronizing databases according to one of claims 1 to 3, characterized in that the hash tree for the database of each host is created once and when changed one or more data elements in the dataset is updated by recalculating the parent hash or values affected by the change in dataset. Verfahren zum Synchronisieren von Datenbeständen nach einem der Ansprüche 1 bis 4, dadurch gekennzeichnet, dass zur Bestimmung der zwischen den Hosts zur Synchronisierung auszutauschenden Datenelemente genau eine Nachricht pro Ebene des Hash-Trees ausgetauscht wird.Method for synchronizing data inventories according to one of claims 1 to 4, characterized in that exactly one message is exchanged for each level of the hash tree for determining the data elements to be exchanged between the hosts for synchronization. Verfahren zum Synchronisieren von Datenbeständen nach einem der Ansprüche 1 bis 5, dadurch gekennzeichnet, dass ausschließlich diejenigen Datenelemente und/oder Hash-Werte zwischen zwei zu synchronisierenden Hosts (A, B) übertragen werden, die zu Nodes zusammengefasst sind, deren Hash-Werte (Hroot, H0–HM, H0|0–HM|M oder H0|0|0–HM|M|M) in den zwei Hosts (A, B) nicht identisch sind.Method for synchronizing databases according to one of claims 1 to 5, characterized in that only those data elements and / or hash values are transmitted between two hosts (A, B) to be synchronized, which are combined into nodes whose hash values ( H root , H 0 -H M , H 0 | 0 -H M | M or H 0 | 0 | 0 -H M | M | M ) in the two hosts (A, B) are not identical. Verfahren zum Synchronisieren von Datenbeständen nach einem der Ansprüche 1 bis 6, dadurch gekennzeichnet, dass ein Host mit mehreren weiteren Hosts gleichzeitig Hash-Werte aus seinem Hash-Tree austauscht, um die zur Synchronisierung auszutauschenden Datenelemente zu bestimmen.Method for synchronizing databases according to one of claims 1 to 6, characterized in that a host with several other hosts at the same time exchanges hash values from its hash tree to determine the data elements to be exchanged for synchronization. Verfahren zum Synchronisieren von Datenbeständen nach einem der Ansprüche 1 bis 7, dadurch gekennzeichnet, dass die zur Synchronisierung auszutauschenden Datenelemente zwischen zwei Hosts (A, B) durch folgenden Algorithmus bestimmt werden:
Figure 00230001
Method for synchronizing databases according to one of claims 1 to 7, characterized in that the data elements to be exchanged for synchronization between two hosts (A, B) are determined by the following algorithm:
Figure 00230001
Verfahren zum Synchronisieren von Datenbeständen nach einem der Ansprüche 1 bis 8, dadurch gekennzeichnet, dass Hash-Werte zwischen den Hosts (A, B) inkrementell, insbesondere bitweise, übertragen werden, bis in mindestens einem Bit ein Unterschied zwischen zwei sich entsprechenden Hash-Werten auf zwei zu synchronisierenden Hosts (A, B) gefunden wird, oder bis das Ende des Hash-Wertes erreicht ist.Method for synchronizing databases according to one of claims 1 to 8, characterized in that hash values between the hosts (A, B) are transmitted incrementally, in particular bitwise, to at least one bit, a difference between two corresponding hash values is found on two hosts (A, B) to be synchronized, or until the end of the hash value has been reached. Verfahren zum Synchronisieren von Datenbeständen nach einem der Ansprüche 1 bis 9, dadurch gekennzeichnet, dass Datenelemente, die sich in demselben Zeitabschnitt geändert haben, unter demselben Node zusammengefasst werden.Method for synchronizing databases according to one of claims 1 to 9, characterized in that data elements which have changed in the same period are combined under the same node.
DE102011012444A 2011-02-25 2011-02-25 Synchronizing volume of data memorized on various hosts that are not connected with one another by wireless ad-hoc-network, comprises combining several nodes into superordinate node and calculating node hash value from hash values of nodes Ceased DE102011012444A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
DE102011012444A DE102011012444A1 (en) 2011-02-25 2011-02-25 Synchronizing volume of data memorized on various hosts that are not connected with one another by wireless ad-hoc-network, comprises combining several nodes into superordinate node and calculating node hash value from hash values of nodes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
DE102011012444A DE102011012444A1 (en) 2011-02-25 2011-02-25 Synchronizing volume of data memorized on various hosts that are not connected with one another by wireless ad-hoc-network, comprises combining several nodes into superordinate node and calculating node hash value from hash values of nodes

Publications (1)

Publication Number Publication Date
DE102011012444A1 true DE102011012444A1 (en) 2012-08-30

Family

ID=46635146

Family Applications (1)

Application Number Title Priority Date Filing Date
DE102011012444A Ceased DE102011012444A1 (en) 2011-02-25 2011-02-25 Synchronizing volume of data memorized on various hosts that are not connected with one another by wireless ad-hoc-network, comprises combining several nodes into superordinate node and calculating node hash value from hash values of nodes

Country Status (1)

Country Link
DE (1) DE102011012444A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2779016A1 (en) * 2013-03-15 2014-09-17 Onective AG Automated contact list matching with improved privacy
EP3200082A1 (en) * 2016-01-26 2017-08-02 Siemens Aktiengesellschaft Method for automatic process execution testing
CN110647531A (en) * 2019-08-15 2020-01-03 中国平安财产保险股份有限公司 Data synchronization method, device, equipment and computer readable storage medium
US11921747B2 (en) * 2019-12-13 2024-03-05 EMC IP Holding Company LLC Self healing fast sync any point in time replication systems using augmented Merkle trees
US11928085B2 (en) 2019-12-13 2024-03-12 EMC IP Holding Company LLC Using merkle trees in any point in time replication

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Julian CHESTERFIELD, Pablo RODRIGUEZ: "DeltaCast: Efficient File Reconciliation in Wireless Broadcast Systems", 2005, Mobile Systems and Applications, ISBN: 1-931971-31-5, S 93-106, DOI: 10.1145/1067170.1067181 *
M. Frassl, M. Lichtenstern, M. Khider, and M. Angermann, "Developing a system for information management in disaster relief - methodology and requirements," in ISCRAM '10: Proceedings of the 7th International ISCRAM Conference, May 2010

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2779016A1 (en) * 2013-03-15 2014-09-17 Onective AG Automated contact list matching with improved privacy
WO2014140736A1 (en) * 2013-03-15 2014-09-18 Qnective Ag Automated contact list matching with improved privacy
US9754114B2 (en) 2013-03-15 2017-09-05 Qnective Ag Automated contact list matching with improved privacy
EP3200082A1 (en) * 2016-01-26 2017-08-02 Siemens Aktiengesellschaft Method for automatic process execution testing
CN110647531A (en) * 2019-08-15 2020-01-03 中国平安财产保险股份有限公司 Data synchronization method, device, equipment and computer readable storage medium
US11921747B2 (en) * 2019-12-13 2024-03-05 EMC IP Holding Company LLC Self healing fast sync any point in time replication systems using augmented Merkle trees
US11928085B2 (en) 2019-12-13 2024-03-12 EMC IP Holding Company LLC Using merkle trees in any point in time replication

Similar Documents

Publication Publication Date Title
DE60313371T2 (en) Use of tree-like "bitmap" data structures
DE112011104005T5 (en) A method and data processing system for encoding data stored in a column-oriented manner, a data processing program and a computer program product
DE112011103497T5 (en) Information processing system, information processing device, load balancing method, database provisioning scheduling method, and load balancing connection distribution program in a distributed database
DE102011012444A1 (en) Synchronizing volume of data memorized on various hosts that are not connected with one another by wireless ad-hoc-network, comprises combining several nodes into superordinate node and calculating node hash value from hash values of nodes
DE112012005557B4 (en) Generating a code alphabet of symbols for generating codewords for words used with a program
EP3707854B1 (en) Method for linking a first data block to a second data block, method for checking the integrity of a blockchain structure, device and computer program product
DE102012216321A1 (en) Method for designing protocol i.e. HTTP protocol, for executing network data exchange, involves determining protocol format of positions of notifications with respect to field pairs and semantic features of semantic association
DE102008054354A1 (en) Safe coding of voltage data of many cells in hybrid vehicles
DE102014105207A1 (en) Method for operating a communication network and communication network
AT520746B1 (en) Method for detecting abnormal operating conditions
EP3424200B1 (en) Identification coding device and identification coding device for data distribution in networks, and network elements comprising such devices
EP3668036A1 (en) Creation of a blockchain with blocks comprising an adjustable number of transaction blocks and multiple intermediate blocks
EP2044738B1 (en) Method for operating a local area data network
EP1151591B1 (en) Data access and management system and data access and management method for a computer system
EP3475819B1 (en) Method for automatically and dynamically assigning the responsibility for tasks to the available computing components in a highly distributed data-processing system
DE102012003977A1 (en) Method for examining a data transport network and computer program product
EP3028182B1 (en) Method and system for synchronising data
DE102012211031B3 (en) Method for coding a data stream
EP2334138A1 (en) Wireless communication network over a defined group of participants
DE102018125435A1 (en) System for machining a workpiece with communicating system participants
DE102020210193B3 (en) Method and system for securing data communication within a network
DE10239299C1 (en) Telecommunications network distribution method for cost optimization of radio network sub-systems
DE102012205620B4 (en) PSEUDOZUFALLSZAHLENGENERATOR AND METHOD FOR PROVIDING A PSEUDOZUFALLSFOLGE
EP2705445B1 (en) Method for storing data on a central server
DE102006044859B4 (en) Method for operating a decentralized data network

Legal Events

Date Code Title Description
R012 Request for examination validly filed
R016 Response to examination communication
R016 Response to examination communication
R002 Refusal decision in examination/registration proceedings
R003 Refusal decision now final
R003 Refusal decision now final

Effective date: 20141021