Intelligent power supply information retrieval method and device based on large language model

Through the intelligent search method of power supply information based on large language model, the power robot customer service system is solved, and more accurate and natural user answers are achieved, and service quality is improved.

CN120372060APending Publication Date: 2025-07-25STATE GRID JIANGSU ELECTRIC POWER CO LTD MARKETING SERVICE CENT +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510480552.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-17
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

The existing power robot customer service system relies on rule-driven or keyword matching, making it difficult to accurately understand complex and diverse user needs, resulting in low response accuracy and poor customer experience.

Method used

Using an intelligent power supply information retrieval method based on a large language model, through intention recognition, entity extraction and knowledge base search, prompt words are constructed to generate the final reply, and the pre-trained large language model is used to answer.

Benefits of technology

It improves the accuracy and naturalness of user queries, improves user experience, and meets the service quality that meets users' diverse needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120372060A_ABST
    Figure CN120372060A_ABST
Patent Text Reader

Abstract

The invention discloses a power supply information intelligent retrieval method and device based on a large language model, and relates to the technical field of power marketing. Performing intention recognition on a query problem of a user to obtain a query intention of the user and a corresponding query mode; performing entity extraction on the query question to obtain a key entity; according to the query intention, the query mode and the key entity, performing retrieval in a preset knowledge base to obtain related knowledge; according to the query question and the related knowledge, constructing a cue word; and taking the cue word as the input of a pre-trained large language model to obtain the final reply of the query. Through intention recognition instead of simple keyword matching, the method can more accurately understand the query demand of the user, so that the retrieval accuracy is improved. The large language model is used for answering, so that more natural answers closer to user requirements can be provided, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power marketing, and particularly relates to an intelligent retrieval method and device for power supply information based on a large language model. Background Art

[0002] With the rapid development of information technology, the power industry is gradually entering the era of intelligence and digitalization. In the field of power marketing, as users' requirements for service quality continue to increase, traditional human customer service has become difficult to meet the growing service needs. Especially when facing a large number of repetitive questions and high-concurrency requests, the work pressure of human customer service increases, and it is difficult to guarantee service efficiency and quality. As an automated service tool, robot customer service can efficiently handle various types of user consultation questions. These robot customer services have the advantages of providing round-the-clock and uninterrupted services, being able to quickly respond to users' query requests, and providing users with various services such as electricity bill query and business handling. In the power industry, robot customer service not only greatly improves service efficiency but also reduces labor costs.

[0003] However, despite the great potential shown by robot customer service in improving service efficiency, there are still many problems in reality. Currently, most power robot customer service systems still rely on rule-driven methods, that is, they reply by setting predefined question-and-answer pairs or based on keyword matching algorithms. Although this method can handle some common standardized questions, it often cannot accurately respond to complex and diverse user needs. When the question raised by the user is not in the preset rules, the robot will not be able to understand the user's intention, resulting in low accuracy of the reply and a significant reduction in the customer experience. Summary of the Invention

[0004] The purpose of the present invention is to solve the problem of low accuracy of replies mentioned in the above background art, and to propose an intelligent retrieval method and device for power supply information based on a large language model.

[0005] In the first aspect of the implementation of the present invention, an intelligent retrieval method for power supply information based on a large language model is provided. The method includes:

[0006] Obtain the user's query question;

[0007] Perform intention recognition on the query question to obtain the user's query intention and the corresponding query method;

[0008] Perform entity extraction on the query question to obtain key entities;

[0009] Retrieve in a preset knowledge base according to the query intention, query method, and key entities to obtain relevant knowledge;

[0010] Construct a prompt according to the query problem and relevant knowledge;

[0011] Use the prompt as the input of a pre-trained large language model to obtain the final answer to this query.

[0012] Preferably, the query methods include structured query and unstructured query;

[0013] The intention recognition of the query problem to obtain the user's query intention and the corresponding query method is completed by a pre-trained purpose recognition model; the purpose recognition model includes:

[0014] An embedding module for preprocessing and vectorizing the query problem to obtain a text vector sequence;

[0015] A semantic extraction module for using a bidirectional gated recurrent unit to extract context semantic features from the text vector sequence to obtain a first feature combination;

