Power grid operation data intelligent insight generation method and device based on large model

The method for generating intelligent insights from power grid operation data through large-scale models solves the problems of ambiguity in business terms and implicit rules in power grid operation data queries. It achieves accurate identification of query objects and business semantics, ensures the executability and correctness of SQL, and generates interpretable intelligent insights.

CN123157784APending Publication Date: 2026-11-24STATE GRID INFO TELECOM GREAT POWER SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611656571.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-10-26
Publication Date
2026-11-24

AI Technical Summary

Technical Problem

Existing technologies for querying power grid operation data based on natural language to SQL suffer from several drawbacks. These include ambiguous power grid business terminology, user queries often omitting the subject, scope, and filtering conditions, making it difficult to make implicit rules explicit, a limited knowledge retrieval method, a lack of validation and reflection/correction loops in the generated SQL, and a lack of analyzable type identification and insight paradigm invocation in the query results. Consequently, the identification of query objects is inaccurate, executability and business correctness are difficult to guarantee, and the interpretability and reliability of insights are poor.

Method used

The method for generating intelligent insights from power grid operation data based on a large model includes semantic enhancement, multi-path recall, SQL reflection and correction, and data insight paradigm analysis. It achieves end-to-end generation from natural language queries to interpretable intelligent insights. The specific steps include obtaining source database tables and original files for semantic extraction, obtaining user questions for power grid business semantic normalization and implicit rule explicit enhancement, generating SQL candidates and validating them, executing SQL and accessing the data platform, identifying the analyzable types of query results for data analysis and insight summarization.

Benefits of technology

It effectively solves the problems of confusing names of power business, unclear subject of indicators, and ignored implicit rules, ensuring that the query data service can more accurately identify query objects and business semantics, reduce erroneous queries, ensure the executability of SQL and the correctness of business, and output intelligent insights into power grid operation data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123157784A_ABST
    Figure CN123157784A_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for generating intelligent insights from power grid operation data based on a large-scale model, belonging to the field of data analysis technology. The method includes: acquiring user queries, historical dialogues, and knowledge data; performing semantic enhancement, multi-path recall, and reordering to obtain recalled knowledge; generating SQL candidates based on the enhanced queries and recalled knowledge through a large-scale model; outputting executable SQL after syntax and semantic verification and reflective correction; executing the SQL to access a data platform and identifying the analyzable type of the query results; calling a data insight paradigm according to the type for data analysis; inputting the analysis results into the large-scale model to generate data interpretation text and insight summaries; and outputting intelligent insights from power grid operation data after rationality verification. This invention, through semantic enhancement, multi-path recall and reordering, large-scale model SQL reflective correction, and enhanced analysis, realizes the generation of interpretable intelligent insights from power grid operation data queries, from natural language queries.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data analysis, specifically to a method and apparatus for generating intelligent insights from power grid operation data based on large models. Background Technology

[0002] In the context of digital transformation, databases contain a wealth of valuable information. Previously, users needed to learn SQL to query these databases, but even for SQL experts, repeatedly writing scripts was a monotonous and inefficient task. How to freely query target data in databases using natural language has become an emerging research hotspot. Intelligent text translation is one such technology that can convert users' natural language into executable SQL statements. For example, if a user says "How many users are in a certain transformer area?" or "What was the electricity sales volume in a certain province last year?", the system will automatically calculate the result from the database and provide the user with a unique answer. The difficulty lies in accurately analyzing the user's semantics. For example, "public transformer area" can be understood as "transformer area and public transformer," or "transformer area identified by public transformers." Secondly, it's crucial to accurately determine the user's intent—which table and data item to query. Thirdly, it's essential to clearly distinguish whether the user's need is for querying or statistics. Fourthly, the data must be dynamic, maintainable, and support various query formats.

[0003] However, existing technologies for querying power grid operation data based on natural language to SQL still have shortcomings: power grid business terminology is often ambiguous, user questions frequently omit the subject, scope, and filtering conditions, and implicit rules are difficult to make explicit, leading to inaccurate identification of query objects; knowledge retrieval methods are limited, making it difficult to accurately retrieve data from table field metadata, domain knowledge, and sample question-and-answer pairs; the generated SQL lacks a closed loop of verification and reflective correction, making it difficult to guarantee executability and business correctness; query results lack analyzable type identification and insight paradigm invocation, and the generated interpretation text and insight summaries lack data consistency, unit, business rules, and source verification, resulting in poor interpretability and low credibility of insights. Summary of the Invention

[0004] To address the aforementioned issues, this invention proposes a method and apparatus for generating intelligent insights from power grid operation data based on a large model. Through semantic enhancement, multi-path recall and rearrangement, large model SQL reflection and correction, and data insight paradigm analysis, it achieves end-to-end generation of interpretable intelligent insights from natural language queries of power grid operation data, solving the problems of insufficient semantic understanding and the neglect of implicit rules in traditional NL2SQL.

[0005] On the one hand, methods for generating intelligent insights from power grid operation data based on large models include:

[0006] S1: Obtain the source database table and original file; perform semantic extraction on the source database table to obtain table and field metadata; perform knowledge processing on the original file to obtain domain knowledge and sample question-answer pairs; and integrate the table and field metadata, domain knowledge and sample question-answer pairs into knowledge data.

[0007] S2, obtain user questions, historical dialogues and knowledge data, perform power grid business semantic normalization, contextual hidden intent restoration and implicit rule explicit enhancement on user questions to obtain enhanced questions, perform multi-path recall and rearrangement based on enhanced questions and knowledge data to obtain recalled knowledge;

[0008] S3, based on enhanced questions and recall knowledge, generates SQL candidates through a pre-set large model, performs SQL syntax and semantic verification on the SQL candidates, and if the verification fails, it rethinks and corrects and regenerates SQL candidates, outputting executable SQL.

[0009] S4 executes executable SQL and accesses the data platform to obtain query results and identify the analyzable types of the query results;

[0010] S5, according to the analyzable type, call the data insight paradigm to perform data analysis on the query results, obtain the analysis results, input the analysis results into the large model for reasoning, generate data interpretation text and insight summary, perform rationality verification on the data interpretation text and insight summary, and output the intelligent insight of power grid operation data after the verification is passed; the data insight paradigm is a pre-configured set of data analysis rules corresponding to the analyzable type.

[0011] Furthermore, in S1, semantic extraction is performed on the source database tables, specifically including: extracting table semantics and field semantics, and obtaining table and field metadata and labeled data through completion, alignment, disambiguation and encoding mapping; vectorizing the labeled data to obtain vectorized data; storing the vectorized data in a vector library; and storing the table and field metadata, domain knowledge and sample question-answer pairs in a relational database, vector library, ES database or graph database.

[0012] Furthermore, in S2, the user's questions are enhanced by performing power grid business semantic normalization, contextual implicit intent restoration, and implicit rule explicitization, resulting in enhanced questions, specifically including:

