Converter transformer operation inspection data analysis and early warning method based on large language model
By building a professional knowledge base for converter transformer data analysis and using large language models for automatic analysis, the problems of inefficient and insufficient accuracy of converter operation and maintenance data analysis are solved, and efficient and accurate data analysis and early warning are achieved.
Patent Information
- Application Number
- CN202411502388.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2044-10-25
AI Technical Summary
In the prior art, the daily operation and maintenance data analysis of converter transformers relies on manual processing, resulting in inefficiency, prone to errors, and inability to focus on more important professional and technical research and analysis.
The conversion rheological operation and inspection data analysis and early warning method based on large language models is adopted. By building a professional knowledge base for converter transformer data analysis, the LLM large language model is used to automatically organize, analyze and early warning the operation and inspection data.
It realizes automatic sorting and analysis of operation and inspection data of converter transformer, improves the accuracy of analysis and early warning, reduces the time and error of manual processing, and allows operation and maintenance personnel to focus more on professional technical research and analysis.
Smart Images

Figure CN119396942A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of electric power technology, and in particular relates to a converter transformer operation and inspection data analysis and early warning method based on a large language model. Background Art
[0002] With the rapid development of power systems, the scale and complexity of power grids are increasing, and the importance of safe operation of power grids is becoming increasingly prominent.
[0003] As the core equipment of the HVDC converter station, the operating status of the converter transformer is directly related to the safety and stability of the entire power grid. Therefore, it is necessary to carry out daily operation and maintenance of the converter transformer. At the same time, it is also necessary to analyze the daily operation and maintenance data of the converter transformer, including daily comparison, weekly analysis and monthly summary, to ensure that the operating status of the converter transformer can be understood in time and the operating status of the converter transformer can be maintained.
[0004] At present, the analysis of daily operation and maintenance data of converter transformers, including daily comparison, weekly analysis and monthly summary, is generally carried out by manually sorting, comparing and analyzing a large amount of operation and maintenance data. This method has the following problems: 1. Faced with massive amounts of data, manual processing is inefficient and time-consuming; 2. Manual data processing is prone to errors, resulting in the failure to detect potential equipment failure risks in a timely manner; 3. A large amount of basic data processing work takes up the time of operation and maintenance personnel, preventing them from focusing on more important professional technical research and analysis.
[0005] In order to improve operation and maintenance efficiency and the accuracy of data analysis, the industry has proposed an intelligent inspection system, which uses robots or drones to inspect equipment and collect data and image information. However, it mainly focuses on physical inspections and is still unable to conduct in-depth data analysis.
[0006] In view of this, a converter transformer operation and inspection data analysis and early warning method based on a large language model is designed to solve the above problems. Summary of the invention
[0007] To solve the problems raised in the above background technology. The present invention provides a converter transformer operation and inspection data analysis and early warning method based on a large language model, which integrates the automatic sorting, analysis and early warning of converter transformer operation and inspection data, and can not only assist operation and maintenance personnel to collect data efficiently and accurately, but also can automatically analyze data for early warning, thereby improving the accuracy of analysis and early warning.
[0008] To achieve the above object, the present invention provides the following technical solution: a method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model, comprising the following steps: S1: Build a professional knowledge base for converter transformer data analysis; S2: Analyze the converter transformer operation and inspection data based on the converter transformer data analysis professional knowledge base or LLM large language model; S3: Based on the analysis results of the converter transformer data analysis professional knowledge base or the LLM large language model, if the analysis result shows that the operation and inspection data of the converter transformer is abnormal, an early warning is issued, otherwise, no early warning is issued.
[0009] Furthermore, the specific steps in step S1 include: S11: Collect information on converter transformers, including technical documents, operation manuals, fault cases, and maintenance records; S12: Preprocessing of converter transformer data, including cleaning, denoising, format conversion and key content annotation; S13: Based on the LLM large language model, the pre-processed converter transformer data is inferred and segmented, divided into appropriate sizes, and vectorized and stored to form a converter transformer data analysis professional knowledge base.
[0010] Furthermore, the specific steps of step S13 include: S131: Load the specified converter transformer data, i.e., corpus, based on DirectoryLoader to form a document collection documents, and extract the content doc_text of the document collection documents; S132: define the intelligent segmentation function split_text_with_llm of the LLM large language model, set the target text block size chunk_size of the intelligent segmentation function split_text_with_llm, the text segmentation prompt prompt, the minimum text block size min_chunk_size, the text block overlap size chunk_overlap, and the maximum recursion depth max_recursion_depth; S133: the content doc_text is input into the LLM large language model, the content doc_text is inferred, the size of the content doc_text is detected, if the length of the content doc_text is greater than the target text block size chunk_size, and the target text block size chunk_size is greater than the minimum text block size min_chunk_size, then the intelligent segmentation function split_text_with_llm is recursively called to halve the content doc_text based on the text segmentation prompt prompt, and the recursion depth is checked, if the current recursion depth current_depth<maximum recursion depth max_recursion_depth, and the length of the segmented fragment of the content doc_text is greater than the target text block size chunk_size, and the target text block size chunk_size is greater than the minimum text block size min_chunk_size, then the above steps are repeated until the length of the segmented fragment of the content doc_text is less than or equal to the target text block size chunk_size, and the segmented fragment of the content doc_text is directly returned, otherwise, the recursion is stopped and the segmented fragment of the content doc_text is directly returned; S134: Encapsulate the segmented fragments into a Document object, including page_content and metadata, and generate a vector representation of the text block based on the embedding model; S135: Create a storage table table_history_knowledge, including ID, keyword key_str and corresponding knowledge content fragment value_str, add the generated text block and embedding to the table table_history_knowledge, add the table table_history_knowledge to the vector database vectordb, and form a converter transformer data analysis professional knowledge base.
[0011] Furthermore, in step S131, after the content doc_text is extracted, the following operation steps are performed: S1311: define a cutting function split_text_for_model, and set a text maximum context length max_context_length and a text overlap rate overlap_percent of the cutting function split_text_for_model; S1312: Based on the cutting function split_text_for_model, the content doc_text is split according to the set text maximum context length max_context_length to obtain the content doc_text that can be processed by the LLM large language model.
[0012] Furthermore, in step S1311, the maximum context length of the text max_context_length is 8000 characters, and the text overlap rate overlap_percent is 0.25.
[0013] Furthermore, in step S132, the target text block size chunk_size is 2048 characters, the text segmentation prompt prompt, the minimum text block size min_chunk_size is 512 characters, the text block overlap size chunk_overlap is half of the minimum text block size min_chunk_size, and the maximum recursion depth max_recursion_depth is 2.
[0014] Furthermore, the specific steps of step S2 include: S21: Establishing a connection with a converter transformer data analysis professional knowledge base, including configuring a host, port, user name, and password; S22: based on the query input input_query_sentence of the host input user; S23: extract keywords from user input using regular expressions, and expand the extracted keywords into synonyms, near-synonyms, and professional terms, including Chinese expressions and English expressions; S24: Perform fuzzy matching query in the converter transformer data analysis professional knowledge base based on the expanded keywords; S25: setting joined_value_str to an empty string, and storing the corresponding knowledge content fragment value_str found in the joined_value_str; S26: If all keywords are matched successfully, all_matched=True is set, and the corresponding knowledge content fragment value_str in joined_value_str is directly returned as the answer. Otherwise, all_matched=False is set, and the LLM large language model is called; S27: The LLM large language model performs big data retrieval analysis based on the user's query input input_query_sentence and the expanded keywords.
[0015] Furthermore, in step S24, based on the fuzzy matching query analysis of the converter transformer operation and inspection data in the converter transformer data analysis professional knowledge base, an abnormal capture mechanism is set to capture and record abnormal information during the operation process in order to optimize parameters.
[0016] Furthermore, in step S27, during the process of big data retrieval and analysis of converter transformer operation and inspection data based on the LLM large language model, an abnormal capture mechanism is set to capture and record abnormal information during the operation process in order to optimize parameters.
[0017] Furthermore, in step S27, the big data retrieval analysis result of the LLM large language model further performs the following operation steps: S271: Compare the big data retrieval and analysis results of the LLM large language model with the data in the converter transformer data analysis professional knowledge base, and extract new knowledge content in the big data retrieval and analysis results of the LLM large language model; S272: preprocessing new knowledge content, including length detection and filtering of invalid or erroneous results; S273: extracting the keyword key_str from the new knowledge content using a regular expression; S274: Compare the extracted keyword key_str with the keyword key_str in the converter transformer data analysis professional knowledge base. If the keyword key_str already exists in the converter transformer data analysis professional knowledge base, update the keyword key_str. If the keyword key_str does not exist in the converter transformer data analysis professional knowledge base, insert a new keyword key_str to update the converter transformer data analysis professional knowledge base.
[0018] Compared with the prior art, the present invention has the following beneficial effects: 1. After the data of the converter transformer is collected and preprocessed, the present invention uses the LLM large language model for reasoning and segmentation to form a converter transformer data analysis professional knowledge base. The subsequent operation and inspection data of the converter transformer can be automatically sorted and analyzed by the converter transformer data analysis professional knowledge base, and automatic warning can be carried out according to the analysis results of the converter transformer data analysis professional knowledge base. That is, the automatic sorting, analysis and warning of the converter transformer operation and inspection data are integrated, which can not only assist the operation and maintenance personnel to collect data efficiently and accurately, but also can automatically analyze the data for warning, thereby improving the accuracy of analysis and warning.
[0019] 2. The LLM large language model of the present invention performs multi-level segmentation on the data of the converter transformer through recursive calls, ensuring the size limit and semantic integrity of the segments, and improving the analysis accuracy of the converter transformer data analysis professional knowledge base.
[0020] 3. When the converter transformer data analysis professional knowledge base cannot analyze the converter transformer operation and inspection data, the present invention can automatically call the LLM large language model for supplementary analysis, thereby improving the system's analysis accuracy of the converter transformer operation and inspection data.
[0021] 4. After calling the LLM large language model to perform supplementary analysis on the converter transformer operation and inspection data, the present invention automatically extracts new content from the LLM large language model analysis results for preprocessing and keyword extraction, updates the keyword content of the converter transformer data analysis professional knowledge base, and can continuously expand the content of the converter transformer data analysis professional knowledge base and improve the comprehensiveness of the analysis of the converter transformer data analysis professional knowledge base. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 The present invention is a flow chart of the converter transformer operation and inspection data analysis and early warning method based on the large language model. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] See also Figure 1 The present invention provides the following technical solution: A method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model, comprising the following steps: S1: Build a professional knowledge base for converter transformer data analysis; S11: Collect information on converter transformers, including technical documents, operation manuals, fault cases, and maintenance records; S12: Preprocessing of converter transformer data, including cleaning, denoising, format conversion and key content annotation; Data cleaning and denoising: automatically identify and process noise, outliers and missing values in data to improve data quality; Format conversion: convert data from different sources and formats into a unified standard format that can be processed by the LLM large language model; S13: Based on the LLM large language model, the pre-processed converter transformer data is inferred and segmented, divided into appropriate sizes, and vectorized and stored to form a converter transformer data analysis professional knowledge base; S131: Load the specified converter transformer data, i.e., corpus, based on DirectoryLoader to form a document collection documents, and extract the content doc_text of the document collection documents; After the content doc_text is extracted, the following steps are performed: S1311: define a cutting function split_text_for_model, set the text maximum context length max_context_length of the cutting function split_text_for_model to 8000 characters, and the text overlap rate overlap_percent to 0.25; S1312: splitting the content doc_text according to the set maximum context length max_context_length of the text based on the splitting function split_text_for_model, and obtaining the content doc_text that can be processed by the LLM large language model; S132: define the intelligent segmentation function split_text_with_llm of the LLM large language model, set the target text block size chunk_size of the intelligent segmentation function split_text_with_llm to 2048 characters, the text segmentation prompt prompt, the minimum text block size min_chunk_size to 512 characters, the text block overlap size chunk_overlap to half of the minimum text block size min_chunk_size, and the maximum recursion depth max_recursion_depth to 2; The prompt is as follows: prompt=f"""Please divide the following text into sections according to the following requirements: 1. The size of the text fragment must be strictly limited! It must be less than {int(chunk_size)} characters; 2. The content within the fragment should maintain semantic coherence. A paragraph should not be divided into two halves, and a table (including the notes to the table) should not be divided into two halves. 3. If a paragraph is too long and must be divided into multiple segments, each segment must be given a title; 4. If a table is too long and must be split into multiple segments, each segment must have a header; 5. Add a subheading to each paragraph, no more than 100 words, on the first line, in the format of "###Title:XXXXXX###". The subheading should include the main keywords and a summary of the main content; 6. Maintain semantic coherence within the paragraph as much as possible; 7. If the size and semantic coherence requirements cannot be met at the same time, add "###To be continued" at the end; Please output in the following format: - Each fragment begins with "Fragment {{number}}: ", followed by the fragment content; - Each segment is separated by "===end of segment==="; The following is the text that needs to be segmented: {text}; S133: the content doc_text is input into the LLM large language model, the content doc_text is inferred, the size of the content doc_text is detected, if the length of the content doc_text is greater than the target text block size chunk_size, and the target text block size chunk_size is greater than the minimum text block size min_chunk_size, then the intelligent segmentation function split_text_with_llm is recursively called to halve the content doc_text based on the text segmentation prompt prompt and the segmentation format of "===end of segment===", and the recursion depth is checked, if the current recursion depth current_depth<maximum recursion depth max_recursion_depth, and the length of the segmented fragment of the content doc_text is greater than the target text block size chunk_size, and the target text block size chunk_size is greater than the minimum text block size min_chunk_size, then the above steps are repeated until the length of the segmented fragment of the content doc_text is less than or equal to the target text block size chunk_size, and the segmented fragment of the content doc_text is directly returned in a streaming output mode, otherwise, the recursion is stopped and the segmented fragment of the content doc_text is directly returned in a streaming output mode; S134: Encapsulate the segmented fragments into a Document object, including page_content and metadata, and generate a vector representation of the text block based on the embedding model; S135: creating a storage table table_history_knowledge, including an ID, a keyword key_str and a corresponding knowledge content fragment value_str, adding the generated text block and embedding to the table table_history_knowledge, adding the table table_history_knowledge to the vector database vectordb, and forming a converter transformer data analysis professional knowledge base; S2: Analyze the converter transformer operation and inspection data based on the converter transformer data analysis professional knowledge base or LLM large language model; S21: Establishing a connection with a converter transformer data analysis professional knowledge base, including configuring a host, port, user name, and password; S22: based on the query input input_query_sentence of the host input user; The user's query input input_query_sentence is the real-time operation and inspection data, including equipment operating parameters, environmental data, historical fault records, etc. S23: extract keywords from user input using regular expressions, and expand the extracted keywords into synonyms, near-synonyms, and professional terms, including Chinese expressions and English expressions; S24: Perform fuzzy matching query in the converter transformer data analysis professional knowledge base based on the expanded keywords; Based on the fuzzy matching query analysis in the converter transformer data analysis professional knowledge base, during the converter transformer operation and inspection data analysis, an abnormal capture mechanism is set up to capture and record abnormal information during the operation process in order to optimize parameters; S25: setting joined_value_str to an empty string, and storing the corresponding knowledge content fragment value_str found in the joined_value_str; S26: If all keywords are matched successfully, all_matched=True is set, and the corresponding knowledge content fragment value_str in joined_value_str is directly returned as the answer. Otherwise, all_matched=False is set, and the LLM large language model is called; S27: The LLM large language model performs big data retrieval analysis based on the user's query input input_query_sentence and the expanded keywords; In the process of big data retrieval and analysis of converter transformer operation and inspection data based on the LLM large language model, an abnormal capture mechanism is set up to capture and record abnormal information during the operation process in order to optimize parameters; The analysis results based on the converter transformer data analysis professional knowledge base or LLM large language model are displayed in the form of intuitive line graphs, curve graphs, scatter plots, histograms, and pie charts according to the user's arbitrary requirements; The big data retrieval analysis results of the LLM large language model also undergo the following steps: S271: Compare the big data retrieval and analysis results of the LLM large language model with the data in the converter transformer data analysis professional knowledge base, and extract new knowledge content in the big data retrieval and analysis results of the LLM large language model; S272: preprocessing new knowledge content, including length detection and filtering of invalid or erroneous results; S273: extracting the keyword key_str from the new knowledge content using a regular expression; S274: comparing the extracted keyword key_str with the keyword key_str in the converter transformer data analysis professional knowledge base, if the keyword key_str already exists in the converter transformer data analysis professional knowledge base, updating the keyword key_str; if the keyword key_str does not exist in the converter transformer data analysis professional knowledge base, inserting a new keyword key_str to implement the update of the converter transformer data analysis professional knowledge base; S3: Based on the analysis results of the converter transformer data analysis professional knowledge base or the LLM large language model, if the analysis result shows that the operation and inspection data of the converter transformer is abnormal, an early warning is issued, otherwise, no early warning is issued.
[0025] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model, characterized in that: The following steps are involved: S1: Build a professional knowledge base for converter transformer data analysis; S2: Analyze the converter transformer operation and inspection data based on the converter transformer data analysis professional knowledge base or LLM large language model; S3: Based on the analysis results of the converter transformer data analysis professional knowledge base or the LLM large language model, if the analysis result shows that the operation and inspection data of the converter transformer is abnormal, an early warning is issued, otherwise, no early warning is issued.
2. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 1, characterized in that: The specific steps in step S1 include: S11: Collect information on converter transformers, including technical documents, operation manuals, fault cases, and maintenance records; S12: Preprocessing of converter transformer data, including cleaning, denoising, format conversion and key content annotation; S13: Based on the LLM large language model, the pre-processed converter transformer data is inferred and segmented, divided into appropriate sizes, and vectorized and stored to form a converter transformer data analysis professional knowledge base.
3. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 2 is characterized in that: The specific steps of step S13 include: S131: Load the specified converter transformer data, i.e., corpus, based on DirectoryLoader to form a document collection documents, and extract the content doc_text of the document collection documents; S132: define the intelligent segmentation function split_text_with_llm of the LLM large language model, set the target text block size chunk_size of the intelligent segmentation function split_text_with_llm, the text segmentation prompt prompt, the minimum text block size min_chunk_size, the text block overlap size chunk_overlap, and the maximum recursion depth max_recursion_depth; S133: the content doc_text is input into the LLM large language model, the content doc_text is inferred, the size of the content doc_text is detected, if the length of the content doc_text is greater than the target text block size chunk_size, and the target text block size chunk_size is greater than the minimum text block size min_chunk_size, then the intelligent segmentation function split_text_with_llm is recursively called to halve the content doc_text based on the text segmentation prompt prompt, and the recursion depth is checked, if the current recursion depth current_depth<maximum recursion depth max_recursion_depth, and the length of the segmented fragment of the content doc_text is greater than the target text block size chunk_size, and the target text block size chunk_size is greater than the minimum text block size min_chunk_size, then the above steps are repeated until the length of the segmented fragment of the content doc_text is less than or equal to the target text block size chunk_size, and the segmented fragment of the content doc_text is directly returned, otherwise, the recursion is stopped and the segmented fragment of the content doc_text is directly returned; S134: Encapsulate the segmented fragments into a Document object, including page_content and metadata, and generate a vector representation of the text block based on the embedding model; S135: Create a storage table table_history_knowledge, including ID, keyword key_str and corresponding knowledge content fragment value_str, add the generated text block and embedding to the table table_history_knowledge, add the table table_history_knowledge to the vector database vectordb, and form a converter transformer data analysis professional knowledge base.
4. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 3 is characterized in that: In step S131, after the content doc_text is extracted, the following operation steps are performed: S1311: define a cutting function split_text_for_model, and set a text maximum context length max_context_length and a text overlap rate overlap_percent of the cutting function split_text_for_model; S1312: Based on the cutting function split_text_for_model, the content doc_text is split according to the set text maximum context length max_context_length to obtain the content doc_text that can be processed by the LLM large language model.
5. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 4 is characterized in that: In the step S1311, the maximum context length of the text max_context_length is 8000 characters, and the text overlap rate overlap_percent is 0.
25.
6. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 3 is characterized by: In step S132, the target text block size chunk_size is 2048 characters, the text segmentation prompt prompt, the minimum text block size min_chunk_size is 512 characters, the text block overlap size chunk_overlap is half of the minimum text block size min_chunk_size, and the maximum recursion depth max_recursion_depth is 2.
7. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 1 is characterized by: The specific steps of step S2 include: S21: Establishing a connection with a converter transformer data analysis professional knowledge base, including configuring a host, port, user name, and password; S22: based on the query input input_query_sentence of the host input user; S23: extract keywords from user input using regular expressions, and expand the extracted keywords into synonyms, near-synonyms, and professional terms, including Chinese expressions and English expressions; S24: Perform fuzzy matching query in the converter transformer data analysis professional knowledge base based on the expanded keywords; S25: setting joined_value_str to an empty string, and storing the corresponding knowledge content fragment value_str found in the joined_value_str; S26: If all keywords are matched successfully, all_matched=True is set, and the corresponding knowledge content fragment value_str in joined_value_str is directly returned as the answer. Otherwise, all_matched=False is set, and the LLM large language model is called; S27: The LLM large language model performs big data retrieval analysis based on the user's query input input_query_sentence and the expanded keywords.
8. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 7 is characterized in that: In the step S24, based on the fuzzy matching query analysis of the converter transformer data analysis professional knowledge base, an abnormal capture mechanism is set to capture and record abnormal information during the operation process in order to optimize parameters.
9. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 7, characterized in that: In the step S27, during the process of big data retrieval and analysis of converter transformer operation and inspection data based on the LLM large language model, an abnormal capture mechanism is set to capture and record abnormal information during the operation process in order to optimize parameters.
10. The method for analyzing and warning the operation and inspection data of a converter transformer based on a large language model according to claim 7, characterized in that: In step S27, the big data retrieval analysis result of the LLM large language model further performs the following operation steps: S271: Compare the big data retrieval and analysis results of the LLM large language model with the data in the converter transformer data analysis professional knowledge base, and extract new knowledge content in the big data retrieval and analysis results of the LLM large language model; S272: preprocessing new knowledge content, including length detection and filtering of invalid or erroneous results; S273: extracting the keyword key_str from the new knowledge content using a regular expression; S274: Compare the extracted keyword key_str with the keyword key_str in the converter transformer data analysis professional knowledge base. If the keyword key_str already exists in the converter transformer data analysis professional knowledge base, update the keyword key_str. If the keyword key_str does not exist in the converter transformer data analysis professional knowledge base, insert a new keyword key_str to update the converter transformer data analysis professional knowledge base.
Citation Information
Patent Citations
Medical auxiliary question and answer method and system based on knowledge calibration and retrieval enhancement
CN117573843A
Medical literature intelligent question answering system and method based on RAG and LLM technologies
CN118364088A
Data center operation and maintenance method based on large language model
CN118503064A
Patent claim and description feature mapping and inventive step argument generation
GB202310959D0
Methods for Reinforcement Document Transformer for Multimodal Conversations and Devices Thereof
US20220405484A1