Method and device for managing spatiotemporal data

Through spatiotemporal graph model and combined dimension division technology, the problem of poor spatiotemporal data management performance in the existing technology is solved, efficient query and accurate analysis are realized, and storage overhead is reduced.

CN111797174BActive Publication Date: 2024-12-27HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201910277531.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-04-08
Publication Date
2024-12-27
Estimated Expiration
2039-04-08

AI Technical Summary

Technical Problem

When managing spatiotemporal data, the query efficiency is low, the data analysis results are inaccurate, the storage occupies a large disk space, and is not designed for the characteristics of spatiotemporal data, resulting in poor performance.

Method used

The space-time graph model (VL, VO, E) is used to define object vertices and position vertices, and divide the combined dimensions of space-time edges according to the space-time dimension and object-time dimension, improving query efficiency and reducing storage overhead.

Benefits of technology

It realizes efficient query and accurate data analysis, reduces storage usage, and improves spatio-temporal data management performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111797174B_ABST
    Figure CN111797174B_ABST
Patent Text Reader

Abstract

The present application provides a method for managing spatiotemporal data, which can be applied to a distributed system including a coordination node and multiple working nodes. The method first divides the spatiotemporal graph model G into two parts: L ,V O ,E) to express spatiotemporal data to directly reflect the relationship between data in time and space, where V L is a set of position vertices containing position information, V O is a set of object vertices without location information, and E is a set of spatiotemporal edges connecting related vertices. For spatiotemporal data expressed using a binary spatiotemporal graph model, differentiated partitioning and storage schemes are used for object vertices, location vertices, and edges by utilizing the characteristics of spatiotemporal queries: object vertices are hashed and stored in a distributed database; all location vertices are sent to each working node and stored in the working node's memory; spatiotemporal edges are partitioned using the object-time and space-time dimensions, and the partitioned spatiotemporal edge data is stored using a column-compressed storage scheme.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a method and device for managing spatiotemporal data. Background Art

[0002] With the development of the Internet of Things, various service networks, and information construction, a large amount of data containing time information and space information (hereinafter referred to as spatiotemporal data) is generated. For example, in the scenario of safe city applications, people use ID cards and credit cards, check into hotels, take high-speed trains, check in for airplanes, etc. These behaviors will generate spatiotemporal data. For another example, in the scenario of license plate detection, traffic cameras recording car license plates, automatic license plate recognition, etc. will also generate a large amount of spatiotemporal data. For another example, in the scenario of logistics tracking, express logistics outlets and transfer stations recording operations on packages will also generate a large amount of spatiotemporal data.

[0003] The generation of these spatiotemporal data is dynamic and massive. Taking the safe city application as an example, China has a population of more than 1.3 billion, the United States has a population of more than 300 million, and the world has a population of more than 7 billion. Every day, many people check in to hotels, take high-speed trains or airplanes, and each of these events can be considered as a spatiotemporal data (or spatiotemporal record). If the granularity of information acquisition is reduced a little bit, then many people's daily activities, such as swiping bus cards on the bus, mobile payments, scanning QR codes to unlock shared bicycles, etc., will generate spatiotemporal data. Therefore, the spatiotemporal records generated every day may reach the level of 1 billion.

[0004] Managing such a huge amount of spatiotemporal data will be a huge challenge. At present, most of the industry uses graph models to express spatiotemporal data, and uses graph partitioning technology based on graph models and some database systems to manage spatiotemporal data (for example, query, analysis and storage, etc.). However, since many technologies or database systems based on graph models are generally applicable to expressing and managing real-world entities and the relationships between entities, they are not designed for the characteristics of spatiotemporal data, so their performance is poor when applied to the management of spatiotemporal data. For example, problems such as low query efficiency, inaccurate data analysis results, and large disk space occupied by storage are common. Summary of the invention

[0005] The present application provides a method and device for managing spatiotemporal data, which can improve the management performance of spatiotemporal data, for example, can support efficient query, improve the accuracy of data analysis, reduce storage overhead, etc.

[0006] In a first aspect, the present application provides a method for managing spatiotemporal data, which is applied to a system including a coordinating node and a plurality of working nodes, the method comprising: a first working node among the plurality of working nodes receives spatiotemporal data including time and space information, wherein the spatiotemporal data is stored in a spatiotemporal graph (V L ,V O ,E) indicates that, where V L are multiple position vertices containing position information, V O are multiple object vertices that do not contain location information, and E is a plurality of space-time edges connecting the vertices; the first working node divides the multiple space-time edges according to a first combination dimension to obtain a first backup of the multiple space-time edges; the first working node divides the multiple space-time edges according to a second combination dimension to obtain a second backup of the multiple space-time edges, and the first combination dimension and the second combination dimension are respectively composed of at least two dimensions of the space dimension, the object dimension and the time dimension; the first working node stores the first backup in a first buffer corresponding to the first combination dimension, and stores the second backup in a first buffer corresponding to the second combination dimension.

[0007] It should be understood that the division of the multiple space-time edges of the injection system described in the present application refers to dividing the multiple space-time edges into corresponding working nodes.

[0008] In the technical solution of this application, a spatiotemporal graph model (V L ,V O ,E), and defines object vertices and location vertices according to whether the vertices in the spatiotemporal graph contain location information. For multiple spatiotemporal edges injected into the system, the working nodes divide them according to different combination dimensions, which can improve the management performance of spatiotemporal data. For example, it supports more efficient queries, reduces the overhead of inter-machine communication, and achieves load balancing.

[0009] In combination with the first aspect, in some implementations of the first aspect, the first combined dimension is a space-time dimension, and the first working node divides the multiple space-time edges according to the first combined dimension, including: the first working node calculates a region identifier corresponding to each space-time edge according to the spatial information included in each space-time edge of the multiple space-time edges;

[0010] The first working node queries the mapping table according to the area identifier corresponding to each space-time edge to determine the working node corresponding to each space-time edge, wherein the mapping table records the mapping relationship between the area identifier and the working node identifier, wherein each area identifier is used to uniquely identify a spatial area, and each working identifier is used to uniquely identify a working node among the multiple working nodes; the first working node divides the space-time edges in each spatial area according to the time dimension to obtain the first backup.

[0011] The spatiotemporal edge is divided according to multiple different combination dimensions, so that each combination dimension corresponds to a backup. That is, the division of the spatiotemporal edge and the backup are combined. Different query requests can select different backups for query, which can improve the query efficiency of spatiotemporal data.

[0012] In combination with the first aspect, in certain implementations of the first aspect, the second combined dimension is the object-time dimension, and the first working node divides the multiple space-time edges according to the second combined dimension, including: the first working node divides the multiple space-time edges into multiple groups, each group containing multiple space-time edges of at least one object vertex; the first working node divides the space-time edges within each group according to the time dimension to obtain a second backup.

[0013] In combination with the first aspect, in certain implementations of the first aspect, the first backup and the second backup are obtained by dividing the multiple spatiotemporal edges by the first working node within a time slice of the first cycle and are respectively stored in a first buffer corresponding to the first combination dimension and a first buffer corresponding to the second combination dimension, the first cycle includes N time slices, N≥1 and is an integer, and the method also includes: the first working node reads the spatiotemporal edges divided to the first working node within the time slice of the first cycle from the multiple working nodes in the second cycle, wherein the spatiotemporal edges divided to the first working node within the time slice of the first cycle are stored in the first buffer corresponding to the first combination dimension and the first buffer corresponding to the second combination dimension of each working node among the multiple working nodes; the first working node stores the read spatiotemporal edges divided to the first working node within the time slice of the first cycle in a data storage system.

[0014] In addition, the division and storage of spatiotemporal edges in time slices can support queries with smaller time granularity, and can read relevant data more accurately to reduce the reading and processing of irrelevant data. It can also reduce the communication overhead between working nodes, thereby obtaining better query performance.

[0015] In combination with the first aspect, in certain implementations of the first aspect, the data storage system includes a key-value pair system, and the space-time edges read by the first working node are stored in the data storage system in a key-value format, wherein the key includes a working node identifier, an identifier of a division method of the space-time edges, an internal identifier and a time slice, and the value includes all space-time edges containing the key; wherein the division method of the space-time edges includes a first combination dimension and a second combination dimension, and when the multiple space-time edges are divided according to the first combination dimension, the internal identifier is a region identifier, and when the multiple space-time edges are divided according to the second combination dimension, the internal identifier is a group identifier.

[0016] In combination with the first aspect, in certain implementations of the first aspect, the value includes multiple data fields, and the multiple data fields include at least object vertices, location vertices and timestamps. The first working node stores the spatiotemporal edges read and assigned to the first working node within the time slice of the first cycle into the data storage system, including: the first working node creates a table for each of the multiple data fields for columnar storage.

[0017] When storing spatiotemporal edges, column storage can save a lot of disk overhead. At the same time, creating tables for different data domains for storage can filter out irrelevant data domains.

[0018] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: the first working node receives multiple newly injected space-time edges within a time slice of the second cycle; the first working node divides the multiple newly injected space-time edges according to the first combination dimension within the time slice of the second cycle to obtain a first backup of the multiple newly injected space-time edges; the first working node divides the multiple newly injected space-time edges according to the second combination dimension within the time slice of the second cycle to obtain a second backup of the multiple newly injected space-time edges; the first working node stores the first backup of the multiple newly injected space-time edges in a second buffer corresponding to the first combination dimension within the time slice of the second cycle, and stores the second backup of the multiple newly injected space-time edges in a second buffer corresponding to the second combination dimension.

[0019] In the embodiment of the present application, the distribution of space-time edges is based on cycles. Each cycle includes distributing the space-time edges received and divided in the previous cycle to the corresponding working nodes, and also needs to complete the division and storage of the newly injected space-time edges in this cycle. The inflow of space-time edges adopts a dynamic distribution method, which can solve the dynamic update of the space-time graph in a distributed environment and the balance (trade-off) between the division of the space-time graph.

[0020] In combination with the first aspect, in certain implementations of the first aspect, the first working node reads the spatiotemporal edges allocated to the first working node within the time slice of the first cycle from the multiple working nodes in the second cycle, including: the first working node generates a working node list, the working node list indicates the order of the multiple working nodes, and the order is random; the first working node reads each working node in sequence in the order indicated by the working node list in the second cycle and determines whether the read working node is idle; when the first working node reads the second working node in the working node list and determines that the second working node is idle, the first working node reads the spatiotemporal edges allocated to the first working node in the first cycle from the first buffer corresponding to the first combination dimension of the second working node and the first buffer corresponding to the second combination dimension.

[0021] When the space-time edges that have been divided and stored are distributed to each working node, each working node randomly selects a working node to read data, which can avoid hot working nodes.

[0022] It should be understood that the order of the working nodes in the working node list is randomly generated. Therefore, the first working node reads each working node in sequence according to the order indicated by the working node list, and when the read working node is idle, the time-space edge allocated to the first working node in the previous cycle is obtained from the read working node, thereby avoiding hot working nodes.

[0023] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: when the first working node reads the third working node in the working node list and determines that the third working node is busy, the first working node adds the third working node to the busy list and reads the next working node that is sequentially after the third working node.

[0024] When the working node read from the working node list is busy, the read working node is temporarily added to the busy list until the working nodes in the working node list have been traversed, and then data is read from the working node in the busy list, so as to avoid the generation of hot working nodes.