[0013] S21. Based on table and field metadata, domain knowledge and sample question-and-answer pairs, perform business semantic correction and normalization on table names, field names, enumeration values ​​and encoded values ​​in the source database table to establish the mapping relationship between the source database table structure and business objects, indicator calibers and statistical rules, and obtain the field semantic mapping table.

[0014] S22, perform word segmentation, entity recognition and business phrase extraction on user questions to obtain candidate business entities, align the candidate business entities with the field semantic mapping table to identify the missing implicit rules in user questions and obtain ambiguity recognition results;

[0015] S23, combining historical dialogues, user profiles and ambiguity recognition results, performs context inheritance and hidden content restoration on user questions to obtain explicit query conditions;

[0016] S24, Generate a structured enhanced representation based on explicit query conditions, and generate an enhanced question based on the structured enhanced representation;

[0017] S25. Based on the enhanced question and ambiguity recognition results, check whether the ambiguity has been eliminated. If it has not been eliminated, trigger targeted clarification and perform secondary correction. If it has been eliminated, output the enhanced question.

[0018] Furthermore, in S23, combining historical dialogues, user profiles, and ambiguity recognition results, context inheritance and hidden content restoration are performed on user questions, specifically including:

[0019] Extract confirmed dimensions, locked jurisdictions, preceding filter conditions, and preceding indicator subjects from the user's historical dialogues as the inheritance context;

[0020] The user profile is analyzed to extract job roles, scope of responsibility, business lines, and permission boundaries, which serve as constraints for the profile.

[0021] Based on the inherited context, profile constraints, and ambiguity recognition results, semantic completion and restoration are performed on the omitted subjects, missing jurisdictions, colloquial business expressions, and implicit business rules not explicitly given in the current user's question. The restored implicit business rules are then converted into explicit filtering conditions to obtain explicit query conditions.

[0022] Furthermore, in S2, multi-way recall and ranking are performed based on enhanced questions and knowledge data, calculated using the following formula:

[0023] ;

[0024] ;

[0025] ;

[0026] ;

[0027] in, To enhance the query vector obtained by encoding the question; A document vector obtained by encoding knowledge entries in knowledge data; Score the similarity of dense vectors; Cosine similarity; It is an L2 norm; Standardized density similarity score; The standardized sparse retrieval score; To enhance the sparse retrieval score between questions and knowledge entries; This represents the mean of the density similarity of the current candidate knowledge items; The standard deviation of the density similarity of the current candidate knowledge items; This represents the mean score of the sparse retrieval for the current candidate knowledge items. The standard deviation of the sparse retrieval score for the current candidate knowledge item; For dense scoring weights; The final merge and rearrangement score;

[0028] Sort the knowledge items from highest to lowest according to the final fusion and rearrangement scores, and select the top N knowledge items as the recalled knowledge, where N is a positive integer.

[0029] Furthermore, in S2, after obtaining the recall knowledge, the process also includes: performing query intent analysis and ambiguity detection based on the enhanced question and the recall knowledge; if the enhanced question has missing key information or unclear query intent, a clarification query is initiated to obtain the clarified question; the enhanced question is replaced with the clarified question; and SQL candidates are generated based on the clarified question and the recall knowledge.

[0030] Furthermore, in S3, SQL candidates undergo SQL syntax and semantic validation. If the validation fails, the SQL candidates are revised and regenerated. Specifically, this includes:

[0031] S31, Perform SQL syntax validation on the SQL candidates and obtain the syntax validation result; Perform semantic validation on the SQL candidates and obtain the semantic validation result;

[0032] S32, If the syntax check result or semantic check result indicates that it fails, extract the reason for the failure and generate error feedback information;

[0033] S33: Input SQL candidates, error feedback information, enhanced or clarified questions, recall knowledge, user profiles and historical dialogues into a preset large model to generate corrected SQL candidates;

[0034] S34, re-execute SQL syntax and semantic checks on the corrected SQL candidate until the checks pass.

[0035] Furthermore, in S4, executable SQL is executed and access to the data platform is obtained to identify the analyzable types of the query results, specifically including:

[0036] S41, Execute the executable SQL, obtain the query results through the data platform interface, and perform structured parsing on the query results to obtain structured parsing results;

[0037] S42, Identify the analyzable type of the query results based on the structured parsing results; the analyzable types include current status statistics, trend analysis, attribution analysis, predictive analysis, and sensitivity analysis.

[0038] S43. If the structured analysis result includes time series fields and target indicators, and the continuous change of the target indicators over time meets preset conditions, it is identified as a trend analysis type; if the structured analysis result includes target indicators and a preset number of influencing factors, it is identified as an attribution analysis type; if the structured analysis result includes future time windows, prediction requests, or prediction identifiers, it is identified as a predictive analysis type; if the structured analysis result includes factor adjustment amounts or indicator response relationships, it is identified as a sensitivity analysis type; otherwise, it is identified as a current status statistics type.

[0039] Furthermore, the data insight paradigms include the current status quo statistical paradigm, the trend insight paradigm, the attribution analysis paradigm, and the predictive analysis paradigm:

[0040] The current status statistical paradigm is used to calculate at least one of the following for query results: year-on-year and month-on-month comparison, ranking, median, percentage, total, mean, and distribution.

[0041] The trend insight paradigm is used to fit the trend and identify abrupt changes in the target indicator, and to obtain at least one of the following: trend rise and fall, periodic fluctuation and staged abrupt change.

[0042] The attribution analysis paradigm is used to quantify the contribution of influencing factors to changes in the target indicator using XGBoost and SHAP.

[0043] The predictive analysis paradigm is used to output future predicted values ​​of target indicators and to calculate the score of changes in target indicators and expected business impact based on changes in influencing factors.

[0044] On the other hand, a method and apparatus for generating intelligent insights from power grid operation data based on large models include:

[0045] The semantic extraction module is used to obtain source database tables and original files, perform semantic extraction on the source database tables to obtain table and field metadata, perform knowledge processing on the original files to obtain domain knowledge and sample question-answer pairs, and integrate the table and field metadata, domain knowledge and sample question-answer pairs into knowledge data.

[0046] The semantic enhancement module is used to acquire user questions, historical dialogues and knowledge data, and to enhance user questions by performing power grid business semantic normalization, contextual hidden intent restoration and implicit rule explicit enhancement to obtain enhanced questions. Based on the enhanced questions and knowledge data, multi-path recall and rearrangement are performed to obtain recalled knowledge.

[0047] The SQL statement output module is used to generate SQL candidates based on enhanced questions and recall knowledge through a preset large model. It performs SQL syntax and semantic verification on the SQL candidates. If the verification fails, it rethinks, corrects, and regenerates the SQL candidates, and outputs executable SQL.

[0048] The analyzable type acquisition module is used to execute executable SQL and access the data platform to obtain query results and identify the analyzable type of the query results;

