A data query method and device for a power heterogeneous multi-machine cooperative inspection scene, a terminal device, and a storage medium

CN122777585APending Publication Date: 2026-09-18ELECTRIC POWER RES INST OF GUANGDONG POWER GRID CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610989987.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-03
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

[0004]本发明实施例提供一种面向电力异构多机协同巡检场景的数据查询方法、装置、终端设备及存储介质,能有效解决现有技术多设备多数据查询时效率低且精确度低的问题

Benefits of technology

本发明提供一种面向电力异构多机协同巡检场景的数据查询方法、装置、终端设备及存储介质,其方法能够通过支持用户以自然语言查询语句作为输入,无需用户编写专业的查询语句,让非专业用户也能直接开展多源业务数据查询,同时省去了专业用户编写复杂查询语句的繁琐过程,大幅降低了查询操作的门槛与时间成本;通过对自然语言查询语句进行语义理解得到语义实体,并基于预设电力设备知识库中的协同语义模式库关联各类语义实体构建协同关系图谱,能够清晰地梳理异构设备间的复杂数据关联关系,理清跨专业子系统的关联逻辑,有效降低了跨专业子系统关联查询的复杂度;基于预设电力设备知识库中的设备能力矩阵,结合协同关系图谱匹配对应业务设备、重构时空约束条件并整合生成协同查询条件集合,将梳理后的复杂关联关系转化为结构化的查询条件,为后续查询语句生成奠定了精准的结构化基础,无需人工梳理复杂的查询条件;通过将协同查询条件集合映射至电力业务数据库的物理表结构,关联各业务设备的查询路径并生成查询接口,实现了跨专业子系统查询路径的自动化梳理与构建,解决了跨专业子系统关联查询的核心难题;最终基于协同查询条件集合与查询接口融合处理生成SQL查询语句,由系统自动完成复杂SQL查询语句的生成,解决了传统方式下跨专业子系统关联查询语句编写难度大的问题,实现了从自然语言输入到精准查询结果输出的全流程自动化,大幅提升了电力异构多机协同巡检场景下多源业务数据的查询效率与精准度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122777585A_ABST
    Figure CN122777585A_ABST
Patent Text Reader

Abstract

The application discloses a data query method and device for power heterogeneous multi-machine cooperative inspection scene, a terminal equipment and a storage medium, and belongs to the technical field of natural language processing. The method comprises the following steps: acquiring a natural language query sentence input by a user and identifying semantic entities; associating power inspection business entities, relationship entities and space-time entities in the semantic entities according to a preset cooperative semantic mode library, and constructing a cooperative relationship graph; matching business equipment based on a preset equipment capability matrix, reconstructing space-time constraint conditions based on the cooperative relationship graph, integrating a cooperative query condition set, mapping to a physical table structure of a preset power business database, associating query paths of each business equipment to generate a query interface, fusing the query interface with the cooperative query condition set to generate an SQL query statement, and sending the SQL query statement to the power business database to obtain cooperative inspection data query results. Through implementation of the application, the problem of low query efficiency and accuracy in the prior art can be solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of natural language processing technology, and in particular to a data query method, apparatus, terminal equipment, and storage medium for a multi-machine collaborative inspection scenario in the power industry. Background Technology

[0002] With the deepening of smart grid construction, power equipment inspection is shifting from traditional manual inspection to integrated heterogeneous multi-machine collaborative inspection. This new inspection model integrates various heterogeneous devices such as drones, inspection robots, fixed cameras, and handheld terminal devices, forming a collaborative operation network. Correspondingly, the business database involved has become extremely complex, including not only traditional equipment ledgers and site information, but also heterogeneous equipment hangar information, such as information on different types of equipment like drones, robots, and fixed monitoring equipment; multi-source inspection records, such as inspection data collected from different equipment types; and collaborative task plans, such as the allocation and scheduling information for complex inspection tasks executed collaboratively by multiple devices.

[0003] Currently, querying heterogeneous multi-machine collaborative inspection data faces significant challenges. Traditional query methods have increased complexity, the data relationships between heterogeneous devices are complex, requiring queries across multiple professional subsystems, and the writing of query statements is difficult. Non-professional users cannot directly and accurately query multi-source business data, and even professional users need to spend a lot of time querying using query statements. Summary of the Invention

[0004] This invention provides a data query method, device, terminal equipment, and storage medium for collaborative inspection scenarios of heterogeneous power systems with multiple machines, which can effectively solve the problems of low efficiency and low accuracy in querying multiple devices and multiple data in the prior art.

[0005] An embodiment of the present invention provides a data query method for a collaborative inspection scenario of heterogeneous power systems with multiple generators, including: The system obtains a natural language query statement input by the user, performs semantic understanding on the natural language query statement, and obtains semantic entities; wherein, the semantic entities include power inspection business entities, relational entities, and spatiotemporal entities; Based on the collaborative semantic pattern library in the pre-set power equipment knowledge base, the power inspection business entities, relational entities, and spatiotemporal entities are associated to construct a collaborative relationship graph; Based on the equipment capability matrix in the preset power equipment knowledge base, the corresponding business equipment is matched according to the collaborative relationship graph and the spatiotemporal constraints are reconstructed to generate a set of collaborative query conditions. The collaborative query condition set is mapped to the physical table structure of the preset power business database, the query paths of each business device are associated, and a query interface is generated. The SQL query statement is generated by merging the collaborative query condition set and the query interface. The SQL query statement is sent to the power business database for querying, and the collaborative inspection data query results are obtained.

[0006] Furthermore, semantic understanding is performed on the natural language query statement to obtain semantic entities, including: The natural language query statement is segmented into words, and the omitted words in the segmented natural language query statement are converted into standard terms to obtain a structured statement; The structured statement is subjected to entity recognition to obtain power inspection business entities, relational entities, and spatiotemporal entities; The power inspection business entities include: site information, equipment type, and defect type; the relationship entities include: collaboration relationship, task allocation relationship, and demand relationship; and the spatiotemporal entities include: collaboration time window and collaboration spatial range.

[0007] Furthermore, based on the collaborative semantic pattern library in the pre-set power equipment knowledge base, the power inspection business entities, relational entities, and spatiotemporal entities are associated to construct a collaborative relationship graph, including: Based on the collaborative inspection semantic patterns in the collaborative semantic pattern library, the business entities, relational entities, and spatiotemporal entities of power inspection are matched to construct semantic association rules between the entities. Among them, the collaborative inspection semantic patterns include collaborative relationship patterns corresponding to collaborative relationships, task allocation patterns corresponding to task allocation relationships, complementary patterns corresponding to demand relationships, and spatiotemporal collaborative patterns corresponding to spatiotemporal entities. Based on the semantic association rules, the entity relationships of power inspection business entities, relational entities and spatiotemporal entities are connected to determine the matching relationship of each entity in the collaborative inspection scenario. Based on the matching relationships of each entity in the collaborative inspection scenario, a collaborative relationship graph is constructed.

[0008] Furthermore, based on the equipment capability matrix in the preset power equipment knowledge base, and according to the corresponding business equipment matched by the collaborative relationship graph and the reconstructed spatiotemporal constraints, a collaborative query condition set is generated, including: Based on the device types and demand relationships in the collaborative relationship graph, and combined with the device capability matrix, a matching is performed to calculate the semantic similarity score, rule constraint score, and context adaptation score, respectively. The comprehensive matching score is then calculated by weighting the semantic similarity score, rule constraint score, and context adaptation score. Business devices whose comprehensive matching score is greater than or equal to the preset reliability threshold are designated as target devices; Based on the collaborative relationship map, the collaborative time window and collaborative spatial range are analyzed and reconstructed, and the fuzzy time description in the collaborative time window is converted into a time range, and the fuzzy geographical name in the collaborative spatial range is converted into spatial coordinates. The temporal overlap is calculated based on the time range, the spatial proximity is calculated based on the spatial coordinates, and the spatiotemporal correlation is calculated by weighting the temporal overlap and the spatial proximity. Based on the spatiotemporal correlation, the corresponding spatiotemporal constraints are determined. Based on the target device and the spatiotemporal constraints, a collaborative inspection task chain is generated. The target device, the spatiotemporal constraints, and the collaborative inspection task chain are then integrated to generate a collaborative query condition set.

