Knowledge graph-based spatio-temporal data query method, electronic device and program product

By constructing a four-dimensional knowledge graph based on spatial grid coding, the problems of data silos, lack of multimodal semantics, and low computational efficiency in spatiotemporal data management are solved. This enables efficient integration and secure sharing of multi-source heterogeneous spatiotemporal data, improving data query efficiency and user experience.

CN122019845BActive Publication Date: 2026-06-12XIAMEN KINGTOP INFORMATION TECH

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
XIAMEN KINGTOP INFORMATION TECH
Filing Date
2026-04-13
Publication Date
2026-06-12

Smart Images

  • Figure CN122019845B_ABST
    Figure CN122019845B_ABST
Patent Text Reader

Abstract

The present disclosure provides a knowledge graph-based spatiotemporal data query method, an electronic device and a program product. The knowledge graph-based spatiotemporal data query method comprises: constructing a knowledge graph for recording spatiotemporal data; in response to receiving a spatiotemporal data query request, analyzing the spatiotemporal data query request to obtain target spatial location information, target time information and target business type; performing spatial grid encoding conversion on the target spatial location information to obtain a target spatial grid encoding set; filtering a target spatial node from the knowledge graph based on the target spatial grid encoding set; finding a candidate time node from the time nodes associated with the target spatial node; finding a target time node from the candidate time nodes based on the associated business nodes; obtaining data content based on the feature nodes associated with the target time node; and obtaining a request result based on the data content and outputting the request result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of data processing technology, specifically to a spatiotemporal data query method, electronic device, and program product based on knowledge graphs. Background Technology

[0002] With the deepening of smart city and digital society construction, departments, enterprises, and social organizations have accumulated massive amounts of multi-source, heterogeneous spatiotemporal data. However, existing technologies face three core challenges in organizing and managing spatiotemporal data: First, data from different sources uses diverse spatial location descriptions such as text addresses, latitude and longitude coordinates, or geometric models under heterogeneous coordinate systems. Coupled with the non-standardization and ambiguity of addresses, cross-source data is difficult to automatically align, forming serious "data silos." Second, a large amount of unstructured multimodal data in urban data, such as surveillance videos, remote sensing images, inspection texts, and voice alarms, is difficult to be effectively parsed and semantically interpreted by traditional geographic information systems, making it impossible to achieve deep integration with structured data. Third, traditional spatial analysis algorithms based on latitude and longitude floating-point coordinates are computationally inefficient when processing massive amounts of data, making it difficult to meet real-time requirements. At the same time, the sharing of precise geographic coordinates poses security and privacy risks, creating a dilemma between efficiency and security. Summary of the Invention

[0003] This disclosure provides a spatiotemporal data query method, electronic device, and program product based on knowledge graphs.

[0004] According to one aspect of this disclosure, a spatiotemporal data query method based on a knowledge graph is provided, comprising: constructing a knowledge graph for recording spatiotemporal data, wherein the spatiotemporal data includes spatial location information, time information, and data content; the knowledge graph includes core nodes and branch nodes; the core nodes are spatial nodes corresponding to the spatial location information; the branch nodes include three categories: time nodes corresponding to the time information, business nodes corresponding to the business type to which the data content belongs, and feature nodes corresponding to the feature vector to which the data content belongs; the spatial nodes use the spatial grid code corresponding to the spatial location information as a unique identifier; the three types of branch nodes belonging to the same spatiotemporal data are respectively associated with the corresponding core nodes; and the time nodes belonging to the same spatiotemporal data are respectively associated with the corresponding business nodes and feature nodes; and responding to receiving a spatiotemporal data query request, parsing the spatiotemporal data query request to obtain the target spatial location information, target time information, and target business type contained in the spatiotemporal data query request. The process involves: 1) Performing spatial grid encoding on the target spatial location information to obtain a target spatial grid encoding set corresponding to the target spatial location information; 2) Selecting spatial nodes from the knowledge graph whose corresponding spatial grid encoding or their parent spatial grid encoding belongs to the target spatial grid encoding set as target spatial nodes; 3) Searching for at least one time node whose corresponding time information matches the target time information from the time nodes associated with the target spatial nodes, and selecting it as a candidate time node; 4) Determining whether there are any business nodes whose corresponding business type matches the target business type among the business nodes associated with each candidate time node, and selecting the candidate time nodes associated with business nodes whose corresponding business type matches the target business type as target time nodes; 5) Obtaining the feature vector corresponding to the feature node associated with the target time node; 6) Searching for the corresponding data content based on the mapping relationship between the feature vector and the data content; and 7) Obtaining and outputting the request result based on the data content.

[0005] According to one technical solution, spatial grid coding is used as the unique identifier for spatial nodes, and a four-dimensional knowledge graph is constructed with spatial nodes as the core, integrating time nodes, business nodes, and feature nodes. This enables automatic alignment and deep association of multi-source heterogeneous spatiotemporal data, effectively breaking down data silos caused by inconsistent spatial description methods. By utilizing the hierarchical nesting characteristics of spatial grid coding for spatial node filtering, integer operations can replace traditional floating-point coordinate calculations, significantly improving the efficiency of range queries for large-scale spatiotemporal data. By converting data content into feature vectors and establishing topological associations with spatial-temporal-business dimensions, deep fusion of cross-modal semantic information and spatial location can be achieved, supporting accurate retrieval of multimodal data based on feature vectors. By using spatial grid coding as a proxy identifier for geographic location for data organization and querying, the direct exposure of precise coordinates can be avoided while retaining the spatial granularity required for business analysis, effectively balancing data sharing efficiency and security compliance requirements.

