Power operation and maintenance knowledge service method, device, equipment and medium

By building a multi-theme knowledge base and semantic model, combined with sparse-dense mixed search, the review problems caused by the dispersion of operation and inspection knowledge files of power equipment are solved, and efficient and accurate operation and inspection knowledge services are achieved.

CN120258136APending Publication Date: 2025-07-04CHINA ELECTRIC POWER RESEARCH INSTITUTE CO LTD +1
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202510326679.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-07-04

AI Technical Summary

Technical Problem

The number of power equipment operation and inspection knowledge files is large and the storage is scattered, which makes it difficult to manually review. The existing intelligent question-and-answer method is not well understood in depth and cannot provide accurate replies.

Method used

Build a multi-theme and multi-scene power equipment knowledge base, combine semantic models for intent recognition and mixed search, and generate structured answers through sparse keywords and dense vector searches to improve retrieval accuracy and efficiency.

Benefits of technology

It achieves high accuracy and strong generalization of the operation and inspection knowledge of power equipment, reduces information redundancy and noise, and provides accurate fault diagnosis and maintenance suggestions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120258136A_ABST
    Figure CN120258136A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of power equipment operation inspection auxiliary decision making, and particularly relates to a power operation inspection knowledge service method and device, equipment and a medium. The method comprises the following steps: analyzing semantics of query input of a user by utilizing a large semantic model, and determining a corresponding target sub-knowledge base in combination with an intention classification sample library and an intention set; performing sentence segmentation on the document of the target sub-knowledge base, generating document fragments containing continuous sentences through context supplementation, and enabling semantics of the document fragments to be overlapped; calculating a keyword correlation score of the query word and the document fragment; generating a text vector through a semantic coding model, and calculating a semantic correlation score of the query input and the document fragments; fusing the keyword correlation score and the semantic correlation score, and outputting each related document fragment according to a comprehensive score sequence; and inputting query input of a user and related document fragments into the large semantic model, and generating a structured answer in combination with the logic in the operation and inspection field of the power equipment. And the electric power operation and maintenance knowledge service with high accuracy and strong generalization is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of auxiliary decision-making for power equipment operation and inspection, and specifically relates to a power operation and inspection knowledge service method, device, equipment and medium. Background Art

[0002] Due to factors such as equipment aging and wear, complex environments, and changing operating conditions, power equipment faces many potential risks during operation. Intelligent Q&A on power equipment operation and maintenance knowledge can effectively assist front-line personnel in carrying out equipment operation and maintenance, fault diagnosis and cause analysis, and maintenance plan and disposal suggestion formulation. It is of great significance for preventing faults, improving abnormal handling efficiency, and ensuring safe and stable operation of the power grid. The number of professional operation and maintenance documents such as power equipment operation procedures and maintenance standards is large and the storage is scattered, which makes it difficult to manually review operation and maintenance knowledge. Summary of the invention

[0003] The purpose of the present invention is to provide a power operation and inspection knowledge service method, device, equipment and medium to solve the problem in the prior art that the number of operation and inspection professional documents such as power equipment operation regulations and maintenance standards are large and the storage is scattered, which makes it difficult to manually check the operation and inspection knowledge.

[0004] In order to achieve the above object, the present invention adopts the following technical solution: In a first aspect, the present invention provides a power operation and inspection knowledge service method, comprising the following steps: Based on the user's query input, the semantics of the query input is analyzed using the semantic big model, and the corresponding target sub-knowledge base is determined by combining the predefined intent classification sample library and intent set; Sentence segmentation is performed on the documents of the target sub-knowledge base, and document segments containing consecutive sentences are generated by context supplementation, maintaining the semantic overlap between document segments; Calculate the keyword relevance score between the query word and the document fragment; wherein the query word is obtained based on the query input segmentation; generate a text vector through a semantic encoding model, calculate the semantic relevance score between the query input and the document fragment; integrate the keyword relevance score and the semantic relevance score, and output the relevant document fragments according to the comprehensive score sorting; The user's query input and related document fragments are input into the semantic big model, and the structured answer is generated by combining the logic of power equipment operation and maintenance domain.

[0005] Preferably, the predefined intent classification sample library is constructed in the following way: The mapping relationship between typical query statements and intent labels in the field of power equipment operation and maintenance is annotated; the annotation process includes the extended annotation of synonymous query statements to form a set of diversified query expression samples covering the same intent.