[0016] An attention module for performing attention weighted summation on the first feature combination to obtain a second feature;

[0017] A first fully connected network for processing the second feature to obtain a classification probability distribution; select the intention label corresponding to the maximum classification probability as the query intention;

[0018] A second fully connected network for processing the second feature to obtain the probability of structured query; if the probability of structured query is greater than a preset threshold, then determine the query method as structured query, otherwise, determine it as unstructured query.

[0019] Preferably, the output layer of the first fully connected network contains multiple neurons and obtains the classification probability through the Softmax function; the output layer of the second fully connected network contains one neuron and obtains the probability of structured query through the sigmoid function.

[0020] Preferably, the knowledge base includes a relational database and a vector database;

[0021] The retrieval of relevant knowledge in a preset knowledge base according to the query intention, query method and key entity includes:

[0022] If the query method is structured query, then perform keyword retrieval in the relational database according to the query intention and key entity to obtain the first type of relevant knowledge;

[0023] If the query method is an unstructured query, the query problem is vectorized to obtain a vector index; according to the vector index, similarity retrieval is performed in the vector database to obtain the second type of relevant knowledge.

[0024] Preferably, after identifying the query intention of the user and the corresponding query method for the query problem, the method further includes:

[0025] If the query method is a structured query, perform an integrity check on the key entity;

[0026] If the key entity is incomplete, prompt and question the user to guide the user to supplement the missing information.

[0027] In the second aspect of the implementation of the present invention, an intelligent power supply information retrieval device based on a large language model is provided. The device includes:

[0028] An information receiving module, configured to obtain a query problem of a user;

[0029] An objective recognition module, configured to identify the query intention of the user and the corresponding query method for the query problem;

[0030] An entity extraction module, configured to extract entities from the query problem to obtain key entities;

[0031] A knowledge retrieval module, configured to retrieve relevant knowledge in a preset knowledge base according to the query intention, query method, and key entity;

[0032] A prompt generation module, configured to construct a prompt word according to the query problem and the relevant knowledge;

[0033] A reply generation module, configured to use the prompt word as the input of a pre-trained large language model to obtain the final reply to this query.

[0034] Preferably, the query method includes a structured query and an unstructured query;

[0035] The objective recognition module identifies the query intention of the query problem by calling a pre-trained objective recognition model; the objective recognition model includes:

[0036] An embedding module, configured to preprocess and vectorize the query problem to obtain a text vector sequence;

[0037] A semantic extraction module, configured to use a bidirectional gated recurrent unit to extract context semantic features from the text vector sequence to obtain a first feature combination;

[0038] An attention module, which is used to perform attention weighted summation on the first feature combination to obtain a second feature;

[0039] A first fully connected network, which is used to process the second feature to obtain a classification probability distribution; and select the intent label corresponding to the maximum classification probability as the query intent;

[0040] A second fully connected network, which is used to process the second feature to obtain the probability of a structured query; if the probability of the structured query is greater than a preset threshold, the query method is determined as a structured query, otherwise, it is determined as an unstructured query.

[0041] Preferably, the output layer of the first fully connected network contains multiple neurons, and the classification probability is obtained through the Softmax function; the output layer of the second fully connected network contains one neuron, and the probability of a structured query is obtained through the sigmoid function.

[0042] Preferably, the knowledge base includes a relational database and a vector database;

[0043] The knowledge retrieval module includes:

[0044] A relational database retrieval module, which is used to, if the query method is a structured query, perform keyword retrieval in the relational database according to the query intent and the key entity to obtain a first type of relevant knowledge;

[0045] A vector database retrieval module, which is used to, if the query method is an unstructured query, perform vectorized representation on the query problem to obtain a vector index; and perform similarity retrieval in the vector database according to the vector index to obtain a second type of relevant knowledge.

[0046] Preferably, the device further includes an entity confirmation module; the entity confirmation module includes:

[0047] An entity inspection module, which is used to, if the query method is a structured query, perform integrity inspection on the key entity;

[0048] An entity supplement module, which is used to, if the key entity is incomplete, prompt and question the user to guide the user to supplement the missing information.

[0049] Advantages of the present invention:

[0050] The present invention proposes an intelligent power supply information retrieval method based on a large language model. The method includes: obtaining the user's query question; performing intent recognition on the query question to obtain the user's query intent and the corresponding query method; extracting entities from the query question to obtain key entities; retrieving relevant knowledge in a preset knowledge base according to the query intent, query method, and key entities; constructing a prompt word according to the query question and the relevant knowledge; and using the prompt word as the input of a pre-trained large language model to obtain the final answer for this query.

[0051] By means of intent recognition instead of simple keyword matching, this method can more accurately understand the user's query needs, thus improving the accuracy of retrieval. By using a large language model to answer, it can provide more natural and user-demand-oriented answers, thus enhancing the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. Among them:

[0053] Figure 1 FIG. is a schematic flow chart of an intelligent power supply information retrieval method based on a large language model provided by an embodiment of the present invention;

[0054] Figure 2 FIG. is a schematic structural diagram of an intelligent power supply information retrieval device based on a large language model provided by an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0055] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art without creative efforts based on the embodiments of the present invention belong to the scope of protection of the present invention.

[0056] An embodiment of the present invention provides an intelligent power supply information retrieval method based on a large language model. Refer to Figure 1 , Figure 1 FIG. is a flow chart of an intelligent power supply information retrieval method based on a large language model provided by an embodiment of the present invention. The method includes the following steps:

[0057] S101, obtaining the user's query question.

[0058] S102. Identify the intent of the query problem to obtain the user's query intent and the corresponding query method.

[0059] S103. Extract entities from the query problem to obtain key entities.

[0060] S104. Retrieve relevant knowledge in a preset knowledge base according to the query intent, query method, and key entities.

[0061] S105. Construct a prompt word according to the query problem and relevant knowledge.

[0062] S106. Use the prompt word as the input of a pre-trained large language model to obtain the final answer to this query.

[0063] According to an intelligent power supply information retrieval method based on a large language model provided by an embodiment of the present invention, through intent recognition rather than simple keyword matching, this method can more accurately understand the user's query needs, thereby improving the accuracy of retrieval. By using a large language model to answer, it can provide more natural and more user-demand-oriented answers, thereby enhancing the user experience.

[0064] In one implementation, the large language model can be ChatGLM3, which is fine-tuned and deployed into the system.

[0065] In one embodiment, the query methods include structured queries and unstructured queries.

[0066] In S102, the intent recognition of the query problem is completed by calling a pre-trained purpose recognition model. The purpose recognition model includes:

[0067] An embedding module for preprocessing and vectorizing the query problem to obtain a text vector sequence. Specifically, the preprocessing includes conventional operations such as word segmentation, stop word removal, and symbol processing. For vectorization, the Word2Vec or GloVe model can be used first for word embedding to obtain the static word vectors of each word; then the BERT model is used to process the static word vectors to obtain dynamic word vectors, and the text vector sequence is combined.