[0006] The spatiotemporal data query method based on knowledge graphs according to at least one embodiment of this disclosure further includes: performing spatial grid encoding conversion on the spatial location information contained in the spatiotemporal data to obtain the spatial grid encoding corresponding to the spatiotemporal data, including: parsing the text address to obtain standard address content when the spatial location information is a text address; converting the standard address content into latitude and longitude coordinates; and performing spatial grid encoding conversion on the latitude and longitude coordinates to obtain the spatial grid encoding corresponding to the spatiotemporal data.

[0007] According to the technical solution of this embodiment, unstructured and ambiguous text addresses can be automatically converted into unified discrete spatial identifiers, achieving precise alignment between text address-type spatial address location information and latitude / longitude coordinate-type spatial address location information under the same spatial reference. This fundamentally eliminates the data silo problem caused by differences in spatial description methods.

[0008] According to at least one embodiment of the knowledge graph-based spatiotemporal data query method of this disclosure, parsing the text address to obtain standard address content includes: using a named entity recognition model to extract standard address elements contained in the text address; obtaining the element content corresponding to each standard address element; and combining the element content corresponding to each standard address element according to address construction rules to obtain the standard address content.

[0009] According to the technical solution of this embodiment, non-standardized and ambiguous text addresses can be automatically converted into standardized addresses with a unified structure.

[0010] According to at least one embodiment of the knowledge graph-based spatiotemporal data query method of this disclosure, a spatial grid encoding conversion is performed based on the latitude and longitude coordinates to obtain the spatial grid encoding corresponding to the spatiotemporal data, including: determining the grid level corresponding to the standard address content; and performing spatial grid encoding conversion based on the latitude and longitude coordinates to obtain the spatial grid encoding corresponding to the spatiotemporal data.

[0011] According to the technical solution of this embodiment, a high-precision spatial location discretization and unified expression can be achieved, which avoids coding redundancy while ensuring positioning accuracy, and lays the foundation for efficient fusion and secure sharing of multi-source spatiotemporal data under a unified spatial reference.

[0012] The spatiotemporal data query method based on knowledge graph according to at least one embodiment of the present disclosure further includes: extracting features from the data content to obtain the feature vector, including: when the data content includes multiple modal data, extracting features according to the modality type of each modal data to obtain local features of each modal data; and performing feature fusion on each local feature to obtain the feature vector.

[0013] According to the technical solution of this embodiment, complementary information between different modalities can be comprehensively utilized to generate a unified feature vector with greater discriminative power and semantic integrity.

[0014] The spatiotemporal data query method based on knowledge graphs according to at least one embodiment of this disclosure further includes: storing the data content and the feature nodes in association through a vector database.

[0015] According to the technical solution of this embodiment, rapid searching of data content can be achieved.

[0016] The spatiotemporal data query method based on knowledge graph according to at least one embodiment of the present disclosure further includes: recording the association relationship between the time nodes and corresponding feature nodes belonging to the same spatiotemporal data through the vector database, and directly searching for the data content corresponding to the target time node from the vector database after obtaining the target time node.

[0017] According to the technical solution of this embodiment, by pre-storing the association index between time nodes and feature nodes in the vector database, the data content can be determined directly based on the target time node, avoiding the need to determine it through feature nodes.

[0018] According to at least one embodiment of the knowledge graph-based spatiotemporal data query method of the present disclosure, obtaining and outputting a request result based on the data content includes: performing data integration on the data content to obtain an integration result, wherein the integration result is any one of structured processing, chart transformation, or spatiotemporal heatmap; and outputting the integration result as the request result.

[0019] According to the technical solution of this embodiment, the original scattered spatiotemporal data can be transformed into intuitive, high-value "data block" products that can be directly used for business decision-making, significantly improving the user experience.

[0020] According to at least one embodiment of the knowledge graph-based spatiotemporal data query method of this disclosure, the method further includes: in response to receiving a spatiotemporal data query request, parsing the spatiotemporal data query request to obtain target spatial location information and target time information contained in the spatiotemporal data query request; performing spatial grid encoding conversion on the target spatial location information to obtain a target spatial grid encoding set corresponding to the target spatial location information; selecting spatial nodes from the knowledge graph whose corresponding spatial grid encoding or the parent spatial grid encoding of the spatial grid encoding belongs to the target spatial grid encoding set as target spatial nodes; searching for at least one time node whose corresponding time information can match the target time information from the time nodes associated with the target spatial nodes as a target time node; obtaining feature vectors corresponding to feature nodes associated with the target time nodes; searching for corresponding data content based on the mapping relationship between the feature vectors and the data content; and obtaining and outputting a request result based on the data content.

[0021] According to the technical solution of this embodiment, it is possible to query the spatiotemporal data of all business types that occur at a given spatial location within a given time period.

[0022] The spatiotemporal data query method based on a knowledge graph according to at least one embodiment of this disclosure further includes: in response to receiving a spatiotemporal data query request, parsing the spatiotemporal data query request to obtain target spatial location information and target business type contained in the spatiotemporal data query request; performing spatial grid encoding conversion on the target spatial location information to obtain a target spatial grid encoding set corresponding to the target spatial location information; selecting spatial nodes from the knowledge graph whose corresponding spatial grid encoding or the parent spatial grid encoding of the spatial grid encoding belongs to the target spatial grid encoding set as target spatial nodes; searching for business nodes whose corresponding business type can match the target business type from the business nodes associated with the target spatial nodes as target business nodes; obtaining time nodes associated with the target business nodes as target time nodes; obtaining feature vectors corresponding to feature nodes associated with the target time nodes; searching for corresponding data content based on the mapping relationship between the feature vectors and the data content; and obtaining and outputting a request result based on the data content.