[0025] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: the first working node determines that the working node list has been traversed; the first working node reads the working nodes in the busy list, and when the read working node i is idle, reads the spatiotemporal edges assigned to the first working node in the first cycle from the first buffer corresponding to the first combination dimension of the working node i and the first buffer corresponding to the second combination dimension, until the busy list is empty, i is a positive integer, i≥1, and i is equal to the number of working nodes in the busy list.

[0026] In combination with the first aspect, in certain implementations of the first aspect, all position vertices contained in the space-time graph are stored in the memory of each of the multiple working nodes, and the method also includes: the first working node divides the multiple object vertices contained in the space-time graph so that the multiple object vertices are assigned to the multiple working nodes; the first working node stores the object vertices assigned to the first working node after the division in a data storage system.

[0027] In combination with the first aspect, in certain implementations of the first aspect, the method also includes: the first working node receives a spatiotemporal correlation analysis query request; the first working node, or the first working node collaborates with one or more other working nodes among the multiple working nodes, selects spatiotemporal data stored according to the first combination dimension and / or the second combination dimension from the data storage system according to the spatiotemporal correlation analysis query request, performs query calculations, and obtains query results; the first working node summarizes the query results and outputs them.

[0028] In the present application, the spatiotemporal edges are divided and stored according to multiple different combination dimensions. Therefore, when performing spatiotemporal correlation analysis queries, it can support queries of one combination dimension as well as simultaneous queries of multiple different combination dimensions, which can improve query performance.

[0029] In a second aspect, the present application provides a device for managing spatiotemporal data, which is applied to a system including a coordination node and multiple working nodes. The method includes: the coordination node divides a preset spatial range into multiple areas; according to the number of position vertices of the spatiotemporal graph covered by each of the multiple areas, the weight of each area is determined; according to the weight of each area, a mapping relationship table between the multiple areas and the multiple working nodes is established.

[0030] The coordination node combines Z-code encoding technology and weight statistics to establish a mapping relationship between regions and working nodes, which can avoid the skewness of spatiotemporal data and play a role in load balancing in the space-time dimension.

[0031] In combination with the second aspect, in certain implementations of the second aspect, establishing a mapping relationship table between the multiple regions and the multiple working nodes based on the weight of each region includes: dividing the multiple regions into multiple regional blocks, the number of the multiple regional blocks is equal to the number of the multiple working nodes, and the weights of the multiple regional blocks are equal; allocating the multiple regional blocks to the multiple working nodes to establish a mapping relationship between the region identifiers and the multiple working node identifiers.

[0032] In a third aspect, the present application provides a device for managing spatiotemporal data, which is used to execute the method in the first aspect or any possible implementation of the first aspect. Specifically, the device includes a unit for executing the method in the first aspect or any possible implementation of the first aspect.

[0033] In one possible implementation, the device includes a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, and when the computer program is executed, the device can implement the method for managing spatiotemporal data described in the first aspect or any possible implementation of the first aspect.

[0034] In another possible implementation, the device includes a processor. The memory for storing the computer program is located outside the device, and the processor is connected to the memory through a circuit / wire, and is used to read and execute the computer program stored in the memory to perform the method for managing spatiotemporal data in the first aspect or any possible implementation of the first aspect.

[0035] Optionally, the device further comprises a communication interface. The communication interface may be a transceiver or an input / output interface. As an implementation, the input / output interface may be a transceiver circuit.

[0036] In a fourth aspect, the present application provides an apparatus for managing spatiotemporal data, which is used to execute the method in the second aspect or any possible implementation of the second aspect. Specifically, the apparatus includes a unit for executing the method in the second aspect or any possible implementation of the second aspect.

[0037] In one possible implementation, the device includes a memory and a processor, wherein the memory is used to store a computer program; the processor is used to execute the computer program stored in the memory, and when the computer program is executed, the device can implement the method for managing spatiotemporal data described in the second aspect or any possible implementation of the second aspect.

[0038] In another possible implementation, the device includes a processor. The memory for storing the computer program is located outside the device, and the processor is connected to the memory through a circuit / wire, and is used to read and execute the computer program stored in the memory to perform the method for managing spatiotemporal data in the second aspect or any possible implementation of the second aspect.

[0039] Optionally, the device further comprises a communication interface. The communication interface may be a transceiver or an input / output interface. As an implementation, the input / output interface may be a transceiver circuit.

[0040] In a fifth aspect, the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the method in the above-mentioned first aspect or any possible implementation of the first aspect.

[0041] In a sixth aspect, the present application provides a computer-readable storage medium, which stores computer instructions. When the computer instructions are executed on a computer, the computer executes the method in the above-mentioned second aspect or any possible implementation of the second aspect.

[0042] In a seventh aspect, the present application provides a chip comprising a memory and a processor, the memory being used to store a computer program, and the processor being used to call and run the computer program from the memory to execute the method in the above-mentioned first aspect and any possible implementation of the first aspect.

[0043] In an eighth aspect, the present application provides a chip comprising a memory and a processor, wherein the memory is used to store a computer program, and the processor is used to call and run the computer program from the memory to execute the method in the above-mentioned second aspect and any possible implementation of the second aspect.

[0044] In a ninth aspect, the present application provides a computer program product, comprising a computer program code, which, when executed on a computer, enables the computer to execute the method in the first aspect or any possible implementation of the first aspect.

[0045] In a tenth aspect, the present application provides a computer program product, comprising a computer program code, which, when executed on a computer, enables the computer to execute the method in the second aspect or any possible implementation of the second aspect.

[0046] Optionally, the memory and processor involved in the above aspects may be physically independent units, or the memory may be integrated with the processor. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is an example of an application scenario for a safe city.

[0048] Figure 2 This is an example of a system architecture suitable for the embodiments of the present application.

[0049] Figure 3 (a) and (b) are schematic diagrams of the coordinator and working node respectively.

[0050] Figure 4 This is the implementation form of the technical solution of this application in the platform software.

[0051] Figure 5 It is a flowchart of the division, storage and query of spatiotemporal data.

[0052] Figure 6 An example of a system architecture for managing spatiotemporal data provided in this application.

[0053] Figure 7 An example of the process of partitioning a space-time graph into object vertices and location vertices.

[0054] Figure 8An example of the process of storing object vertices and position vertices for a spatiotemporal graph.

[0055] Fig. 9 An example of the flow for a worker node to receive newly injected spatiotemporal edges.

[0056] Fig.10 An example of the space-time edge partitioning process.

[0057] Fig.11 An example of load balancing distribution control for spatial partitioning by a coordinating node.

[0058] Fig.12 A schematic flowchart for storing space-time edges.

[0059] Fig.13 Schematic flow chart for processing spatiotemporal query requests for worker nodes.

[0060] Fig.14 A comparison chart of the average amount of data injected per second for each machine.

[0061] Fig.15 This is a schematic diagram of the load balancing effect.

[0062] Fig.16 The following is a comparison chart of query processing performance.

[0063] Fig.17 Another example of the system architecture for managing spatiotemporal data provided in this application.

[0064] Fig.18 A schematic block diagram of an apparatus for managing spatiotemporal data provided in the present application.

[0065] Fig.19 A schematic block diagram of an apparatus for managing spatiotemporal data provided in the present application.

[0066] Fig. 20 A schematic structural diagram of the network device provided in this application. DETAILED DESCRIPTION

[0067] The technical solution in this application will be described below in conjunction with the accompanying drawings.

[0068] To facilitate understanding, the relevant concepts involved in this application are first briefly introduced.

[0069] Event: A piece of data (or record) generated during the operation of software or hardware. Here, software can be, for example, a computer program, and hardware can be, for example, a computer, a sensor, etc.

[0070] Spatiotemporal data: data containing both time information and space information. A piece of spatiotemporal data represents an event, where the time information represents the time when the event occurred, and the space information represents the space related to the event. Here, the space can be a geographic location space (for example, longitude and latitude coordinates) or a conceptual space, such as a product space, a user space, etc.

[0071] Graph: A way of expressing the relationship between objects. A graph consists of a series of vertices and edges connecting the vertices. Vertices and edges can contain some attributes, which are key-value pairs.

[0072] Graph partitioning: Divide a graph into multiple subgraphs, and store each subgraph separately. For example, a graph may be stored on multiple different physical computers.

[0073] Z-code encoding: A spatial encoding method that can map a two-dimensional continuous space into a one-dimensional space.

[0074] Time slice: in seconds. t seconds is a time slice, where t is a positive integer.

[0075] In addition, the following concepts are proposed in the technical solution of this application.

[0076] Spatiotemporal edge: The spatiotemporal edge in the spatiotemporal graph contains both temporal and spatial information. Specifically, the spatiotemporal edge is a triple of object identifier (ID), timestamp (timestamp), and location (location) identifier. A spatiotemporal edge can be represented as (object ID, timestamp, location ID).

[0077] Location vertex: A vertex that contains location information. A location vertex corresponds to a location ID in a spacetime edge, and one location vertex corresponds to one location ID.

[0078] Object vertex: Different from the position vertex, it does not contain the position vertex, but contains the information of an object. The object vertex corresponds to the object ID in the space-time edge, and one object vertex corresponds to one object ID.

[0079] The technical solution provided in this application can be applied in the broad field of spatiotemporal graphs to manage spatiotemporal data, such as storage, processing, query and analysis.

[0080] First, let’s introduce several typical application scenarios.

[0081] 1. Safe city application.

[0082] People use their ID cards and credit cards, check into hotels, consume in restaurants, take high-speed trains, check in for airplanes, etc. These behaviors will generate spatiotemporal graph data.

[0083] See also Figure 1 , Figure 1 This is an example of a safe city application scenario. Figure 1 As shown in the figure, people (ID cards, credit cards), hotels and restaurants are the vertices of the graph, and each behavior is mapped into a spatiotemporal edge connecting two vertices. The time information contained in the spatiotemporal edge can reflect the time when the event occurred.

[0084] 2. Detection of cloned vehicles.

[0085] Traffic cameras record car license plates, automatic license plate recognition and other behaviors, which will generate spatiotemporal graph data. Cars (or license plates) and traffic cameras constitute the vertices of the graph, and each behavior is mapped to a spatiotemporal edge of the spatiotemporal graph. The time information contained in the spatiotemporal edge reflects the recording time of the event.

[0086] 3. Logistics tracking.

[0087] The recording operation of express logistics outlets and transfer stations on packages will generate spatiotemporal graph data. Logistics online stores and packages are vertices, and each recording operation corresponds to a spatiotemporal edge. The time information contained in the spatiotemporal edge reflects the recording time.

[0088] Currently, managing this huge amount of dynamically changing spatiotemporal data faces enormous challenges.

[0089] Taking safe cities as an example, the existing information query is to filter results by scanning and filtering keywords, which is very inefficient and cannot support related data analysis.

[0090] Taking the detection of cloned vehicles as an example, existing methods can be divided into two categories: (1) Information matching. Feature matching is performed on the car information read from the database (e.g., pictures of the car). This type of method may provide inaccurate results. For example, when the cloned vehicle and the car registered in the data are of the same model, the cloned vehicle will not be identified. (2) Sampling and data analysis. One way is to set up monitoring points, extract data within a short period of time, and compare whether the shortest travel time of adjacent monitoring points exceeds the threshold. Another way is to analyze whether the running trajectory within the adjacent time is consistent with the feasible route (e.g., not passing through a certain intermediate point that must be passed). However, both methods have great limitations. The former method cannot determine the cloned vehicles and principles in two areas that are far apart. The latter method is heavily dependent on the actual road design and driving route. Once the road information is missing or not updated in time, the original car will be highly likely to be identified as a real car.