[0049] The intelligent insight output module is used to call the data insight paradigm according to the analyzable type to perform data analysis on the query results, obtain the analysis results, input the analysis results into the large model for reasoning, generate data interpretation text and insight summary, perform rationality verification on the data interpretation text and insight summary, and output intelligent insights on power grid operation data after the verification is passed.

[0050] The present invention adopts the above technical solution and has the following beneficial effects:

[0051] (1) This invention constructs knowledge data that integrates table and field metadata, domain knowledge and sample question and answer pairs, and performs semantic enhancement, multi-way recall and rearrangement on user questions, effectively solving problems such as confusion of power business names, unclear subject of indicators and neglect of implicit rules, so that the question and data service can more accurately identify query objects and business semantics;

[0052] (2) This invention generates SQL candidates from a large model and performs SQL syntax and semantic checks on the SQL candidates. When the checks fail, the reasons are extracted, error feedback is generated and the correction is reflected and corrected, and SQL candidates are regenerated until executable SQL is output, thereby reducing erroneous queries and ensuring the executability and business correctness of SQL.

[0053] (3) By identifying the analyzable type of the query results, S5 calls the current status statistical paradigm, trend insight paradigm, attribution analysis paradigm and predictive analysis paradigm according to the analyzable type for analysis, and then inputs the analysis results into the large model to generate data interpretation text and insight summary, and outputs intelligent insights of power grid operation data after rationality verification. Attached Figure Description

[0054] Figure 1 This is a flowchart of the intelligent insight generation method for power grid operation data based on a large model, according to an embodiment of the present invention.

[0055] Figure 2 This is a schematic diagram illustrating various knowledge entry methods in an embodiment of the present invention;

[0056] Figure 3 This is a flowchart illustrating the intelligent data query and data insight generation process according to an embodiment of the present invention.

[0057] Figure 4 This is a flowchart of the NL2SQL sub-process of an embodiment of the present invention;

[0058] Figure 5 This is a schematic diagram of the data insight process according to an embodiment of the present invention;

[0059] Figure 6 This is a diagram of a power grid operation data intelligent insight generation device based on a large model, according to an embodiment of the present invention. Detailed Implementation

[0060] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.

[0061] like Figure 1 This invention provides a method for generating intelligent insights from power grid operation data based on a large model, comprising:

[0062] S1: Obtain the source database table and original file; perform semantic extraction on the source database table to obtain table and field metadata; perform knowledge processing on the original file to obtain domain knowledge and sample question-answer pairs; and integrate the table and field metadata, domain knowledge, and sample question-answer pairs into knowledge data.

[0063] Specifically, semantic extraction is performed on the source database tables, including: extracting table semantics and field semantics, completing, aligning, disambiguating and encoding mapping to obtain table and field metadata and labeled data, vectorizing the labeled data to obtain vectorized data, and storing the vectorized data in a vector library; storing the table and field metadata, domain knowledge and sample question-answer pairs in a relational database, vector library, Elasticsearch database or graph database.

[0064] Semantic extraction is performed on the source database tables, specifically including: retrieving the database table schema or table creation statement, as well as the enumeration values ​​of all enumerated fields and their mapping tables; and using a combination of intelligent recognition and manual annotation, metadata is completed, aligned, disambiguated, and encoded. The specific implementation is as follows:

[0065] Specifically, in this embodiment, the files are in formats such as doc, docx, pdf, xls, csv, and txt. Generally, xls and csv are structured data types, while others are classified as unstructured data. The original file includes metadata, which is "data on data." For example, the data collected for user electricity consumption is the user's voltage, current, and active power collected by the smart meter every 15 minutes, generating "daily load curve data" (essentially time-series data, recording the power values ​​of the user at 96 time points throughout the day). The corresponding metadata includes: "Residential user daily active power curve, unit kW, time granularity 15 minutes, data format is CSV, fields include user ID, collection time, active power, voltage, collection device is a single-phase smart meter of model "DDZY188-Z", transmitted wirelessly to the concentrator via LoRa, and then uploaded to the marketing system, collection time range is XXXX-XXXX, data integrity rate 99.2%, responsible department is the electricity inspection team of the municipal marketing department, data retention period is 3 years," and other explanatory information. The original documents also include domain knowledge, tags, and classifications for unstructured data: professional and systematic knowledge and experience accumulated over a long period in the power grid field, which is an abstract summary of the physical laws, business logic, and technical rules of the power grid, and is the "prerequisite common sense" for understanding all power grid data / equipment.

[0066] Specifically, semantic extraction is performed on the source database tables, including obtaining the database table schema or table creation statement, as well as the enumeration values ​​of all enumeration fields and their mapping tables. The metadata is then completed, aligned, disambiguated, and encoded using a combination of intelligent recognition and manual annotation.

[0067] Among them, intelligent identification uses algorithms to automatically scan the source system database to initially extract field features and patterns. For example, the system scan finds the field Dev_Type in the system A table and the field Equipment_Category in the system B table. The algorithm finds through regular expression matching that the Dev_Type value is mostly "main transformer" or "line transformer", and the Equipment_Category value is mostly "TRANSFORMER_MAIN" or "TL". It is initially judged that the two are highly related in meaning and may both involve transformer classification, but the storage format and granularity are different, so they are marked as candidates to be aligned.

[0068] The system fills in missing metadata attributes using knowledge graphs or rule engines for identified missing values ​​or unstructured descriptions. For example, if the Dev_Type field in the source system lacks a standard business definition and unit of measurement description, the system will automatically associate it with the State Grid Data Dictionary and fill in the business definition of the field as "representing the functional role of transformers in the power grid", with a data type of VARCHAR(50) and a subject domain of the device domain.

[0069] Alignment maps fields from different source systems to a unified enterprise-level logical model or standard field. For example, if system A's PMS.Transformer.kind="oil-immersed" and system B's SCADA.Device.type="OIL_TF", the intelligent algorithm suggests mapping these two fields to the SBE_Transformer_Type field in the standard metadata model based on a preset thesaurus, establishing a correspondence between system A's field and the standard field and system B's field. Disambiguation resolves misunderstandings caused by homonyms or homonyms. For example, the field name Capacity refers to the applied capacity (kW, user side) in the marketing system, but the rated capacity (MVA, equipment side) in the equipment system. AI detects a significant difference in units and magnitude, triggering an ambiguity alert. Business experts confirm this is a homonym and distinguish it in the metadata center as Load_Capacity_Applied and Rated_Capacity.

