CN116166895A - Materialized view-based space-time range query method, system, equipment and medium - Google Patents

Materialized view-based space-time range query method, system, equipment and medium Download PDF

Info

Publication number
CN116166895A
CN116166895A CN202211585376.4A CN202211585376A CN116166895A CN 116166895 A CN116166895 A CN 116166895A CN 202211585376 A CN202211585376 A CN 202211585376A CN 116166895 A CN116166895 A CN 116166895A
Authority
CN
China
Prior art keywords
data
storage
target
time range
matched
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211585376.4A
Other languages
Chinese (zh)
Inventor
丁伟
张玮
褚昊翔
史慧玲
郝昊
谭立状
刘国正
周岩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qilu University of Technology
Shandong Computer Science Center National Super Computing Center in Jinan
Original Assignee
Qilu University of Technology
Shandong Computer Science Center National Super Computing Center in Jinan
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qilu University of Technology, Shandong Computer Science Center National Super Computing Center in Jinan filed Critical Qilu University of Technology
Priority to CN202211585376.4A priority Critical patent/CN116166895A/en
Publication of CN116166895A publication Critical patent/CN116166895A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9537Spatial or temporal dependent retrieval, e.g. spatiotemporal queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/903Querying
    • G06F16/9038Presentation of query results
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/907Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/909Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using geographical or spatial information, e.g. location
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The invention relates to a spatio-temporal range query method, a system, equipment and a medium based on materialized view, which comprises the following steps: acquiring a search request, wherein the search request comprises first data to be matched; according to the search request, searching each first storage data matched with each first data to be matched in each node in each level in the materialized view chart as target matching data; the materialized view chart is a database for storing first storage data corresponding to a plurality of levels, and each level corresponds to one category of first storage data. The method solves the problems of low efficiency and low speed of the current moving track data query.

Description