[0091] Taking logistics tracking as an example, currently, logistics companies basically store logistics-related information in relational databases to implement operations such as adding, deleting, and modifying. Although relational databases provide reliable and rich data analysis, their big data processing capabilities and spatiotemporal query performance are limited.

[0092] In view of this, the present application provides a method for managing spatiotemporal data.

[0093] In this application, the concept of vertices is extracted based on spatiotemporal data. Some of these vertices contain location information, which are called location vertices. Vertices that do not contain location information are called object vertices. For example, in the scenario of safe city applications, people (ID cards, credit cards) are object vertices, and hotels, restaurants, high-speed rail stations, and airports are location vertices. In the scenario of cloned car detection, cars are object vertices, and traffic cameras installed in different locations are location vertices. In the application scenario of logistics tracking, packages are object vertices, and express logistics outlets and transfer stations are location vertices. A piece of spatiotemporal data represents an event, forming a spatiotemporal edge connecting related vertices. The spatiotemporal edge contains time information, and the time information indicates the time when the event occurred.

[0094] Spatiotemporal data can be expressed using a bipartite graph model G = (V L ,V O ,E), where V L is the set of position vertices, V O is the set of object vertices, and E is the set of spatiotemporal edges. Each spatiotemporal edge can be represented as e, e = (obj, time, loc), where obj represents the object vertex, loc represents the location vertex, and time represents the time when the event occurs. In other words, each spatiotemporal edge connects a location vertex and an object vertex, and contains a time attribute, which is used to represent a specific object at a specific location and an event occurring at a specific location. The spatiotemporal graph presented based on the bipartite graph model can directly reflect the association relationship between data in time and space.

[0095] Furthermore, based on the above bipartite graph model, the present application provides a method for managing spatiotemporal data expressed based on the bipartite graph model, which mainly involves the following aspects:

[0096] (1) Division of spatiotemporal data.

[0097] According to the characteristics of spatiotemporal data, this application adopts differentiated partitioning schemes for object vertices, location vertices, and spatiotemporal edges of the spatiotemporal graph.

[0098] Specifically, in one embodiment, object vertices are distributed to all working nodes, all position vertices are sent to each working node (described in detail below), and the space-time edges are divided using multiple combination dimensions, and each combination dimension gets a backup.

[0099] It should be noted that the combined dimension in this application refers to a dimension composed of two or more dimensions. For example, the spatial dimension and the time dimension are combined to obtain the space-time dimension (or, recorded as the space-time dimension). The use of the space-time dimension to divide the space-time edge means first dividing the space-time edge according to the spatial dimension (that is, dividing the space-time edge into different regional groups according to the area where the position vertex corresponding to the space-time edge is located), and then dividing the space-time edges in each regional group into smaller groups according to the time dimension, such as dividing the space-time edges whose event occurrence time falls within the same set time interval into the same group. Similarly, the object dimension and the time dimension can also be combined to obtain the object time dimension (that is, the object-time dimension). The use of the space-time dimension to divide the space-time edge means that the space-time edge is first divided according to the object dimension, and each object dimension group contains all the space-time edges of a group of object vertices, and the space-time edges contained in each object dimension group are divided into smaller groups according to the time dimension.

[0100] In one embodiment, the space-time dimension is referred to as a first combined dimension, and the object-time dimension is referred to as a second combined dimension.

[0101] For example, to divide the space-time edge according to the space-time dimension, the space-time edge is first divided into a certain region of the spatial range according to the space dimension, and then divided according to the time dimension within the region. For another example, to divide the space-time edge according to the object-time dimension, the space-time edge can be first divided into corresponding groups according to the object dimension, and then divided according to the time dimension within a group. The division of space-time edges according to different combination dimensions will be explained in detail below.

[0102] In addition, in the embodiments of the present application, only the first combined dimension and the second combined dimension are used as examples of the combination of two dimensions among the spatial dimension, the temporal dimension, and the object dimension. The present application is not limited to adding other dimensions for the purpose of query efficiency to combine with the spatial dimension, the temporal dimension, and the object dimension to obtain other combined dimensions.

[0103] Furthermore, the present application does not limit the combination dimension to a combination of two dimensions, and may also be a combination of more than two dimensions. In addition, the first combination dimension and the second combination dimension are not limited to being composed of different numbers of dimensions. For example, the first combination dimension is composed of 2 dimensions, and the second combination dimension is composed of 3 dimensions.

[0104] Such a partitioning scheme can accurately and effectively select data related to the spatiotemporal graph correlation analysis, reduce the amount of data that needs to be read and processed, reduce the overhead of communication across working nodes, balance the load of working nodes, and improve the query performance of spatiotemporal data.

[0105] (2) Storage of spatiotemporal data.

[0106] Similarly, object vertices, location vertices, and spatiotemporal edges adopt differentiated storage schemes.

[0107] Specifically, when the system is running, the object vertices and position vertices are stored in a distributed data storage system (e.g., a distributed database, a distributed key-value pair system). At the same time, the position vertices are read and cached in the memory during the system initialization phase, and the spatiotemporal edges adopt a columnar storage and compressed storage solution.

[0108] Such a storage solution can improve the performance of spatiotemporal data queries while saving disk storage overhead.

[0109] (3) Injection of space-time edges into the space-time graph.

[0110] The influx of new spatiotemporal edges in the spatiotemporal graph adopts a dynamic distribution algorithm. Specifically, the injection of new spatiotemporal edges is received periodically, and the new spatiotemporal edges of N rounds of cycles are buffered and randomly sent to each working node, fully utilizing the network bandwidth while avoiding hotspot machines.

[0111] The inflow process of new space-time edges in the space-time graph completes the graph partitioning, which can solve the problem of fast injection and partitioning of new space-time edges in the space-time graph in a distributed environment.

[0112] (4) Correlation analysis of space-time graphs.

[0113] For the association analysis of the space-time graph, different dimensions are selected to read and process the space-time edges. In the process of association analysis, the characteristics of the space-time graph are used to quickly filter out data that does not meet the conditions.

[0114] Combine the following Figure 2 Introduce the system architecture of the technical solution applicable to this application.

[0115] See also Figure 2 , Figure 2 is an example of a system architecture applicable to the embodiments of the present application. Figure 2 As shown in the figure, the system includes a coordinator node and multiple worker nodes. A worker node can also be called a working machine. The system consists of multiple server nodes connected by a data center network. The so-called data center network refers to a network with much better latency and bandwidth than a wide area network. For example, 10 Gigabit Ethernet has been widely used in data centers.

[0116] Combine the following Figure 3 , and detailed descriptions are given for the coordination node and the working node respectively.

[0117] Figure 3 (a) and (b) are schematic diagrams of software modules running on the coordination node and the machine node, respectively.

[0118] 1. Coordination node.

[0119] See also Figure 3 (a), Figure 3 (a) is a schematic diagram of a coordination node. Three modules are running on the coordination node, namely, metadata management module, periodic synchronization control module and load balancing control module.

[0120] Among them, the metadata management module is responsible for recording the metadata of the spatiotemporal graph partitioning, including the mapping table of space to work nodes and the mapping table of objects to work nodes related to each spatiotemporal graph partitioning, the information required for periodic synchronization control, and the information required for load balancing monitoring. The periodic synchronization control module is responsible for coordinating multiple work nodes to complete the injection, division and distribution of spatiotemporal data. These operations are performed in rounds according to the cycle. The load balancing monitoring module dynamically and in real time monitors the inflow of spatiotemporal data, the data processing of the ingest store module on the work node, the data storage of the graph store module on the work node, and the rate of data transmission between the ingest store and the graph store. When it is found that the difference value exceeds the preset threshold, the system will adjust the data inflow speed.

[0121] Here, the ingest store and graph store on the working node will be introduced below.

[0122] It should be noted that the target working node described in the embodiment of the present application is relative to a working node. If a working node completes the graph partitioning, some spatiotemporal data is allocated to other working nodes, these other working nodes are called target working nodes relative to this working node.

[0123] In addition, the correspondence between the spatiotemporal graph partitioning and the working nodes is used to indicate the correspondence between the spatiotemporal data after the graph partitioning is completed and the working nodes that need to store the spatiotemporal data.

[0124] 2. Working node.

[0125] See also Figure 3 (b), Figure 3(b) is a schematic diagram of a working node. Two modules are run on the working node: the ingest store module and the graph store module. The ingest store is responsible for caching the spatiotemporal data injected at high speed, completing the graph partitioning of the injected spatiotemporal data, and sending the injected spatiotemporal data to the working nodes that need to be stored after the graph partitioning. The graph store is responsible for receiving and storing the data after the ingest store partitioning, and supports the correlation analysis operation of the spatiotemporal graph.

[0126] Optionally, the graph store may receive the data divided by the ingest store by pulling the data in pull mode, or the ingest store may push the data to the graph store in push mode.

[0127] In each cycle, a set of multidimensional buffers in the ingest store on the working node stores the spatiotemporal data that flows in and is divided in this cycle, and supports the distribution of spatiotemporal data processed in the previous cycle in another set of buffers to the target working node.

[0128] See also Figure 4 , Figure 4 This is a schematic diagram of the structure of the working node of this application. Figure 4 , the injection storage modules of the working node include:

[0129] (1) Injection buffer