[0070] Encoding mapping converts proprietary codes within each system into enterprise standard codes or national standard codes. For example, the old system code for transformer status fields was 0=operating, 1=cold standby, 2=under maintenance, and 3=retired. The new standard code is 01=operating, 02=hot standby, 03=cold standby, 04=under maintenance, and 05=retired. Intelligent matching is used for 0→01, 1→03, 2→04, and 3→05. After manual verification, a mapping table is generated, and the conversion is automatic during the data integration ETL process. For unstructured files, all text is extracted, semantically divided into blocks, and each block is vectorized and stored in a vector library, while the original text is stored in an ES library. For structured data, after semantic extraction, metadata, table field business semantics, and other information are vectorized and stored in a vector library, while the table structure is converted into triples and stored in a graph database. Triples are the storage format for graph databases. For example, if a transformer belongs to a certain substation and its voltage level is 220kV, it can be represented as the rdf:type of main transformer #1 being power transformer, the belongsTo of main transformer #1 being 220kV Chengnan Station, and the voltageLevel of main transformer #1 being 220kV.

[0071] Specifically, in this embodiment, table semantics and field semantics are extracted based on the source database tables. A combination of intelligent recognition and manual annotation is used to complete, align, disambiguate, and encode the metadata. Different processing is applied according to the category before the metadata is stored in the database. The source database typically refers to the original data repository or the system that initially generated and stored the data, generally a relational database. The extracted table field semantics and business meanings are stored in a vector library (ES), and the table structure is stored in a graph database, such as... Figure 2As shown, the overall architecture for storing various types of knowledge information after knowledge processing in multiple databases according to type and component technology is illustrated: unstructured knowledge, metadata of unstructured knowledge, domain knowledge, table and field metadata, tags, classifications, and other knowledge are stored in vector databases, ES databases, graph databases, and relational databases respectively according to their characteristics. Among them, the vector database focuses on semantic vector knowledge, the ES database focuses on full-text search, tag and classification knowledge, the graph database focuses on relational knowledge such as file relationships, hierarchical relationships, and paragraph relationships, the relational database carries table and field metadata, domain knowledge, sample question-answer pairs and associations, and the original files are stored in file storage, thus forming a fusion of knowledge data to support intelligent question and data services.

[0072] S2: Obtain user questions, historical dialogues, and knowledge data. Perform semantic normalization of power grid business, contextual hidden intent restoration, and implicit rule explicit enhancement on user questions to obtain enhanced questions. Based on the enhanced questions and knowledge data, perform multi-path recall and rearrangement to obtain recalled knowledge.

[0073] Specifically, the user's questions are enhanced by performing power grid business semantic normalization, contextual hidden intent restoration, and implicit rule explicitization, resulting in enhanced questions, including:

[0074] S21. Based on table and field metadata, domain knowledge and sample question-and-answer pairs, perform business semantic correction and normalization on table names, field names, enumeration values ​​and encoded values ​​in the source database table to establish the mapping relationship between the source database table structure and business objects, indicator calibers and statistical rules, and obtain the field semantic mapping table.

[0075] S22, perform word segmentation, entity recognition and business phrase extraction on user questions to obtain candidate business entities, align the candidate business entities with the field semantic mapping table to identify the missing implicit rules in user questions and obtain ambiguity recognition results;

[0076] S23, combining historical dialogues, user profiles and ambiguity recognition results, performs context inheritance and hidden content restoration on user questions to obtain explicit query conditions;

[0077] S24, Generate a structured enhanced representation based on explicit query conditions, and generate an enhanced question based on the structured enhanced representation;

[0078] S25. Based on the enhanced question and ambiguity recognition results, check whether the ambiguity has been eliminated. If it has not been eliminated, trigger targeted clarification and perform secondary correction. If it has been eliminated, output the enhanced question.

[0079] Specifically, in S23, combining historical dialogues, user profiles, and ambiguity recognition results, context inheritance and hidden content restoration are performed on user questions, including:

[0080] Extract confirmed dimensions, locked jurisdictions, preceding filter conditions, and preceding indicator subjects from the user's historical dialogues as the inheritance context;

[0081] The user profile is analyzed to extract job roles, scope of responsibility, business lines, and permission boundaries, which serve as constraints for the profile.

[0082] Based on the inherited context, profile constraints, and ambiguity recognition results, semantic completion and restoration are performed on the omitted subjects, missing jurisdictions, colloquial business expressions, and implicit business rules not explicitly given in the current user's question. The restored implicit business rules are then converted into explicit filtering conditions to obtain explicit query conditions.

[0083] Specifically, in this embodiment, a power grid business semantic enhancement layer is constructed. This layer corrects and normalizes the business semantics of database table fields, obtaining table and field metadata, domain knowledge, and sample question-and-answer pairs obtained in S1. It corrects the business semantics of currently used table names, field names, enumeration values, and coded values ​​in the power database tables. Specifically, it employs a combination of data mining, field value distribution clustering, business document alignment, manual annotation, and expert review to establish a multi-level mapping of "physical schema—business object—indicator caliber—statistical rules," forming the power grid business semantic enhancement layer. This layer includes at least: equipment object semantics, such as substations, feeders, distribution transformers, distribution transformers, and metering points; management object semantics, such as public transformer distribution areas, dedicated transformer users, high-voltage users, and low-voltage residential users; indicator caliber semantics, such as power supply, electricity sales, line loss rate, overload rate, three-phase imbalance, and number of households during power outages; and implicit business rule semantics, such as the statistical period, threshold conditions, and filtering logic corresponding to "frequent power outage users," "high-loss distribution areas," and "heavily overloaded equipment." Therefore, fields in the original database that may be ambiguous or have only technical meaning are transformed into semantic nodes with unique business interpretations, providing a "source of truth" for subsequent question enhancement.

[0084] Next, business terminology parsing and ambiguity identification are performed on user queries. This involves word segmentation, entity recognition, and business phrase extraction to obtain candidate business entities, indicator words, dimension words, time words, and filter words. The candidate business entities are then aligned with the power grid business semantic enhancement layer to identify one or more of the following types of fuzzy / ambiguous issues: ambiguity of compound words: for example, "public transformer substation" could be interpreted as either a combination of "substation and public transformer" or "substation identified by public transformer"; ambiguity of indicator subjects: for example, "load" does not specify whether it refers to line load, substation load, transformer load, or user-side load.

[0085] Ambiguity in terminology: For example, "line loss" does not specify whether it refers to the same period line loss, theoretical line loss, regional line loss, or district-level line loss; Ambiguity in time: For example, "recently," "last week," and "during the peak summer season" are not linked to specific statistical windows;

[0086] Implicit rules are missing: For example, if a user says "frequent power outages in the community", but the business rules such as "power outages ≥ N times within the year" or "repeated power outages in the last M days" are not explicitly provided.

[0087] Specifically, in the process of making latent content explicit based on historical dialogues and user profiles, the process involves obtaining the confirmed dimensions, locked jurisdictions, preceding filtering conditions, and preceding indicator subjects from historical dialogues, as well as the job roles, jurisdictions, business lines, common analysis scenarios, and permission boundaries from user profiles. For the current user question, context inheritance and latent content restoration are performed: if the current question omits the subject, the most recently determined indicator subject or equipment subject from the historical dialogue is inherited; if the current question does not include the jurisdiction, the hierarchical constraints of "city-district-power station-transformer area" are completed based on the governing organization in the user profile.