[0006] Preferably, the documents in the target sub-knowledge base are segmented into sentences, and document shards containing consecutive sentences are generated through context supplementation, including: After splitting the document into independent sentences, a sliding window is used to intercept consecutive sentences with a fixed window length L, where the window length L is greater than the number of characters in the longest sentence, and at least a preset proportion of overlapping content is retained between adjacent shards.

[0007] Preferably, calculating the keyword relevance score between the query term and the document shard includes: Performing word segmentation on the query input to obtain query terms; calculating the term frequency and inverse document frequency of the query terms; calculating the keyword relevance score between the query input and the document shard based on the term frequency and inverse document frequency.

[0008] Preferably, generating text vectors through a semantic encoding model and calculating the semantic relevance score between the query input and the document shard includes: Performing vectorized encoding on the input query and the document shard set through a pre-trained semantic encoding model to generate a query vector representation and a document shard vector representation; Performing clustering division on the document shard vector representation, dividing the vector space into m mutually exclusive subspaces, and assigning a cluster center vector to each subspace; Calculating the relevance between the query vector and the cluster center vectors of each subspace, and screening out the top l subspaces; Within the screened subspaces, calculating the cosine similarity between the query vector and the corresponding document shard vector as the semantic relevance score; Sorting the document shards based on the semantic relevance score, and outputting a candidate shard set with a score higher than the threshold.

[0009] Preferably, fusing the keyword relevance score and the semantic relevance score , including:

[0010] where α is a weight used to balance keyword matching and semantic similarity, represents the keyword relevance score, represents the semantic relevance score.

[0011] Preferably, the sub-knowledge base is obtained by dividing the power equipment operation and maintenance knowledge base according to equipment types and business scenarios. Each sub-knowledge base corresponds to a specific equipment fault diagnosis or status evaluation theme, and the knowledge documents are classified according to semantic relevance.

[0012] In the second aspect of the present invention, a power operation and maintenance knowledge service device is provided, including: The first determination module is used to analyze the semantics of the query input by using a semantic large model based on the user's query input, and determine the corresponding target sub-knowledge base in combination with a predefined intention classification example library and an intention set. The document processing module is used to perform sentence segmentation on the documents in the target sub-knowledge base, generate document shards containing continuous sentences through context supplementation, and maintain semantic overlap between the document shards. The calculation module is used to calculate the keyword correlation score between the query term and the document shards; wherein, the query term is obtained by segmenting the query input; generate text vectors through a semantic encoding model, and calculate the semantic correlation score between the query input and the document shards; fuse the keyword correlation score and the semantic correlation score, and sort and output the relevant document shards according to the comprehensive score. The second determination module is used to input the user's query input and the relevant document shards into the semantic large model, and generate a structured answer in combination with the logic in the field of power equipment operation and maintenance.

[0013] In the third aspect of the present invention, an electronic device is provided, including a processor and a memory, and the processor is used to execute a computer program stored in the memory to implement the power operation and maintenance knowledge service method as described above.

[0014] In the fourth aspect of the present invention, a computer-readable storage medium is provided, characterized in that the computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by a processor, the power operation and maintenance knowledge service method as described above is implemented.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: The method provided by the present invention introduces the semantic large model technology into the research of power equipment operation and maintenance knowledge question and answer service, constructs a multi-topic and multi-scenario knowledge base set and an automatic matching method, designs a hybrid retrieval enhancement strategy, and then proposes a power operation and maintenance knowledge service method based on refined knowledge base and large model hybrid retrieval enhancement, realizing a power equipment operation and maintenance knowledge question and answer service with high accuracy and strong generalization.

[0016] The power equipment operation and maintenance knowledge base is subdivided and classified to form a multi-topic and refined sub-knowledge base set for power equipment operation and maintenance, reducing information redundancy, noise, semantic confusion, etc. in the knowledge retrieval process, and saving computing resources.

[0017] An intention set and an intention classification example library are constructed according to the type of operation and maintenance sub-knowledge base, and in combination with the intention classification instruction, the intention set and the intention classification example related to the query input, an intention recognition prompt template is designed, and the semantic large model is used to realize the automatic selection of the operation and maintenance sub-knowledge base related to the user query.

[0018] The relevance scores between the query input and the document information in the operation and maintenance sub-knowledge base are calculated respectively based on sparse keyword retrieval and dense vector retrieval, and then the comprehensive relevance score is calculated by weighted summation. According to the comprehensive relevance score, the knowledge related to the query is selected to enhance the generation of the semantic large model, avoiding information omission in a single retrieval method and improving the retrieval accuracy and efficiency.

