An energy data analysis method and system based on large models and proprietary knowledge bases

By building graph convolutional networks and large language models combined with proprietary knowledge bases, energy data analysis methods are optimized, and the accuracy and real-time problems of multi-source heterogeneous energy data are solved, achieving more efficient energy data analysis and real-time updates.

CN120179869BActive Publication Date: 2025-07-29NANJING DEEPCTRLS TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510654328.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-21
Publication Date
2025-07-29
Estimated Expiration
2045-05-21

AI Technical Summary

Technical Problem

When facing complex multi-source heterogeneous energy data, the data integration is inaccurate, weak correlation and dynamic change modeling capabilities, and lack effective inference chain construction and optimization mechanisms, which makes it difficult to meet actual needs of the accuracy and real-time analysis results.

Method used

Multi-source energy data is collected, divided into four types of energy points, a graph convolutional network GCN model is constructed, a graph structure is generated, a subquery is generated based on the graph structure, an initial answer is obtained using the LLM model, a directed dependency graph is constructed, an initial global reasoning chain is generated, and an expert knowledge base is interacted with the inference chain, a dynamic tree reasoning structure is constructed, and branch adjustment is performed based on the artificial potential field. Finally, the LLM model is used to obtain the energy data analysis results, and trace and real-time updates are performed.

Benefits of technology

It improves the accuracy and transparency of energy data analysis, enhances the system's ability to adapt to changes in energy data, and improves the controllability and real-timeness of inference results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120179869B_ABST
    Figure CN120179869B_ABST
Patent Text Reader

Abstract

The present invention discloses an energy data analysis method and system based on a large model and a proprietary knowledge base, which relates to the technical field of energy data analysis and intelligent reasoning. It includes collecting multi-source energy data and preprocessing it, classifying the multi-source energy data into four types of energy points, calculating the characteristics of the energy points and connecting the energy points, detecting and optimizing the connection degree, constructing a two-layer graph convolutional network (GCN) model to generate a graph structure; generating sub-queries based on the graph structure, obtaining an initial answer using the LLM model, generating an initial global reasoning chain, interacting the proprietary knowledge base with the initial global reasoning chain, optimizing the initial global reasoning chain, constructing a dynamic tree-shaped reasoning structure, performing dynamic branch adjustment based on the artificial potential field, and optimizing the reasoning path; through the combination mechanism of the graph convolutional network (GCN) model, the LLM model, and the proprietary knowledge base, the accuracy of reasoning is improved, and the artificial potential field is used to dynamically adjust the reasoning path, enhancing the dynamic optimization ability of the reasoning chain.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of energy data analysis and intelligent reasoning, and particularly to an energy data analysis method and system based on a large model and a proprietary knowledge base. Background Art

[0002] With the rapid development of information technology, the collection and analysis of energy data have gradually become an important part of energy management and decision-making. Especially under the promotion of big data, artificial intelligence (AI) and Internet of Things (IoT) technologies, the methods for collecting and analyzing energy data are becoming increasingly diverse. In the early stage, the analysis methods of energy data mainly relied on traditional statistical analysis and simple regression models, with low processing efficiency and poor accuracy, making it difficult to adapt to complex energy systems. With the rise of machine learning and deep learning technologies, data-driven prediction models have gradually replaced traditional methods, providing more accurate predictions and optimization solutions by mining a large amount of historical energy data.

[0003] Despite certain progress in the prior art, there are still multiple problems. When faced with complex multi-source heterogeneous energy data, the prior art has certain limitations, which easily lead to inaccurate data integration, thereby affecting the accuracy of the analysis results. The prior art has weak modeling capabilities for the correlation and dynamic changes between data, often ignoring the interdependent relationships between energy points. The prior art still has certain deficiencies in constructing accurate graph structures, optimizing inference paths, and enhancing dynamic adjustments during the inference process. Especially in the analysis of multi-source energy data, there is a lack of effective inference chain construction and optimization mechanisms, making it difficult for the accuracy and real-time performance of the inference process to meet actual requirements. Summary of the Invention

[0004] In view of the above existing problems, the present invention is proposed.

[0005] Therefore, the present invention provides an energy data analysis method based on a large model and a proprietary knowledge base to solve the problems that the prior art has certain limitations when faced with complex multi-source heterogeneous energy data, which easily leads to inaccurate data integration, thereby affecting the accuracy of the analysis results. The prior art has weak modeling capabilities for the correlation and dynamic changes between data, often ignoring the interdependent relationships between energy points. The prior art still has certain deficiencies in constructing accurate graph structures, optimizing inference paths, and enhancing dynamic adjustments during the inference process. Especially in the analysis of multi-source energy data, there is a lack of effective inference chain construction and optimization mechanisms, making it difficult for the accuracy and real-time performance of the inference process to meet actual requirements.

[0006] To solve the above technical problems, the present invention provides the following technical solutions:

[0007] In a first aspect, the present invention provides an energy data analysis method based on a large model and a proprietary knowledge base, which includes:

[0008] Collect multi-source energy data and preprocess it, divide the multi-source energy data into four types of energy points, calculate the characteristics of the energy points and perform energy point connection, detect and optimize the connection degree, construct a two-layer graph convolutional network (GCN) model, and generate a graph structure;

[0009] Generate subqueries based on the graph structure, use the LLM model to obtain initial answers, construct a directed dependency graph, generate an initial global inference chain, interact the proprietary knowledge base with the initial global inference chain, optimize the initial global inference chain, map the optimized inference chain to the nodes of a tree, construct a dynamic tree-shaped inference structure, perform dynamic branch adjustment based on the artificial potential field, and optimize the inference path;

[0010] Use the LLM model based on the optimal inference path to obtain the energy data analysis result, trace each inference process, and optimize the energy data analysis result based on the tracing result;

[0011] Store the data generated during the inference process and update the system with real-time data.

[0012] As a preferred solution of the energy data analysis method based on a large model and a proprietary knowledge base according to the present invention, wherein: the collection of multi-source energy data and preprocessing, constructing a model, and generating a graph structure include:

[0013] The multi-source energy data includes power consumption time series, equipment operation status, climate, and energy price data;

[0014] Divide the preprocessed multi-source energy data into four types of energy points, generate an energy point set, calculate the electricity feature vector using the time feature engineering method, calculate the feature vectors of equipment, weather, and price respectively using the feature combination method, and generate a feature vector set;