[0088] If the current question uses business jargon, it is mapped to a standard business phrase in the semantic enhancement layer. If the current question triggers implicit business rules, the implicit rules are converted into explicit filtering conditions, rather than simply retaining natural language expressions. For example, if a historical conversation has confirmed "Power Supply Station A of a certain district company," and the user continues to ask "Which public transformer substations have abnormal line losses?", the system does not literally split "public transformer substation" into "public transformer + substation" for retrieval. Instead, it uses the semantic enhancement layer to disambiguate the term as "substations with equipment ownership status = 'public transformer'," and inherits the implicit conditions of "Power Supply Station A's jurisdiction, statistical period of last month, line loss of the same period, and abnormal threshold of high / negative loss rules," thus obtaining a clear query intent.

[0089] Specifically, the process generates structured enhanced questions instead of just natural language rewrites. It organizes the disambiguated business objects, indicator definitions, dimensional constraints, time windows, filtering rules, and organizational permissions into a structured enhanced representation, which is then used to generate enhanced questions. The enhanced questions preferably include: standard indicator names; clearly defined indicator subjects, such as "distribution transformer side load" or "electricity sales to users within the distribution transformer area"; clearly defined statistical periods and granularity; clearly defined business filtering conditions; clearly defined organizational / data permission boundaries; and explicitly listed implicit business rules. An example enhanced result could be: querying the line loss rate of distribution transformers within the jurisdiction of Power Supply Station A with equipment ownership status = 'public transformer' from September 1, 2026 to September 30, 2026; the filtering condition is a line loss rate higher than a high-loss threshold or lower than a negative-loss threshold; the indicator subject is the distribution transformer-level line loss during the same period, not using distribution transformer equipment load to replace the distribution transformer electricity sales caliber. This enhanced question is then used for multi-way recall and rearrangement in S2, and for SQL candidate generation in S3.

[0090] Specifically, in the design of verifiability of enhanced questions, the enhanced questions are traceable and verifiable intermediate semantic objects: each disambiguated word can be traced back to the standard business node in the semantic enhancement layer; each completed latent condition can be labeled as originating from "historical dialogue inheritance", "user profile completion" or "business rule injection"; if the disambiguation confidence is lower than the threshold, targeted clarification or output of a set of multiple hypothesis enhanced questions is triggered, and secondary correction is performed in the SQL verification stage of S3 through execution plan / result scale / caliber conflict detection.

[0091] Specifically, multi-path recall and ranking are performed based on enhanced questions and knowledge data, and the calculation formula is as follows:

[0092] ;

[0093] ;

[0094] ;

[0095] ;

[0096] in, To enhance the query vector obtained by encoding the question; A document vector obtained by encoding knowledge entries in knowledge data; Score the similarity of dense vectors; Cosine similarity; It is an L2 norm; Standardized density similarity score; The standardized sparse retrieval score; To enhance the sparse retrieval score between questions and knowledge entries; This represents the mean of the density similarity of the current candidate knowledge items; The standard deviation of the density similarity of the current candidate knowledge items; This represents the mean score of the sparse retrieval for the current candidate knowledge items. The standard deviation of the sparse retrieval score for the current candidate knowledge item; For dense scoring weights; The final merge and rearrangement score;

[0097] Sort the knowledge items from highest to lowest according to the final fusion and rearrangement scores, and select the top N knowledge items as the recalled knowledge, where N is a positive integer.

[0098] Specifically, after obtaining the recall knowledge, the process also includes: performing query intent analysis and ambiguity detection based on the enhanced question and the recall knowledge; if the enhanced question has missing key information or unclear query intent, a clarification query is initiated to obtain the clarified question; the enhanced question is replaced with the clarified question; and SQL candidates are generated based on the clarified question and the recall knowledge.

[0099] Specifically, in S2, the user's question is semantically enhanced to obtain an enhanced question. This includes: semantically enhancing the original question based on information such as the user's input question and historical dialogue records; the original question: "Which transformer substations have more than 2,000 connected users?"; after semantic enhancement: "Which transformer substations are identified as public transformers and have more than 2,000 connected users?".

[0100] Specifically, multi-path recall and ranking are performed based on augmented questions and knowledge data. This includes: using vector similarity to perform multi-path recall (Hybrid Search) and ranking based on augmented questions, relevant table schema information, domain knowledge, and sample question-answer pairs; performing ANN search on multiple fields such as dense vectors and sparse vectors (BM25), and then performing fusion ranking through a WeightedRanker fusion ranking strategy. Domain knowledge is used to address the problem of implicit rules being ignored; for example, when a user doesn't explicitly state it, it generally refers to a user whose status is not equal to "demolished." Table schemas are used to help large models supplement relevant information about business table structures. Sample question-answer pairs are used to provide small-shot learning cases for large models.

[0101] Specifically, after obtaining the recall knowledge, the process also includes: performing query intent analysis and ambiguity detection based on the enhanced question and the recall knowledge. If the enhanced question lacks key information or the query intent is unclear, a clarification query is initiated to obtain the clarified question. The clarified question replaces the enhanced question, and SQL candidates are generated based on the clarified question and the recall knowledge. For example, the question "Which transformer substations have more than 2,000 connected users?" asks whether the user wants to query users who are not in a dismantled state or all users, with states including [newly built, in operation, out of operation... dismantled].

[0102] S3, based on enhanced questions and recall knowledge, generates SQL candidates through a pre-set large model, performs SQL syntax and semantic verification on the SQL candidates, and if the verification fails, it rethinks and corrects and regenerates SQL candidates, outputting executable SQL.

[0103] Specifically, SQL candidates are subjected to SQL syntax and semantic validation. If the validation fails, the SQL candidates are revised and regenerated. This includes:

[0104] S31, Perform SQL syntax validation on the SQL candidates and obtain the syntax validation result; Perform semantic validation on the SQL candidates and obtain the semantic validation result;

[0105] S32, If the syntax check result or semantic check result indicates that it fails, extract the reason for the failure and generate error feedback information;

[0106] S33: Input SQL candidates, error feedback information, enhanced or clarified questions, recall knowledge, user profiles and historical dialogues into a preset large model to generate corrected SQL candidates;

[0107] S34, re-execute SQL syntax and semantic checks on the corrected SQL candidate until the checks pass.

[0108] Specifically, the SQL validation process performs SQL syntax and semantic validation on new question-SQL pairs based on user history, user profile information, and domain knowledge; and it reflects on and corrects the problems found when validation fails.

[0109] Specifically, Figure 3 The demonstration showcases the overall process of generating intelligent question data and data insights: Users input questions through a unified question data window, which then enters the natural language to SQL module via the question data API service. Under access control and knowledge agent support, a large model generates prompts and SQL candidates. After SQL checks and corrections, the SQL is executed to access the data platform, returning the data query results. Subsequently, the enhanced analysis module performs data visualization, data interpretation, and insight analysis, ultimately returning the enhanced analysis results. The bottom also includes support functions such as question data service management and operation, API configuration and operation monitoring, table field schema maintenance, knowledge supplementation and correction, domain knowledge maintenance, and sample question-and-answer pair maintenance.

