Substation main wiring diagram intelligent identification method and system based on machine learning
Through machine learning-based methods, image and text recognition models are trained and deployed on the mobile terminal, the difficulty of extracting the middle interval information of the main wiring diagram recognition of the substation and the problem of model deployment are solved, and the intelligent identification and mobile terminal deployment of the main wiring diagram of the substation are realized, and the recognition efficiency and portability are improved.
Patent Information
- Application Number
- CN202411602415.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-11
- Publication Date
- 2025-03-25
AI Technical Summary
The prior art is difficult to accurately extract interval information in the identification of main wiring diagram of substations, and traditional deep learning models are difficult to deploy on mobile terminals, which limits its promotion and popularization in practical applications.
Using a machine learning-based method, we can collect and preprocess substation drawing data, train image recognition and text recognition models, integrate the models and deploy them on the mobile terminal to achieve intelligent identification of the main wiring diagram of the substation.
It realizes automatic and accurate extraction of the main wiring diagram information of the substation, solves the problems of time-consuming and inefficient and error-prone information extraction, and is deployed on the mobile terminal, improving the portability and flexibility of the system.
Smart Images

Figure CN119693955A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of machine learning, and in particular to a method and system for intelligently identifying a main wiring diagram of a substation based on machine learning. Background Art
[0002] In the power system, substations are the core facilities for power transmission and distribution. Their main wiring diagrams describe in detail the connection mode, operating status and configuration information of the electrical equipment in the station, and are an important basis for the operation and maintenance of the power system. With the continuous expansion of the scale of the power grid and the accelerated advancement of intelligent transformation, the demand for digital and intelligent management of substation main wiring diagrams is becoming increasingly urgent.
[0003] At present, power grid companies have initially realized the transfer of substation drawings from physical carriers to digital carriers, and completed the digital storage of drawings through scanning and other methods. However, this digital conversion only stays at the carrier level and has not achieved intelligent extraction and structured representation of drawing information. Traditional drawing information extraction methods mainly rely on manual operations, which is not only time-consuming and labor-intensive, inefficient, but also easily affected by human factors, resulting in inaccurate and incomplete information extraction.
[0004] Among the existing technologies, some studies have attempted to automatically extract information about the main wiring diagram of a substation through image recognition and text recognition technology. For example, an electrical graphic element symbol detection model based on Faster R-CNN is used, combined with CTPN (Connectionist Text Proposal Network) and CRNN (Convolutional Recurrent Neural Network) models to extract text information, and the Zhang-Suen algorithm is used to refine the line and wiring information, achieving triple recognition of graphic elements, lines, and text. In addition, there are studies that use YOLOv4 (You Only Look Once version 4) to add an overlapping sliding window mechanism to solve the problem of dense electrical elements, and combine CRNN for text recognition and line detection algorithms to identify lines. These methods have improved the efficiency and accuracy of information extraction to a certain extent, but there are still some problems that are difficult to overcome.
[0005] Specifically, the existing technology often ignores the extraction of interval information when identifying the main wiring diagram of the substation. As an important part of the wiring diagram, the interval has its own functions and specific structure. The accurate extraction of its information is crucial to understanding the structure of the entire electrical system. However, due to the diversity and complexity of interval types, it is difficult for the existing technology to achieve comprehensive and accurate recognition of interval information. In addition, due to the complex conditions of the actual site, higher requirements are placed on the flexibility and portability of the recognition model. However, due to the high complexity of existing deep learning models, it is often difficult to deploy on mobile terminals, which limits their promotion and popularization in practical applications.
[0006] Therefore, there is an urgent need for a technical solution that can automatically and accurately extract substation main wiring diagram information and can be deployed on mobile terminals for flexible application to meet the needs of intelligent management of power systems. Summary of the invention
[0007] The technical problem to be solved by the present invention is to provide a method and system for intelligently identifying the main wiring diagram of a substation based on machine learning, so as to solve the technical problems existing in the digitization process of the main wiring diagram of the existing substation. Specifically, the manual extraction of substation drawing information in the prior art is time-consuming, inefficient, and prone to errors, and cannot meet the requirements of safe operation of the power grid; at the same time, the substation drawings are highly complex and have dense electrical elements. Traditional recognition methods are difficult to accurately extract connection relationships and interval information, and are difficult to deploy on mobile terminals.
[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for intelligently identifying a main wiring diagram of a substation based on machine learning, comprising the following steps: Step 1: Collect data sets and determine standards; Step 2: Preprocess the data set; Step 3: Train the image recognition model; Step 4: Train the text recognition model; Step 5: Integrate the model and build the system; Step 6: Deploy the system on the mobile terminal.
[0009] In a preferred solution, the specific steps of collecting data sets and determining standards in Step 1 include: Step 1.1: Collect different types of substation drawings from plants and stations, and then screen the drawings to cover various substation structures and equipment, and complete a dedicated data set for substation main wiring diagram identification; Step 1.2: Obtain the standard structure and classification of important parts of substation drawings such as wiring methods, bay types, switchgear, etc. from various standards, documents and plants, and use standardized names and ranges for subsequent processing and model training.
[0010] In a preferred solution, the specific implementation steps of Step 2 for preprocessing the data set include: Step 2.1: Use super-resolution network as the main method and opencv as the auxiliary method to pre-process the substation drawings; use the super-resolution network Real-ESRGAN generator to reconstruct the low-resolution image with super-resolution, and the discriminator to judge whether the input image is a real image. Through continuous training, the reconstruction ability of the network is enhanced, so as to achieve the reconstruction of the substation main wiring diagram image, thereby improving the image perception quality and details, making the electrical components and text of the drawing easier to identify; Step 2.2: Use OpenCV to perform data augmentation processing such as random flipping, cropping, rotation, translation, and adding noise on the dataset, so that subsequent analysis, processing or recognition tasks will be more accurate, reliable and efficient.
[0011] In a preferred solution, the specific implementation steps of Step 3 of training the image recognition model include: Step 3.1: The preprocessed data set is manually labeled using the LabelImg labeling tool. The labeled names and ranges are based on the standards established when the data set was collected. After labeling, they are randomly divided into training set, test set, and validation set in a ratio of 8:1:1. The YOLOv5x6 model is combined with Slim-Neck for training, aiming to improve the efficiency and accuracy of real-time object detectors and improve the recognition effect of small targets. Step 3.2: First train the model of the wiring method, and then use the data set to verify the model and identify and segment the images of all wiring methods in the data set; Step 3.3: Obtain the substation wiring mode dataset based on the previous preprocessing step, then annotate it and train the interval type model; Step 3.4: Similarly, we can obtain the substation wiring method, bay type, and identification model of switch devices.
[0012] In a preferred solution, the specific implementation steps of Step 4 of training the text recognition model include: Step 4.1: The substation drawing text dataset obtained after image recognition and segmentation is manually labeled using the PPOCRLabel labeling tool; Step 4.2: After the annotation is completed, use the training function of PaddleOCR for training, the version is PP-OCRv4; Step 4.3: First use a more complex network to train the large model Teacher, and use the large model Teacher as a pre-training model for the next step of training the Student model. The CML collaborative mutual distillation method between the three models is used. It includes two Student models with the same structure, and also introduces a Teacher model with a larger model structure. The large model Teacher guides the two small models Student, and the Student models learn from each other, which further improves the performance of the model; Step 4.4: The obtained Student model is used for text recognition of substation wiring drawings. After knowledge distillation, it has both the high precision of a large model and the extremely fast recognition speed of a small model.
[0013] In the preferred solution, the specific implementation steps of Step 5 of integrating the model and structuring the system include: Step 5.1: The image recognition and text recognition models obtained based on the above work are integrated with the front-end and back-end architecture through algorithm modules. The Python version is 3.9. Step 5.2: Use Real-ESRGAN to perform super-resolution reconstruction on the input substation wiring diagram image, and then use it for image recognition to return the image and name of the recognized object. The segmented recognized image is used as the input for the next recognition, and the wiring mode, interval type, and switch device recognition are looped and nested; Step 5.3: Use text recognition to obtain the device number output for the last level of switch device images; Step 5.4: Integrate the output information to obtain the main wiring diagram information of the substation in a tree-like hierarchical order according to the wiring method, bay type, switch device, and number, and the information of the different levels are interrelated.
[0014] In the preferred solution, the specific implementation steps of Step 6 of deploying the system on the mobile terminal include: Step 6.1: Use the conversion tool provided by Paddle-Lite to convert the image recognition and text recognition models into a format suitable for mobile devices; Step 6.2: Create a user interface and import the model into the configured environment to complete the deployment; Step 6.3: The deployed program allows users to upload wiring diagrams, call the YOLOv5 model for object detection, crop the image, and use PaddleOCR for text recognition to obtain the main wiring diagram information of the power station.
[0015] A system for implementing any of the above-mentioned methods for intelligently identifying the main wiring diagram of a substation based on machine learning comprises: The data set collection and preprocessing module is used to collect different types of substation drawings, screen drawings covering various substation structures and equipment, form a dedicated data set, and use the super-resolution network Real-ESRGAN to perform super-resolution reconstruction on low-resolution images, and use opencv for data augmentation processing; The image recognition model training module is used to annotate the preprocessed data set and divide it into training set, test set and validation set. The YOLOv5x6 model is combined with the Slim-Neck structure for training to improve the efficiency and accuracy of the real-time object detector and the recognition effect of small targets. The wiring mode, bay type and switch device recognition models of the substation are trained in sequence. The text recognition model training module is used to annotate the substation drawing text dataset obtained after image recognition and segmentation, and train it using the PP-OCRv4 version of PaddleOCR. The collaborative mutual distillation method CML is used to train the Student model to obtain a high-precision and fast-recognition text recognition model. The model integration and system architecture module is used to program and integrate the image recognition and text recognition models with the front-end and back-end architecture through the algorithm module. After super-resolution reconstruction of the input substation wiring diagram image, image recognition and text recognition are performed in sequence, and the output information is integrated to obtain the substation main wiring diagram information that is interconnected at different levels in a tree-like hierarchical order according to the wiring mode, bay type, switch device, and number; The mobile deployment module is used to convert the image recognition and text recognition models into a format suitable for mobile devices with the help of the Paddle-Lite framework, create a user interface, import the model into the configured environment to complete the deployment, allow users to upload wiring diagrams, call the YOLOv5 model for object detection, and use PaddleOCR for text recognition after cropping the image to obtain the main wiring diagram information of the power station.
[0016] In a preferred solution, in the data set collection and preprocessing module, the super-resolution network Real-ESRGAN includes a generator and a discriminator. The generator is used to perform super-resolution reconstruction on low-resolution images, and the discriminator is used to determine whether the input image is a real image, thereby enhancing the reconstruction capability of the network through continuous training.
[0017] In a preferred embodiment, in the image recognition model training module, the LabelImg annotation tool is used for manual annotation, the annotated name and range adopt the standard established when collecting the data set, and the data set is divided into a training set, a test set and a validation set in a ratio of 8:1:1.
[0018] In the preferred scheme, in the text recognition model training module, the PPOCRLabel annotation tool is used for manual annotation, and the training function of PaddleOCR is used for training. The large model Teacher is first trained as a pre-training model, and then the Student model is trained. The model performance is improved through the CML collaborative mutual distillation method.
[0019] In the preferred scheme, in the model integration and system architecture module, the input substation wiring diagram image is reconstructed with super-resolution by Real-ESRGAN, and then image recognition is performed to return the image and name of the recognized object. The segmented recognized image is used as the input for the next recognition, and the recognition of wiring mode, interval type, and switching device is nested in a loop. The device number output is obtained by using text recognition for the switching device image of the last level.
[0020] In the preferred solution, in the mobile terminal deployment module, the deployed program allows the user to upload a wiring diagram, calls the YOLOv5 model for object detection, and then uses PaddleOCR to perform text recognition on the cropped image to obtain the main wiring diagram information of the power station.
[0021] The method and system for intelligently identifying the main wiring diagram of a substation based on machine learning provided by the present invention have the following beneficial effects: 1. The present invention solves the problem that in the existing process of digitizing the main wiring diagram of a substation, manual extraction of substation drawing information is time-consuming, inefficient, and prone to errors, and cannot meet the needs of safe operation of the power grid; at the same time, the substation drawings are highly complex and have dense electrical elements, and traditional recognition methods are difficult to accurately extract connection relationships and interval information, and are difficult to deploy on mobile terminals; 2. The present invention determines the standard structure and classification of intervals by consulting relevant standards and literature, and trains the image recognition model based on this, solving the problem of neglecting the extraction of interval information in traditional methods; 3. This invention realizes the deployment of intelligent recognition system on mobile terminal by optimizing model complexity and using Paddle-Lite framework, which improves the portability and flexibility of the system; 4. The present invention adopts a tree-shaped classification recognition method to recognize wiring diagram information step by step, thereby reducing the interference of useless information on recognition and improving the speed and effect of recognition; 5. The present invention improves the accuracy and speed of recognition by combining the optimization model with the tree-type classification recognition method; 6. Compared with the closest prior art, the present invention determines the standard structure and classification of intervals by consulting relevant standards and literature, and trains the image recognition model based on this to output the recognized interval standard name, providing input for the next level of recognition. This is more professional and comprehensive than the traditional method of using primitive groups and needing to design primitive group standards by itself; 7. The present invention adopts a tree-shaped classification and identification method, which can clearly display the structure of the electrical system, so that engineers can intuitively understand the relationship between various electrical components and their positions in the system; 8. The present invention also reduces the complexity of the model through Slim-Neck and the collaborative mutual distillation method CML, making it possible to deploy it on the mobile terminal, greatly improving the flexibility and portability of the system; 9. The present invention makes the system more portable and flexible, facilitating on-site technicians to quickly and accurately digitize substation wiring diagrams; 10. The present invention frees power grid employees from repetitive and mechanical work, improves work efficiency, eliminates errors caused by manual extraction, and ensures safe operation of the power grid; 11. The present invention has good ductility and extensibility. By integrating deep learning algorithms and automated processing technology, it realizes intelligent analysis and early warning of substation wiring diagrams, effectively prevents potential safety hazards, and further improves the intelligence level and overall efficiency of power grid operation and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The present invention will be further described below in conjunction with the accompanying drawings and implementation examples: Figure 1 This is the structure diagram of Real-ESRGAN of the present invention; Figure 2 This is the network structure diagram of YOLO of the present invention; Figure 3 It is a structural diagram of the PP-OCR of the present invention; Figure 4 It is a schematic diagram of the collaborative inter-distillation of the present invention; Figure 5 This is the tree recognition flow chart of the present invention. DETAILED DESCRIPTION
[0023] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments: Example 1 like Figures 1 to 5 As shown, the intelligent identification method of the main wiring diagram of a substation based on machine learning includes the following steps: Step 1: Collect data sets and determine standards; Step 2: Preprocess the data set; Step 3: Train the image recognition model; Step 4: Train the text recognition model; Step 5: Integrate the model and build the system; Step 6: Deploy the system on the mobile terminal.
[0024] In this embodiment, the specific steps of Step 1 of collecting data sets and determining standards include: Step 1.1: Collect different types of substation drawings from plants and stations, and then screen the drawings to cover various substation structures and equipment, and complete a dedicated data set for substation main wiring diagram identification; Step 1.2: Obtain the standard structure and classification of important parts of substation drawings such as wiring methods, bay types, switchgear, etc. from various standards, documents and plants, and use standardized names and ranges for subsequent processing and model training.
[0025] Furthermore, the specific implementation steps of the Step 2 for preprocessing the data set include: Step 2.1: Use super-resolution network as the main method and opencv (Open Source Computer Vision Library) as the auxiliary method to pre-process the substation drawings; use the super-resolution network Real-ESRGAN (Real-Enhanced Super-Resolution Generative Adversarial Network) generator to reconstruct the low-resolution image with super-resolution, and the discriminator to determine whether the input image is a real image. Through continuous training, the reconstruction ability of the network is enhanced, so as to achieve the reconstruction of the substation main wiring diagram image, thereby improving the image perception quality and details, making the electrical components and text of the drawing easier to identify; Step 2.2: Use OpenCV to perform data augmentation processing such as random flipping, cropping, rotation, translation, and adding noise on the dataset, so that subsequent analysis, processing or recognition tasks will be more accurate, reliable and efficient.
[0026] Furthermore, the specific implementation steps of Step 3 training the image recognition model include: Step 3.1: The preprocessed data set is manually labeled using the LabelImg labeling tool. The name and range of the labeling are based on the standard established when the data set was collected. After the labeling is completed, it is randomly divided into training set, test set and validation set in a ratio of 8:1:1. The YOLOv5x6 (You Only Look Once version 5x6) model is used in combination with Slim-Neck for training, aiming to improve the efficiency and accuracy of real-time object detectors and improve the recognition effect of small targets. Step 3.2: First train the model of the wiring method, and then use the data set to verify the model and identify and segment the images of all wiring methods in the data set; Step 3.3: Obtain the substation wiring mode dataset based on the previous preprocessing step, then label it and train the interval type model; Step 3.4: Similarly, we can obtain the substation wiring method, bay type, and identification model of switch devices.
[0027] Furthermore, the specific implementation steps of Step 4 of training the text recognition model include: Step 4.1: The substation drawing text dataset obtained after image recognition and segmentation is manually labeled using the PPOCRLabel labeling tool; Step 4.2: After the annotation is completed, use the training function of PaddleOCR (PaddlePaddle Optical Character Recognition, Paddle Optical Character Recognition) for training, the version is PP-OCRv4; Step 4.3: First, use a more complex network to train the large Teacher model, and use the large Teacher model as a pre-training model for the next step of training the Student model. The CML (Collaborative Mutual Learning) collaborative distillation method between the three models is used. It includes two Student models with the same structure, and also introduces a Teacher model with a larger model structure. The large Teacher model guides the two small Student models, and the Student models learn from each other, which further improves the performance of the model. Step 4.4: The obtained Student model is used for text recognition of substation wiring drawings. After knowledge distillation, it has both the high precision of a large model and the extremely fast recognition speed of a small model.
[0028] Furthermore, the specific implementation steps of Step 5 of integrating the model and structuring the system include: Step 5.1: The image recognition and text recognition models obtained based on the above work are integrated with the front-end and back-end architecture through algorithm modules. The Python version is 3.9. Step 5.2: Use Real-ESRGAN to perform super-resolution reconstruction on the input substation wiring diagram image, and then use it for image recognition to return the image and name of the recognized object. The segmented recognized image is used as the input for the next recognition, and the wiring mode, interval type, and switch device recognition are looped and nested; Step 5.3: Use text recognition to obtain the device number output for the last level of switch device images; Step 5.4: Integrate the output information to obtain the main wiring diagram information of the substation in a tree-like hierarchical order according to the wiring method, bay type, switch device, and number, and the information of the different levels are interrelated.
[0029] Furthermore, the specific implementation steps of Step 6 to deploy the system on the mobile terminal include: Step 6.1: Use the conversion tool provided by Paddle-Lite to convert the image recognition and text recognition models into a format suitable for mobile devices; Step 6.2: Create a user interface and import the model into the configured environment to complete the deployment; Step 6.3: The deployed program allows users to upload wiring diagrams, calls the YOLOv5 (You Only Look Once version 5) model for object detection, crops the image, and uses PaddleOCR for text recognition to obtain the main wiring diagram information of the power station.
[0030] Example 2 In another preferred embodiment, based on the above embodiment 1, Figures 1 to 5 As shown, the system for implementing any of the above-mentioned methods for intelligently identifying the main wiring diagram of a substation based on machine learning includes: The data set collection and preprocessing module is used to collect different types of substation drawings, screen drawings covering various substation structures and equipment, form a dedicated data set, and use the super-resolution network Real-ESRGAN to perform super-resolution reconstruction on low-resolution images, and use opencv for data augmentation processing; The image recognition model training module is used to annotate the preprocessed data set and divide it into training set, test set and validation set. The YOLOv5x6 model is combined with the Slim-Neck structure for training to improve the efficiency and accuracy of the real-time object detector and the recognition effect of small targets. The wiring mode, bay type and switch device recognition models of the substation are trained in sequence. The text recognition model training module is used to annotate the substation drawing text dataset obtained after image recognition and segmentation, and train it using the PP-OCRv4 version of PaddleOCR. The collaborative mutual distillation method CML is used to train the Student model to obtain a high-precision and fast-recognition text recognition model. The model integration and system architecture module is used to program and integrate the image recognition and text recognition models with the front-end and back-end architecture through the algorithm module. After super-resolution reconstruction of the input substation wiring diagram image, image recognition and text recognition are performed in sequence, and the output information is integrated to obtain the substation main wiring diagram information that is interconnected at different levels in a tree-like hierarchical order according to the wiring mode, bay type, switch device, and number; The mobile deployment module is used to convert the image recognition and text recognition models into a format suitable for mobile devices with the help of the Paddle-Lite framework, create a user interface, import the model into the configured environment to complete the deployment, allow users to upload wiring diagrams, call the YOLOv5 model for object detection, and use PaddleOCR for text recognition after cropping the image to obtain the main wiring diagram information of the power station.
[0031] In this embodiment, in the data set collection and preprocessing module, the super-resolution network Real-ESRGAN includes a generator and a discriminator. The generator is used to perform super-resolution reconstruction on low-resolution images, and the discriminator is used to determine whether the input image is a real image, thereby enhancing the reconstruction capability of the network through continuous training.
[0032] Furthermore, in the image recognition model training module, the LabelImg annotation tool is used for manual annotation, and the annotated name and range adopt the standard established when collecting the data set, and the data set is divided into a training set, a test set, and a validation set in a ratio of 8:1:1.
[0033] Furthermore, in the text recognition model training module, the PPOCRLabel annotation tool is used for manual annotation, and the training function of PaddleOCR is used for training. The large model Teacher is first trained as a pre-training model, and then the Student model is trained. The model performance is improved through the CML collaborative mutual distillation method.
[0034] Furthermore, in the model integration and system architecture module, the input substation wiring diagram image is reconstructed with super-resolution using Real-ESRGAN, and then image recognition is performed to return the image and name of the recognized object. The segmented recognized image is used as the input for the next recognition, and the recognition of wiring mode, interval type, and switching device is nested in a loop. Text recognition is used for the switching device image of the last level to obtain the device number output.
[0035] Furthermore, in the mobile deployment module, the deployed program allows the user to upload a wiring diagram, calls the YOLOv5 model for object detection, and then uses PaddleOCR to perform text recognition on the cropped image to obtain the main wiring diagram information of the power station.
[0036] Example 3 In another preferred embodiment, based on the above embodiments 1 and 2, as Figures 1 to 5 As shown, this embodiment describes in detail the implementation steps of the intelligent identification method and system for the main wiring diagram of a substation based on machine learning, which are as follows: 1. Dataset collection and standard determination First, drawings covering various substation structures and equipment were collected from multiple plants and stations to ensure that the data set was representative and comprehensive; then, the drawings were screened to remove vague, incomplete or non-standard drawings. At the same time, the standard structure and classification of important parts of substation drawings such as wiring methods, bay types, and switchgear were obtained from various standards, documents and plants and stations, and standardized names and scopes were used to provide a basis for subsequent processing and model training.
[0037] 2. Dataset preprocessing The super-resolution network Real-ESRGAN is used to preprocess the substation drawings; Real-ESRGAN includes a generator and a discriminator. The generator is used to perform super-resolution reconstruction on low-resolution images, and the discriminator is used to determine whether the input image is a real image; through continuous training, the reconstruction ability of the network is enhanced, the perceptual quality and details of the image are improved, and the electrical components and texts are easier to identify; then, OpenCV is used to perform data augmentation processing such as random flipping, cropping, rotation, translation, and adding noise on the dataset to improve the accuracy, reliability and efficiency of subsequent analysis, processing or recognition tasks.
[0038] 3. Training the image recognition model The LabelImg annotation tool is used to manually annotate the preprocessed dataset, and the annotated names and ranges are based on the previously established standards. After the annotation is completed, the dataset is randomly divided into training set, test set and validation set with a ratio of 8:1:1. The YOLOv5x6 model is used for training, and the Slim-Neck structure is introduced to improve the efficiency and accuracy of the object detector and enhance the recognition effect of small targets. First, the model of the wiring method is trained, and the data is used to verify the model, and the images of all wiring methods in the dataset are identified and segmented. Then, according to the power station wiring method dataset obtained in the preprocessing step, it is annotated again and the interval type model is trained. By analogy, the recognition model of the wiring method, interval type, and switch device of the substation is obtained.
[0039] 4. Training the text recognition model The substation drawing text dataset obtained after image recognition and segmentation was manually annotated using the PPOCRLabel annotation tool; after annotation, the training function of PaddleOCR was used for training, and the version was PP-OCRv4; during the training process, a more complex network was first used to train the large model Teacher, and then the large model Teacher was used as a pre-training model to train the Student model; the CML; collaborative mutual distillation method was used, which included two Student models with the same structure and a Teacher model with a larger model structure; the Teacher model guided the learning of the Student model, and the Student models also learned from each other to improve the performance of the model; the final Student model was used for text recognition of substation wiring drawings, which had both the high precision of the large model and the fast recognition speed of the small model.
[0040] 5. Integrate models and build systems The image recognition and text recognition models are programmed and integrated with the front-end and back-end architecture through algorithm modules, and the Python version is 3.9. For the input substation wiring diagram image, Real-ESRGAN is first used for super-resolution reconstruction, and then image recognition is performed to return the image and name of the recognized object. The segmented recognized image is used as the input for the next recognition, and the wiring method, interval type, and switch device recognition are nested in a loop. For the last-level switch device image, text recognition is used to obtain the device number output. The output information is integrated to obtain the substation main wiring diagram information that is interconnected at different levels in a tree-like hierarchical order of wiring method, interval type, switch device, and number.
[0041] 6. Mobile deployment With the help of the conversion tool provided by Paddle-Lite, the image recognition and text recognition models are converted into a format suitable for mobile devices. Then a user interface is created to import the model into the configured environment to complete the deployment. The deployed program allows users to upload wiring diagrams, call the YOLOv5 model for object detection, and after cropping the image, use PaddleOCR for text recognition to obtain the main wiring diagram information of the power station.
[0042] Example 4 In another preferred embodiment, based on the above-mentioned embodiments 1, 2, and 3, as another embodiment, the present invention can further optimize the image recognition model; for example, more data enhancement techniques are introduced in the training process, such as color jittering, contrast adjustment, etc., to further improve the generalization ability of the model; in addition, other advanced deep learning algorithms, such as Transformer, etc., can be tried to replace the YOLOv5 model to explore better recognition effects.
[0043] In the preferred solution, in the data set collection and preprocessing module, the super-resolution network Real-ESRGAN includes a generator and a discriminator. The generator is used to perform super-resolution reconstruction on low-resolution images, and the discriminator is used to determine whether the input image is a real image, and the reconstruction ability of the network is enhanced through continuous training. The above settings, In the preferred solution, in the image recognition model training module, the LabelImg annotation tool is used for manual annotation. The annotation name and range adopt the standard established when collecting the data set, and the data set is divided into training set, test set and validation set in a ratio of 8:1:1. The above settings are intended to ensure the accuracy and generalization ability of model training. At the same time, data enhancement techniques such as rotation, scaling and flipping are used to enrich training samples to further improve the robustness and recognition accuracy of the model.
[0044] In the preferred scheme, in the text recognition model training module, the PPOCRLabel annotation tool is used for manual annotation, and the training function of PaddleOCR is used for training. The large model Teacher is first trained as a pre-training model, and then the Student model is trained, and the model performance is improved by the CML collaborative mutual distillation method. The above settings not only greatly improve the accuracy of text recognition, but also effectively narrow the performance gap between the Student model and the Teacher model through the CML strategy, so that the Student model has excellent recognition ability and generalization performance while maintaining its lightweight.
[0045] In the preferred scheme, in the model integration and system architecture module, the input substation wiring diagram image is reconstructed with super-resolution by Real-ESRGAN, and then image recognition is performed to return the image and name of the recognized object. The segmented recognized image is used as the input for the next recognition, and the wiring mode, interval type, and switch device recognition are looped and nested. The device number output is obtained by text recognition for the last-level switch device image. The above settings can greatly improve the image recognition accuracy and efficiency, and realize the intelligent analysis of the substation wiring diagram. At the same time, the scheme is also highly flexible and scalable, and can quickly adjust the recognition process and parameter configuration according to the specific needs of different substations.
[0046] In the preferred solution, in the mobile deployment module, the deployed program allows the user to upload a wiring diagram, and after calling the YOLOv5 model for object detection, PaddleOCR is used to perform text recognition on the cropped image to obtain the main wiring diagram information of the power station; the above settings effectively improve the level of intelligence in power station operation and maintenance; users can also quickly locate equipment information based on the recognition results, perform troubleshooting and daily maintenance, and ensure the safety and stability of power station operation.
[0047] In summary, the intelligent recognition method and system of the main wiring diagram of a substation based on machine learning proposed in the present invention solves the problem that the manual extraction of substation drawing information in the digitization process of the main wiring diagram of the existing substation is time-consuming, inefficient, and prone to errors, and cannot meet the needs of safe operation of the power grid; at the same time, the substation drawings are highly complex and have dense electrical elements. Traditional recognition methods are difficult to accurately extract connection relationships and interval information, and are difficult to deploy on mobile terminals; the present invention not only collects drawings that widely cover various substation structures and equipment, but also uses the super-resolution network Real-ESRGAN for image reconstruction, which significantly improves the perceived quality and details of the image, and provides a higher quality data foundation for subsequent recognition tasks. This method that combines the construction of a specific field (substation) data set with advanced image processing technology is not common in previous substation drawing processing; it adopts a tree classification method for step-by-step classification and recognition. The scheme can gradually extract information in the order of wiring mode, interval type, and switch device. This method is a new attempt in the extraction of substation main wiring diagram information. Compared with traditional overall recognition or simple classification methods, it provides more refined and structured information output; the present invention not only focuses on improving recognition accuracy and efficiency, but also becomes The intelligent recognition system is successfully deployed on the mobile terminal, which enables on-site technicians to digitize the substation wiring diagram anytime and anywhere, greatly improving the portability and practicality of the system. This mobile terminal deployment is a relatively new application in the field of substation drawing recognition. In the model training process, the present invention adopts Slim-Neck to improve the efficiency and accuracy of the real-time object detector, and uses the CML collaborative mutual distillation method to improve the performance of the text recognition model. The innovative application of these technologies in the field of substation drawing recognition provides a new idea for improving recognition accuracy and efficiency. The present invention comprehensively applies multiple technologies such as image recognition, text recognition, tree classification recognition, and mobile terminal deployment to the intelligent recognition of the substation main wiring diagram. This cross-domain technology integration is a creative attempt in the field of substation drawing processing. By designing a hierarchical tree classification recognition process, the scheme can extract the information in the substation main wiring diagram more finely and clearly display the structural relationship of the electrical system. The innovative design of this recognition process not only improves the recognition accuracy and efficiency, but also provides more convenient information support for subsequent substation management and maintenance. The present invention successfully deploys the intelligent recognition system on the mobile terminal, realizing the portability and on-siteness of substation drawing recognition.This innovative practice not only improves the practicality and flexibility of the system, but also provides a more efficient and convenient working method for on-site technicians; in the model training process, the present invention adopts a variety of innovative methods and technical means, such as Slim-Neck and CML, to optimize the recognition performance and efficiency of the model. The application of these innovative methods not only improves the recognition accuracy and speed of the model, but also provides new ideas and directions for subsequent model training and optimization; in addition, the present invention can further reduce the consumption of computing resources and improve the operating efficiency of the recognition system by introducing adaptive learning rate adjustment and model pruning technology, laying a solid foundation for the widespread application of substation drawing recognition.
Claims
1. A method for intelligently identifying the main wiring diagram of a substation based on machine learning, characterized in that: The method comprises the following steps: Step 1: Collect data sets and determine standards; Step 2: Preprocess the data set; Step 3: Train the image recognition model; Step 4: Train the text recognition model; Step 5: Integrate the model and build the system; Step 6: Deploy the system on the mobile terminal.
2. The intelligent identification method of substation main wiring diagram based on machine learning according to claim 1 is characterized in that: The specific steps of Step 1 to collect data sets and determine standards include: Step 1.1: Collect different types of substation drawings from plants and stations, and then screen the drawings to cover various substation structures and equipment, and complete a dedicated data set for substation main wiring diagram identification; Step 1.2: Obtain the standard structure and classification of important parts of substation drawings such as wiring methods, bay types, switchgear, etc. from various standards, documents and plants, and use standardized names and ranges for subsequent processing and model training.
3. The intelligent identification method of substation main wiring diagram based on machine learning according to claim 1 is characterized in that: The specific implementation steps of Step 2 for preprocessing the data set include: Step 2.1: Use super-resolution network as the main method and opencv as the auxiliary method to pre-process the substation drawings; use the super-resolution network Real-ESRGAN generator to reconstruct the low-resolution image with super-resolution, and the discriminator to determine whether the input image is a real image. Through continuous training, the reconstruction ability of the network is enhanced, so as to achieve the reconstruction of the substation main wiring diagram image, thereby improving the image perception quality and details, making the electrical components and text of the drawing easier to identify; Step 2.2: Use OpenCV to perform data augmentation processing such as random flipping, cropping, rotation, translation, and adding noise on the dataset, so that subsequent analysis, processing or recognition tasks will be more accurate, reliable and efficient.
4. The intelligent identification method of substation main wiring diagram based on machine learning according to claim 1 is characterized in that: The specific implementation steps of Step 3 training the image recognition model include: Step 3.1: The preprocessed data set is manually labeled using the LabelImg labeling tool. The labeled names and ranges are based on the standards established when the data set was collected. After labeling, they are randomly divided into training set, test set, and validation set in a ratio of 8:1:
1. The YOLOv5x6 model is combined with Slim-Neck for training, aiming to improve the efficiency and accuracy of real-time object detectors and improve the recognition effect of small targets. Step 3.2: First train the model of the wiring method, and then use the data set to verify the model and identify and segment the images of all wiring methods in the data set; Step 3.3: Obtain the substation wiring mode dataset based on the previous preprocessing step, then label it and train the interval type model; Step 3.4: Similarly, the wiring method, bay type, and identification model of the substation’s switching devices are obtained.
5. The method for intelligently identifying the main wiring diagram of a substation based on machine learning according to claim 1 is characterized in that: The specific implementation steps of Step 4 training the text recognition model include: Step 4.1: The substation drawing text dataset obtained after image recognition and segmentation is manually labeled using the PPOCRLabel labeling tool; Step 4.2: After the annotation is completed, use the training function of PaddleOCR for training, the version is PP-OCRv4; Step 4.3: First use a more complex network to train the large model Teacher, and use the large model Teacher as a pre-training model for the next step of training the Student model. The CML collaborative mutual distillation method between the three models is used. It includes two Student models with the same structure, and also introduces a Teacher model with a larger model structure. The large model Teacher guides the two small models Student, and the Student models learn from each other, which further improves the performance of the model; Step 4.4: The obtained Student model is used for text recognition of substation wiring drawings. After knowledge distillation, it has both the high precision of a large model and the extremely fast recognition speed of a small model.
6. The intelligent identification method of substation main wiring diagram based on machine learning according to claim 1 is characterized in that: The specific implementation steps of Step 5 to integrate the model and build the system include: Step 5.1: The image recognition and text recognition models obtained based on the above work are integrated with the front-end and back-end architecture through algorithm modules. The Python version is 3.
9. Step 5.2: Use Real-ESRGAN to perform super-resolution reconstruction on the input substation wiring diagram image, and then use it for image recognition to return the image and name of the recognized object. The segmented recognized image is used as the input for the next recognition, and the wiring mode, interval type, and switch device recognition are looped and nested; Step 5.3: Use text recognition to obtain the device number output for the last level of switch device images; Step 5.4: Integrate the output information to obtain the main wiring diagram information of the substation in a tree-like hierarchical order according to the wiring method, bay type, switch device, and number, and the information of the different levels are interrelated.
7. The method for intelligently identifying the main wiring diagram of a substation based on machine learning according to claim 1 is characterized in that: The specific implementation steps of Step 6 to deploy the system on the mobile terminal include: Step 6.1: Use the conversion tool provided by Paddle-Lite to convert the image recognition and text recognition models into a format suitable for mobile devices; Step 6.2: Create a user interface and import the model into the configured environment to complete the deployment; Step 6.3: The deployed program allows users to upload wiring diagrams, call the YOLOv5 model for object detection, crop the image, and use PaddleOCR for text recognition to obtain the main wiring diagram information of the power station.
8. A system for implementing the intelligent identification method of the main wiring diagram of a substation based on machine learning as described in any one of claims 1 to 7 comprises: The data set collection and preprocessing module is used to collect different types of substation drawings, screen drawings covering various substation structures and equipment, form a dedicated data set, and use the super-resolution network Real-ESRGAN to perform super-resolution reconstruction on low-resolution images, and use opencv for data augmentation processing; The image recognition model training module is used to annotate the preprocessed data set and divide it into training set, test set and validation set. The YOLOv5x6 model is combined with the Slim-Neck structure for training to improve the efficiency and accuracy of the real-time object detector and the recognition effect of small targets. The wiring mode, bay type and switch device recognition models of the substation are trained in sequence. The text recognition model training module is used to annotate the substation drawing text dataset obtained after image recognition and segmentation, and train it using the PP-OCRv4 version of PaddleOCR. The collaborative mutual distillation method CML is used to train the Student model to obtain a high-precision and fast-recognition text recognition model. The model integration and system architecture module is used to program and integrate the image recognition and text recognition models with the front-end and back-end architecture through the algorithm module. After super-resolution reconstruction of the input substation wiring diagram image, image recognition and text recognition are performed in sequence, and the output information is integrated to obtain the substation main wiring diagram information that is interconnected at different levels in a tree-like hierarchical order according to the wiring mode, bay type, switch device, and number; The mobile deployment module is used to convert the image recognition and text recognition models into a format suitable for mobile devices with the help of the Paddle-Lite framework, create a user interface, import the model into the configured environment to complete the deployment, allow users to upload wiring diagrams, call the YOLOv5 model for object detection, and use PaddleOCR for text recognition after cropping the image to obtain the main wiring diagram information of the power station.
9. The intelligent identification system for main wiring diagram of a substation based on machine learning according to claim 8 is characterized in that: In the data set collection and preprocessing module, the super-resolution network Real-ESRGAN includes a generator and a discriminator. The generator is used to perform super-resolution reconstruction on low-resolution images, and the discriminator is used to determine whether the input image is a real image, and the reconstruction ability of the network is enhanced through continuous training. In the image recognition model training module, the LabelImg annotation tool is used for manual annotation. The annotated name and range adopt the standard established when collecting the data set, and the data set is divided into a training set, a test set, and a validation set in a ratio of 8:1:
1.
10. The intelligent identification system for main wiring diagram of a substation based on machine learning according to claim 8 is characterized in that: In the text recognition model training module, the PPOCRLabel annotation tool is used for manual annotation, and the training function of PaddleOCR is used for training. The large model Teacher is first trained as a pre-training model, and then the Student model is trained. The model performance is improved by the CML collaborative mutual distillation method; in the model integration and system architecture module, the input substation wiring diagram image is reconstructed with Real-ESRGAN for super-resolution, and then image recognition is performed to return the recognized object image and name. The segmented recognized image is used as the input for the next recognition, and the wiring mode, interval type, and switch device recognition are looped and nested. The device number output is obtained by using text recognition for the last-level switch device image; in the mobile terminal deployment module, the deployed program allows the user to upload the wiring diagram, and after calling the YOLOv5 model for object detection, PaddleOCR is used to perform text recognition on the cropped image to obtain the main wiring diagram information of the power station.
Citation Information
Cited By
Clinical test sensitive data automatic shielding method and system based on mobile terminal
CN120279560A
Transformer substation main wiring space layout topology model construction method and system
CN121167956A