[0015] Use the equipment-driven association method to construct energy connections, generate an energy connection set from all energy connections, construct an initial energy graph, perform connection degree detection using the graph structure balancing method, and perform dynamic adjustment and connection simplification operations based on the detection result to obtain an optimized energy graph;

[0016] Collect historical multi-source energy data, perform preprocessing and feature extraction, and use it as a training set;

[0017] Build a two-layer Graph Convolutional Network (GCN) model, define a loss function to supervise the task, use the feature vectors of the training set as input, perform iterative training, stop the iteration after reaching the maximum number of iterations, output the optimized model weight parameters, apply them to the two-layer GCN model, use the feature vector set as input to obtain the final enhanced embedding set, and add it to the optimized energy graph to obtain the graph structure.

[0018] As a preferred solution of the energy data analysis method based on a large model and a proprietary knowledge base according to the present invention, wherein: generating an initial global inference chain, interacting the proprietary knowledge base with the initial global inference chain, optimizing the initial global inference chain, constructing a dynamic tree-shaped inference structure, and performing dynamic branch adjustment based on an artificial potential field. Optimizing the inference path includes:

[0019] Using the task prompt decomposition method to divide it into sub-queries, generating a list of sub-queries, and inputting them together with the graph structure into a pre-configured large language model (LLM) to generate initial answers, calculating the confidence of the answers, using the fixed threshold screening method to screen the initial answers with the confidence of the answers greater than the corresponding answer confidence threshold, and generating an initial answer set;

[0020] Based on the dependency relationship between sub-queries in the sub-query list, constructing a directed dependency graph, generating an initial global inference chain, and using a pre-trained DistilBERT model for each sub-query to generate a question vector;

[0021] Collect the document data of the proprietary knowledge base and perform preprocessing, use FAISS to build a document index, generate knowledge base vectors through a pre-trained DistilBERT model, calculate the cosine similarity between the question vector and the knowledge base vectors, perform a k-nearest neighbor search on the question vector through the document index built by FAISS to obtain a candidate document set, segment it by natural paragraphs, and use a pre-trained DistilBERT model to generate paragraph vectors;

[0022] Calculate the cosine similarity between the paragraph vector and the question vector to obtain candidate answer texts, use the question-answering model of the pre-trained SpanBERT to extract the answer fragments that best match the sub-query, calculate the confidence score of the answer fragments, perform a descending order sorting to obtain optimized answer vectors, calculate the answer similarity score between the vector of the initial answer and the vector of the optimized answer, sum the answer similarity score and the confidence score of the highest answer fragment vector using the weighted summation method to obtain a comprehensive consistency score, set a comprehensive consistency score threshold using the empirical method, compare it with the comprehensive consistency score, and perform operations based on the comparison result to obtain an optimized inference chain;

[0023] Map each sub-query-answer pair in the optimized inference chain to a node of the tree , use a pre-configured large language model (LLM) to evaluate sub-queries with other sub-queries for causal dependencies. If there are dependencies, add directed edges For each node in the tree calculate the initial weight. Otherwise, keep it unchanged. After adding the edges, use depth-first search to detect if there is a cycle. If there is a cycle, sort the initial weights of the nodes forming the cycle in descending order and remove the edges of the node with the lowest initial weight to obtain the initial dynamic tree inference structure ;

[0024] For each node in the tree calculate the initial consistency score and compare it with the set initial consistency threshold. Based on the comparison result, use depth-first search (DFS) to backtrack to its parent node to generate a list of low-consistency nodes and generate alternative sub-queries Input the alternative sub-queries into the pre-configured large language model (LLM) to generate new answers and generate new nodes for the tree along with the alternative sub-queries calculate the new consistency score Compare the new consistency score with the initial consistency score Based on the difference in the comparison result, perform operations to replace and retain nodes in the tree to obtain the updated dynamic tree inference structure Traverse all paths from the root to the leaves in the updated dynamic tree inference structure Each path contains a set of nodes. Calculate the comprehensive score for each path and sort them in descending order. Select the path with the highest score as the optimal path.

[0025] As a preferred solution of the energy data analysis method based on a large model and a proprietary knowledge base according to the present invention, wherein: the energy data analysis result is obtained using the LLM model based on the optimal inference path, including:

[0026] Collect the answers of each node in the tree from the optimal path, arrange the answers according to the logical order of energy data analysis to form an analysis answer list;

[0027] The logical order of the energy data analysis includes checking the source nodes of each answer, determining their logical dependencies, inputting the analysis answer list into the pre-configured large language model (LLM), giving clear instructions based on the logical dependencies, and outputting the energy analysis result and explanation.

[0028] As a preferred solution of the energy data analysis method based on a large model and a proprietary knowledge base according to the present invention, wherein: tracing each inference process, and optimizing the energy data analysis result based on the tracing result, including:

[0029] Extract data from the optimized inference chain CoQ, perform structured processing using natural language processing NLP, generate corresponding tracing tags for each answer, and form a tracing set;

[0030] Extract a set of feature vectors from the graph structure, calculate the time decay weight for each feature using an exponential decay model, and weight each feature in the set of feature vectors using the time decay weight to optimize the energy analysis result, associate the final energy analysis result with the tracing set, and generate a structured output.

[0031] As a preferred solution of the energy data analysis method based on a large model and a proprietary knowledge base according to the present invention, wherein: storing the data generated by the inference process, including:

[0032] Convert the final analysis result, the tracing set, the graph structure, and the optimized inference chain into a unified JSON format, add metadata tags to each item of data, and generate a unique identifier for the data using a hash function to obtain the processed data;

[0033] Perform sharding processing on the processed data according to the identifier and timestamp, store the sharded data in a distributed database, ensure the balanced distribution of data shards among nodes through consistent hashing, record the sharding index at the same time, construct an inverted index to accelerate retrieval, and establish an adjacency list for the graph structure to store edge relationships.

[0034] As a preferred solution of the energy data analysis method based on a large model and a proprietary knowledge base according to the present invention, wherein: using a real-time data update system, including:

[0035] Align the real-time data and the stored sharded data in terms of time to generate a fusion data set, calculate the fusion confidence of the fused data, store the fusion data set and the fusion confidence and overwrite the old records to obtain the stored new data;

[0036] Update the graph structure and the updated inference chain according to the stored new data, and calculate the significance of data changes