[0110] S4 executes executable SQL and accesses the data platform to obtain query results and identify the analyzable types of the query results.

[0111] Specifically, it executes executable SQL and accesses the data platform to obtain query results, identifying the analyzable types of the query results, including:

[0112] S41, Execute the executable SQL, obtain the query results through the data platform interface, and perform structured parsing on the query results to obtain structured parsing results;

[0113] S42, Identify the analyzable type of the query results based on the structured parsing results; the analyzable types include current status statistics, trend analysis, attribution analysis, predictive analysis, and sensitivity analysis.

[0114] S43. If the structured analysis result includes time series fields and target indicators, and the continuous change of the target indicators over time meets preset conditions, it is identified as a trend analysis type; if the structured analysis result includes target indicators and a preset number of influencing factors, it is identified as an attribution analysis type; if the structured analysis result includes future time windows, prediction requests, or prediction identifiers, it is identified as a predictive analysis type; if the structured analysis result includes factor adjustment amounts or indicator response relationships, it is identified as a sensitivity analysis type; otherwise, it is identified as a current status statistics type.

[0115] S5, according to the analyzable type, call the data insight paradigm to perform data analysis on the query results, obtain the analysis results, input the analysis results into the large model for reasoning, generate data interpretation text and insight summary, perform rationality verification on the data interpretation text and insight summary, and output the intelligent insight of power grid operation data after the verification is passed; the data insight paradigm is a pre-configured set of data analysis rules corresponding to the analyzable type.

[0116] Specifically, the data insight paradigms include the current status quo statistical paradigm, the trend insight paradigm, the attribution analysis paradigm, and the predictive analysis paradigm:

[0117] The current status statistical paradigm is used to calculate at least one of the following for query results: year-on-year and month-on-month comparison, ranking, median, percentage, total, mean, and distribution.

[0118] The trend insight paradigm is used to fit the trend and identify abrupt changes in the target indicator, and to obtain at least one of the following: trend rise and fall, periodic fluctuation and staged abrupt change.

[0119] The attribution analysis paradigm is used to quantify the contribution of influencing factors to changes in the target indicator using XGBoost and SHAP.

[0120] The predictive analysis paradigm is used to output future predicted values ​​of target indicators and to calculate the score of changes in target indicators and expected business impact based on changes in influencing factors.

[0121] Specifically, the data interpretation text and insight summaries undergo a rationality check. Once the check passes, intelligent insights into power grid operation data are output, including:

[0122] Perform data consistency checks on the data interpretation text and insight summaries, verifying whether the cited values, year-on-year and month-on-month comparisons, percentages, sorting, trend directions, and query results are consistent;

[0123] Perform dimensional verification on the data interpretation texts and insight summaries to check whether their units, orders of magnitude, and statistical scope are consistent with the indicator definitions.

[0124] Perform business rule validation on the data interpretation text and insight summary to verify whether their conclusions comply with the business constraints of domain knowledge in the recalled knowledge;

[0125] Verify the sources cited in data interpretation texts and insight summaries, and verify whether their conclusions are supported by query results, analysis results, or domain knowledge.

[0126] If any of the above checks fails, the reason for the failure is extracted and fed back to the preset large model for regeneration; if all the above checks pass, intelligent insights into power grid operation data are output.

[0127] Specifically, Figure 4 The NL2SQL sub-process is demonstrated: NL2SQL is a prior art step in the natural language to SQL conversion process of this invention. By adding semantic enhancement and multi-path recall, SQL validation and reflection, analyzable type identification, and data insight paradigm analysis before and after it, it upgrades from a simple natural language to SQL conversion to an end-to-end generation method from natural language queries to interpretable intelligent insights. Users select a scenario and enter a question through a question window. The system first performs a question similarity comparison. If similar, it directly retrieves existing SQL; if dissimilar, it performs effective intent recognition. If there is ambiguous information, it guides the user to clarify; if the intent is valid, it performs object recall and generates prompt words. SQL is generated from the large model; the generated SQL then enters the SQL checking and correction stage, where SQL syntax and semantic checks are performed sequentially, and SQL corrections are made if they fail; at the same time, the access control module provides table authentication, field authentication, row authentication, and data record authentication, and completes SQL condition information; the relational database in the knowledge base provides table field schema information, domain knowledge information, sample question-answer pair information, and user history questions, the vector library provides vectorized data, and the full-text search library provides business data, supporting recall through vector calculation and narrowing the table scope; finally, SQL is output for subsequent data querying and enhanced analysis.

[0128] Specifically, Figure 5 The process of data visualization, interpretation, and insight is demonstrated: After a user inputs a natural language question, the query is converted to SQL and accessed through a data platform to obtain the results. The system first assesses the analyzable types and then proceeds to either the data visualization and interpretation process or the data insight process based on the type. The data visualization and interpretation process involves recommending visualization types based on prompts, generating visualization configuration parameters, rendering the visualization, and generating the data interpretation. The data insight process involves in-depth data interpretation, indicator trend insight, data attribution analysis, and data impact analysis, ultimately generating a summary of insightful results. This process is supported by both large-scale and specialized models. For example, users can request a summary of the data and obtain overall trend conclusions, or analyze the reasons for the low electricity sales in February and provide explanations in conjunction with factors such as the Spring Festival holiday.

[0129] Specifically, in one application example, when a user inputs "Which public transformer substations have more than 2000 connected users?", the system first performs intent recognition and task routing, classifying it as a question-based query. The system extracts the business theme as "public transformer substation," the filtering condition as "number of connected users greater than 2000," the statistical dimension as "substation," and the return type as "list," and routes the query to the SQL generator. Subsequently, the system semantically enhances the question, transforming it into "Which public transformer substations have more than 2000 connected users?" It also identifies the ambiguous status range of "users" and initiates a clarification question to the user: "Do you mean users in the non-dismantled state, or do you mean users in all states?" After the user confirms that they only want to query users in the non-dismantled state, the system replaces the enhanced question with the clarified question.

[0130] Next, the system extracts keywords "public transformer area," "user," "connection," and "exceeding" from the enhanced questions. Based on the keywords (sparse vectors) and the enhanced questions (dense vectors), a vector knowledge base retrieval and recall is performed. The sparse vectors are matched using BM25, and the dense and sparse vectors are searched for similarity. The recalled table schema information, domain knowledge, and sample question-answer pairs are then re-ranked using a WeightedRanker fusion and re-ranking strategy. The top 5 re-ranked knowledge blocks are selected as the recalled knowledge. Domain knowledge includes user profile status descriptions, table schemas include table creation information such as industry electricity volume tables, and sample question-answer pairs include historical question count SQL pairs.