[0130] In one embodiment, the ingest store includes a buffer for buffering newly injected spatiotemporal data (e.g. Figure 4 This buffer can be used as the data input source for the graph partitioning module.

[0131] (2) Graph partitioning module.

[0132] The graph partitioning module obtains the newly injected spatiotemporal data from the injection buffer and performs graph partitioning. The partitioning results are placed in a multi-dimensional double buffer.

[0133] It should be understood that the multi-dimensionality mentioned in this application refers to multiple combined dimensions. For the description of combined dimensions, please refer to the above.

[0134] (3) Multi-dimensional double buffer.

[0135] Here, multi-dimensional double buffer includes two meanings: "multi-dimensional" and "double buffer".

[0136] Among them, multi-dimensionality refers to maintaining buffers for different dimensions. In an embodiment of the present application, different buffers are maintained for the space-time dimension and the object-time dimension (that is, two dimensions). Among them, the buffer cache corresponding to the space-time dimension has the data obtained after the space-time edge is divided according to the space-time dimension (space-time edge data backup); the buffer cache corresponding to the object-time dimension has the data obtained after the space-time edge is divided according to the object-time dimension (space-time edge data backup). A buffer slice is reserved for each target working node in the buffer of each dimension, which is used to temporarily store the divided data of the dimension to be sent to the target working node.

[0137] Optionally, the buffer zone may be designed for more combination dimensions, not limited to the two combination dimensions described in this document, and this application does not impose any limitation on this.

[0138] In addition, there are two groups of buffers for each dimension, that is, a double buffer mechanism is adopted for each dimension.

[0139] As mentioned above, the division and distribution of the injected spatiotemporal data is performed in cycles. In each cycle, the working node receives and divides the newly injected spatiotemporal data, and in parallel distributes the data that has been divided in the previous cycle to the target working node for storage. Therefore, a set of buffers in each dimension stores the data that has been divided in the previous cycle, and supports the distribution of these divided data to the corresponding working nodes in the current cycle. Another set of buffers buffers the newly injected spatiotemporal data after the division in this cycle.

[0140] In the embodiment of the present application, for the sake of clarity of description, the buffer in the multiple buffers corresponding to each combined dimension that stores the space-time edges that have been divided in the previous cycle is called the first buffer. The buffer in the multiple buffers corresponding to each combined dimension that stores the space-time edges that have been divided newly injected in the current cycle is called the second buffer.

[0141] Alternatively, the first buffer of the first combined dimension is also referred to as the first buffer corresponding to the first combined dimension, and the second buffer of the first combined dimension is also referred to as the second buffer corresponding to the first combined dimension. The first buffer of the second combined dimension is also referred to as the first buffer corresponding to the second combined dimension, and the second buffer of the second combined dimension is also referred to as the second buffer corresponding to the second combined dimension.

[0142] It should be understood that the first buffer and the second buffer of each combined dimension do not limit their functional differences, but are only defined to describe the process of division, storage and distribution of spatiotemporal data between two adjacent cycles. In fact, the first buffer and the second buffer corresponding to each combined dimension constitute a ring buffer. In addition, the two buffers are designed for cycle management and at the same time improve the throughput of data injection (embodied in the entire process of data inflow, ingest store division, graphstore storage, ingest store and graph store data transmission).

[0143] It should also be understood that each working node in the system (for example, the first working node) has a first buffer corresponding to the first combination dimension and a second buffer corresponding to the first combination dimension, as well as a first buffer corresponding to the second combination dimension and a second buffer corresponding to the second combination dimension. This article only takes the first working node as an example for illustration.

[0144] In the embodiment of the present application, the newly injected spatiotemporal data in each period is considered to include only spatiotemporal edges.

[0145] In addition, Figure 4 The injection buffer in the ingest store shown in FIG. 1 is shown with a dotted box, indicating that the buffer is an optional module. In one implementation, the ingest store may only include a graph partitioning module and a multi-dimensional double buffer. Designing an injection buffer in the ingest store can increase the speed of spatiotemporal data injection.

[0146] The graph store includes data access module, user query interface module and query processing module.

[0147] (1) Data access module.

[0148] The data access module receives the spatiotemporal data sent by the ingest store and stores it in a data storage system, such as a database (DB).

[0149] Furthermore, the data access module may include a row-column format conversion module and a data compression / decompression module. The row-column format conversion module is used to perform row-column format conversion on data. The data compression / decompression module is used to compress or decompress data.

[0150] It should be understood that when the data access module stores data into the data storage system, it performs compression processing on the data, and when the data access module reads data from the data storage system, it performs decompression processing on the data.

[0151] In the process of accessing data, the data access module performs row and column format conversion and compression / decompression processing of the data, thereby reducing the amount of data stored in the data storage system.

[0152] Subsequently, when performing spatiotemporal data query, the data access module reads data from the data storage system according to the call requirements of the query processing module.

[0153] (2) User query interface module.

[0154] The user query interface module receives the space-time graph association analysis query operation request input by the user, coordinates multiple working nodes in the distributed system to complete the corresponding operation, collects the operation results, and returns the operation results to the user.

[0155] (3) Query processing module.

[0156] The query processing module calls the data access module to complete data reading and further completes query-related operations according to the call requirements of the distributed query control module. The calculation and processing methods for the spatiotemporal dimension and the object dimension are different.

[0157] In one embodiment, Figure 4 The data storage system (eg, database) in the specification refers to any data storage system that can provide data storage functions, such as a key-value system, a relational database, etc.

[0158] Understandably, Figure 4 The component modules or components shown in the figure may be implemented by software, hardware, or a combination of software and hardware. For example, the injection buffer, multi-dimensional double buffer, and position vertex memory buffer are hardware such as memory; the graph partitioning module, data access module, user query interface module, and query processing module are software modules, which are implemented by computer programs, and these programs realize corresponding functions when executed by the processor.

[0159] The following is a process for dividing, storing, and querying the spatiotemporal data provided by this application.

[0160] See also Figure 5 , Figure 5 It is a flowchart of the division, storage and query of spatiotemporal data.

[0161] 301. Partitioning of object vertices and position vertices in space-time graph.

[0162] This application aims to support tens of billions of object vertices and tens of millions of position vertices, and adopts different partitioning strategies for object vertices and position vertices.

[0163] It should be understood that the relevant information of the object vertices and position vertices involved in the spatiotemporal data flowing into the system is known. Considering the large amount of data of all object vertices, all object vertices are divided into all working nodes in this application.

[0164] Since the data volume of all the position vertices is relatively small, the data volume of tens of millions of position vertices may be less than 1GB. Therefore, in this application, all the position vertices are copied to each working node, that is, each working node stores a copy of all the position vertices.

[0165] 302. Storage of object vertices and position vertices.

[0166] Considering the data characteristics and partitioning strategies of different types of vertices, different storage schemes are used for vertex storage of spatiotemporal graphs. As mentioned above, when the system is running, both object vertices and position vertices are stored in a data storage system, such as a distributed database, while position vertices are read and cached in memory when the system is initialized.

[0167] Thus, each working node can quickly access the relevant information of the location vertex (for example, longitude and latitude coordinates) in memory, reducing the overhead of external memory access and cross-machine network communication, and improving the computing performance of the system.

[0168] 303. Inflow, division and distribution of space-time edges.

[0169] This application aims to support trillions of spatiotemporal edges and support efficient spatiotemporal correlation analysis operations. For the received spatiotemporal edges, the working node calls the graph partitioning module for partitioning.

[0170] In this article, the division of space-time edges using two combination dimensions is used as an example for explanation, and more combination dimensions can also be used, which is not limited in this application.

[0171] (1) Object-time dimension division.

[0172] First, partition according to the object dimension. Each object dimension partition contains all the spatiotemporal edges of a set of object vertices. Each object dimension partition is assigned to a working node by the coordination node. Within an object dimension partition, the spatiotemporal edges are divided into small blocks according to the time dimension for storage. Here, the time dimension can be a time slice.

[0173] (2) Space-time dimension division.

[0174] First, the space is divided according to the spatial dimension. Each spatial dimension division corresponds to a spatial region, including all the spatiotemporal edges of the spatial region. Each spatial dimension division is assigned to a working node by the coordination node. Within a spatial dimension division, the spatiotemporal edges are divided into small blocks according to the time dimension for storage.

[0175] Optionally, in one embodiment, the working node divides the space-time dimension according to a mapping table obtained from the coordination node, wherein the mapping table records the mapping relationship between the region (ie, the spatial region) and the working node. Specifically, the coordination node performs Z-code encoding on the spatial dimension division, and for each spatial dimension division, the number of position vertices therein is counted as the weight of the spatial dimension division. Then, when the coordination node assigns the spatial dimension division to the working node, it assigns the adjacent Z-code spatial dimension division to one working node. In addition, making the division weights assigned to each working node roughly the same can avoid data skew and at the same time play a role in balancing the load.

[0176] 304. Storage of space-time edges.

[0177] Step 304 involves Figure 4 The input data of step 304 is the partitioned data obtained by the distribution in step 303. In step 304, the graph store on the working node stores the data of different partitioning strategies (object-time dimension, space-time dimension) into the data storage system by calling the data access module.

[0178] The specific process can be as follows: first, the row-column format conversion module is called to convert the input data into row-column format according to different data fields (e.g., object vertex ID, position vertex ID, timestamp) in units of time slices. Then, the data compression / decompression module is called to compress the converted data in each data field respectively. Finally, the compressed data in each data field is stored in the data storage system.

[0179] Using column-based compressed storage can save disk storage space.

[0180] In a possible implementation, the data storage system may be a key-value pair system. The key may include multiple parts, and the multiple parts include at least a work node identifier (ID), an identifier of a time-space edge division method, an internal identifier of the time-space edge division method (hereinafter referred to as the internal identifier), and a time slice. See Table 1.

[0181] Table 1

[0182] Worker ID ID of the division method of space-time edge Internal ID Time Slice

[0183] In Table 1, worker ID refers to the ID of the target worker. The division method ID of the spatiotemporal edge refers to the method of combining dimensions used to divide the spatiotemporal edge. For example, if the first combined dimension (i.e., the space-time dimension described above) is used for division, the division method ID of the spatiotemporal edge is recorded as A. If the second combined dimension (i.e., the object-time dimension described above) is used for division, the division method ID of the spatiotemporal edge is recorded as B. That is, the division method of the spatiotemporal edge includes the division of the first combined dimension and the division of the second combined dimension.

[0184] For the division method of the first combination dimension, the internal ID of the division method is the area ID (ie, region ID), and for the division method of the second combination dimension, the internal ID of the division method is the group ID (ie, slot ID). Region and slot will be introduced below.

[0185] The time slice can be expressed as floor(timestamp / TRU), where floor means rounding down and TRU means the length of the time slice. In addition, in the value part, a table can be defined for each data domain to perform column storage.

[0186] For example, three tables are defined for object vertex ID, position vertex ID, and timestamp, respectively, as shown in Table 2 to Table 4.

[0187] Table 2

[0188] value object ID Compressed storage of time and space edges of the same key

[0189] Table 3

[0190] value timestamp Compressed storage of time and space edges of the same key

[0191] Table 4

[0192] value location ID Compressed storage of time and space edges of the same key

[0193] This method of storing spatiotemporal edges in columnar compression can save disk space to a great extent.

[0194] It should be noted that in the implementation of this application, the division and storage of space-time edges are based on time slices.

[0195] 305. Spatiotemporal correlation analysis query.

[0196] Step 305 involves Figure 4The graph store on the working node shown. Step 305 can be executed simultaneously with steps 301-304. Steps 301-304 divide, distribute and store the newly injected spatiotemporal data, and step 305 performs spatiotemporal correlation analysis based on the existing spatiotemporal data in the system.

[0197] Specifically, the user query interface receives the user's spatiotemporal graph association analysis query request, coordinates multiple working nodes in the distributed system to complete the corresponding operation, collects the operation results, and returns them to the user.

[0198] The query processing module calls the data access module to complete data reading and further completes the calculation related to the query according to the calling requirements of the distributed query control module.

[0199] Examples of several types of spatiotemporal queries of the technical solution of the present application are given below.

[0200] Q1: Trace query.

[0201] Given an object vertex identifier (obj ID) and a time range, query all edge events of the object corresponding to the object vertex identifier within the time range.

[0202] It should be understood that the object vertex identifier is used to uniquely identify an object vertex. In the space-time graph, each object vertex corresponds to an object, so it can be considered that each object vertex identifier corresponds to an object.

[0203] Trace query is suitable for query processing using object-time dimension partitioning.

[0204] Q2: Simple test of group behavior.

[0205] Given object vertex ID 1 (denoted as objID1) and object vertex ID 2 (denoted as objID2) and a time range, find out the related behaviors of the two within the time range.

[0206] Here, the definition of behavior correlation can be: given two edges e1 and e2, where e1 = (obj1, time1, loc1) and e2 = (obj2, time2, loc2), they are considered to be correlated if and only if the following conditions (1) and (2) are satisfied at the same time.

[0207] |e1.time1-e2.time2|≤THtime (1)

[0208] dist(e1.loc1-e2.loc2)≤TH loc (2)

[0209] Among them, THtime is the preset time difference threshold, TH loc is a preset spatial distance threshold.

[0210] In one implementation, Q2 can be decomposed into two trace queries, first reading the traces of obj1 and obj2, and then completing the correlation calculation.

[0211] It should be understood that obj1 and obj2 represent objects corresponding to objID1 and objID2 respectively.

[0212] Q3: Complex detection of group behavior.

[0213] Given an object vertex identifier 3 (referred to as objID3) and a time range, query all objects related to the object corresponding to objID3 and output the query result. That is, query all objects related to obj3.

[0214] Optionally, the query results are outputted in descending order of relevance. The definition of relevance can be found in the description in Q2.

[0215] For Q3, we first query the objID trace by object-time dimension partitioning, and extract all the location vertex identifiers (i.e., locID) in the trace. Then, we use space-time dimension partitioning to process these location vertices at the same time and find all spatiotemporal edges that meet the threshold conditions in time and space. At the same time, we count the object vertices of the spatiotemporal edges that meet the conditions on each working node. Finally, we summarize the statistical information to get all the objects related to objID3 and their correlation metrics.

[0216] Q4:Speed ​​detection.

[0217] Given a time range and speed threshold, query all abnormal situations where the speed exceeds the threshold, i.e., fake license plate vehicles.

[0218] For all object vertices, the object velocity is calculated and anomalies are detected in the object-time dimension partition.

[0219] It should be understood that the above four types of queries are only examples. According to the design idea of ​​the technical solution of this application, for other types of queries, they can be divided and stored according to other combination dimensions to improve query performance, and this application does not limit this.

[0220] The technical solution provided in this application is illustrated below with examples.

[0221] See also Figure 6 , Figure 6 An example of a system architecture for managing spatiotemporal data provided in this application. Figure 4 Compared to the embodiment shown, Figure 6 The system shown in the embodiment adopts a key-value pair (Key-Value) system as an example of a data storage system. The Key-Value can be based on the open source distributed key-value storage system Cassandra as a storage backend.

[0222] exist Figure 6 Under the system architecture shown, the management of dynamic spatiotemporal data in a distributed environment can be achieved through the following steps.

[0223] 401. Division of object vertices and position vertices in space-time graph.

[0224] Step 401 is performed by the graph partitioning module of the worker. The process of the graph partitioning module can be found in Figure 7 shown.

[0225] See also Figure 7 , Figure 7 An example of the process of partitioning the object vertices and location vertices of the space-time graph. Figure 7 As shown, for object vertices, we can refer to the partitioning strategy of Redis and adopt a random partitioning method.

[0226] Here, Redis refers to a remote dictionary server, which is a key-value storage system. For details, please refer to the prior art and will not be described in detail in this article.

[0227] Optionally, the object vertices may be divided using a hash function. At this time, the object vertices division in step 401 may include the following two processes (1) and (2).

[0228] (1) Apply a hash function to divide object IDs into groups.

[0229] Optionally, a "group" here can refer to a "slot" in a hash function.

[0230] For example, the graph partitioning module performs partitioning according to slot ID=hash(object vertex ID).

[0231] Optionally, the object vertex IDs may be divided using functions other than hash functions, which is not limited in this application.

[0232] In addition, regarding the process of mapping multiple elements to several slots by the hash function, reference may be made to the prior art.

[0233] In addition, the present application does not limit the use of functions other than hash functions to divide object vertices.

[0234] (2) Assign groups to workers.

[0235] For example, the division is performed based on worker ID=(slot ID% number of workers).

[0236] For location vertices, since the location vertex data is very small (less than 1GB), it can be stored in the memory of a single machine, so each location vertex is distributed to all workers. In this way, each worker can quickly obtain all location information locally, thus avoiding the overhead caused by communication between machines.

[0237] 402. Storage of object vertices and position vertices of the space-time graph.

[0238] Step 402 is performed by the data access module of the worker.

[0239] See also Figure 8 , Figure 8 An example of the process of storing object vertices and position vertices for a spatiotemporal graph. Figure 8 As shown in the figure, vertex data (including object vertices and position vertices) will be written to the data storage system. When the system is running, the process running on the worker reads all the position vertices from the data storage system and loads them into the memory during initialization. Assuming that each position vertex is 100B, the storage capacity of tens of millions of position vertices is about 1GB in total. It can be seen that the amount of data of the position vertex is relatively small. By storing it in the memory, each working node can quickly access the relevant information of the position vertex in the memory, reducing the external memory access overhead and improving the computing performance of the system.

[0240] 403. Inflow, dynamics and distribution of space-time edges.

[0241] The detailed process of step 403 can be found in Figure 9-11 shown.

[0242] See also Fig. 9 , Fig. 9 An example of the process for a worker node to receive newly injected spatiotemporal edges. Fig. 9 In the figure, any working node (hereinafter referred to as the first working node) is taken as an example to illustrate the process of the working node receiving the newly injected space-time edges.

[0243] After the new spatiotemporal edge is injected into the system, the first working node divides the new spatiotemporal edge and stores the divided data into a multi-dimensional double buffer. The process of spatiotemporal edge division and storage in the double buffer can be found in the above description and will not be repeated here.

[0244] The first working node determines whether the current cycle has ended. If the current cycle has not ended, the first working node switches the double buffer area and continues to receive newly injected data. If the current cycle has ended, the first working node notifies the coordination node that the spatiotemporal data of the current cycle can be obtained. After receiving the data completion message of this cycle sent by all working nodes, the coordination node notifies each working node that the spatiotemporal data of the current cycle is ready and can be read into the data storage system of the graph store.

[0245] Here, the double buffer refers to the first buffer and the second buffer mentioned above.

[0246] Hereinafter, the current cycle is referred to as the first cycle, and the cycle next to the first cycle is referred to as the second cycle.

[0247] Optionally, each worker node reads data from the graph of other worker nodes in cycles. In other words, the distribution of spatiotemporal data is in cycles.

[0248] Here, the cycle may be N time slices, where N≥1 and is an integer. When a cycle is defined as a time slice, a cycle may also be replaced by a time slice, which is not limited in the present application.

[0249] In the second cycle, each working node generates a list containing all working nodes, which is referred to as the working node list below. The order (or sequence) of each working node contained in the working node list is random.

[0250] The first working node reads working node i from the working node list in order and determines whether working node i is busy or idle. If working node i is busy, the first working node adds working node i to the busy list. After that, the first working node re-reads the next working node j and determines whether working node j is busy or idle.

[0251] If the working node j is idle, the first working node reads the data that has been divided in the first cycle and allocated to the first working node from the working node j.

[0252] Here, it should be noted that the working node j needs to send all the spatiotemporal data in the cache slices reserved for the first working node that have been divided and stored in buffers of multiple different combination dimensions in the first cycle to the first working node.

[0253] Afterwards, the first working node determines whether the working nodes in the working node list have been traversed. If not, the first working node reads another working node in order from the remaining working nodes in the working node list, and determines whether the read working node is busy or idle. This process is repeated until all working nodes in the working node list are traversed.

[0254] If the work node determines that the work node list has been traversed, it reads a work node r from the busy list in order. The work node r sends the data in the cache slices reserved for the first work node in the buffers of multiple different dimensions stored in the first cycle to the first work node. Then, the first work node reads the next work node s from the busy list in order, and repeats this process until all the work nodes in the busy list have been traversed.

[0255] See also Fig.10 , Fig.10 is an example of the space-time edge partitioning process. Fig.10 As shown, after the system receives the newly injected space-time edge, it divides the space-time edge according to the space-time dimension. Specifically, the Z-code code of the grid to which the position coordinates (for example, longitude and latitude information) contained in the injected space-time edge are mapped is calculated. The Z-code code of the grid is also called the grid ID (also called region ID), which is used to uniquely identify a grid within the spatial range represented by the space-time graph.

[0256] After obtaining the grid ID (region ID) of the injected space-time edge, a mapping table (or mapping relationship table) is searched, and the injected space-time edge is divided into corresponding grids (regions) according to the mapping relationship table.

[0257] It should be noted that the mapping table is generated by the coordinating node and distributed to each worker. The mapping table records the mapping relationship between the grid ID (region ID) and the worker node identifier (worker ID). According to the grid ID (region ID) of the injected space-time edge, the target worker node to which the injected space-time edge should be assigned can be determined. Within the grid corresponding to the injected space-time edge (that is, within a region), the injected space-time edge is further divided according to the time dimension, for example, according to time slices.

[0258] In the present application, while performing the division in the space-time dimension, the newly injected spatiotemporal data also needs to be divided according to the object-time dimension. Specifically, according to the method of dividing object vertices described above, the injected spatiotemporal edges are divided into slots using a hash function. Within the slot, the data is divided again according to the time dimension. Optionally, the data is divided according to time slices.

[0259] Optionally, other functions besides the hash function may be used to divide the object vertices, for example, a range method is used, which is not limited in this application.

[0260] In addition, it should be understood that when the spatiotemporal data is not backed up, a slot will only be allocated to one working node.

[0261] After the input space-time edges are divided in two dimensions, the space-time edge division process ends.

[0262] It should be noted that the mapping relationship table mentioned here is created by the coordination node and distributed to each working node. The mapping relationship table is mainly used by the coordination node to load balance the space partition. Fig.11 Describes the creation of a mapping relationship table.

[0263] See also Fig.11 , Fig.11 An example of load balancing distribution control for spatial partitioning by a coordinating node.

[0264] The coordination node divides the entire spatial range into multiple grids of the same length and width, and each grid is called a region. Here, the spatial range represents the size of the space-time graph. The spatial range can be a city, a county, or a region, etc., or it can be a larger spatial range, such as China. The number of position vertices in the spatial range covered by each region is counted and used as the weight of the region. Then, each region is Z-coded to obtain the region ID of each region. According to the coding order of the region, all regions in the spatial range are divided into regional blocks equal to the number of all working nodes (i.e., workers) contained in the system. For example, the entire spatial range is divided into 1000 regions, and there are 100 workers in the spatial range, then the 1000 regions are divided into 100 regional blocks. When the weights of the regions contained in each regional block are equal, each regional block contains 10 regions. Finally, this regional block is allocated to all working nodes, thereby establishing a mapping relationship table between regions and workers.

[0265] It can be understood that there is a corresponding relationship between regions and blocks. After the blocks are assigned to workers, a mapping relationship between regions and workers is established.

[0266] Optionally, the mapping table stores a mapping relationship between region IDs and worker IDs.

[0267] 404. Storage of space-time edges.

[0268] Step 404 is executed in the data access module of the worker, and the implementation process can be as follows: Fig.12 shown.

[0269] See also Fig.12 , Fig.12 is a schematic flowchart of storing spatiotemporal edges. Fig.12 As shown, the worker obtains row data injected into the system in cycles. Fig.12 In the example, the time slice is used as a period. For each data domain, the data of the same time slice divided by the space-time dimension (i.e., the space-time dimension) is collected and converted into byte data. For each data domain, the data of the same time slice divided by the object-time dimension (i.e., the object-time dimension) is collected and converted into byte data. The byte data of each data domain is compressed respectively using a compression algorithm to obtain compressed data. Optionally, the compression algorithm here can be an LZ4 algorithm.

[0270] The compressed data of the space-time dimension is stored in the keyspace 1 (keyspace1) of the key-value pair system, and the compressed data of different data domains are stored in different column families, that is, column family (table). The compressed data of the object-time dimension is stored in the keyspace 2 (keyspace2) of the key-value pair system, and the compressed data of different data domains are stored in different column families (table).

[0271] 405. Spatiotemporal query processing.

[0272] Step 405 is executed in the query processing module of the worker, and the implementation process is as follows Fig.13 shown.

[0273] See also Fig.13 , Fig.13 A schematic flow chart of processing spatiotemporal query requests for a working node. The user query interface receives the spatiotemporal correlation query analysis operation request input by the user, converts it into a query statement and sends it to the query processing module. The query processing module selects data stored according to the object-time dimension, or selects data stored according to the space-time dimension for query calculation, and outputs the query result.

[0274] The following is a comparison of the effects of the method for managing spatiotemporal data provided by the present application and the prior art.

[0275] This article uses the measurement results in a distributed environment with 11 servers (including 1 master and 10 slaves) as an example to illustrate the technical effects obtained. Here, all 11 servers are Dell power edge servers (also known as blade servers). The blade servers contain 2 central processing units (CPUs). The CPU model is Inter(R) Xeon(R) E52650v32.30GHz, with a total of 10 cores, 25600KB cache, 128GB memory, 1TB hard disk, and 180GB solid state drive.

[0276] See Table 5, which is a comparison of measurement indicators related to spatiotemporal data storage using the technical solution of the present application and the existing system.

[0277] Table 5

[0278]

[0279]

[0280] According to Table 5, under the same distributed operating environment, the same amount of spatiotemporal data is injected:

[0281] (1) Distributed key-value database Cassandra, with a data backup strategy of 3 backups, ultimately occupies 3.2TB of disk space, and each machine injects an average of 45,500 new data per second.

[0282] (2) The distributed graph database JanusGraph has a data backup strategy of 1 backup, which ultimately occupies 3.6 TB of disk space. Each machine injects an average of 86,440 new data per second.

[0283] (3) The MPP relational database Greenplum has a data backup strategy of 2 backups, which ultimately occupies 2.8 TB of disk space. Each machine injects an average of 186,700 new data items per second.

[0284] Here, MPP stands for massively parallel processor.

[0285] (4) The technical solution of the present application has a data backup strategy of 3 backups (wherein the object-time dimension is 1 backup and the space-time dimension is 2 backups), which ultimately occupies 1.9 TB of disk space. Each machine injects an average of 1 million new data per second.

[0286] In addition, the binary byte data of the original data (that is, the original records are directly converted into byte storage) occupies 1.3TB of disk space.

[0287] When the same number of data backups is used, the following can be calculated based on Table 5:

[0288] (1) The disk space occupied by the injected original binary data is 2.1 times that of the embodiment of the present application.

[0289] (2) The disk space occupied by injecting into Cassandra is 1.7 times that of the embodiment of the present application.

[0290] (3) The disk space occupied by injecting JanusGraph is 5.7 times that of the embodiment of the present application.

[0291] (4) The disk space occupied by injecting into Greenplum is 2.2 times that of the embodiment of the present application.

[0292] Fig.14 It reflects the average amount of data injected into the system (all working nodes) per second when the working nodes are expanded from 1 to 10. Fig.14 In the table, the horizontal axis represents the number of machine nodes, and the vertical axis represents the number of records injected per second on average (unit: million). One piece of data occupies 24 bytes. Fig.14 It can be seen that the technical solution of this application has high scalability. As the number of working nodes increases, the amount of data injected increases basically linearly. The average amount of data injected per second per machine is as high as one million, totaling 24MB. If disk space permits, only 11 workers are needed to achieve the goal of injecting 100 million new edges of the spatiotemporal graph every day.

[0293] See also Fig.15 , Fig.15 This is a schematic diagram of the effect of space-time edge partitioning distribution. Fig.15 In the figure, the horizontal axis represents the data volume (GB), and the vertical axis represents the machine node serial number. Fig.15 The storage capacity of spatiotemporal data divided by the object-time dimension (data is one backup), and the storage capacity of spatiotemporal data divided by the space-time dimension (data is two backups) are shown in FIG. Fig.15 From the simulation results shown in , each machine node has basically achieved load balancing.

[0294] See also Fig.16 , Fig.16 This is a comparison chart of query processing performance. Fig.16 As shown, JanusGraph does not support Q3 and Q4 of the four types of queries defined above in this application, so Fig.16There is no JanusGraph showing the results of the two types of queries Q3 and Q4. However, the underlying storage platform of JanusGraph is Cassandra, so the results of the two types of queries Q3 and Q4 can be referred to Spark+Cassandra.

[0295] from Fig.16 It can be seen that the query performance of the technical solution of the present application for Q1-Q4 is improved by 1 to 4 orders of magnitude compared with the query performance of the prior art.

[0296] The performance bottleneck of Cassandra+Spark is that all data needs to be read and scanned from disk for each query. JanusGraph uses a graph storage model, so it performs better for queries targeting object vertices (Q1, Q2). However, since it does not optimize the time dimension, the query performance is worse than the solution of this application.

[0297] Greenplum uses a partitioning strategy based on data objects and time dimensions, which reduces the overhead of scanning operations compared to Cassandra+Spark and significantly improves performance. However, due to the limitations of Greenplum's partitioning granularity (the number of partitions in the object and time dimensions is limited) and Greenplum's lack of optimization for the spatial dimension, Greenplum's query performance is worse than PAST.

[0298] From the above comparison results, it can be seen that the difference between the present application and the existing solutions lies in that: based on the characteristics of the spatiotemporal graph, a differentiated partitioning method is adopted to effectively support high-speed injection of spatiotemporal data, and data related to spatiotemporal correlation analysis queries can be read more accurately, reducing the amount of data to be read and reducing data transmission across machine nodes, thereby achieving higher computing efficiency.

[0299] In addition, the combination of edge partitioning and backup can achieve efficient data reading based on object dimension, time dimension, and space dimension through the partition and storage of the object-time dimension and the space-time dimension, which can speed up the query.

[0300] Considering the integration of the system for managing spatiotemporal data provided by the present application and the existing database system, the present application also optionally provides another system for managing spatiotemporal data, such as Fig.17 shown.

[0301] See also Fig.17 , Fig.17 Another example of the system architecture for managing spatiotemporal data provided in this application. Fig.17The system architecture shown can support PAST (partition forspation temporal graphs) graph partitioning, storage, and computing on existing distributed database systems.

[0302] exist Fig.17 In the PAST index, only the object vertex identifier, location vertex identifier, and time information of the spatiotemporal edge are stored. Other richer information of the spatiotemporal edge event is only stored in the relational database, not in the PAST index. Therefore, in this architecture, the PAST index can be considered as an auxiliary index structure of the relational database to accelerate the processing of spatiotemporal relationship analysis queries.

[0303] exist Fig.17 In the past index, the relational database system appears in two places. On the one hand, there is a database component in each worker node, which is the module of the distributed relational database system running on the current worker node, used to store the completed vertex data and spatiotemporal edge data. On the other hand, in the past index, the partitioned data after row-column format conversion and compression will also be stored in the relational database.

[0304] In addition, the coordination node functions and Figure 6 The ingestor on a worker node has the same functionality as the coordinator node in the architecture shown in . Figure 6 The functions of the injection storage module on the working node shown in are also the same. The past index is an object-time dimension and space-time dimension index constructed by the technical solution of the present application, and the index data is stored in the database. The database can be a relational database, which uses a disk as a medium to store spatiotemporal data and index data.

[0305] exist Fig.17 In the architecture shown, the injection process of new spatiotemporal data and Figure 6 The difference is that when storing data, the original data (that is, the spatiotemporal data that actually flows into the system) is directly stored in the relational database. In this process, a past index is created according to the method of spatiotemporal data division and storage described in the above embodiment. Each piece of data corresponding to the past index will store the identifier of the corresponding original data, and the detailed information of the original data can be read from the relational database according to the identifier of the original data.

[0306] The PAST index may include the space-time dimension and the object-time dimension mentioned above.

[0307] In addition, the technical solution proposed in this application can be applied in the broad field of spatiotemporal graphs, for example, data mining, recommendation systems, etc.

[0308] The above is a detailed description of the method for managing spatiotemporal data provided by the present application. The following is a description of the device for managing spatiotemporal data provided by the present application.

[0309] See also Fig.18 , Fig.18 The schematic block diagram of the apparatus 500 for managing spatiotemporal data provided by the present application is as follows. The apparatus 500 includes a transceiver unit 510 , a processing unit 520 and a storage unit 530 .

[0310] The transceiver unit 510 is used to receive spatiotemporal data including time information and space information, wherein the spatiotemporal data is transmitted through a spatiotemporal graph (V L ,V O ,E) indicates that, where V L are multiple position vertices containing position information, V O are multiple object vertices that do not contain location information, and E is multiple spatiotemporal edges connecting the vertices;

[0311] The processing unit 520 is configured to divide the plurality of spatiotemporal edges according to a first combination dimension to obtain a first backup of the plurality of spatiotemporal edges, and divide the plurality of spatiotemporal edges according to a second combination dimension to obtain a second backup of the plurality of spatiotemporal edges, wherein the first combination dimension and the second combination dimension are respectively formed by combining at least two dimensions of a space dimension, an object dimension, and a time dimension;

[0312] The storage unit 530 is used to store the first backup in a first buffer corresponding to the first combination dimension, and store the second backup in a first buffer corresponding to the second combination dimension.

[0313] In one implementation, the transceiver unit 510 may also be replaced by a receiving unit and / or a sending unit.

[0314] For example, when the transceiver unit 510 performs the receiving step, it can be replaced by the receiving unit. When the transceiver unit 510 performs the sending step, it can be replaced by the sending unit.

[0315] Optionally, the transceiver unit 510 may be a transceiver, which has the function of sending and / or receiving, and the transceiver may also be replaced by a receiver and / or a transmitter.

[0316] Optionally, the transceiver unit 510 may be a communication interface. Specifically, the communication interface may include an input / output interface or a transceiver circuit. The input / output interface may include an input interface and an output interface. The transceiver circuit may include an input interface circuit and an output interface circuit.

[0317] Optionally, the processing unit 520 may be a processor.

[0318] Alternatively, the processing unit 520 may be a processing device, and the functions of the processing device may be partially or fully implemented by software.

[0319] In one implementation, the functions of the processing device may be partially or entirely implemented by software. In this case, the processing device may include a memory and a processor, wherein the memory is used to store a computer program, and the processor reads and executes the computer program stored in the memory to perform the steps implemented by the first working node in each method embodiment. For example, the operations and / or processes performed by the processing unit 520 described above are performed.

[0320] In another implementation, the processing device may only include a processor. A memory for storing the computer program is located outside the processing device, and the processor is connected to the memory through circuits / wires to read and execute the computer program stored in the memory.

[0321] In another implementation, the functions of the processing device can be partially or completely implemented by hardware. In this case, the processing device includes: an input interface circuit for receiving multiple injected space-time edges; a logic circuit for dividing the received multiple space-time edges according to the first combination dimension and the second combination dimension to obtain the first backup and the second backup of the multiple space-time edges respectively; and an output interface circuit for outputting the first backup and the second backup of the multiple space-time edges.

[0322] Further optionally, the output interface circuit may transmit the first backup and the second backup of the plurality of spatiotemporal edges to the storage unit 530 , which will cache them.

[0323] Optionally, the storage unit 530 may be a memory.

[0324] Here, the device 500 can completely correspond to the first working node in the method embodiment (or any worker in the system). The corresponding units included in the device 500 are respectively used to perform the corresponding operations and / or processes performed by the first working node in each method embodiment. For details, please refer to the description of the method embodiment. In order to avoid redundancy, it is appropriately omitted here.

[0325] See also Fig.19 , Fig.18 A schematic block diagram of an apparatus 600 for managing spatiotemporal data provided by the present application. The apparatus 600 includes a processing unit 610 and a storage unit 620.

[0326] The processing unit 610 is used to divide the preset spatial range into multiple regions, and determine the weight of each region according to the number of position vertices of the space-time graph covered by each region in the multiple regions, and establish a mapping table between the multiple regions and the multiple working nodes according to the weight of each region. The mapping table records the mapping relationship between the region identifier and the working node identifier, each region identifier is used to uniquely identify a spatial region, and each working node identifier is used to uniquely identify a working node among the multiple working nodes included in the system.

[0327] The storage unit 620 is used to store the mapping relationship table.

[0328] Optionally, the processing unit 610 may be a processor.

[0329] Alternatively, the processing unit 610 may be a processing device, and the functions of the processing device may be partially or completely implemented by software.

[0330] In one implementation, the functions of the processing device may be partially or entirely implemented by software. In this case, the processing device may include a memory and a processor, wherein the memory is used to store a computer program, and the processor reads and executes the computer program stored in the memory to perform the steps implemented by the coordination node in each method embodiment. For example, the operations and / or processes performed by the processing unit 610 described above are performed.

[0331] In another implementation, the processing device may only include a processor. A memory for storing the computer program is located outside the processing device, and the processor is connected to the memory through circuits / wires to read and execute the computer program stored in the memory.

[0332] In another implementation, the functions of the processing device can be partially or completely implemented by hardware. In this case, the processing device includes: an input interface circuit for obtaining a preset spatial range; a logic circuit for dividing the preset spatial range into multiple regions, and determining the weight of each region according to the number of position vertices of the space-time graph covered by each region in the multiple regions, and establishing a mapping table of the multiple regions and the multiple working nodes according to the weight of each region; and an output interface circuit for outputting the mapping table.

[0333] Further optionally, the output interface circuit may transmit the mapping table to the storage unit 620 , and the mapping table is stored by the storage unit 620 .

[0334] Optionally, the storage unit 620 may be a memory.

[0335] Optionally, the apparatus 600 may further include a transceiver unit 630. The transceiver unit 630 may be a communication interface, such as an input / output interface, an input / output circuit, or a transceiver.

[0336] Here, the device 600 may completely correspond to the coordination node in the method embodiment. The corresponding units included in the device 600 are respectively used to perform the corresponding operations and / or processes performed by the coordination node in each method embodiment. For details, please refer to the description of the method embodiment. In order to avoid redundancy, it is appropriately omitted here.

[0337] Optionally, the processing device involved in the present application may be one or more chips, or one or more integrated circuits.

[0338] For example, the processing device can be one or more field-programmable gate arrays (FPGA), application specific integrated circuits (ASIC), system on chip (SoC), central processor unit (CPU), network processor (NP), digital signal processor (DSP), micro controller unit (MCU), programmable logic device (PLD) or other integrated chips, or any combination of the above chips or processors.

[0339] In addition, the present application also provides a network device 1000. Fig. 20 , Fig. 20 A schematic structural diagram of a network device provided in the present application. The first working node or coordination node in the method embodiment may have the following Fig. 20 The structure shown in .

[0340] like Fig. 20 As shown, the network device 1000 includes an antenna 1101, a radio frequency device 1102, and a baseband device 1103. The antenna 1101 is connected to the radio frequency device 1102. The baseband device 1103 may include one or more processing units 11031. In addition, the baseband device 1103 may also include one or more storage units 11032 and one or more communication interfaces 11033. Among them, the storage unit 11032 is used to store programs and data. The communication interface 11033 is used to exchange information with the radio frequency device 1102. The communication interface 11033 can be an input-output interface or an input-output circuit.

[0341] Optionally, the network device 1000 corresponds to the first working node in the method embodiment, or in other words, the network device 1000 has the function of the first working node in the method embodiment.

[0342] In a possible implementation, the baseband device 1103 generates messages and / or data to be sent to the coordination node or other working nodes in the system, and sends them to the radio frequency device 1102, which transmits the messages and / or data through the antenna 1101.

[0343] In another possible implementation, the radio frequency device 1102 receives the message and / or data sent by the coordination node or other working nodes to the first working node via the antenna 1101, and sends the message and / or data to the baseband device 1103 for processing.

[0344] At this time, the network device 1000 can completely correspond to the first working node in the method embodiment, and the corresponding units included in the network device 1000 are used to execute the corresponding processing and / or operations performed by the first working node in the method embodiment.

[0345] For example, the RF device 1102 performs Fig.18 The operations and / or processing performed by the transceiver unit 510 shown in FIG. Fig.18 The operations and / or processes performed by the processing unit 520 shown in FIG. 5 are not described in detail here.

[0346] Optionally, the coordination node in the method embodiment corresponding to the network device 1000 is taken as an example.

[0347] In a possible implementation, the baseband device 1103 generates messages and / or data to be sent to the working node, and sends them to the radio frequency device 1102 , and the radio frequency device 1102 transmits the messages and / or data through the antenna 1101 .

[0348] In another possible implementation, the radio frequency device 1102 receives the message and / or data sent by the working node via the antenna 1101 , and sends the message and / or data to the baseband device 1103 for processing.

[0349] At this time, the network device 1000 may completely correspond to the coordination node in the method embodiment, and the corresponding units included in the network device 1000 are used to execute the corresponding processing and / or operations performed by the coordination node in the method embodiment.

[0350] For example, the baseband device 1103 executes Fig.19 The operations and / or processes shown in FIG. 1 are performed by the processing unit 610, or the operations and / or processes performed by the storage unit 620. The radio frequency device 1102 performs the operations and / or processes performed by the transceiver unit 630. No further details are given here.

[0351] In addition, the present application also provides a communication system, including a first working node and a coordination node. Further, the communication system generally also includes one or more other working nodes in addition to the first working node.

[0352] Here, the functions of the other working nodes are exactly the same as those of the first working node.

[0353] The present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a computer, the computer executes the operations and / or processing performed by the first working node in any method embodiment.

[0354] The present application also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a computer, the computer executes the operations and / or processes performed by the coordination node in any method embodiment.

[0355] The present application also provides a computer program product, which includes computer program code. When the computer program code is run on a computer, the computer executes the operations and / or processing performed by the first working node in any method embodiment.

[0356] The present application also provides a computer program product, which includes computer program code. When the computer program code runs on a computer, the computer executes the operations and / or processes performed by the coordination node in any method embodiment.

[0357] The present application also provides a chip, the chip comprising a processor. A memory for storing a computer program is provided independently of the chip, and the processor is used to execute the computer program stored in the memory to perform the operation and / or processing performed by the first working node in any method embodiment.

[0358] Furthermore, the chip may also include a memory and / or a communication interface. The communication interface may be an input / output interface, an input / output circuit, etc.

[0359] The present application also provides a chip, the chip comprising a processor. A memory for storing a computer program is provided independently of the chip, and the processor is used to execute the computer program stored in the memory to perform the operation and / or processing performed by the coordination node in any method embodiment.

[0360] Furthermore, the chip may also include a memory and / or a communication interface. The communication interface may be an input / output interface, an input / output circuit, etc.

[0361] The processor mentioned in the above embodiments can be an integrated circuit chip with the ability to process signals. In the implementation process, each step of the above method embodiment can be completed by the hardware integrated logic circuit or software instructions in the processor. The processor can be a general processor, a digital signal processor (digital signal processor, DSP), an application specific integrated circuit (application specific integrated circuit, ASIC), a field programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware coding processor to be executed, or the hardware and software modules in the coding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0362] The memory mentioned in the above embodiments may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example but not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DRRAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0363] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, or a combination of computer software and electronic hardware, depending on the specific application and design constraints of the technical solution. Professional and technical personnel may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0364] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0365] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0366] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0367] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for managing spatiotemporal data, characterized in that: Applied to a system including a coordinating node and a plurality of working nodes, the method includes: A first working node among the plurality of working nodes receives spatiotemporal data including time information and space information, wherein the spatiotemporal data is transmitted through a spatiotemporal graph (V L ,V O ,E) indicates that, where V L are multiple position vertices containing position information, V O are multiple object vertices that do not contain location information, and E is multiple spatiotemporal edges connecting the vertices; The first working node divides the plurality of space-time edges according to a first combination dimension based on the mapping table to obtain a first backup of the plurality of space-time edges; The first working node divides the multiple spatiotemporal edges according to a second combination dimension to obtain a second backup of the multiple spatiotemporal edges, where the first combination dimension and the second combination dimension are respectively composed of at least two dimensions of a space dimension, an object dimension, and a time dimension; the first working node stores the first backup in a first buffer corresponding to the first combination dimension, and stores the second backup in a first buffer corresponding to the second combination dimension; The mapping table is established by the coordination node according to the weight of each area among the multiple areas, the weight of each area is determined according to the number of position vertices of the space-time graph covered by each area among the multiple areas, and the multiple areas are obtained by the coordination node dividing the preset spatial range.