[0019] A power operation and maintenance knowledge service device, an electronic device, and a computer-readable storage medium provided by the present invention also solve the problems raised in the background art section. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] The accompanying drawings forming a part of this application are used to provide a further understanding of the present invention. The schematic embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation to the present invention. In the drawings: Figure 1 It is a flowchart of a power operation and maintenance knowledge service method according to an embodiment of the present invention; Figure 2 It is a schematic diagram for intention recognition of a power equipment operation and maintenance semantic large model in an embodiment of the present invention; Figure 3 It is a schematic diagram of the analysis process of a power operation and maintenance knowledge service method based on a refined knowledge base and hybrid retrieval enhancement of a large model in an embodiment of the present invention; Figure 4 It is a structural block diagram of a power operation and maintenance knowledge service device according to an embodiment of the present invention; Figure 5 It is a structural block diagram of an electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0021] The present invention will be described in detail below with reference to the drawings and in conjunction with the embodiments. It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments can be combined with each other.

[0022] The following detailed descriptions are all exemplary descriptions, aiming to provide further detailed descriptions of the present invention. Unless otherwise specified, all technical terms adopted by the present invention have the same meaning as commonly understood by those of ordinary skill in the art to which the present application belongs. The terms used in the present invention are only for describing specific embodiments and are not intended to limit the exemplary embodiments according to the present invention.

[0023] Embodiment 1 The present invention relates to the technical field of auxiliary decision-making for the operation and maintenance of power equipment, and specifically to a power operation and maintenance knowledge service method based on a refined knowledge base and hybrid retrieval enhancement of a large model. By subdividing the knowledge base for power equipment operation and maintenance and introducing semantic large model technology, a hybrid retrieval enhancement generation strategy is designed to effectively search and integrate relevant knowledge of the input question and generate accurate responses, improving the quality, efficiency, and intelligence level of power equipment operation and maintenance knowledge Q&A services.

[0024] As Figure 1 shown, a power operation and maintenance knowledge service method includes the following steps: S1. Based on the user's query input, use the semantic large model to analyze the semantics of the query input, and combine the predefined intent classification example library and intent set to determine the corresponding target sub-knowledge base.

[0025] Specifically, construct a knowledge base classification list based on equipment type and specific business scenarios. The knowledge base classification list includes at least one of the topics such as judgment of transformer abnormal reasons, transformer status evaluation, and circuit breaker defect classification; refine and classify and count the professional documents in the power equipment operation and maintenance knowledge base. The professional documents include at least one type of basic operation and maintenance theory, typical fault cases, and operation and maintenance standard knowledge; divide the classified professional documents into corresponding sub-knowledge bases kb i , forming a multi-topic, refined sub-knowledge base set {kb1, kb2,..., kb s}}.

[0026] Specifically, construct an intent set I = {intent1, intent2,..., intent s} corresponding to the sub-knowledge base type, where each intent intent_i is associated with a sub-knowledge base kb i ; manually annotate the intent classification example library of the intent set. The example library contains several groups of annotation data in the form of (input: query question, intent: intent i ); perform vector embedding representation on the user's query input Q and the input text of the intent classification example, and obtain the intent classification example most relevant to the query input Q through vector similarity search; construct an intent recognition prompt template based on the intent classification instruction, intent set I, and the retrieved intent classification example; where the template includes: (a) classification instruction: "Mark an intent for the user input, and only reply with the intent name"; (b) optional intent list: "The intent should be one of the following: intent1, intent2,..., intent s "; (c) input content of the user query Q; (d) retrieved intent classification example: "Example: (input: query question, intent: intent i), …”. Input the intent recognition prompt template into the semantic large model to generate the sub-knowledge base identifier intent that matches the user query Q i 。

[0027] S2. Perform sentence segmentation on the documents in the target sub-knowledge base, and generate document shards containing consecutive sentences through context supplementation, while maintaining semantic overlap between the document shards.

[0028] Specifically, perform sentence segmentation on the documents in the target sub-knowledge base, and generate document shards containing consecutive sentences through context supplementation, including: after splitting the document into independent sentences, perform sliding window truncation on the consecutive sentences with a fixed window length L, where the window length L is greater than the number of characters in the longest sentence, and at least a preset proportion of overlapping content is retained between adjacent shards. As an example, the window length L can be 512 characters, and the overlap ratio can be 20% or 30%, etc.