[0068] A semantic extraction module for using a bidirectional gated recurrent unit to extract context semantic features from the text vector sequence to obtain a first feature combination H: H = [h1, h2,... h n .

[0069] An attention module for performing attention weighted summation on the first feature combination to obtain a second feature F:

[0070]

[0071] Where Wα and b α are learnable parameters of the attention module, and tanh is an activation function used to transform h t into the attention weight α t ; exp is the exponential function with the natural constant e as the base; n represents the number of features in the first feature combination, α i represents the attention weight of the i-th feature, h t represents the t-th feature in the first feature combination, α t represents the attention weight of the t-th feature, β t represents the weighting coefficient of the t-th feature.

[0072] The first fully connected network is used to process the second feature to obtain a classification probability distribution; the intent label corresponding to the maximum classification probability is selected as the query intent. Specifically, the first fully connected network includes a hidden layer and an output layer. The output layer contains multiple neurons, and the classification probability is obtained through the Softmax function.

[0073] The second fully connected network is used to process the second feature to obtain the probability of a structured query. Specifically, the second fully connected network includes a hidden layer and an output layer. The output layer contains one neuron, and the probability of a structured query is obtained through the sigmoid function. If the probability of a structured query is greater than a preset threshold, the query method is determined as a structured query; otherwise, it is determined as an unstructured query. The preset threshold can be set to 0.5.

[0074] Specifically, during the training process of the purpose recognition model, the parameters of the embedding module, semantic extraction module, modular attention module, first fully connected network, and second fully connected network can be updated according to the gradient of the preset loss function. Specifically, through the backpropagation algorithm, the gradient of the preset loss function with respect to each parameter is calculated, and the parameters are updated according to the gradient and the learning rate. The update formula is as follows:

[0075]

[0076] where W i is the i-th parameter in the purpose recognition model, L is the preset loss function, and α is the learning rate.

[0077] Optionally, the learning rate is calculated as follows:

[0078]

[0079] where α m,i represents the learning rate of the i-th parameter in the m-th iteration, α0 represents the initial learning rate, represents the second-order moment estimate of the i-th parameter in the m-th iteration, and ε represents a small constant.

[0080] Optionally, the preset loss function is calculated as follows:

[0081] L = L1 + λL2,

[0082] where L is the preset loss function, L1 is the loss function of the first fully connected network, L2 is the loss function of the second fully connected network, and λ is the weight coefficient for balancing the two loss functions.

[0083] Optionally, the loss function L1 of the first fully connected network is calculated by the following formula:

[0084]

[0085] where N is the number of intent labels, y j is the j-th intent label, and p n represents the probability that the sample belongs to the j-th intent label, i.e., the classification probability.

[0086] Optionally, the loss function L2 of the second fully connected network is calculated by the following formula:

[0087] L2 = -y q log(σ(z q )) - (1 - y q )log(1 - σ(z q ))

[0088] where y q is the true label of the query method, z q is the output of the second fully connected network, σ is the sigmoid function, and σ(z q ) is the probability of the predicted structured query.

[0089] In one implementation, the semantic extraction module extracts context semantic features from the text vector, which can better understand the semantics of the query problem and ensure accurate identification of the user's query intent.

[0090] In one implementation, for a simple query problem, such as "How many degrees of electricity did I use in June this year", it can be directly queried from the relational database. For a complex or ambiguous query problem, such as "Why is there a power shortage in Area A and how to solve it", it needs to be searched in unstructured data (such as text). In the embodiments of the present invention, the unstructured data is vectorized and stored to achieve efficient retrieval.

[0091] In one embodiment, S103 can implement entity extraction through a deep learning model of conditional random field or named entity recognition (such as BERT-based NER).

[0092] In one embodiment, between S103 and S104, the method further includes:

[0093] Step 1, if the query method is a structured query, perform an integrity check on the key entity.

[0094] Step 2, if the key entity is incomplete, prompt and question the user to guide the user to supplement the missing information.

[0095] In one implementation, by performing an integrity check on the key entity and actively prompting and guiding the user to supplement the missing information, it can be ensured that the user's query information is complete in the scenario of structured query, avoiding inaccurate retrieval results due to missing key information. For example, for the question "How many degrees of electricity did I use?", after clarifying the query intent and query method, match the template to clarify which keywords are needed for the query, such as user keywords, time keywords, and electricity consumption keywords, and each keyword is obtained from the entity. After entity extraction of the query question, it is found that the time entity is missing and the time keyword is missing, resulting in an inaccurate query, so the user is questioned about the specific time information. This can improve the accuracy of the query results and thus improve user satisfaction.

[0096] In one embodiment, the knowledge base includes a relational database and a vector database. The knowledge retrieved from the relational database is called the first type of relevant knowledge; the knowledge retrieved from the vector database is called the second type of relevant knowledge. S104 includes:

[0097] Case 1, if the query method is a structured query, perform keyword retrieval in the relational database according to the query intent and the key entity to obtain the first type of relevant knowledge;

[0098] Case 2, if the query method is an unstructured query, vectorize the query question to obtain a vector index; according to the vector index, perform similarity retrieval in the vector database to obtain the second type of relevant knowledge.

[0099] In one implementation, the relational database is suitable for processing structured data. Through keyword retrieval, it can be ensured that the returned knowledge is directly relevant and accurate. For unstructured queries, the vector database can find the most semantically relevant content in a large amount of data through similarity retrieval, such as cosine similarity or Euclidean distance, improving the quality and accuracy of the query results.

[0100] In one embodiment, S105 includes:

[0101] Integrate the query question, query intent, and relevant knowledge into a preset template to obtain a prompt word.

[0102] An embodiment of the present invention provides an intelligent power supply information retrieval device based on a large language model. Refer to Figure 2 , Figure 2 which is a structural diagram of an intelligent power supply information retrieval device based on a large language model provided by an embodiment of the present invention. The device includes:

[0103] An information receiving module, configured to obtain a query question from a user.

[0104] An objective recognition module, configured to perform intent recognition on the query question to obtain the user's query intent and the corresponding query method.

[0105] An entity extraction module, configured to perform entity extraction on the query question to obtain key entities.

[0106] A knowledge retrieval module, configured to retrieve relevant knowledge in a preset knowledge base according to the query intent, query method, and key entities.

[0107] A prompt generation module, configured to construct a prompt word according to the query question and relevant knowledge.

[0108] A reply generation module, configured to use the prompt word as the input of a pre-trained large language model to obtain the final reply for this query.

[0109] According to the intelligent power supply information retrieval device based on a large language model provided by an embodiment of the present invention, through intent recognition instead of simple keyword matching, this method can more accurately understand the user's query needs, thereby improving the accuracy of retrieval. By using a large language model to answer, it can provide a more natural and user-demand-oriented answer, thereby enhancing the user experience.

[0110] In one embodiment, the objective recognition module performs intent recognition on the query question by calling a pre-trained objective recognition model.

[0111] In one embodiment, the knowledge base includes a relational database and a vector database; the knowledge retrieval module includes:

[0112] A relational database retrieval module, configured to, if the query method is a structured query, perform keyword retrieval in the relational database according to the query intent and key entities to obtain the first type of relevant knowledge.

[0113] A vector database retrieval module, configured to, if the query method is an unstructured query, perform vectorization representation on the query question to obtain a vector index; according to the vector index, perform similarity retrieval in the vector database to obtain the second type of relevant knowledge.

[0114] In one embodiment, the device further includes an entity confirmation module; the entity confirmation module includes:

[0115] An entity inspection module, configured to perform integrity inspection on key entities if the query method is a structured query.

[0116] An entity supplement module, configured to prompt and question the user to guide the user to supplement missing information if the key entity is incomplete.

[0117] The present disclosure may be a system, a method, and / or a computer program product. The computer program product may include a computer-readable storage medium having thereon computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.

[0118] The computer-readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device. The computer-readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanically encoded device such as a punch card or raised structures in grooves having instructions stored thereon, and any suitable combination of the foregoing. The computer-readable storage medium as used herein is not construed as being a transitory signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., an optical pulse through an optical fiber cable), or an electrical signal transmitted through a wire.