[0009] Furthermore, the collaborative query condition set is mapped to the physical table structure of a preset power business database, the query paths of each business device are associated, and a query interface is generated, including: The target devices in the collaborative query condition set are mapped and aligned with the physical table structure of the preset power business database to determine the physical tables to be associated and the corresponding associated fields of each physical table. Based on the spatiotemporal constraints and collaborative inspection task chain in the collaborative query condition set, the primary association path for representing the association of business devices and the secondary association path for representing the spatiotemporal association are mined between each physical table. Based on the evaluation of the computer resource consumption for accessing the power business database according to the main association path and the secondary association path, the association path with the lowest computer resource consumption is selected as the optimal query path. The physical table to be associated, the corresponding associated fields, and the optimal query path are integrated to determine the connection order, and a query interface is generated based on the connection order.

[0010] Further, based on the collaborative query condition set and the query interface, a fusion process is performed to generate an SQL query statement, including: Based on the optimal query path, the physical table to be associated, and the corresponding associated fields in the query interface, the system filters according to the spatiotemporal constraints in the collaborative query condition set to generate a single-device SQL fragment corresponding to the target device. Based on the connection order in the query interface, the SQL fragments of each individual device are associated and concatenated to generate a collaborative SQL fragment; Based on the collaborative inspection task chain in the collaborative query condition set, the collaborative SQL fragments are aggregated to generate aggregated SQL fragments. The single-device SQL fragment, the collaborative SQL fragment, and the aggregated SQL fragment are merged and spliced ​​together to generate an SQL query statement.

[0011] Furthermore, the SQL query statement is sent to the power business database for querying, and the collaborative inspection data query results are obtained, including: The SQL query statement is sent to the power business database for execution, and the heterogeneous inspection data returned by the power business database is received. The heterogeneous inspection data includes detection data of different target equipment, task execution data and spatiotemporal correlation data. The heterogeneous inspection data is processed to eliminate differences in data format and field naming between different physical tables; the standardized heterogeneous inspection data is then fused, and the spatiotemporal registration and association integration of the data are completed according to the collaborative inspection task chain to generate collaborative inspection data query results.

[0012] As an improvement to the above solution, another embodiment of the present invention provides a data query device for a collaborative inspection scenario of heterogeneous power systems with multiple machines, comprising: The semantic entity recognition module is used to acquire the natural language query statement input by the user, perform semantic understanding on the natural language query statement, and obtain semantic entities; wherein, the semantic entities include power inspection business entities, relational entities, and spatiotemporal entities; The collaborative relationship graph construction module is used to associate power inspection business entities, relational entities, and spatiotemporal entities with the collaborative semantic pattern library in the preset power equipment knowledge base to construct a collaborative relationship graph; The collaborative query condition generation module is used to generate a set of collaborative query conditions by matching the corresponding business equipment and reconstructing the spatiotemporal constraints based on the equipment capability matrix in the preset power equipment knowledge base, according to the collaborative relationship graph; The query interface generation module is used to map the collaborative query condition set to the physical table structure of the preset power business database, associate the query paths of each business device, and generate a query interface. The SQL query statement generation module is used to perform fusion processing based on the collaborative query condition set and the query interface to generate an SQL query statement. The data query module is used to send the SQL query statement to the power business database for querying and to obtain the collaborative inspection data query results.

[0013] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a data query method for a heterogeneous multi-machine collaborative inspection scenario in the power industry as described in the above embodiments.

[0014] Another embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the data query method for a heterogeneous multi-machine collaborative inspection scenario in the power industry described in the above embodiment.

[0015] By implementing this invention, at least the following beneficial effects are achieved: This invention provides a data query method, device, terminal equipment, and storage medium for collaborative inspection scenarios of heterogeneous power equipment. The method allows users to input natural language queries, eliminating the need for users to write complex queries, thus enabling non-professional users to directly query multi-source business data. It also eliminates the tedious process of professional users writing complex queries, significantly reducing the threshold and time cost of query operations. By semantically understanding the natural language queries to obtain semantic entities, and constructing a collaborative relationship graph based on a collaborative semantic pattern library in a pre-set power equipment knowledge base, it can clearly clarify the complex data relationships between heterogeneous devices, understand the association logic of cross-professional subsystems, and effectively reduce the complexity of cross-professional subsystem association queries. Based on the equipment capability matrix in the pre-set power equipment knowledge base, and combined with the collaborative relationship graph, it matches corresponding business equipment and reconstructs spatiotemporal constraints. The system integrates and generates a set of collaborative query conditions, transforming complex relationships into structured query conditions. This lays a precise, structured foundation for subsequent query statement generation, eliminating the need for manual processing of complex query conditions. By mapping the set of collaborative query conditions to the physical table structure of the power business database, the system associates the query paths of various business devices and generates query interfaces, achieving automated sorting and construction of query paths across professional subsystems. This solves the core challenge of cross-professional subsystem relational queries. Finally, based on the fusion processing of the collaborative query condition set and query interfaces, the system generates SQL query statements. The system automatically generates complex SQL query statements, solving the problem of the difficulty in writing cross-professional subsystem relational query statements in the traditional approach. This achieves full-process automation from natural language input to accurate query result output, significantly improving the query efficiency and accuracy of multi-source business data in heterogeneous multi-machine collaborative inspection scenarios in the power industry. Attached Figure Description

[0016] Figure 1 This is a flowchart illustrating a data query method for a collaborative inspection scenario of heterogeneous power systems provided by an embodiment of the present invention; Figure 2 This is a schematic diagram of the structure of a data query device for a collaborative inspection scenario of heterogeneous power systems provided in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. 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 are within the scope of protection of the present invention.

[0018] See Figure 1 To address the issues of low efficiency and low accuracy in multi-device, multi-data queries in existing technologies, an embodiment of the present invention provides a flowchart illustrating a data query method for a multi-machine collaborative inspection scenario in a heterogeneous power grid, comprising: S1. Obtain the natural language query statement input by the user, perform semantic understanding on the natural language query statement, and obtain semantic entities; wherein, the semantic entities include power inspection business entities, relational entities, and spatiotemporal entities; Specifically, natural language queries refer to user-inputted power inspection data queries in everyday, colloquial, and non-standardized language, without adhering to professional query syntax or SQL rules. For example, a query might be for insulator defects discovered last week during a collaborative inspection of a 500kV substation by drone A and robot B. Semantic entities refer to core elements with independent semantics parsed from natural language queries, categorized into three types: power inspection business entities, relational entities, and spatiotemporal entities. Power inspection business entities are the core business objects in heterogeneous multi-machine collaborative inspection scenarios, serving as the foundation for inspection data queries. Relational entities represent the interactions and relationships between power inspection business entities. Spatiotemporal entities represent the temporal and spatial scope of inspection operations, representing important constraints on power inspection data.

[0019] In a schematic manner, the system acquires a natural language query statement input by the user, performs semantic understanding on the query statement, and obtains semantic entities. The core is to receive the user's natural language query request and convert the ambiguous and non-standardized natural language into structured semantic entities, achieving a preliminary analysis of the query intent and laying the foundation for subsequent collaborative relationship construction. First, the system receives the user's natural language query statement through an interactive interface. Then, NLP (Natural Language Processing) technology is used to perform semantic understanding processing, including preprocessing operations such as text normalization, word segmentation, and domain terminology standardization. Next, multi-granularity entity recognition technology is used to extract core elements with independent semantics from the preprocessed statement, i.e., semantic entities. These semantic entities are then classified into three categories based on business attributes, relational attributes, and spatiotemporal attributes: power inspection business entities, relational entities, and spatiotemporal entities.