2. The method according to claim 1, characterized in that The first combination dimension is a space-time dimension, and the first working node divides the multiple space-time edges according to the first combination dimension based on the mapping table, including: The first working node calculates the region identifier corresponding to each of the plurality of space-time edges according to the spatial information contained in each of the plurality of space-time edges; The first working node queries the mapping table according to the region identifier corresponding to each spatiotemporal edge to determine the working node corresponding to each spatiotemporal edge, wherein the mapping table records a mapping relationship between the region identifier and the working node identifier, wherein each region identifier is used to uniquely identify a spatial region, and each working identifier is used to uniquely identify a working node among the multiple working nodes; The first working node divides the space-time edges in each spatial area according to the time dimension to obtain the first backup.

3. The method according to claim 1 or 2, characterized in that: The second combined dimension is an object-time dimension, and the first working node divides the multiple spatiotemporal edges according to the second combined dimension, including: The first working node divides the plurality of spatiotemporal edges into a plurality of groups, each group comprising a plurality of spatiotemporal edges of at least one object vertex; The first working node divides the space-time edges in each group according to the time dimension to obtain the second backup.

4. The method according to claim 1, characterized in that: The first backup and the second backup are obtained by dividing the multiple spatiotemporal edges by the first working node in a time slice of the first cycle, and the first backup and the second backup are respectively stored in a first buffer corresponding to the first combination dimension and a first buffer corresponding to the second combination dimension, the first cycle includes N time slices, N≥1 and is an integer, and the method further includes: The first working node reads, in a second cycle, the spatiotemporal edges that are allocated to the first working node within the time slice of the first cycle from the multiple working nodes, wherein the spatiotemporal edges that are allocated to the first working node within the time slice of the first cycle are stored in each working node among the multiple working nodes, and are stored in a first buffer corresponding to the first combination dimension and a first buffer corresponding to the second combination dimension of each working node; The first working node stores the read spatiotemporal edges allocated to the first working node within the time slice of the first cycle into a data storage system.

