Pipe network data retrieval method, system and equipment based on distributed cache and medium

By using distributed caching technology and GeoHash algorithm in the processing of massive pipeline data, the pipeline data is stored on multiple nodes, solving the problem of delay and low efficiency in the search of massive pipeline data space, and achieving efficient and accurate data retrieval and flexible scalability.

CN119938708APending Publication Date: 2025-05-06CHANGJIANG SPATIAL INFORMATION TECH ENG CO LTD (WUHAN)
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411859428.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

Traditional stand-alone databases face high latency and low efficiency when processing massive pipeline data, especially in terms of spatial retrieval, which is difficult to meet real-time and accurate needs.

Method used

The massive pipeline data space retrieval method based on distributed cache is adopted. By creating a multi-master and multi-slave mode cluster of distributed cache databases, the pipeline data is stored on different nodes using GeoHash algorithm and sharding algorithm, and the spatial scope is built for searching during query.

Benefits of technology

It significantly improves the efficiency and accuracy of massive pipeline data space retrieval, reduces system delay, and has flexible scalability, which can meet the storage and processing needs of massive data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119938708A_ABST
    Figure CN119938708A_ABST
Patent Text Reader

Abstract

The invention discloses a distributed cache-based pipe network data retrieval method, system and device and a medium, and the method comprises the steps: creating a distributed cache database multi-master multi-slave mode cluster, and carrying out the cluster configuration; pipe network data information of pipelines and pipe points is obtained, pipe network data is stored in a relational database, and a GeoHash algorithm and a fragmentation algorithm are applied to full-amount pipeline and pipe point data in the relational database so that the pipe network data can fall into different nodes of a distributed cache database; constructing a spatial range of pipe network retrieval in the distributed cache database according to the longitude and latitude of a central point given by query and the width, height or search radius of a search area, and retrieving all pipe network information in the spatial range as a query result; complex spatial data is converted into a simple coding form, storage and quick retrieval of a cache system are facilitated, a distributed cache technology is introduced, the spatial retrieval efficiency of massive pipe network data is improved, and system delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of database and big data, and specifically relates to a method, system, device and medium for spatial retrieval of massive pipe network data based on distributed cache. Background Art

[0002] In recent years, with the rapid development of urbanization and the improvement of infrastructure construction, the number and complexity of underground pipeline network facilities have increased dramatically, generating a massive amount of pipeline network data. Traditional stand-alone databases are unable to handle such a large amount of data that needs to be read and written in real time, especially in situations involving spatial retrieval, such as finding pipeline information near a specific location or performing pipeline conflict detection. These operations place extremely high demands on query efficiency and storage capacity. At the same time, the daily operation and maintenance of the pipeline system and emergency repair work have extremely high expectations for data retrieval speed, and any long delay may bring unforeseen consequences. In this context, seeking an efficient and reliable spatial retrieval solution for massive pipeline network data has become a top priority in the industry.

[0003] As an advanced storage technology, distributed cache has shown great potential in this regard. Distributed cache systems are usually based on memory storage, have extremely high read and write performance, and support dynamic expansion and load balancing of data. It not only provides fast data access capabilities, but also ensures high data availability through redundant storage and failover mechanisms. For data with spatial characteristics such as pipeline network data, distributed cache can optimize spatial queries through built-in geospatial indexing functions. This allows users to locate specific locations in the pipeline network more quickly, improving the efficiency and accuracy of spatial retrieval. Taking the Redis cluster as an example, it has demonstrated excellent capabilities in processing massive pipeline network data spatial retrieval with its rich data structure, efficient performance and powerful geospatial indexing functions. Its built-in geospatial indexing function provides strong support for the construction of pipeline network spatial indexes, making real-time and fast spatial queries such as finding adjacent pipelines and distance queries possible. This not only improves the accuracy and efficiency of data retrieval, but also provides a solid guarantee for the stable operation of the pipeline network system.

[0004] In summary, by using distributed caching technology, we can build an efficient and reliable spatial retrieval method for massive pipeline network data, meet the industry's urgent needs for real-time and accurate data retrieval, and provide strong support for the operation and management of urban infrastructure. Summary of the invention

[0005] The purpose of the present invention is to provide a massive pipeline network data spatial retrieval technology based on distributed cache, aiming to solve the problems of high latency and low efficiency faced by traditional databases when processing massive pipeline network data. By introducing distributed cache technology, fast and efficient retrieval of pipeline network data can be achieved.