[0020] Preferably, semantic understanding is performed on the natural language query statement to obtain semantic entities, including: The natural language query statement is segmented into words, and the omitted words in the segmented natural language query statement are converted into standard terms to obtain a structured statement; The structured statement is subjected to entity recognition to obtain power inspection business entities, relational entities, and spatiotemporal entities; The power inspection business entities include: site information, equipment type, and defect type; the relationship entities include: collaboration relationship, task allocation relationship, and demand relationship; and the spatiotemporal entities include: collaboration time window and collaboration spatial range.

[0021] Specifically, standard terminology refers to the standardized terminology in the field of heterogeneous multi-machine collaborative inspection of power systems. It serves as the basis for eliminating ambiguity in natural language and achieving unified semantic analysis, such as unifying thermal imaging detection as infrared detection. Site information refers to the location and related elements of the power inspection site, such as a 500kV substation, a G-bureau maintenance station, or the main transformer area. Equipment type refers to the specific type of heterogeneous inspection equipment, such as drone A, wheeled inspection robot B, or a fixed infrared camera. Defect type refers to the type of defect in the power equipment, such as insulator defects, excessive temperature, or abnormal partial discharge. Collaboration relationship refers to the association between multiple inspection devices, such as A and B collaborating, A cooperating with B, or A and B conducting joint inspections. Task allocation relationship refers to the allocation and execution relationship between inspection equipment and inspection tasks, such as equipment A being responsible for inspecting area X, or equipment B performing defect detection tasks. Demand relationship refers to the relationship between query demands and equipment capabilities, such as equipment with infrared detection capabilities or drones capable of nighttime operation. The collaborative time window refers to the element that characterizes the time range in which collaborative inspection operations occur. It can be divided into fuzzy time, such as last week or recently, and specific time, such as 2025-12-30 08:00-17:00. The collaborative spatial range refers to the element that characterizes the spatial range in which collaborative inspection operations occur. It can be divided into fuzzy geographical names, such as the main variable area, and specific spatial coordinates.

[0022] In a preferred embodiment of the present invention, the natural language query statement is first segmented using an NLP word segmentation algorithm optimized for the power industry, and the segmented word units are separated into independent lexical units. Then, the segmented lexical units are parsed to identify omitted words, colloquial expressions, and synonyms, and are converted into standard terms according to a preset terminology dictionary for the power inspection field. Finally, the converted standard terms are reorganized according to the semantic logic of the original statement to obtain a structured statement without ambiguous or omitted expressions. Next, a sequence labeling model based on a pre-trained language model (BERT) + bidirectional long short-term memory network (BiLSTM) + conditional random field (CRF) is used to perform entity recognition on structured sentences. The specific process is as follows: First, the structured sentences are input into the model for NLP preprocessing, including text normalization and adding special tags; then, the BERT encoder encodes the words, extracts contextual features and integrates power domain knowledge to obtain the encoded token sequence; then, the BiLSTM layer performs bidirectional sequence modeling on the token sequence to capture long-distance dependencies and temporal features; then, the CRF decoder performs label transfer learning and global optimal decoding, combined with the constraints of power inspection entities, to output the BIOES label sequence; then, the label sequence is post-processed, including entity boundary merging, type consistency verification, and confidence calculation, to obtain a structured entity list; finally, according to the semantic attributes of the entities, the entities in the structured entity list are divided into three categories: power inspection business entities, relational entities, and spatiotemporal entities, completing entity recognition.

[0023] By implementing this embodiment, word segmentation and standard terminology conversion eliminate the ambiguity, colloquialism, and omissions in natural language queries, transforming non-standardized natural language into standardized structured statements, providing high-quality input for subsequent entity recognition. Employing a sequence labeling model and integrating power sector knowledge, accurate identification of core semantic entities in collaborative inspection scenarios is achieved, resolving the poor adaptability of traditional entity recognition methods in the power sector. Considering the scenario characteristics of heterogeneous multi-machine collaborative inspection in the power industry, semantic entities are divided into three categories and specific sub-elements are defined, making the semantic parsing results more aligned with the business needs of power inspection and facilitating the subsequent construction of collaborative relationships between entities. The output structured and categorized semantic entities form the core foundation for subsequently constructing entity association rules, connecting entity relationships, and building a collaborative relationship graph.

[0024] S2. Based on the collaborative semantic pattern library in the preset power equipment knowledge base, associate the power inspection business entities, relational entities, and spatiotemporal entities to construct a collaborative relationship graph. Specifically, the pre-built power equipment knowledge base refers to a pre-constructed set of domain knowledge adapted to the scenario of collaborative inspection of heterogeneous power equipment, including a collaborative semantic pattern library and a device capability matrix, which serves as the knowledge foundation for semantic parsing, device matching, and relationship construction. The collaborative semantic pattern library refers to a sub-library within the pre-built power equipment knowledge base that stores typical semantic patterns for collaborative inspection of heterogeneous power equipment, serving as the basis for parsing collaborative relationships and constructing entity association rules. The collaborative relationship graph refers to a structured graph formed by connecting power inspection business entities, relational entities, and spatiotemporal entities according to semantic association rules, intuitively representing the association logic and query intent of each entity in the collaborative inspection scenario.

[0025] Schematic, based on the collaborative semantic pattern library in the pre-defined power equipment knowledge base, power inspection business entities, relational entities, and spatiotemporal entities are associated to construct a collaborative relationship graph. The core is to associate discrete semantic entities based on collaborative semantic knowledge in the power inspection field, forming a structured collaborative relationship graph that accurately represents the collaborative characteristics in the user's query intent, solving the problem that existing technologies cannot parse collaborative inspection semantics. First, the collaborative semantic pattern library in the pre-defined power equipment knowledge base is retrieved. Based on the predefined typical semantic patterns for collaborative inspection of heterogeneous power equipment in the library, various semantic entities are matched, and semantic association rules between entities are constructed. Then, the semantic entities are connected according to the semantic association rules to determine the matching relationship of each entity in the collaborative inspection scenario. Finally, the entities with completed relationship connections are structurally organized to form a collaborative relationship graph, intuitively presenting the association logic of each entity.

[0026] Preferably, based on the collaborative semantic pattern library in the preset power equipment knowledge base, the power inspection business entities, relational entities, and spatiotemporal entities are associated to construct a collaborative relationship graph, including: S21. Based on the collaborative inspection semantic patterns in the collaborative semantic pattern library, match the power inspection business entities, relational entities, and spatiotemporal entities, and construct semantic association rules between the entities; among them, the collaborative inspection semantic patterns include collaborative relationship patterns corresponding to collaborative relationships, task allocation patterns corresponding to task allocation relationships, complementary patterns corresponding to demand relationships, and spatiotemporal collaborative patterns corresponding to spatiotemporal entities. S22. Based on the semantic association rules, connect the relationships between the power inspection business entities, relational entities, and spatiotemporal entities to determine the matching relationship of each entity in the collaborative inspection scenario. S23. Construct a collaborative relationship graph based on the matching relationships of each entity in the collaborative inspection scenario.

[0027] Specifically, collaborative inspection semantic patterns refer to typical semantic association patterns in the scenario of collaborative inspection of heterogeneous power equipment, which are preset in the collaborative semantic pattern library. They serve as templates representing the typical collaborative association logic between semantic entities and are divided into four categories: collaborative relationship patterns, task allocation patterns, complementary patterns, and spatiotemporal collaborative patterns. Collaborative relationship patterns represent typical semantic patterns that characterize collaborative operations between multiple inspection devices, such as A and B collaborating, or A cooperating with B during inspection. Task allocation patterns represent typical semantic patterns that characterize the allocation and execution relationship between inspection devices and inspection tasks, such as A being responsible for inspecting area X, or A performing defect detection tasks. Complementary patterns represent typical semantic patterns that characterize the complementary matching between equipment capabilities and query requirements, such as A having B capabilities, or needing A having B capabilities; these are the semantic basis for achieving matching between equipment capabilities and requirements. Spatiotemporal collaborative patterns represent typical semantic patterns that characterize the association between inspection business entities and spatiotemporal entities, such as A inspecting area L at time T, or A and B at the same time. Semantic association rules refer to the rules that characterize the specific semantic association logic between semantic entities after matching each semantic entity according to the semantic pattern of collaborative inspection. They serve as the basis for connecting discrete semantic entities. Matching relationships refer to the specific association relationships formed in the collaborative inspection scenario after semantic entities are connected by relationships. These include subordinate relationships, collaborative relationships, task allocation relationships, capability complementarity relationships, and spatiotemporal constraint relationships.

