Power question query method based on large model

Through large-scale language models with unsupervised pre-training and fine-tuning of supervised tasks in the power field, the problems of high professionalism and complexity in power data query are solved, and high accuracy and high efficiency of power data query are achieved, which lowers the threshold for user use.

CN119988405AInactive Publication Date: 2025-05-13HEFEI SWAYCHIP INFORMATION TECH INC

Patent Information

Application Number
CN202411971638.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In power data query, existing large language models face the challenges of power data processing with high professionalism and complexity, and the data formats and standards of different power systems vary greatly, which increases the difficulty of unified query processing, and the real-time and accuracy of data are also particularly critical.

Method used

Through unsupervised pre-training, a large model of the power industry in vertical fields is formed, and supervised tasks are fine-tuned on this basis, including intention recognition, information extraction and multi-round dialogue task model training, ensuring that the big model can understand the specific needs of users and generate accurate SQL statements for database query.

Benefits of technology

It realizes high accuracy and high efficiency inquiry of power data, lowers the threshold for user use, and allows non-technical personnel to easily obtain power data information, improving the overall efficiency and response speed of data query.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988405A_ABST
    Figure CN119988405A_ABST
Patent Text Reader

Abstract

The invention relates to the field related to electric power, in particular to an electric power question number query method based on a large model, and the method comprises the steps: obtaining an electric power industry large model through unsupervised pre-training, and then carrying out supervised task fine adjustment. Comprising intention recognition, information extraction and multi-round dialogue task model training. The user interacts with a natural language, and the system generates an SQL statement query database through multiple rounds of dialogue splicing, intention recognition and key information extraction and visually displays a result. The method has the advantages of improving user convenience, improving efficiency and accuracy, supporting multiple rounds of dialogues, enhancing generalization ability, providing visual display and the like, different requirements can be met in a customized mode, the workload is reduced, real-time feedback and decision support are provided, and the method has advancement in the field of electric power data query.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to electric power related fields, and in particular to an electric power data query method based on a large model. Background Art

[0002] In modern power systems, with the rapid development of big data and artificial intelligence technologies, some innovative attempts have begun to use large language models to directly query power data. This method aims to understand the user's query text information through a large model, automatically generate SQL statements, and then use these SQL statements to automatically query the database and return the results directly to the user. This technical path not only simplifies the query process and improves query efficiency, but also significantly reduces reliance on manual intervention.

[0003] Specifically, by using a large model to understand natural language queries entered by users, the technical threshold for writing SQL statements can be significantly lowered, allowing more non-technical personnel to easily perform complex data queries. At the same time, the process of automatically generating SQL statements and querying the database greatly speeds up the response speed, allowing query results to be returned in real time, improving the user experience.

[0004] Sugar BI is a conversational data question-and-answer product based on the Wenxin big language model. The technical route of this invention is similar to but different from that of Sugar BI. Our intelligent question-and-answer products are mainly aimed at the power industry such as the State Grid Corporation of China in the early stage. Our big model is a vertical power big model that we pre-trained with power data. The big model has excellent performance in the power field, and its intent recognition and effect analysis on power-related issues are better than other general big models.

[0005] Although large language models have demonstrated powerful data processing capabilities in certain areas, they still face a series of challenges and problems in the specific application of power data query. First, power data is highly professional and complex, and the model needs to have deep industry knowledge to accurately understand and process this data. Secondly, the data formats and standards of different power systems may vary greatly, which increases the difficulty of unified query processing. In addition, the real-time and accuracy of data are particularly critical in power systems, and any erroneous query results may have a significant impact on system operation. Therefore, how to improve the accuracy and adaptability of large models in power data queries is still a difficult problem that needs to be solved urgently. Summary of the invention

[0006] The purpose of the present invention is to provide a large-scale model-based power data query method to solve the problems raised in the above-mentioned background technology.

[0007] To achieve the above object, the present invention provides the following technical solution: a method for querying power data based on a large model, comprising the following steps:

[0008] Step 1: Unsupervised pre-training: A large amount of power grid and power-related data is obtained through crawler data analysis technology, and unsupervised pre-training is performed on the power industry data to form a vertical power industry big model. The big model is superior to the mainstream general big model in terms of the processing ability of power-related knowledge;

[0009] Step 2: Fine-tuning the supervised task: Based on the large model formed by unsupervised pre-training, optimize the specific power data query task requirements. Specifically, fine-tune the supervised SFT task for specific user business scenarios, including:

[0010] The intent recognition model training sub-step is used to train the large model to recognize the intent of the question raised by the user;

[0011] The information extraction task model training sub-step is used to train the large model to extract key information from user questions;