Materialized view-based space-time range query method, system, equipment and medium
Technical Field
The invention relates to the technical field of intelligent traffic, in particular to a spatio-temporal range query method, a system, equipment and a medium based on materialized views.
Background
With the increasing number of motor vehicles, a large amount of movement trace data is also generated. In the field of intelligent traffic, the space-time range query of movement tracks is an important study, and has a great number of important practical significance for social life and technical development. However, in the case of mass data, the space-time range query of the moving track has the problem of too slow query speed. The SECONDO system designed by Ralf Hartmut zGntin et al provides a basic mobile object query model to process the query problem of a mobile object, but the problem of non-ideal data query efficiency under massive data still exists; esteban Zim ny realizes a Mobility DB model, optimizes the storage and query problems of moving track data in PostgreSQL and PostGIS, and is difficult to meet the efficient query problem under a large data cluster despite the parallel processing characteristic of PostgreSQL.
Disclosure of Invention
In order to solve the problems of low efficiency and low speed of current moving track data query, the invention provides a spatio-temporal range query method, a system, equipment and a medium based on materialized view.
In order to solve the technical problems, the present invention provides a spatio-temporal scope query method based on materialized views, comprising the following steps:
obtaining a search request, wherein the search request comprises first data to be matched, and for each first data to be matched, the first data to be matched represents movement track data of the vehicle in a preset time range and on a space-time range;
searching each first storage data matched with each first data to be matched in each node in each level in the physical and chemical view chart as target matching data according to the search request, wherein for each first storage data, the first storage data represents the corresponding movement track data of the vehicle stored in the database within a preset time range;
the physical and chemical view chart is a database for storing first storage data corresponding to a plurality of levels, each level corresponds to first storage data of a class, and the class characterizes the attribute of movement track data corresponding to first data to be matched in a preset time range.
The space-time range query method based on materialized view provided by the invention has the beneficial effects that: because the materialized view chart corresponds to the first storage data of one category according to the hierarchy storage data, when searching in the materialized view chart, the first storage data of the required category can be searched according to the hierarchy, so that the large-scale searching of the first storage data of the required category from massive data in the prior art is avoided, the searching time is greatly shortened, and the problems of low efficiency and low speed of the current moving track data query are solved.
On the basis of the technical scheme, the spatio-temporal range query method based on materialized views can be improved as follows.
Further, the materialized view diagram is constructed by a first step comprising:
acquiring a category corresponding to each first data to be matched and each first storage data in a preset time range, wherein for each category, the category comprises a plurality of storage addresses, and each storage address corresponds to one first storage data corresponding to the category;
constructing a plurality of nodes corresponding to a plurality of levels according to the storage addresses of each category, wherein for each level, one level corresponds to the same category, each level corresponds to at least one node, and one node comprises a plurality of storage addresses;
according to each node in each level, constructing an association relation between each node in each level, wherein for each level, the association relation of each level characterizes the association relation between each storage address in the level and each storage address in the adjacent level of the level;
and constructing a physical vision chart according to each level and the association relation between each level.
The beneficial effects of adopting the further scheme are as follows: in the physical and chemical view chart, each level pair uses the same category, and one category corresponds to one node, so that when first storage data are stored, the first storage data corresponding to each category are stored in storage addresses corresponding to different nodes of the same level, and when the first storage data of any category need to be searched, the first storage data only need to be searched from the level corresponding to the category, and searching from massive data is avoided.
Further, according to the association relation between each hierarchy and each hierarchy, a materialized view chart is constructed, comprising:
each storage address is used as a target storage address, corresponding target nodes in adjacent levels of the levels corresponding to the target storage addresses are determined according to the association relation, and the target storage addresses are pointed to all storage addresses in the target nodes;
and constructing a physical vision chart according to the target storage address, the association relation and all storage addresses in the target node.
The beneficial effects of adopting the further scheme are as follows: for different levels, according to the association relation, each storage address between adjacent levels can be associated, so that when searching, each other first storage data associated with the first storage data corresponding to the required category can be searched out together.
Further, the method comprises the following steps:
for each target node, the target node is provided with an initial number of storage addresses;
directing the target storage address to all storage addresses in the target node, including:
for each target storage address, if the number of storage addresses in the target node pointed by the target storage address is larger than the initial number, a storage address is newly added in the target node, the number of storage addresses contained in the current target node is taken as the initial number, and the target storage address is pointed to all storage addresses in the target node.
The beneficial effects of adopting the further scheme are as follows: since the number of storage addresses of each node is limited and only has the initial number of storage addresses, when the number of other first storage data having an association relationship with the first storage data in the target storage address is greater than the initial number, the storage addresses need to be added in the target node to store the redundant first storage data.
Further, the system further comprises:
if the number of the storage addresses in the target node pointed to by the target storage address is greater than the initial number after a storage address is newly added in the target node, repeating the second step until the number of the storage addresses in the target node pointed to by the target storage address is equal to the initial number, wherein the second step comprises:
and adding a storage address in the target node to obtain a new target node, and taking the number of the storage addresses contained in the new target node as a new initial number.
The beneficial effects of adopting the further scheme are as follows: since the target node adds only one storage address at a time, it is necessary to repeatedly determine whether the number of storage addresses in the target node to which the target storage address points is equal to the initial number so that the target node has a sufficient number of storage addresses.
Further, the system further comprises:
updating the physical and chemical view chart according to each second storage data in the next time range in the preset time range, wherein the second storage data represents the corresponding movement track data of the vehicle in the next time range in the preset time range, which are stored in the database.
The beneficial effects of adopting the further scheme are as follows: because the required movement track data in different preset time ranges are different, the materialized view chart needs to be updated in advance so that the searched movement track data is the data required by the user.
Further, updating the materialized view chart according to each second stored data in a next time range within a preset time range, including:
acquiring second storage data, wherein for each second storage data, the second storage data represents movement track data stored in a database corresponding to the vehicle in a next time range;
for each storage address in each category, replacing the first storage data corresponding to the category stored in the storage address with the second storage data corresponding to the category.
The beneficial effects of adopting the further scheme are as follows: and replacing the first storage data in the storage addresses of the nodes in each level in the materialized view chart with the second storage data so as to update the materialized view chart.
In a second aspect, the present invention provides a spatio-temporal extent query system based on materialized views, comprising:
the search request module is used for acquiring a search request, the search request comprises first data to be matched, and for each first data to be matched, the first data to be matched characterizes the moving track data of the vehicle in a preset time range and on a space-time range;
the candidate cache module is used for searching each first storage data matched with each first data to be matched in each node in each level in the materialized view chart as target matching data according to the search request, and for each first storage data, the first storage data represents the corresponding movement track data of the vehicle stored in the database within a preset time range;
the physical-chemical view chart in the candidate cache module is a database for storing first storage data corresponding to a plurality of levels, each level corresponds to first storage data of a class, and the class characterizes the attribute of movement track data corresponding to first data to be matched in a preset time range.
In a third aspect, the present invention further provides an electronic device, including a memory, a processor, and a program stored on the memory and running on the processor, where the processor implements the steps of the materialized view-based spatio-temporal extent query method described above when the processor executes the program.
In a fourth aspect, the present invention also provides a computer readable storage medium having instructions stored therein, which when executed on a terminal device, cause the terminal device to perform the steps of the spatio-temporal extent query method based on materialized views as described above.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the present invention is further described below with reference to the drawings and the embodiments.
FIG. 1 is a flow chart of a spatio-temporal scope query method based on materialized views according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a physical and chemical diagram according to an embodiment of the present invention;
FIG. 3 is a diagram of runtime results for querying first data to be matched for a predetermined time range;
FIG. 4 is a graph of runtime results for querying first data to be matched for a spatial range;
FIG. 5 is a graph of runtime results of querying first data to be matched for a range of spatiotemporal ranges
FIG. 6 is a schematic diagram of a spatio-temporal extent query system based on materialized views according to an embodiment of the invention.
Detailed Description
The following examples are further illustrative and supplementary of the present invention and are not intended to limit the invention in any way.
The following describes a spatio-temporal scope query method, a system, a device and a medium based on materialized views according to an embodiment of the present invention with reference to the accompanying drawings.
As shown in FIG. 1, the spatio-temporal scope query method based on materialized views according to an embodiment of the invention includes the following steps:
s1, acquiring a search request, wherein the search request comprises first to-be-matched data, and for each first to-be-matched data, the first to-be-matched data represents movement track data of a vehicle in a preset time range and on a space-time range.
In this embodiment, the preset time range refers to a preset time period, and the user may search for the desired movement track data within the preset time period, for example, 8:00-10:00, 11:00-12:00, etc. in the morning.
In addition, the spatiotemporal range refers to movement track data of the vehicle in a specified area within a preset time range.
In addition, the movement trajectory data refers to data generated by a vehicle at the time of operation, for example: vehicle number, license plate number, vehicle type, vehicle owner, vehicle travel track division number, vehicle travel track point, etc.
S2, searching each first storage data matched with each first data to be matched in each node in each level in the materialized visual chart as target matching data according to the search request, wherein for each first storage data, the first storage data represents the corresponding movement track data of the vehicle in a preset time range, wherein the movement track data is stored in a database.
Optionally, the materialized view chart is a database storing first storage data corresponding to a plurality of levels, each level corresponds to first storage data of a class, and the class characterizes an attribute of movement track data corresponding to the first data to be matched in a preset time range.
In this embodiment, the physical and chemical view chart is a database modified based on a TBDR-Tree structure, where the TB Tree is an index structure, D represents a direction, and R-Tree is also an index structure, as shown in fig. 2, in each hierarchy, the TBDR-Tree uses MBTR (memory address) in a node, each MBTR can use 3 6-bit key values (association relations) to index, and the key values respectively represent the node positions of the ith hierarchy from left to right, so that the TBDR-Tree provides effective storage and direction optimization, and provides fast lookup of the key values to pointers instead of fixed-size arrays.
Optionally, the materialized view chart is constructed by a first step comprising:
acquiring a category corresponding to each first data to be matched and each first storage data in a preset time range, wherein for each category, the category comprises a plurality of storage addresses, and each storage address corresponds to one first storage data corresponding to the category;
constructing a plurality of nodes corresponding to a plurality of levels according to the storage addresses of each category, wherein for each level, one level corresponds to the same category, each level corresponds to at least one node, and one node comprises a plurality of storage addresses;
according to each node in each level, constructing an association relation between each node in each level, wherein for each level, the association relation of each level characterizes the association relation between each storage address in the level and each storage address in the adjacent level of the level;
and constructing a physical vision chart according to each level and the association relation between each level.
Optionally, the process of data query in the materialized view chart is as follows:
s21, acquiring first data to be matched;
s22, carrying out track inquiry in a physical-chemical view chart according to each first data to be matched, searching corresponding first storage data in corresponding nodes of corresponding levels according to the types of the first data to be matched, and simultaneously searching other related first storage data from adjacent levels according to the association relation, wherein for example, the first data to be matched is license plate number XXX (corresponding type is license plate number), searching license plate number XXX of corresponding storage address in the nodes of the corresponding levels (license plate number), and searching other related first storage data from adjacent levels according to the association relation, for example, the vehicle owner of the license plate number XXX is YYY, the vehicle type is small private car and the like;
s23, if each first storage data is searched, assigning all the searched first storage data to a geometric variable library (geos variable);
s24, judging whether the geo variable is null or not, if so, indicating that each first storage data is not searched, and if not, indicating that each first storage data is searched;
and S25, displaying the searched first storage data to a user.
Optionally, in order to shorten the search time, the materialized view table needs to be stored in advance in the first storage data in the preset time range, based on which, when the second storage data in the next time range in the preset time range is to be acquired, the materialized view table needs to be updated, and therefore, the method further includes:
updating the physical and chemical view chart according to each second storage data in the next time range in the preset time range, wherein the second storage data represents the corresponding movement track data of the vehicle in the next time range, which are stored in the database.
Optionally, updating the materialized view chart according to each second stored data in a next time range within a preset time range includes:
acquiring second storage data, wherein for each second storage data, the second storage data represents movement track data stored in a database corresponding to the vehicle in a next time range;
for each storage address in each category, replacing the first storage data corresponding to the category stored in the storage address with the second storage data corresponding to the category.
Optionally, constructing a materialized view chart according to each hierarchy and the association relation between each hierarchy, including:
each storage address is used as a target storage address, corresponding target nodes in adjacent levels of the levels corresponding to the target storage addresses are determined according to the association relation, and the target storage addresses are pointed to all storage addresses in the target nodes;
and constructing a physical vision chart according to the target storage address, the association relation and all storage addresses in the target node.
In this embodiment, since the materialized view chart is constructed based on the TBDR-Tree structure, each storage address in each node can be indexed by 3 6-bit key values, so that according to the key values, an association relationship can be constructed to associate each storage address in each level, and based on this, for example, the target storage address has an X key value and has an association relationship with each storage address having a Y key value in the next adjacent level, at this time, the target storage address having the X key value can be directed to each storage address having the Y key value in the next level, and each storage address having the Y key value forms the target node.
Optionally, the method for searching the target node by the target storage address and inserting the target node is as follows:
and starting from the target storage address, judging whether the target storage address has an association relation with any storage address in the next level, if so, pointing the target storage address to the storage address in the next level, and circulating the operation until the target storage address and each storage address in the next level are subjected to the association relation judgment.
Optionally, since the target node presets the initial number of storage addresses, when the number of storage addresses of a next hierarchy pointed to by the target storage address is greater than the initial number, the number of storage addresses that can be carried by one node overflows, so that the method further includes:
for each target node, the target node is provided with an initial number of storage addresses;
directing the target storage address to all storage addresses in the target node, including:
for each target storage address, if the number of storage addresses in the target node pointed by the target storage address is larger than the initial number, a storage address is newly added in the target node, the number of storage addresses contained in the current target node is taken as the initial number, and the target storage address is pointed to all storage addresses in the target node.
In this embodiment, for example, the number of storage addresses of the next level to which the target storage address points is 6, and the initial number of storage addresses included in one node is 5, then to form the target node, a new storage address must be added to the target node.
Optionally, the number of storage addresses with the target storage address pointing to the next level may sometimes be far greater than the initial number, for example, the number of storage addresses with the target storage address pointing to the next level is 8, and the initial number of storage addresses included in one node is 5, so that only adding one storage address to the target node is still insufficient, and thus the method further includes:
if the number of the storage addresses in the target node pointed to by the target storage address is greater than the initial number after a storage address is newly added in the target node, repeating the second step until the number of the storage addresses in the target node pointed to by the target storage address is equal to the initial number, wherein the second step comprises:
and adding a storage address in the target node to obtain a new target node, and taking the number of the storage addresses contained in the new target node as a new initial number.
Alternatively, one specific application of this embodiment is:
firstly, importing a data set into a materialized view chart to inquire moving track data, respectively carrying out moving track data searching test by a direct mass data inquiring method, a traditional TBDR-Tree structure indexing method and a materialized view-based space-time range inquiring method, wherein experimental results are shown in fig. 3-5, wherein fig. 3 is used for inquiring first data to be matched in a preset time range, an abscissa is set to be the quantity of the first data to be matched, an ordinate is the running time when the query is carried out, an ST-index is used for inquiring by the direct mass data, an ST-index is used for inquiring by the traditional TBDR-Tree structure indexing method, an ST-materialized is used for inquiring by the space-time range based on the materialized view, an ST-material is used for inquiring by the first data to be matched in the space range, an abscissa is set to be the quantity of the first data to be matched in the space range, an ST-index is used for inquiring by the traditional TBTree structure indexing method, and an ST-index is used for inquiring by the space-time range when the first data to be matched in the space range, and an ST-index is used for inquiring by the traditional TBTree structure.
According to the experimental results of fig. 3, fig. 4 and fig. 5, as the number of the first data to be matched increases, the query time of the target data (search result) also increases, because the data processing time required for the query increases as the amount of the query data increases, and compared with the direct massive data query method and the traditional TBDR-Tree structure index method, the space-time range query method based on the materialized view shows shorter query time in the three methods, and has faster query speed.
According to fig. 3 and fig. 4, the space-time range query method based on materialized view is more time-consuming than the traditional TBDR-Tree structure index method due to the consideration of the space coordinate range in the space range query, and the space-time range query method based on materialized view provided by the present patent shows the shortest query time among the three.
As can be seen from FIG. 5, in the experiment of the space-time range query, the space-time range query method based on the materialized view provided by the present patent still performs best and has the shortest data query time.
As shown in FIG. 6, a materialized view-based spatio-temporal range query system of an embodiment of the present invention includes:
a search request module 202, configured to obtain a search request, where the search request includes first to-be-matched data, and for each first to-be-matched data, the first to-be-matched data characterizes movement track data of the vehicle in a preset time range and in a space-time range;
the candidate cache module 203 is configured to search, according to the search request, each first storage data that matches each first data to be matched in each node in each level in the materialized view chart as target matching data, where for each first storage data, the first storage data characterizes corresponding movement track data of the vehicle stored in the database within a preset time range;
the materialized view chart in the candidate cache module 203 is a database storing first storage data corresponding to a plurality of levels, each level corresponds to first storage data of a class, and the class characterizes an attribute of movement track data corresponding to first data to be matched in a preset time range.
Optionally, in the candidate cache module 203, the materialized view chart is constructed by a first unit, where the first unit is specifically configured to:
acquiring a category corresponding to each first data to be matched and each first storage data in a preset time range, wherein for each category, the category comprises a plurality of storage addresses, and each storage address corresponds to one first storage data corresponding to the category;
constructing a plurality of nodes corresponding to a plurality of levels according to the storage addresses of each category, wherein for each level, one level corresponds to the same category, each level corresponds to at least one node, and one node comprises a plurality of storage addresses;
according to each node in each level, constructing an association relation between each node in each level, wherein for each level, the association relation of each level characterizes the association relation between each storage address in the level and each storage address in the adjacent level of the level;
and constructing a physical vision chart according to each level and the association relation between each level.
Optionally, the candidate cache module 203 further includes:
and the construction module is used for taking each storage address as a target storage address, determining a corresponding target node in the adjacent level of the level corresponding to the target storage address according to the association relation, directing the target storage address to all storage addresses in the target node, and constructing a physical vision chart according to the target storage address, the association relation and all storage addresses in the target node.
Optionally, the system method further comprises:
an initial number module, configured to set an initial number of storage addresses for each target node;
and the pointing module is used for adding one storage address into the target node if the number of the storage addresses in the target node pointed by the target storage address is larger than the initial number for each target storage address, taking the number of the storage addresses contained in the current target node as the initial number, and pointing the target storage address to all the storage addresses in the target node.
Optionally, the system further comprises:
and a storage address adding module, configured to repeat the second step if, after adding a storage address in the target node, the number of storage addresses in the target node pointed to by the target storage address is greater than the initial number, until the number of storage addresses in the target node pointed to by the target storage address is equal to the initial number, where the second step includes:
and adding a storage address in the target node to obtain a new target node, and taking the number of the storage addresses contained in the new target node as a new initial number.
Optionally, the system further comprises:
and the updating module is used for updating the materialized view chart according to each second storage data in the next time range in the preset time range, wherein the second storage data represents the movement track data of the vehicle in the database, which corresponds to the next time range in the preset time range.
Optionally, the updating module further includes:
the second storage data module is used for acquiring second storage data, and for each second storage data, the second storage data represents the corresponding movement track data stored in the database in the next time range of the vehicle;
and the replacing module is used for replacing the first storage data corresponding to the category stored in the storage address with the second storage data corresponding to the category for each storage address in each category.
The electronic equipment comprises a memory, a processor and a program stored in the memory and running on the processor, wherein the processor realizes part or all of the steps of a spatio-temporal range query method based on materialized views when executing the program.
The electronic device may be a computer, and correspondingly, the program is computer software, and the parameters and steps in the above embodiment of the method for querying a space-time range based on materialized view of the electronic device according to the present invention may be referred to, and are not described herein.
Those skilled in the art will appreciate that the present invention may be implemented as a system, method, or computer program product. Accordingly, the present disclosure may be embodied in the following forms, namely: either entirely hardware, entirely software (including firmware, resident software, micro-code, etc.), or entirely software, or a combination of hardware and software, referred to herein generally as a "circuit," module "or" system. Furthermore, in some embodiments, the invention may also be embodied in the form of a computer program product in one or more computer-readable media, which contain computer-readable program code. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
While embodiments of the present invention have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the invention, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the invention.