[0131] The system generates SQL candidates based on recalled knowledge and clarified questions, and performs SQL syntax and semantic checks. If the checks fail, the reasons for the failure are extracted and error feedback is generated. The SQL candidates, error feedback, enhanced or clarified questions, recalled knowledge, user profiles, and historical dialogues are input into a large model to generate revised SQL candidates until the checks pass. During permission checks, the system queries the user's permissions based on the account permission table and combines the table's metadata information to determine the current table's hierarchical classification information. For example, if a user writes to level 3 and reads from level 4, and the table's hierarchical classification information is level 4 power grid production and operation data, then the user's read permission is not less than the table's hierarchical classification, and therefore, the user is deemed to have permission to access the data. After executing executable SQL and accessing the data platform to obtain query results, the system performs structured parsing of the query results and identifies analyzable types. Based on the type, it calls at least one of the following paradigms for analysis: current status statistics, trend insight, attribution analysis, and predictive analysis. For example, it calculates statistical information such as year-on-year and month-on-month comparisons, ranking, median, and percentage; performs trend fitting and abrupt change identification; and uses XGBoost and SHAP to quantify the contribution of influencing factors to changes in target indicators. It outputs the future predicted value of the target indicator and a business-expected impact score. Finally, the analysis results are input into a large model to generate data interpretation text and insight summaries. The data interpretation text and insight summaries undergo data consistency verification, unit verification, business rule verification, and source verification. After successful verification, intelligent insights into power grid operation data are output.

[0132] like Figure 6 As shown, this embodiment also discloses a device for generating intelligent insights from power grid operation data based on a large model, including:

[0133] The semantic extraction module 61 is used to obtain source database tables and original files, perform semantic extraction on the source database tables to obtain table and field metadata, perform knowledge processing on the original files to obtain domain knowledge and sample question-answer pairs, and integrate the table and field metadata, domain knowledge and sample question-answer pairs into knowledge data.

[0134] The semantic enhancement module 62 is used to acquire user questions, historical dialogues and knowledge data, and to enhance user questions by performing power grid business semantic normalization, contextual hidden intent restoration and implicit rule explicit enhancement to obtain enhanced questions. Based on the enhanced questions and knowledge data, multi-path recall and rearrangement are performed to obtain recalled knowledge.

[0135] SQL statement output module 63 is used to generate SQL candidates based on enhanced questions and recall knowledge through a preset large model, perform SQL syntax and semantic verification on the SQL candidates, and if the verification fails, it will reflect, correct and regenerate the SQL candidates, and output executable SQL.

[0136] The analyzable type acquisition module 64 is used to execute executable SQL and access the data platform to obtain query results and identify the analyzable type of the query results;

[0137] The intelligent insight output module 65 is used to call the data insight paradigm according to the analyzable type to perform data analysis on the query results, obtain the analysis results, input the analysis results into the large model for reasoning, generate data interpretation text and insight summary, perform rationality verification on the data interpretation text and insight summary, and output the intelligent insight of power grid operation data after the verification is passed; the data insight paradigm is a pre-configured set of data analysis rules corresponding to the analyzable type.

[0138] The specific implementation of the method and device for generating intelligent insights from power grid operation data based on large models is the same as that for generating intelligent insights from power grid operation data based on large models, and will not be described again in this embodiment.

[0139] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.

Claims

1. A method for generating intelligent insights from power grid operation data based on a large model, characterized in that, Includes the following steps: S1: Obtain the source database table and original file; perform semantic extraction on the source database table to obtain table and field metadata; perform knowledge processing on the original file to obtain domain knowledge and sample question-answer pairs; and integrate the table and field metadata, domain knowledge and sample question-answer pairs into knowledge data. S2, obtain user questions, historical dialogues and knowledge data, perform power grid business semantic normalization, contextual hidden intent restoration and implicit rule explicit enhancement on user questions to obtain enhanced questions, perform multi-path recall and rearrangement based on enhanced questions and knowledge data to obtain recalled knowledge; S3, based on enhanced questions and recall knowledge, generates SQL candidates through a pre-set large model, performs SQL syntax and semantic verification on the SQL candidates, and if the verification fails, it rethinks and corrects and regenerates SQL candidates, outputting executable SQL. S4 executes executable SQL and accesses the data platform to obtain query results and identify the analyzable types of the query results; S5, according to the analyzable type, call the data insight paradigm to perform data analysis on the query results, obtain the analysis results, input the analysis results into the large model for reasoning, generate data interpretation text and insight summary, perform rationality verification on the data interpretation text and insight summary, and output the intelligent insight of power grid operation data after the verification is passed; the data insight paradigm is a pre-configured set of data analysis rules corresponding to the analyzable type.

2. The method for generating intelligent insights from power grid operation data based on a large model according to claim 1, characterized in that, In S1, semantic extraction is performed on the source database tables, specifically including: extracting table semantics and field semantics, completing, aligning, disambiguating and encoding mapping to obtain table and field metadata and labeled data, vectorizing the labeled data to obtain vectorized data, and storing the vectorized data in a vector library; storing the table and field metadata, domain knowledge and sample question-answer pairs in a relational database, vector library, ES database or graph database.

3. The method for generating intelligent insights from power grid operation data based on a large model according to claim 1, characterized in that, In S2, the user's questions are enhanced by performing power grid business semantic normalization, contextual hidden intent restoration, and implicit rule explicitization, resulting in enhanced questions, specifically including: S21. Based on table and field metadata, domain knowledge and sample question-and-answer pairs, perform business semantic correction and normalization on table names, field names, enumeration values ​​and encoded values ​​in the source database table to establish the mapping relationship between the source database table structure and business objects, indicator calibers and statistical rules, and obtain the field semantic mapping table. S22, perform word segmentation, entity recognition and business phrase extraction on user questions to obtain candidate business entities, align the candidate business entities with the field semantic mapping table to identify the missing implicit rules in user questions and obtain ambiguity recognition results; S23, combining historical dialogues, user profiles and ambiguity recognition results, performs context inheritance and hidden content restoration on user questions to obtain explicit query conditions; S24, Generate a structured enhanced representation based on explicit query conditions, and generate an enhanced question based on the structured enhanced representation; S25. Based on the enhanced question and ambiguity recognition results, check whether the ambiguity has been eliminated. If it has not been eliminated, trigger targeted clarification and perform secondary correction. If it has been eliminated, output the enhanced question.

4. The method for generating intelligent insights from power grid operation data based on a large model according to claim 3, characterized in that, In S23, combining historical dialogues, user profiles, and ambiguity identification results, context inheritance and hidden content restoration are performed on user questions, specifically including: Extract confirmed dimensions, locked jurisdictions, preceding filter conditions, and preceding indicator subjects from the user's historical dialogues as the inheritance context; The user profile is analyzed to extract job roles, scope of responsibility, business lines, and permission boundaries, which serve as constraints for the profile. Based on the inherited context, profile constraints, and ambiguity recognition results, semantic completion and restoration are performed on the omitted subjects, missing jurisdictions, colloquial business expressions, and implicit business rules not explicitly given in the current user's question. The restored implicit business rules are then converted into explicit filtering conditions to obtain explicit query conditions.