[0028] Indicatively, the process first retrieves four types of collaborative inspection semantic patterns from the collaborative semantic pattern library. The identified power inspection business entities, relational entities, and spatiotemporal entities are then matched with each semantic pattern to determine the semantic pattern type corresponding to the current query intent. Subsequently, based on the matched semantic pattern type and the specific semantic entities in this query, semantic association rules tailored to the query intent are formulated, clarifying the association logic, dimensions, and constraints between entities. The extracted semantic entities are then precisely matched with the preset collaborative inspection semantic patterns, transforming general semantic patterns into specific semantic association rules that fit the current query intent, providing a concrete basis for connecting relationships between entities.

[0029] Then, using relational entities as the core connecting link, and following semantic association rules, power inspection business entities are associated and bound with spatiotemporal entities. For example, equipment type, site information, defect type, and collaborative time window and collaborative spatial range are bound through collaborative relationships. During the binding process, the specific matching relationships between each entity are identified and determined, including subordinate relationships, such as insulator defects belonging to a 500kV substation; collaborative relationships, such as drone A collaborating with robot B; and spatiotemporal constraint relationships, such as drone A and robot B performing inspections at a 500kV substation last week. By associating and binding these three discrete semantic entities, the entities form an organic whole, clarifying the specific matching relationships of each entity in this collaborative inspection query scenario.

[0030] Next, a graph-structured data model is used to construct a collaborative relationship graph. Semantic entities are treated as nodes, and the matching relationships between entities are treated as edges. Nodes and edges are structurally encoded, labeling the entity type of nodes and the relationship type of edges. Simultaneously, the graph undergoes validity verification to ensure that the connection logic of each node conforms to the business rules of power collaborative inspection. Finally, an intuitive and structured collaborative relationship graph is generated. This graph-based structured organization and presentation visually represents the collaborative inspection intent of this query and the association logic of each entity.

[0031] In a preferred embodiment of the present invention, four semantic patterns are retrieved from the collaborative semantic pattern library. The identified semantic entities—drone A, robot B, 500kV substation, insulator defect, collaboration, and last week—are matched with the semantic patterns to determine that the semantic pattern corresponding to this query is a collaborative relationship pattern and a spatiotemporal collaborative pattern. Combined with specific semantic entities, semantic association rules are constructed: Drone A and Robot B, through a collaborative relationship, perform inspection tasks within last week (collaborative time window) and the 500kV substation (collaborative spatial range), with the inspection object being the insulator defect of the 500kV substation. Using the collaborative relationship entity as the core, entity relationships are connected according to the semantic association rules: the equipment type (drone A, robot B) and site information (500kV substation), and defect type (insulator defect) are bound through a collaborative relationship, while simultaneously binding the spatiotemporal entities (last week, 500kV substation). It is determined that each drone A and robot B has a collaborative relationship, the insulator defect belongs to the 500kV substation, and drone A, robot B, last week, and the 500kV substation have a spatiotemporal constraint relationship. Using a graph-structured data model, semantic entities are treated as nodes and matching relationships as edges to construct a collaborative relationship graph, which intuitively presents the query intent of drone A and robot B to collaboratively inspect insulator defects at a 500kV substation next week.

[0032] S3. Based on the equipment capability matrix in the preset power equipment knowledge base, match the corresponding business equipment and reconstruct the spatiotemporal constraints according to the collaborative relationship graph, and integrate to generate a set of collaborative query conditions. Specifically, the equipment capability matrix refers to a matrix-style data set in a pre-defined power equipment knowledge base that describes the detection capabilities, operating range, load type, operating status, historical performance, and other characteristics of each type of heterogeneous inspection equipment. It is the core basis for achieving accurate matching between equipment capabilities and query requirements. The collaborative query condition set refers to a structured and executable set of query conditions obtained by integrating equipment matching, spatiotemporal constraint reconstruction, and task chain generation based on a collaborative relationship graph. It includes core information such as target equipment, spatiotemporal constraints, and collaborative inspection task chains, and serves as a bridge connecting semantic understanding and physical database queries.

[0033] Schematic, based on the equipment capability matrix in the preset power equipment knowledge base, the corresponding business equipment is matched according to the collaborative relationship graph and the spatiotemporal constraints are reconstructed to integrate and generate a set of collaborative query conditions. The core is to transform the semantic information in the collaborative relationship graph into executable structured query conditions. The equipment capability matrix realizes the accurate matching of equipment and demand, the spatiotemporal constraint reconstruction realizes the standardized constraints of time and space dimensions, and the task chain generation realizes the logical association of collaborative inspection business, thus solving the problem that the existing technology cannot handle complex collaborative query conditions. First, the equipment capability matrix in the preset power equipment knowledge base is retrieved. Multi-dimensional matching is performed based on equipment types and demand relationships in the collaborative relationship graph to calculate the matching score for each device and filter out target devices. Then, the spatiotemporal entities in the collaborative relationship graph are parsed and reconstructed, converting fuzzy time and space descriptions into standardized time ranges and spatial coordinates. The spatiotemporal correlation is calculated, and structured spatiotemporal constraints are determined. Next, based on the target devices and spatiotemporal constraints, the historical collaborative inspection task chain is reconstructed, establishing a task-equipment-data association mapping relationship. Finally, core information such as target device information, spatiotemporal constraints, and collaborative inspection task chains are integrated to generate a structured set of collaborative query conditions.

[0034] Preferably, based on the equipment capability matrix in the preset power equipment knowledge base, and according to the corresponding business equipment matched by the collaborative relationship graph and the reconstructed spatiotemporal constraints, a collaborative query condition set is generated, including: S31. Based on the device types and demand relationships in the collaborative relationship graph, and combined with the device capability matrix, a matching is performed to calculate the semantic similarity score, rule constraint score, and context adaptation score respectively. The comprehensive matching score is then calculated by weighting the semantic similarity score, rule constraint score, and context adaptation score. S32. The business devices whose comprehensive matching score is greater than or equal to the preset confidence threshold are taken as target devices; S33. Based on the collaborative relationship graph, the collaborative time window and collaborative spatial range are parsed and reconstructed, and the fuzzy time description in the collaborative time window is converted into a time range, and the fuzzy geographical name in the collaborative spatial range is converted into spatial coordinates. S34. Calculate the time overlap degree based on the time range, calculate the spatial proximity degree based on the spatial coordinates, and calculate the spatiotemporal correlation degree by weighting the time overlap degree and the spatial proximity degree. S35. Determine the corresponding spatiotemporal constraints based on the spatiotemporal correlation degree, generate a collaborative inspection task chain based on the target device and the spatiotemporal constraints, and integrate the target device, the spatiotemporal constraints, and the collaborative inspection task chain to generate a collaborative query condition set.

[0035] Specifically, the semantic similarity score refers to the matching score obtained by encoding the device capability description and the capability description in the query requirement into semantic vectors and then calculating the cosine similarity. It represents the degree of semantic fit between the device capability and the query requirement, with a value range of 0-1; the higher the score, the higher the fit. The rule constraint score refers to the matching score of the device capability in meeting the hard constraints in the query requirement, representing the degree to which the device capability meets the hard constraints. It also ranges from 0-1, with higher scores indicating higher satisfaction. The context adaptation score refers to the matching score between the device's current state, environmental adaptability, historical performance, and other contextual information and the query requirement, representing the degree to which the device adapts to the query requirement in the actual scenario. It also ranges from 0-1, with higher scores indicating higher adaptation. The comprehensive matching score is the comprehensive matching score obtained by weighting the semantic similarity score, rule constraint score, and context adaptation score. It is the core basis for selecting target devices, with a value range of 0-1. The pre-set reliability threshold refers to the pre-set critical value of the comprehensive matching score for selecting target devices. It is the standard for judging whether the device is suitable for the query requirement and can be set as a single threshold or multiple levels of thresholds according to business needs. Temporal overlap refers to the degree of overlap between the target equipment's operating time range and the collaborative inspection time range, representing the matching degree between the equipment's operating time and the collaborative inspection time, with a value range of 0-1. Spatial proximity refers to the degree of closeness between the target equipment's operating location and the collaborative inspection's spatial range, representing the matching degree between the equipment's operating location and the collaborative inspection space, with a value range of 0-1. Spatiotemporal correlation refers to the comprehensive score obtained by weighting temporal overlap and spatial proximity, representing the spatiotemporal matching degree between the target equipment and the collaborative inspection scenario, and is the core basis for determining spatiotemporal constraints, with a value range of 0-1. Collaborative inspection task chain refers to the historical collaborative inspection task chain reconstructed from the collaborative task database based on the target equipment and spatiotemporal constraints, including task ID, task name, participating equipment, task time, task space, and data mapping relationship.