Claims (10)

1. The space-time range query method based on materialized view is characterized by comprising the following steps of:
obtaining a search request, wherein the search request comprises first data to be matched, and for each first data to be matched, the first data to be matched represents movement track data of a vehicle in a preset time range and on a space-time range;
searching each first storage data matched with each first data to be matched in each node in each level in the materialized visual chart as target matching data according to the search request, wherein for each first storage data, the first storage data represents the corresponding movement track data of the vehicle in a preset time range, wherein the movement track data is stored in a database;
the materialized view chart is a database for storing first storage data corresponding to a plurality of levels, each level corresponds to first storage data of a category, and the category characterizes the attribute of movement track data corresponding to the first data to be matched in a preset time range.
2. The method of claim 1, wherein the materialized view diagram is constructed by a first step comprising:
acquiring a category corresponding to each first data to be matched and each first storage data in the preset time range, wherein for each category, the category comprises a plurality of storage addresses, and each storage address correspondingly stores one first storage data corresponding to the category;
constructing a plurality of nodes corresponding to a plurality of levels according to the storage addresses of the categories, wherein for each level, one level corresponds to the same category, each level corresponds to at least one node, and one node comprises a plurality of storage addresses;
constructing an association relationship between each node in each hierarchy according to each node in each hierarchy, wherein for each hierarchy, the association relationship of the hierarchy characterizes the association relationship between each storage address in the hierarchy and each storage address in the adjacent hierarchy of the hierarchy;
and constructing the materialized view chart according to each hierarchy and the association relation between each hierarchy.
3. The method of claim 2, wherein constructing the materialized view graph from the respective hierarchy and the association between the respective hierarchies comprises:
each storage address is used as a target storage address, corresponding target nodes in adjacent levels of the levels corresponding to the target storage addresses are determined according to the association relation, and the target storage addresses are pointed to all the storage addresses in the target nodes;
and constructing the materialized visual chart according to the target storage address, the association relation and all the storage addresses in the target node.
4. A method according to claim 3, characterized in that the method further comprises:
for each of the target nodes, the target node is provided with an initial number of the storage addresses;
said directing the target said storage address to all said storage addresses in the target node includes:
for each target storage address, if the number of storage addresses in the target node pointed to by the target storage address is larger than the initial number, adding one storage address in the target node, taking the number of storage addresses contained in the current target node as the initial number, and pointing the target storage address to all the storage addresses in the target node.
5. The method as recited in claim 4, further comprising:
if the number of storage addresses in the target node pointed to by the target storage address is greater than the initial number after the new storage address is added in the target node, repeating the second step until the number of storage addresses in the target node pointed to by the target storage address is equal to the initial number, where the second step includes:
and adding a storage address in the target node to obtain a new target node, and taking the number of the storage addresses contained in the new target node as a new initial number.
6. The method of any one of claims 1-5, further comprising:
and updating the physical and chemical view chart according to each second storage data in the next time range in the preset time range, wherein the second storage data represents the movement track data stored in the database corresponding to the next time range in the preset time range of the vehicle.
7. The method of claim 6, wherein updating the materialized view map based on each second stored data in a next time range within the preset time range comprises:
acquiring each second storage data, wherein for each second storage data, the second storage data represents the corresponding movement track data of the vehicle in the next time range, which is stored in a database;
for each of the storage addresses in each of the categories, replacing the first storage data corresponding to the category stored in the storage address with the second storage data corresponding to the category.
8. A materialized view-based spatio-temporal extent query system, comprising:
the search request module is used for acquiring a search request, the search request comprises first data to be matched, and for each first data to be matched, the first data to be matched characterizes the movement track data of the vehicle in a preset time range and on a space-time range;
the candidate cache module is used for searching each first storage data matched with each first data to be matched in each node in each level in the materialized view chart as target matching data according to the search request, and for each first storage data, the first storage data represents the corresponding movement track data of the vehicle in a preset time range, wherein the movement track data is stored in the database;
the materialized visual chart in the candidate cache module is a database for storing first storage data corresponding to a plurality of levels, each level corresponds to first storage data of a category, and the category characterizes the attribute of movement track data corresponding to the first data to be matched in a preset time range.
9. An electronic device comprising a memory, a processor and a program stored on the memory and running on the processor, wherein the processor, when executing the program, implements the steps of the materialized view-based spatiotemporal scope query method of any of claims 1 to 7.
10. A computer readable storage medium, characterized in that the computer readable storage medium has stored therein instructions, which when run on a terminal device, cause the terminal device to perform the steps of the materialized view based spatio-temporal range query method of any of claims 1 to 7.
CN202211585376.4A 2022-12-09 2022-12-09 Materialized view-based space-time range query method, system, equipment and medium Pending CN116166895A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211585376.4A CN116166895A (en) 2022-12-09 2022-12-09 Materialized view-based space-time range query method, system, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211585376.4A CN116166895A (en) 2022-12-09 2022-12-09 Materialized view-based space-time range query method, system, equipment and medium