[0012] The multi-round dialogue task model training sub-step is used to train and process multi-round dialogues between users and the large model;

[0013] Step 3: Multi-round dialogue stitching: During the user dialogue interaction in step 2, the multi-round dialogue model stitches the user's input questions through multiple rounds of dialogue to ensure that the large model can understand the context association;

[0014] Step 4: Intent recognition: Input the spliced ​​questions into the fine-tuned intent recognition model to make intent judgments and clarify the user's specific needs;

[0015] Step 5: Extract key information: After the intent is determined, use the fine-tuned information extraction model to extract key information from the user's question.

[0016] Step 6: Generate SQL statements: After obtaining the intent and key information in steps 2 and 5, generate corresponding SQL statements based on this information to query the database;

[0017] Step 7: Data query and visualization: Use the SQL statements generated in step 6 to query data, and generate charts through visualization to intuitively display the query results, thereby improving user experience and data understanding.

[0018] Preferably, the specific steps of constructing the large model of the power industry in step 1 are as follows:

[0019] Step 11: Using crawler data analysis technology, widely collect data and information related to power grids and electricity from the Internet. The data covers all aspects of the power system, including but not limited to power generation equipment parameters and power generation efficiency data in the power production process, line loss data and voltage stability data in the power transmission process, load distribution data in the power distribution link, user power consumption pattern data, and peak and valley power consumption data related to power consumption;

[0020] Step 12: Clean the acquired raw data to remove noise data, duplicate data and erroneous data; perform word segmentation and tokenization on the text data;

[0021] Step 13: Use the Transformer architecture algorithm to train the model. During the training process, the model automatically builds a language model by learning a large amount of unlabeled power data. It can predict the next word or character in the text, that is, it masters the language expression and knowledge structure in the power field and completes the construction of a large model for the power industry.

[0022] Preferably, the intent recognition model training sub-step in the supervised task fine-tuning step in step 2 can perform detailed intent classification of questions, including inquiry, year-on-year, month-on-month, relative comparison, maximum ranking, minimum ranking, and ranking rank.

[0023] Preferably, the multi-round dialogue splicing step in step 3 adopts an update and replacement strategy for key information in the QA question-answer pair to train a fine-tuning model for processing multi-round dialogue tasks.

[0024] Preferably, the charts generated by the data query and visualization step include but are not limited to bar charts, line charts, and pie charts to meet different data display requirements.

[0025] Preferably, through the unsupervised pre-training of step 1 and the supervised fine-tuning of step 2, the large model has strong generalization ability and can adapt to the needs of different users and diversified power data query scenarios.

[0026] Compared with the prior art, the beneficial effect of the present invention is that the present invention allows users to interact with the system in natural language. Users do not need to master complex database query languages ​​or professional power terms. They only need to ask questions like daily conversations to obtain the required data results and chart displays. The natural language interaction method greatly simplifies the data query and preview process of users in the power industry, lowers the user threshold, and enables non-technical personnel to easily obtain power data information; by automatically generating SQL statements and querying the database, the system can quickly respond to user query requests. Compared with the traditional manual query method, the waiting time is greatly reduced. For example, when faced with a large number of power data query needs, the traditional method may require manual input of instructions one by one and wait for database retrieval results, which takes a long time, while the present method can give answers in a short time, improve the overall efficiency of data query, and enable users to obtain the required information more quickly, thereby improving work efficiency, especially in power operation scenarios that require timely decision-making. This rapid response capability is crucial; based on the pre-trained large model and the fine-tuned specific task model, the system can accurately identify user intentions. For example, when a user asks about a parameter of an electric device, the system can accurately determine whether the user is asking about the current value, historical value, or value under a certain condition. At the same time, it can accurately extract key information from the user's question, such as time, location, industry, etc. This ensures high accuracy and precision of the query results and avoids erroneous results caused by misunderstanding the user's intentions or missing key information. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 It is a schematic diagram of the method flow of the present invention. DETAILED DESCRIPTION

[0028] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0029] In the description of the present invention, it should be noted that the terms "vertical", "up", "down", "horizontal", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0030] In the description of the present invention, it is also necessary to explain that, unless otherwise clearly specified and limited, the terms "set", "install", "connect", and "connect" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two elements. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0031] See also Figure 1 The present invention provides a technical solution: a method for querying power data based on a large model, comprising the following steps:

[0032] Step 1: Unsupervised pre-training: A large amount of power grid and power-related data is obtained through crawler data analysis technology, and unsupervised pre-training is performed on the power industry data to form a vertical power industry big model. The big model is superior to the mainstream general big model in terms of the processing ability of power-related knowledge;

[0033] Step 2: Fine-tuning the supervised task: Based on the large model formed by unsupervised pre-training, optimize the specific power data query task requirements. Specifically, fine-tune the supervised SFT task for specific user business scenarios, including:

[0034] The intent recognition model training sub-step is used to train the large model to recognize the intent of the question raised by the user;

[0035] The information extraction task model training sub-step is used to train the large model to extract key information from user questions;

[0036] The multi-round dialogue task model training sub-step is used to train and process multi-round dialogues between users and the large model;

[0037] Step 3: Multi-round dialogue stitching: During the user dialogue interaction in step 2, the multi-round dialogue model stitches the user's input questions through multiple rounds of dialogue to ensure that the large model can understand the context association;

[0038] Step 4: Intent recognition: Input the spliced ​​questions into the fine-tuned intent recognition model to make intent judgments and clarify the user's specific needs;

[0039] Step 5: Extract key information: After the intent is determined, use the fine-tuned information extraction model to extract key information from the user's question.

[0040] Step 6: Generate SQL statements: After obtaining the intent and key information in steps 2 and 5, generate corresponding SQL statements based on this information to query the database;

[0041] Step 7: Data query and visualization: Use the SQL statements generated in step 6 to query data, and generate charts through visualization to intuitively display the query results, thereby improving user experience and data understanding.

[0042] Furthermore, the specific steps for constructing the large model of the power industry in step 1 are as follows:

[0043] Step 11: Using crawler data analysis technology, widely collect data and information related to power grids and electricity from the Internet. The data covers all aspects of the power system, including but not limited to power generation equipment parameters and power generation efficiency data in the power production process, line loss data and voltage stability data in the power transmission process, load distribution data in the power distribution link, user power consumption pattern data, and peak and valley power consumption data related to power consumption;

[0044] Step 12: Clean the acquired raw data to remove noise data, duplicate data and erroneous data; perform word segmentation and tokenization on the text data;

[0045] Step 13: Use the Transformer architecture algorithm to train the model. During the training process, the model automatically builds a language model by learning a large amount of unlabeled power data. It can predict the next word or character in the text, that is, it masters the language expression and knowledge structure in the power field and completes the construction of a large model for the power industry.

[0046] Furthermore, the intent recognition model training sub-step in the supervised task fine-tuning step in step 2 can classify the intent of the question in detail, including inquiry, year-on-year, month-on-month, relative comparison, maximum ranking, minimum ranking, and ranking rank. During the supervised task fine-tuning process, the parameters of the model will be further updated according to the specific task labels and feedback information. For example, in the intent recognition model training, if the model's judgment on a specific intent is inaccurate, the relevant parameters will be adjusted through the feedback mechanism of supervised learning so that the model can more accurately identify the intent. This parameter update is based on inheriting the unsupervised pre-training parameters to optimize the model to better meet the specific task requirements.

[0047] Furthermore, the multi-round dialogue splicing step in step 3 adopts an update and replacement strategy for key information in the QA question-answer pair to train a fine-tuning model for processing multi-round dialogue tasks.

[0048] Furthermore, the charts generated by the data query and visualization steps include but are not limited to bar charts, line charts, and pie charts to meet different data display requirements.

[0049] Furthermore, through the unsupervised pre-training in step 1 and the supervised fine-tuning in step 2, the large model has strong generalization ability and can adapt to the needs of different users and diversified power data query scenarios. The ultimate goal of unsupervised pre-training and supervised task fine-tuning is to build a model that can efficiently and accurately handle power data query. Unsupervised pre-training provides the model with basic knowledge and feature learning in the power field, and supervised task fine-tuning further optimizes the model's specific task capabilities on this basis. The two work together to achieve the goal of improving the performance of the power data query system.

[0050] The technical route of the present invention begins with obtaining a large amount of data and information related to power grids and electricity from the Internet through data analysis technologies such as crawlers, and pre-training a large model of the power industry in a vertical field as the base large model of the product. The large model is far superior to the mainstream general large models currently on the market in terms of its ability to process power-related knowledge. For specific customer business scenarios, we conduct detailed intent classification of questions, including inquiries, year-on-year, month-on-month, relative comparisons, maximum ranking, minimum ranking, ranking rank, etc., and use the business scenario data provided by customers to fine-tune the large model for these intent recognition tasks.

[0051] In the process of handling each question, we will extract key information such as time, location, and industry. This product adopts an update and replacement strategy for key information in QA question-answering pairs to train a fine-tuning model that can handle multi-round dialogue tasks, thereby realizing the round-by-round dialogue tasks of intelligent question-answering. The model service layer extracts information by combining intent recognition information and key information, queries relevant data from the database, and generates a summary from the large model. Based on the query results, the system can generate intuitive graphic and text displays to improve the user experience.