[0037] Set a data change significance threshold based on experience. If the data change significance is greater than the data change significance threshold, enter the analysis stage, otherwise remain unchanged.

[0038] In a second aspect, the present invention provides a file encryption system, including,

[0039] A data collection and construction module for collecting and preprocessing multi-source energy data, classifying the multi-source energy data into four types of energy points, calculating the features of the energy points and connecting the energy points, detecting and optimizing the connectivity, constructing a two-layer graph convolutional network (GCN) model, and generating a graph structure;

[0040] An optimization module for generating subqueries based on the graph structure, obtaining an initial answer using an LLM model, constructing a directed dependency graph, generating an initial global inference chain, interacting the proprietary knowledge base with the initial global inference chain, and optimizing the initial global inference chain;

[0041] An inference chain path module for mapping the optimized inference chain to the nodes of a tree, constructing a dynamic tree-shaped inference structure, performing dynamic branch adjustment based on an artificial potential field, and optimizing the inference path;

[0042] An analysis and traceability module for obtaining energy data analysis results using an LLM model based on the optimal inference path, tracing each inference process, and optimizing the energy data analysis results based on the traceability results;

[0043] A storage and update module for storing the data generated during the inference process and updating the system with real-time data.

[0044] In a third aspect, the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and: when the computer program is executed by the processor, any step of the energy data analysis method based on a large model and a proprietary knowledge base as described in the first aspect of the present invention is implemented.

[0045] In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, and: when the computer program is executed by the processor, any step of the energy data analysis method based on a large model and a proprietary knowledge base as described in the first aspect of the present invention is implemented.

[0046] The beneficial effects of the present invention are as follows: the present invention collects and preprocesses multi-source energy data, divides the multi-source energy data into four categories of energy points, calculates the characteristics of the energy points and connects the energy points, detects and optimizes the connectivity, constructs a two-layer graph convolutional network (GCN) model, and generates a graph structure; generates subqueries based on the graph structure, uses the LLM model to obtain initial answers, constructs a directed dependency graph, generates an initial global reasoning chain, interacts the proprietary knowledge base with the initial global reasoning chain, optimizes the initial global reasoning chain, maps the optimized reasoning chain to a tree node, constructs a dynamic tree-shaped reasoning structure, performs dynamic branch adjustment based on an artificial potential field, and optimizes the reasoning path; obtains energy data analysis results based on the optimal reasoning path using the LLM model, traces each reasoning process, and optimizes the energy data analysis results based on the tracing results, thereby improving the accuracy of energy data analysis, enhancing the transparency and controllability of the reasoning results, and enhancing the system's adaptability to changes in energy data. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0048] Figure 1 This is a flow chart of the energy data analysis method based on a large model and a proprietary knowledge base in Example 1.

[0049] Figure 2 Schematic diagram of the energy data analysis system based on a large model and a proprietary knowledge base in Example 1.

[0050] Figure 3 This is a flow chart of the dynamic tree reasoning structure optimization process in Example 1.

[0051] Figure 4 Schematic diagram of the data storage and real-time update mechanism in Example 1. DETAILED DESCRIPTION

[0052] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.

[0053] In the following description, many specific details are set forth to facilitate a full understanding of the present invention, but the present invention may also be implemented in other ways different from those described herein, and those skilled in the art may make similar generalizations without violating the connotation of the present invention. Therefore, the present invention is not limited to the specific embodiments disclosed below.

[0054] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The term "in one embodiment" that appears in different places in this specification does not necessarily refer to the same embodiment, nor does it refer to a separate or selective embodiment that is mutually exclusive with other embodiments.

[0055] Example 1, with reference to Figures 1 to 4 , which is the first embodiment of the present invention, provides an energy data analysis method based on a large model and a proprietary knowledge base, comprising the following steps:

[0056] S1. Collect and preprocess multi-source energy data, classify the multi-source energy data into four types of energy points, calculate the characteristics of the energy points and connect them, detect and optimize the connectivity, build a two-layer graph convolutional network (GCN) model, and generate a graph structure.

[0057] Specifically, multi-source energy data is collected and pre-processed;

[0058] The multi-source energy data includes electricity consumption time series, equipment operating status (on / off status, power), climate (temperature and humidity), and energy price data;

[0059] The preprocessing includes aligning all data according to a unified timestamp, using statistical tests to verify the integrity of the multi-source energy data, filling missing values using a periodic regression imputation method, detecting and deleting outliers in the multi-source energy data using a sliding window Z-score anomaly detection method, and standardizing the multi-source energy data;

[0060] The pre-processed multi-source energy data is divided into four types of energy points, including electricity point, equipment point, weather point and price point;

[0061] Extract each time point from the preprocessed multi-source energy data The electricity consumption is calculated using the time feature engineering method to obtain the electricity consumption feature vector;

[0062] Extract static information (on / off status), hourly weather data, and hourly price data of each device from the preprocessed multi-source energy data. Use the feature combination method to calculate features and obtain the feature vectors of the device, weather, and price, respectively.

[0063] All energy points are converted into energy point sets, and all feature vectors are converted into feature vector sets;

[0064] Use the device-driven association method to build energy connections, including detecting the time of each device in the pre-processed multi-source energy data. The operating state (0 indicates off, 1 indicates on). If it is on, connect to the electrical device and calculate the intensity of the electrical device using feature multiplication;

[0065] Calculate the electricity change rate, price change rate, and weather change rate, and use the Pearson correlation coefficient to calculate the synchronization score of electricity-weather, calculate the synchronization score of electricity-price, and calculate the synchronization score of device-weather respectively. Use the empirical method to set the corresponding synchronization scores, make comparisons, and screen out the energy points greater than the corresponding thresholds for connection;

[0066] Generate an energy connection set based on all energy connections, construct an initial energy graph from the energy connection set and the energy point set, and use the graph structure balancing method to perform connection degree detection to obtain the qualified connection degree and the unqualified connection degree (insufficient connection degree);

[0067] For the unqualified connection degree, use the dynamic threshold adjustment method to dynamically adjust the thresholds of the synchronization score and response coefficient of the initial energy graph, and regenerate the energy connection set and the feature vector set according to the dynamically adjusted thresholds;

[0068] For the qualified connection degree, use the intensity quantile truncation method to streamline the connections;

[0069] Obtain the optimized energy graph based on the regenerated energy connection set, the streamlined connections, and the energy point set;