[0119] The computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to various computing / processing devices, or may be downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network may include copper transmission cables, optical fiber transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing / processing device.

[0120] Computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state-setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, etc., and conventional procedural programming languages such as the "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider). In some embodiments, by using the state information of the computer-readable program instructions to customize an electronic circuit, such as a programmable logic circuit, a field-programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit can execute the computer-readable program instructions to implement various aspects of the present disclosure. The above has described in detail an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered as limiting the scope of implementation of the present invention. All equivalent changes and improvements made in accordance with the scope of the present invention application should still fall within the scope covered by the patent of the present invention.

Claims

1. An intelligent power supply information retrieval method based on a large language model, characterized in that The method includes: Obtaining the user's query question; Performing intent recognition on the query question to obtain the user's query intent and the corresponding query method; Performing entity extraction on the query question to obtain key entities; Retrieving relevant knowledge in a preset knowledge base according to the query intent, the query method, and the key entities; Constructing a prompt word according to the query question and the relevant knowledge; Using the prompt word as the input of a pre-trained large language model to obtain the final reply for this query.

2. The intelligent power supply information retrieval method based on a large language model according to claim 1, wherein The query method includes structured query and unstructured query; Performing intent recognition on the query question to obtain the user's query intent and the corresponding query method is completed by a pre-trained purpose recognition model; The purpose recognition model includes: An embedding module for preprocessing and vectorizing the query question to obtain a text vector sequence; A semantic extraction module for using a bidirectional gated recurrent unit to extract context semantic features from the text vector sequence to obtain a first feature combination; An attention module for performing attention weighted summation on the first feature combination to obtain a second feature; A first fully connected network for processing the second feature to obtain a classification probability distribution; selecting the intent label corresponding to the maximum classification probability as the query intent; A second fully connected network for processing the second feature to obtain the probability of a structured query; if the probability of the structured query is greater than a preset threshold, the query method is determined to be a structured query, otherwise, it is determined to be an unstructured query.