[0029] Specifically, for the sub-knowledge base kb i in the documents, perform sentence segmentation to generate a set of independent sentences; set a fixed window length, where the fixed window length is greater than the length of the longest sentence in the document; perform context supplementation on the segmented sentences with the fixed window length to generate document shards containing multiple consecutive sentences; among them, partial overlapping sentence content is retained between adjacent document shards to ensure the continuity of semantic context.

[0030] S3. Calculate the keyword relevance score between the query term and the document shard; among them, the query term is obtained by segmenting the query input; generate text vectors through a semantic encoding model, and calculate the semantic relevance score between the query input and the document shard; fuse the keyword relevance score and the semantic relevance score, and sort and output the relevant document shards according to the comprehensive score.

[0031] Specifically, calculating the keyword relevance score between the query term and the document shard includes: performing a word segmentation operation on the query input to obtain the query term; calculating the term frequency and inverse document frequency of the query term; calculating the keyword relevance score between the query input and the document shard based on the term frequency and inverse document frequency.

[0032] Specifically, generating text vectors through a semantic encoding model and calculating the semantic relevance score between the query input and the document shard includes: performing vector quantization encoding on the input query and the document shard set through a pre-trained semantic encoding model to generate a query vector representation and a document shard vector representation; performing clustering division on the document shard vector representation, dividing the vector space into m mutually exclusive subspaces, and assigning a cluster center vector to each subspace; calculating the relevance between the query vector and the cluster center vectors of each subspace, and screening out the top lThe subspace; within the selected subspace, calculate the cosine similarity between the query vector and the corresponding document shard vector as the semantic relevance score; sort the document shards based on the semantic relevance score and output the set of candidate shards with scores higher than the threshold.

[0033] Specifically, fuse the keyword relevance score and the semantic relevance score , including: ; where α is the weight for balancing keyword matching and semantic similarity, represents the keyword relevance score, represents the semantic relevance score.