[0070] Set each energy point as a node of the graph, mark 1 for each edge of the optimized energy graph, and mark 0 for no edge;

[0071] Collect historical multi-energy data, perform preprocessing and feature extraction, and use it as the training set;

[0072] Construct a two-layer graph convolutional network GCN model, define the loss function to supervise the task, and the formula is as follows:

[0073] ,

[0074] Among them, is the mean square error, which is used to measure the gap between the model prediction value and the true value, is the number of nodes participating in training, is the output embedding of node v in the second layer, is the weight matrix of the prediction layer, with a dimension of 64×1, is the true value of node v;

[0075] Calculate the initial embedding based on the feature vectors of the training set, and the formula is as follows:

[0076] ,

[0077] in, is the output embedding of node v of the graph at layer 0, fixed to 64 dimensions, is the weight matrix of layer 0, with a dimension of 64× , is the input feature dimension (the electricity node is 1, the nodes of the device graph depend on the number of devices, the weather node is 2, and the price node is 1), is the eigenvector of node v in the graph, is the bias vector, dimension is 64;

[0078] Calculating dynamic edge weights , the formula is as follows:

[0079] ,

[0080] in, is the cosine similarity, which is used to measure the output embedding of the node v of the graph at layer 0 and the node at layer 0 The output embedding correlation of For nodes The neighbor set of , c is the index of the neighbor set, is a node of the graph that is not equal to the node v of the graph;

[0081] The first layer of convolution, the formula is as follows:

[0082] ,

[0083] in, is the output embedding of node v in the graph at layer 1, is the ReLU activation function, is the neighbor set of node v in the graph, is the first layer convolution weight matrix, is the first layer self-loop weight matrix;

[0084] The second layer of convolution, the formula is as follows:

[0085] ,

[0086] in, is the second layer weight matrix, is the self-loop weight matrix of the second layer;

[0087] Use the fixed value method to set the maximum number of iterations, use the Adam optimizer, and iterate the training with the goal of minimizing the loss L. Stop the iteration after reaching the maximum number of iterations and output the optimized model weight parameters;

[0088] Apply the optimized model weight parameters to the graph convolutional network (GCN) model, take the feature vector set as input, and obtain the final enhanced embedding set H;

[0089] The final enhanced embedding set H is added to the optimized energy graph to obtain the graph structure G.

[0090] By extracting features from preprocessed multi-source data and converting the data into a format suitable for machine learning algorithms, the training efficiency and accuracy of subsequent models can be greatly improved. Through device-driven association methods, synchronization score calculation methods, etc., connections between energy points are constructed and their correlations are detected. The relationship network between energy points can be accurately constructed, and highly correlated energy points can be identified, helping the energy management system to more accurately identify key factors in the decision-making process. By constructing a two-layer graph convolutional network (GCN) model and using loss functions for supervised learning and optimizing model weights, it can efficiently process graph-structured data and capture the complex relationships and interactions between nodes. It can effectively improve prediction accuracy while maintaining good generalization capabilities.

[0091] S2. Generate subqueries based on the graph structure, use the LLM model to obtain initial answers, build a directed dependency graph, generate an initial global reasoning chain, interact with the proprietary knowledge base and the initial global reasoning chain, optimize the initial global reasoning chain, map the optimized reasoning chain to tree nodes, build a dynamic tree-shaped reasoning structure, perform dynamic branch adjustments based on the artificial potential field, and optimize the reasoning path;

[0092] Specifically, according to the node information and feature vector of the graph structure G, the task prompt decomposition method is used to divide it into subqueries , and assign a unique identifier to each subquery to generate a subquery list Q;

[0093] The subquery , Indexes for the number of subqueries, including :What is the historical electricity consumption benchmark value? : The impact of climate conditions on electricity consumption, :The impact of equipment efficiency on electricity consumption, : The impact of energy prices on electricity consumption;

[0094] Input the subquery list Q and graph structure G into the pre-configured large language model LLM, with the instruction: "Require that each subquery be Generate initial answers ”, for each initial answer Calculating answer confidence , the formula is as follows:

[0095] ,

[0096] in, For subqueries The number of related edges, is the total number of edges in the graph structure G, is the data integrity weight (range 0 to 1);

[0097] Use the empirical method to set the answer confidence threshold, and use the fixed threshold screening method to screen out the initial answers whose answer confidence is greater than the corresponding answer confidence threshold to generate the initial answer set;

[0098] Based on the dependency relationships between subqueries in Q, a directed dependency graph D is constructed. Topological sorting is applied to the dependency graph D to determine the subquery execution order. The order of the initial answer set is adjusted according to the sorting.

[0099] The dependencies include For basic query, no dependency, rely (Climate impacts require a historical benchmark), rely (The impact of equipment requires a historical benchmark), rely , and (The price impact needs to be integrated with the results of the first three);

[0100] Input the sorted answer set into the pre-configured Large Language Model (LLM) with the instruction "integrate in dependency order" to generate an initial global reasoning chain for the results and subqueries;

[0101] For each subquery in the initial global inference chain Use the pre-trained DistilBERT model to generate question vectors;

[0102] Document data from proprietary knowledge bases (energy consumption standards database and climate model library) is collected and preprocessed. A document index is constructed using FAISS. Knowledge base vectors are generated using the pre-trained DistilBERT model. The cosine similarity between question vectors and knowledge base vectors is calculated. A k-nearest neighbor search is performed on the question vector using the FAISS-built document index. The l corresponding documents with the highest similarity (l is a value set based on expert experience) are selected and marked as the candidate document set.

[0103] Each document in the candidate document set is segmented into natural paragraphs to generate a paragraph list. The pre-trained DistilBERT model is used to generate paragraph vectors.

[0104] Calculate the cosine similarity between the paragraph vector and the question vector, sort them in descending order, select the p paragraphs with the highest cosine similarity (p is a value set based on expert experience), form a set of related paragraphs, and splice them into candidate answer texts in the order of the original text;

[0105] Use the pre-trained SpanBERT question answering model for candidate answer text, extraction and subquery Best matching answer snippet , Index the number of candidate documents, get the answer fragment vector, and calculate the confidence score of the answer fragment. The formula is as follows:

[0106] ,