[0036] In a preferred embodiment of the present invention, the capability requirements and equipment capability descriptions are encoded into semantic vectors, and a cosine similarity is calculated to obtain a semantic similarity score. The device capability is checked to see if it meets the hard constraints in the requirements, such as sensor type, resolution, and operating range, and a rule constraint score is calculated based on the degree of satisfaction. A context adaptation score is calculated by combining the device's current status (including online and under maintenance), environmental adaptability (including nighttime operation and wind resistance level), and historical performance (including inspection success rate and task completion time). Finally, a weighted average of the comprehensive matching score is calculated using the formula: Comprehensive Matching Score = 0.4 × Semantic Similarity Score + 0.3 × Rule Constraint Score + 0.3 × Context Adaptation Score, to obtain the comprehensive matching score for each device.

[0037] In a preferred embodiment of the present invention, based on the historical operation time range of the target device and the reconstructed collaborative inspection time range, the time overlap is calculated as time intersection / time union; based on the historical operation location coordinates of the target device and the reconstructed collaborative inspection spatial geofence, the shortest distance from the device location to the fence is calculated, and the spatial proximity is obtained by threshold normalization; the spatiotemporal correlation between the target device and the collaborative inspection scenario is obtained by weighted calculation according to the formula spatiotemporal correlation = 0.5 × time overlap + 0.5 × spatial proximity.

[0038] This embodiment uses time and space analysis techniques to transform fuzzy spatiotemporal descriptions in natural language into standardized time ranges and spatial coordinates that can be recognized by the database, solving the problem that spatiotemporal information is difficult to use directly for database filtering. By calculating time overlap, spatial proximity, and spatiotemporal correlation, the spatiotemporal matching degree between the target device and the collaborative inspection scenario is quantitatively evaluated, achieving accurate screening of spatiotemporal constraints and improving the accuracy of subsequent queries.

[0039] S4. Map the collaborative query condition set to the physical table structure of the preset power business database, associate the query paths of each business device, and generate a query interface. Specifically, the power business database refers to the database that stores the entire process data of collaborative inspection of heterogeneous power equipment, including heterogeneous equipment hangar information, multi-source inspection records, collaborative task plans, equipment operation data, etc., and serves as the data source for query results. The physical table structure refers to the structure of the physical data tables actually storing the data in the power business database, including table names, field names, field types, indexes, and the physical relationships between tables. The query interface refers to the standardized query interface generated after mapping the set of collaborative query conditions to the physical table structure of the power business database. It includes information such as the physical tables to be associated, associated fields, optimal query path, and table join order, providing the physical execution basis for generating SQL query statements.

[0040] This diagram illustrates how the collaborative query condition set is mapped to the physical table structure of a pre-defined power business database, linking query paths for various business devices to generate a query interface. The core principle is to accurately map the structured collaborative query condition set to the physical table structure of the power business database, solving the problems of scattered data storage for heterogeneous devices and difficulties in cross-disciplinary subsystem related queries. This provides the physical layer execution basis for generating SQL query statements. First, the target devices in the collaborative query condition set are mapped and aligned with the physical table structure of the power business database to determine the physical data tables to be linked and their corresponding related fields. Then, based on the spatiotemporal constraints and collaborative inspection task chains in the collaborative query condition set, the master and slave related paths between the physical tables are identified. The master related path is the business device related path, and the slave related path is the spatiotemporal related path. Next, the computer resource consumption of each related path is evaluated, and the optimal query path with the lowest resource consumption is selected. Finally, the physical tables to be linked, the related fields, and the optimal query path are integrated to determine the table join order and generate a standardized query interface.

[0041] Preferably, the collaborative query condition set is mapped to the physical table structure of a preset power business database, the query paths of each business device are associated, and a query interface is generated, including: S41. Map and align the target devices in the collaborative query condition set with the physical table structure of the preset power business database to determine the physical tables to be associated and the corresponding associated fields of each physical table. S42. Based on the spatiotemporal constraints and collaborative inspection task chain in the collaborative query condition set, mine the main association path for representing the association of business devices and the secondary association path for representing the spatiotemporal association between each physical table. S43. Evaluate the computer resource consumption of accessing the power business database based on the main association path and the secondary association path, and take the association path with the lowest computer resource consumption as the optimal query path. S44. Integrate the physical table to be associated, the corresponding associated fields, and the optimal query path to determine the connection order, and generate a query interface according to the connection order.

[0042] Specifically, the physical tables to be associated represent the specific physical data tables in the power business database corresponding to the target equipment and data requirements in the collaborative query condition set. These are the direct data sources for this query and include the core task table, equipment detection result table, and site information table. The corresponding association fields represent the common fields used to establish connections between the physical tables to be associated. These are the core basis for implementing multi-table association queries; in this invention, task_id is preferred as the core association field. The main association path represents a star-shaped association path established between the physical tables corresponding to each target equipment and the core task table, based on the unique task_id in the collaborative inspection task chain. This is the core path for multi-table associations, characterized by high query efficiency and clear association logic. The secondary association path represents the association path established between physical tables based on the spatiotemporal constraints (time range, spatial coordinates) in the collaborative query condition set when there is no explicit task_id. This is an alternative supplement to the main association path, achieving inter-table association through spatiotemporal fields. Computer resource consumption represents the database hardware resources consumed when executing the query path, including I / O consumption, CPU consumption, and memory consumption, estimated based on the table data volume, index status, and field types in the database metadata. The optimal query path is the inter-table join path that consumes the least computer resources and has the highest query efficiency. The join order indicates the sequence in which JOIN operations are performed between the physical tables to be joined. This order is determined based on the table size and index availability. A reasonable join order can reduce the size of intermediate result sets during the query process and improve query efficiency. The query interface represents a standardized interface that integrates the physical tables to be joined, corresponding join fields, the optimal query path, table join order, and filter condition pushback requirements. It serves as a bridge connecting the collaborative query condition set and the SQL generation module, containing all the core logic of the physical layer query.

[0043] In a preferred embodiment of the present invention, the task_id, target device, query intent, and data source requirements in the collaborative query condition set are read; based on the task_id, the preset multi-machine collaborative data model metadata directory is queried to obtain the core task table involved in this collaborative task, the standardized data product table corresponding to each target device, and the site information table, and to determine the physical tables to be associated; the output field requirements in the collaborative query condition set are mapped to the specific column names of the physical tables, and the corresponding association fields between each physical table to be associated are confirmed. Using the task_id of the collaborative inspection task chain in the collaborative query condition set as the core, a main association path is established between the tables; based on the spatiotemporal constraints in the collaborative query condition set, the spatiotemporal fields of each device detection table are extracted, and a secondary association path based on the spatiotemporal fields is established as a supplement to the main association path. By mining the main association path and the secondary association path, the connection logic of each physical table to be associated is clearly defined. The main association path ensures query efficiency in normal scenarios, while the secondary association path, as a supplement, ensures query robustness in scenarios without a clear task_id.

