Knowledge graph-based perceptual data query methods, devices, equipment, and media
By using a knowledge graph-based approach, combined with graph databases and time-series databases, the problem of low efficiency in joint queries of perceived data and business data was solved, enabling efficient data querying and intuitive display of business object relationships.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 软通智慧科技有限公司
- Filing Date
- 2023-09-28
- Publication Date
- 2026-07-17
AI Technical Summary
In scenarios with complex relationships between business objects, existing technologies suffer from low efficiency and unintuitive query writing for joint queries of perceived data and business data.
By using a knowledge graph-based approach, the system responds to user query requests, determines the query tasks for graph databases and time-series databases, acquires target scene data and perception data, and generates query results.
It improves the efficiency of perceptual data query and enhances the visibility of business object relationships.
Smart Images

Figure CN117370371B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet of Things (IoT) technology, and in particular to a knowledge graph-based method, apparatus, electronic device, and storage medium for querying sensing data. Background Technology
[0002] Currently, in fields such as smart cities and the industrial internet, there is a need to process and query the sensor data collected by IoT devices.
[0003] Existing technologies typically use relational databases to store business data and time-series databases to store perception data. When performing data queries, the data is directly queried from the relational database and its tables based on the relationships between business objects.
[0004] However, in scenarios with relatively complex business object relationships, the data storage and query logic is complex, requiring the comparison and judgment of a large number of data tables, resulting in low execution efficiency. Summary of the Invention
[0005] This invention provides a knowledge graph-based method, apparatus, device, and storage medium for querying perceptual data, in order to solve the problems of low efficiency and unintuitive query writing when jointly querying perceptual data and business data.
[0006] According to one aspect of the present invention, a perceptual data query method based on knowledge graphs is provided, the method comprising:
[0007] In response to a query request for target data, a graph database query task and a time-series database query task are determined based on the query request.
[0008] Based on the graph database query task, the target scene data matching the target data is determined;
[0009] Based on the IoT device identifier in the target scene data and the time-series database query task, obtain the target perception data in the time-series database.
[0010] Based on the target scene data and the target perception data, generate query results for the target data.
[0011] According to another aspect of the present invention, a knowledge graph-based perceptual data query device is provided, the device comprising:
[0012] The query task determination module is used to respond to a query request for target data and determine graph database query tasks and time series database query tasks based on the query request.
[0013] The scene data determination module is used to determine the target scene data that matches the target data based on the query task in the graph database.
[0014] The perception data acquisition module is used to acquire target perception data in the time series database based on the IoT device identifier in the target scene data and the time series database query task.
[0015] The query result generation module is used to generate query results for the target data based on the target scene data and the target perception data.
[0016] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[0017] At least one processor; and
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to execute the knowledge graph-based perceptual data query method according to any embodiment of the present invention.
[0020] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the knowledge graph-based perceptual data query method according to any embodiment of the present invention.
[0021] The technical solution of this invention, upon detecting a user's query request for target data, determines a graph database query task and a time-series database query task based on the query request; determines target scene data matching the target data based on the graph database query task; obtains target sensing data from the time-series database based on the IoT device identifier in the target scene data and the time-series database query task; and generates query results for the target data based on the target scene data and the target sensing data. This technical solution solves the problems of low efficiency and unintuitive query writing in joint queries of sensing data and business data.
[0022] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description
[0023] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 This is a flowchart of a knowledge graph-based perceptual data query method provided in Embodiment 1 of the present invention;
[0025] Figure 2 This is a flowchart of a knowledge graph-based perceptual data query method according to Embodiment 2 of the present invention;
[0026] Figure 3 This is a schematic diagram of the structure of a knowledge graph-based perceptual data query device according to Embodiment 3 of the present invention;
[0027] Figure 4 This is a schematic diagram of the structure of an electronic device that implements the knowledge graph-based perceptual data query method according to an embodiment of the present invention. Detailed Implementation
[0028] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0029] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be used interchangeably where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or device that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or devices. The acquisition, storage, use, and processing of data in the technical solutions of this application all comply with the relevant provisions of national laws and regulations.
[0030] Example 1
[0031] Figure 1 This document provides a flowchart of a knowledge graph-based sensing data query method according to Embodiment 1 of the present invention. This embodiment is applicable to sensing data processing scenarios in Internet of Things (IoT) systems. The method can be executed by a knowledge graph-based sensing data query device, which can be implemented in hardware and / or software and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0032] S110. In response to the query request for target data, determine the graph database query task and the time series database query task according to the query request.
[0033] This solution can be executed by a perception data query platform, which can respond to user terminal query inputs, query executions, and other operations, and process the perception data accordingly. If the perception data query platform detects a target data query request from a user terminal, it can parse the query request and determine graph database query tasks and time-series database query tasks based on the query request. The query request may include information such as user identifier, request time, graph data object association constraints, graph data object attribute constraints, perception data field constraints, perception data statistical aggregation method, graph data object return fields, and perception data return fields. Specifically, the graph data object association constraints can describe the association relationships between graph data objects that match the target perception data. The graph data objects can include spatial objects and IoT devices, and the number of graph data objects can be one or more. The association relationships between graph data objects can include containment relationships between spatial objects, or attachment relationships between spatial objects and IoT devices. The spatial objects can be entities in the target scene corresponding to the scene graph, such as buildings, rooms, roads, and water bodies.
[0034] As is easily understood, the attribute constraints of the graph data object can be query constraint information for the attributes of the graph data object. For example, the attributes of a spatial object can include information such as the spatial object name, spatial object number, and spatial object size. The perception data query platform can obtain the attribute information of the graph data object in the scene graph based on the attribute constraints of the graph data object.
[0035] The constraints on the sensing data fields can be used to constrain the query of sensing data during the time-series database query process. For example, the constraints on the sensing data fields can include constraints such as time intervals and spatial range intervals. The sensing data statistical aggregation method can be a constraint that performs statistical aggregation on the target sensing data after it has been queried from the time-series database.
[0036] The returned fields of the graph data object can be limitations on the data fields of the returned target scene data after the graph database query task is completed. The returned fields of the graph data can be original graph attribute values or generated fields obtained by performing operations on the original attribute values using the built-in query function. The returned fields of the perception data are limitations on the data fields of the returned target perception data after the time-series database query task is completed. The returned fields of the perception data can be original perception data field values or generated fields obtained by performing operations on the original field values using the built-in query function. It is understood that the perception data query platform can perform user authentication based on the user identifier in the query request. After successful authentication, it determines the graph database query task and the time-series database query task. Specifically, the perception data query platform can generate a graph database query task based on the graph data object association constraints, graph data object attribute constraints, and returned fields of the graph data object in the query request. The graph database query task can be a task that queries the target scene data in the graph database. Based on the perception data field constraints, perception data statistical aggregation methods, and perception data returned fields in the query request, the perception data platform can generate a time-series database query task. The time-series database query task can be a task that queries the target perception data in the time-series database.
[0037] S120. Based on the graph database query task, determine the target scene data that matches the target data.
[0038] In essence, based on the graph database query task, the perception data query platform can determine the target scene data that matches the target data in the graph database. Specifically, the perception data query platform can search for graph data objects in the graph database that meet the graph data object association constraints and graph data object attribute constraints, and return the target scene data according to the constraints of the graph data object return fields. The target scene data may include information such as spatial object identifiers, spatial object attributes, IoT device identifiers, and IoT device attributes.
[0039] S130. Based on the IoT device identifier in the target scene data and the time-series database query task, obtain the target perception data in the time-series database.
[0040] After obtaining the target scenario data, the sensing data query platform can extract the IoT device identifier from the target scenario data. Based on the IoT device identifier, it searches for the sensing data of the target IoT device in the time-series database. The platform then determines the target sensing data from the target IoT device's sensing data according to the time-series database query task. In essence, the sensing data query platform can filter candidate sensing data that meets the constraints of the sensing data fields based on the time-series database query task, and aggregate and statistically analyze the candidate sensing data according to a sensing data statistical aggregation method. Based on the statistical results and the returned fields of the sensing data, the target sensing data is obtained. The sensing data statistical aggregation method can include time-based statistics, such as statistically analyzing electricity consumption data by month.
[0041] S140. Generate query results for the target data based on the target scene data and the target perception data.
[0042] After obtaining the target scene data and target perception data, the perception data query platform can fuse the target scene data and target perception data to obtain the query results for the target data. These query results may include information such as whether the target data query was successful, whether the target data is complete, and whether any target data is missing.
[0043] If a query requires aggregation calculations on the attributes of a map object, the aggregation calculations need to be performed on the fusion results to obtain the final result. The perception data query platform can aggregate and statistically analyze target data query results by spatial object, such as statistically analyzing temperature data by floor. Aggregation statistics can also be a combination of various statistical methods; for example, first statistically analyzing electricity consumption data by room, and then arranging the electricity consumption data for each room by month.
[0044] The technical solution of this invention, upon detecting a user's query request for target data, determines a graph database query task and a time-series database query task based on the query request; determines target scene data matching the target data based on the graph database query task; obtains target sensing data from the time-series database based on the IoT device identifier in the target scene data and the time-series database query task; and generates query results for the target data based on the target scene data and the target sensing data. This technical solution solves the problem of low query efficiency for sensing data, and can improve the efficiency of sensing data query while enhancing the visibility of business object relationships.
[0045] Example 2
[0046] Figure 2 This is a flowchart of a knowledge graph-based perceptual data query method provided in Embodiment 2 of the present invention. This embodiment is a refinement based on the above embodiment. Figure 2As shown, the method includes:
[0047] S210. In response to the query request for target data, determine the graph database query task and the time series database query task according to the query request.
[0048] In this solution, the query request includes graph data object association constraints, graph data object attribute constraints, and graph data object return fields; in response to the query request for target data, the perception data query platform can parse the query request and generate graph database query tasks and time series database query tasks.
[0049] In one feasible solution, determining the graph database query task and the time-series database query task based on the query request includes:
[0050] The graph database query task is determined based on the graph data object association constraints, graph data object attribute constraints, and graph data object returned fields.
[0051] Based on the constraints of the perceived data fields, the statistical aggregation method of the perceived data, and the fields returned by the perceived data, the time series database query task is determined.
[0052] Specifically, the graph database query task may include matching scene graphs containing at least one spatial object in the graph data object association constraints, and locating target IoT devices in the scene graphs based on IoT devices in the graph data object association constraints. The time-series database query task may include querying candidate sensing data that satisfy sensing data field constraints in the sensing data of the target IoT device, aggregating and statistically analyzing the target sensing data according to the sensing data statistical aggregation method, and outputting the target sensing data based on the statistical results and the sensing data return fields.
[0053] S220. According to the graph database query task, obtain the scene map matching the target data in the graph database, and generate the target scene data according to the scene map.
[0054] Understandably, based on the graph database query task, the perception data query platform can match scene graphs containing at least one spatial object in the graph data object association constraints within the graph database. After obtaining the scene graph, the perception data query platform can locate the target IoT device in the scene graph based on the IoT devices in the graph data object association constraints, and generate target scene data based on the graph data object attribute constraints, the graph data object returned fields, the target IoT device, and the spatial objects associated with the target IoT device. The target scene data includes the spatial object identifier and the IoT device identifier matched by the target data.
[0055] The spatial object identifier can be the name of the spatial object, the spatial object's number, or a QR code, barcode, or other identification code of the spatial object. The IoT device identifier can be the name of the IoT device, the IoT device's number, or a QR code, barcode, or other identification code of the IoT device.
[0056] S230. Based on the IoT device identifier, determine the sensing data matching the target IoT device.
[0057] Based on the IoT device identifier, the sensing data query platform can determine the matching sensing data of the target IoT device in the time-series database. The target IoT device is the IoT device corresponding to the IoT device identifier.
[0058] S240. Based on the time-series database query task, determine the target sensing data from the sensing data.
[0059] Based on the time-series database query task, the sensing data query platform can query candidate sensing data that meet the sensing data field constraints in the sensing data of the target IoT device, and collect and statistically analyze the target sensing data according to the sensing data statistical aggregation method. Based on the statistical results and the sensing data return fields, one or more sets of target sensing data are obtained.
[0060] S250. The target perception data of each group is fused with the target scene data to obtain the query results of the target data.
[0061] After obtaining the target perception data for each set, the perception data query platform can fuse each set of target perception data with the target scene data to obtain the query results for the target data.
[0062] In this solution, optionally, before obtaining the scene map matching the target data from the graph database, the method further includes:
[0063] Acquire spatial object information and IoT device information of the target scene;
[0064] Based on the spatial object information and the IoT device information, a scene map of the target scene is generated and stored in a graph database;
[0065] Acquire the perception data of each IoT device in the target scene;
[0066] The association between the perceived data and the scene map is determined, and the perceived data and the association are stored in a time-series database.
[0067] For target scenes where a scene map has not been constructed, the perception data query platform can obtain spatial object information and IoT device information for the target scene. The spatial object information may include spatial object identifiers, locations, relationships with other spatial objects, and relationships with various IoT devices. The IoT device information may include IoT device identifiers, deployment locations, device types, communication methods, and relationships with spatial objects.
[0068] Based on spatial object information and IoT device information, a knowledge graph-based perception data query platform can determine the relationships between spatial objects and between spatial objects and IoT devices. Based on these relationships, the platform can generate a scene graph of the target scene and store it in a graph database.
[0069] After obtaining the scene map of the target scene, the perception data query platform can acquire the perception data of each IoT device in the target scene, generate the association relationship between the perception data and each IoT device in the scene map, and store the perception data and the association relationship in a time-series database.
[0070] In one feasible solution, the scene map includes map entities and entity relationships; the map entities include spatial objects and IoT devices; the entity relationships include the inclusion relationship between spatial objects and the attachment relationship between IoT devices and spatial objects.
[0071] Specifically, spatial objects can include physical entities such as regions, buildings, floors, rooms, roads, intersections, road sections, boilers, and production lines. Spatial objects can have containment relationships; for example, region A contains buildings a, b, and c, and building b contains 10 floors, each containing 60 rooms. Spatial objects can also have locational relationships; for example, road A is 5 km southwest of road B. IoT devices can have an attachment relationship with spatial objects, meaning IoT devices can be deployed on spatial objects to sense their state. For example, a temperature sensor can be deployed on a boiler to acquire temperature data inside and outside the boiler.
[0072] The above solution, by constructing a scene graph, can intuitively display the relationships between spatial objects and between spatial objects and IoT devices. Linking the scene graph with the sensing data from IoT devices simplifies the query logic for sensing data, enables rapid data retrieval, and improves data processing efficiency.
[0073] The technical solution of this invention, upon detecting a user's query request for target data, determines a graph database query task and a time-series database query task based on the query request; determines target scene data matching the target data based on the graph database query task; obtains target sensing data from the time-series database based on the IoT device identifier in the target scene data and the time-series database query task; and generates query results for the target data based on the target scene data and the target sensing data. This technical solution solves the problem of low query efficiency for sensing data, and can improve the efficiency of sensing data query while enhancing the visibility of business object relationships.
[0074] Example 3
[0075] Figure 3 This is a schematic diagram of the structure of a knowledge graph-based perceptual data query device provided in Embodiment 3 of the present invention. Figure 3 As shown, the device includes:
[0076] The query task determination module 310 is used to determine graph database query tasks and time series database query tasks in response to a query request for target data.
[0077] The scene data determination module 320 is used to determine the target scene data that matches the target data based on the graph database query task.
[0078] The perception data acquisition module 330 is used to acquire target perception data in the time series database based on the IoT device identifier in the target scene data and the time series database query task.
[0079] The query result generation module 340 is used to generate query results for the target data based on the target scene data and the target perception data.
[0080] In this solution, optionally, the query request includes graph data object association constraints, graph data object attribute constraints, perception data field constraints, perception data statistical aggregation method, graph data object return fields, and perception data return fields;
[0081] The query task determination module 310 is specifically used for:
[0082] The graph database query task is determined based on the graph data object association constraints, graph data object attribute constraints, and graph data object returned fields.
[0083] Based on the constraints of the perceived data fields, the statistical aggregation method of the perceived data, and the fields returned by the perceived data, the time series database query task is determined.
[0084] Based on the above solution, the scene data determination module 320 is specifically used for:
[0085] According to the graph database query task, the scene map matching the target data is obtained from the graph database, and the target scene data is generated based on the scene map; wherein, the target scene data includes the spatial object identifier and the IoT device identifier matching the target data.
[0086] In one feasible solution, the sensing data acquisition module 330 is specifically used for:
[0087] Based on the IoT device identifier, determine the sensing data matching the target IoT device;
[0088] Based on the time-series database query task, the target sensing data is determined from the sensing data.
[0089] In this embodiment, optionally, the query result generation module 340 is specifically used for:
[0090] The target perception data of each group is fused with the target scene data to obtain the query results of the target data.
[0091] Based on the above solution, optionally, the device further includes:
[0092] The information acquisition module is used to acquire spatial object information and IoT device information of the target scene before determining the graph database query task and the time series database query task according to the query request.
[0093] The scene map generation module is used to generate a scene map of the target scene based on the spatial object information and the IoT device information, and store the scene map in a graph database;
[0094] The perception data acquisition module is used to acquire perception data from various IoT devices in the target scene;
[0095] The sensing data storage module is used to determine the association between the sensing data and the scene map, and to store the sensing data and the association in a time-series database.
[0096] In a preferred embodiment, the scene map includes map entities and entity relationships; the map entities include spatial objects and IoT devices; the entity relationships include the inclusion relationship between spatial objects and the attachment relationship between IoT devices and spatial objects.
[0097] The knowledge graph-based perceptual data query device provided in this embodiment of the invention can execute the knowledge graph-based perceptual data query method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0098] Example 4
[0099] Figure 4 A schematic diagram of an electronic device 410 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.
[0100] like Figure 4 As shown, the electronic device 410 includes at least one processor 411 and a memory, such as a read-only memory (ROM) 412 or a random access memory (RAM) 413, communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the ROM 412 or loaded from storage unit 418 into the RAM 413. The RAM 413 may also store various programs and data required for the operation of the electronic device 410. The processor 411, ROM 412, and RAM 413 are interconnected via a bus 414. An input / output (I / O) interface 415 is also connected to the bus 414.
[0101] Multiple components in electronic device 410 are connected to I / O interface 415, including: input unit 416, such as keyboard, mouse, etc.; output unit 417, such as various types of displays, speakers, etc.; storage unit 418, such as disk, optical disk, etc.; and communication unit 419, such as network card, modem, wireless transceiver, etc. Communication unit 419 allows electronic device 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.
[0102] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as knowledge graph-based perceptual data query methods.
[0103] In some embodiments, the knowledge graph-based perceptual data query method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 410 via ROM 412 and / or communication unit 419. When the computer program is loaded into RAM 413 and executed by processor 411, one or more steps of the knowledge graph-based perceptual data query method described above may be performed. Alternatively, in other embodiments, processor 411 may be configured to execute the knowledge graph-based perceptual data query method by any other suitable means (e.g., by means of firmware).
[0104] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), system-on-a-chip (SoCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transferring data and instructions to the storage system, the at least one input device, and the at least one output device.
[0105] Computer programs used to implement the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable knowledge graph-based perceptual data query device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs can be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.
[0106] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0107] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).
[0108] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.
[0109] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.
[0110] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.
[0111] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.
Claims
1. A knowledge graph-based perceptual data query method, characterized in that, The method includes: In response to a query request for target data, the query request includes graph data object association constraints, graph data object attribute constraints, perception data field constraints, perception data statistical aggregation method, graph data object return fields, and perception data return fields; Based on the association constraints of the graph data objects, the attribute constraints of the graph data objects, and the fields returned by the graph data objects, determine the graph database query task; based on the field constraints of the perception data, the statistical aggregation method of the perception data, and the fields returned by the perception data, determine the time series database query task. Based on the graph database query task, at least one spatial object in the graph data object association constraints is determined. A scene graph containing the spatial object is matched in the graph database. Based on the IoT devices in the graph data object association constraints, the target IoT device is located in the scene graph. Target scene data is generated based on the graph data object attribute constraints, the graph data object return fields, the target IoT device, and the spatial objects associated with the target IoT device. The target scene data includes the spatial object identifier and the IoT device identifier matched by the target data. Based on the IoT device identifier, determine the sensing data matching the target IoT device, where the target IoT device is the IoT device corresponding to the IoT device identifier; based on the time-series database query task, query candidate sensing data that meet the sensing data field constraints in the sensing data of the target IoT device, and collect and statistically analyze the candidate sensing data according to the sensing data statistical aggregation method, and obtain the target sensing data based on the statistical results and the sensing data return fields; Based on the target scene data and the target perception data, generate query results for the target data.
2. The method according to claim 1, characterized in that, The step of generating query results for target data based on the target scene data and the target perception data includes: The target perception data of each group is fused with the target scene data to obtain the query results of the target data.
3. The method according to claim 1, characterized in that, Before determining the graph database query task and the time-series database query task based on the query request, the method further includes: Acquire spatial object information and IoT device information of the target scene; Based on the spatial object information and the IoT device information, a scene map of the target scene is generated and stored in a graph database; Acquire the perception data of each IoT device in the target scene; The association between the perceived data and the scene map is determined, and the perceived data and the association are stored in a time-series database.
4. The method according to claim 3, characterized in that, The scene map includes map entities and entity relationships; the map entities include spatial objects and IoT devices; the entity relationships include, but are not limited to, the inclusion relationship between spatial objects and the attachment relationship between IoT devices and spatial objects.
5. A knowledge graph-based sensory data query device, characterized in that, include: The query task determination module is used to respond to query requests for target data. The query request includes graph data object association constraints, graph data object attribute constraints, perception data field constraints, perception data statistical aggregation methods, graph data object return fields, and perception data return fields. Based on the graph data object association constraints, graph data object attribute constraints, and graph data object return fields, the module determines a graph database query task. Based on the perception data field constraints, perception data statistical aggregation methods, and perception data return fields, the module determines a time series database query task. The scene data determination module is used to determine at least one spatial object in the graph data object association constraints according to the graph database query task, match the scene graph containing the spatial object in the graph database, locate the target IoT device in the scene graph according to the IoT device in the graph data object association constraints, and generate target scene data according to the graph data object attribute constraints, the graph data object returned fields, the target IoT device, and the spatial objects associated with the target IoT device; wherein, the target scene data includes the spatial object identifier and the IoT device identifier matched by the target data; The sensing data acquisition module is used to determine the sensing data matching the target IoT device based on the IoT device identifier, wherein the target IoT device is the IoT device corresponding to the IoT device identifier; according to the time-series database query task, it queries the sensing data of the target IoT device to find candidate sensing data that meets the sensing data field constraints, and collects and statistically analyzes the candidate sensing data according to the sensing data statistical aggregation method, and obtains the target sensing data based on the statistical results and the sensing data return fields; The query result generation module is used to generate query results for the target data based on the target scene data and the target perception data.
6. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the knowledge graph-based perceptual data query method according to any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the knowledge graph-based perceptual data query method according to any one of claims 1-4.