[0107] in, For the answer fragment Answering subqueries The confidence score of , which is the answer fragment With subquery The similarity of For subqueries The problem vector, For the answer fragment The answer fragment vector, is the length of the answer, For the i-th subquery and the candidate texts of candidate documents, 、 and The weights and biases of the pre-trained SpanBERT question-answering model (the values are determined by the model);

[0108] Select the answer fragment vector with the highest confidence score as the optimized answer vector, calculate the answer similarity score of the initial answer vector and the optimized answer vector, sum the answer similarity score and the confidence score of the highest answer fragment vector using the weighted summation method to obtain the comprehensive consistency score, and use the empirical method to set the comprehensive consistency score threshold. If the comprehensive consistency score is greater than or equal to the comprehensive consistency score threshold, no adjustment is required, otherwise the subquery is marked "Awaiting feedback query"

[0109] For subqueries marked as "queries awaiting feedback" The data is encapsulated into a feedback data packet and fed into the pre-configured large language model (LLM) with the instruction: "According to the proprietary knowledge base answer and confidence, modify the initial answer to ensure consistency with the energy data analysis scenario." The resulting optimized reasoning chain , n is the total number of reasoning chains;

[0110] The feedback data package includes the subquery, initial answer, optimized answer, confidence level, supporting documents, and comprehensive consistency score;

[0111] Each subquery-answer pair in the optimized reasoning chain CoQ Mapped to tree nodes , all tree nodes Initialize to the isolated node set N;