5. The method according to claim 4, characterized in that The data storage system includes a key-value pair system, and the space-time edges read by the first working node are stored in the data storage system in a key-value format, wherein the key includes a working node identifier, an identifier of a division method of the space-time edges, an internal identifier and a time slice, and the value includes all space-time edges containing the key; wherein the division method of the space-time edges includes the first combination dimension and the second combination dimension, and when the multiple space-time edges are divided according to the first combination dimension, the internal identifier is a region identifier, and when the multiple space-time edges are divided according to the second combination dimension, the internal identifier is a group identifier.

6. The method according to claim 5, characterized in that The value includes a plurality of data fields, the plurality of data fields at least including an object vertex, a position vertex, and a timestamp, and the first working node stores the spatiotemporal edges read in the time slice of the first cycle and allocated to the first working node in the data storage system, including: The first working node creates a table for each data domain in the multiple data domains for column storage.

7. The method according to claim 4, characterized in that The method further comprises: The first working node receives a plurality of newly injected spatiotemporal edges within a time slice of the second period; The first working node divides the newly injected multiple spatiotemporal edges according to the first combination dimension within the time slice of the second cycle to obtain a first backup of the newly injected multiple spatiotemporal edges; The first working node divides the newly injected multiple space-time edges according to the second combination dimension within the time slice of the second cycle to obtain a second backup of the newly injected multiple space-time edges; The first working node stores a first backup of the newly injected multiple space-time edges in a second buffer corresponding to the first combination dimension within the time slice of the second cycle, and stores a second backup of the newly injected multiple space-time edges in a second buffer corresponding to the second combination dimension.