[0044] S5. Perform fusion processing based on the collaborative query condition set and the query interface to generate an SQL query statement; Specifically, SQL query statements refer to structured query language statements generated by the fusion of collaborative query condition sets and query interfaces, which can be directly executed in the power business database. They are the core instructions for realizing database data retrieval.

[0045] This diagram illustrates how the collaborative query condition set and the query interface are fused together to generate an SQL query statement. The core of this process is to automatically generate an SQL query statement that can be directly executed in the power business database, based on the business requirements of the collaborative query condition set and the physical execution basis of the query interface. This solves the problem of the difficulty in writing SQL statements in existing technologies, making it impossible for non-professional users to write them. First, based on the optimal query path of the query interface, the physical tables to be associated, and the associated fields, and combined with the spatiotemporal constraints of the collaborative query condition set, a corresponding single-device SQL fragment is generated for each target device. Then, according to the table join order determined by the query interface, the single-device SQL fragments are associated and concatenated to generate a collaborative SQL fragment for multi-device collaboration. Next, based on the collaborative inspection task chain in the collaborative query condition set, the collaborative SQL fragments are aggregated to generate an aggregated SQL fragment containing statistical analysis. Finally, the single-device SQL fragment, the collaborative SQL fragment, and the aggregated SQL fragment are fused and concatenated to generate a complete SQL query statement.

[0046] Preferably, the SQL query statement is generated by fusion processing based on the collaborative query condition set and the query interface, including: S51. Based on the optimal query path, the physical table to be associated and the corresponding associated fields in the query interface, filter according to the spatiotemporal constraints in the collaborative query condition set to generate a single device SQL fragment corresponding to the target device. S52. Based on the connection order in the query interface, associate and concatenate the SQL fragments of each single device to generate a collaborative SQL fragment; S53. Aggregate the collaborative SQL fragments according to the collaborative inspection task chain in the collaborative query condition set to generate aggregated SQL fragments; S54. Merge and splice the single-device SQL fragment, the collaborative SQL fragment, and the aggregated SQL fragment to generate an SQL query statement.

[0047] Specifically, a single-device SQL fragment represents a portion of the SQL statement generated for a single target device based on its corresponding physical table, optimal query path, and spatiotemporal constraints. It only contains the SELECT field, FROM table name, and WHERE filter conditions of the physical table corresponding to that device, and serves as the basic unit for constructing a complete SQL statement. A collaborative SQL fragment is an SQL fragment formed by concatenating the single-device SQL fragments through a JOIN operation according to the join order and corresponding related fields in the query interface. It contains multi-device data association logic and is the core fragment reflecting the characteristics of multi-device collaborative queries, including inter-table JOIN conditions and global filter conditions. An aggregated SQL fragment is an SQL fragment that performs statistical analysis and data sorting on the query results of the collaborative SQL fragment based on the collaborative inspection task chain and query intent in the collaborative query condition set. It includes logic such as GROUP BY grouping, ORDER BY sorting, aggregate functions, and output field aliases.

[0048] In a preferred embodiment of the present invention, the physical tables to be associated in the query interface are first traversed, and the tables are classified according to the target devices to determine the exclusive physical table corresponding to each target device. Then, the associated fields and basic filtering rules for the optimal query path corresponding to the table are extracted from the query interface, and the local spatiotemporal constraints and business filtering conditions adapted to the table are extracted from the collaborative query condition set. Finally, according to basic SQL syntax, a single-device SQL fragment containing SELECT output fields, FROM physical table name, and WHERE local filtering conditions is written for each target device. Placeholders for the associated fields in the table join are reserved in the fragment to prepare for subsequent concatenation. This achieves the generation of independent basic SQL fragments adapted to the data characteristics of each target device, transforming the query requirements of a single device into basic statements recognizable by the database.

[0049] Following the pre-defined table join order in the query interface, smaller tables are joined first, followed by larger tables, arranging the individual device SQL fragments in the order of master table and slave table. Then, based on the corresponding association fields in the query interface, JOIN join types and conditions are added to adjacent tables. Finally, global filtering conditions from the collaborative query condition set are added to the WHERE clause, integrating the filtering conditions of all individual device SQL fragments to generate a collaborative SQL fragment containing multi-table join logic and global filtering logic. Through database JOIN operations, independent individual device SQL fragments are joined and concatenated, incorporating inter-table join logic and global filtering conditions to achieve multi-device heterogeneous data association queries.

[0050] The SELECT output fields of each individual device's SQL fragment are integrated into a unified SELECT clause, deduplicating and retaining all business requirement fields. Then, the FROM clause, JOIN join conditions, and collaborative SQL fragments are integrated, preserving the optimal join order specified by the query interface. Next, local and global filter conditions are integrated into a unified WHERE clause, following the principle of filter condition push-down, filtering smaller tables first and then joining larger tables. Finally, the GROUP BY, ORDER BY, aggregate functions, and other logic of the aggregate SQL fragments are concatenated to the corresponding positions, and the statements are subjected to syntax validation and performance optimization to generate the final complete SQL query statement.

[0051] This embodiment concatenates the query interface according to the connection order and related fields, and achieves accurate association of heterogeneous data from multiple devices through JOIN operation, solving the problem that traditional methods cannot handle collaborative association queries of multiple devices; it supports association queries of heterogeneous data tables with different devices, different structures, and different formats, and the generated SQL statements can be directly adapted to the heterogeneous data storage characteristics of the power business database.

[0052] S6. Send the SQL query statement to the power business database for querying and obtain the collaborative inspection data query results.

[0053] Specifically, the collaborative inspection data query result refers to the structured inspection data result obtained after executing the SQL query statement in the power business database and undergoing data standardization, fusion, and spatiotemporal registration. It is the final response to the user's natural language query needs.

[0054] This example illustrates how the SQL query statement is sent to the power business database for querying, yielding collaborative inspection data query results. The core process involves executing the generated SQL query statement within the power business database and standardizing, fusing, and spatiotemporally registering the returned heterogeneous inspection data to generate structured collaborative inspection data query results that meet the user's query requirements. This represents the final implementation of the user's query needs. First, the generated SQL query statement is sent to the power business database and data retrieval is performed, receiving the heterogeneous inspection data returned by the database. Then, the heterogeneous inspection data is standardized to eliminate differences in data formats and field naming across different physical tables. Finally, based on the business logic of the collaborative inspection task chain, the standardized heterogeneous inspection data is fused, completing spatiotemporal registration and association integration to generate structured collaborative inspection data query results.

[0055] Preferably, the SQL query statement is sent to the power business database for querying to obtain the collaborative inspection data query results, including: The SQL query statement is sent to the power business database for execution, and the heterogeneous inspection data returned by the power business database is received. The heterogeneous inspection data includes detection data of different target equipment, task execution data and spatiotemporal correlation data. The heterogeneous inspection data is processed to eliminate differences in data format and field naming between different physical tables; the standardized heterogeneous inspection data is then fused, and the spatiotemporal registration and association integration of the data are completed according to the collaborative inspection task chain to generate collaborative inspection data query results.

[0056] Specifically, heterogeneous inspection data refers to inspection data returned by the power business database that is collected by different target devices with inconsistent structures, formats, and spatiotemporal references, such as visible light defect data from drones and infrared temperature measurement data from robots. These are typical data characteristics of heterogeneous multi-machine collaborative inspections in the power industry.

[0057] In a preferred embodiment of the present invention, the implementation process is described using the heterogeneous multi-machine collaborative inspection data query of a 500kV substation as an example. First, the user enters a natural language query on the interactive interface to query the insulator defects discovered last week during a collaborative inspection of the 500kV substation by drone A and robot B. Then, the query is preprocessed using NLP and multi-granularity entity recognition to obtain semantic entities. The power inspection business entity is {Equipment type: Drone A, Robot B; Site information: 500kV substation; Defect type: Insulator defect}, the relational entity is {Collaboration relationship: Drone A and Robot B collaborate}, and the spatiotemporal entity is {Collaboration time window: last week; Collaboration spatial range: 500kV substation}.