[0023] According to the technical solution of this embodiment, it is possible to query spatiotemporal data of a specific business type occurring at a specific spatial location.

[0024] According to another aspect of this disclosure, an electronic device is provided, comprising: a memory storing execution instructions; and a processor executing the execution instructions stored in the memory, causing the processor to perform a knowledge graph-based spatiotemporal data query method according to any embodiment of this disclosure.

[0025] According to another aspect of this disclosure, a readable storage medium is provided, wherein executable instructions are stored therein, which, when executed by a processor, are used to implement the knowledge graph-based spatiotemporal data query method of any embodiment of this disclosure.

[0026] According to another aspect of this disclosure, a computer program product is provided, including a computer program that, when executed by a processor, implements a knowledge graph-based spatiotemporal data query method according to any embodiment of this disclosure.

[0027] This disclosure enables automatic alignment and deep correlation of multi-source heterogeneous spatiotemporal data, effectively breaking down data silos caused by inconsistent spatial description methods. It replaces traditional floating-point coordinate calculations with integer operations, significantly improving the efficiency of range queries for large-scale spatiotemporal data. It achieves deep fusion of cross-modal semantic information and spatial location, supporting accurate retrieval of multimodal data based on feature vectors. It avoids directly exposing precise coordinates while preserving the spatial granularity required for business analysis, effectively balancing data sharing efficiency and security compliance requirements. Attached Figure Description

[0028] The accompanying drawings illustrate exemplary embodiments of the present disclosure and, together with the description thereof, serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0029] Figure 1 This is a flowchart illustrating a knowledge graph-based spatiotemporal data query method according to one embodiment of the present disclosure.

[0030] Figure 2 This is a schematic flowchart of a spatial grid encoding acquisition method according to one embodiment of the present disclosure.

[0031] Figure 3 This is a flowchart illustrating the method corresponding to step S210 of one embodiment of the present disclosure.

[0032] Figure 4 This is a flowchart illustrating a knowledge graph-based spatiotemporal data query method according to another embodiment of this disclosure.

[0033] Figure 5 This is a flowchart illustrating a spatiotemporal data query method based on a knowledge graph, according to yet another embodiment of this disclosure.

[0034] Figure 6 This is a schematic block diagram of a spatiotemporal data query device according to one embodiment of the present disclosure.

[0035] Figure 7 This is a schematic structural block diagram of an electronic device employing a processor-based hardware implementation according to one embodiment of the present disclosure. Detailed Implementation

[0036] The present disclosure will now be described in further detail with reference to the accompanying drawings and examples. It should be understood that the specific examples described herein are for illustrative purposes only and are not intended to limit the scope of the disclosure. Furthermore, it should be noted that, for ease of description, only the parts relevant to the present disclosure are shown in the accompanying drawings.

[0037] It should be noted that, where there is no conflict, the embodiments and features described in this disclosure can be combined with each other. The technical solutions of this disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0038] Currently, the construction of smart cities and digital societies primarily employs spatiotemporal data management technologies based on traditional Geographic Information Systems (GIS). These technologies typically use latitude and longitude coordinates (such as the WGS-84 coordinate system) as the underlying spatial reference, and store and manage vector data (points, lines, polygons) and raster data through relational databases or spatiotemporal databases (such as PostGIS and GeoMesa). When processing multi-source heterogeneous spatiotemporal data, existing technologies mainly rely on address encoding techniques to convert text addresses into coordinate points and utilize file systems to store unstructured data such as surveillance videos and remote sensing images. Spatial association is achieved by establishing indexes (filename + latitude and longitude) in external databases. Existing technical solutions have the following problems:

[0039] (1) Insufficient depth of data fusion: Existing technologies are unable to achieve automatic alignment and deep fusion of cross-source spatiotemporal data. The non-standardized text addresses in government databases, the latitude and longitude coordinates output by IoT devices, and the diverse spatial description methods such as three-dimensional geometric models under heterogeneous coordinate systems adopted by different departments have led to data being fragmented at the underlying logic level, forming serious "data silos".

[0040] (2) Lack of multimodal semantics: Although traditional geographic information systems can effectively manage structured vector and raster data, they can only store unstructured multimodal data such as surveillance videos, remote sensing images, inspection texts, and voice alarms as supplementary files, and cannot extract their deep semantic information and establish logical associations with spatial locations. This results in a significant semantic gap between multimodal data and spatial location information.

[0041] (3) Low spatiotemporal computation efficiency: Traditional spatial analysis algorithms based on latitude and longitude floating-point coordinates face severe performance bottlenecks when processing massive spatiotemporal data at the city level. Operations such as range query, spatial topology judgment, and multidimensional correlation analysis highly rely on complex floating-point operations and geometric calculations. The computational complexity increases non-linearly with the amount of data, making it difficult to meet the requirements for real-time response in smart city scenarios.

[0042] (4) Data security and sharing conflict: Precise geographic coordinate data involves security (such as the location of critical infrastructure) and personal privacy (such as vehicle trajectories and personnel location). In the process of data sharing across departments, directly exposing the original latitude and longitude coordinates poses a serious compliance risk.

[0043] To address these issues, this disclosure proposes the following technical solution. This solution employs spatial grid coding as the unique identifier for spatial nodes and constructs a four-dimensional knowledge graph centered on spatial nodes, integrating time nodes, business nodes, and feature nodes. This enables automatic alignment and deep association of multi-source heterogeneous spatiotemporal data, effectively breaking down data silos caused by inconsistent spatial description methods. By utilizing the hierarchical nesting characteristics of spatial grid coding for spatial node filtering, integer operations can replace traditional floating-point coordinate calculations, significantly improving the efficiency of range queries for large-scale spatiotemporal data. By converting data content into feature vectors and establishing topological associations with spatial-temporal-business dimensions, deep fusion of cross-modal semantic information and spatial location can be achieved, supporting accurate retrieval of multimodal data based on feature vectors. By using spatial grid coding as a proxy identifier for geographic location for data organization and querying, the direct exposure of precise coordinates can be avoided while retaining the spatial granularity required for business analysis, effectively balancing data sharing efficiency and security compliance requirements.

[0044] To facilitate description and make the technical solutions of this disclosure easier to understand, the terminology of this disclosure will be explained before describing the technical solutions of this disclosure.

[0045] Knowledge graphs are a technology system that organizes and represents knowledge in the form of a graph structure, with nodes representing entities or concepts and edges representing semantic relationships between entities.

[0046] The BeiDou grid location code is a multi-scale, discretized global geographic grid coding system based on the theory of Earth spatial partitioning, used to uniformly identify and express spatial location information.

[0047] This disclosure applies to scenarios such as smart city governance, digital twin city construction, government data integration and sharing, public safety emergency response, natural resources and land space management, IoT sensing data organization, low-altitude aircraft control, smart traffic scheduling, and intelligent analysis and visualization of multi-source spatiotemporal big data.

[0048] Figure 1 A schematic diagram illustrating the overall flow of a knowledge graph-based spatiotemporal data query method according to one embodiment of this disclosure is shown. Figure 1 The method shown includes steps S110 to S190. This method can be executed by electronic devices such as mobile phones and tablets.

[0049] In step S110, a knowledge graph for recording spatiotemporal data is constructed.

[0050] Spatiotemporal data includes spatial location information, temporal information, and data content. Spatial location information can be represented by latitude and longitude coordinates or by text addresses. For example, a text address can contain standardized address elements such as province, city, district, street, and house number. Temporal information can be a timestamp indicating when the spatiotemporal data was generated. Data content refers to the content contained in the spatiotemporal data, which can specifically be represented as one or more modalities of data. For example, data content can include multiple modalities such as images, text, and videos.

[0051] The knowledge graph comprises core nodes and branch nodes. Core nodes are spatial nodes corresponding to spatial location information. One spatial location information corresponds to one spatial node. Spatiotemporal data with the same spatial location information correspond to the same spatial node. Branch nodes include three categories: time nodes corresponding to time information, business nodes corresponding to the business type of the data content, and feature nodes corresponding to the feature vector of the data content. Spatial nodes use the spatial grid code corresponding to the spatial location information as their unique identifier. The three types of branch nodes belonging to the same spatiotemporal data are associated with their corresponding core nodes. Time nodes belonging to the same spatiotemporal data are associated with their corresponding business nodes and feature nodes. Business types can be pre-classified according to business categories. For example, business types may include public safety, municipal management, and commercial services. A spatiotemporal data may belong to one or more business types; therefore, a spatiotemporal data may correspond to multiple business nodes, and each business node is associated with both the spatial node and the time node corresponding to that spatiotemporal data.

[0052] As one possible implementation, spatial grid coding can use the BeiDou grid location code. In other implementations, spatial grid coding can also use Geohash, Google S2, Uber H3, or a custom multi-level spatial partitioning grid coding, etc.

[0053] As one possible implementation, the three types of branch nodes belonging to the same spatiotemporal data are connected to their respective core nodes via relational edges, thereby establishing the association between the three types of branch nodes belonging to the same spatiotemporal data and their respective core nodes. Similarly, time nodes belonging to the same spatiotemporal data are connected to their respective business nodes and feature nodes via relational edges, thereby establishing the association between time nodes belonging to the same spatiotemporal data and their respective business nodes and feature nodes.

[0054] In step S120, in response to receiving a spatiotemporal data query request, the spatiotemporal data query request is parsed to obtain the target spatial location information, target time information, and target service type contained in the spatiotemporal data query request.

[0055] A spatiotemporal data query request can be a request sent by a user through a client to query spatiotemporal data corresponding to a specific location, specific time, and / or specific business type. Therefore, a spatiotemporal data query request can include target spatial location information, target time information, and target business type.

[0056] In step S130, the target spatial location information is converted into a spatial grid code to obtain the target spatial grid code set corresponding to the target spatial location information.

[0057] Spatial grid coding is a spatial grid coding method with multiple grid levels. In spatial grid coding, one grid corresponds to one code, and the size of the grid is determined by the grid level. The larger the level value, the smaller the grid size (higher accuracy); the smaller the level value, the larger the grid size (wider coverage). For example, the grid level used for administrative districts, industrial parks, and other regional levels is level 6 (approximately 100 meters × 100 meters); the grid level used for urban components (such as fire hydrants, manhole covers, etc.) is level 8 (approximately 1 meter × 1 meter).

[0058] Since the target spatial location information may be a large area (e.g., a specific district), it corresponds to more than one grid in spatial grid coding. Therefore, the resulting target spatial grid code set may contain more than one target spatial grid code. For example, the spatial grid coding uses the BeiDou grid location code, and the target spatial location information is Software Park Phase II. The target spatial grid code set obtained through spatial grid coding conversion contains 81 BeiDou grid location codes, which can be represented as {N44H06Q1234, N44H06Q1235, ..., N44H06Q1314}.

[0059] In step S140, spatial nodes that belong to the target spatial grid code set or whose parent spatial grid code belongs to the target spatial grid code set are selected from the knowledge graph and used as target spatial nodes.

[0060] The target spatial node can be a spatial node whose spatial location information is encoded by the corresponding spatial grid and belongs to the spatial location information within the target spatial location information.

[0061] When the spatial grid code corresponding to a spatial node belongs to the target spatial grid code set, it means that the spatial grid code corresponding to the spatial node and the target spatial grid code set are encoded using the same grid level.

[0062] When the upper-level spatial grid code of the spatial grid code corresponding to a spatial node belongs to the target spatial grid code set, it indicates that the spatial grid code corresponding to the spatial node and the target spatial grid code set are encoded using different grid levels. For example, when the target spatial location information is a large area (such as "Software Park Phase II"), the obtained target spatial grid code set may be a level 6 spatial grid code set. The identifier of the spatial node in the knowledge graph may be a level 8 spatial grid code. Based on the level 8 spatial grid code, the corresponding level 6 (i.e., upper-level) spatial grid code is calculated, and it is determined whether the calculated level 6 spatial grid code exists within the target spatial grid code set. If the level 6 spatial grid code exists within the target spatial grid code set, the corresponding spatial node is determined to be the target spatial node.

[0063] This implementation method can accurately and quickly find the required target spatial node by filtering the corresponding spatial grid code or the parent spatial grid code of the spatial grid code that belongs to the target spatial grid code set.

[0064] In step S150, from the time nodes associated with the target spatial node, at least one time node whose corresponding time information can match the target time information is searched and selected as a candidate time node.

[0065] Since different spatiotemporal data may have the same spatial location information but different temporal information, a knowledge graph may contain a single spatial node that is associated with multiple temporal nodes. In this case, it is necessary to search for one or more temporal nodes whose corresponding temporal information matches the target temporal information from all the temporal nodes associated with the target spatial node, and use these as candidate temporal nodes.

[0066] In step S160, it is determined whether there is a business node among the business nodes associated with each candidate time node whose corresponding business type can match the target business type. The candidate time nodes associated with the business nodes whose corresponding business type can match the target business type are taken as the target time nodes.

[0067] As one possible implementation, a candidate time node may be associated with multiple business nodes. In this case, it is necessary to determine whether there is a business node among all the associated business nodes whose corresponding business type matches the target business type. By filtering the candidate time nodes, it can be ensured that the obtained target time node simultaneously satisfies the time range constraint (target time information) and the business semantic constraint (target business type), thus achieving accurate joint filtering of the spatiotemporal and business dimensions.

[0068] In step S170, the feature vectors corresponding to the feature nodes associated with the target time node are obtained.

[0069] In step S180, the corresponding data content is found based on the mapping relationship between the feature vector and the data content.

[0070] One possible implementation is to use a vector database to associate and store data content and feature nodes, recording the mapping relationship between feature vectors and data content. During the data content retrieval process, a search can be performed from the vector database based on the feature vectors.

[0071] In step S190, the requested result is obtained and output based on the data content.

[0072] As one possible implementation, the original document (such as an image, text, or video) corresponding to the data content can be directly output as the request result.

[0073] This implementation uses spatial grid coding as the unique identifier for spatial nodes and constructs a four-dimensional knowledge graph centered on spatial nodes and incorporating time nodes, business nodes, and feature nodes. It enables automatic alignment and deep association of multi-source heterogeneous spatiotemporal data, effectively breaking down data silos caused by inconsistent spatial description methods. By utilizing the hierarchical nesting characteristics of spatial grid coding for spatial node filtering, integer operations can replace traditional floating-point coordinate calculations, significantly improving the efficiency of range queries for large-scale spatiotemporal data. By converting data content into feature vectors and establishing topological associations with spatial-temporal-business dimensions, it enables deep fusion of cross-modal semantic information and spatial location, supporting accurate retrieval of multimodal data based on feature vectors. By using spatial grid coding as a proxy identifier for geographic location for data organization and querying, it avoids directly exposing precise coordinates while retaining the spatial granularity required for business analysis, effectively balancing data sharing efficiency and security compliance requirements.

[0074] As one possible implementation method, the spatiotemporal data query method based on knowledge graphs also includes: performing spatial grid encoding conversion on the spatial location information contained in the spatiotemporal data to obtain the spatial grid encoding corresponding to the spatiotemporal data. Figure 2 A schematic flowchart illustrating a spatial grid encoding acquisition method according to one embodiment of this disclosure is shown. Figure 2 The method shown includes steps S210 to S230.

[0075] In step S210, if the spatial location information is a text address, the text address is parsed to obtain the standard address content.

[0076] In step S220, the standard address content is converted into latitude and longitude coordinates.

[0077] In step S230, the latitude and longitude coordinates are converted into spatial grid codes to obtain the spatial grid codes corresponding to the spatiotemporal data.

[0078] This implementation can automatically convert unstructured and ambiguous text addresses into unified discrete spatial identifiers, achieving precise alignment between text address-based spatial address location information and latitude / longitude coordinate-based spatial address location information under the same spatial reference. This fundamentally eliminates the data silo problem caused by differences in spatial description methods.

[0079] Regarding step S210, in some embodiments of this disclosure, it may include, for example... Figure 3 Steps S2101 to S2103 are shown.

[0080] In step S2101, a named entity recognition model is used to extract standard address elements contained in the text address.

[0081] Named entity recognition models can employ existing machine learning models (such as BERT-based sequence labeling models), and there are no restrictions here. By inputting text addresses into the trained named entity recognition model, it can identify standard address elements such as province, city, district, street, and house number contained within the text address.

[0082] In step S2102, the element content corresponding to each standard address element is obtained.

[0083] Each standard address element has its corresponding content. For example, the content corresponding to the standard address element "province" can be "Fujian Province", and the content corresponding to the standard address element "city" can be "Xiamen City", etc.

[0084] In step S2103, the element contents corresponding to each standard address element are combined according to the address construction rules to obtain the standard address content.

[0085] Address construction rules can be the order in which the content of each standard address element is arranged, for example, "Fujian Province" precedes "Xiamen City". Combining the content of each standard address element according to the order in the address construction rules yields the standard address content.

[0086] This implementation can automatically convert non-standardized, ambiguous text addresses into standardized addresses with a unified structure.

[0087] As one possible implementation, spatial grid coding transformation is performed on latitude and longitude coordinates to obtain the spatial grid code corresponding to the spatiotemporal data, including: determining the grid level corresponding to the standard address content. Based on the latitude and longitude coordinates, spatial grid coding transformation is performed on the corresponding grid level to obtain the spatial grid code corresponding to the spatiotemporal data. This implementation can achieve a high-precision, discretized, and unified expression of spatial location, avoiding coding redundancy while ensuring positioning accuracy, thus laying the foundation for the efficient fusion and secure sharing of multi-source spatiotemporal data under a unified spatial reference.

[0088] As one possible implementation, the knowledge graph-based spatiotemporal data query method further includes: extracting features from the data content to obtain a feature vector. In one example, extracting features from the data content to obtain a feature vector includes: when the data content includes multiple modalities, extracting features according to the modality type of each modality to obtain local features of each modality. Then, fusing these local features to obtain a feature vector. Exemplarily, during the feature extraction process based on the modality type of each modality, a corresponding feature extraction model can be used for each modality type. Each modality corresponds to a local feature. Fusing the local features of all modality data yields a multi-dimensional feature vector, used to represent the comprehensive features of the spatiotemporal data. This implementation can comprehensively utilize complementary information between different modalities to generate a unified feature vector with greater discriminative power and semantic integrity.

[0089] One possible implementation is to use a vector database to record the association between time nodes and corresponding feature nodes belonging to the same spatiotemporal data. This allows for direct retrieval of the data content corresponding to the target time node from the vector database after obtaining the target time node. This implementation, by pre-storing the association index between time nodes and feature nodes in the vector database, can directly determine the data content based on the target time node, avoiding the need to go through the feature nodes for determination.

[0090] As one possible implementation, obtaining and outputting a requested result based on data content includes: integrating the data content to obtain an integrated result; and outputting the integrated result as the requested result. The integrated result can be any of the following: structured processing, chart transformation, or spatiotemporal heatmap. This implementation integrates multimodal data content in a structured manner and outputs it in the form of structured tables, visual charts, or spatiotemporal heatmaps. It can transform raw, scattered spatiotemporal data into intuitive, high-value "data block" products that can be directly used for business decision-making, significantly improving the user experience.

[0091] Figure 4 A flowchart illustrating another embodiment of the knowledge graph-based spatiotemporal data query method of this disclosure is shown. Figure 4The method shown includes steps S410 to S480. Step S410 corresponds to... Figure 1 Step S110 of the implementation method is detailed in the following description. Figure 1 The relevant descriptions of the implementation methods will not be repeated here.

[0092] In step S420, in response to receiving a spatiotemporal data query request, the spatiotemporal data query request is parsed to obtain the target spatial location information and target time information contained in the spatiotemporal data query request.

[0093] In step S430, the target spatial location information is converted into a spatial grid code to obtain the target spatial grid code set corresponding to the target spatial location information.

[0094] In step S440, spatial nodes that belong to the target spatial grid code set or whose parent spatial grid code belongs to the target spatial grid code set are selected from the knowledge graph and used as target spatial nodes.

[0095] In step S450, from the time nodes associated with the target spatial node, at least one time node whose corresponding time information can match the target time information is searched and used as the target time node.

[0096] In step S460, the feature vectors corresponding to the feature nodes associated with the target time node are obtained.

[0097] In step S470, the corresponding data content is found based on the mapping relationship between the feature vector and the data content.

[0098] In step S480, the requested result is obtained based on the data content and then output.

[0099] This implementation method can enable the querying of spatiotemporal data of all business types occurring at a given spatial location within a given time period.

[0100] Figure 5 A flowchart illustrating another embodiment of the knowledge graph-based spatiotemporal data query method of this disclosure is shown. Figure 5 The method shown includes steps S510 to S590. Step S510 corresponds to... Figure 1 Step S110 of the implementation method is detailed in the following description. Figure 1 The relevant descriptions of the implementation methods will not be repeated here.

[0101] In step S520, in response to receiving a spatiotemporal data query request, the spatiotemporal data query request is parsed to obtain the target spatial location information and target service type contained in the spatiotemporal data query request.

[0102] In step S530, the target spatial location information is converted into a spatial grid code to obtain the target spatial grid code set corresponding to the target spatial location information.

[0103] In step S540, spatial nodes that belong to the target spatial grid code set or the parent spatial grid code of the spatial grid code are selected from the knowledge graph and used as target spatial nodes.

[0104] In step S550, from the business nodes associated with the target space node, a business node whose corresponding business type matches the target business type is found and used as the target business node.

[0105] In step S560, the time node associated with the target business node is obtained as the target time node.

[0106] In step S570, the feature vectors corresponding to the feature nodes associated with the target time node are obtained.

[0107] In step S580, the corresponding data content is found based on the mapping relationship between the feature vector and the data content.

[0108] In step S590, the requested result is obtained based on the data content and output.

[0109] This implementation method can enable the querying of spatiotemporal data of a specific business type occurring at a specific spatial location.

[0110] According to any of the above embodiments, this disclosure also provides a spatiotemporal data query device 600. Figure 6 This is a schematic block diagram of a spatiotemporal data query device 600 according to one embodiment of this disclosure. Figure 6 As shown, the spatiotemporal data query device 600 includes a knowledge graph construction module 610, a query request parsing module 620, a spatial grid encoding conversion module 630, a target spatial node filtering module 640, a candidate time node determination module 650, a target time node determination module 660, a feature vector determination module 670, a data content search module 680, and a request result output module 690.

[0111] The knowledge graph construction module 610 is used to construct a knowledge graph for recording spatiotemporal data. The spatiotemporal data includes spatial location information, time information, and data content. The knowledge graph includes core nodes and branch nodes. The core nodes are spatial nodes corresponding to the spatial location information. The branch nodes include three types: time nodes corresponding to the time information, business nodes corresponding to the business type to which the data content belongs, and feature nodes corresponding to the feature vector to which the data content belongs. The spatial nodes use the spatial grid code corresponding to the spatial location information as a unique identifier. The three types of branch nodes belonging to the same spatiotemporal data are associated with the corresponding core nodes, and the time nodes belonging to the same spatiotemporal data are associated with the corresponding business nodes and feature nodes.

[0112] The query request parsing module 620 is used to respond to the received spatiotemporal data query request, parse the spatiotemporal data query request, and obtain the target spatial location information, target time information, and target business type contained in the spatiotemporal data query request.

[0113] The spatial grid encoding conversion module 630 is used to perform spatial grid encoding conversion on the target spatial location information to obtain the target spatial grid encoding set corresponding to the target spatial location information.

[0114] The target spatial node filtering module 640 is used to filter spatial nodes from the knowledge graph that belong to the target spatial grid code set, or the parent spatial grid code of the spatial grid code.

[0115] The candidate time node determination module 650 is used to find at least one time node from the time nodes associated with the target spatial node that can match the target time information, and use it as a candidate time node.

[0116] The target time node determination module 660 is used to determine whether there is a business node with a corresponding business type that can match the target business type among the business nodes associated with each candidate time node, and to take the candidate time node associated with the business node with a corresponding business type that can match the target business type as the target time node.

[0117] The feature vector determination module 670 is used to obtain the feature vectors corresponding to the feature nodes associated with the target time node.

[0118] The data content lookup module 680 is used to find the corresponding data content based on the mapping relationship between feature vectors and data content.

[0119] The request result output module 690 is used to obtain and output the request result based on the data content.

[0120] The spatiotemporal data query device 600 disclosed herein can be implemented through a computer software architecture.

[0121] According to further embodiments of this disclosure, an electronic device is also provided. Figure 7 This diagram illustrates a schematic block diagram of an electronic device employing a processor-based hardware implementation according to an embodiment of the present disclosure. The hardware structure of the electronic device of the present disclosure can be implemented using a bus architecture. The bus architecture can include any number of interconnect buses and bridges, depending on the specific application and overall design constraints of the hardware. Bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules. Bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc. Bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Component (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, only one connecting line is used in this figure, but this does not indicate that there is only one bus or one type of bus.

[0122] This disclosure also provides a readable storage medium storing a computer program that, when executed by a processor, is used to implement the methods described above. A "readable storage medium" can be any means capable of containing, storing, communicating, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device. More specific examples of a readable storage medium include: an electrical connection with one or more wires (electronic device), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and programmable read-only memory (EPROM or flash memory), fiber optic devices, and portable read-only memory (CDROM), etc.

[0123] This disclosure also provides a computer program product, the methods of which can be implemented wholly or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented wholly or partially as a computer program product. The computer program product includes one or more computer programs or instructions. When the computer program or instructions are loaded and executed, all or part of the processes or functions of this disclosure are performed.

[0124] Computer programs or instructions can be stored in a readable storage medium or transferred from one readable storage medium to another. For example, the computer program or instructions can be transferred from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless means. The readable storage medium can be any available medium capable of access, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium, such as a floppy disk, hard disk, or magnetic tape; an optical medium, such as a digital video optical disc; or a semiconductor medium, such as a solid-state drive. The computer-readable storage medium can be a volatile or non-volatile storage medium, or it can include both volatile and non-volatile types of storage media.

[0125] Those skilled in the art will understand that embodiments of this disclosure can be provided as methods, systems, or computer program products. Therefore, this disclosure can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this disclosure can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0126] This disclosure is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus, and computer program products according to this disclosure. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0127] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0128] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0129] In the description of this specification, the references to terms such as "one embodiment / mode," "some embodiments / modes," "example," "specific example," or "some examples," etc., refer to specific features, structures, or characteristics described in connection with that embodiment / mode or example, which are included in at least one embodiment / mode or example of this disclosure. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment / mode or example. Moreover, the specific features, structures, or characteristics described may be combined in any suitable manner in one or more embodiments / modes or examples. Furthermore, without contradiction, those skilled in the art can combine and integrate the different embodiments / modes or examples described in this specification, as well as the features of different embodiments / modes or examples.

[0130] Those skilled in the art should understand that the above embodiments are merely for illustrating the present disclosure and are not intended to limit the scope of the disclosure. Those skilled in the art can make other changes or modifications based on the above disclosure, and these changes or modifications still fall within the scope of the present disclosure.

Claims

1. A spatiotemporal data query method based on knowledge graphs, characterized in that, include: A knowledge graph is constructed to record spatiotemporal data, which includes spatial location information, time information, and data content. The knowledge graph includes core nodes and branch nodes. The core nodes are spatial nodes corresponding to the spatial location information. The branch nodes include three types: time nodes corresponding to the time information, business nodes corresponding to the business type to which the data content belongs, and feature nodes corresponding to the feature vector to which the data content belongs. The spatial nodes use the spatial grid code corresponding to the spatial location information as a unique identifier. The three types of branch nodes belonging to the same spatiotemporal data are respectively associated with the corresponding core nodes. The time nodes belonging to the same spatiotemporal data are respectively associated with the corresponding business nodes and feature nodes. In response to receiving a spatiotemporal data query request, the spatiotemporal data query request is parsed to obtain the target spatial location information, target time information, and target service type contained in the spatiotemporal data query request; The target spatial location information is converted into a spatial grid code to obtain a target spatial grid code set corresponding to the target spatial location information; From the knowledge graph, select spatial nodes whose corresponding spatial grid codes or their parent spatial grid codes belong to the target spatial grid code set, and use them as target spatial nodes. From the time nodes associated with the target spatial node, at least one time node whose corresponding time information can match the target time information is selected as a candidate time node; Determine whether there are any business nodes with corresponding business types that match the target business type among the business nodes associated with each candidate time node. Then, select the candidate time nodes associated with the business nodes with corresponding business types that match the target business type as the target time nodes. Obtain the feature vector corresponding to the feature node associated with the target time node; Based on the mapping relationship between the feature vector and the data content, the corresponding data content is found; as well as The requested result is obtained and output based on the data content.

2. The spatiotemporal data query method based on knowledge graphs as described in claim 1, characterized in that, Also includes: The spatial grid encoding conversion of the spatial location information contained in the spatiotemporal data is performed to obtain the spatial grid encoding corresponding to the spatiotemporal data, including: When the spatial location information is a text address, the text address is parsed to obtain the standard address content; Convert the standard address content into latitude and longitude coordinates; and The latitude and longitude coordinates are converted into spatial grid codes to obtain the spatial grid codes corresponding to the spatiotemporal data.

3. The spatiotemporal data query method based on knowledge graphs as described in claim 2, characterized in that, Based on the latitude and longitude coordinates, a spatial grid encoding conversion is performed to obtain the spatial grid encoding corresponding to the spatiotemporal data, including: Determine the grid level corresponding to the standard address content; and Based on the latitude and longitude coordinates, spatial grid encoding conversion is performed at the corresponding grid level to obtain the spatial grid encoding corresponding to the spatiotemporal data.

4. The spatiotemporal data query method based on knowledge graphs as described in claim 1, characterized in that, Also includes: The feature vector is obtained by performing feature extraction on the data content, including: When the data content includes multiple modal data, feature extraction is performed based on the modality type of each modal data to obtain the local features of each modal data; as well as The feature vector is obtained by fusing the features of each local feature.

5. The spatiotemporal data query method based on knowledge graphs as described in claim 1, characterized in that, Also includes: The data content and the feature nodes are stored together in a vector database.

6. The spatiotemporal data query method based on knowledge graphs as described in claim 5, characterized in that, Also includes: The vector database records the association between time nodes and corresponding feature nodes belonging to the same spatiotemporal data, and After obtaining the target time node, the data content corresponding to the target time node is directly retrieved from the vector database.

7. The spatiotemporal data query method based on knowledge graphs as described in claim 1, characterized in that, Also includes: In response to receiving a spatiotemporal data query request, the spatiotemporal data query request is parsed to obtain the target spatial location information and target time information contained in the spatiotemporal data query request; The target spatial location information is converted into a spatial grid code to obtain a target spatial grid code set corresponding to the target spatial location information; From the knowledge graph, select spatial nodes whose corresponding spatial grid codes or their parent spatial grid codes belong to the target spatial grid code set, and use them as target spatial nodes. From the time nodes associated with the target spatial node, find at least one time node whose corresponding time information matches the target time information, and use it as the target time node; Obtain the feature vector corresponding to the feature node associated with the target time node; Based on the mapping relationship between the feature vector and the data content, the corresponding data content is found; as well as The requested result is obtained and output based on the data content.

8. The spatiotemporal data query method based on knowledge graphs as described in claim 1, characterized in that, Also includes: In response to receiving a spatiotemporal data query request, the spatiotemporal data query request is parsed to obtain the target spatial location information and target service type contained in the spatiotemporal data query request; The target spatial location information is converted into a spatial grid code to obtain a target spatial grid code set corresponding to the target spatial location information; From the knowledge graph, select spatial nodes whose corresponding spatial grid codes or their parent spatial grid codes belong to the target spatial grid code set, and use them as target spatial nodes. From the business nodes associated with the target space node, find the business node whose corresponding business type matches the target business type, and use it as the target business node; Obtain the time node associated with the target business node as the target time node; Obtain the feature vector corresponding to the feature node associated with the target time node; Based on the mapping relationship between the feature vector and the data content, the corresponding data content is found; as well as The requested result is obtained and output based on the data content.

9. An electronic device, characterized in that, include: The memory stores execution instructions; as well as A processor that executes the execution instructions stored in the memory, causing the processor to perform the spatiotemporal data query method based on knowledge graphs as described in any one of claims 1 to 8.

10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by the processor, it implements the spatiotemporal data query method based on knowledge graphs as described in any one of claims 1 to 8.