[0006] To achieve the above objectives, the technical solution of the present invention is:

[0007] A pipe network data retrieval method based on distributed cache, the method comprising:

[0008] Create a distributed cache database multi-master and multi-slave mode cluster and configure the cluster;

[0009] Obtain the network data information of the built pipelines and points, store the network data information in the relational database of pipelines and points, apply the GeoHash algorithm and the sharding algorithm to the full amount of pipeline and point data in the relational database so that the network data falls on different nodes of the distributed cache database respectively; for the incremental data of newly built pipelines and points, monitor the changes of pipeline and point data in the database in real time, and if new incremental data is detected, apply the GeoHash algorithm and the sharding algorithm so that the newly added network data falls on different nodes of the distributed cache database respectively.

[0010] According to the longitude and latitude of the center point given by the query and the width, height or search radius of the search area, a spatial scope of pipe network retrieval is constructed in the distributed cache database, and all pipe network information within the spatial scope is retrieved as the query result.

[0011] Furthermore, the application of GeoHash algorithm and distributed storage to the full amount of pipeline and pipe point data in the database includes: firstly encoding the geographic location information of the pipeline and pipe point data into a key in the form of a string through the GeoHash algorithm, and then distributing the stringified key to different cache database nodes through the data sharding algorithm, and finally executing the update on the corresponding node to realize the update of the pipeline and pipe point data in the cache database.

[0012] Furthermore, the GeoHash algorithm includes compressing and encoding the geographic location information of pipelines and control points by converting the two-dimensional longitude and latitude coordinates recording the geographic locations of pipelines and control points into a one-dimensional character string.

[0013] Furthermore, the data sharding algorithm includes distributing the compressed and encoded pipeline and pipeline point geographic location information to different cache database nodes through distributed storage of data.

[0014] Furthermore, the spatial inclusion analysis method is applied to retrieve all pipeline network information within the pipeline network retrieval space constructed in the distributed cache database. The spatial inclusion analysis method maps the longitude and latitude coordinates of pipelines and pipe points into string representations through the GeoHash algorithm. Each string corresponds to a rectangular area defined by longitude and latitude, and the string prefixes of adjacent areas are the same.

[0015] A distributed cache-based pipe network data retrieval system for implementing the retrieval method, the retrieval system comprising a distributed cache module, a data preprocessing module, a spatial index module and a retrieval module;

[0016] The distributed cache module is used to build and manage the distributed cache database system;

[0017] The data preprocessing module performs geographic hash coding on the pipe network data, and encodes the geographic location information of the pipeline and pipe point data into a key in the form of a string through geographic hash coding. The stringized key is distributed to different nodes of the distributed cache database;

[0018] The spatial index module constructs a spatial index structure based on the spatial characteristics of the pipe network data;

[0019] The retrieval module implements data retrieval based on the user query request by utilizing the distributed cache system and the spatial index structure.

[0020] Furthermore, the spatial index structure constructs a spatial scope for pipe network retrieval in the distributed cache database according to the longitude and latitude of the central point given by the query and the width, height or search radius of the search area.

[0021] Furthermore, constructing the spatial index structure according to the spatial characteristics of the pipe network data is constructing the spatial index structure according to the latitude and longitude data of the pipe network data.

[0022] The present invention provides an electronic device, comprising:

[0023] At least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method as described in any one of claims 1 to 5.

[0024] The present invention provides a readable storage medium storing a computer program, characterized in that: when the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

[0025] The beneficial effects of the present invention are:

[0026] The present invention is suitable for fast storage and retrieval of large amounts of structured data, and is particularly suitable for spatial index storage of massive pipe network data, such as geographic location coordinates, pipe network node relationships, and search for adjacent facilities. The beneficial effects are as follows.

[0027] 1. When faced with massive pipeline network data, traditional data processing methods cannot meet the requirements of high efficiency and stability due to the huge amount of pipeline network data and real-time updates. The present invention significantly improves the efficiency and accuracy of spatial retrieval of massive pipeline network data and reduces system latency by introducing distributed caching technology.

[0028] First, the present invention can perform efficient data processing: the distributed cache provides high availability and shard storage features, and supports massive data storage indexing. In the scenario of massive pipe network data, the shard storage capability of the distributed cache can easily cope with the storage and retrieval requirements of large amounts of data.