Publications (1)

Publication Number Publication Date
CN116166895A true CN116166895A (en) 2023-05-26

Family

ID=86419133

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211585376.4A Pending CN116166895A (en) 2022-12-09 2022-12-09 Materialized view-based space-time range query method, system, equipment and medium

Country Status (1)

Country Link
CN (1) CN116166895A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117290617A (en) * 2023-08-18 2023-12-26 中国船舶集团有限公司第七〇九研究所 Offshore distributed multi-source heterogeneous space-time data query method and system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117290617A (en) * 2023-08-18 2023-12-26 中国船舶集团有限公司第七〇九研究所 Offshore distributed multi-source heterogeneous space-time data query method and system
CN117290617B (en) * 2023-08-18 2024-05-10 中国船舶集团有限公司第七〇九研究所 Offshore distributed multi-source heterogeneous space-time data query method and system

Similar Documents

Publication Publication Date Title
CN109165215B (en) Method and device for constructing space-time index in cloud environment and electronic equipment
Song et al. K-nearest neighbor search for moving query point
CN101324896B (en) Method for storing and searching vector data and management system thereof
Lin et al. Range-based skyline queries in mobile environments
CN107291842B (en) Track query method based on track coding
Frentzos et al. Nearest neighbor search on moving object trajectories
JP2004518226A (en) Database system and query optimizer
CN107784044B (en) Table data query method and device
Zhang et al. Effectively indexing uncertain moving objects for predictive queries
CN109815232B (en) Method and system for retrieving and processing data ranking by using binary search tree
CN116166895A (en) Materialized view-based space-time range query method, system, equipment and medium
CN110928882B (en) Memory database indexing method and system based on improved red black tree
US6745198B1 (en) Parallel spatial join index
CN103914456A (en) Data storage method and system
CN111552694A (en) Self-adaptive geographic space grid indexing method
Kipf et al. Approximate geospatial joins with precision guarantees
CN109189796B (en) High-precision map data management method and device
CN109446293B (en) Parallel high-dimensional neighbor query method
CN110347676B (en) Uncertainty tense data management and query method based on relation R tree
CN111414445A (en) Address inverse analysis method applying geographic information
CN110716933A (en) Novel urban rail train big data-oriented high-flexibility distributed index method
CN115391424A (en) Database query processing method, storage medium and computer equipment
CN109446294B (en) Parallel mutual subspace Skyline query method
CN101936741B (en) Reverse base graph based vehicle navigation road network incremental data updating system for correcting spatial-temporal data model
Fisher et al. The Po-tree: a real-time spatiotemporal data indexing structure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination