CN-122019845-A - Knowledge graph-based space-time data query method, electronic equipment and program product
Abstract
The disclosure provides a knowledge graph-based space-time data query method, electronic equipment and a program product. The space-time data query method based on the knowledge graph comprises the steps of constructing the knowledge graph for recording space-time data, responding to a received space-time data query request, analyzing the space-time data query request to obtain target space position information, target time information and target service types, performing space grid coding conversion on the target space position information to obtain a target space grid coding set, screening target space nodes from the knowledge graph based on the target space grid coding set, searching time nodes to be selected from time nodes associated with the target space nodes, searching the target time nodes from the time nodes to be selected based on the associated service nodes, obtaining data content based on characteristic nodes associated with the target time nodes, obtaining a request result based on the data content, and outputting the request result.
Inventors
- SONG YUEMING
- WANG YIFEI
- GAO MINGYANG
- CHEN YONG
Assignees
- 厦门精图信息技术有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260413
Claims (10)
- 1. The space-time data query method based on the knowledge graph is characterized by comprising the following steps of: Constructing a knowledge graph for recording space-time data, wherein the space-time data comprises space position information, time information and data content, the knowledge graph comprises core nodes and branch nodes, the core nodes are space nodes corresponding to the space position information, the branch nodes comprise three types of time nodes corresponding to the time information, service nodes corresponding to service types to which the data content belongs and feature nodes corresponding to feature vectors to which the data content belongs, the space nodes adopt space grid codes corresponding to the space position information as unique identifications, three types of branch nodes belonging to the same space-time data are respectively associated with the corresponding core nodes, and the time nodes belonging to the same space-time data are respectively associated with the corresponding service nodes and the feature nodes; responding to a received space-time data query request, and analyzing the space-time data query request to obtain target space position information, target time information and target service type contained in the space-time data query request; Performing space grid coding conversion on the target space position information to obtain a target space grid coding set corresponding to the target space position information; screening corresponding space grid codes or space grid codes of a superior space grid code of the space grid codes from the knowledge graph, wherein the space nodes belong to the target space grid code set and serve as target space nodes; Searching at least one time node of which the corresponding time information can be matched with the target time information from the time nodes associated with the target space nodes, and taking the time node as a time node to be selected; judging whether service nodes which are associated with the service nodes and can be matched with the target service type in the corresponding service types exist in the service nodes which are associated with the time nodes to be selected, and taking the service nodes which are associated with the service nodes and can be matched with the target service type in the corresponding service types as target time nodes; Acquiring a feature vector corresponding to a feature node associated with the target time node; Searching corresponding data content based on the mapping relation between the feature vector and the data content, and And obtaining a request result based on the data content and outputting the request result.
- 2. The method for querying spatio-temporal data based on a knowledge graph according to claim 1, further comprising performing space-grid coding conversion on the spatial position information contained in the spatio-temporal data to obtain a space-grid code corresponding to the spatio-temporal data, wherein the method comprises the steps of: When the space position information is a text address, analyzing the text address to obtain standard address content; converting the standard address content into longitude and latitude coordinates, and And performing space grid coding conversion on the longitude and latitude coordinates to obtain the space grid codes corresponding to the space-time data.
- 3. The knowledge-graph-based spatio-temporal data query method of claim 2, wherein performing spatial grid coding conversion based on the longitude and latitude coordinates to obtain the spatial grid codes corresponding to the spatio-temporal data includes: Determining the grid level corresponding to the standard address content, and And performing space grid code conversion of a corresponding grid level based on the longitude and latitude coordinates to obtain the space grid code corresponding to the space-time data.
- 4. The method for querying spatio-temporal data based on a knowledge graph according to claim 1, further comprising extracting features from the data content to obtain the feature vector, wherein the method comprises: Extracting features according to the mode type of each mode data to obtain local features of each mode data under the condition that the data content comprises a plurality of mode data, and And carrying out feature fusion on each local feature to obtain the feature vector.
- 5. The knowledge-based spatio-temporal data query method of claim 1, further comprising: And storing the data content and the characteristic nodes through vector database association.
- 6. The knowledge-based spatio-temporal data query method of claim 5, further comprising: recording the association relation between the time nodes belonging to the same time-space data and the corresponding characteristic nodes through the vector database, and And after the target time node is obtained, directly searching the data content corresponding to the target time node from the vector database.
- 7. The knowledge-based spatio-temporal data query method of claim 1, further comprising: responding to a received space-time data query request, and analyzing the space-time data query request to obtain target space position information and target time information contained in the space-time data query request; Performing space grid coding conversion on the target space position information to obtain a target space grid coding set corresponding to the target space position information; screening corresponding space grid codes or space grid codes of a superior space grid code of the space grid codes from the knowledge graph, wherein the space nodes belong to the target space grid code set and serve as target space nodes; searching at least one time node, of which the corresponding time information can be matched with the target time information, from the time nodes associated with the target space nodes, and taking the time node as a target time node; Acquiring a feature vector corresponding to a feature node associated with the target time node; Searching corresponding data content based on the mapping relation between the feature vector and the data content, and And obtaining a request result based on the data content and outputting the request result.
- 8. The knowledge-based spatio-temporal data query method of claim 1, further comprising: Responding to a received space-time data query request, and analyzing the space-time data query request to obtain target space position information and target service types contained in the space-time data query request; Performing space grid coding conversion on the target space position information to obtain a target space grid coding set corresponding to the target space position information; screening corresponding space grid codes or space grid codes of a superior space grid code of the space grid codes from the knowledge graph, wherein the space nodes belong to the target space grid code set and serve as target space nodes; searching a service node which can be matched with the target service type corresponding to the service type from service nodes associated with the target space node as a target service node; acquiring a time node associated with the target service node as a target time node; Acquiring a feature vector corresponding to a feature node associated with the target time node; Searching corresponding data content based on the mapping relation between the feature vector and the data content, and And obtaining a request result based on the data content and outputting the request result.
- 9. An electronic device, comprising: a memory storing execution instructions, and A processor executing the memory-stored execution instructions, causing the processor to perform the knowledge-graph-based spatiotemporal data query method of any of claims 1 to 8.
- 10. A computer program product comprising a computer program, characterized in that the computer program, when executed by a processor, implements the knowledge-graph based spatiotemporal data query method of any of claims 1 to 8.
Description
Knowledge graph-based space-time data query method, electronic equipment and program product Technical Field The disclosure relates to the technical field of data processing, in particular to a spatio-temporal data query method based on a knowledge graph, electronic equipment and a program product. Background With the deep advancement of smart city and digital society construction, departments, enterprises, social organizations and the like accumulate massive heterogeneous spatio-temporal data. However, the prior art faces three core challenges in the aspects of organizing and managing time-space data, namely, firstly, the data from different sources adopts a diversified spatial position description mode such as text address, longitude and latitude coordinates or geometric model under a heterogeneous coordinate system, and the problem of address non-standardization and ambiguity is caused, so that cross-source data are difficult to automatically align, and serious 'data island' is formed. The method has the advantages that the method is simple in structure, convenient to use, and easy to operate, the unstructured multi-mode data such as monitoring videos, remote sensing images, inspection texts, voice alarms and the like existing in a large amount in city data are difficult to effectively analyze and semanteme by a traditional geographic information system, deep fusion can not be realized with the structured data, the traditional space analysis algorithm based on longitude and latitude floating point coordinates is low in calculation efficiency when processing the massive data, real-time requirements are difficult to meet, and meanwhile, the safety and personal privacy leakage risks exist in the accurate geographic coordinates in the sharing process, so that the dilemma of efficiency and safety is formed. Disclosure of Invention The disclosure provides a knowledge graph-based space-time data query method, electronic equipment and a program product. According to one aspect of the disclosure, a method for querying spatio-temporal data based on a knowledge graph is provided, which comprises constructing a knowledge graph for recording spatio-temporal data, wherein the spatio-temporal data comprises spatial position information, time information and data content, the knowledge graph comprises a core node and a branch node, the core node is a spatial node corresponding to the spatial position information, the branch node comprises three types of a time node corresponding to the time information, a service node corresponding to a service type to which the data content belongs and a feature node corresponding to a feature vector to which the data content belongs, the spatial node adopts spatial grid codes corresponding to the spatial position information as unique identifiers, three types of branch nodes belonging to the same spatio-temporal data are respectively associated with the corresponding core node, the time nodes belonging to the same spatio-temporal data are respectively associated with the corresponding service node and the feature node, responding to a spatio-temporal data query request, analyzing the spatio-temporal data query request to obtain target spatial position information, target time information and target service type contained in the spatio-temporal data query request, performing spatial coding on the target spatial position information to obtain three types of the target spatial grid codes corresponding to the target spatial position information, searching spatial grid codes corresponding to the target spatial position information from the spatial grid codes or at least one spatial grid code corresponding to the spatial grid codes in a set, and at least one spatial grid node can be used as a target spatial grid code node, and a spatial grid node can be used as a target grid-level node, the method comprises the steps of selecting a service node which is associated with each time node to be selected, judging whether the service node which is associated with each time node to be selected and has the corresponding service type capable of matching the target service type exists or not, taking the time node which is associated with the service node which is associated with the corresponding service type capable of matching the target service type as a target time node, obtaining a feature vector which is associated with a feature node and corresponds to the target time node, searching corresponding data content based on a mapping relation between the feature vector and the data content, and obtaining a request result based on the data content and outputting the request result. According to the technical scheme of one aspect, space grid coding is adopted as a unique identifier of a space node, and a four-dimensional knowledge graph which takes the space node as a core, merges time nodes, service nodes and feature nodes is constructed. The multi-source heterogeneous space-time data can be automati