[0029] Secondly, the present invention has fast query performance: the distributed cache system provides a variety of data structures and operation commands to support complex spatial retrieval operations. Through clustered deployment, multiple computing nodes can process query requests in parallel, significantly improving query efficiency. The high concurrent processing capability of the distributed cache system enables it to quickly respond to spatial retrieval requests for massive pipeline network data, meeting the strict requirements of real-time performance and accuracy.

[0030] Thirdly, the present invention has flexible scalability: the flexibility and scalability of distributed cache also enable the system to easily cope with the growth and changes of data volume in the future. Distributed cache supports flexible addition or deletion of computing nodes and has good scalability. This feature is very practical for massive pipe network data query and can meet the growing pipe network data storage and processing needs by dynamically adding computing nodes.

[0031] 2. The distributed cache module of the present invention is responsible for building and managing the distributed cache system, and uses the high availability and high concurrency performance of the distributed cache technology to achieve storage and efficient access to massive pipe network data. Through distributed cache, the system can be horizontally expanded, improve data processing capabilities, and reduce the load pressure of a single node.

[0032] 3. The data preprocessing module of the present invention performs geo-hash coding on the original pipe network data to meet the storage and retrieval requirements of the distributed cache. The data preprocessing module can convert complex spatial data into a concise coding form to facilitate storage and rapid retrieval of the cache system.

[0033] 4. The spatial index module of the present invention constructs an efficient spatial index structure according to the spatial characteristics of the pipe network data. Through the spatial index, the system can quickly locate the data range related to the query request, thereby accelerating the spatial retrieval process and improving the retrieval efficiency and accuracy.

[0034] 5. The retrieval module of the present invention uses the distributed cache system and spatial index structure to achieve fast and accurate data retrieval according to the user's query request. Through the high concurrent access capability of the distributed cache system, the system can quickly respond to the query requests of a large number of users and provide a smooth user experience.

[0035] In the present invention, the massive amount of pipe network data is dispersedly stored on multiple nodes, realizing the horizontal expansion of data. This design not only improves the data processing speed, but also enhances the reliability of the system. At the same time, through the parallel processing mechanism, the computing power of multiple nodes can be fully utilized, which can further improve the efficiency of data processing and retrieval. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 This is a design diagram of the distributed cache architecture of step one of the present invention.

[0037] Figure 2 This is a flow chart of real-time updating and storage of pipe network data in step 2 of the present invention.

[0038] Figure 3 This is a flow chart of pipe network data retrieval and query within the spatial scope of step three of the present invention. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of the invention clearer, the present invention is further described below with reference to the accompanying drawings.

[0040] The present invention relates to database management, big data processing, distributed computing and spatial information retrieval. The present invention comprises a distributed cache module, a data preprocessing module, a spatial index module and a retrieval module.

[0041] In order to achieve the above object, the specific steps of the present invention are as follows:

[0042] Step 1: Create a distributed cache database multi-master and multi-slave mode cluster and configure the cluster.

[0043] Step 2: Obtain the network data information of the built pipelines and points from the relevant data source, organize the obtained network data information and store it in the relational database of pipelines and points, and then apply geocoding, i.e. GeoHash algorithm and data sharding algorithm, to the full amount of pipeline and point data in the database so that the network data falls into different nodes of the distributed cache database respectively; for the incremental data of the newly built pipelines and points, the changes of pipeline and point data in the database are monitored in real time. If new incremental data is monitored, the GeoHash algorithm and data sharding algorithm are applied to make the newly added network data fall into different nodes of the distributed cache database respectively. Specifically, the GeoHash algorithm is first used to encode the geographic location information of the pipeline and point data, such as longitude and latitude, into a string-like key, and then the string-like key is distributed to different cache database nodes through the data sharding algorithm, i.e. Hash algorithm, and finally the update operation is performed on the corresponding node, so as to realize the update of pipeline and point data in the cache database. String-like keys with the same prefix or suffix are distributed to the same database node. Among them, the GeoHash algorithm converts two-dimensional latitude and longitude coordinates into one-dimensional string representation through a space-filling curve, thereby achieving effective compression and encoding of geographic location information; the data sharding algorithm can realize distributed storage and load balancing of data, ensuring high availability and scalability of data.