[0112] For each tree node , analyze its subquery Semantics, extract keywords (such as "historical electricity consumption" and "climate impact"), and use the pre-configured large language model (LLM) for evaluation With other subqueries Causal dependence (with the instruction: "Judgement" 'Dependent' 'result, whether 'climate impact electricity consumption' requires 'historical electricity consumption' as a prerequisite"), if there is a dependency, then the node of the tree Nodes of the tree potential parent nodes and add directed edges , for each tree node Calculate initial weights , the formula is as follows:

[0113] ,

[0114] in, For subqueries Importance for energy analysis, assessed by LLM (range [0,1], e.g. “historical electricity consumption” = 0.8, “minor factor” = 0.3);

[0115] After adding the edges, use depth-first search to check whether there is a cycle. If there is a cycle, sort the initial weights of the nodes that make up the cycle in descending order and remove the edges of the node with the lowest initial weight.

[0116] Generate the initial dynamic tree inference structure , is the edge set, is the set of initial weights of nodes;

[0117] For each tree node Calculate the initial consistency score , the formula is as follows:

[0118] ,

[0119] in, is a tuning parameter used to balance confidence and conflict impact (set to 0.5 to ensure a balance between the two), , is the repulsive potential field, indicating the answer and supporting documentation The degree of conflict, is the repulsion coefficient, which controls the intensity of the conflict penalty (a fixed value obtained based on experimental experience), For the answer and supporting documentation Semantic similarity (calculated using cosine similarity, range [0,1]);

[0120] Use the empirical method to set the initial consistency threshold. < initial consistency threshold, then mark the node of the tree For "low consistency nodes", use depth-first search DFS to backtrack to its parent node , generate a list of low consistency nodes ;

[0121] List of low consistency nodes Each tree node in Subquery and parent node The answer , generating an alternative subquery , will replace the subquery Input into the pre-configured large language model LLM to generate new answers ;

[0122] Will replace the subquery and new answers Generate new tree nodes , and calculate the new consistency score , the new consistency score Consistency score with the initial For comparison, if , the new node Add as parent node Child nodes, replacing the tree nodes , otherwise keep the tree node , get the updated dynamic tree reasoning structure ;

[0123] Traverse the updated dynamic tree inference structure All paths from root to leaf in Contains a set of nodes, for each path Calculate the composite score , the formula is as follows:

[0124] ,

[0125] in, is the path length, i.e. the number of nodes in the path, and are the length penalty coefficient and the heuristic adjustment coefficient, respectively, which are set using the fixed value method. is a heuristic function that estimates the “distance” from the end node of the path to the final target (energy prediction result). is the initial predicted value based on the existing answers (estimated by LLM), The end node of the path The answer, is the path number index;

[0126] All the calculated comprehensive scores Sort in descending order and select the path with the highest score as the optimal path.

[0127] By converting the energy data analysis task into multiple sub-queries and assigning a unique identifier to each sub-query, the decomposition of complex tasks is achieved. By combining the sub-queries with the graph structure and using the large language model LLM to generate preliminary answers and calculate the confidence, the confidence calculation can effectively screen out reliable answers and prevent low-quality or irrelevant answers from entering the subsequent analysis stage, thereby improving the quality of the analysis results. By constructing a dependency graph and applying topological sorting, the execution order of sub-queries is determined, which helps to reasonably arrange the execution logic between sub-queries and ensure that the results of the previous query can provide the correct basic data for subsequent queries. By generating question vectors and calculating cosine similarity with the vectors in the knowledge base, the content related to the sub-query can be accurately selected from a large number of documents, which optimizes the retrieval efficiency of information in the knowledge base. The most relevant documents are selected through similarity sorting, which reduces the interference of irrelevant information and improves the pertinence and efficiency of knowledge application. By using the SpanBERT model to extract the answer fragment that best matches the subquery, it can effectively reduce the deviation caused by semantic errors or information missing. By mapping the optimized reasoning chain to tree nodes and analyzing the causal relationship between subqueries, a dynamic tree-shaped reasoning structure is constructed to ensure the flexibility and adaptability of the reasoning process. It provides strong structural support for the reasoning process, allowing the reasoning chain to self-regulate and optimize in complex environments, enhancing the robustness and adaptability of the system. By calculating the consistency score of the tree nodes and providing feedback on inconsistent nodes, the reasoning path is optimized. This operation can effectively screen out those paths with lower quality, correct and optimize them, and ultimately ensure the generation of the optimal path. By traversing the updated tree-shaped reasoning structure, calculating the comprehensive score of each path, and selecting the path with the highest score as the final output, it ensures that the analysis results are based on the most valuable reasoning paths, thereby achieving the most optimized analysis results.

[0128] S3. Use the LLM model to obtain the energy data analysis results based on the optimal inference path, trace each inference process, and optimize the energy data analysis results based on the trace results;

[0129] Specifically, collect the answers of each node of each tree from the optimal path, arrange the answers according to the logical order of energy data analysis, and form an analysis answer list;

[0130] The logical order of the energy data analysis includes checking the source nodes of each answer, determining their logical dependencies, placing basic trend answers (such as "Historical electricity consumption has been increasing year by year") at the beginning, followed by influencing factors (such as "Climate impact leads to an increase in electricity consumption", "Equipment efficiency is stable"), and finally adding economic factors (such as "Energy price fluctuates upward");

[0131] Input the analysis answer list into the pre-configured large language model LLM, and give a clear instruction "According to the following order information, analyze the main trends and influencing factors of energy data: First is the historical electricity consumption trend, second is the climate impact, third is the equipment efficiency, and finally is the energy price impact. Please summarize the energy usage patterns and key driving factors and explain the basis for the analysis";

[0132] The pre-configured large language model LLM outputs the energy analysis results and explanations (such as "Based on historical trends and climate impact, energy demand continues to grow, equipment efficiency is stable and has not significantly changed the pattern, while price fluctuations indicate the need to pay attention to cost control").

[0133] By collecting the answers of each node of each tree from the optimal path, arranging the answers according to the logical order of energy data analysis, and forming an analysis answer list, the analysis process is structured and hierarchical, avoiding information confusion or misalignment. By checking the source nodes of each answer and determining their logical dependencies, a strict analysis order is formed, separating basic trend answers, influencing factors, and economic factors hierarchically, ensuring clear causal relationships between data during the analysis process. By inputting the answer list arranged in logical order into the pre-configured large language model LLM and providing clear instructions to the model, it ensures that the analysis and reasoning of the model fully conform to the expected logical order and analysis framework.

[0134] Furthermore, extract each sub-query, answer, and supporting document from the optimized inference chain CoQ, use natural language processing NLP to structure each supporting document, generate corresponding trace labels for each answer, and the trace labels contain the answer, the confidence of the answer (calculated based on document authority and data consistency), and the source identifier of the supporting document, forming a trace set;

[0135] Use the empirical method to set a confidence threshold for the answers in the traceability set. If the confidence of an answer is less than the set confidence threshold for the answer, mark the corresponding answer in the energy analysis result as abnormal and delete it;

[0136] Extract the set of feature vectors from the graph structure G, use the exponential decay model to calculate the time decay weight for each feature, and use the time decay weight to weight each feature in the set of feature vectors to optimize the energy analysis result. The formula is as follows:

[0137] ,

[0138] where, is the final energy analysis result (quantified energy analysis value, final predicted electricity consumption value), is the energy analysis result after removing outliers, is the regression coefficient (obtained by fitting historical data), is the set of feature vectors after weighting each feature;

[0139] Associate the final energy analysis result with the traceability set to generate a structured output.

[0140] By extracting each sub-query, answer, and supporting document from the optimized inference chain CoQ and using natural language processing NLP to structurally process the supporting documents, it ensures that the source of each answer, the authority of the supporting documents, and data consistency are fully reflected and quantified. By generating corresponding traceability labels, information such as the confidence of each answer and the source identifier of the supporting documents is associated, providing strong support for the final analysis result. By extracting the set of feature vectors from the graph structure G and combining the exponential decay model to calculate the time decay weight for each feature, different importance can be assigned to data at different time points, and the features can be weighted and optimized, enabling the analysis system to better adapt to dynamically changing energy data and improving the system's response speed and accuracy to the latest situation. By associating the finally optimized energy analysis result with the traceability set to generate a structured output, the integrity and systematization of the results can be achieved.

[0141] S4. Store the data generated during the inference process and update the system with real-time data;

[0142] Specifically, convert the final analysis result , the traceability set, the graph structure G, and the optimized inference chain CoQ into a unified JSON format, add metadata tags to each piece of data, and use a hash function to generate a unique identifier for the data to obtain the processed data;

[0143] The processed data is sharded according to the identifier and timestamp, and the sharded data is stored in a distributed database. Consistent hashing is used to ensure the balanced distribution of data shards among nodes. At the same time, the shard index is recorded, an inverted index is built to speed up retrieval, and an adjacency table is established for the graph structure to store edge relationships, ensuring that the query latency meets real-time requirements.

[0144] By uniformly converting the final analysis results, traceability set, graph structure G and optimized reasoning chain CoQ into JSON format, cross-platform storage and data exchange are facilitated. By sharding by identifier and timestamp, large amounts of data can be effectively segmented and managed. The introduction of consistent hashing solves the problem of uniform distribution of data in distributed systems, ensuring balanced distribution of data among different nodes, thereby effectively optimizing storage and query performance. Recording shard indexes and building inverted indexes can accelerate the data retrieval process, ensuring balanced distribution and fast retrieval of data in distributed systems, avoiding data access bottlenecks and performance degradation, and ensuring efficient operation of the system. By establishing an adjacency table for the graph structure to store edge relationships, the edge relationships between nodes in the graph are efficiently represented, ensuring that adjacent nodes can be quickly accessed during queries, thereby accelerating the traversal and query of the graph structure.

[0145] Furthermore, the real-time data and the stored multi-energy data are time-aligned to generate a fused data set, the fusion confidence of the fused data is calculated, and the fused data set and fusion confidence are stored and overwritten with the old records;

[0146] Adjust the energy graph based on the type of new data stored, adding nodes to the graph if new devices and scenarios are present, and adding edges if new relationships are revealed;

[0147] Calculate new feature vectors based on the new energy graph, use graph neural network (GNN) to re-encode the subgraph affected by the new data, and generate an updated graph structure;

[0148] Subqueries affected by new data in the optimized inference chain CoQ , using the pre-configured large language model LLM, regenerate new answers and update the reasoning chain based on the new answers;

[0149] Calculate the significance of data changes , the formula is as follows:

[0150] ,

[0151] in, is the new data after fusion, is the historical data value;

[0152] Set the data change significance threshold based on experience. If the value is greater than the data change significance threshold, it enters the analysis phase, otherwise it remains unchanged;

[0153] The analysis phase includes generating new energy data analysis results based on the updated reasoning chain and the updated graph structure.

[0154] By aligning real-time data with historical multi-source energy data, we ensure that data from different time scales and sources can be compared and processed within the same time frame, generate a fused data set, and calculate its fusion confidence, further ensuring the reliability and accuracy of the data. By updating old records, we ensure the timeliness of the data and reflect the latest energy conditions. By adjusting the energy graph structure, we can flexibly respond to new data types and newly discovered relationships, ensuring that the graph structure is constantly adaptive and expanded as new data is added, so that the model can always effectively reflect the overall picture of the current energy system. Through the graph neural network (GNN), we re-encode the subgraphs affected by new data. Ensure that new data can deeply influence and update the graph structure. By updating the reasoning chain, the generated answers can be more timely and targeted, and the rationality of the data analysis results can be improved. Based on the set significance threshold, only when the data change reaches a certain level will it enter the further analysis stage. This design not only improves the efficiency of data analysis, but also avoids unnecessary computational burden caused by data fluctuations. By combining the updated reasoning chain and graph structure, the final new energy data analysis results are generated, ensuring that all previous data fusion, graph structure updates and reasoning chain optimizations are fully utilized to produce accurate analysis results that are in line with the current energy system status.

[0155] This embodiment also provides an energy data analysis system based on a large model and a proprietary knowledge base, including:

[0156] The collection and construction module is used to collect and preprocess multi-source energy data, classify the multi-source energy data into four types of energy points, calculate the characteristics of the energy points and connect the energy points, detect and optimize the connectivity, build a two-layer graph convolutional network (GCN) model, and generate the graph structure;

[0157] The generation and optimization module is used to generate subqueries based on the graph structure, obtain initial answers using the LLM model, build a directed dependency graph, generate an initial global reasoning chain, interact with the proprietary knowledge base and the initial global reasoning chain, and optimize the initial global reasoning chain;

[0158] The inference chain path module is used to map the optimized inference chain into tree nodes, build a dynamic tree-shaped inference structure, perform dynamic branch adjustments based on the artificial potential field, and optimize the inference path;

[0159] An analysis and traceability module, which is used to obtain energy data analysis results by using an LLM model based on the optimal inference path, trace each inference process, and optimize the energy data analysis results based on the traceability results;

[0160] A storage and update module, which is used to store the data generated during the inference process and update the system with real-time data.

[0161] This embodiment also provides a computer device, which is applicable to the case of an energy data analysis method based on a large model and a proprietary knowledge base, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the energy data analysis method based on a large model and a proprietary knowledge base as proposed in the above embodiment.

[0162] This computer device can be a terminal. The computer device includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner can be implemented through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen. The input device of the computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, touchpad, or mouse, etc.

[0163] This embodiment also provides a storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the energy data analysis method based on a large model and a proprietary knowledge base as proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM for short), electrically erasable programmable read-only memory (EEPROM for short), erasable programmable read-only memory (EPROM for short), programmable read-only memory (PROM for short), read-only memory (ROM for short), magnetic memory, flash memory, magnetic disk or optical disc.