3. The intelligent power supply information retrieval method based on a large language model according to claim 2, wherein The output layer of the first fully connected network contains multiple neurons and obtains the classification probability through the Softmax function; the output layer of the second fully connected network contains one neuron and obtains the probability of a structured query through the sigmoid function.

4. The intelligent power supply information retrieval method based on a large language model according to claim 2, wherein The knowledge base includes a relational database and a vector database; Retrieving relevant knowledge in a preset knowledge base according to the query intent, query method, and key entities includes: If the query method is a structured query, performing keyword retrieval in the relational database according to the query intent and the key entities to obtain the first type of relevant knowledge; If the query method is an unstructured query, vectorizing the query question to obtain a vector index; performing similarity retrieval in the vector database according to the vector index to obtain the second type of relevant knowledge.

5. The intelligent power supply information retrieval method based on a large language model according to claim 2, wherein After performing intent recognition on the query question to obtain the user's query intent and the corresponding query method, the method further includes: If the query method is a structured query, performing integrity check on the key entities; If the key entities are incomplete, prompting and asking the user for additional information to guide the user to supplement the missing information.

6. An intelligent power supply information retrieval device based on a large language model that utilizes the method of intelligent power supply information retrieval based on a large language model according to any one of claims 1 to 5, characterized in that, The device includes: An information receiving module for obtaining the user's query question; A purpose recognition module for performing intent recognition on the query question to obtain the user's query intent and the corresponding query method; An entity extraction module for performing entity extraction on the query question to obtain key entities; A knowledge retrieval module for retrieving relevant knowledge in a preset knowledge base according to the query intention, the query method, and the key entity; A prompt generation module for constructing a prompt word according to the query question and the relevant knowledge; A response generation module for using the prompt word as the input of a pre-trained large language model to obtain the final response to this query.

7. The intelligent power supply information retrieval device based on a large language model according to claim 6, wherein The query method includes structured query and unstructured query; The purpose recognition module identifies the intention of the query question by calling a pre-trained purpose recognition model; The purpose recognition model includes: An embedding module for preprocessing and vectorizing the query question to obtain a text vector sequence; A semantic extraction module for using a bidirectional gated recurrent unit to extract context semantic features from the text vector sequence to obtain a first feature combination; An attention module for performing attention weighted summation on the first feature combination to obtain a second feature; A first fully connected network for processing the second feature to obtain a classification probability distribution; selecting the intention label corresponding to the maximum classification probability as the query intention; A second fully connected network for processing the second feature to obtain the probability of a structured query; if the probability of the structured query is greater than a preset threshold, the query method is determined to be a structured query, otherwise, it is determined to be an unstructured query.

8. An intelligent power supply information retrieval device based on a large language model according to claim 7, characterized in that, The output layer of the first fully connected network contains multiple neurons and obtains the classification probability through the Softmax function; the output layer of the second fully connected network contains one neuron and obtains the probability of a structured query through the sigmoid function.

9. An intelligent power supply information retrieval device based on a large language model according to claim 7, characterized in that, The knowledge base includes a relational database and a vector database; The knowledge retrieval module includes: A relational database retrieval module for performing keyword retrieval in the relational database according to the query intention and the key entity if the query method is a structured query to obtain the first type of relevant knowledge; A vector database retrieval module for vectorizing the query question to obtain a vector index if the query method is an unstructured query; performing similarity retrieval in the vector database according to the vector index to obtain the second type of relevant knowledge.

10. An intelligent power supply information retrieval device based on a large language model according to claim 7, characterized in that, The device further includes an entity confirmation module; the entity confirmation module includes: An entity inspection module for performing integrity inspection on the key entity if the query method is a structured query; An entity supplement module for prompting and questioning the user to guide the user to supplement the missing information if the key entity is incomplete.