8. The method according to claim 7, characterized in that The first working node reads, from the multiple working nodes in the second period, the spatiotemporal edges that are allocated to the first working node in the time slice of the first period, including: The first working node generates a working node list, where the working node list indicates an order of the plurality of working nodes, and the order is random; The first working node reads each working node in sequence in the order indicated by the working node list during the second period and determines whether the read working node is idle; When the first work node reads the second work node in the work node list and determines that the second work node is idle, the first work node reads the space-time edges allocated to the first work node within the first cycle from the first buffer corresponding to the first combination dimension of the second work node and the first buffer corresponding to the second combination dimension.

9. The method according to claim 8, characterized in that The method further comprises: When the first working node reads the third working node in the working node list and determines that the third working node is busy, the first working node adds the third working node to the busy list and reads the next working node that is sequentially after the third working node.

10. The method according to claim 9, characterized in that The method further comprises: The first working node determines that the working node list has been traversed; The first working node reads the working nodes in the busy list, and when the read working node i is idle, reads the spatiotemporal edges assigned to the first working node in the first cycle from the first buffer corresponding to the first combination dimension of the working node i and the first buffer corresponding to the second combination dimension until the busy list is empty, i is a positive integer, i≥1, and i is equal to the number of working nodes in the busy list.

11. The method according to any one of claims 4 to 10, characterized in that: The memory of each of the plurality of working nodes stores all position vertices included in the spatiotemporal graph, and the method further includes: The first working node divides a plurality of object vertices included in the spatiotemporal graph so that the plurality of object vertices are allocated to the plurality of working nodes; The first working node stores the object vertices allocated to the first working node after division in the data storage system.

