Automatic drawing method, device and electronic equipment for secondary circuit of power system
By identifying and establishing power system secondary circuit model files, and using graphic training sets and optimized path rules to generate optimal path algorithms, the problem of low automation in existing technologies is solved, and efficient and low-cost automatic drawing of power system secondary circuits is achieved.
Patent Information
- Application Number
- CN202310749588.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-21
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2043-06-21
AI Technical Summary
The design of secondary circuits in existing power systems suffers from low automation, reliance on manual operation, low efficiency, inconsistent drawing quality, and high labor costs.
By identifying engineering diagrams of secondary circuits in a power system, establishing model files, matching graphical instance modules using a text-graphic training set, drawing paths based on connection relationships and relative positions, and generating an optimal path algorithm through path optimization rules, automatic drawing is achieved.
It significantly reduced data preparation and labor costs, improved the automation level and drawing quality of power system secondary circuit design, and reduced the demand for highly skilled drafting personnel.
Smart Images

Figure CN116776404B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of power system technology, and in particular to an automatic drawing method, apparatus and electronic equipment for secondary circuits of power systems. Background Technology
[0002] Secondary circuit diagrams of power systems serve as the source of engineering databases and are the data foundation for power grid construction, operation, and management. Engineering drawings play a crucial role in practical applications, expressing the designer's intent and guiding on-site wiring, inspection, and maintenance. CAD software suffers from numerous problems in generating two-dimensional engineering drawings, such as extremely low efficiency, difficulty in meeting localization and standardization requirements, and low levels of automation.
[0003] The power system design proposes a method based on virtual loops in the secondary system, employing the creation of Substation Configuration Descriptions (SCDs) and configured IED descriptions (CIDs) for secondary loop design. Network connection diagrams, information flow diagrams, and secondary loop diagrams are used to summarize the logical relationships and information interaction methods of the secondary system, clarifying the direction of information flow in the optical fiber physical loops. However, these optical fiber-related designs still require manual interpretation of drawings to further complete construction drawings, making automated and standardized design difficult to achieve.
[0004] Currently, the design of secondary circuits for cables in related technologies requires high drawing skills from users; the degree of automation is low, and there is an excessive reliance on manual operation; most of the work is done manually, resulting in low efficiency; a large number of people need to be hired, leading to high labor costs; due to differences in human expertise, the quality of the drawings varies; and there is a large amount of repetitive work. Summary of the Invention
[0005] This invention provides an automatic drawing method, device, and electronic equipment for secondary circuits in power systems, which solves the problem that existing secondary circuit designs require manual drawing reading and are difficult to automate and standardize.
[0006] In a first aspect, embodiments of the present invention provide an automatic drawing method for secondary circuits of a power system, comprising: Identify engineering drawing samples of secondary circuits in a power system to obtain drawing information; A sample power system secondary circuit model file is created based on the drawing information. The preset graphic training set is matched with the sample secondary circuit model file of the power system to obtain at least three graphical instance modules; Based on the connection relationship between the at least three graphical instance modules and the power system secondary circuit model file sample, draw one or more secondary circuit paths; The one or more secondary circuit paths are compared with the drawing information. Based on the comparison results and preset optimization path rules, the one or more secondary circuit paths are optimized and used as the optimal path. The optimal path drawing algorithm is then trained, wherein the optimal path drawing algorithm is used to draw the paths of the secondary circuits of the power system.
[0007] In one possible implementation, drawing one or more secondary loop paths based on the connection relationships between the at least three graphical instance modules and the power system secondary loop model file sample includes: Based on the pairing attributes of the board terminals in the power system model file sample, determine the graphical instance modules of board terminals with logical relationships; The graphical instance modules of the board terminals are classified according to their attributes, and the input and output terminals of the graphical instance modules of the board terminals are determined, wherein there is at least one input terminal and one output terminal. Identify other graphical instance modules between the input and output terminals, and draw one or more secondary loop paths between the input and output terminals based on the connection relationships and relative position coordinates of the power system secondary loop model file sample.
[0008] In one possible implementation, the step of identifying other graphical instance modules between the input and output terminals, and drawing one or more secondary loop paths between the input and output terminals based on the connection relationships and relative position coordinates of the power system secondary loop model file sample, includes: Identify other graphical instance modules between the input terminal and the output terminal, and draw one or more paths to be adjusted between the input terminal and the output terminal based on the connection relationship of the power system secondary circuit model file sample; Obtain the position coordinates of the physical objects in the power system secondary circuit model file, and determine the relative position coordinates of the graphical instance module; Calculate the spacing and layout parameters between the connected graphical instance modules in one or more paths to be adjusted based on the relative position coordinates; Adjust one or more paths to be adjusted according to the spacing and the layout parameters to obtain one or more secondary loop paths between the input end and the output end.
[0009] In one possible implementation, the step of comparing the one or more secondary loop paths with the drawing information, optimizing the one or more secondary loop paths according to the comparison results and preset optimization path rules, and training an optimal path drawing algorithm includes: The one or more secondary loop paths are compared with the drawing information, and the one or more secondary loop paths are optimized according to the comparison results and preset optimization path rules, and the optimized one or more secondary loop paths are taken as the optimal paths. Obtain the graphical instance modules of the optimal path, as well as the connection relationships and relative position coordinates of the graphical instance modules, and store the graphical instance modules of the optimal path, as well as the connection relationships and relative position coordinates of the graphical instance modules; train the optimal path drawing algorithm.
[0010] In one possible implementation, the step of matching a preset graphical training set with the power system secondary circuit model file sample to obtain at least three graphical instance modules includes: Traverse the power system secondary circuit model file sample and obtain the first graphic feature and first text feature of the physical object of the power system secondary circuit model file sample; The first graphic feature is matched with the second graphic feature in the preset graphic training set, and the second text feature corresponding to the second graphic feature is used to generate an instantiated text feature based on the first text feature. Based on the matched graphic features and the instantiated text features, at least three graphical instance modules are generated.
[0011] In one possible implementation, the process of constructing the preset image and text training set includes the following steps: Standard drawing information of typical power system secondary circuit drawings is collected to obtain a graphic training module, wherein the standard drawing information is composed of different physical objects; Obtain the image and text training modules corresponding to the different physical objects to obtain the preset image and text training set.
[0012] In one possible implementation, the method further includes: Obtain the secondary circuit model file of the power system to be drawn; The power system secondary circuit model file to be drawn is parsed, and the graphic and textual features of the power system secondary circuit model file to be drawn are obtained based on the parsed power system secondary circuit model file. The graphic and textual features of the power system secondary circuit model file to be drawn are matched with the graphic and textual features in the preset graphic and text library to obtain the corresponding graphical instance module. Based on the optimal path drawing algorithm and the corresponding graphical instance module, the path of the secondary circuit of the power system is drawn.
[0013] Secondly, embodiments of the present invention provide an automatic drawing device for secondary circuits of a power system, comprising: The identification module is used to identify engineering drawing samples of secondary circuits in power systems and obtain drawing information; A module is established to create a sample secondary circuit model file of the power system based on the drawing information. The matching module is used to match the preset graphic training set with the power system secondary circuit model file sample to obtain at least three graphical instance modules; The drawing module is used to draw one or more power system paths based on the connection relationship between the at least three graphical instance modules and the power system secondary circuit model file sample. The comparison module is used to compare one or more power system paths with the drawing information, optimize one or more secondary circuit paths according to the comparison results and preset optimization path rules, and obtain the optimal path drawing algorithm as the optimal path. The optimal path drawing algorithm is used to draw the path of the power system secondary circuit.
[0014] Thirdly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the method as described in the first aspect or any possible implementation of the first aspect.
[0015] Fourthly, embodiments of the present invention provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method as described in the first aspect or any possible implementation thereof.
[0016] This invention provides an automatic drawing method, apparatus, and electronic device for secondary circuits of a power system. The method involves identifying engineering drawings of the power system's secondary circuits to obtain drawing information; establishing a power system secondary circuit model file based on the drawing information; matching a preset graphic training set with the power system secondary circuit model file to obtain at least three graphical instance modules; and drawing one or more power system paths based on the connection relationships between the at least three graphical instance modules and the power system secondary circuit model file. The method then compares these one or more power system paths with the drawing information, selecting the one or more paths corresponding to the drawing information as the optimal paths, thus obtaining an optimal path drawing algorithm. This optimal path drawing algorithm is used to draw the paths of the power system secondary circuits. This invention utilizes the method of converting drawing information into a power system secondary circuit model file and uses a trained path drawing algorithm to automatically generate training data for machine learning, significantly reducing the initial data preparation and labor costs. Converting existing drawings into digital power system secondary circuit model files through artificial intelligence technology greatly reduces the need for highly skilled drafting personnel and lowers labor costs. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart illustrating the implementation of the automatic drawing method for secondary circuits of a power system provided in this embodiment of the invention. Figure 2 This is a schematic diagram of the structure of a power system secondary circuit model file provided in an embodiment of the present invention; Figure 3 This is a partial schematic diagram of the graphic training set in an automatic drawing method for secondary circuits of a power system provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of a general scenario for an automatic drawing method for secondary circuits in a power system provided by an embodiment of the present invention; Figure 5 This is a schematic diagram of a complex scenario illustrating an automatic drawing method for secondary circuits in a power system provided in an embodiment of the present invention. Figure 6 This is a flowchart illustrating another method for automatically drawing secondary circuits in a power system, as provided in an embodiment of the present invention. Figure 7 This is a system architecture diagram of an automatic drawing method for secondary circuits in a power system provided by an embodiment of the present invention; Figure 8 This is a schematic diagram of the automatic drawing device for secondary circuits of a power system provided in an embodiment of the present invention; Figure 9 This is a schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0019] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.
[0020] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.
[0021] Figure 1 This is a flowchart illustrating the implementation of the automatic drawing method for secondary circuits of a power system provided in this embodiment of the invention. (Refer to...) Figure 1 The details are as follows: In step 101, the engineering drawing sample of the secondary circuit of the power system is identified to obtain the drawing information.
[0022] In this embodiment, the engineering drawing sample is a typical engineering drawing of a power system secondary circuit. The typical engineering drawing is imported, and its drawing information is obtained. This information includes the graphic shape, text content, graphic position coordinates, text content position coordinates, and connection relationship information.
[0023] In step 102, a sample model file of the secondary circuit of the power system is created based on the drawing information.
[0024] In this embodiment, the power system secondary circuit model file is a description file based on XML format and using SDL language to describe the physical information of the power system secondary circuit. The hierarchical architecture of the power system secondary circuit model file includes Device, Board, Port, EComponent, Connection, and EComponentConnection elements, etc.
[0025] In this embodiment, the drawing information is identified and stored in the corresponding element of the power system secondary circuit model file sample to obtain the power system secondary circuit model file.
[0026] The Device element stores information about the device object to which the currently identified power system secondary schematic belongs; the Board element stores information about the board of the device object to which the currently identified power system secondary schematic belongs; the Port element stores information about the board terminals of the device object to which the currently identified power system secondary schematic belongs, and the match attribute of the Port element can store the terminal number information of the paired board. When there are multiple paired board terminal numbers, they are separated by commas, "; the EComponent element stores information about the electronic components within the board of the device object to which the currently identified power system secondary schematic belongs; the Connection element stores information about the connection points of the electronic components within the board of the device object to which the currently identified power system secondary schematic belongs; the EComponentConnection element stores the connection relationships within the board of the device object to which the currently identified power system secondary schematic belongs, and the eComponentA, connectionA, eComponentB, and connectionB attributes in the EComponentConnection element represent the connection relationship between terminal A or connection point A and terminal B or connection point B.
[0027] In step 103, the preset graphic training set is matched with the power system secondary circuit model file sample to obtain at least three graphical instance modules.
[0028] In this embodiment, all physical objects in the power system secondary circuit model file sample are found to have corresponding graphic training features in a preset graphic training set. All physical objects are matched one-to-one with their corresponding graphic features to generate corresponding graphical instance modules, thereby instantiating the physical objects in the power system secondary circuit model file and facilitating the visualization of the physical objects in the model file.
[0029] Specifically, the graphical example modules include, but are not limited to: graphical example modules for board terminals, normally open relay nodes, normally closed relay nodes, voltage coils of relays, current coils of relays, resistors, and diodes.
[0030] In this embodiment, the graphical training set, after matching with the power system secondary circuit model file samples, must include at least three graphical instance modules. These three graphical instance modules include a graphical instance module for the input board terminals, a graphical instance module for the output board terminals, and another graphical instance module between the input and output.
[0031] In some embodiments, step 103 includes: Traverse the power system secondary circuit model file samples and obtain the first graphic features and first text features of the physical objects in the power system secondary circuit model file samples.
[0032] The first graphic feature is matched with the second graphic feature in the preset graphic and text training set, and the second text feature corresponding to the second graphic feature is used to generate an instantiated text feature based on the first text feature.
[0033] Based on the matched graphic features and the instantiated text features, at least three graphical instance modules are generated.
[0034] In this embodiment, as Figure 2 The above, Figure 2 This is a structural diagram of a power system secondary circuit model file provided in an embodiment of the present invention. The power system secondary circuit model file sample describes different physical objects through different elements, which are divided into Device elements, Board elements, Port elements, EComponent elements, and Connection elements. Among them, the EComponent elements are classified by type into normally open relay nodes, normally closed relay nodes, relay voltage coil elements, relay current coil elements, resistor elements, diode elements, etc.
[0035] The graphic training set is also categorized using different elements, including: board terminal graphic training features (corresponding to the Device, Board, and Port elements in the power system model file); normally open relay node graphic training features (corresponding to the normally open relay node type of the EComponent element in the power system model file); normally closed relay node graphic training features (corresponding to the normally closed relay node type of the EComponent element in the power system model file); relay voltage coil graphic training features (corresponding to the relay voltage coil type of the EComponent element in the power system model file); relay current coil graphic training features (corresponding to the relay voltage coil type of the EComponent element in the power system model file); resistor graphic training features (corresponding to the relay voltage coil type of the EComponent element in the power system model file); and diode graphic training features (corresponding to the diode type of the EComponent element in the power system model file). It should be understood that the above examples are for illustrative purposes only and do not constitute specific limitations. Matching between the power system model file samples and the preset graphic training library is achieved based on the above correspondences.
[0036] In some embodiments, the process of constructing a preset image and text training set includes the following steps: Standard drawing information of typical power system secondary circuit drawings is collected to obtain a graphic training module, in which the standard drawing information is composed of different physical objects.
[0037] Obtain the image and text training modules corresponding to different physical objects to obtain the preset image and text training set.
[0038] In this embodiment, the construction process of the image and text training library includes three parts: data collection, data processing, and data crawling.
[0039] Data Collection: Collect different physical objects contained in the secondary circuit engineering drawings of typical power systems. Each physical object consists of graphic features, text features, and the positional features of the text relative to the drawing, forming a graphic-text training module. After each physical object is collected, multiple graphic-text training modules are generated. The graphic-text training modules may differ from each other in graphic features, text features, or the positional features of the text relative to the drawing.
[0040] Data processing: Based on the collected data, organize the image and text training modules corresponding to all physical objects, taking into account their differences, and create multiple different image and text training sets that can correspond to each physical object. That is, the image and text training set is a collection of multiple image and text training modules.
[0041] Data Acquisition: When the number of graphic training modules in the graphic training set is insufficient, the graphic training set is expanded by adding typical power system secondary circuit engineering drawing samples.
[0042] Specifically, such as Figure 3 As shown, Figure 3 This is a partial schematic diagram of the graphic training set in an automatic drawing method for secondary circuits of a power system provided in an embodiment of the present invention. Typical graphic training features are obtained based on engineering diagrams of typical power system secondary circuits, and a large number of typical graphic training features are obtained by acquiring a large amount of sample data, thereby improving the matching accuracy and providing a module for the automatic visualization of model files.
[0043] In step 104, one or more secondary circuit paths are drawn based on the connection relationships between at least three graphical instance modules and the power system secondary circuit model file sample.
[0044] In this embodiment, the relative positional relationship of the graphical instance modules and the connection relationship between each graphical instance module are determined based on the connection relationship and relative position of the physical objects in the power system secondary circuit model file sample, and the secondary circuit path is drawn based on the connection relationship and relative positional relationship.
[0045] In some embodiments, step 104 includes: Based on the pairing attributes of the board terminals in the power system model file sample, determine the graphical instance modules of board terminals with logical relationships.
[0046] Classify the graphical instance modules of the board terminal according to their attributes, and determine the input and output terminals of the graphical instance modules of the board terminal, wherein there is at least one input terminal and one output terminal.
[0047] Identify other graphical instance modules between the input and output terminals, and draw one or more secondary loop paths between the input and output terminals based on the connection relationships and relative position coordinates of the power system secondary loop model file sample.
[0048] In this embodiment, the Port element in the power system secondary circuit model file is used to store the board terminal information of the equipment object to which the currently identified power system secondary schematic diagram belongs. The Port element consists of multiple attributes, one of which is matchTer, indicating a paired terminal. The attribute value of the paired terminal can be filled with other board terminals that have a logical input and output correspondence with the current board terminal. For example, if three board terminals are identified in the power system secondary circuit model file, including board terminal A, board terminal B, and board terminal C, and board terminal B and board terminal C are filled in the matchTer paired terminal attribute of board terminal A, it means that when board terminal A is the input terminal, the output terminal is board terminal B, and the output endpoint can also be board terminal C. It should be understood that the above examples are for illustration only and do not constitute a specific limitation.
[0049] In this embodiment, the graphical instance module of the board terminal has at least one board terminal as an input terminal and one board terminal as an output terminal. After determining the input terminal and the output terminal, other graphical instance modules between the input terminal and the output terminal are identified. Based on the relative positional relationship of the power system secondary circuit model file, the path of the secondary circuit is connected. This realizes the automatic connection of the graphical instance modules with the information of the power system secondary circuit model file, and realizes the visualization of the power system secondary circuit model file.
[0050] In some embodiments, other graphical instance modules between the input and output terminals are identified, and one or more secondary loop paths between the input and output terminals are drawn based on the connection relationships and relative position coordinates of the power system secondary loop model file sample, including: Identify other graphical instance modules between the input and output terminals, and draw one or more paths to be adjusted between the input and output terminals based on the connection relationships in the power system secondary circuit model file sample.
[0051] Obtain the position coordinates of the physical objects in the power system secondary circuit model file, and determine the relative position coordinates of the graphical instance module.
[0052] Calculate the spacing and layout parameters between pairs of connected graphical instance modules in one or more paths to be adjusted based on their relative position coordinates.
[0053] Adjust one or more paths to be adjusted according to the spacing and layout parameters to obtain one or more secondary loop paths between the input end and the output end.
[0054] In this embodiment, graphical instance modules between the identified input and output terminals are determined. Based on the connection relationships of physical objects in the power system model file, graphical instance modules with connection relationships are connected. Further, the relative position coordinates of each physical object are identified, and the relative position coordinates of the corresponding graphical instance modules are determined based on these coordinates. The corresponding graphical instance modules are then adjusted according to the identification results, achieving automatic adjustment of graphical instance modules based on typical power system secondary circuit model file samples. In this embodiment, the position coordinate information of all graphical instance modules is obtained from the model file, eliminating the need for complex algorithms to determine the placement of each graphical instance module, significantly reducing the workload of the algorithm.
[0055] In step 105, one or more secondary circuit paths are compared with the drawing information. Based on the comparison results and the preset optimization path rules, one or more secondary circuit paths are optimized and used as the optimal path. The optimal path drawing algorithm is trained and obtained. The optimal path drawing algorithm is used to draw the path of the secondary circuit of the power system.
[0056] In this embodiment, the preset optimization path rules include four path drawing principles: first, ensuring that connecting lines do not intersect; second, ensuring that connecting lines do not have diagonal lines, i.e., drawing them horizontally and vertically; third, ensuring that the length of connecting lines is minimized while satisfying the conditions of no intersecting connecting lines and horizontal and vertical drawing; and fourth, ensuring that the number of intersection points is minimized when there are multiple connection points on a path drawn between two graphical instance modules. The secondary loop path is optimized according to the above optimization path rules, satisfying the actual application scenario of secondary loops.
[0057] For example, such as Figure 4 and Figure 5 As shown, Figure 4 and Figure 5 These are all secondary circuit path diagrams drawn based on typical power system secondary circuit model files. Figure 4 This is a schematic diagram of a general scenario for an automatic drawing method for secondary circuits in a power system provided by an embodiment of the present invention; Figure 5 This is a schematic diagram of a complex scenario illustrating an automatic drawing method for secondary circuits in a power system provided by an embodiment of the present invention. (Reference) Figure 4 , Figure 4 This is a secondary circuit of a power system with only one input and one output. Starting from "Input 10", "Input 10" is placed as the origin. The position of "Output 11" is determined using its coordinate information, along with the positions of all graphical instance modules traversed between "Input 10" and "Output 11". Iteration and matching with four path drawing principles are performed starting from "Input 10". If a graphical instance module drawn at "Input 11" and the next one does not conform to the set four path drawing principles, it is discarded until one or more paths conform to the principles. Drawing continues from the next graphical training feature until the end point "Output 11" is reached. Combining all found path drawings, and ensuring that the connecting lines do not intersect, these paths are connected in the connection order to form a complete path graph. The automatically drawn path graph is compared with the originally identified power system secondary circuit diagram. Based on the comparison results, the layout of the diagram is optimized, and the optimal path drawing algorithm is improved. (Reference) Figure 5 , Figure 5 It includes two sets of input and output terminals. Input terminals 1 and 2 and output terminals 1 and 2 have 4 possible combinations. Other graphical instance modules that determine the logical relationship between the two sets of input and output terminals are used to determine the connection between each combination according to the above steps to form a complete path graph.
[0058] In some embodiments, one or more secondary loop paths are compared with drawing information, and one or more secondary loop paths are optimized based on the comparison results and preset optimization path rules and selected as the optimal path. An optimal path drawing algorithm is then trained, including: One or more secondary loop paths are compared with the drawing information, and one or more secondary loop paths are optimized according to the comparison results and the preset optimization path rules. The optimized one or more secondary loop paths are then taken as the optimal paths.
[0059] Obtain the graphical instance modules of the optimal path, as well as the connection relationships and relative position coordinates of the graphical instance modules, and store them; train the optimal path drawing algorithm.
[0060] In this embodiment, the graphical instance module of the optimized path, along with the connection relationships and relative position coordinates of the graphical instance module, are stored in a database. The stored optimal path information constitutes the optimal path drawing algorithm. This provides a model library for subsequent automatic drawing of secondary loop paths from model files.
[0061] In summary, this invention identifies engineering drawings of power system secondary circuits to obtain drawing information; establishes a power system secondary circuit model file based on the drawing information; matches a preset graphic training set with the power system secondary circuit model file to obtain at least three graphical instance modules; and draws one or more power system paths based on the connection relationships between the at least three graphical instance modules and the power system secondary circuit model file. The one or more power system paths are compared with the drawing information, and the one or more power system paths corresponding to the drawing information are selected as the optimal paths, resulting in an optimal path drawing algorithm. This optimal path drawing algorithm is used to draw the paths of the power system secondary circuits. This invention utilizes the method of converting drawing information into power system secondary circuit model files and uses a trained path drawing algorithm to automatically generate training data for machine learning, greatly reducing the initial data preparation and labor costs. Converting existing drawings into digital power system secondary circuit model files through artificial intelligence technology significantly reduces the need for highly skilled drafting personnel and reduces labor costs.
[0062] In some embodiments, a large number of typical power system secondary schematic diagrams are imported to increase sample diversity, improve accuracy, and construct an optimal path drawing algorithm for the optimal drawing path.
[0063] In some embodiments, the automatic drawing method for secondary circuits of a power system further includes: Obtain the secondary circuit model file of the power system to be drawn.
[0064] The process involves parsing the secondary circuit model file of the power system to be drawn, and obtaining its graphical and textual features based on the parsed file.
[0065] The graphic and textual features of the power system secondary circuit model file to be drawn are matched with the graphic and textual features in the preset graphic and text library to obtain the corresponding graphical instance module.
[0066] Based on the optimal path drawing algorithm and the corresponding graphical instance module, the path of the secondary circuit of the power system is drawn.
[0067] In this embodiment, a power system secondary circuit model file is imported; the model file is parsed to obtain graphic features, text features, connection relationships, and location coordinates; the power system secondary circuit model file is matched with a graphic library, and the power system secondary circuit is automatically drawn using a pre-trained optimal path drawing algorithm. This improves the accuracy, standardization, and reliability of the automatic drawing of power system secondary circuits, ensuring its normal application.
[0068] The following implementation example illustrates the above-mentioned method for automatically drawing secondary circuits in a power system. (Refer to...) Figure 6 , Figure 6 This is a flowchart illustrating the implementation of another automatic drawing method for secondary circuits in a power system provided by an embodiment of the present invention.
[0069] S601. Identify the secondary circuit engineering drawings of the power system and obtain the drawing information; S602. Create a sample secondary circuit model file of the power system using the drawing information obtained in S601; S603. Construct a graphic and text training set containing graphic features and text features using the dataset; S604. Use the image and text training set in S603 to match the image and text features of the model file in S602. S605: Train the secondary loop drawing path based on the connection relationships and position coordinates in the model file, and construct the optimal path drawing algorithm; S606: Repeat steps S601 to S605 above to improve the optimal path drawing algorithm; S607: Automatically draws the secondary circuit of the power system based on the improved optimal path drawing algorithm in S606.
[0070] Specifically, such as Figure 7 As shown, Figure 7 This is a system architecture diagram of an automatic drawing method for secondary circuits of a power system provided by an embodiment of the present invention. The user inputs a CAD sample drawing of the engineering drawing into the system, obtains information from the CAD sample drawing, and acquires graphic and textual features. Based on the graphic and textual features of the drawing, a corresponding power system secondary circuit model file is established. The connection relationships and position coordinates of the graphic features in the power system secondary circuit model file are identified and used to train the optimal path drawing algorithm, providing sample data for the optimal path drawing algorithm and improving its accuracy.
[0071] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0072] The following are device embodiments of the present invention. For details not described in detail, please refer to the corresponding method embodiments described above.
[0073] Figure 8 A schematic diagram of the automatic drawing device for secondary circuits of a power system provided in an embodiment of the present invention is shown. For ease of explanation, only the parts related to the embodiment of the present invention are shown, and are described in detail below: like Figure 8As shown, the automatic drawing device 80 for secondary circuits of a power system includes: an identification module 81, an establishment module 82, a matching module 83, a drawing module 84, and a comparison module 85.
[0074] The identification module 81 is used to identify engineering drawing samples of the secondary circuit of the power system and obtain drawing information; Module 82 is used to create a sample model file of the secondary circuit of the power system based on the drawing information. Matching module 83 is used to match the preset graphic training set with the power system secondary circuit model file sample to obtain at least three graphical instance modules; The drawing module 84 is used to draw one or more power system paths based on the connection relationship between at least three graphical instance modules and the power system secondary circuit model file sample. The comparison module 85 is used to compare one or more power system paths with the drawing information, optimize one or more secondary circuit paths according to the comparison results and preset optimization path rules, and obtain the optimal path drawing algorithm, wherein the optimal path drawing algorithm is used to draw the path of the power system secondary circuit.
[0075] Optionally, the drawing module 84 is used to determine the graphical instance module of board terminals with logical relationships based on the pairing attributes of board terminals in the power system model file sample. Classify the graphical instance modules of the board terminal according to their attributes, and determine the input and output terminals of the graphical instance modules of the board terminal, wherein there is at least one input terminal and one output terminal. Identify other graphical instance modules between the input and output terminals, and draw one or more secondary loop paths based on the connection relationships and relative position coordinates of the power system secondary loop model file sample.
[0076] Optionally, the drawing module 84 is used to identify other graphical instance modules between the input and output terminals, and to draw a first path based on the connection relationship of the power system secondary loop model file sample, wherein the first path includes one or more power system secondary loop paths. Obtain the position coordinates of the physical objects in the power system secondary circuit model file, and determine the relative position coordinates of the graphical instance module; Calculate the spacing and layout parameters between pairs of connected graphical instance modules in the first path based on their relative position coordinates; The first path is adjusted based on the spacing and layout parameters, and the second path is obtained based on the adjusted first path, wherein the second path is one or more power system paths.
[0077] Optionally, the comparison module 85 is used to compare one or more secondary loop paths with the drawing information, optimize one or more secondary loop paths according to the comparison results and preset optimization path rules, and take the optimized one or more secondary loop paths as the optimal paths. Obtain the graphical instance modules of the optimal path, as well as the connection relationships and relative position coordinates of the graphical instance modules, and store them; train the optimal path drawing algorithm.
[0078] Optionally, the matching module 83 is used to traverse the power system secondary circuit model file sample and obtain the first graphic features and first text features of the physical objects of the power system secondary circuit model file sample; The first graphic feature is matched with the second graphic feature in the preset graphic and text training set, and the second text feature corresponding to the second graphic feature is used to generate an instantiated text feature based on the first text feature. Based on the matched graphic features and the instantiated text features, at least three graphical instance modules are generated.
[0079] Optionally, the matching module 83 is used to collect standard drawing information of typical power system secondary circuit drawings to obtain a graphic training module, wherein the standard drawing information consists of different physical objects; Obtain the image and text training modules corresponding to different physical objects to obtain the preset image and text training set.
[0080] Optionally, the comparison module 85 is also used to obtain the power system secondary circuit model file to be drawn; The process involves parsing the secondary circuit model file of the power system to be drawn, and obtaining the graphic and textual features of the secondary circuit model file based on the parsed data. The graphic and textual features of the power system secondary circuit model file to be drawn are matched with the graphic and textual features in the preset graphic and text library to obtain the corresponding graphical instance module. Based on the optimal path drawing algorithm and the corresponding graphical instance module, the path of the secondary circuit of the power system is drawn.
[0081] Figure 9 This is a schematic diagram of an electronic device provided according to an embodiment of the present invention. For example... Figure 9 As shown, the electronic device 9 in this embodiment includes a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90. When the processor 90 executes the computer program 92, it implements the steps in the above-described embodiments of the automatic drawing method for secondary circuits of various power systems.
[0082] The computer program 92 can be divided into one or more modules / units, which are stored in the memory 91 and executed by the processor 90 to complete the present invention. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 92 in the electronic device 9.
[0083] The electronic device 9 can be a desktop computer, laptop, handheld computer, cloud server, or other computing device. The electronic device may include, but is not limited to, a processor 90 and a memory 91. Those skilled in the art will understand that... Figure 9 This is merely an example of electronic device 9 and does not constitute a limitation on electronic device 9. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0084] The processor 90 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0085] The memory 91 can be an internal storage unit of the electronic device 9, such as a hard disk or memory. The memory 91 can also be an external storage device of the electronic device 9, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 9. Furthermore, the memory 91 can include both internal and external storage units of the electronic device 9. The memory 91 is used to store the computer program and other programs and data required by the electronic device. The memory 91 can also be used to temporarily store data that has been output or will be output.
[0086] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0087] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0088] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0089] In the embodiments provided by this invention, it should be understood that the disclosed devices / electronic devices and methods can be implemented in other ways. For example, the device / electronic device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0090] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0091] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0092] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0093] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. An automatic drawing method for secondary circuits in a power system, characterized in that, include: Identify engineering drawing samples of secondary circuits in a power system to obtain drawing information; A sample power system secondary circuit model file is created based on the drawing information. The preset graphic training set is matched with the sample secondary circuit model file of the power system to obtain at least three graphical instance modules; Based on the connection relationship between the at least three graphical instance modules and the power system secondary circuit model file sample, draw one or more secondary circuit paths; The one or more secondary circuit paths are compared with the drawing information. Based on the comparison results and the preset optimization path rules, the one or more secondary circuit paths are optimized and used as the optimal path. The optimal path drawing algorithm is trained to obtain the optimal path drawing algorithm, wherein the optimal path drawing algorithm is used to draw the path of the secondary circuit of the power system. The step of drawing one or more secondary loop paths based on the connection relationships between the at least three graphical instance modules and the power system secondary loop model file sample includes: Based on the pairing attributes of the board terminals in the power system model file sample, determine the graphical instance modules of board terminals with logical relationships; The graphical instance modules of the board terminals are classified according to their attributes, and the input and output terminals of the graphical instance modules of the board terminals are determined, wherein there is at least one input terminal and one output terminal. Identify other graphical instance modules between the input terminal and the output terminal, and draw one or more secondary loop paths between the input terminal and the output terminal based on the connection relationship and relative position coordinates of the power system secondary loop model file sample; The module that identifies other graphical instances between the input and output terminals, and draws one or more secondary loop paths between the input and output terminals based on the connection relationships and relative position coordinates of the power system secondary loop model file sample, includes: Identify other graphical instance modules between the input terminal and the output terminal, and draw one or more paths to be adjusted between the input terminal and the output terminal based on the connection relationship of the power system secondary circuit model file sample; Obtain the position coordinates of the physical objects in the power system secondary circuit model file, and determine the relative position coordinates of the graphical instance module; Calculate the spacing and layout parameters between the connected graphical instance modules in one or more paths to be adjusted based on the relative position coordinates; Adjust one or more paths to be adjusted according to the spacing and the layout parameters to obtain one or more secondary loop paths between the input end and the output end.
2. The method according to claim 1, characterized in that, The step of comparing the one or more secondary loop paths with the drawing information, optimizing the one or more secondary loop paths according to the comparison results and preset optimization path rules, and training an optimal path drawing algorithm includes: The one or more secondary loop paths are compared with the drawing information, and the one or more secondary loop paths are optimized according to the comparison results and preset optimization path rules, and the optimized one or more secondary loop paths are taken as the optimal paths. Obtain the graphical instance modules of the optimal path, as well as the connection relationships and relative position coordinates of the graphical instance modules, and store the graphical instance modules of the optimal path, as well as the connection relationships and relative position coordinates of the graphical instance modules; train the optimal path drawing algorithm.
3. The method according to claim 1, characterized in that, The process involves matching a pre-defined graphical training set with samples of the power system secondary circuit model file to obtain at least three graphical instance modules, including: Traverse the power system secondary circuit model file sample and obtain the first graphic feature and first text feature of the physical object of the power system secondary circuit model file sample; The first graphic feature is matched with the second graphic feature in the preset graphic training set, and the second text feature corresponding to the second graphic feature is used to generate an instantiated text feature based on the first text feature. Based on the matched graphic features and the instantiated text features, at least three graphical instance modules are generated.
4. The method according to claim 3, characterized in that, The process of constructing the preset image and text training set includes the following steps: Standard drawing information of typical power system secondary circuit drawings is collected to obtain a graphic training module, wherein the standard drawing information is composed of different physical objects; Obtain the image and text training modules corresponding to the different physical objects to obtain the preset image and text training set.
5. The method according to claim 1, characterized in that, The method further includes: Obtain the secondary circuit model file of the power system to be drawn; The power system secondary circuit model file to be drawn is parsed, and the graphic and textual features of the power system secondary circuit model file to be drawn are obtained based on the parsed power system secondary circuit model file; The graphic and textual features of the power system secondary circuit model file to be drawn are matched with the graphic and textual features in the preset graphic and text library to obtain the corresponding graphical instance module. Based on the optimal path drawing algorithm and the corresponding graphical instance module, the path of the secondary circuit of the power system is drawn.
6. An automatic drawing device for secondary circuits of a power system, characterized in that, include: The identification module is used to identify engineering drawing samples of secondary circuits in power systems and obtain drawing information; A module is established to create a sample secondary circuit model file of the power system based on the drawing information. The matching module is used to match the preset graphic training set with the power system secondary circuit model file sample to obtain at least three graphical instance modules; The drawing module is used to draw one or more power system paths based on the connection relationship between the at least three graphical instance modules and the power system secondary circuit model file sample. The comparison module is used to compare one or more power system paths with the drawing information, optimize one or more secondary loop paths according to the comparison results and preset optimization path rules, and obtain the optimal path drawing algorithm as the optimal path. The optimal path drawing algorithm is used to draw the path of the power system secondary loop. The step of drawing one or more secondary loop paths based on the connection relationships between the at least three graphical instance modules and the power system secondary loop model file sample includes: Based on the pairing attributes of the board terminals in the power system model file sample, determine the graphical instance modules of board terminals with logical relationships; The graphical instance modules of the board terminals are classified according to their attributes, and the input and output terminals of the graphical instance modules of the board terminals are determined, wherein there is at least one input terminal and one output terminal. Identify other graphical instance modules between the input terminal and the output terminal, and draw one or more secondary loop paths between the input terminal and the output terminal based on the connection relationship and relative position coordinates of the power system secondary loop model file sample; The module that identifies other graphical instances between the input and output terminals, and draws one or more secondary loop paths between the input and output terminals based on the connection relationships and relative position coordinates of the power system secondary loop model file sample, includes: Identify other graphical instance modules between the input terminal and the output terminal, and draw one or more paths to be adjusted between the input terminal and the output terminal based on the connection relationship of the power system secondary circuit model file sample; Obtain the position coordinates of the physical objects in the power system secondary circuit model file, and determine the relative position coordinates of the graphical instance module; Calculate the spacing and layout parameters between the connected graphical instance modules in one or more paths to be adjusted based on the relative position coordinates; Adjust one or more paths to be adjusted according to the spacing and the layout parameters to obtain one or more secondary loop paths between the input end and the output end.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the automatic drawing method for the secondary circuit of the power system as described in any one of claims 1 to 5.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the automatic drawing method for the secondary circuit of the power system as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Substation secondary circuit design method based on equipment function area and template matching
CN116029069A