[0034] Specifically, the sparse retrieval based on keywords includes: tokenize the input query Q to obtain the query word set {q1, q2, ..., q n}; calculate the term frequency f(q i in the document shard d), and the inverse document frequency IDF based on the document shard set D; i ; where N is the total number of document shards, and n(q ; where N is the total number of document shards, and n(q i ) is the number of document shards containing q i ; Based on the term frequency, inverse document frequency, and the ratio of the document shard length |d| to the average length avgdl , calculate the sparse retrieval relevance score through the following formula: ; where k and b are adjustable parameters, supporting manual adjustment by the user according to the retrieval scenario.

[0035] Specifically, the dense retrieval based on vector representation includes: generate the vectorized representations of the query Q and the document shard set D through a pre-trained language model to obtain the query embedding vector v Q and the set of document shard embedding vectors ; perform clustering on the document shard embedding vectors to construct a vector partition index of m subspaces; calculate the relevance between the query embedding vector v Q and the clustering centers of each subspace, and select the top l relevant subspaces; within the selected subspaces, calculate the dense retrieval relevance score between the query embedding vector v Q and each document shard embedding vector : ; Specifically, the hybrid retrieval strategy includes: weighted summing the sparse retrieval score sparse_score and the dense retrieval score dense_score to obtain the comprehensive relevance score hybrid_score; where α ∈ (0, 1) is a dynamically adjusted weight coefficient; sorting the document shards in descending order according to hybrid_score, and outputting the top c document shards as the context data for retrieval enhancement.

[0036] S4. Input the user's query and the relevant document shards into the semantic large model, and generate a structured answer in combination with the logic in the field of power equipment operation and maintenance.

[0037] Specifically, the structured answer generation includes: Constructing a structured prompt template based on the equipment operation and maintenance business logic and the Q&A form. The template includes: (a) the text content of the user query Q; (b) the first c document shards as the context; (c) a generation instruction: "Answer the user's question based on the following context. If the context does not contain the answer, reply with the specified prompt." The specified prompt is, for example, if the context is irrelevant, reply 'There is no reliable basis. It is recommended to refer to [a certain standard document].'

[0038] Inputting the structured prompt template into the power equipment operation and maintenance semantic large model to generate an answer text including the cause of the fault, the status evaluation, or the defect classification, and directly quoting or integrating the key evidence in the context in the answer text.

[0039] The present invention first conducts refined classification and management on the power equipment operation and maintenance knowledge base, constructs a knowledge base set with multiple themes and multiple scenarios, and based on the semantic large model prompt design, conducts intent recognition of the user query and automatic matching of the sub-knowledge base, forming a data knowledge basis for retrieval enhancement generation, and reducing information redundancy and noise in the knowledge retrieval process. Then, a sparse-dense hybrid retrieval method is constructed based on sparse keyword retrieval and dense vector retrieval to improve the retrieval accuracy and efficiency, and find the associated knowledge of the input question to enhance content generation. Finally, the semantic large model is used to understand and integrate the input question and the associated knowledge and generate a precise reply, solving the problems of difficult manual access to operation and maintenance knowledge, inaccurate deep semantic understanding of traditional intelligent Q&A methods, and inability to provide precise replies, and realizing a power operation and maintenance knowledge service with high accuracy and strong generalization.

[0040] For further explanation and supplementation of the present invention, the following takes the field of substation equipment operation and maintenance as an example for an example introduction: As Figure 2 and Figure 3 shown, a power operation and maintenance knowledge service method includes the following steps: Step1 Subdivision and classification of the power equipment operation and maintenance knowledge base.

[0041] Power Equipment Operation and Maintenance Knowledge Base KB It contains professional documents such as basic operation and maintenance theories, typical fault cases, operation and maintenance standard knowledge, etc. A knowledge base classification list is formed according to equipment types and specific business scenarios, such as {judgment of transformer abnormal reasons, transformer status evaluation, ……, breaker defect classification}, and the professional documents included in the knowledge base are refined and classified and counted to form a multi-topic and refined sub-knowledge base for power equipment operation and maintenance .

[0042] Step2 Intent Recognition of Power Equipment Operation and Maintenance Semantic Big Model

[0043] According to the query input Q , the corresponding sub-knowledge base is automatically selected by using the semantic big model

[0044] First, an intent set is constructed according to the refined sub-knowledge base types ; For example I ={judgment of transformer abnormal reasons, transformer status evaluation, ……, breaker defect classification}; Second, for the in the intent set, artificial annotation of intent classification examples is carried out, in the form of (input: query question, intent: ), to form an intent classification example library The intent classification example library, such as: {(input: "There is a continuous high-frequency sharp sound in the transformer body. What are the possible abnormal reasons?", intent: judgment of transformer abnormal reasons); (input: "The oil level in the conservator of the transformer body is abnormal, and the top oil temperature is abnormal. What is the state of the equipment?", intent: transformer status evaluation); (input: "The short-circuit breaking times of the vacuum breaker body exceed the limit. What is the defect classification?", intent: breaker defect classification); ……}

[0045] Third, vector embedding representations are made for the query input and the input part of the intent classification examples, and examples related to the query input are found through vector search The query input, such as Q = "There is a hissing sound in the transformer, and the normal hot spot temperature is relatively high. CH4 and C2H4 increase rapidly. What are the reasons for the transformer abnormality?".

[0046] Finally, combining the intent classification instructions, the intent set and the intent classification examples related to the query input, an intent recognition prompt template is designed, such as {Instruction: "Mark an intention for the user input in the dialogue and only reply with the name of that intention.", The intention should be one of the following: "Judgment of Transformer Abnormality Causes, Transformer Status Evaluation,..., Circuit Breaker Defect Classification", User Input: "The transformer makes a hissing sound, and the normal hot spot temperature is relatively high. CH4 and C2H4 increase rapidly. What are the reasons for the transformer abnormality?", Example: (Input: "The transformer body makes a continuous high-frequency sharp sound. What are the possible abnormal reasons?", Intention: Judgment of Transformer Abnormality Causes)}; Input the intention recognition prompt template into the large-scale power equipment operation and maintenance semantic model, and let the model automatically generate a sub-knowledge base related to the query input as the data basis for subsequent hybrid retrieval.

[0047] Step3 Slice and chunk the knowledge base documents.

[0048] First, perform sentence segmentation on the documents in the sub-knowledge base obtained in Step2; then set a fixed window larger than the length of the longest sentence to supplement the context for the segmented independent sentences to obtain document shards; the document shards contain multiple consecutive sentences, maintaining the information overlap between the shards to ensure that semantic context is not lost between the blocks.

[0049] Step4 Conduct sparse retrieval of the knowledge base based on keywords.

[0050] First, perform word segmentation on the query input Q to obtain query terms .

[0051] Secondly, calculate the term frequency of the query terms , which is the frequency of occurrence of in the document shards d , measuring the importance of the word in the document. The higher it is, the more important is in d .

[0052] Then, calculate the inverse document frequency of the query terms IDF : (1) Among them, N is the total number of documents in the document shard set D , is the number of document shards containing the word , IDF measuring the uniqueness of the word for the document shard set. The lower the frequency of occurrence of IDF in the document shard set, the higher is and it has a greater weight in the relevance score.

[0053] Finally, calculate the query input based on the term frequency and inverse document frequency Q and the document shard d The correlation score between them, where is the length of the document shard, avgdl is the average length of all document shards, k and b are adjustable parameters.

[0054] (2) Among them, Q represents the query income; d represents the document shard; n represents the query input Q The total number of terms after the query input is tokenized; represents the query term; |d| represents the length of the document shard, avgdl represents the average length of the document shard; k represents the term frequency saturation adjustment factor; represents the query term The number of times it appears in the document shard d; represents the query term The inverse document frequency of; b represents the document length normalization coefficient.

[0055] Step5 Conduct dense retrieval of the knowledge base based on vector representation.

[0056] First, use the BERT pre-trained model to perform query input Q and the set of document shards D The text vectorized representation of, to obtain the query embedding and the set of document shard embeddings .

[0057] Secondly, establish a partition index for the set of document shard embeddings, and divide the vector space clustering into m subspaces, and calculate the query embedding and m The correlation with the l cluster centers, to obtain the top

[0058] Finally, calculate the cosine similarity of the document shards within its corresponding subspace to obtain the correlation score of the document shards: (3) Step6 The hybrid strategy of keyword sparse retrieval and vector dense retrieval.

[0059] Considering both keyword relevance and semantic context at the same time, weight and sum the keyword sparse retrieval correlation scores obtained in Step4 and the vector dense retrieval correlation scores obtained in Step5 to obtain the correlation fusion score, providing a set of balanced and comprehensive results, where , sort the scores in descending order, and output the top c document shards.

[0060] For example, for Q = "The transformer makes a hissing sound, and usually the hot spot temperature is relatively high. CH4 and C2H4 increase rapidly. What are the reasons for the transformer anomaly?", output the document shards {"Analysis of dissolved gases in transformer oil shows that the hot spot temperature is usually relatively high, and CH4 and C2H4 increase rapidly. The reason for the fault is multi-point grounding of the iron core and clamping parts", "The transformer makes a hissing sound, and the surface of the infrared temperature measuring bushing is dirty, the enamel has fallen off or there are cracks. The reason for the fault may be corona discharge on the surface of the bushing or the conductor edge",...}; (4) Step7 Power equipment operation and maintenance semantic large model prompt template design and answer generation. According to the business logic of equipment operation and maintenance and common Q&A forms, combined with the query input Q and the document shard results output in Step6, design and construct a Q&A prompt template, use the retrieved document slice results as the context related to the query question, and input them together with the query question into the power equipment operation and maintenance semantic large model to generate the corresponding answer to the query question "The reasons for transformer anomalies may be multi-point grounding of the iron core and clamping parts or corona discharge on the surface of the bushing or the conductor edge".

[0061] In this solution, a knowledge base set with multiple themes and multiple scenarios is constructed for the field of power equipment operation and maintenance. Based on the semantic large model prompt design, automatic matching of sub-knowledge bases for user queries is performed. A hybrid retrieval strategy is constructed to accurately and efficiently search for relevant knowledge of the input question. The semantic large model is used to understand and integrate the input question and relevant knowledge and generate accurate responses. By refining the power equipment operation and maintenance knowledge base, situations such as information redundancy, noise, and semantic confusion in the knowledge retrieval process are reduced, and computing resources are saved. By constructing a sparse-dense hybrid retrieval strategy, the situation of information omission in a single retrieval method is avoided, and the retrieval accuracy and efficiency are improved. At the same time, the hybrid retrieval results are used to enhance the semantic large model to achieve the accurate generation of answers to query questions, solve the problems of difficult manual access to operation and maintenance knowledge, and inaccurate deep semantic understanding and inability to provide accurate responses in traditional intelligent Q&A methods, and improve the accuracy and applicability of power operation and maintenance knowledge services.

[0062] Embodiment 2 As Figure 4 shown, based on the same inventive concept as the above embodiment, the present invention also provides a power operation and maintenance knowledge service device, including: A first determination module, configured to analyze the semantics of the query input using a semantic large model based on the user's query input, and determine the corresponding target sub-knowledge base in combination with a predefined intent classification example library and an intent set; A document processing module for performing sentence segmentation on the documents in the target sub-knowledge base, generating document shards containing consecutive sentences through context supplementation, and maintaining semantic overlap between the document shards; A calculation module for calculating the keyword relevance score between the query term and the document shards; wherein, the query term is obtained by segmenting the query input; generating text vectors through a semantic encoding model, and calculating the semantic relevance score between the query input and the document shards; fusing the keyword relevance score and the semantic relevance score, and sorting and outputting the relevant document shards according to the comprehensive score; A second determination module for inputting the user's query into the semantic large model together with the relevant document shards, and generating a structured answer in combination with the logic in the field of power equipment operation and maintenance.

[0063] Embodiment 3 As Figure 5 shown, the present invention further provides an electronic device 100 for implementing a power operation and maintenance knowledge service method; The electronic device 100 includes a memory 101, at least one processor 102, a computer program 103 stored in the memory 101 and executable on the at least one processor 102, and at least one communication bus 104.

[0064] The memory 101 can be used to store the computer program 103. The processor 102 realizes the steps of the power operation and maintenance knowledge service method in Embodiment 1 by running or executing the computer program stored in the memory 101 and calling the data stored in the memory 101.

[0065] The memory 101 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device 100 (such as audio data, etc.). In addition, the memory 101 may include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.

[0066] At least one processor 102 can be a Central Processing Unit (CPU), or can also be other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field-Programmable Gate Arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The processor 102 can be a microprocessor or the processor 102 can also be any conventional processor, etc. The processor 102 is the control center of the electronic device 100, and connects various parts of the entire electronic device 100 through various interfaces and lines.

[0067] The memory 101 in the electronic device 100 stores multiple instructions to implement a power operation and maintenance knowledge service method. The processor 102 can execute the multiple instructions to implement: Based on the user's query input, use a semantic large model to analyze the semantics of the query input, and combine a predefined intention classification example library and intention set to determine the corresponding target sub-knowledge base; Perform sentence segmentation on the documents in the target sub-knowledge base, generate document shards containing consecutive sentences through context supplementation, and maintain semantic overlap between the document shards; Calculate the keyword relevance score between the query term and the document shard; wherein, the query term is obtained by segmenting the query input; generate a text vector through a semantic encoding model, and calculate the semantic relevance score between the query input and the document shard; fuse the keyword relevance score and the semantic relevance score, and sort and output the relevant document shards according to the comprehensive score; Input the user's query input and the relevant document shards into the semantic large model, and generate a structured answer in combination with the logic in the field of power equipment operation and maintenance.

[0068] Embodiment 4 If the modules / units integrated in the electronic device 100 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, to implement all or part of the processes in the above-described embodiment methods of the present invention, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of the above-described method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, and read-only memory (ROM, Read-Only Memory).

[0069] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented 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.

[0070] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram can be implemented by computer program instructions, and the combination of the processes and / or blocks in the flowchart and / or block diagram can also be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a device for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0071] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured product including an instruction device, and the instruction device implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0072] These computer program instructions can also be loaded onto a computer or other programmable data processing apparatus, so that a series of operation steps are performed on the computer or other programmable apparatus to produce a computer-implemented process, thereby providing instructions for implementing the functions specified in one process or a plurality of processes and / or blocks Figure 1 one process or a plurality of processes and / or blocks Figure 1 steps for implementing the functions specified in one block or a plurality of blocks.