[0164] In summary, the present invention: collects and preprocesses multi-source energy data, divides the multi-source energy data into four types of energy points, calculates the characteristics of the energy points and connects the energy points, detects and optimizes the connectivity, constructs a two-layer graph convolutional network GCN model to generate a graph structure; generates sub-queries based on the graph structure, uses the LLM model to obtain an initial answer, constructs a directed dependency graph, generates an initial global inference chain, interacts the proprietary knowledge base with the initial global inference chain, optimizes the initial global inference chain, maps the optimized inference chain to the nodes of a tree, constructs a dynamic tree-shaped inference structure, adjusts the dynamic branches based on the artificial potential field, and optimizes the inference path; uses the LLM model based on the optimal inference path to obtain the energy data analysis result, traces each inference process, optimizes the energy data analysis result based on the tracing result, improves the accuracy of energy data analysis, enhances the transparency and controllability of the inference result, and strengthens the adaptability of the system to changes in energy data.

[0165] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered by the scope of the claims of the present invention.

Claims

1. An energy data analysis method based on a large model and a proprietary knowledge base, characterized in that: Including, Collecting multi-source energy data and preprocessing it, classifying the multi-source energy data into four types of energy points, calculating the characteristics of the energy points and connecting the energy points, detecting and optimizing the connectivity, constructing a two-layer graph convolutional network (GCN) model, and generating a graph structure; According to the node information and feature vectors of the graph structure G, using the task prompt decomposition method to divide it into sub-queries, obtaining an initial answer using the LLM model, constructing a directed dependency graph, generating an initial global inference chain, interacting the proprietary knowledge base with the initial global inference chain, optimizing the initial global inference chain, mapping the optimized inference chain to the nodes of a tree, constructing a dynamic tree-shaped inference structure, performing dynamic branch adjustment based on the artificial potential field, and optimizing the inference path; Obtaining the energy data analysis result using the LLM model based on the optimal inference path, tracing each inference process, and optimizing the energy data analysis result based on the tracing result; Storing the data generated during the inference process and updating the system with real-time data; The collecting multi-source energy data and preprocessing it, constructing the model, and generating the graph structure include: The multi-source energy data includes electricity consumption time series, equipment operation status, climate, and energy price data; Dividing the preprocessed multi-source energy data into four types of energy points, generating an energy point set, calculating the electricity consumption feature vector using the time feature engineering method, calculating the feature vectors of equipment, weather, and price respectively using the feature combination method, and generating a feature vector set; The four types of energy points include electricity consumption points, equipment points, weather points, and price points; Construct an energy connection using the device driver association method, including detecting the running status of each device in the preprocessed multi-source energy data at a time If it is turned on, connect it, generate an energy connection set for all energy connections, and construct an initial energy graph; Collecting historical multi-source energy data, preprocessing it and extracting features, and using it as a training set; Constructing a two-layer graph convolutional network (GCN) model, defining a loss function to supervise the task, using the feature vectors of the training set as input, performing iterative training, stopping the iteration after reaching the maximum number of iterations, outputting the optimized model weight parameters, applying them to the two-layer graph convolutional network (GCN) model, using the feature vector set as input, obtaining the final enhanced embedding set, and adding it to the optimized energy graph to obtain the graph structure; The generating the initial global inference chain, interacting the proprietary knowledge base with the initial global inference chain, optimizing the initial global inference chain, constructing the dynamic tree-shaped inference structure, performing dynamic branch adjustment based on the artificial potential field, and optimizing the inference path include: Using the task prompt decomposition method to divide it into sub-queries, generating a list of sub-queries, and inputting it together with the graph structure into a pre-configured large language model (LLM) to generate an initial answer, calculating the answer confidence, using the fixed threshold screening method to screen the initial answers with the answer confidence greater than the corresponding answer confidence threshold, and generating an initial answer set; Based on the dependency relationship between sub-queries in the sub-query list, constructing a directed dependency graph, generating an initial global inference chain, and using the pre-trained DistilBERT model for each sub-query to generate a question vector; Collect the document data of the proprietary knowledge base and preprocess it. Use FAISS to build a document index, generate knowledge base vectors through a pre-trained DistilBERT model, calculate the cosine similarity between the question vector and the knowledge base vectors, perform a k-nearest neighbor search on the question vector through the document index built by FAISS to obtain a candidate document set, segment it by natural paragraph, and use the pre-trained DistilBERT model to generate paragraph vectors; Calculate the cosine similarity between the paragraph vector and the question vector to obtain candidate answer texts. Use the pre-trained SpanBERT question-answering model to extract the answer fragments that best match the sub-query, calculate the confidence scores of the answer fragments, sort them in descending order to obtain optimized answer vectors, calculate the answer similarity scores between the vectors of the initial answer and the optimized answer, sum the answer similarity scores and the confidence scores of the highest answer fragment vectors using the weighted summation method to obtain a comprehensive consistency score, set the comprehensive consistency score threshold using the empirical method, compare it with the comprehensive consistency score, and perform operations based on the comparison results to obtain an optimized reasoning chain; Map each sub-query-answer pair in the optimized inference chain to a node of the tree , and use a pre-configured large language model (LLM) to evaluate the sub-query along with other sub-queries for causal dependencies. If a dependency exists, add a directed edge . For each node of the tree , calculate the initial weight, or keep it unchanged. After adding the edges, use depth-first search to detect if there is a cycle. If there is a cycle, sort the initial weights of the nodes forming the cycle in descending order and remove the edges of the node with the lowest initial weight to obtain the initial dynamic tree-shaped inference structure ; For each node of the tree Calculate the initial consistency score and compare it with the set initial consistency threshold. Based on the comparison result, use depth - first search (DFS) to backtrack to its parent node , generate a list of low - consistency nodes , generate alternative sub - queries , input the alternative sub - queries into a pre - configured large language model (LLM) to generate new answers , and generate new nodes of the tree with the alternative sub - queries , calculate the new consistency score , compare the new consistency score with the initial consistency score . Based on the difference in the comparison results, perform operations to replace and retain the nodes of the tree to obtain an updated dynamic tree - shaped reasoning structure , traverse all the paths from the root to the leaves in the updated dynamic tree - shaped reasoning structure . Each path contains a set of nodes. For each path , calculate the comprehensive score , and sort them in descending order. Select the path with the highest score as the optimal path.​ 2. The energy data analysis method based on a large model and a proprietary knowledge base according to claim 1, wherein: Use the LLM model based on the optimal reasoning path to obtain the energy data analysis results, including: Collect the answers of the nodes of each tree from the optimal path, arrange the answers according to the logical order of energy data analysis to form an analysis answer list; The logical order of the energy data analysis includes checking the source nodes of each answer, determining their logical dependencies, inputting the analysis answer list into a pre-configured large language model LLM, giving clear instructions based on the logical dependencies, and outputting the energy analysis results and explanations.

