Intelligent retrieval method and system based on electricity transaction
By constructing a power trading knowledge base and fine-tuning the basic large model, the problem of fragmented knowledge management in traditional power trading centers has been solved, enabling efficient, secure, and accurate retrieval of power trading information.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- CAPITAL ELECTRIC POWER TRADING CENT CO LTD
- Filing Date
- 2025-12-15
- Publication Date
- 2026-05-22
AI Technical Summary
Traditional power trading centers suffer from fragmented knowledge management, low retrieval accuracy, and low efficiency, making it difficult to meet the needs of efficient, secure, and accurate trading operations.
A power trading knowledge base is constructed, a basic large model is selected and fine-tuned through the power trading knowledge base, user search instructions are obtained and semantic recognition is performed to obtain search results.
It has improved the accuracy and efficiency of electricity trading retrieval, and achieved efficient, safe and accurate information acquisition.
Smart Images

Figure CN122072641A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power transaction retrieval technology, and more specifically to an intelligent retrieval method and system based on power transactions. Background Technology
[0002] As a crucial hub in the power market, the power trading center undertakes core functions such as power trading organization, market operation and management, and information dissemination.
[0003] Traditional manual consultation and discrete knowledge retrieval processing models result in highly fragmented knowledge management and high query costs. This is especially true for information such as trading rules, policies, regulations, and operation manuals, which contain a vast amount of technical terminology, policy interpretations, and business processes, making it difficult for market participants to quickly obtain accurate information. In terms of cost and efficiency, the complexity of trading rules and frequent policy updates mean customer service relies on experience and memory to answer questions, leading to misunderstandings and information delays, thus limiting service efficiency. This is particularly true after the release of new policies and rules, when the demand for trading consultation surges, limiting customer service response speed. Furthermore, traditional customer service staff often rely on personal experience and memory to handle customer inquiries, resulting in significant subjectivity and arbitrariness in knowledge storage and transmission. This approach fails to guarantee the accuracy of knowledge and the standardization of services. At the knowledge base level, there is a lack of an intelligent, structured knowledge management system, and the ability to automatically learn and update knowledge, hindering the effective accumulation and sharing of knowledge and failing to meet the needs of power trading centers for efficient, secure, and accurate trading operations.
[0004] In the process of realizing this invention, the inventors of this application discovered that the above-mentioned solutions in the prior art have the defects of low retrieval accuracy and low efficiency. Summary of the Invention
[0005] The purpose of this invention is to provide an intelligent retrieval method and system based on electricity trading, which has the functions of high retrieval accuracy and high efficiency.
[0006] To achieve the above objectives, embodiments of the present invention provide an intelligent retrieval method based on electricity trading, comprising: Obtain historical documents of electricity transactions and construct an electricity transaction knowledge base based on these documents; Select a basic large model; The basic large model is fine-tuned using the aforementioned power trading knowledge base; Get the current user's search command; The search results are obtained based on the search instructions and the fine-tuned basic model.
[0007] Optionally, constructing a power trading knowledge base based on the historical documents includes: Entity extraction, relation extraction, and attribute extraction are performed on the historical documents. Knowledge fusion is performed on the historical documents to construct a knowledge graph for electricity trading.
[0008] Optionally, building a power trading knowledge base based on the historical documents also includes: Obtain the time-series data from the historical documents; A power trading database is constructed based on the time-series data.
[0009] Optionally, fine-tuning the basic large model using the power trading knowledge base includes: Data question-and-answer pairs are constructed based on the aforementioned power trading knowledge base; Construct an instruction dataset based on the aforementioned power trading knowledge base; Data cleaning is performed on the question-and-answer pairs and the instruction dataset. The basic large model is fine-tuned based on the cleaned question-and-answer pairs and the instruction dataset.
[0010] Optionally, fine-tuning the basic large model based on the cleaned data question-and-answer pairs and the instruction dataset includes: fine-tuning the basic large model using a LoRA adapter.
[0011] Optionally, obtaining search results based on the search instruction and the fine-tuned basic model includes: Perform semantic recognition on the search command; Obtain the parsing result of the search command; The search results are obtained based on the parsing results and the fine-tuned basic model.
[0012] Optionally, semantic recognition of the search command includes: Keyword extraction is performed on the search command; The task is to match and retrieve results based on the keywords. The matched search task is used as the parsing result.
[0013] Optionally, obtaining retrieval results based on the parsing results and the fine-tuned basic large model includes: The search instructions are divided into multiple task terms; According to formula (1), obtain the first association score between each task term and the power trading knowledge graph. (1) in, For the first The first association score of each task word For the first The word vectors of the task words, The first in the power trading knowledge graph The text vector of each text. , Numbered by integer; According to formula (2), obtain the second association score between each task term and the power trading database. (2) in, For the first The second association score of the task words. For the first in the power trading database The text vector of each text. Numbered by integer; The total relevance score of the search instruction is obtained according to formula (3); (3) in, The total relevance score of the search command. The number of task terms in the search instruction; Sort according to the content corresponding to the total correlation score; The content with the highest total association score will be output as the search result.
[0014] On the other hand, the present invention also provides an intelligent retrieval system for electricity trading, comprising: a controller, the controller being configured to execute any of the intelligent retrieval methods described above.
[0015] In another aspect, the present invention also provides a computer-readable storage medium storing instructions for being read by a machine to cause the machine to perform any of the intelligent retrieval methods described above.
[0016] Through the above technical solution, the intelligent retrieval method and system based on power trading provided by this invention acquires historical documents of power trading and constructs a corresponding power trading knowledge base. Then, a basic large model is selected and fine-tuned using the power trading knowledge base to obtain a new power trading large model. Simultaneously, the current user's retrieval command is acquired and input into the fine-tuned basic large model, thereby obtaining the corresponding retrieval results. By fine-tuning the basic large model, the accuracy and efficiency of power trading retrieval can be effectively improved.
[0017] Other features and advantages of the embodiments of the present invention will be described in detail in the following detailed description section. Attached Figure Description
[0018] The accompanying drawings are provided to further illustrate embodiments of the present invention and form part of the specification. They are used together with the following detailed description to explain the embodiments of the present invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of an intelligent retrieval method based on electricity trading according to one embodiment of the present invention; Figure 2 This is a flowchart illustrating the construction of a power trading knowledge base in an intelligent retrieval method based on power trading according to an embodiment of the present invention; Figure 3 This is a flowchart of fine-tuning the basic large model in an intelligent retrieval method based on electricity trading according to an embodiment of the present invention; Figure 4 This is a flowchart illustrating the process of obtaining deceleration results in an intelligent retrieval method based on electricity trading according to an embodiment of the present invention; Figure 5 This is a flowchart of semantic recognition of retrieval instructions in an intelligent retrieval method based on electricity trading according to an embodiment of the present invention; Figure 6 This is a flowchart illustrating the output of search results in an intelligent search method based on electricity trading according to an embodiment of the present invention. Detailed Implementation
[0019] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the scope of the present invention.
[0020] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with relevant laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.
[0021] Figure 1 This is a flowchart of an intelligent retrieval method based on electricity trading according to one embodiment of the present invention. Figure 1 In this context, the intelligent retrieval method may include: In step S1, historical documents of electricity transactions are obtained, and an electricity transaction knowledge base is constructed based on these documents. This knowledge base may include an electricity transaction knowledge graph and an electricity transaction database. The historical documents may include, but are not limited to, rule data and transaction data from the electricity transaction system.
[0022] In step S2, a basic large-scale model is selected. This basic large-scale model can include mainstream domestic models, such as iFlytek Spark and the power industry large-scale model.
[0023] In step S3, the basic large model is fine-tuned using the power trading knowledge base. This fine-tuning can be achieved through the power trading knowledge graph and the power trading database; specifically, a LoRA adapter can be used to fine-tune the basic large model.
[0024] In step S4, the search instruction of the current user is obtained. This search instruction may include text, voice, etc.
[0025] In step S5, the search results are obtained based on the search command and the fine-tuned basic model. Specifically, after obtaining the search command, it can be input into the fine-tuned basic model to obtain the search results.
[0026] In steps S1 to S5, historical documents of electricity transactions are first obtained, and an electricity transaction knowledge base is constructed based on these documents. The selected basic model is then fine-tuned based on this knowledge base. The current user's search command is obtained in real time and input into the fine-tuned basic model to obtain search results. Specifically, these search results contain content strongly related to the search command, resulting in higher accuracy.
[0027] Traditional power knowledge retrieval relies on discrete knowledge retrieval patterns, resulting in low retrieval accuracy and efficiency. In this embodiment of the invention, a method of fine-tuning the basic large model effectively improves the retrieval accuracy and efficiency of power trading.
[0028] In this embodiment of the invention, after obtaining historical documents of electricity transactions, an electricity transaction knowledge base can be constructed based on these historical documents. Specifically, the construction steps can be as follows: Figure 2 As shown. Specifically, in Figure 2 In addition, this intelligent retrieval method may also include: In step S10, entity extraction, relation extraction, and attribute extraction are performed on the historical documents.
[0029] In step S11, knowledge fusion is performed on historical documents to construct a power trading knowledge graph. For unstructured documents, cleaning, classification, and standardization can be performed to convert them into structured, interconnected knowledge.
[0030] In step S12, time-series data is obtained from historical documents. This time-series data may include real-time electricity prices, load data, meteorological data, power generation plans, etc.
[0031] In step S13, an electricity trading database is constructed based on time-series data.
[0032] In this embodiment of the invention, after selecting a suitable basic model, the basic model can be fine-tuned using a power trading knowledge base. The specific fine-tuning steps can be as follows: Figure 3 As shown. Specifically, in Figure 3 In addition, this intelligent retrieval method may also include: In step S30, data question-and-answer pairs are constructed based on the power trading knowledge base. This can involve organizing business experts to generate multiple data question-and-answer pairs using the power trading knowledge base.
[0033] In step S31, an instruction dataset is constructed based on the power trading knowledge base. Furthermore, diverse instruction tasks can be constructed based on the power trading knowledge base to facilitate task recognition by the subsequent large-scale model.
[0034] In step S32, data cleaning is performed on the question-and-answer pairs and instruction datasets. This includes removing irrelevant information and standardizing terminology to form the input format required by the model.
[0035] In step S33, the basic large model is fine-tuned based on the cleaned data question-and-answer pairs and instruction dataset.
[0036] In this embodiment of the invention, after fine-tuning the basic large model, the search command can be input into the fine-tuned basic large model to obtain the corresponding search results. Specifically, the steps for obtaining the search results can be as follows: Figure 4 As shown, specifically, in Figure 4 In addition, this intelligent retrieval method may also include: In step S50, semantic recognition is performed on the search command. This semantic recognition of the search command may include, for example... Figure 5 The steps are shown. Specifically, in Figure 5 In this context, semantic recognition may include: In step S500, keywords are extracted from the search command. Specifically, task keywords can be extracted from the search command, such as predicting electricity prices, predicting load, and output schemes. For factual questions, document retrieval can be triggered; for relational questions, knowledge graph retrieval can be triggered; and for numerical questions, time-series database queries can be triggered.
[0037] In step S501, the retrieval task is matched based on keywords. By matching the task keywords with the retrieval task, the retrieval task of the current retrieval instruction can be effectively clarified, and the appropriate output format can be selected.
[0038] In step S502, the matched retrieval task is used as the parsing result.
[0039] In step S51, the parsing result of the retrieval command is obtained.
[0040] In step S52, the search results are obtained based on the parsing results and the fine-tuned basic model. The acquisition of the search results can be as follows: Figure 6 As shown, specifically, in Figure 6 In this context, the output of the search results may include: In step S520, the search command is divided into multiple task terms. After determining the task type, the search command can be further divided into multiple task terms, such as time, model, user, data type, etc.
[0041] In step S521, the first association score between each task term and the power trading knowledge graph is obtained according to formula (1). (1) in, For the first The first association score of each task term, For the first The word vectors of each task word. The first in the knowledge graph of electricity trading The text vector of each text. , The number is an integer.
[0042] In step S522, the second correlation score between each task term and the power trading database is obtained according to formula (2). (2) in, For the first The second association score of each task term, For the first in the power trading database The text vector of each text. The number is an integer.
[0043] In step S523, the total relevance score of the retrieval instruction is obtained according to formula (3); (3) in, The total relevance score for the search command. To determine the number of task terms in the retrieval instruction.
[0044] In step S524, the content is sorted according to the total relevance score. Specifically, after obtaining the total relevance score for the retrieval task, the different retrieval contents are sorted.
[0045] In step S525, the content with the highest total relevance score is output as the search result. Specifically, the content with the highest total relevance score is the one most relevant to the search query, and it is simply output.
[0046] On the other hand, the present invention also provides an intelligent retrieval system for electricity trading. Specifically, the intelligent retrieval system may include a controller, which is specifically used to execute any of the intelligent retrieval methods described above.
[0047] In another aspect, the present invention also provides a computer-readable storage medium storing instructions for being read by a machine to cause the machine to execute any of the intelligent retrieval methods described above.
[0048] Through the above technical solution, the intelligent retrieval method and system based on power trading provided by this invention acquires historical documents of power trading and constructs a corresponding power trading knowledge base. Then, a basic large model is selected and fine-tuned using the power trading knowledge base to obtain a new power trading large model. Simultaneously, the current user's retrieval command is acquired and input into the fine-tuned basic large model, thereby obtaining the corresponding retrieval results. By fine-tuning the basic large model, the accuracy and efficiency of power trading retrieval can be effectively improved.
[0049] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0050] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0051] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0052] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0053] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0054] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0055] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0056] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0057] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A smart retrieval method based on electricity trading, characterized in that, include: Obtain historical documents of electricity transactions and construct an electricity transaction knowledge base based on these documents; Select a basic large model; The basic large model is fine-tuned using the aforementioned power trading knowledge base; Get the current user's search command; The search results are obtained based on the search instructions and the fine-tuned basic model.
2. The intelligent retrieval method according to claim 1, characterized in that, The electricity trading knowledge base constructed based on the aforementioned historical documents includes: Entity extraction, relation extraction, and attribute extraction are performed on the historical documents. Knowledge fusion is performed on the historical documents to construct a knowledge graph for electricity trading.
3. The intelligent retrieval method according to claim 2, characterized in that, Building a power trading knowledge base based on the aforementioned historical documents also includes: Obtain the time-series data from the historical documents; A power trading database is constructed based on the time-series data.
4. The intelligent retrieval method according to claim 1, characterized in that, Fine-tuning the basic model using the aforementioned power trading knowledge base includes: Data question-and-answer pairs are constructed based on the aforementioned power trading knowledge base; Construct an instruction dataset based on the aforementioned power trading knowledge base; Data cleaning is performed on the question-and-answer pairs and the instruction dataset. The basic large model is fine-tuned based on the cleaned question-and-answer pairs and the instruction dataset.
5. The intelligent retrieval method according to claim 4, characterized in that, Fine-tuning the basic large model based on the cleaned data question-and-answer pairs and the instruction dataset includes: fine-tuning the basic large model using a LoRA adapter.
6. The intelligent retrieval method according to claim 3, characterized in that, The search results obtained based on the search instructions and the fine-tuned basic model include: Perform semantic recognition on the search command; Obtain the parsing result of the search command; The search results are obtained based on the parsing results and the fine-tuned basic model.
7. The intelligent retrieval method according to claim 6, characterized in that, Semantic recognition of the search command includes: Keyword extraction is performed on the search command; The task is to match and retrieve results based on the keywords. The matched search task is used as the parsing result.
8. The intelligent retrieval method according to claim 7, characterized in that, The search results obtained based on the parsing results and the fine-tuned basic model include: The search instructions are divided into multiple task terms; According to formula (1), obtain the first association score between each task term and the power trading knowledge graph. ,(1) in, For the first The first association score of each task word For the first The word vectors of the task words, The first in the power trading knowledge graph The text vector of each text. , Numbered by integer; According to formula (2), obtain the second association score between each task term and the power trading database. ,(2) in, For the first The second association score of the task words. For the first in the power trading database The text vector of each text. Numbered by integer; The total relevance score of the search instruction is obtained according to formula (3); ,(3) in, The total relevance score of the search command. The number of task terms in the search instruction; Sort according to the content corresponding to the total correlation score; The content with the highest total association score will be output as the search result.
9. An intelligent retrieval system based on electricity trading, characterized in that, include: A controller for executing the intelligent retrieval method as described in any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that are read by a machine to cause the machine to perform the intelligent retrieval method as described in any one of claims 1-8.