[0044] Step 3: According to the longitude and latitude of the center point given by the query and the width, height or search radius of the search area, the spatial scope of the pipeline network retrieval is constructed, and the spatial inclusion analysis method is applied to retrieve all the pipeline network information within the spatial scope as the query result. Specifically, according to the longitude and latitude of the center point provided by the query and the width, height or search radius of the search area, a spatial scope for pipeline network retrieval is first constructed. Subsequently, all pipeline network information is retrieved within this spatial scope and returned as the query result. In this process, the spatial inclusion analysis method is used, which maps the longitude and latitude coordinates of pipelines and pipe points into short string representations through the GeoHash algorithm. Each string corresponds to a rectangular area defined by longitude and latitude, and the common prefix of the strings of adjacent areas is the same, and the length of the common prefix is ​​closely related to the degree of proximity between areas: the longer the prefix, the closer the distance between areas.

[0045] This invention takes Redis cluster as a specific implementation case, and the specific implementation steps are as follows:

[0046] 1: Use Docker Compose to build a Redis three-master and three-slave cluster. The configuration example of master node 1 is as follows:

[0047] S11: redis-master1:

[0048] S12: image: redis: 7.0.8

[0049] S13: command: redis-server --appendonly yes --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --port 6379

[0050] S14: ports:

[0051] - "7001:6379"

[0052] S2: The configuration example of the master node 2 is as follows:

[0053] S21: redis-master2:

[0054] S22: image: redis: 7.0.8

[0055] S23: command: redis-server --appendonly yes --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --port 6379

[0056] S24: ports:

[0057] - "7002:6379"

[0058] S3: The configuration example of the master node 3 is as follows:

[0059] S31: redis-master3:

[0060] S32: image: redis: 7.0.8

[0061] S33: command: redis-server --appendonly yes --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --port 6379

[0062] S34: ports:

[0063] - "7003:6379"

[0064] S4: The configuration example from node 1 is as follows:

[0065] S41: redis-slave1:

[0066] S42: image:redis:7.0.8

[0067] S43: command: redis-server --appendonly yes --cluster-enabled yes --cluster-config-file nodes.conf --cluster-node-timeout 5000 --port 6379 --slaveofredis-master16379

[0068] S44: depends_on:

[0069] -redis-master1

[0070] S45: ports:

[0071] -"7004:6379"

[0072] S5: The configuration example of slave node 2 is as follows:

[0073] S51: redis-slave2:

[0074] S52:image:redis:7.0.8

[0075] S53:command:redis-server--appendonly yes--cluster-enabled yes--cluster-config-file nodes.conf--cluster-node-timeout 5000--port 6379--slaveofredis-master26379

[0076] S54:depends_on:

[0077] -redis-master2

[0078] S55:ports:

[0079] -"7005:6379"

[0080] S6: The configuration example of slave node 3 is as follows:

[0081] S61: redis-slave3:

[0082] S62:image:redis:7.0.8

[0083] S63:command:redis-server--appendonly yes--cluster-enabled yes--cluster-config-file nodes.conf--cluster-node-timeout 5000--port 6379--slaveofredis-master36379

[0084] S64:depends_on:

[0085] -redis-master3

[0086] S65:ports:

[0087] -"7006:6379"

[0088] The above code configuration is explained as follows:

[0089] S11, S21, and S31 are the defined names of master node 1, master node 2, and master node 3.

[0090] S41, S24, S43 are the defined names of slave node 1, slave node 2, and slave node 3.

[0091] In S13, S23, S33, S43, S53, and S63, appendonly yes means enabling AOF (Append Only File) persistence, cluster-enabled yes means enabling cluster mode, cluster-config-filenodes.conf means the cluster configuration file is named nodes.conf, cluster-node-timeout 5000 means the cluster node timeout is set to 5000 milliseconds, and port6379 means the Redis service listening port is 6379.

[0092] S44 means make sure redis-master1 is started before starting redis-slave1.

[0093] S54 means make sure redis-master2 is started before starting redis-slave2.

[0094] S64 means make sure redis-master2 is started before starting redis-slave2.

[0095] S14 defines mapping the container's port 6379 to the host's port 7001.

[0096] S24 defines mapping the container's port 6379 to the host's port 7002.

[0097] S34 defines mapping the container's port 6379 to the host's port 7003.

[0098] S45 defines mapping the container's port 6379 to the host's port 7004.

[0099] S55 defines mapping the container's port 6379 to the host's port 7005.

[0100] S65 defines mapping the container's port 6379 to the host's port 7006.