5. The method for generating intelligent insights from power grid operation data based on a large model according to claim 1, characterized in that, In S2, multi-way recall and ranking are performed based on enhanced questions and knowledge data, and the calculation formula is as follows: ; ; ; ; in, To enhance the query vector obtained by encoding the question; A document vector obtained by encoding knowledge entries in knowledge data; Score the similarity of dense vectors; Cosine similarity; It is an L2 norm; Standardized density similarity score; The standardized sparse retrieval score; To enhance the sparse retrieval score between questions and knowledge entries; This represents the mean of the density similarity of the current candidate knowledge items; The standard deviation of the density similarity of the current candidate knowledge items; This represents the mean score of the sparse retrieval for the current candidate knowledge items. The standard deviation of the sparse retrieval score for the current candidate knowledge item; For dense scoring weights; The final merge and rearrangement score; Sort the knowledge items from highest to lowest according to the final fusion and rearrangement scores, and select the top N knowledge items as the recalled knowledge, where N is a positive integer.

6. The method for generating intelligent insights from power grid operation data based on a large model according to claim 1, characterized in that, In S2, after obtaining the recall knowledge, the process also includes: performing query intent analysis and ambiguity detection based on the enhanced question and the recall knowledge; if the enhanced question has missing key information or unclear query intent, a clarification query is initiated to obtain the clarified question; the enhanced question is replaced with the clarified question; and SQL candidates are generated based on the clarified question and the recall knowledge.

7. The method for generating intelligent insights from power grid operation data based on a large model according to claim 1, characterized in that, In S3, SQL candidates undergo SQL syntax and semantic validation. If the validation fails, the SQL candidates are re-evaluated, corrected, and regenerated. Specifically, this includes: S31, Perform SQL syntax validation on the SQL candidates and obtain the syntax validation result; Perform semantic validation on the SQL candidates and obtain the semantic validation result; S32, If the syntax check result or semantic check result indicates that it fails, extract the reason for the failure and generate error feedback information; S33: Input SQL candidates, error feedback information, enhanced or clarified questions, recall knowledge, user profiles and historical dialogues into a preset large model to generate corrected SQL candidates; S34, re-execute SQL syntax and semantic checks on the corrected SQL candidate until the checks pass.

8. The method for generating intelligent insights from power grid operation data based on a large model according to claim 1, characterized in that, In S4, executable SQL is executed and access to the data platform is obtained to identify the analyzable types of the query results, specifically including: S41, Execute the executable SQL, obtain the query results through the data platform interface, and perform structured parsing on the query results to obtain structured parsing results; S42, Identify the analyzable type of the query results based on the structured parsing results; the analyzable types include current status statistics, trend analysis, attribution analysis, predictive analysis, and sensitivity analysis. S43. If the structured analysis result includes time series fields and target indicators, and the continuous change of the target indicators over time meets preset conditions, it is identified as a trend analysis type; if the structured analysis result includes target indicators and a preset number of influencing factors, it is identified as an attribution analysis type; if the structured analysis result includes future time windows, prediction requests, or prediction identifiers, it is identified as a predictive analysis type; if the structured analysis result includes factor adjustment amounts or indicator response relationships, it is identified as a sensitivity analysis type; otherwise, it is identified as a current status statistics type.

9. The method for generating intelligent insights from power grid operation data based on a large model according to claim 8, characterized in that, In S5, the data insight paradigms include the current status quo statistical paradigm, the trend insight paradigm, the attribution analysis paradigm, and the predictive analysis paradigm: The current status statistical paradigm is used to calculate at least one of the following for query results: year-on-year and month-on-month comparison, ranking, median, percentage, total, mean, and distribution. The trend insight paradigm is used to fit the trend and identify abrupt changes in the target indicator, and to obtain at least one of the following: trend rise and fall, periodic fluctuation and staged abrupt change. The attribution analysis paradigm is used to quantify the contribution of influencing factors to changes in the target indicator using XGBoost and SHAP. The predictive analysis paradigm is used to output future predicted values ​​of target indicators and to calculate the score of changes in target indicators and expected business impact based on changes in influencing factors.

10. The method for generating intelligent insights from power grid operation data based on a large model according to claim 1, characterized in that, In S5, the data interpretation text and insight summary undergo a rationality check. After passing the check, intelligent insights into power grid operation data are output, specifically including: Perform data consistency checks on the data interpretation text and insight summaries, verifying whether the cited values, year-on-year and month-on-month comparisons, percentages, sorting, trend directions, and query results are consistent; Perform dimensional verification on the data interpretation texts and insight summaries to check whether their units, orders of magnitude, and statistical scope are consistent with the indicator definitions. Perform business rule validation on the data interpretation text and insight summary to verify whether their conclusions comply with the business constraints of domain knowledge in the recalled knowledge; Verify the sources cited in data interpretation texts and insight summaries, and verify whether their conclusions are supported by query results, analysis results, or domain knowledge. If any of the above checks fails, the reason for the failure is extracted and fed back to the preset large model for regeneration; if all the above checks pass, intelligent insights into power grid operation data are output.

11. A device for generating intelligent insights from power grid operation data based on a large model, characterized in that, include: The semantic extraction module is used to obtain source database tables and original files, perform semantic extraction on the source database tables to obtain table and field metadata, perform knowledge processing on the original files to obtain domain knowledge and sample question-answer pairs, and integrate the table and field metadata, domain knowledge and sample question-answer pairs into knowledge data. The semantic enhancement module is used to acquire user questions, historical dialogues and knowledge data, and to enhance user questions by performing power grid business semantic normalization, contextual hidden intent restoration and implicit rule explicit enhancement to obtain enhanced questions. Based on the enhanced questions and knowledge data, multi-path recall and rearrangement are performed to obtain recalled knowledge. The SQL statement output module is used to generate SQL candidates based on enhanced questions and recall knowledge through a preset large model. It performs SQL syntax and semantic verification on the SQL candidates. If the verification fails, it rethinks, corrects, and regenerates the SQL candidates, and outputs executable SQL. The analyzable type acquisition module is used to execute executable SQL and access the data platform to obtain query results and identify the analyzable type of the query results; The intelligent insight output module is used to call the data insight paradigm according to the analyzable type to perform data analysis on the query results, obtain the analysis results, input the analysis results into the large model for reasoning, generate data interpretation text and insight summary, perform rationality verification on the data interpretation text and insight summary, and output intelligent insights on power grid operation data after the verification is passed; the data insight paradigm is a pre-configured set of data analysis rules corresponding to the analyzable type.