[0073] In the description of this specification, the descriptions referring to the terms "one embodiment", "example", "specific example", etc. mean that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.

[0074] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that: modifications or equivalent replacements can still be made to the specific embodiments of the present invention, and any modifications or equivalent replacements that do not depart from the spirit and scope of the present invention should be covered by the protection scope of the claims of the present invention.

Claims

1. A power operation and maintenance knowledge service method, characterized in that, It includes the following steps: Based on the user's query input, use a semantic large model to analyze the semantics of the query input, and combine a predefined intent classification example library and an intent set to determine the corresponding target sub-knowledge base; Segment the sentences of the documents in the target sub-knowledge base, and generate document shards containing consecutive sentences through context supplementation, while maintaining semantic overlap between the document shards; Calculate the keyword relevance score between the query terms and the document shards; among them, the query terms are obtained by segmenting the query input; generate text vectors through a semantic encoding model, and calculate the semantic relevance score between the query input and the document shards; fuse the keyword relevance score and the semantic relevance score, and sort and output the relevant document shards according to the comprehensive score; Input the user's query and the relevant document shards into the semantic large model, and generate a structured answer in combination with the logic in the field of power equipment operation and maintenance; 2. The power operation and maintenance knowledge service method according to claim 1, wherein The predefined intent classification example library is constructed in the following way: Annotate the mapping relationship between typical query statements and intent labels in the field of power equipment operation and maintenance; among them, the annotation process includes the extended annotation of synonymous query statements to form a diverse query expression example set covering the same intent; 3. The power operation and maintenance knowledge service method according to claim 1, wherein Segment the sentences of the documents in the target sub-knowledge base, and generate document shards containing consecutive sentences through context supplementation, including: After splitting the document into independent sentences, perform a sliding window intercept on the consecutive sentences with a fixed window length L, where the window length L is greater than the number of characters in the longest sentence, and at least a preset proportion of overlapping content is reserved between adjacent shards; 4. The power operation and maintenance knowledge service method according to claim 1, wherein Calculate the keyword relevance score between the query terms and the document shards, including: Perform a word segmentation operation on the query input to obtain query terms; calculate the term frequency and inverse document frequency of the query terms; calculate the keyword relevance score between the query input and the document shards based on the term frequency and inverse document frequency; 5. The power operation and maintenance knowledge service method according to claim 1, wherein Generate text vectors through a semantic encoding model, and calculate the semantic relevance score between the query input and the document shards, including: Perform vectorized encoding on the input query and the document shard set through a pre-trained semantic encoding model to generate a query vector representation and a document shard vector representation; Perform clustering division on the document shard vector representation, divide the vector space into m mutually exclusive subspaces, and assign a clustering center vector to each subspace; Calculate the correlation between the query vector and the subspace clustering center vectors, and filter out the subspaces ranked top in terms of correlation l ; Within the selected subspace, calculate the cosine similarity between the query vector and the corresponding document shard vector as the semantic relevance score; Sort the document shards based on the semantic relevance score, and output a candidate shard set with a score higher than the threshold; 6. The power operation and maintenance knowledge service method according to claim 1, wherein Fusing keyword relevance score and semantic relevance score , including: Among them, α is the weight used to balance keyword matching and semantic similarity, represents the keyword relevance score, represents the semantic relevance score.