[0058] Then, the collaborative semantic pattern library of the preset power equipment knowledge base is retrieved. Entity association rules are constructed based on collaborative relationship patterns and spatiotemporal collaborative patterns. The aforementioned semantic entities are connected to construct a collaborative relationship graph, which intuitively represents the query intent of UAV A and Robot B to collaboratively inspect insulator defects at a 500kV substation last week. Next, the equipment capability matrix is ​​retrieved, and UAV A (visible light detection capability) and Robot B (infrared temperature measurement capability) are matched as target devices. Last week is parsed as the time range from 2025-10-20 to 2025-10-26. The 500kV substation is converted into the corresponding geospatial coordinates, the spatiotemporal correlation degree is calculated, and the spatiotemporal constraints are determined. Based on the target devices and spatiotemporal constraints, the corresponding collaborative inspection task chain (task ID: task_id: CT2023102001) is reconstructed and integrated to generate a collaborative query condition set.

[0059] Generate query interface: Map the set of collaborative query conditions to the physical table structure of the power business database, and determine that the physical tables to be associated are the UAV inspection defect table (uav_defect_results), the robot infrared temperature measurement table (robot_thermal_results), and the collaborative task table (collaborative_tasks), with the associated field being task_id; mine the main association path with task_id as the core, evaluate and determine it as the optimal query path; and generate query interface after integration.

[0060] Then, based on the query interface and the set of collaborative query conditions, single-device SQL fragments are generated and concatenated into collaborative SQL fragments. After aggregation processing, these fragments are merged to generate a complete SQL query statement. The SQL query statement is then sent to the power business database for execution. The returned heterogeneous inspection data is received, standardized, and spatiotemporally registered before being merged to generate structured query results. These results include the location and type of insulator defects discovered by UAV A, as well as infrared temperature measurement data from robot B at the corresponding location, thus fulfilling the user's query requirements.

[0061] This embodiment supports users inputting query requirements in natural language, eliminating the need for specialized SQL syntax and power inspection database structure knowledge. Non-professional users can directly conduct accurate queries, resolving the reliance on specialized users in traditional query methods. By constructing a collaborative relationship graph and heterogeneous data association mapping, the system automatically organizes complex data relationships between heterogeneous devices and query paths across professional subsystems, transforming complex association queries that are difficult for manual processing into structured automated queries, significantly reducing query complexity. There is no need to manually write complex cross-table join SQL statements; the system automatically generates suitable SQL query statements based on the collaborative query condition set and query interface, saving professional users time in writing SQL and greatly improving the efficiency of inspection data querying. Through unified semantic parsing and heterogeneous data association mapping, unified querying of various types of heterogeneous data in the power business database, such as heterogeneous equipment hangar information, multi-source inspection records, and collaborative task plans, is achieved, solving the query fragmentation problem caused by data heterogeneity and ensuring the integrity of query results. It achieves end-to-end automation from inputting natural language query statements to outputting collaborative inspection data query results, eliminating the need for manual intervention in intermediate steps such as semantic parsing, equipment matching, path optimization, and SQL generation, thus improving the convenience of power inspection data query.

[0062] By implementing this embodiment, users can input natural language queries, eliminating the need for them to write professional queries. This allows non-professional users to directly conduct multi-source business data queries, while also saving professional users the tedious process of writing complex queries, significantly reducing the threshold and time cost of query operations. Semantic entities are obtained by semantic understanding of natural language queries, and a collaborative relationship graph is constructed based on a collaborative semantic pattern library in a pre-set power equipment knowledge base, clearly clarifying the complex data relationships between heterogeneous devices and the association logic of cross-professional subsystems, effectively reducing the complexity of cross-professional subsystem association queries. Based on the equipment capability matrix in the pre-set power equipment knowledge base, the collaborative relationship graph is used to match corresponding business devices, reconstruct spatiotemporal constraints, and integrate to generate a set of collaborative query conditions, thus clarifying the complex data relationships between heterogeneous devices. The complex relationships are transformed into structured query conditions, laying a precise structured foundation for subsequent query statement generation, eliminating the need for manual sorting of complex query conditions. By mapping the collaborative query condition set to the physical table structure of the power business database, associating the query paths of various business devices and generating query interfaces, the system automates the sorting and construction of query paths across professional subsystems, solving the core challenge of cross-professional subsystem related queries. Finally, based on the fusion processing of the collaborative query condition set and query interface, SQL query statements are generated. The system automatically generates complex SQL query statements, solving the problem of the difficulty in writing cross-professional subsystem related query statements in the traditional way. This achieves full-process automation from natural language input to accurate query result output, significantly improving the query efficiency and accuracy of multi-source business data in the scenario of collaborative inspection of heterogeneous multi-machine power systems.

[0063] See Figure 2 This is a schematic diagram of a data query device for a heterogeneous multi-machine collaborative inspection scenario in the power industry, provided by an embodiment of the present invention, comprising: The semantic entity recognition module is used to acquire the natural language query statement input by the user, perform semantic understanding on the natural language query statement, and obtain semantic entities; wherein, the semantic entities include power inspection business entities, relational entities, and spatiotemporal entities; The collaborative relationship graph construction module is used to associate power inspection business entities, relational entities, and spatiotemporal entities with the collaborative semantic pattern library in the preset power equipment knowledge base to construct a collaborative relationship graph; The collaborative query condition generation module is used to generate a set of collaborative query conditions by matching the corresponding business equipment and reconstructing the spatiotemporal constraints based on the equipment capability matrix in the preset power equipment knowledge base, according to the collaborative relationship graph; The query interface generation module is used to map the collaborative query condition set to the physical table structure of the preset power business database, associate the query paths of each business device, and generate a query interface. The SQL query statement generation module is used to perform fusion processing based on the collaborative query condition set and the query interface to generate an SQL query statement. The data query module is used to send the SQL query statement to the power business database for querying and to obtain the collaborative inspection data query results.

[0064] This invention provides a data query device for collaborative inspection scenarios of heterogeneous power equipment and multiple machines. By supporting users to input natural language queries, it eliminates the need for users to write professional query statements, allowing non-professional users to directly query multi-source business data. It also saves professional users the tedious process of writing complex query statements, significantly reducing the threshold and time cost of query operations. Through semantic understanding of natural language queries, semantic entities are obtained, and a collaborative relationship graph is constructed based on a collaborative semantic pattern library in a pre-set power equipment knowledge base, clearly clarifying the complex data relationships between heterogeneous devices and the association logic of cross-professional subsystems, effectively reducing the complexity of cross-professional subsystem association queries. Based on the equipment capability matrix in the pre-set power equipment knowledge base, and combined with the collaborative relationship graph, corresponding business equipment is matched, spatiotemporal constraints are reconstructed, and integrated to generate collaborative data. The query condition set transforms the complex relationships into structured query conditions, laying a precise and structured foundation for subsequent query statement generation, eliminating the need for manual processing of complex query conditions. By mapping the collaborative query condition set to the physical table structure of the power business database, the system associates the query paths of various business devices and generates query interfaces, achieving automated sorting and construction of query paths across professional subsystems, solving the core challenge of cross-professional subsystem related queries. Finally, based on the fusion processing of the collaborative query condition set and query interfaces, the system generates SQL query statements, automatically completing the generation of complex SQL query statements. This solves the problem of the difficulty in writing cross-professional subsystem related query statements in the traditional approach, achieving full-process automation from natural language input to accurate query result output, and significantly improving the query efficiency and accuracy of multi-source business data in the scenario of collaborative inspection of heterogeneous multi-machine power systems.

[0065] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0066] Those skilled in the art will understand that, for convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0067] Another embodiment of the present invention provides a terminal device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a data query method for a heterogeneous multi-machine collaborative inspection scenario in power systems as described in the above embodiments. The terminal device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.

[0068] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting various parts of the terminal device via various interfaces and lines.

[0069] The memory can be used to store the computer program. The processor implements various functions of the terminal device by running or executing the computer program stored in the memory and calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function, etc.; the data storage area may store data created based on the use of the mobile phone, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, RAM, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device or other volatile solid-state storage device.

[0070] Another embodiment of the present invention provides a computer-readable storage medium, the computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the data query method for a heterogeneous multi-machine collaborative inspection scenario in the power industry described in the above embodiment.