12. A method for managing spatiotemporal data, characterized in that: Applied to a system including a coordinating node and a plurality of working nodes, the method includes: The coordination node divides a preset spatial range into a plurality of regions; Determine a weight of each region according to the number of position vertices of the space-time graph covered by each region of the plurality of regions; According to the weight of each area, a mapping relationship table between the multiple areas and the multiple working nodes is established; The mapping relationship table is used for a first working node among the multiple working nodes to divide the multiple spatiotemporal edges according to a first combination dimension to obtain a first backup of the multiple spatiotemporal edges; The plurality of spatiotemporal edges are determined based on spatiotemporal data including time information and space information received by the first working node, wherein the spatiotemporal data is obtained by a spatiotemporal graph (V L ,V O ,E) indicates that, where V L are multiple position vertices containing position information, V O are multiple object vertices that do not contain location information, and E is multiple spatiotemporal edges connecting the vertices; The plurality of spatiotemporal edges are divided according to a second combination dimension to obtain a second backup of the plurality of spatiotemporal edges, wherein the first combination dimension and the second combination dimension are respectively composed of at least two dimensions of a space dimension, an object dimension, and a time dimension; The first backup is stored in a first buffer corresponding to the first combination dimension, and the second backup is stored in a first buffer corresponding to the second combination dimension.

13. The method according to claim 12, characterized in that The step of establishing a mapping relationship table between the plurality of regions and the plurality of working nodes according to the weight of each region includes: Dividing the multiple regions into multiple region blocks, the number of the multiple region blocks is equal to the number of the multiple working nodes, and the weights of the multiple region blocks are equal; The multiple region blocks are allocated to the multiple working nodes to establish a mapping relationship between the region identifiers and the identifiers of the multiple working nodes.

14. A device for managing spatiotemporal data, characterized in that: include: A transceiver unit is used to receive spatiotemporal data including time information and space information, wherein the spatiotemporal data is transmitted through a spatiotemporal graph (V L ,V O ,E) indicates that, where V L are multiple position vertices containing position information, V O are multiple object vertices that do not contain location information, and E is multiple spatiotemporal edges connecting the vertices; A processing unit, configured to divide the plurality of spatiotemporal edges according to a first combination dimension based on a mapping table to obtain a first backup of the plurality of spatiotemporal edges, and to divide the plurality of spatiotemporal edges according to a second combination dimension to obtain a second backup of the plurality of spatiotemporal edges, wherein the first combination dimension and the second combination dimension are respectively composed of at least two dimensions of a space dimension, an object dimension, and a time dimension; the mapping table is established by a coordination node according to a weight of each region among a plurality of regions, the weight of each region is determined according to the number of position vertices of a spatiotemporal graph covered by each region among the plurality of regions, and the plurality of regions are obtained by the coordination node dividing a preset spatial range; The storage unit is used to store the first backup in a first buffer corresponding to the first combination dimension, and store the second backup in a first buffer corresponding to the second combination dimension.

15. The device according to claim 14, characterized in that The first combined dimension is the space-time dimension, The transceiver unit is further used to obtain the mapping table from the coordination node, wherein the mapping table records the mapping relationship between the area identifier and the working node identifier, wherein each area identifier is used to uniquely identify a spatial area, and each working identifier is used to uniquely identify a working node among multiple working nodes; The processing unit is also used to calculate the area identifier corresponding to each space-time edge based on the spatial information contained in each of the multiple space-time edges, and query the mapping table based on the area identifier corresponding to each space-time edge to determine the working node corresponding to each space-time edge, and divide the space-time edges in each spatial area according to the time dimension to obtain the first backup.

16. The device according to claim 14 or 15, characterized in that The second combined dimension is the object-time dimension, and the processing unit is further used to divide the multiple space-time edges into multiple groups, each group containing multiple space-time edges of at least one object vertex, and divide the space-time edges in each group according to the time dimension to obtain the second backup.

17. The device according to claim 15, characterized in that The first backup and the second backup are obtained by the processing unit dividing the multiple spatiotemporal edges in a time slice of the first cycle and are stored by the storage unit in a first buffer corresponding to the first combination dimension and a first buffer corresponding to the second combination dimension, respectively, wherein the first cycle includes N time slices, where N≥1 and is an integer; And, the transceiver unit is further used to read the spatiotemporal edges assigned to the first working node in the time slice of the first cycle from the multiple working nodes in the second cycle, wherein the spatiotemporal edges assigned to the first working node in the time slice of the first cycle are stored in the first buffer corresponding to the first combination dimension and the first buffer corresponding to the second combination dimension of each working node in the multiple working nodes; Furthermore, the storage unit is further used to store the spatiotemporal edges allocated to the first working node within the time slice of the first cycle read in the second cycle into the data storage system.

18. The device according to claim 17, characterized in that The data storage system includes a key-value pair system, and the space-time edges read by the processing unit are stored in the data storage system in a key-value format, wherein the key includes a working node identifier, an identifier of a division method of the space-time edges, an internal identifier and a time slice, and the value includes all space-time edges containing the key, wherein the division method of the space-time edges includes the first combination dimension and the second combination dimension, when the multiple space-time edges are divided according to the first combination dimension, the internal identifier is a region identifier, and when the multiple space-time edges are divided according to the second combination dimension, the internal identifier is a group identifier.

19. The device according to claim 18, characterized in that The value includes multiple data fields, and the multiple data fields include at least object vertices, position vertices and timestamps. The processing unit is also used to create a table for each of the multiple data fields for column storage.

20. The device according to claim 17, characterized in that The transceiver unit is further configured to receive a plurality of newly injected space-time edges within a time slice of the second period; And, the processing unit is further used to divide the newly injected multiple space-time edges according to the first combination dimension within the time slice of the second cycle to obtain a first backup of the newly injected space-time edges, and to divide the newly injected multiple space-time edges according to the second combination dimension within the time slice of the second cycle to obtain a second backup of the newly injected multiple space-time edges; Furthermore, the storage unit is further used to store a first backup of the newly injected multiple space-time edges into a second buffer corresponding to the first combination dimension within the time slice of the second cycle, and to store a second backup of the newly injected multiple space-time edges into a second buffer corresponding to the second combination dimension.

21. The device according to claim 20, characterized in that The processing unit is specifically used for: Generate a work node list, wherein the work node list indicates an order of the plurality of work nodes, and the order is random; In the second cycle, read each working node in sequence according to the order indicated by the working node list and determine whether the read working node is idle; When the second working node in the working node list is read and it is determined that the second working node is idle, the spatiotemporal edges allocated to the device within the first cycle are read from the first buffer corresponding to the first combination dimension of the second working node and the first buffer corresponding to the second combination dimension.

22. The device according to claim 21, characterized in that The processing unit is also used to add the third working node to the busy list and read the next working node that is sequentially after the third working node when the third working node in the working node list is read and determined to be busy.

23. The device according to claim 22, characterized in that The processing unit is also used for: Determining that the list of working nodes has been traversed; Read the working nodes in the busy list, and when the read working node i is idle, read the spatiotemporal edges allocated to the device within the first cycle from the first buffer corresponding to the first combination dimension of the working node i and the first buffer corresponding to the second combination dimension until the busy list is empty, i is a positive integer, i≥1, and i is equal to the number of working nodes in the busy list.

24. The device according to any one of claims 17 to 23, characterized in that The device includes a memory, in which all position vertices included in the space-time graph are stored, and the processing unit is further used to divide a plurality of object vertices included in the space-time graph so that the plurality of object vertices are allocated to the plurality of working nodes; Furthermore, the storage unit is further used to store the object vertices allocated to the device after the division into the data storage system.

25. A device for managing spatiotemporal data, characterized in that: include: A processing unit, configured to divide a preset spatial range into a plurality of regions, determine a weight of each region according to the number of position vertices of the space-time graph covered by each of the plurality of regions, and establish a mapping relationship table between the plurality of regions and the plurality of working nodes according to the weight of each region; The mapping relationship table is used for a first working node among the multiple working nodes to divide the multiple spatiotemporal edges according to a first combination dimension to obtain a first backup of the multiple spatiotemporal edges; The plurality of spatiotemporal edges are determined based on spatiotemporal data including time information and space information received by the first working node, wherein the spatiotemporal data is obtained by a spatiotemporal graph (V L ,V O ,E) indicates that, where V L are multiple position vertices containing position information, V O are multiple object vertices that do not contain location information, and E is multiple spatiotemporal edges connecting the vertices; The plurality of spatiotemporal edges are divided according to a second combination dimension to obtain a second backup of the plurality of spatiotemporal edges, wherein the first combination dimension and the second combination dimension are respectively composed of at least two dimensions of a space dimension, an object dimension, and a time dimension; The first backup is stored in a first buffer corresponding to the first combination dimension, and the second backup is stored in a first buffer corresponding to the second combination dimension; A storage unit is used to store the mapping relationship table.

26. The device according to claim 25, characterized in that The processing unit is also used to divide the multiple regions into multiple regional blocks, the number of the multiple regional blocks is equal to the number of the multiple working nodes, the weights of the multiple regional blocks are equal, and the multiple regional blocks are assigned to the multiple working nodes to establish a mapping relationship between the region identifiers and the identifiers of the multiple working nodes.

27. A computer-readable storage medium, characterized in that: The invention comprises a computer program, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 11.

28. A computer-readable storage medium, characterized in that: It comprises a computer program which, when executed on a computer, causes the computer to perform the method as claimed in claim 12 or 13.

29. A communication system, characterized in that: It comprises a first working node and a coordination node as described in any one of claims 1-13.