7. The power operation and maintenance knowledge service method according to claim 1, characterized in that The sub-knowledge base is obtained by dividing the power equipment operation and maintenance knowledge base according to equipment types and business scenarios. Each sub-knowledge base corresponds to a specific equipment fault diagnosis or status evaluation theme, and the knowledge documents are classified according to semantic relevance; 8. A power operation and maintenance knowledge service device, characterized in that, It includes: The first determination module is used to determine the corresponding target sub-knowledge base based on the user's query input, use a semantic large model to analyze the semantics of the query input, and combine a predefined intent classification example library and an intent set; The document processing module is used to segment the sentences of the documents in the target sub-knowledge base, and generate document shards containing consecutive sentences through context supplementation, while maintaining semantic overlap between the document shards; A calculation module for calculating the relevance score between a query term and the keyword of a document shard; wherein, the query term is obtained by segmenting the query input; generating a text vector through a semantic encoding model, and calculating the semantic relevance score between the query input and the document shard; fusing the keyword relevance score and the semantic relevance score, and sorting and outputting the relevant document shards according to the comprehensive score. A second determination module for inputting the user's query input and the relevant document shards into a semantic large model, and generating a structured answer in combination with the logic in the field of power equipment operation and maintenance.

9. An electronic device, characterized in that, It includes a processor and a memory, and the processor is used to execute the computer program stored in the memory to implement the power operation and maintenance knowledge service method as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction, and when the at least one instruction is executed by the processor, the power operation and maintenance knowledge service method as described in any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Document information extraction method and device, electronic equipment and storage medium

    CN121412238A

  • Document-level saliency detection method and related device

    CN121542806A

  • Literature information mining method, electronic equipment and storage medium

    CN122240697A

  • A document retrieval method, device and medium based on a vector database

    CN122633861A