[0052] To improve the generalization ability of the product, we optimized the interaction process with the database and directly used the pre-trained base model to generate NL2SQL output, solving the problem of insufficient generalization ability in the previous technical solution. This optimization not only improves the query efficiency and accuracy of the system, but also enhances the adaptability and application value of the product in different user scenarios. In the future, we will continue to optimize and expand this technical solution to ensure that the product can meet the ever-changing user needs and promote the intelligent development of the power industry.

[0053] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A method for querying power data based on a large model, characterized in that: The following steps are involved: Step 1: Unsupervised pre-training: A large amount of power grid and power-related data is obtained through crawler data analysis technology, and unsupervised pre-training is performed on the power industry data to form a vertical power industry big model. The big model is superior to the mainstream general big model in terms of the processing ability of power-related knowledge; Step 2: Fine-tuning the supervised task: Based on the large model formed by unsupervised pre-training, optimize the specific power data query task requirements. Specifically, fine-tune the supervised SFT task for specific user business scenarios, including: The intent recognition model training sub-step is used to train the large model to recognize the intent of the question raised by the user; The information extraction task model training sub-step is used to train the large model to extract key information from user questions; The multi-round dialogue task model training sub-step is used to train and process multi-round dialogues between users and the large model; Step 3: Multi-round dialogue stitching: During the user dialogue interaction in step 2, the multi-round dialogue model stitches the user's input questions through multiple rounds of dialogue to ensure that the large model can understand the context association; Step 4: Intent recognition: Input the spliced ​​questions into the fine-tuned intent recognition model to make intent judgments and clarify the user's specific needs; Step 5: Extract key information: After the intent is determined, use the fine-tuned information extraction model to extract key information from the user's question. Step 6: Generate SQL statements: After obtaining the intent and key information in steps 2 and 5, generate corresponding SQL statements based on this information to query the database; Step 7: Data query and visualization: Use the SQL statements generated in step 6 to query data, and generate charts through visualization to intuitively display the query results, thereby improving user experience and data understanding.

2. The method for querying electric power data based on a large model according to claim 1 is characterized in that: The specific steps for constructing the large model of the power industry in step 1 are as follows: Step 11: Using crawler data analysis technology, widely collect data and information related to power grids and electricity from the Internet. The data covers all aspects of the power system, including but not limited to power generation equipment parameters and power generation efficiency data in the power production process, line loss data and voltage stability data in the power transmission process, load distribution data in the power distribution link, user power consumption pattern data, and peak and valley power consumption data related to power consumption; Step 12: Clean the acquired raw data to remove noise data, duplicate data and erroneous data; perform word segmentation and tokenization on the text data; Step 13: Use the Transformer architecture algorithm to train the model. During the training process, the model automatically builds a language model by learning a large amount of unlabeled power data. It can predict the next word or character in the text, that is, it masters the language expression and knowledge structure in the power field and completes the construction of a large model for the power industry.

3. The method for querying electric power data based on a large model according to claim 1 is characterized in that: The intent recognition model training sub-step in the supervised task fine-tuning step in step 2 can classify the intent of the question in detail, including inquiry, year-on-year, month-on-month, relative comparison, maximum ranking, minimum ranking, and ranking rank.

4. The method for querying electric power data based on a large model according to claim 1 is characterized in that: The multi-round dialogue splicing step in step 3 adopts an update and replacement strategy for key information in the QA question-answer pair to train a fine-tuning model for processing multi-round dialogue tasks.

5. The method for querying electric power data based on a large model according to claim 1 is characterized in that: The charts generated by the data query and visualization steps include but are not limited to bar charts, line charts, and pie charts to meet different data display requirements.

6. The method for querying electric power data based on a large model according to claim 1 is characterized in that: Through the unsupervised pre-training in step 1 and the supervised fine-tuning in step 2, the large model has strong generalization ability and can adapt to the needs of different users and diversified power data query scenarios.

7. The method for querying electric power data based on a large model according to claim 1 is characterized in that: Based on the large model in step 6 and the fine-tuned task-specific model, it is possible to accurately identify user intent, extract key information, and ensure high accuracy and precision of query results.

Citation Information

Patent Citations

  • Information processing method and device based on large language model, equipment and storage medium

    CN117521675A

  • Domain question-answering system, domain question-answering construction method, electronic equipment and storage medium

    CN117909466A

  • Generative large model pre-training method

    CN118485135A

  • Mechanical intelligent question and answer maintenance method and system based on large language model and knowledge graph double-wheel driving

    CN119003709A

  • Digital factory data query method, device, equipment, medium and product

    CN119025618A

Cited By

  • NL2SQL model query enhancement method and device based on reinforcement learning and medium

    CN120256467A