[0101] 2. Massive pipe network data is stored in the relational database, and the Redis cache database is updated synchronously. Some implementation code examples are as follows:

[0102]

[0103] The code configuration of step 2 is explained as follows:

[0104] The code in this step defines a class named MyMetaObjectHandler, which implements the MetaObjectHandler interface.

[0105] In the MyMetaObjectHandler class, there is a method called insertFill, which accepts a parameter of type MetaObject. The purpose of the insertFill method is to perform additional processing on a specific entity object before the data is inserted into the database. The additional processing refers to checking whether the entity object currently being processed is an instance of the PipePipeline type. This is achieved by calling metaObject.getOriginalObject() to obtain the original object, and then using the instanceof keyword to make a judgment.

[0106] If it is an instance of the PipePipeline type, use the getBdSx() and getBdSy() methods of the PipePipeline object to obtain its coordinate values, and convert these values ​​to double type to create a new Point object; use the opsForGeo() method of jsonRedisTemplate to add this Point object to the Redis Geo collection named geo_pipeline. When adding, convert the PipePipeline object to a JSON string as additional information for the point.

[0107] On the contrary, if it is an instance of the PipePipedot type, use the getBdX() and getBdY() methods of the PipePipedot object to obtain its coordinate values, and convert these values ​​to double type to create a new Point object; use the opsForGeo() method of jsonRedisTemplate to add this Point object to the Redis Geo collection named geo_pipedot. When adding, convert the PipePipedot object to a JSON string as additional information of the point.

[0108] Finally, the geographic location information (coordinates) and object information (converted into JSON strings) of specific types of entity objects (PipePipeline and PipePipedot) are stored in the Geo collection of Redis for geographic location-related queries and processing.

[0109] 3: Given the longitude and latitude of a center point and the width and height of a rectangular area, limit the search results to the rectangular area. Some implementation code examples are as follows:

[0110] Pipeline Search

[0111]

[0112]

[0113] Tube point search

[0114]

[0115] S31: Get a Redis Geo data structure named geo_pipeline through the redissonClient client and assign a StringCodec codec to it. <string>Objects of type geo are named and allow performing operations related to geographic location.

[0116] S32: Create a GeoSearchArgs object named args. This object is created by the GeoSearchArgs.from method, which accepts the longitude and latitude coordinates of a center point. The coordinates here are obtained by the getX() and getY() methods of the pipeLineAndDotGeoDTO object.

[0117] S33: Use the .box() method to specify a search range for the args object, which is a rectangular area. The length and width of the rectangle are obtained through the pipeLineAndDotGeoDTO.getWidth() and pipeLineAndDotGeoDTO.getHeight() methods, respectively, and they are converted to double types.

[0118] The present invention also discloses a distributed cache-based massive pipe network data space retrieval system for implementing the retrieval method. The system comprises: a distributed cache module, a data preprocessing module, a space index module and a retrieval module.

[0119] The distributed cache module is responsible for building and managing the distributed cache system, and uses the high availability and high concurrency performance of distributed cache technology to achieve storage and efficient access to massive pipe network data. Through distributed cache, the system can be horizontally expanded, improve data processing capabilities, and reduce the load pressure of a single node.

[0120] The data preprocessing module performs geo-hash coding on the original pipe network data, and encodes the geographic location information of the pipeline and pipe point data into a string key through geo-hash coding. Specifically, the two-dimensional longitude and latitude coordinates recording the geographic location of the pipeline and pipe point are converted into a one-dimensional string, which realizes the compression and encoding of the geographic location information of the pipeline and pipe point to meet the storage and retrieval requirements of the distributed cache. This module can convert complex spatial data into a concise coding form, which is convenient for storage and rapid retrieval of the cache system. The data before processing by the data preprocessing module is stored in the relational database of pipelines and pipe points, and the processed data is stored in the distributed cache database.

[0121] The spatial index module builds an efficient spatial index structure based on the spatial features of the pipe network data, such as the longitude and latitude data of the pipelines and pipe points. Through the spatial index, the system can quickly locate the data range related to the query request, thereby accelerating the spatial retrieval process and improving the retrieval efficiency and accuracy. The spatial index structure refers to the construction of the spatial range of pipe network retrieval in the distributed cache database based on the longitude and latitude of the center point given by the query and the width, height or search radius of the search area.

