Energy information query method, system and equipment based on large language model and medium
Through a method based on the large language model, the business knowledge graph is constructed and integrated into the large language model, which solves the problem that energy information query in the existing technology is difficult to integrate unstructured data and lacks complex semantic understanding, and efficient and accurate energy information query is achieved, ensuring the reliability and timeliness of query results.
Patent Information
- Application Number
- CN202411695927.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-25
- Publication Date
- 2025-03-28
AI Technical Summary
The existing energy information query technology is difficult to effectively integrate and query unstructured or semi-structured energy data, lacks complex semantic understanding capabilities, and has shortcomings in real-time update processing and quality evaluation of multi-source heterogeneous energy data, making it difficult to ensure the reliability and timeliness of query results.
Using a method based on a large language model, we obtain and preprocess business key data, build a business key database, and extract entities, attributes, relationships and concepts through a large language model to build a business knowledge graph. Integrate knowledge graphs into large language models to realize the understanding and processing of users' natural language query intentions and quickly locate relevant information.
It improves the efficiency and accuracy of energy information query, can effectively integrate energy data in multiple formats, understand complex semantics, and quickly respond to user queries, significantly improves the relevance and quality of query results, and ensures the reliability and timeliness of information.
Smart Images

Figure CN119719274A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer and energy technology, and in particular to an energy information query method, system, device and medium based on a large language model. Background Art
[0002] With the continuous growth of global energy demand and the increasing complexity of energy structure, the amount of data in the energy field has exploded. These data cover all aspects of energy production, transmission, storage, consumption, etc., including but not limited to the reserve information of various energy resources, the operating parameters of different energy production facilities, the price fluctuation data of the energy market, and the energy consumption pattern of the user end.
[0003] There are many limitations in the traditional energy information query method. For example, the method based on structured database query can only process data in a predefined format, and it is difficult to effectively integrate and query a large amount of unstructured or semi-structured energy data (such as energy technology reports, expert evaluation opinions, etc.). Moreover, traditional query systems often lack the ability to understand complex semantics. When users use natural language to make fuzzy or deep semantic queries (such as "find information related to the optimal efficiency configuration of solar and wind hybrid power generation systems in high-altitude areas"), they cannot accurately return relevant results. At the same time, information in the energy field is updated quickly, and data from different sources vary in accuracy and timeliness. Existing query technologies are insufficient in real-time update processing and quality assessment of multi-source heterogeneous energy data, making it difficult to ensure the reliability and timeliness of query results.
[0004] Large Language Models (LLMs) have demonstrated outstanding capabilities in the field of natural language processing. They can understand and generate natural language texts and have strong semantic understanding and knowledge representation capabilities. LLM-based technologies provide a new way to solve these problems in energy information query. By using LLMs, massive amounts of energy information in multiple formats can be uniformly processed and understood, the user's natural language query intent can be accurately parsed, and information that meets the requirements can be quickly screened out from a complex energy data environment, thereby improving the efficiency and accuracy of energy information query.
[0005] Therefore, it is urgent to propose an energy information query method based on a large language model to solve the problem that information in the energy field is updated quickly, data from different sources vary in accuracy and timeliness, and existing query technologies are insufficient in real-time update processing and quality assessment of multi-source heterogeneous energy data, making it difficult to ensure the reliability and timeliness of query results. Summary of the invention
[0006] In order to overcome the problems existing in the related art, the present disclosure provides an energy information query method, system, device and medium based on a large language model to solve the technical problems that the real-time update processing and quality assessment of energy data in the related art are insufficient and it is difficult to ensure the reliability and timeliness of the query results.
[0007] One or more embodiments of this specification provide an energy information query method based on a large language model, comprising the following steps:
[0008] Obtain business-critical data, pre-process it and build a business-critical database;
[0009] Extract entities, attributes, relationships and concepts in the business-critical database based on a large language model to build a business knowledge graph;
[0010] Integrating the business knowledge graph into the large language model to obtain a business large language model;
[0011] In response to the interactive information sent by the user, the interactive large language model is used to identify the user's intention, the target information matching the user's intention is searched in the business large language model, and the searched target information is fed back to the user.
[0012] Preferably, the acquisition of business-critical data and the construction of a business-critical database after preprocessing specifically include the following steps:
[0013] Obtain various energy indicators as business data, including energy consumption, output efficiency, geographical distribution and change trends;
[0014] Preprocessing the business data to obtain business data in a unified format;
[0015] Extract key information from the business data to build a business-critical database.
[0016] Preferably, the method further comprises the following steps:
[0017] Construct an interactive interface between natural language and the business knowledge graph, construct a knowledge base with the user's input text data and store it in a vector database.
[0018] Preferably, the extracting entities, attributes, relationships and concepts in the business-critical database based on the large language model to construct a business knowledge graph further includes the following steps:
[0019] Based on the large language model, the user's input text data is encoded into a knowledge graph to obtain a text representation vector;
[0020] Based on the large language model, the entities, attributes, relationships and concepts in the business-critical database are encoded into a knowledge graph to obtain corresponding representation vectors;
[0021] A knowledge graph encoder is used to fuse the text representation vector and the representation vectors corresponding to the entity, attribute, relationship and concept to obtain a fused representation vector;
[0022] Integrate the fused representation vector into the business large language model.
[0023] One or more embodiments of this specification provide an energy information query system based on a large language model, including a database module, a knowledge graph construction module, a large language model construction module, and a query module;
[0024] The database module is used to obtain business-critical data and construct a business-critical database after preprocessing;
[0025] The knowledge graph construction module is used to extract entities, attributes, relationships and concepts in the business-critical database based on a large language model to construct a business knowledge graph;
[0026] The large language model construction module is used to integrate the business knowledge graph into the large language model to obtain a business large language model;
[0027] The query module is used to respond to the interactive information sent by the user, use the interactive large language model to identify the user's intention, query the target information matching the user's intention in the business large language model, and feed back the queried target information to the user.
[0028] Preferably, the database module includes an acquisition unit, a preprocessing unit and a construction unit;
[0029] The acquisition unit is used to acquire various energy indicators as business data, including energy consumption, output efficiency, regional distribution and change trend;
[0030] The preprocessing unit is used to preprocess the business data to obtain business data in a unified format;
[0031] The construction unit is used to extract key information from the business data to construct a business-critical database.
[0032] Preferably, it also includes a text input module for constructing an interactive interface between natural language and the business knowledge graph, constructing a knowledge base with the user's input text data and storing it in a vector database.
[0033] Preferably, the knowledge graph construction module is further configured to perform knowledge graph encoding processing on the user's input text data based on the large language model to obtain a text representation vector;
[0034] Based on the large language model, the entities, attributes, relationships and concepts in the business-critical database are encoded into a knowledge graph to obtain corresponding representation vectors;
[0035] A knowledge graph encoder is used to fuse the text representation vector and the representation vectors corresponding to the entity, attribute, relationship and concept to obtain a fused representation vector;
[0036] Integrate the fused representation vector into the business large language model.
[0037] One or more embodiments of the present specification provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the energy information query method based on a large language model as described above when executing the computer program.
[0038] One or more embodiments of the present specification provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-mentioned energy information query method based on a large language model.
[0039] The present disclosure provides an energy information query method, system, device and medium based on a large language model, which has the advantage that by acquiring business-critical data and constructing a business-critical database after preprocessing, it is possible to effectively integrate data scattered from different sources in the energy field and avoid data fragmentation; based on the large language model, entities, attributes, relationships and concepts in the business-critical database are extracted to construct a business knowledge graph, and the knowledge graph makes the model's semantic understanding of the energy field more in-depth and accurate. When facing complex energy information queries, the model can quickly locate relevant content based on the semantic relationship in the knowledge graph, rather than simply based on keyword matching, which greatly improves the relevance and quality of the query results; the business knowledge graph is integrated into the large language model to obtain the business large language model, which fully integrates the knowledge structure and business logic unique to the energy industry, making it more professional and accurate when processing energy information queries; in response to the interactive information sent by the user, the interactive large language model is used to identify the user's intention, and the target information matching the user's intention is queried in the business large language model, and the queried target information is fed back to the user, which greatly shortens the query time and improves the query efficiency, so that users can quickly obtain the required energy information, thereby better supporting energy-related decisions and business operations. This method significantly improves the user experience in the process of querying energy information. Users do not need complex operations and professional query languages, but only need to express their needs in natural language to obtain accurate results. At the same time, fast and accurate information feedback provides strong support for various decisions in the energy field, helping enterprises and users make more scientific and reasonable decisions in energy production, consumption, investment and other links. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] In order to more clearly illustrate one or more embodiments of this specification or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0041] Figure 1 A flowchart of an energy information query method based on a large language model provided for one or more embodiments of this specification;
[0042] Figure 2 A schematic diagram of the structure of an energy information query system based on a large language model provided for one or more embodiments of this specification;
[0043] Figure 3 A schematic diagram of the structure of a computer device provided for one or more embodiments of this specification. DETAILED DESCRIPTION
[0044] In order to enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below in conjunction with the drawings in one or more embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the protection scope of the present invention.
[0045] The present invention is described in detail below in conjunction with specific implementation methods and the accompanying drawings.
[0046] Method Embodiment
[0047] According to an embodiment of the present invention, a method for querying energy information based on a large language model is provided. Figure 1 FIG. 1 is a flow chart of energy information query based on a large language model provided in this embodiment. The energy information query method based on a large language model according to an embodiment of the present invention includes the following steps:
[0048] S110, obtain business-critical data, and build a business-critical database after preprocessing. Such data include but are not limited to:
[0049] Obtain production data of different oil wells and coal mines, operating parameters of mining equipment (such as pressure, temperature, etc.), and geological exploration reports from the energy mining department.
[0050] Collect light intensity data and photovoltaic panel efficiency data of solar power stations from the new energy power generation sector, as well as wind speed and wind direction data and wind turbine operating status information of wind farms.
[0051] Obtain power grid load data, transmission line loss data, and pipeline flow and pressure data from the energy transmission sector.
[0052] Obtain historical data on energy prices, sales volumes by region, and customer information from the sales department.
[0053] S120. Extract entities, attributes, relationships and concepts in the business-critical database based on the large language model to construct a business knowledge graph.
[0054] Specifically, pre-trained large language models (such as GPT-4, etc.) are used to process data in business-critical databases. For energy extraction business, entities such as "oil wells", "coal mines", "mining equipment", etc. are identified, and their attributes include "output", "operating parameters", etc., and relationships include concepts such as "oil wells belong to a certain mining area" and "mining equipment is used for a certain oil well". In the field of renewable energy power generation, entities such as "solar power stations" and "wind farms" are identified, with attributes such as "light intensity" and "wind speed", and relationships such as "photovoltaic panels are components of solar power stations" and "wind turbines are located in wind farms". For energy transmission and sales businesses, the corresponding entities, attributes and relationships are also extracted.
[0055] Through these analyses, a complete business knowledge graph is constructed, which clearly shows the intrinsic connections between various links in the energy business.
[0056] S130. Integrate the business knowledge graph into the large language model to obtain a business large language model.
[0057] This process may involve fine-tuning the model or updating its parameters so that the large language model can fully understand and utilize the knowledge structure unique to the energy business field. For example, the model can understand the special relationship between price fluctuations and seasonal and regional demand in energy sales as reflected in the knowledge graph.
[0058] S140. In response to the interactive information sent by the user, the interactive large language model is used to identify the user's intention, the target information matching the user's intention is searched in the business large language model, and the searched target information is fed back to the user.
[0059] When a company employee (user) needs to query information, for example, a market analyst wants to know "the comparison between the power generation cost and sales price of solar power stations in high-light areas in summer, and the impact on profits". The interactive large language model receives and recognizes the user's intention, and analyzes the key concepts involved, such as "solar power station", "summer", "high-light areas", "power generation cost", "sales price", and "profit". Then, queries are performed in the business large language model based on the knowledge graph and database information. It can accurately find the cost data and price data of relevant solar power stations in specific seasons and light conditions, and calculate profit-related information. Finally, the queried target information is fed back to the user in the form of a clear report, including specific values, data sources, and related explanations, to help users conduct market analysis and decision-making.
[0060] The method provided in this embodiment can effectively integrate scattered data from different sources in the energy field by acquiring business-critical data and constructing a business-critical database after preprocessing, thereby avoiding data fragmentation; extracting entities, attributes, relationships and concepts in the business-critical database based on a large language model to construct a business knowledge graph, and the knowledge graph enables the model to have a deeper and more accurate understanding of the semantics of the energy field. When facing complex energy information queries, the model can quickly locate relevant content based on the semantic relationships in the knowledge graph, rather than simply based on keyword matching, which greatly improves the relevance and quality of the query results; integrating the business knowledge graph into the large language model to obtain a business large language model, which fully integrates the knowledge structure and business logic unique to the energy industry, making it more professional and accurate when processing energy information queries; in response to the interactive information sent by the user, the interactive large language model is used to identify the user's intention, and the target information matching the user's intention is queried in the business large language model, and the queried target information is fed back to the user, which greatly shortens the query time, improves the query efficiency, and enables the user to quickly obtain the required energy information, thereby better supporting energy-related decision-making and business operations. This method significantly improves the user's experience in the process of querying energy information. Users do not need complex operations and professional query languages, they can get accurate results by simply expressing their needs in natural language. At the same time, fast and accurate information feedback provides strong support for various decision-making in the energy field, helping enterprises and users make more scientific and reasonable decisions in energy production, consumption, investment and other links.
[0061] In one embodiment, the acquisition of business-critical data and the construction of a business-critical database after preprocessing specifically include the following steps:
[0062] Obtain various energy indicators as business data, including energy consumption, output efficiency, geographical distribution and change trends.
[0063] Collect energy indicator data from various energy projects and operating departments of the company as business data.
[0064] For coal business, coal consumption data is obtained through the production records and monitoring systems of coal mines. These data may come from the daily, monthly or annual mining and consumption records of different mines. At the same time, output efficiency data of the coal mining process is obtained, such as the resources and labor costs consumed per ton of coal mined, etc. It also includes the distribution of coal resources in different regions of the world (such as the distribution of coal mines in Australia, China, etc.) and the changing trend data of coal production and consumption in recent years.
[0065] In the oil business, data such as oil refining volume and consumption are collected from various oil wells and refineries to understand the output efficiency of oil extraction and processing, such as the oil output rate of different oil wells and the conversion rate of refineries. The geographical distribution data of oil covers the oil field information of major oil-producing regions such as the Middle East and Russia. The change trend data reflects the fluctuations in oil market demand and supply over the past few decades.
[0066] For solar and wind energy businesses, power generation data (i.e., energy output efficiency) is obtained from solar power stations and wind farms around the world. Real-time and historical power generation information is collected through sensors and monitoring systems installed in power stations and farms. Energy consumption data includes the amount of electricity consumed by equipment operation and maintenance. Geographical distribution data records the distribution of large-scale solar power stations and wind farms in different countries and regions (such as wind farms in the Midwest of the United States and solar power stations in northwest China). Change trend data reflects the changing trend of the proportion of renewable energy in the global energy structure.
[0067] After preprocessing the business data, business data in a unified format is obtained. Preprocess the collected complex and diverse business data. For example, unify the units used to record coal consumption in different countries and regions. Some regions may use tons, while others may use kilograms, all of which are unified into tons. For the time format, unify the date and time formats recorded in different systems (such as "year / month / day" for some and "day-month-year") into the "year-month-day" format. Process the missing values in the data. If the coal consumption data of a coal mine on a certain day is missing, make a reasonable estimate or mark based on the historical average consumption and recent production trends of the coal mine. Check and process abnormal values, such as the sudden appearance of extremely high power generation data in a wind farm (which may be caused by a sensor failure), and correct or eliminate them by comparing with the data of surrounding wind farms and analyzing the trend of historical data.
[0068] Extract key information from the business data to build a business-critical database, and extract key information from the preprocessed business data. For energy consumption data, extract key consumption values and related influencing factors (such as the impact of seasons on the power generation consumption of solar power stations) under different energy types, different regions, and different time scales. For output efficiency data, extract the optimal efficiency value of each energy under different production conditions and its corresponding technical and environmental parameters. The regional distribution information is classified and stored according to country, region, and energy type, for example, an index such as "China-Coal-Shanxi Coal Mine Distribution" is established. The change trend data is stored in the form of time series to analyze the change law of energy indicators over time, such as drawing a change trend chart of the proportion of global solar power generation to total energy power generation in the past 20 years. Through these steps, a comprehensive, accurate and easy-to-query business-critical database is constructed.
[0069] The method provided in this embodiment realizes the standardization and normalization of data by preprocessing business data of different formats and sources, extracts key information from massive energy business data to build a database, and can highlight data that is important to the company's decision-making and operation. The business-critical database provides efficient support for energy information query, making the analysis and decision-making based on these data more scientific and reasonable, reducing the risk of decision-making errors caused by data quality issues, and ensuring the stable operation and development of the company's energy business.
[0070] In one embodiment, the following steps are also included:
[0071] Construct an interactive interface between natural language and the business knowledge graph, construct a knowledge base with the user's input text data and store it in a vector database.
[0072] First, use existing natural language processing technologies and tools, such as open source natural language processing libraries (such as NLTK, spaCy, etc.), to build a preprocessing module that can process user input text. This module can perform lexical analysis, syntactic analysis, and named entity recognition on the natural language input by the user. For example, when the user enters "query for the power generation efficiency data of solar power stations in arid areas", the system can identify key entities and concepts such as "solar power stations", "drought areas", and "power generation efficiency".
[0073] Then, a mapping relationship is established between the processed natural language information and the business knowledge graph. Taking the knowledge graph in the energy field as an example, there are already entities such as energy types (such as solar energy), geographical environments (such as arid areas), energy performance indicators (such as power generation efficiency) and their relationships in the knowledge graph. By defining rules and using machine learning models (such as semantic matching models based on deep learning), entities and concepts in natural language can accurately interact with corresponding nodes and edges in the knowledge graph. For example, when the entity "solar power station" is identified, the corresponding nodes related to solar power generation facilities and their relationships with other entities (such as geographical environment, equipment parameters, etc.) can be found in the knowledge graph.
[0074] For the text data input by the user, after being processed by the natural language processing module, the semantic information and knowledge content are further extracted. For example, in addition to identifying key entities, the implicit logical relationships and query intent in the text are also analyzed. If the user enters "Compare the heating costs of coal and natural gas in the northern region in winter, which one is more economical?", the system must not only identify the entities "coal", "natural gas", "winter", "northern region", and "heating cost", but also understand that this is a query intent about cost comparison.
[0075] The extracted knowledge is constructed into a knowledge base. The knowledge base can adopt a structured data model, such as a triple (subject, predicate, object). For the above example, triple information such as "(coal, heating cost in northern regions in winter, specific value)" and "(natural gas, heating cost in northern regions in winter, specific value)" may be constructed.
[0076] Finally, the constructed knowledge base is stored in a vector database. Specialized vector database technologies (such as Milvus, Faiss, etc.) can be used to convert the information in the knowledge base into vector representation. During the storage process, the vectors are indexed and stored according to their similarity and semantic relevance for subsequent rapid retrieval. For example, all knowledge vectors related to energy costs are stored in a specific index space, so that when there is a similar cost query request, the relevant knowledge base content can be quickly located.
[0077] The method provided in this embodiment does not require users to learn specific query languages or follow complex query rules, but only needs to express their needs in natural language. Whether it is a professional energy researcher or an ordinary energy enterprise employee, they can easily ask questions to the system, and the system can accurately understand the user's intention, which greatly reduces the threshold for users to use the system and improves user satisfaction.
[0078] In one embodiment, extracting entities, attributes, relationships and concepts in the business-critical database based on a large language model to construct a business knowledge graph further includes the following steps:
[0079] Based on the large language model, the user's input text data is encoded into a knowledge graph to obtain a text representation vector. When the user enters text data in the query interface of the energy management platform, for example, "Query the factors affecting the construction cost of wind farms in mountainous areas and close to rivers". The system uses a pre-trained large language model (such as GPT-3.5) to encode the text into a knowledge graph. The large language model first performs lexical and syntactic analysis on the text to identify key elements such as "wind farm", "mountainous area", "close to rivers", "construction cost", and "influencing factors". Then, through the knowledge graph encoding mechanism in the model, these elements are mapped to a high-dimensional vector space to obtain a text representation vector. This vector contains the semantic information of the text and the relationship between the elements.
[0080] Based on the large language model, the entities, attributes, relationships and concepts in the business-critical database are encoded in the knowledge graph to obtain the corresponding representation vectors. Entities, attributes, relationships and concepts are extracted from the business-critical database. Taking the data related to wind farms as an example, the entities include "wind farm", "wind turbine", "transmission line", etc.; the attributes include "installed capacity", "wind speed requirement", "maintenance cost", etc.; the relationships are such as "wind turbine belongs to wind farm" and "transmission line connects wind farm"; the concept may be "renewable energy facility". Use the same large language model to encode these elements in the knowledge graph, and convert each entity, attribute, relationship and concept into a corresponding representation vector. For example, the position of the entity vector of "wind farm" in the vector space reflects its relationship with other energy-related concepts.
[0081] A knowledge graph encoder is used to fuse the text representation vector, the representation vectors corresponding to the entities, attributes, relationships and concepts to obtain a fused representation vector. A specially designed knowledge graph encoder (which can be built based on technologies such as graph neural networks) is used to fuse the representation vector of the user input text and the representation vectors of entities, attributes, relationships and concepts in the business-critical database. For example, the encoder will analyze the semantic associations and potential connections between the "wind farm in mountainous areas and close to rivers" in the text representation vector and the wind farm entity vectors and related geographic environment attribute vectors (such as "mountainous geographical features" and "geographical features near rivers") in the business-critical database. Through complex calculations and mappings, these vectors are fused into a fused representation vector. This fused representation vector contains both the user's query intent information and the relevant knowledge in the business knowledge graph.
[0082] Integrate the fused representation vector into the business big language model. This may involve adjusting the parameters of the business big language model so that the model can make full use of this fused knowledge when processing subsequent queries. For example, when encountering similar queries related to wind farm construction costs again, the model can more accurately understand the query intent based on the newly integrated knowledge and mine more relevant information from business-critical databases, such as the impact of special terrain on infrastructure construction costs in mountainous wind farm construction, and possible changes in transportation costs due to proximity to rivers.
[0083] The method provided in this embodiment can enable the system to more deeply understand the semantics of user queries by encoding and fusing the knowledge graph of user input text and business-critical database elements. After integrating the fused representation vector, the business big language model has a better perception of the query context, effectively integrates these cross-domain knowledge, and integrates the fused representation vector into the business big language model, so that the model can more quickly utilize the knowledge in the business-critical database during query processing. The model does not need to re-match and analyze the user input and database knowledge in a complex manner, but directly performs reasoning and query based on the fused knowledge, which reduces the query processing time and improves the operating efficiency of the entire system, especially when processing a large number of concurrent queries.
[0084] System Example
[0085] According to an embodiment of the present invention, an energy information query system based on a large language model is provided. Figure 2 As shown, it is a structural diagram of the energy information query system based on the large language model provided in this embodiment. The energy information query system based on the large language model according to the embodiment of the present invention includes a database module 21, a knowledge graph construction module 22, a large language model construction module 23 and a query module 24.
[0086] The database module 21 is used to obtain business-critical data and construct a business-critical database after preprocessing.
[0087] The knowledge graph construction module 22 is used to extract entities, attributes, relationships and concepts in the business-critical database based on a large language model to construct a business knowledge graph.
[0088] The large language model construction module 23 is used to integrate the business knowledge graph into the large language model to obtain a business large language model.
[0089] The query module 24 is used to respond to the interactive information sent by the user, use the interactive large language model to identify the user's intention, query the target information matching the user's intention in the business large language model, and feed back the queried target information to the user.
[0090] In the device provided in this embodiment, the database module 21 acquires business-critical data and constructs a business-critical database after preprocessing, so as to effectively integrate data scattered from different sources in the energy field and avoid data fragmentation; the knowledge graph construction module 22 extracts entities, attributes, relationships and concepts in the business-critical database based on a large language model, and constructs a business knowledge graph. The knowledge graph makes the model's semantic understanding of the energy field more in-depth and accurate. When facing complex energy information queries, the model can quickly locate relevant content based on the semantic relationship in the knowledge graph, rather than simply based on keyword matching, which greatly improves the relevance and quality of the query results; the large language model construction module 23 integrates the business knowledge graph into the large language model to obtain a business large language model, which fully integrates the knowledge structure and business logic unique to the energy industry, making it more professional and accurate when processing energy information queries; the query module 24 responds to the interactive information sent by the user, uses the interactive large language model to identify the user's intention, queries the target information matching the user's intention in the business large language model, and feeds back the queried target information to the user, greatly shortening the query time and improving the query efficiency, so that the user can quickly obtain the required energy information, thereby better supporting energy-related decisions and business operations. This method significantly improves the user's experience in the process of querying energy information. Users do not need complex operations and professional query languages, and can obtain accurate results by simply expressing their needs in natural language. At the same time, fast and accurate information feedback provides strong support for various decisions in the energy field, helping enterprises and users make more scientific and reasonable decisions in energy production, consumption, investment and other links.
[0091] In one embodiment, the database module 21 includes an acquisition unit 211 , a preprocessing unit 212 and a construction unit 213 .
[0092] The acquisition unit 211 is used to acquire various energy indicators as business data, including energy consumption, output efficiency, regional distribution and change trend.
[0093] The preprocessing unit 212 is used to preprocess the service data to obtain service data in a unified format.
[0094] The construction unit 213 is used to extract key information from the business data to construct a business key database.
[0095] The device provided in this embodiment realizes data standardization and normalization by preprocessing business data of different formats and sources, extracts key information from massive energy business data to build a database, and can highlight data that is important to the company's decision-making and operations. The business-critical database provides efficient support for energy information query, making the analysis and decision-making based on these data more scientific and reasonable, reducing the risk of decision-making errors due to data quality issues, and ensuring the stable operation and development of the company's energy business.
[0096] In one embodiment, it also includes a text input module 25 for constructing an interactive interface between natural language and the business knowledge graph, constructing a knowledge base with the user's input text data and storing it in a vector database.
[0097] The device provided in this embodiment does not require users to learn specific query languages or follow complex query rules, but only needs to express their needs in natural language. Whether it is a professional researcher in the energy field or an ordinary employee of an energy enterprise, they can easily ask questions to the system, and the system can accurately understand the user's intention, which greatly reduces the threshold for users to use the system and improves user satisfaction.
[0098] In one embodiment, the knowledge graph construction module 22 is further configured to perform knowledge graph encoding processing on the user's input text data based on the large language model to obtain a text representation vector.
[0099] Based on the large language model, the entities, attributes, relationships and concepts in the business-critical database are encoded into a knowledge graph to obtain corresponding representation vectors.
[0100] A knowledge graph encoder is used to fuse the text representation vector and the representation vectors corresponding to the entities, attributes, relationships and concepts to obtain a fused representation vector.
[0101] Integrate the fused representation vector into the business large language model.
[0102] The device provided in this embodiment can more deeply understand the semantics of user queries by encoding and fusing the knowledge graph of user input text and business-critical database elements. After integrating the fused representation vector, the business big language model has a better perception of the context of the query, effectively fusing these cross-domain knowledge, and integrating the fused representation vector into the business big language model, so that the model can more quickly utilize the knowledge in the business-critical database during query processing. The model does not need to re-match and analyze the user input and database knowledge in a complex way, but directly performs reasoning and query based on the fused knowledge, which reduces the query processing time and improves the operating efficiency of the entire system, especially when processing a large number of concurrent queries.
[0103] The embodiment of the present invention is a system embodiment corresponding to the above-mentioned method embodiment. The specific operations of the processing steps of each module can be understood by referring to the description of the method embodiment, which will not be repeated here.
[0104] like Figure 3 As shown, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the energy information query method in the above embodiment is implemented, or when the computer program is executed by a processor, the energy information query method based on a large language model in the above embodiment is implemented.
[0105] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0106] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0107] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein by equivalents. These modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present invention, and the contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.
Claims
1. An energy information query method based on a large language model, characterized in that: The following steps are involved: Obtain business-critical data, pre-process it and build a business-critical database; Extract entities, attributes, relationships and concepts in the business-critical database based on a large language model to build a business knowledge graph; Integrating the business knowledge graph into the large language model to obtain a business large language model; In response to the interactive information sent by the user, the interactive large language model is used to identify the user's intention, the target information matching the user's intention is searched in the business large language model, and the searched target information is fed back to the user.
2. The decision support method according to claim 1, characterized in that: The acquisition of business-critical data and the construction of a business-critical database after preprocessing specifically include the following steps: Obtain various energy indicators as business data, including energy consumption, output efficiency, geographical distribution and change trends; Preprocessing the business data to obtain business data in a unified format; Extract key information from the business data to build a business-critical database.
3. The decision support method according to claim 1, characterized in that: The following steps are also included: Construct an interactive interface between natural language and the business knowledge graph, construct a knowledge base with the user's input text data and store it in a vector database.
4. The decision support method according to claim 1, characterized in that: The extracting entities, attributes, relationships and concepts in the business-critical database based on the large language model to construct a business knowledge graph also includes the following steps: Based on the large language model, the user's input text data is encoded into a knowledge graph to obtain a text representation vector; Based on the large language model, the entities, attributes, relationships and concepts in the business-critical database are encoded into a knowledge graph to obtain corresponding representation vectors; A knowledge graph encoder is used to fuse the text representation vector and the representation vectors corresponding to the entity, attribute, relationship and concept to obtain a fused representation vector; Integrate the fused representation vector into the business large language model.
5. An energy information query system based on a large language model, characterized in that: It includes database module, knowledge graph construction module, large language model construction module and query module; The database module is used to obtain business-critical data and construct a business-critical database after preprocessing; The knowledge graph construction module is used to extract entities, attributes, relationships and concepts in the business-critical database based on a large language model to construct a business knowledge graph; The large language model construction module is used to integrate the business knowledge graph into the large language model to obtain a business large language model; The query module is used to respond to the interactive information sent by the user, use the interactive large language model to identify the user's intention, query the target information matching the user's intention in the business large language model, and feed back the queried target information to the user.
6. The energy information query system according to claim 5, characterized in that: The database module includes an acquisition unit, a preprocessing unit and a construction unit; The acquisition unit is used to acquire various energy indicators as business data, including energy consumption, output efficiency, regional distribution and change trend; The preprocessing unit is used to preprocess the business data to obtain business data in a unified format; The construction unit is used to extract key information from the business data to construct a business-critical database.
7. The energy information query system according to claim 5, characterized in that: It also includes a text input module for constructing an interactive interface between natural language and the business knowledge graph, constructing a knowledge base with the user's input text data and storing it in a vector database.
8. The energy information query system according to claim 5, characterized in that: The knowledge graph construction module is further configured to perform knowledge graph encoding processing on the user's input text data based on the large language model to obtain a text representation vector; Based on the large language model, the entities, attributes, relationships and concepts in the business-critical database are encoded into a knowledge graph to obtain corresponding representation vectors; A knowledge graph encoder is used to fuse the text representation vector and the representation vectors corresponding to the entity, attribute, relationship and concept to obtain a fused representation vector; Integrate the fused representation vector into the business large language model.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the energy information query method based on the large language model as described in any one of claims 1 to 4 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the energy information query method based on a large language model as described in any one of claims 1 to 4 are implemented.
Citation Information
Cited By
Natural gas data management method and system
CN119962975A
A natural gas data management method and system
CN119962975B
Construction method, data processing method and device, electronic equipment and storage medium
CN120216705A
Knowledge enhancement method and system of heat supply industry data insight based on large language model
CN121031737A
Business information pushing method and system based on knowledge graph and large language model
CN121810015A