[0071] The storage medium is a computer-readable storage medium, and the computer program is stored in the computer-readable storage medium. When the computer program is executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0072] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.

Claims

1. A data query method for collaborative inspection scenarios of heterogeneous power systems with multiple machines, characterized in that, include: The system obtains a natural language query statement input by the user, performs semantic understanding on the natural language query statement, and obtains semantic entities; wherein, the semantic entities include power inspection business entities, relational entities, and spatiotemporal entities; Based on the collaborative semantic pattern library in the pre-set power equipment knowledge base, the power inspection business entities, relational entities, and spatiotemporal entities are associated to construct a collaborative relationship graph; Based on the equipment capability matrix in the preset power equipment knowledge base, the corresponding business equipment is matched according to the collaborative relationship graph and the spatiotemporal constraints are reconstructed to generate a set of collaborative query conditions. The collaborative query condition set is mapped to the physical table structure of the preset power business database, the query paths of each business device are associated, and a query interface is generated. The SQL query statement is generated by merging the collaborative query condition set and the query interface. The SQL query statement is sent to the power business database for querying, and the collaborative inspection data query results are obtained.

2. The data query method for a heterogeneous multi-machine collaborative inspection scenario in power systems as described in claim 1, characterized in that, Semantic understanding is performed on the natural language query statement to obtain semantic entities, including: The natural language query statement is segmented into words, and the omitted words in the segmented natural language query statement are converted into standard terms to obtain a structured statement; The structured statement is subjected to entity recognition to obtain power inspection business entities, relational entities, and spatiotemporal entities; The power inspection business entities include: site information, equipment type, and defect type; the relationship entities include: collaboration relationship, task allocation relationship, and demand relationship; and the spatiotemporal entities include: collaboration time window and collaboration spatial range.

3. A data query method for a heterogeneous multi-machine collaborative inspection scenario in power systems, as described in claim 2, is characterized in that... Based on the collaborative semantic pattern library in the pre-set power equipment knowledge base, the business entities, relational entities, and spatiotemporal entities of power inspection are associated to construct a collaborative relationship graph, including: Based on the collaborative inspection semantic patterns in the collaborative semantic pattern library, the business entities, relational entities, and spatiotemporal entities of power inspection are matched to construct semantic association rules between the entities. Among them, the collaborative inspection semantic patterns include collaborative relationship patterns corresponding to collaborative relationships, task allocation patterns corresponding to task allocation relationships, complementary patterns corresponding to demand relationships, and spatiotemporal collaborative patterns corresponding to spatiotemporal entities. Based on the semantic association rules, the entity relationships of power inspection business entities, relational entities and spatiotemporal entities are connected to determine the matching relationship of each entity in the collaborative inspection scenario. Based on the matching relationships of each entity in the collaborative inspection scenario, a collaborative relationship graph is constructed.

4. The data query method for a collaborative inspection scenario of heterogeneous power systems using multiple machines as described in claim 3, characterized in that, Based on the equipment capability matrix in the preset power equipment knowledge base, and by matching the corresponding business equipment according to the collaborative relationship graph and reconstructing the spatiotemporal constraints, a set of collaborative query conditions is generated, including: Based on the device types and demand relationships in the collaborative relationship graph, and combined with the device capability matrix, a matching is performed to calculate the semantic similarity score, rule constraint score, and context adaptation score, respectively. The comprehensive matching score is then calculated by weighting the semantic similarity score, rule constraint score, and context adaptation score. Business devices whose comprehensive matching score is greater than or equal to the preset reliability threshold are designated as target devices; Based on the collaborative relationship map, the collaborative time window and collaborative spatial range are analyzed and reconstructed, and the fuzzy time description in the collaborative time window is converted into a time range, and the fuzzy geographical name in the collaborative spatial range is converted into spatial coordinates. The temporal overlap is calculated based on the time range, the spatial proximity is calculated based on the spatial coordinates, and the spatiotemporal correlation is calculated by weighting the temporal overlap and the spatial proximity. Based on the spatiotemporal correlation, the corresponding spatiotemporal constraints are determined. Based on the target device and the spatiotemporal constraints, a collaborative inspection task chain is generated. The target device, the spatiotemporal constraints, and the collaborative inspection task chain are then integrated to generate a collaborative query condition set.

5. A data query method for a collaborative inspection scenario of heterogeneous power systems using multiple machines, as described in claim 4, characterized in that... Mapping the collaborative query condition set to the preset physical table structure of the power business database, associating the query paths of each business device, and generating a query interface includes: The target devices in the collaborative query condition set are mapped and aligned with the physical table structure of the preset power business database to determine the physical tables to be associated and the corresponding associated fields of each physical table. Based on the spatiotemporal constraints and collaborative inspection task chain in the collaborative query condition set, the primary association path for representing the association of business devices and the secondary association path for representing the spatiotemporal association are mined between each physical table. Based on the evaluation of the computer resource consumption for accessing the power business database according to the main association path and the secondary association path, the association path with the lowest computer resource consumption is selected as the optimal query path. The physical table to be associated, the corresponding associated fields, and the optimal query path are integrated to determine the connection order, and a query interface is generated based on the connection order.

6. A data query method for a heterogeneous multi-machine collaborative inspection scenario in power grids, as described in claim 5, is characterized in that... The SQL query statement is generated by merging the collaborative query condition set and the query interface, including: Based on the optimal query path, the physical table to be associated, and the corresponding associated fields in the query interface, the system filters according to the spatiotemporal constraints in the collaborative query condition set to generate a single-device SQL fragment corresponding to the target device. Based on the connection order in the query interface, the SQL fragments of each individual device are associated and concatenated to generate a collaborative SQL fragment; Based on the collaborative inspection task chain in the collaborative query condition set, the collaborative SQL fragments are aggregated to generate aggregated SQL fragments. The single-device SQL fragment, the collaborative SQL fragment, and the aggregated SQL fragment are merged and spliced ​​together to generate an SQL query statement.

7. A data query method for a heterogeneous multi-machine collaborative inspection scenario in power grids, as described in claim 1, characterized in that... The SQL query statement is sent to the power business database for querying, and the collaborative inspection data query results are obtained, including: The SQL query statement is sent to the power business database for execution, and the heterogeneous inspection data returned by the power business database is received. The heterogeneous inspection data includes detection data of different target equipment, task execution data and spatiotemporal correlation data. The heterogeneous inspection data is processed to eliminate differences in data format and field naming between different physical tables; the standardized heterogeneous inspection data is then fused, and the spatiotemporal registration and association integration of the data are completed according to the collaborative inspection task chain to generate collaborative inspection data query results.

8. A data query device for collaborative inspection scenarios of heterogeneous power systems with multiple machines, characterized in that, include: The semantic entity recognition module is used to acquire the natural language query statement input by the user, perform semantic understanding on the natural language query statement, and obtain semantic entities; wherein, the semantic entities include power inspection business entities, relational entities, and spatiotemporal entities; The collaborative relationship graph construction module is used to associate power inspection business entities, relational entities, and spatiotemporal entities with the collaborative semantic pattern library in the preset power equipment knowledge base to construct a collaborative relationship graph; The collaborative query condition generation module is used to generate a set of collaborative query conditions by matching the corresponding business equipment and reconstructing the spatiotemporal constraints based on the equipment capability matrix in the preset power equipment knowledge base, according to the collaborative relationship graph; The query interface generation module is used to map the collaborative query condition set to the physical table structure of the preset power business database, associate the query paths of each business device, and generate a query interface. The SQL query statement generation module is used to perform fusion processing based on the collaborative query condition set and the query interface to generate an SQL query statement. The data query module is used to send the SQL query statement to the power business database for querying and to obtain the collaborative inspection data query results.

9. A terminal device, characterized in that, The system includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements a data query method for a heterogeneous multi-machine collaborative inspection scenario in power systems as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute a data query method for a heterogeneous multi-machine collaborative inspection scenario in power systems as described in any one of claims 1 to 7.