3. The energy data analysis method based on a large model and a proprietary knowledge base according to claim 2, characterized in that: Trace each reasoning process, and optimize the energy data analysis results based on the tracing results, including: Extract data from the optimized reasoning chain CoQ, perform structured processing using natural language processing NLP, generate corresponding tracing labels for each answer, and form a tracing set; Extract a set of feature vectors from the graph structure, use the exponential decay model to calculate the time decay weights for each feature, and weight each feature in the set of feature vectors using the time decay weights to optimize the energy analysis results, associate the final energy analysis results with the tracing set, and generate a structured output.

4. The energy data analysis method based on a large model and a proprietary knowledge base according to claim 3, wherein: Store the data generated by the reasoning process, including: Convert the final analysis results, the tracing set, the graph structure, and the optimized reasoning chain into a unified JSON format, add metadata tags to each piece of data, and use a hash function to generate unique identifiers for the data to obtain the processed data; Slice the processed data by identifier and timestamp, store the sliced data in a distributed database, ensure the balanced distribution of data slices among nodes through consistent hashing, record the slice index at the same time, build an inverted index to accelerate retrieval, and establish an adjacency list for the graph structure to store edge relationships.

5. The energy data analysis method based on a large model and a proprietary knowledge base according to claim 4, characterized in that: Use the real-time data update system, including: Align the real-time data and the stored sharded data in time to generate a fused dataset, calculate the fusion confidence of the fused data, store the fused dataset and the fusion confidence, and overwrite the old records to obtain the newly stored data; Calculate the data change significance based on the updated graph structure and the updated inference chain of the newly stored data; Set the data change significance threshold based on experience. If the data change significance is greater than the data change significance threshold, enter the analysis phase; otherwise, remain unchanged.

6. An energy data analysis system based on a large model and a proprietary knowledge base, based on the energy data analysis method based on a large model and a proprietary knowledge base according to any one of claims 1 to 5, characterized in that: including, A collection and construction module for collecting and preprocessing multi-source energy data, classifying the multi-source energy data into four types of energy points, calculating the characteristics of the energy points and connecting the energy points, detecting and optimizing the connectivity, constructing a two-layer graph convolutional network (GCN) model, and generating a graph structure; A generation and optimization module for generating subqueries based on the graph structure, obtaining initial answers using an LLM model, constructing a directed dependency graph, generating an initial global inference chain, interacting the proprietary knowledge base with the initial global inference chain, and optimizing the initial global inference chain; An inference chain path module for mapping the optimized inference chain to the nodes of a tree, constructing a dynamic tree-shaped inference structure, performing dynamic branch adjustment based on the artificial potential field, and optimizing the inference path; An analysis and traceability module for obtaining the energy data analysis results using an LLM model based on the optimal inference path, tracing each inference process, and optimizing the energy data analysis results based on the traceability results; A storage and update module for storing the data generated during the inference process and updating the system using real-time data.

7. A computer device, comprising a memory and a processor, the memory storing a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the energy data analysis method based on the large model and the proprietary knowledge base according to any one of claims 1 to 5.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the energy data analysis method based on the large model and the proprietary knowledge base according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Conversational database query method and device based on large language model agent

    CN119494401A

  • Chat integration with grid-based data structure

    US12271707B1