EP3997587A1 - Synchronization of spatial entity attributes in different databases - Google Patents

Synchronization of spatial entity attributes in different databases

Info

Publication number
EP3997587A1
EP3997587A1 EP20733230.5A EP20733230A EP3997587A1 EP 3997587 A1 EP3997587 A1 EP 3997587A1 EP 20733230 A EP20733230 A EP 20733230A EP 3997587 A1 EP3997587 A1 EP 3997587A1
Authority
EP
European Patent Office
Prior art keywords
spatial
database
entity
data
snapshot
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
EP20733230.5A
Other languages
German (de)
French (fr)
Other versions
EP3997587C0 (en
EP3997587B1 (en
Inventor
Mikael EKBOM
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.)
T2 Data AB
Original Assignee
T2 Data AB
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 T2 Data AB filed Critical T2 Data AB
Publication of EP3997587A1 publication Critical patent/EP3997587A1/en
Application granted granted Critical
Publication of EP3997587C0 publication Critical patent/EP3997587C0/en
Publication of EP3997587B1 publication Critical patent/EP3997587B1/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/08Error detection or correction by redundancy in data representation, e.g. by using checking codes
    • G06F11/10Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's
    • G06F11/1004Adding special bits or symbols to the coded information, e.g. parity check, casting out 9's or 11's to protect a block of data words, e.g. CRC or checksum
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F16/273Asynchronous replication or reconciliation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2322Optimistic concurrency control using timestamps
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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
    • G06F16/275Synchronous replication
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2329Optimistic concurrency control using versioning
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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/23Updating
    • G06F16/2358Change logging, detection, and notification
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/84Using snapshots, i.e. a logical point-in-time copy of the data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Definitions

  • the present disclosure relates to synchronization of spatial entity attributes in different databases that are communicatively coupled to form a distributed and nonhierarchical database cluster.
  • Meteorological data can e.g. be collected for different spatial locations in the atmosphere and used for forecasting the weather.
  • the meteorological data can be stored and updated for each spatial location in the atmosphere.
  • Another example is air traffic control, where the position of all aircraft in the controlled airspace needs to be continuously monitored.
  • the attributes for the different spatial locations can be stored in a database on a central server that is accessible to all parties to the system.
  • a cluster of drones co-operate to gather information such as e.g. land surveying information
  • each of the drones can maintain a database about the attributes of the spatial locations surveyed by this drone, and the drones in the cluster can exchange such information between them.
  • This helps ensuring that the drones in the cluster together cover all spatial locations, and avoids any of the drones in the cluster unnecessarily surveying a spatial location that has already been surveyed by another drone in the cluster.
  • it is a challenge to keep the databases synchronized, i.e. having the same attributes stored for each spatial location in the different drones. There is often not a need to synchronize the attributes for all of the spatial locations in all of the drones.
  • Synchronization could be effected in the regular way, by all drones in the cluster communicating with a central server that maintains the "master” version of the database. However, this means that the drones in the cluster cannot co operate with each other if they do not have contact with the central server.
  • the present disclosure aims to provide a method of synchronizing spatial entity attributes in a cluster of databases that are maintained at different locations. This is achieved by methods, databases, computer-readable mediums and computer program products as defined in the claims.
  • the present disclosure relates to methods for synchronizing data entities in a primary database and one or more secondary databases communicatively coupled with the primary database to form a distributed and nonhierarchical database cluster, wherein the primary and secondary databases each store attributes of spatial entities of a space modeled using a spatial model, and each database comprises at least one data entity representing a spatial entity with defined spatial boundaries within a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity.
  • the claimed method may comprise: selecting a first segment of the spatial model; generating a snapshot comprising information relating to data entities within said first segment of the spatial model in the primary database at a snapshot time T s , said information identifying changes to the data entities where each change comprises a time stamp, wherein only data entities with a time stamp ⁇ To, where T s > To, are included in the snapshot, although changes to the data entities up to the time T s have been received in the primary database; receiving, from one or more secondary databases in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in the secondary database, wherein only data entities with a time stamp ⁇ To, where T s > To, are included in the snapshot; determining whether there is a synchronization need based on a comparison between the generated and received snapshots, wherein there is determined to be a synchronization need for said selected first segment of the spatial model if the generated snapshot and the received corresponding snapshots do not all match; and synchronizing the data entities within said
  • the primary and secondary databases are arranged in different drones.
  • the snapshot time T s is selected to be at least a delay time T d after To, i.e. T s 3 To + T d .
  • the delay time T d is set to be longer than the maximum transmission delay time between the databases in the cluster.
  • changes to the data entities during the delay time T d do not affect the snapshot because they are stored in a cache memory at least during the delay time T d before being stored in the respective database.
  • Other ways of ensuring that changes to the data entities during the delay time T d do not affect the snapshot are of course also possible.
  • the first segment of the spatial model is selected based on the spatial entity position (SEP) of the data entity having the most recent time stamp in the primary database.
  • SEP spatial entity position
  • the most important segments to synchronize are often the segments of the spatial model currently being surveyed by both drones, i.e. the most recently surveyed spatial entities.
  • the most recently surveyed spatial entity would normally be represented by the data entity having the most recent time stamp, since attributes are normally stored or updated for the data entities when the spatial entities are surveyed. If the segment of the spatial model is selected based on the data entity having the most recent time stamp, the segment will thus include the data entity representing the most recently surveyed spatial entity.
  • a secondary database from which to receive a snapshot is selected based on the spatial entity position (SEP) of the data entity having the most recent time stamp in said secondary database.
  • SEP spatial entity position
  • the number of other databases to exchange snapshots with may also be selected, based e.g. on the size of the segment selected and/or the nature of the attributes. If a very small segment is selected, it may not be interesting to synchronize this segment with all the other databases in the cluster. Also, if the attributes are fast-changing, attributes stored a long time ago in other databases may be less interesting to synchronize.
  • the other databases to exchange snapshots with may however be determined simply based on which other databases are within communicating range.
  • the snapshot is generated based on there being determined to be a need to synchronize spatial entity attributes in the primary database with spatial entity attributes in at least one secondary database, e.g. based on the proximity between two database arrangements.
  • a data entity is not created until an attribute has been determined for the spatial entity represented by this data entity. This means that there will be no data entities without attributes in the databases, which means that at start there are no data entities at all in the databases. This may be useful especially if there are large numbers of spatial entities, e.g. due to the resolution being high or the area or volume of the spatial model being large. If the spatial model e.g. is an octree model of the whole earth, there will in most situations be interesting attributes only for spatial entities within a very small part of this model, e.g. between the earth surface and the atmosphere.
  • a secondary database from which to receive snapshots is selected based on whether there is at least one data entity within said selected first segment in said secondary database.
  • a database comprising no such data entity does not have any information of interest for the primary database, and there is thus no need for synchronization from the point of view of the primary database.
  • a secondary database from which to receive snapshots is selected also based on whether the time stamp of the most recent changes to the at least one data entity in said secondary database within the selected first segment is within a predetermined threshold time span. This is a way of ensuring that only information that is not too old is synchronized.
  • the threshold time span may depend on the attributes, since some attributes may be more fast changing than others.
  • the space is modeled using a hierarchical spatial model, such as e.g. a hierarchical hexagonal model, a hierarchical quadtree model or a hierarchical octree model.
  • a hierarchical model may simplify determination of synchronization need, as well as synchronization of the databases.
  • the synchronization need is determined by calculating a checksum based on the data entities in the snapshot, where the checksum is generated by merging generated and received information.
  • the synchronization need may however also be determined in other ways, such as e.g. by calculating a hash-sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
  • the data entities may e.g. be synchronized in such a way that newer versions of a data entity always replace older.
  • the data entities may further be synchronized in such a way that a deleted data entity always replaces a none- deleted, even if it is older.
  • the present disclosure also relates to a primary database arrangement in a distributed and nonhierarchical cluster of communicatively coupled database arrangements, the primary database arrangement comprising a primary database storing attributes of spatial entities of a space modeled using a spatial model, and comprising data entities, each data entity representing a spatial entity with defined spatial boundaries within a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity.
  • the primary database arrangement may further comprise: at least one processor configured to perform any of the above disclosed methods; a storage means configured to store the data entities and their attributes; and a communications interface configured to send/receive attributes related to the data entities to/from the processor to/from one or more secondary database arrangements in the cluster.
  • the present disclosure also relates to a computer-readable medium on which is stored non-transitory information configured to control a processor to perform any of the above disclosed methods.
  • the present disclosure also relates to a computer program product comprising code portions adapted to control a processor to perform any of the above disclosed methods.
  • segment defines an area or volume of the spatial model.
  • a segment may be defined as a certain number of spatial entities, since each spatial entity corresponds to a certain area or volume in the spatial model. If the spatial model is a hierarchical spatial model, the segment may be defined as a certain hierarchical level in the hierarchical spatial model, since this also corresponds to an area or volume of the spatial model.
  • primary database defines the database in the database arrangement that initiates the synchronization and defines the segment of the spatial model regarding which the synchronization takes place.
  • secondary database defines each of the databases in the other database arrangements.
  • the at least one processor may be one processor, or a number of processors between which signals are transmitted. Some processing may e.g. take place in one processor, and signals may then be transmitted to one or more other processors for further processing.
  • Fig. 2 shows a schematic view of one or more embodiments of a database arrangement, in accordance with one or more embodiments of the disclosure.
  • Figs. 3 and 4 show schematic examples of spatial entities that may be represented by data entities, in accordance with one or more embodiments of the disclosure.
  • Fig. 5 shows a flow diagram for a method for synchronizing databases in a distributed and nonhierarchical database cluster, in accordance with one or more embodiments of the disclosure.
  • the space In order to store attributes that relate to different locations in a space, it is advantageous to divide the space into spatial location coordinates which each have a certain spatial extension, where the spatial extension depends on the resolution required for the storage. In some applications, a resolution of e.g. a square or cubic millimeter is required, while for other applications, a much lower resolution of e.g. a square or cubic meter, or even a square or cubic kilometer, is enough. It is possible to model the space using a spatial model, where the smallest part is called a spatial entity. If the space is a two-dimensional (2D) space, the spatial model may e.g. be a hexagon model or a quadtree model. Fig.
  • 2D two-dimensional
  • Fig. 1 a shows an example of a hexagonal spatial model used for mapping the earth
  • Fig. 1 b shows an example of a hierarchical quadtree model.
  • the spatial model may e.g. be an octree model (octrees are the three-dimensional analog of quadtrees).
  • Fig. 1c shows an example of a hierarchical octree model. Octrees are often used in 3D graphics and 3D game engines.
  • Flexagonal spatial models may also be hierarchical in the same way as the illustrated quadtree and octree models, by a number of connected hexagons being grouped into a larger segment that defines the next hierarchical level. There are also three-dimensional hexagonal spatial models.
  • each spatial location becomes a spatial entity, with well-defined boundaries.
  • Each spatial entity corresponds to a certain area or volume in the spatial model, and can be represented by a data entity in a database. It is then possible to store the attributes of the spatial entity as attributes of this data entity.
  • the spatial entities may be grouped into segments, where each segment defines an area or volume of the spatial model.
  • the segment may e.g. be defined as a certain number of spatial entities, since each spatial entity corresponds to a certain area or volume in the spatial model. If the spatial model is a hierarchical spatial model, the segment may be defined as a certain hierarchical level in the hierarchical spatial model, since this also corresponds to an area or volume of the spatial model.
  • the attributes of each spatial entity may be stored as attributes of the data entity representing the spatial entity in a database in each drone.
  • the drones in the cluster can then each maintain a database of the attributes of the spatial locations surveyed by this drone as attributes of the data entities representing the spatial entities. Flowever, in order for the drones in the cluster to be able to co-operate with each other at all times, a non-hierarchical way of synchronizing these databases is needed.
  • the solution involves detecting if databases storing attributes of spatial entities of a space modeled using a spatial model, where each database comprises data entities representing spatial entities with defined spatial boundaries within a segment of the spatial model, are synchronized or not for a selected segment.
  • the databases are preferably communicatively coupled to form a distributed and nonhierarchical database cluster.
  • the database in the database arrangement that initiates the synchronization may be defined as a "primary database”, and the databases from which snapshots are received may be defined as "secondary databases”.
  • a data entity may be changed during the transmission in one database in the cluster without the change being included in the snapshot received in another database in the cluster, e.g. due to communication network transmission delay.
  • the present disclosure overcomes this problem by providing each change to a data entity with a time stamp, and determining whether there is a synchronization need based on snapshots where only data entities with a time stamp ⁇ To, where T s > To, are included, although changes to the data entities up to the time T s have been received in the databases, and thus discloses a method for detection of a synchronization need and thereby an improved synchronization of data between distributed and nonhierarchical spatial databases in a cluster that is flexible and resilient to faults.
  • the invention may be used for any database arrangements storing attributes of spatial entities of a space modeled using a spatial model, where the database arrangements are communicatively coupled to form a distributed and nonhierarchical database cluster, e.g. database arrangements arranged in a cluster of drones that co-operate to gather land surveying information. It may be difficult to keep the data entities synchronized in the drone databases, i.e. having the same version of data entities in different databases in the cluster. In a non-limiting example, surveying drones may lose wireless network coverage during a period and during this period survey spatial locations that other drones are unaware of.
  • the data entities in the database of one drone would indicate that the spatial location has been surveyed, whereas the data entities in the databases of other drones in the cluster would indicate that the spatial location has not been surveyed, thus there is a synchronization need. It may be difficult to detect whether databases in the cluster have versions of the data entities that differ, e.g. to determine whether there is a synchronization need.
  • Another situation where the invention may be used is for vehicles such as e.g. cars that exchange information about the road conditions in the form of spatial entity attributes. It is common nowadays for cars to report road condition data to the cloud, and receive aggregated road condition data from the cloud. However, in situations where there is no connection to the cloud, cars could instead exchange such information directly with other cars. In such situations, there may be a need to determine whether the locally held databases are synchronized for a certain segment of the spatial model. The same may apply to e.g. airplanes or boats, which may exchange information about e.g. weather or navigational warnings in the form of spatial entity attributes. Mobile phones may also have the need to exchange spatial entity attribute information directly between each other.
  • System embodiments may be used to exchange information about the road conditions in the form of spatial entity attributes.
  • Fig. 2 shows a schematic view of an embodiment of a database arrangement 200.
  • the database arrangement 200 may comprise a database 250, at least one processor 210, a storage means 220 in the form of e.g. a memory, and a communications interface 240.
  • the database 250 may store attributes of spatial entities of a space modeled using a spatial model, such as e.g. a hierarchical spatial hexagon model, a hierarchical spatial quadtree model, or a hierarchical spatial octree model.
  • the database 250 may comprise data entities representing spatial entities with defined spatial boundaries within at least a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity.
  • the database arrangement 200 may form a part of a distributed and nonhierarchical cluster of communicatively coupled database arrangements 200.
  • the communications interface 240 may be configured to communicate with these other database arrangements 200, in order to send and receive attributes related to the data entities to and from the processor 210 to and from one or more other database arrangements 200 in the cluster.
  • the at least one processor 210 may be provided with specifically designed programming or program code portions adapted to control the at least one processor 210 to perform the steps and functions of one or more embodiments of the methods described herein.
  • the storage means 220 may be adapted to store data entities and their attributes received from the at least one processor 210, and the at least one processor 210 may be adapted to retrieve such stored data entities and their attributes from the storage means 220.
  • the at least one processor 210 may be arranged to select a first segment of the spatial model, and generate a snapshot comprising information relating to data entities within said first segment of the spatial model in the database 250 at a snapshot time T s , said information identifying changes to the data entities where each change comprises a time stamp, wherein only data entities with a time stamp ⁇ To, where T s > To, are included in the snapshot, although changes to the data entities up to the time T s have been received in the database 250.
  • the at least one processor 210 may further be arranged to receive, from one or more other database arrangements 200 in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in the database of the respective database arrangement 200, wherein only data entities with a time stamp ⁇ To, where T s > To, are included in the snapshot.
  • the databases to exchange snapshots with may also be selected, based e.g. on the size of the segment selected and/or the nature of the attributes.
  • the databases from which to receive snapshots may e.g. selected based on the selected first segment of the spatial model. If a very small segment is selected, it may not be interesting to synchronize this segment with all the other databases in the cluster. Also, if the attributes are fast-changing, attributes stored a long time ago in other databases may be less interesting to synchronize.
  • the other databases to exchange snapshots with may however be determined simply based on which other database arrangements are within communicating range. The synchronization may therefore be based on the need for synchronization.
  • the snapshot is generated based on there being determined to be a need to synchronize spatial entity attributes in the database 250 with spatial entity attributes in at least one other database, e.g. based on the proximity between two database arrangements 200.
  • the snapshots comprise all changes to the data entities in the selected segment since the previous snapshot was generated but only up to the time To.
  • To is preferably set in a controlled way, so that it is ensured that all databases have the same reference point, e.g. by determining To in such a way that it for the selected snapshot time T s represents a corresponding time in all databases.
  • the at least one processor 210 may further be arranged to determine whether there is a synchronization need based on a comparison between the generated and received snapshots, f the generated snapshot and the received corresponding snapshots all match, there is no need for any synchronization for said selected first segment of the spatial model. If not all of them match, there is a need for synchronization for said selected first segment of the spatial model.
  • the snapshot time T s may be at least a delay time T d after To, i.e. T s 3To +T d .
  • the delay time T d is preferably set to be longer than the maximum transmission delay time between the database arrangements 200 in the cluster.
  • the maximum transmission delay time may e.g. depend on the bandwidth of the wireless transmission between the database arrangements 200.
  • the transmission delay may e.g. be determined or estimated as end-to-end delay time, round-trip delay time (RTD) or round-trip time (RTT). In embodiments, the transmission delay may be determined or estimated based on a communication network model.
  • the delay time T d may e.g. calculated based on a statistical measure such as max, average, or standard deviation of the transmission delay.
  • One way of ensuring that only data entities with a time stamp ⁇ To are included in the snapshot is to insert data entities into a buffer, and select data entities from the buffer based on the time stamps of the data entities. It is possible to reduce the complexity of the selection of data entities from the buffer by introducing an ordered buffer such that all the selected data entities are in adjacent positions in the buffer.
  • the data entities may e.g. be ordered based on the time stamp of the data entity in ascending or descending order.
  • FIGs. 3 and 4 show schematic examples of spatial entities 300 that may be represented by data entities.
  • a spatial entity 300 can be seen as an atomic entity, or be divided into attribute sets that are atomic entities belonging to the commonly defined spatial entity.
  • each data entity may comprise a spatial entity position (SEP) 310.
  • the SEP 310 preferably defines the position of the spatial entity within the spatial model, and may be of any data type, e.g. text, integer or floating point number, as would be understood by a skilled person.
  • the SEP 310 may e.g. be the coordinates or address that defines the location of the spatial entity within the spatial model. If the spatial model e.g. is an octree model of the earth with the center of the earth defined as the center of the octree model, the address to the spatial entity within the spatial model may also define the physical position of the spatial entity. However, in other situations, the SEP 310 may be just a data address within the model, and the actual physical position of the spatial entity may be defined elsewhere.
  • At least one attribute 320 of the spatial entity may also be coupled to each data entity, e.g. by being comprised in the data entity.
  • the at least one attribute 320 may be of any data type, e.g. text, integer or floating point number, as would be understood by a skilled person.
  • the attribute 320 is often more than just a single value. It can be any collection of numbers and/or strings and it can include internal objects, even in several levels.
  • the attribute 320 is thus often a complex data structure.
  • Examples of spatial entity attributes are e.g. elevation, inclination, temperature, humidity, classification of vegetation, detection of different kinds of attacks on vegetation such as e.g. mold or insects, and detection of algae bloom.
  • Spatial entity attributes may also be e.g. different kinds of buildings or edifices.
  • the data entity preferably comprises a time stamp 340 for each change to an attribute 320 of the data entity.
  • the time stamps 340 do not necessarily represent the actual time - any parameter that indicates the relative time can serve as a time stamp 340.
  • a time stamp 340 may e.g. be in the form h:m:s, such as e.g. 8:28:27.32 or 11 :57:22.81, but it may also be e.g. a number representing e.g. the number of milliseconds that have passed since a defined starting point.
  • the databases are preferably synchronized so that time stamps 340 generated at the same time in different databases correspond to each other, using methods per se known to the person skilled in the art.
  • the data entity may further comprise a version identity (VID) 330 and/or a deleted-flag that indicates that the data entity is created and exists or that the data entity has been deleted but not erased from the memory.
  • VIP version identity
  • the optional VID 330 may e.g. be generated by calculating a hash sum or generating a value of some other kind, as would be understood by the skilled person. There are also a number of other ways of marking a data entity as deleted, e.g. by letting a specific data entity type represent a deleted data entity, and allow this data entity type to exclude its contents, thus making it smaller.
  • the optional VID 330 is initially set when the data entity is created, and updated each time an attribute 320 is updated.
  • the optional VID 330 uniquely identifies the version of the attribute 320 and is a unique identifier that may be generated by calculating a hash sum or by generating a value of some kind.
  • the optional VID 330 may be represented by 16 bits, 32 bits, 64 bits, 128 bits or any other number of bits or data representation depending on the application, number of databases etc. In yet an example, the optional VID 330 may be randomly generated.
  • the data entity time stamp 340 is set to the time recorded by the database when the data entity is created, updated or deleted. In embodiments, the optional entity deleted-flag is set to FALSE or 0 (zero) when the data entity is created and exists or to TRUE or 1 (one) when the data entity has been deleted but not erased from the memory 220.
  • the time stamp 340 may indicate when the data entity was created, updated or deleted.
  • the time stamp 340 may e.g. be set or assigned to the data entity when the change to the data entity is made.
  • each time a data entity is created, or deleted, or updated by changing the content, which leads to VID 330 and/or time stamp 340 changes a changed data entity is generated and distributed to the other databases in the cluster via the communications network.
  • the example spatial entity 300 shown in Fig. 3 is an atomic entity represented by a data entity comprising a SEP 310, two attributes 320, a VID 330 and a time stamp 340.
  • the example spatial entity 300 shown in Fig. 4 is coupled to two attributes 320 that are atomic entities belonging to the commonly defined spatial entity 300.
  • the time stamp 340 and the optional VID 330 may be comprised either in the data entity (as shown in Fig. 4) or as a time stamp 340 and an optional VID 330 in each of the attributes 320.
  • the first segment of the spatial model is selected based on the SEP 310 of the data entity having the most recent time stamp 340 in the primary database.
  • the most important segment to synchronize may be the segment of the spatial model currently being surveyed by both drones, i.e. the most recently surveyed spatial entity 300.
  • This spatial entity would normally be represented by the data entity having the most recent time stamp in the primary database, since attributes are normally stored or updated for the data entities when the spatial entities are surveyed. If the segment of the spatial model is selected to include the data entity having the most recent time stamp, the segment will thus include the data entity representing the most recently surveyed spatial entity.
  • a data entity is not created until an attribute 320 has been determined for the spatial entity 300 represented by this data entity. This means that there will be no data entities without attributes 320 in the databases, which means that at start there are no data entities at all in the databases. This may be useful especially if there are large numbers of spatial entities, e.g. due to the resolution being high or the area or volume of the spatial model being large.
  • the determination of the synchronization need is preferably performed according to a predictable method or algorithm based on generated and received snapshots such that a synchronization need determined will be the same in all databases in the cluster if the determination is based on identical sets of snapshots.
  • the synchronization need is determined by calculating a checksum based on data entities of the snapshots, where the checksum is generated by merging generated and received data entities, e.g. by applying XOR to a common attribute of the data entities.
  • the synchronization need may be determined in other ways, such as calculating a hash- sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
  • each database in the cluster may e.g. be synchronized according to the rules:
  • a predicable selection behavior is needed when data entities and/or snapshots have the same time stamp, e.g. the data entity and/or the snapshot with the highest or lowest VID 330 is selected.
  • all databases in the cluster maintain data using exactly the same rules.
  • Rule 3 may be particularly important if the representation of recorded time is of finite resolution.
  • Rule number 4 may be particularly important to avoid having data entities reappearing after being deleted.
  • Rule number 5 may be particularly important when a timeslot configuration comprising multiple non-overlapping timeslots is used, as deleted entities may otherwise end up in different timeslots. This could cause a situation where the databases falsely seems to be out of sync. Rules 4 and 5 are optional and used only if deleted data entities are handled.
  • the snapshot is generated by merging the set of snapshots and/or data entities into a data structure.
  • the SEPs 310 and/or the attributes 320 and/or the VIDs 330 and/or the time stamps 340 of the data entities may be merged to generate the snapshot.
  • merging data entities to generate a snapshot further comprises applying a logical operator to the data entities, such as exclusive or (XOR), to generate a snapshot in the form of a checksum, e.g. to apply XOR to the VID of the data entities.
  • a logical operator such as exclusive or (XOR)
  • XOR exclusive or
  • Other ways of merging the data such as calculating a hash-sum, may also be used.
  • the synchronization need is determined by determining that there is no synchronization need if the generated snapshot matches the received snapshots, or by determining that there is a synchronization need if the generated snapshot and the received corresponding snapshots do not all match.
  • One exemplary embodiment of a determination that there is no synchronization need is if the data entities on which the generated snapshot is based, and the corresponding data entities stored in the other databases in the cluster, all match, e.g. have identical SEP 310, attributes 320 and time stamp 340, and optionally the same VID 330.
  • One example of a determined need for synchronization is if the data entities on which the generated snapshot is based and the corresponding data entities stored at the other databases in the cluster do not all match, and e.g. any of the SEP 310, attributes 320 and time stamp 340 differ amongst data entities in each database in the cluster.
  • Yet an example of a determined need for synchronization is if the data entities on which the generated snapshot is based and the corresponding data entities stored at the other databases in the cluster do not all match, and e.g. any of the SEP 310, attributes 320 and VID 330 differ amongst data entities in each database in the cluster.
  • the generated snapshots comprise information descriptive of the data entities. In yet an embodiment, the generated snapshots comprise a checksum based on the data entities. In yet an embodiment, the generated snapshots comprise a checksum based on the snapshots. In yet an embodiment, the checksum is based on changes to the data entities. In yet an embodiment, the generated snapshots comprise a checksum based on information comprised in the data entities.
  • the synchronization need is determined by calculating a checksum based on the data entities in the snapshot, where the checksum is generated by merging generated and received information.
  • the synchronization need may however also be determined in other ways, such as calculating a hash-sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
  • Fig. 5 shows a flow diagram for a method 500 for synchronizing databases in a distributed and nonhierarchical database cluster.
  • the method may preferably be used for synchronization between a primary database and one or more secondary databases communicatively coupled with the primary database to form a distributed and nonhierarchical database cluster, wherein the primary and secondary databases each store attributes of spatial entities of a space modeled using a spatial model, and each database comprises at least one data entity representing a spatial entity with defined spatial boundaries within a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity.
  • the method comprises the following steps:
  • Step 530 selecting a first segment of the spatial model.
  • Step 535 generating a snapshot comprising information relating to data entities within said first segment of the spatial model in the primary database at a snapshot time T s , said information identifying changes to the data entities where each change comprises a time stamp 340, wherein only data entities with a time stamp ⁇ To, where T s > To, are included in the snapshot, although changes to the data entities up to the time T s have been received in the primary database.
  • Step 560 receiving, from one or more secondary databases in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in the secondary database, wherein only data entities with a time stamp ⁇ To, where T s > To, are included in the snapshot.
  • Step 570 determining whether there is a synchronization need based on a comparison between the generated and received snapshots, wherein there is determined to be a synchronization need for said selected first segment of the spatial model if the generated snapshot and the received corresponding snapshots do not all match.
  • Step 580 synchronizing the data entities within said selected first segment in the primary database with the data entities within said selected first segment in the at least one secondary database if there is determined to be a synchronization need.
  • the data entities are not created until at least one attribute 320 has been determined for the spatial entity 300 represented by the respective data entity. This means that there will be no data entities without attributes 320 in the databases, which means that at start there are no data entities at all in the databases. This may be useful especially if there are large numbers of spatial entities, e.g. due to the resolution being high or the area or volume of the spatial model being large.
  • the space has been modeled using a hierarchical spatial model, such as e.g. a hierarchical hexagonal model, a hierarchical quadtree model or a hierarchical octree model.
  • a hierarchical spatial model such as e.g. a hierarchical hexagonal model, a hierarchical quadtree model or a hierarchical octree model.
  • the determining 570 of the synchronization need is done by calculating a checksum based on the data entities in the snapshot, where the checksum is generated by merging generated and received information.
  • the synchronization need may however also be determined in other ways, such as e.g. by calculating a hash-sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
  • the data entities are synchronized in such a way that newer versions of the data entity always replace older.
  • the data entities may further be synchronized in such a way that a deleted data entity always replaces a none-deleted, even if it is older.
  • the method further comprises one or more of the following steps:
  • Step 510 determining To in such a way that it for the selected snapshot time T s represents a corresponding time in all databases.
  • Step 520 selecting the snapshot time T s to be at least a delay time T d after To, i.e. T s 3 To + T d .
  • Step 525 setting the delay time T d to be longer than the maximum transmission delay time between the databases in the cluster.
  • the size of the segment may be selected e.g. based on the transmission conditions, in order to reduce the amount of data needed to be transferred if the transmission conditions are bad.
  • the segment may be selected to be the whole spatial model, but it is generally more practical to select a limited area or volume.
  • Step 540 generating the snapshot based on there being determined to be a need to synchronize spatial entity attributes in the primary database with spatial entity attributes in at least one secondary database. This may e.g. be based on the proximity between two database arrangements 200.
  • Step 545 selecting a secondary database from which to receive a snapshot based on the spatial entity position (SEP) 310 of the data entity having the most recent time stamp 340 in said secondary database.
  • the number of other databases to exchange snapshots with may be selected based e.g. on the nature of the attributes 320. If the attributes 320 are fast-changing, attributes 320 stored a long time ago in other databases may be less interesting to synchronize. The other databases to exchange snapshots with may however be determined simply based on which other databases are within communicating range.
  • Step 550 selecting a secondary database from which to receive a snapshot based on whether there is a data entity within said selected first segment in said secondary database.
  • a database comprising no such data entity does not have any information of interest for the primary database, and there is thus no need for synchronization from the point of view of the primary database.
  • Step 555 selecting a secondary database from which to receive a snapshot based on whether there is at least one data entity within said selected first segment in said secondary database, and whether the time stamp of the most recent changes to said data entity is within a predetermined threshold time span. This is a way of ensuring that only information that is not too old is synchronized.
  • the threshold time span may depend on the attributes, since some attributes may be more fast-changing than others.
  • the at least one processor 210 of the described database arrangement 200 is in accordance with one or more embodiments configured to perform a selection of any or all of the method steps described herein that are associated with synchronizing databases.
  • a computer program product comprising code portions adapted to control a processor to perform any of the steps or functions of any of the embodiments described herein.
  • Software in accordance with the present disclosure can be stored in non-transitory form on one or more machine-readable mediums. It is also contemplated that software identified herein can be implemented using one or more general purpose or specific purpose computers and/or computer systems, networked and/or otherwise.
  • one or more embodiments provided by the present disclosure can be implemented using hardware, software, or combinations of hardware and software.
  • the various hardware components and/or software components set forth herein can be combined into composite components comprising software, hardware, and/or both.
  • the various hardware components and/or software components set forth herein can be separated into sub-components comprising software, hardware, or both.
  • software components can be implemented as hardware components, and vice- versa.
  • the ordering of various steps described herein can be changed, combined into composite steps, and/or separated into sub-steps to provide features described herein.

Landscapes

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

Abstract

The present disclosure relates to a method for synchronizing data entities in a primary database 250 and one or more secondary databases communicatively coupled with the primary database to form a distributed and nonhierarchical database cluster, wherein the primary and secondary databases each store attributes 320 of spatial entities 300 of a space modeled using a spatial model, and each database comprises at least one data entity representing a spatial entity 300 with defined spatial boundaries within a segment of the spatial model, where the attributes 320 of each spatial entity 300 is coupled to the respective data entity. The method comprises: selecting a first segment of the spatial model; generating a snapshot comprising information relating to data entities within said first segment of the spatial model in the primary database at a snapshot time Ts, said information identifying changes to the data entities where each change comprises a time stamp 340, wherein only data entities with a time stamp ≤ T0, where Ts > T0, are included in the snapshot, although changes to the data entities up to the time Ts have been received in the primary database 250; receiving, from one or more secondary databases in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in said secondary database, wherein only data entities with a time stamp ≤ T0, where Ts > T0, are included in the snapshot; determining whether there is a synchronization need based on a comparison between the generated and received snapshots, wherein there is determined to be a synchronization need for said selected first segment of the spatial model if the generated snapshot and the received corresponding snapshots do not all match; and synchronizing the data entities within said selected first segment in the primary database with the data entities within said selected first segment in the at least one secondary database if there is determined to be a synchronization need.

Description

SYNCHRONIZATION OF SPATIAL ENTITY ATTRIBUTES IN DIFFERENT DATABASES
TECHNICAL FIELD
The present disclosure relates to synchronization of spatial entity attributes in different databases that are communicatively coupled to form a distributed and nonhierarchical database cluster.
BACKGROUND
It is in many different situations useful to be able to store attributes that relate to different locations in a space.
Meteorological data can e.g. be collected for different spatial locations in the atmosphere and used for forecasting the weather. The meteorological data can be stored and updated for each spatial location in the atmosphere. Another example is air traffic control, where the position of all aircraft in the controlled airspace needs to be continuously monitored.
PROBLEMS WITH THE PRIOR ART
In most situations where attributes that relate to different locations in a space are stored, the attributes for the different spatial locations can be stored in a database on a central server that is accessible to all parties to the system.
However, in some applications, it is useful to distribute the storage into several different databases. For example, if a cluster of drones co-operate to gather information such as e.g. land surveying information, it is useful if each of the drones can maintain a database about the attributes of the spatial locations surveyed by this drone, and the drones in the cluster can exchange such information between them. This helps ensuring that the drones in the cluster together cover all spatial locations, and avoids any of the drones in the cluster unnecessarily surveying a spatial location that has already been surveyed by another drone in the cluster. In such situations, it is a challenge to keep the databases synchronized, i.e. having the same attributes stored for each spatial location in the different drones. There is often not a need to synchronize the attributes for all of the spatial locations in all of the drones.
Synchronization could be effected in the regular way, by all drones in the cluster communicating with a central server that maintains the "master” version of the database. However, this means that the drones in the cluster cannot co operate with each other if they do not have contact with the central server.
There is thus a need for a non-hierarchical way of synchronizing spatial entity attributes in different databases that are communicatively coupled to form a distributed and nonhierarchical database cluster. SUMMARY
The present disclosure aims to provide a method of synchronizing spatial entity attributes in a cluster of databases that are maintained at different locations. This is achieved by methods, databases, computer-readable mediums and computer program products as defined in the claims.
The present disclosure relates to methods for synchronizing data entities in a primary database and one or more secondary databases communicatively coupled with the primary database to form a distributed and nonhierarchical database cluster, wherein the primary and secondary databases each store attributes of spatial entities of a space modeled using a spatial model, and each database comprises at least one data entity representing a spatial entity with defined spatial boundaries within a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity. The claimed method may comprise: selecting a first segment of the spatial model; generating a snapshot comprising information relating to data entities within said first segment of the spatial model in the primary database at a snapshot time Ts, said information identifying changes to the data entities where each change comprises a time stamp, wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot, although changes to the data entities up to the time Ts have been received in the primary database; receiving, from one or more secondary databases in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in the secondary database, wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot; determining whether there is a synchronization need based on a comparison between the generated and received snapshots, wherein there is determined to be a synchronization need for said selected first segment of the spatial model if the generated snapshot and the received corresponding snapshots do not all match; and synchronizing the data entities within said selected first segment in the primary database with the data entities within said selected first segment in the at least one secondary database if there is determined to be a synchronization need.
In embodiments, the primary and secondary databases are arranged in different drones.
In embodiments, the snapshot time Ts is selected to be at least a delay time Td after To, i.e. Ts ³ To + Td.
In embodiments, the delay time Td is set to be longer than the maximum transmission delay time between the databases in the cluster. In embodiments, changes to the data entities during the delay time Td do not affect the snapshot because they are stored in a cache memory at least during the delay time Td before being stored in the respective database. Other ways of ensuring that changes to the data entities during the delay time Td do not affect the snapshot are of course also possible.
In embodiments, To is determined in such a way that it for the selected snapshot time Ts represents a corresponding time in all databases. In embodiments, the first segment of the spatial model is selected based on the spatial entity position (SEP) of the data entity having the most recent time stamp in the primary database. In the example where the method is used for synchronizing e.g. two drones working side-by-side surveying adjacent spatial locations, the most important segments to synchronize are often the segments of the spatial model currently being surveyed by both drones, i.e. the most recently surveyed spatial entities. The most recently surveyed spatial entity would normally be represented by the data entity having the most recent time stamp, since attributes are normally stored or updated for the data entities when the spatial entities are surveyed. If the segment of the spatial model is selected based on the data entity having the most recent time stamp, the segment will thus include the data entity representing the most recently surveyed spatial entity.
In embodiments, a secondary database from which to receive a snapshot is selected based on the spatial entity position (SEP) of the data entity having the most recent time stamp in said secondary database. This is a way of determining whether there are secondary databases that are currently storing attributes for spatial entities close to the spatial entity for which attributes are currently stored in the primary database, such as e.g. in the case of two drones working side-by-side surveying adjacent spatial locations.
The number of other databases to exchange snapshots with may also be selected, based e.g. on the size of the segment selected and/or the nature of the attributes. If a very small segment is selected, it may not be interesting to synchronize this segment with all the other databases in the cluster. Also, if the attributes are fast-changing, attributes stored a long time ago in other databases may be less interesting to synchronize. The other databases to exchange snapshots with may however be determined simply based on which other databases are within communicating range.
In embodiments, the snapshot is generated based on there being determined to be a need to synchronize spatial entity attributes in the primary database with spatial entity attributes in at least one secondary database, e.g. based on the proximity between two database arrangements.
In embodiments, a data entity is not created until an attribute has been determined for the spatial entity represented by this data entity. This means that there will be no data entities without attributes in the databases, which means that at start there are no data entities at all in the databases. This may be useful especially if there are large numbers of spatial entities, e.g. due to the resolution being high or the area or volume of the spatial model being large. If the spatial model e.g. is an octree model of the whole earth, there will in most situations be interesting attributes only for spatial entities within a very small part of this model, e.g. between the earth surface and the atmosphere.
In embodiments, a secondary database from which to receive snapshots is selected based on whether there is at least one data entity within said selected first segment in said secondary database. A database comprising no such data entity does not have any information of interest for the primary database, and there is thus no need for synchronization from the point of view of the primary database. In embodiments, a secondary database from which to receive snapshots is selected also based on whether the time stamp of the most recent changes to the at least one data entity in said secondary database within the selected first segment is within a predetermined threshold time span. This is a way of ensuring that only information that is not too old is synchronized. The threshold time span may depend on the attributes, since some attributes may be more fast changing than others.
In embodiments, the space is modeled using a hierarchical spatial model, such as e.g. a hierarchical hexagonal model, a hierarchical quadtree model or a hierarchical octree model. A hierarchical model may simplify determination of synchronization need, as well as synchronization of the databases.
In embodiments, the synchronization need is determined by calculating a checksum based on the data entities in the snapshot, where the checksum is generated by merging generated and received information. The synchronization need may however also be determined in other ways, such as e.g. by calculating a hash-sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
The data entities may e.g. be synchronized in such a way that newer versions of a data entity always replace older. The data entities may further be synchronized in such a way that a deleted data entity always replaces a none- deleted, even if it is older.
The present disclosure also relates to a primary database arrangement in a distributed and nonhierarchical cluster of communicatively coupled database arrangements, the primary database arrangement comprising a primary database storing attributes of spatial entities of a space modeled using a spatial model, and comprising data entities, each data entity representing a spatial entity with defined spatial boundaries within a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity. The primary database arrangement may further comprise: at least one processor configured to perform any of the above disclosed methods; a storage means configured to store the data entities and their attributes; and a communications interface configured to send/receive attributes related to the data entities to/from the processor to/from one or more secondary database arrangements in the cluster.
The present disclosure also relates to a computer-readable medium on which is stored non-transitory information configured to control a processor to perform any of the above disclosed methods.
The present disclosure also relates to a computer program product comprising code portions adapted to control a processor to perform any of the above disclosed methods.
In this disclosure, the term "segment” defines an area or volume of the spatial model. A segment may be defined as a certain number of spatial entities, since each spatial entity corresponds to a certain area or volume in the spatial model. If the spatial model is a hierarchical spatial model, the segment may be defined as a certain hierarchical level in the hierarchical spatial model, since this also corresponds to an area or volume of the spatial model. In this disclosure, the term "primary database” defines the database in the database arrangement that initiates the synchronization and defines the segment of the spatial model regarding which the synchronization takes place. The term "secondary database” defines each of the databases in the other database arrangements.
The at least one processor may be one processor, or a number of processors between which signals are transmitted. Some processing may e.g. take place in one processor, and signals may then be transmitted to one or more other processors for further processing.
The scope of the invention is defined by the claims, which are incorporated into this section by reference. A more complete understanding of embodiments of the invention will be afforded to those skilled in the art, as well as a realization of additional advantages thereof, by a consideration of the following detailed description of one or more embodiments. Reference will be made to the appended sheets of drawings that will first be described briefly.
BRI EF DESCRIPTION OF THE DRAWINGS Figs. 1 a-c show examples of spatial models.
Fig. 2 shows a schematic view of one or more embodiments of a database arrangement, in accordance with one or more embodiments of the disclosure.
Figs. 3 and 4 show schematic examples of spatial entities that may be represented by data entities, in accordance with one or more embodiments of the disclosure.
Fig. 5 shows a flow diagram for a method for synchronizing databases in a distributed and nonhierarchical database cluster, in accordance with one or more embodiments of the disclosure.
Embodiments of the present invention and their advantages are best understood by referring to the detailed description that follows. It should be appreciated that like reference numerals are used to identify like elements illustrated in one or more of the figures.
DETAILED DESCRIPTION
Introduction
In order to store attributes that relate to different locations in a space, it is advantageous to divide the space into spatial location coordinates which each have a certain spatial extension, where the spatial extension depends on the resolution required for the storage. In some applications, a resolution of e.g. a square or cubic millimeter is required, while for other applications, a much lower resolution of e.g. a square or cubic meter, or even a square or cubic kilometer, is enough. It is possible to model the space using a spatial model, where the smallest part is called a spatial entity. If the space is a two-dimensional (2D) space, the spatial model may e.g. be a hexagon model or a quadtree model. Fig. 1 a shows an example of a hexagonal spatial model used for mapping the earth, and Fig. 1 b shows an example of a hierarchical quadtree model. If the space is a three-dimensional (3D) space, the spatial model may e.g. be an octree model (octrees are the three-dimensional analog of quadtrees). Fig. 1c shows an example of a hierarchical octree model. Octrees are often used in 3D graphics and 3D game engines. Flexagonal spatial models may also be hierarchical in the same way as the illustrated quadtree and octree models, by a number of connected hexagons being grouped into a larger segment that defines the next hierarchical level. There are also three-dimensional hexagonal spatial models.
If the space is modelled using a spatial model, each spatial location becomes a spatial entity, with well-defined boundaries. Each spatial entity corresponds to a certain area or volume in the spatial model, and can be represented by a data entity in a database. It is then possible to store the attributes of the spatial entity as attributes of this data entity.
The spatial entities may be grouped into segments, where each segment defines an area or volume of the spatial model. The segment may e.g. be defined as a certain number of spatial entities, since each spatial entity corresponds to a certain area or volume in the spatial model. If the spatial model is a hierarchical spatial model, the segment may be defined as a certain hierarchical level in the hierarchical spatial model, since this also corresponds to an area or volume of the spatial model.
If a space to be land surveyed by a cluster of drones is modelled using a spatial model, the attributes of each spatial entity may be stored as attributes of the data entity representing the spatial entity in a database in each drone. The drones in the cluster can then each maintain a database of the attributes of the spatial locations surveyed by this drone as attributes of the data entities representing the spatial entities. Flowever, in order for the drones in the cluster to be able to co-operate with each other at all times, a non-hierarchical way of synchronizing these databases is needed.
The inventor has realized that the general method described in US 2018/0341691 (which describes data synchronization in a distributed data storage system and is hereby incorporated by reference) may be used for determining whether there is a synchronization need for data entities within a selected segment between the databases in the drones. This helps ensuring that the drones in the cluster cover all spatial locations, and avoiding that the same location is surveyed twice.
The solution involves detecting if databases storing attributes of spatial entities of a space modeled using a spatial model, where each database comprises data entities representing spatial entities with defined spatial boundaries within a segment of the spatial model, are synchronized or not for a selected segment. The databases are preferably communicatively coupled to form a distributed and nonhierarchical database cluster. In order to differentiate the databases from each other, the database in the database arrangement that initiates the synchronization may be defined as a "primary database”, and the databases from which snapshots are received may be defined as "secondary databases”.
If a snapshot is generated and transmitted simultaneously from different databases in the cluster, a data entity may be changed during the transmission in one database in the cluster without the change being included in the snapshot received in another database in the cluster, e.g. due to communication network transmission delay. In order to ensure that there is a common point in time for comparing the snapshot, it is desirable to eliminate or at least reduce the influence of transmission delay on the step of generating a snapshot.
The present disclosure overcomes this problem by providing each change to a data entity with a time stamp, and determining whether there is a synchronization need based on snapshots where only data entities with a time stamp < To, where Ts > To, are included, although changes to the data entities up to the time Ts have been received in the databases, and thus discloses a method for detection of a synchronization need and thereby an improved synchronization of data between distributed and nonhierarchical spatial databases in a cluster that is flexible and resilient to faults.
The invention may be used for any database arrangements storing attributes of spatial entities of a space modeled using a spatial model, where the database arrangements are communicatively coupled to form a distributed and nonhierarchical database cluster, e.g. database arrangements arranged in a cluster of drones that co-operate to gather land surveying information. It may be difficult to keep the data entities synchronized in the drone databases, i.e. having the same version of data entities in different databases in the cluster. In a non-limiting example, surveying drones may lose wireless network coverage during a period and during this period survey spatial locations that other drones are unaware of. In this example, the data entities in the database of one drone would indicate that the spatial location has been surveyed, whereas the data entities in the databases of other drones in the cluster would indicate that the spatial location has not been surveyed, thus there is a synchronization need. It may be difficult to detect whether databases in the cluster have versions of the data entities that differ, e.g. to determine whether there is a synchronization need.
Another situation where the invention may be used is for vehicles such as e.g. cars that exchange information about the road conditions in the form of spatial entity attributes. It is common nowadays for cars to report road condition data to the cloud, and receive aggregated road condition data from the cloud. However, in situations where there is no connection to the cloud, cars could instead exchange such information directly with other cars. In such situations, there may be a need to determine whether the locally held databases are synchronized for a certain segment of the spatial model. The same may apply to e.g. airplanes or boats, which may exchange information about e.g. weather or navigational warnings in the form of spatial entity attributes. Mobile phones may also have the need to exchange spatial entity attribute information directly between each other. System embodiments
Fig. 2 shows a schematic view of an embodiment of a database arrangement 200. The database arrangement 200 may comprise a database 250, at least one processor 210, a storage means 220 in the form of e.g. a memory, and a communications interface 240. The database 250 may store attributes of spatial entities of a space modeled using a spatial model, such as e.g. a hierarchical spatial hexagon model, a hierarchical spatial quadtree model, or a hierarchical spatial octree model. The database 250 may comprise data entities representing spatial entities with defined spatial boundaries within at least a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity.
The database arrangement 200 may form a part of a distributed and nonhierarchical cluster of communicatively coupled database arrangements 200. The communications interface 240 may be configured to communicate with these other database arrangements 200, in order to send and receive attributes related to the data entities to and from the processor 210 to and from one or more other database arrangements 200 in the cluster.
The at least one processor 210 may be provided with specifically designed programming or program code portions adapted to control the at least one processor 210 to perform the steps and functions of one or more embodiments of the methods described herein. The storage means 220 may be adapted to store data entities and their attributes received from the at least one processor 210, and the at least one processor 210 may be adapted to retrieve such stored data entities and their attributes from the storage means 220.
The at least one processor 210 may be arranged to select a first segment of the spatial model, and generate a snapshot comprising information relating to data entities within said first segment of the spatial model in the database 250 at a snapshot time Ts, said information identifying changes to the data entities where each change comprises a time stamp, wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot, although changes to the data entities up to the time Ts have been received in the database 250.
The at least one processor 210 may further be arranged to receive, from one or more other database arrangements 200 in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in the database of the respective database arrangement 200, wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot.
The databases to exchange snapshots with may also be selected, based e.g. on the size of the segment selected and/or the nature of the attributes. The databases from which to receive snapshots may e.g. selected based on the selected first segment of the spatial model. If a very small segment is selected, it may not be interesting to synchronize this segment with all the other databases in the cluster. Also, if the attributes are fast-changing, attributes stored a long time ago in other databases may be less interesting to synchronize. The other databases to exchange snapshots with may however be determined simply based on which other database arrangements are within communicating range. The synchronization may therefore be based on the need for synchronization. In embodiments, the snapshot is generated based on there being determined to be a need to synchronize spatial entity attributes in the database 250 with spatial entity attributes in at least one other database, e.g. based on the proximity between two database arrangements 200.
The snapshots comprise all changes to the data entities in the selected segment since the previous snapshot was generated but only up to the time To. To is preferably set in a controlled way, so that it is ensured that all databases have the same reference point, e.g. by determining To in such a way that it for the selected snapshot time Ts represents a corresponding time in all databases.
The at least one processor 210 may further be arranged to determine whether there is a synchronization need based on a comparison between the generated and received snapshots, f the generated snapshot and the received corresponding snapshots all match, there is no need for any synchronization for said selected first segment of the spatial model. If not all of them match, there is a need for synchronization for said selected first segment of the spatial model.
The snapshot time Ts may be at least a delay time Td after To, i.e. Ts³To +Td. The delay time Td is preferably set to be longer than the maximum transmission delay time between the database arrangements 200 in the cluster. The maximum transmission delay time may e.g. depend on the bandwidth of the wireless transmission between the database arrangements 200. The transmission delay may e.g. be determined or estimated as end-to-end delay time, round-trip delay time (RTD) or round-trip time (RTT). In embodiments, the transmission delay may be determined or estimated based on a communication network model.
Since the data entities are selected based on their time stamps, only recent changes (up to the time To) are considered, although changes to the data entities up to the time Ts have been stored in the databases.
By generating a snapshot based on data entities with a time stamp < To, the influence on the generated snapshot of transmission delay time between databases in the cluster may be reduced, thus improving synchronization of distributed databases in a cluster. The delay time Td may e.g. calculated based on a statistical measure such as max, average, or standard deviation of the transmission delay.
One way of determining To so that it for a selected snapshot time Ts represents a corresponding time in all databases is to calculate To according to the following equation:
To = Ts - (Ts mod Td) - Td
This forces To into a time slot of the length Td, and ensures that To falls into the same time slot in all databases. It is of course also possible to determine To in other ways.
One way of ensuring that only data entities with a time stamp < To are included in the snapshot is to insert data entities into a buffer, and select data entities from the buffer based on the time stamps of the data entities. It is possible to reduce the complexity of the selection of data entities from the buffer by introducing an ordered buffer such that all the selected data entities are in adjacent positions in the buffer. The data entities may e.g. be ordered based on the time stamp of the data entity in ascending or descending order.
Figs. 3 and 4 show schematic examples of spatial entities 300 that may be represented by data entities. A spatial entity 300 can be seen as an atomic entity, or be divided into attribute sets that are atomic entities belonging to the commonly defined spatial entity.
Since each spatial entity 300 has a defined area or volume with defined spatial boundaries, each data entity may comprise a spatial entity position (SEP) 310. The SEP 310 preferably defines the position of the spatial entity within the spatial model, and may be of any data type, e.g. text, integer or floating point number, as would be understood by a skilled person. The SEP 310 may e.g. be the coordinates or address that defines the location of the spatial entity within the spatial model. If the spatial model e.g. is an octree model of the earth with the center of the earth defined as the center of the octree model, the address to the spatial entity within the spatial model may also define the physical position of the spatial entity. However, in other situations, the SEP 310 may be just a data address within the model, and the actual physical position of the spatial entity may be defined elsewhere.
At least one attribute 320 of the spatial entity may also be coupled to each data entity, e.g. by being comprised in the data entity. In embodiments, the at least one attribute 320 may be of any data type, e.g. text, integer or floating point number, as would be understood by a skilled person. The attribute 320 is often more than just a single value. It can be any collection of numbers and/or strings and it can include internal objects, even in several levels. The attribute 320 is thus often a complex data structure. Examples of spatial entity attributes are e.g. elevation, inclination, temperature, humidity, classification of vegetation, detection of different kinds of attacks on vegetation such as e.g. mold or insects, and detection of algae bloom. Spatial entity attributes may also be e.g. different kinds of buildings or edifices.
The data entity preferably comprises a time stamp 340 for each change to an attribute 320 of the data entity. The time stamps 340 do not necessarily represent the actual time - any parameter that indicates the relative time can serve as a time stamp 340. A time stamp 340 may e.g. be in the form h:m:s, such as e.g. 8:28:27.32 or 11 :57:22.81, but it may also be e.g. a number representing e.g. the number of milliseconds that have passed since a defined starting point. The databases are preferably synchronized so that time stamps 340 generated at the same time in different databases correspond to each other, using methods per se known to the person skilled in the art.
In embodiments, the data entity may further comprise a version identity (VID) 330 and/or a deleted-flag that indicates that the data entity is created and exists or that the data entity has been deleted but not erased from the memory.
The optional VID 330 may e.g. be generated by calculating a hash sum or generating a value of some other kind, as would be understood by the skilled person. There are also a number of other ways of marking a data entity as deleted, e.g. by letting a specific data entity type represent a deleted data entity, and allow this data entity type to exclude its contents, thus making it smaller. In embodiments, the optional VID 330 is initially set when the data entity is created, and updated each time an attribute 320 is updated. In embodiments, the optional VID 330 uniquely identifies the version of the attribute 320 and is a unique identifier that may be generated by calculating a hash sum or by generating a value of some kind. In a non-limiting example, the optional VID 330 may be represented by 16 bits, 32 bits, 64 bits, 128 bits or any other number of bits or data representation depending on the application, number of databases etc. In yet an example, the optional VID 330 may be randomly generated. In embodiments, the data entity time stamp 340 is set to the time recorded by the database when the data entity is created, updated or deleted. In embodiments, the optional entity deleted-flag is set to FALSE or 0 (zero) when the data entity is created and exists or to TRUE or 1 (one) when the data entity has been deleted but not erased from the memory 220.
The time stamp 340 may indicate when the data entity was created, updated or deleted. The time stamp 340 may e.g. be set or assigned to the data entity when the change to the data entity is made. In embodiments, each time a data entity is created, or deleted, or updated by changing the content, which leads to VID 330 and/or time stamp 340 changes, a changed data entity is generated and distributed to the other databases in the cluster via the communications network.
The example spatial entity 300 shown in Fig. 3 is an atomic entity represented by a data entity comprising a SEP 310, two attributes 320, a VID 330 and a time stamp 340.
The example spatial entity 300 shown in Fig. 4 is coupled to two attributes 320 that are atomic entities belonging to the commonly defined spatial entity 300. In this case, the time stamp 340 and the optional VID 330 may be comprised either in the data entity (as shown in Fig. 4) or as a time stamp 340 and an optional VID 330 in each of the attributes 320.
In embodiments, the first segment of the spatial model is selected based on the SEP 310 of the data entity having the most recent time stamp 340 in the primary database. In the example where the method is used for synchronizing e.g. two drones working side-by-side surveying adjacent spatial locations, the most important segment to synchronize may be the segment of the spatial model currently being surveyed by both drones, i.e. the most recently surveyed spatial entity 300. This spatial entity would normally be represented by the data entity having the most recent time stamp in the primary database, since attributes are normally stored or updated for the data entities when the spatial entities are surveyed. If the segment of the spatial model is selected to include the data entity having the most recent time stamp, the segment will thus include the data entity representing the most recently surveyed spatial entity.
In embodiments, a data entity is not created until an attribute 320 has been determined for the spatial entity 300 represented by this data entity. This means that there will be no data entities without attributes 320 in the databases, which means that at start there are no data entities at all in the databases. This may be useful especially if there are large numbers of spatial entities, e.g. due to the resolution being high or the area or volume of the spatial model being large. The determination of the synchronization need is preferably performed according to a predictable method or algorithm based on generated and received snapshots such that a synchronization need determined will be the same in all databases in the cluster if the determination is based on identical sets of snapshots. In embodiments, the synchronization need is determined by calculating a checksum based on data entities of the snapshots, where the checksum is generated by merging generated and received data entities, e.g. by applying XOR to a common attribute of the data entities. The synchronization need may be determined in other ways, such as calculating a hash- sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
The data entities in each database in the cluster may e.g. be synchronized according to the rules:
Rule 1. A data entity is always changed as a whole.
Rule 2. Newer versions of data entities replace older.
Rule 3. A predicable selection behavior is needed when data entities and/or snapshots have the same time stamp, e.g. the data entity and/or the snapshot with the highest or lowest VID 330 is selected.
Rule 4. Deleted data entities and/or snapshots always replace none-deleted, even if they are older.
Rule 5. Newer versions of deleted data entities and/or snapshots replace older deleted versions.
In embodiments, all databases in the cluster maintain data using exactly the same rules. Rule 3 may be particularly important if the representation of recorded time is of finite resolution. Rule number 4 may be particularly important to avoid having data entities reappearing after being deleted. Rule number 5 may be particularly important when a timeslot configuration comprising multiple non-overlapping timeslots is used, as deleted entities may otherwise end up in different timeslots. This could cause a situation where the databases falsely seems to be out of sync. Rules 4 and 5 are optional and used only if deleted data entities are handled.
In an exemplary embodiment, the snapshot is generated by merging the set of snapshots and/or data entities into a data structure. The SEPs 310 and/or the attributes 320 and/or the VIDs 330 and/or the time stamps 340 of the data entities may be merged to generate the snapshot. In embodiments, merging data entities to generate a snapshot further comprises applying a logical operator to the data entities, such as exclusive or (XOR), to generate a snapshot in the form of a checksum, e.g. to apply XOR to the VID of the data entities. Other ways of merging the data, such as calculating a hash-sum, may also be used.
The synchronization need is determined by determining that there is no synchronization need if the generated snapshot matches the received snapshots, or by determining that there is a synchronization need if the generated snapshot and the received corresponding snapshots do not all match. One exemplary embodiment of a determination that there is no synchronization need is if the data entities on which the generated snapshot is based, and the corresponding data entities stored in the other databases in the cluster, all match, e.g. have identical SEP 310, attributes 320 and time stamp 340, and optionally the same VID 330.
One example of a determined need for synchronization is if the data entities on which the generated snapshot is based and the corresponding data entities stored at the other databases in the cluster do not all match, and e.g. any of the SEP 310, attributes 320 and time stamp 340 differ amongst data entities in each database in the cluster. Yet an example of a determined need for synchronization is if the data entities on which the generated snapshot is based and the corresponding data entities stored at the other databases in the cluster do not all match, and e.g. any of the SEP 310, attributes 320 and VID 330 differ amongst data entities in each database in the cluster.
In yet an embodiment, the generated snapshots comprise information descriptive of the data entities. In yet an embodiment, the generated snapshots comprise a checksum based on the data entities. In yet an embodiment, the generated snapshots comprise a checksum based on the snapshots. In yet an embodiment, the checksum is based on changes to the data entities. In yet an embodiment, the generated snapshots comprise a checksum based on information comprised in the data entities.
In embodiments, the synchronization need is determined by calculating a checksum based on the data entities in the snapshot, where the checksum is generated by merging generated and received information. The synchronization need may however also be determined in other ways, such as calculating a hash-sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
Method embodiments
Fig. 5 shows a flow diagram for a method 500 for synchronizing databases in a distributed and nonhierarchical database cluster. The method may preferably be used for synchronization between a primary database and one or more secondary databases communicatively coupled with the primary database to form a distributed and nonhierarchical database cluster, wherein the primary and secondary databases each store attributes of spatial entities of a space modeled using a spatial model, and each database comprises at least one data entity representing a spatial entity with defined spatial boundaries within a segment of the spatial model, where the attributes of each spatial entity is coupled to the respective data entity.
In accordance with one or more embodiments of the disclosure, the method comprises the following steps:
Step 530: selecting a first segment of the spatial model.
Step 535: generating a snapshot comprising information relating to data entities within said first segment of the spatial model in the primary database at a snapshot time Ts, said information identifying changes to the data entities where each change comprises a time stamp 340, wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot, although changes to the data entities up to the time Ts have been received in the primary database. Step 560: receiving, from one or more secondary databases in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in the secondary database, wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot.
Step 570: determining whether there is a synchronization need based on a comparison between the generated and received snapshots, wherein there is determined to be a synchronization need for said selected first segment of the spatial model if the generated snapshot and the received corresponding snapshots do not all match.
Step 580: synchronizing the data entities within said selected first segment in the primary database with the data entities within said selected first segment in the at least one secondary database if there is determined to be a synchronization need.
In embodiments, the data entities are not created until at least one attribute 320 has been determined for the spatial entity 300 represented by the respective data entity. This means that there will be no data entities without attributes 320 in the databases, which means that at start there are no data entities at all in the databases. This may be useful especially if there are large numbers of spatial entities, e.g. due to the resolution being high or the area or volume of the spatial model being large.
In embodiments, the space has been modeled using a hierarchical spatial model, such as e.g. a hierarchical hexagonal model, a hierarchical quadtree model or a hierarchical octree model.
In embodiments, the determining 570 of the synchronization need is done by calculating a checksum based on the data entities in the snapshot, where the checksum is generated by merging generated and received information. The synchronization need may however also be determined in other ways, such as e.g. by calculating a hash-sum or using an algorithm which calculates a smaller portion of data representing a unique identity of the data entities.
In embodiments, the data entities are synchronized in such a way that newer versions of the data entity always replace older. The data entities may further be synchronized in such a way that a deleted data entity always replaces a none-deleted, even if it is older.
In embodiments, the method further comprises one or more of the following steps:
Step 510: determining To in such a way that it for the selected snapshot time Ts represents a corresponding time in all databases.
Step 520: selecting the snapshot time Ts to be at least a delay time Td after To, i.e. Ts ³ To + Td.
Step 525: setting the delay time Td to be longer than the maximum transmission delay time between the databases in the cluster. Step 530: selecting said first segment of the spatial model based on the SEP 310 of the data entity having the most recent time stamp 340 in the primary database. The size of the segment may be selected e.g. based on the transmission conditions, in order to reduce the amount of data needed to be transferred if the transmission conditions are bad. The segment may be selected to be the whole spatial model, but it is generally more practical to select a limited area or volume.
Step 540: generating the snapshot based on there being determined to be a need to synchronize spatial entity attributes in the primary database with spatial entity attributes in at least one secondary database. This may e.g. be based on the proximity between two database arrangements 200.
Step 545: selecting a secondary database from which to receive a snapshot based on the spatial entity position (SEP) 310 of the data entity having the most recent time stamp 340 in said secondary database. The number of other databases to exchange snapshots with may be selected based e.g. on the nature of the attributes 320. If the attributes 320 are fast-changing, attributes 320 stored a long time ago in other databases may be less interesting to synchronize. The other databases to exchange snapshots with may however be determined simply based on which other databases are within communicating range.
Step 550: selecting a secondary database from which to receive a snapshot based on whether there is a data entity within said selected first segment in said secondary database. A database comprising no such data entity does not have any information of interest for the primary database, and there is thus no need for synchronization from the point of view of the primary database.
Step 555: selecting a secondary database from which to receive a snapshot based on whether there is at least one data entity within said selected first segment in said secondary database, and whether the time stamp of the most recent changes to said data entity is within a predetermined threshold time span. This is a way of ensuring that only information that is not too old is synchronized. The threshold time span may depend on the attributes, since some attributes may be more fast-changing than others.
Other embodiments
The at least one processor 210 of the described database arrangement 200 is in accordance with one or more embodiments configured to perform a selection of any or all of the method steps described herein that are associated with synchronizing databases.
In one or more embodiments, there is provided a computer-readable medium on which is stored:
- non-transitory information for performing a method according to any of the embodiments described herein;
and/or - non-transitory information configured to control a processor to perform any of the steps or functions of embodiments described herein.
In one or more embodiments, there is provided a computer program product comprising code portions adapted to control a processor to perform any of the steps or functions of any of the embodiments described herein. Software in accordance with the present disclosure, such as program code portions and/or data, can be stored in non-transitory form on one or more machine-readable mediums. It is also contemplated that software identified herein can be implemented using one or more general purpose or specific purpose computers and/or computer systems, networked and/or otherwise.
Where applicable, one or more embodiments provided by the present disclosure can be implemented using hardware, software, or combinations of hardware and software. Also where applicable, the various hardware components and/or software components set forth herein can be combined into composite components comprising software, hardware, and/or both. Where applicable, the various hardware components and/or software components set forth herein can be separated into sub-components comprising software, hardware, or both. In addition, where applicable, it is contemplated that software components can be implemented as hardware components, and vice- versa. Where applicable, the ordering of various steps described herein can be changed, combined into composite steps, and/or separated into sub-steps to provide features described herein.
The foregoing disclosure is not intended to limit the present invention to the precise forms or particular fields of use disclosed. It is contemplated that various alternate embodiments and/or modifications to the present invention, whether explicitly described or implied herein, are possible in light of the disclosure. Accordingly, the scope of the invention is defined only by the claims.
Further, not all of the steps of the claims have to be carried out in the listed order. All technically meaningful orders of the steps are covered by the claims.

Claims

1. A method (500) for synchronizing data entities in a primary database (250) and one or more secondary databases communicatively coupled with the primary database (250) to form a distributed and nonhierarchical database cluster, wherein the primary and secondary databases each store attributes (320) of spatial entities (300) of a space modeled using a spatial model, and each database comprises at least one data entity representing a spatial entity (300) with defined spatial boundaries within a segment of the spatial model, where the attributes (320) of each spatial entity (300) is coupled to the respective data entity, the method comprising:
selecting (530) a first segment of the spatial model;
generating (535) a snapshot comprising information relating to data entities within said first segment of the spatial model in the primary database at a snapshot time Ts, said information identifying changes to the data entities where each change comprises a time stamp (340), wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot, although changes to the data entities up to the time Ts have been received in the primary database (250);
receiving (560), from one or more secondary databases in the cluster, corresponding generated snapshots, each snapshot comprising data entities within said first segment of the spatial model in said secondary database, wherein only data entities with a time stamp < To, where Ts > To, are included in the snapshot;
determining (570) whether there is a synchronization need based on a comparison between the generated and received snapshots, wherein there is determined to be a synchronization need for said selected first segment of the spatial model if the generated snapshot and the received corresponding snapshots do not all match; and
synchronizing (580) the data entities within said selected first segment in the primary database with the data entities within said selected first segment in the at least one secondary database if there is determined to be a synchronization need.
2. The method of claim 1, further comprising selecting (520) the snapshot time Ts to be at least a delay time Td after To, i.e. Ts ³ To + Td.
3. The method of claim 2, further comprising setting (525) the delay time Td to be longer than the maximum transmission delay time between the databases in the cluster.
4. The method of any one of claims 1 - 3, further comprising determining (510) To in such a way that it for the selected snapshot time Ts represents a corresponding time in all databases.
5. The method of any one of claims 1 - 4, further comprising selecting (530) said first segment of the spatial model based on the spatial entity position (SEP) (310) of the data entity having the most recent time stamp (340) in the primary database.
6. The method of any one of claims 1 - 5, further comprising selecting (545) a secondary database from which to receive a snapshot based on the spatial entity position (SEP) (310) of the data entity having the most recent time stamp (340) in said secondary database.
7. The method of any one of claims 1 - 6, further comprising generating (540) the snapshot based on there being determined to be a need to synchronize spatial entity attributes in the primary database with spatial entity attributes in at least one secondary database.
8. The method of any one of claims 1 - 7, wherein a data entity is not created in a database until an attribute (320) has been determined for the spatial entity (300) represented by this data entity.
9. The method of claim 8, further comprising selecting (550) a secondary database from which to receive a snapshot based on whether there is at least one data entity within said selected first segment in said secondary database.
10. The method of claim 8 or 9, further comprising selecting (555) a secondary database from which to receive a snapshot based on whether there is at least one data entity within said selected first segment in said secondary database, and whether the time stamp of the most recent changes to said data entity is within a predetermined threshold time span.
11. The method of any one of claims 1 - 10, wherein the space has been modeled using a hierarchical spatial model, such as e.g. a hierarchical hexagonal model, a hierarchical quadtree model or a hierarchical octree model.
12. The method of any one of claims 1 - 11 , wherein the determining (570) of the synchronization need is done by calculating a checksum based on the data entities in the snapshot, where the checksum is generated by merging generated and received information.
13. A primary database arrangement (200) in a distributed and nonhierarchical cluster of
communicatively coupled with one or more secondary database arrangements, the primary database arrangement (200) comprising a primary database (250) storing attributes of spatial entities of a space modeled using a spatial model, and comprising data entities, each data entity representing a spatial entity (300) with defined spatial boundaries within a segment of the spatial model, where the attributes (320) of each spatial entity (300) is coupled to the respective data entity, wherein the primary database arrangement (200) further comprises:
at least one processor (210) configured to perform the method steps of any of claims 1 - 12;
a storage means (220) configured to store the data entities and their attributes (320); and
a communications interface (240) configured to send/receive attributes (320) related to the data entities to/from the processor to/from one or more secondary database arrangements in the cluster.
14. A computer-readable medium on which is stored non-transitory information configured to control a processor to perform the method steps of any of claims 1 - 12.
15. A computer program product comprising code portions adapted to control a processor to perform the method steps of any of claims 1 - 12.
EP20733230.5A 2019-07-08 2020-06-10 Synchronization of spatial entity attributes in different databases Active EP3997587B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
SE1950861A SE1950861A1 (en) 2019-07-08 2019-07-08 Synchronization of databases comprising spatial entity attributes
PCT/EP2020/066105 WO2021004721A1 (en) 2019-07-08 2020-06-10 Synchronization of spatial entity attributes in different databases

Publications (3)

Publication Number Publication Date
EP3997587A1 true EP3997587A1 (en) 2022-05-18
EP3997587C0 EP3997587C0 (en) 2025-10-22
EP3997587B1 EP3997587B1 (en) 2025-10-22

Family

ID=71096687

Family Applications (1)

Application Number Title Priority Date Filing Date
EP20733230.5A Active EP3997587B1 (en) 2019-07-08 2020-06-10 Synchronization of spatial entity attributes in different databases

Country Status (3)

Country Link
EP (1) EP3997587B1 (en)
SE (1) SE1950861A1 (en)
WO (1) WO2021004721A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN121070694B (en) * 2025-11-05 2026-01-27 深圳市杉岩数据技术有限公司 Distributed clock database snapshot generation method, database and server system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7912633B1 (en) * 2005-12-01 2011-03-22 Adept Mobilerobots Llc Mobile autonomous updating of GIS maps
CN101763347B (en) * 2008-12-24 2012-11-21 中国移动通信集团河北有限公司 GIS (Geographical Information System) interface platform as well as network GIS management system and management method
WO2017089355A1 (en) * 2015-11-24 2017-06-01 T2 Data Ab Data synchronization in a distributed data storage system
EP3619626A1 (en) * 2017-05-03 2020-03-11 Hesterman, Eric, Scott Video data creation and management system

Also Published As

Publication number Publication date
SE1950861A1 (en) 2021-01-09
WO2021004721A1 (en) 2021-01-14
EP3997587C0 (en) 2025-10-22
EP3997587B1 (en) 2025-10-22

Similar Documents

Publication Publication Date Title
EP3489908B1 (en) Three-dimensional data generation method, three-dimensional data transmission method, three-dimensional data generation device, and three-dimensional data transmission device
US11312379B2 (en) Occupancy map synchronization in multi-vehicle networks
JP6997301B2 (en) A system for creating and / or updating digital models of digital maps
JP7670909B2 (en) Three-dimensional data encoding method, three-dimensional data decoding method, and program
US9959670B2 (en) Method for rendering terrain
CN115104003A (en) Using map change data
US9305241B2 (en) Systems and methods for reducing a data set
CN120495431A (en) Three-dimensional data processing method and three-dimensional data processing device
KR101993755B1 (en) Method and apparatus for managing spatial information using 3D cube
CN109690243A (en) Three-dimensional data creation method and three-dimensional data creation device
CN106796760A (en) Communication device for vehicles and method for communication
CN111090712A (en) Data processing method, device and equipment and computer storage medium
KR101599133B1 (en) Method and system for providing map data of navigation device
JP7448518B2 (en) Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device
CN100489848C (en) Method for storing topographic image data in pyramid architecture
JP7630681B2 (en) Three-dimensional data encoding method, three-dimensional data decoding method, three-dimensional data encoding device, and three-dimensional data decoding device
US10241963B2 (en) Hash-based synchronization of geospatial vector features
CN115420297B (en) Map updating method, computer device and computer-readable storage medium
EP3997587B1 (en) Synchronization of spatial entity attributes in different databases
CN110245129B (en) Distributed global data deduplication method and device
CN121074262A (en) Geological environment monitoring method and system
US11100136B2 (en) Synchronization of databases comprising spatial entity attributes
CN120450555A (en) Vehicle trajectory data processing method and device, storage medium and electronic device
CN120278234A (en) Data heterogeneous oriented federal learning method, device, storage medium and equipment
JP7151897B2 (en) Barrier data collection device, barrier data collection method, and barrier data collection program

Legal Events

Date Code Title Description
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: UNKNOWN

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE INTERNATIONAL PUBLICATION HAS BEEN MADE

PUAI Public reference made under article 153(3) epc to a published international application that has entered the european phase

Free format text: ORIGINAL CODE: 0009012

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: REQUEST FOR EXAMINATION WAS MADE

17P Request for examination filed

Effective date: 20220204

AK Designated contracting states

Kind code of ref document: A1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

DAV Request for validation of the european patent (deleted)
DAX Request for extension of the european patent (deleted)
STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: EXAMINATION IS IN PROGRESS

17Q First examination report despatched

Effective date: 20240102

GRAP Despatch of communication of intention to grant a patent

Free format text: ORIGINAL CODE: EPIDOSNIGR1

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: GRANT OF PATENT IS INTENDED

INTG Intention to grant announced

Effective date: 20250613

GRAS Grant fee paid

Free format text: ORIGINAL CODE: EPIDOSNIGR3

GRAA (expected) grant

Free format text: ORIGINAL CODE: 0009210

STAA Information on the status of an ep patent application or granted ep patent

Free format text: STATUS: THE PATENT HAS BEEN GRANTED

AK Designated contracting states

Kind code of ref document: B1

Designated state(s): AL AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HR HU IE IS IT LI LT LU LV MC MK MT NL NO PL PT RO RS SE SI SK SM TR

REG Reference to a national code

Ref country code: CH

Ref legal event code: F10

Free format text: ST27 STATUS EVENT CODE: U-0-0-F10-F00 (AS PROVIDED BY THE NATIONAL OFFICE)

Effective date: 20251022

Ref country code: GB

Ref legal event code: FG4D

REG Reference to a national code

Ref country code: DE

Ref legal event code: R096

Ref document number: 602020060820

Country of ref document: DE

REG Reference to a national code

Ref country code: IE

Ref legal event code: FG4D

U01 Request for unitary effect filed

Effective date: 20251112

U07 Unitary effect registered

Designated state(s): AT BE BG DE DK EE FI FR IT LT LU LV MT NL PT RO SE SI

Effective date: 20251119

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: ES

Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT

Effective date: 20251022

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: NO

Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT

Effective date: 20260122

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: HR

Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT

Effective date: 20251022

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: RS

Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT

Effective date: 20260122

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: IS

Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT

Effective date: 20260222

PG25 Lapsed in a contracting state [announced via postgrant information from national office to epo]

Ref country code: PL

Free format text: LAPSE BECAUSE OF FAILURE TO SUBMIT A TRANSLATION OF THE DESCRIPTION OR TO PAY THE FEE WITHIN THE PRESCRIBED TIME-LIMIT

Effective date: 20251022