Research on Power Data Querying and Privacy Protection Technology Based on Prompt Fine-Tuning and RAG Models
With the development of smart grids, efficient power data analysis and processing play a significant role in ensuring grid security, promoting energy conservation and emission reduction, and optimizing electricity consumption strategies. Current technologies often encounter issues such as imprecise knowledge retrieval, low query efficiency, and insufficient privacy protection when dealing with complex power data queries and analysis. To address these issues and advance intelligent scheduling and efficient knowledge management and retrieval, this paper proposes a novel approach. This paper introduces a Retrieval-Augmented Generation (RAG) model fine-tuned with prompts. By leveraging the DB-GPT framework and a multi-agent collaboration mechanism, this model enhances knowledge and protects data privacy in specific power scenarios. The innovations of this paper are threefold: 1) optimizing the RAG model's search enhancement capabilities through prompt optimization to improve knowledge retrieval accuracy; 2) efficiently converting natural language queries into SQL statements using Text-to-SQL technology, and querying local private power grid databases (MySQL) via multi-data source connectivity in DB-GPT; and 3) safeguarding power grid data privacy using data security and role-based access control mechanisms within the DB-GPT framework. Results indicate that this method significantly outperforms traditional approaches in power data analysis accuracy and real-time processing. The query accuracy rate improved by 9%, and response time decreased by 23%, while effectively ensuring data security.
Authors
- Cheng Gong (ORCID: https://orcid.org/0000-0002-7282-7707)
- Amin Song (ORCID: https://orcid.org/0009-0009-6001-5718)
- Wei Luo (ORCID: https://orcid.org/0000-0001-7136-0140)
Institutions
- North China Institute of Aerospace Engineering (CN)
Publication Details
- Published
- 2025-07-18
- DOI
- https://doi.org/10.1109/eeais66172.2025.11171257
- Primary Topic
- Medical Research and Treatments
- Type
- article
- Field-Weighted Citation Impact
- 0.00