[0122] The retrieval module uses the distributed cache system and spatial index structure to achieve fast and accurate data retrieval based on user query requests. Through the high concurrent access capability of the distributed cache system, the system can quickly respond to query requests from a large number of users and provide a smooth user experience.

[0123] Finally, it should be noted that the contents not described in detail in this specification belong to the prior art known to professional and technical personnel in this field. The above description is only the preferred embodiment of the present invention and is not used to limit the present invention. Although the present invention is described in detail with reference to the aforementioned embodiments, it is still possible for those skilled in the art to modify the technical solutions recorded in the aforementioned embodiments, or to replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.< / string>

Claims

1. A pipe network data retrieval method based on distributed cache, characterized in that , the method comprises: Create a distributed cache database multi-master and multi-slave mode cluster and configure the cluster; Obtain the network data information of the built pipelines and points, store the network data information in the relational database of pipelines and points, apply the GeoHash algorithm and the sharding algorithm to the full amount of pipeline and point data in the relational database so that the network data falls on different nodes of the distributed cache database respectively; for the incremental data of newly built pipelines and points, monitor the changes of pipeline and point data in the database in real time, and if new incremental data is monitored, apply the GeoHash algorithm and the sharding algorithm so that the newly added network data falls on different nodes of the distributed cache database respectively; According to the longitude and latitude of the center point given by the query and the width, height or search radius of the search area, a spatial scope of pipe network retrieval is constructed in the distributed cache database, and all pipe network information within the spatial scope is retrieved as the query result.

2. The distributed cache-based pipe network data retrieval method according to claim 1 is characterized in that ,The application of the GeoHash algorithm and distributed storage to the full amount of pipeline and pipe point data in the database includes: first, the geographic location information of the pipeline and pipe point data is encoded into a string form of key through the GeoHash algorithm, and then the string form of key is distributed to different cache database nodes through the data sharding algorithm, and finally, the update is performed on the corresponding node, so as to update the pipeline and pipe point data in the cache database.

3. The pipe network data retrieval method based on distributed cache according to claim 2 is characterized in that: The GeoHash algorithm includes compressing and encoding the geographic location information of pipelines and pipe points by converting the two-dimensional longitude and latitude coordinates recording the geographic locations of pipelines and pipe points into a one-dimensional character string.

4. The method for spatial retrieval of massive pipe network data based on distributed cache according to claim 2, characterized in that: The data sharding algorithm includes distributing compressed and encoded pipeline and pipeline point geographic location information to different cache database nodes through distributed storage of data.

5. The distributed cache-based pipe network data retrieval method according to claim 1, characterized in that: The retrieval of all pipe network information includes: applying a spatial inclusion analysis method to retrieve all pipe network information within the pipe network retrieval space range constructed in a distributed cache database. The spatial inclusion analysis method maps the longitude and latitude coordinates of pipelines and pipe points into string representations through a GeoHash algorithm. Each string corresponds to a rectangular area defined by longitude and latitude, and the string prefixes of adjacent areas are the same.

6. A distributed cache-based pipe network data retrieval system for implementing the retrieval method of claim 1, the retrieval system comprising a distributed cache module, a data preprocessing module, a spatial index module and a retrieval module; The distributed cache module is used to build and manage the distributed cache database system; The data preprocessing module performs geographic hash coding on the pipe network data, and encodes the geographic location information of the pipeline and pipe point data into a key in the form of a string through geographic hash coding. The stringized key is distributed to different nodes of the distributed cache database; The spatial index module constructs a spatial index structure based on the spatial characteristics of the pipe network data; The retrieval module implements data retrieval based on the user query request by utilizing the distributed cache system and the spatial index structure.

7. The pipe network data retrieval system based on distributed cache according to claim 6, characterized in that: The spatial index structure constructs a spatial scope for pipe network retrieval in the distributed cache database according to the longitude and latitude of the central point given by the query and the width, height or search radius of the search area.

8. The distributed cache-based pipe network data retrieval system according to claim 6, characterized in that: The construction of the spatial index structure according to the spatial characteristics of the pipe network data is to construct the spatial index structure according to the latitude and longitude data of the pipe network data.

9. An electronic device, characterized in that: include: at least one processor; And, a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method as described in any one of claims 1 to 5.

10. A readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.

Citation Information

Patent Citations

  • High-performance cache design method orienting to massive spatial information

    CN102682110A

  • Data query method and device and storage medium

    CN115080590A

  • Spatial indexing method and device and electronic equipment thereof

    CN116010677A