Power supply wiring diagram drawing method, device, equipment, medium and program product

By identifying the outer frame and port of the power supply components, combining deep learning and edge detection algorithms, the power supply wiring diagram is automatically drawn, which solves the problem of low efficiency and accuracy of power supply wiring diagram drawing in the existing technology, and achieves efficient and accurate power supply Wiring diagram drawing.

CN119205958APending Publication Date: 2024-12-27CHINA SOUTHERN POWER GRID COMPANY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411264051.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-10
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing power wiring diagram drawing technology is low in efficiency and accuracy, and cannot adapt to complex grid topology and diversified graphical data interaction.

Method used

By identifying the outer borders and categories of power components, determining their ports and connection relationships, using deep learning models and edge detection algorithms to automatically draw the power wiring diagram, and combining the components' correlation text and topological diagram rules to achieve efficient and accurate drawing.

Benefits of technology

It improves the efficiency and accuracy of power wiring diagram drawing, realizes automatic power wiring diagram drawing, adapting to complex power grid structures and diversified data interactions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205958A_ABST
    Figure CN119205958A_ABST
Patent Text Reader

Abstract

The invention provides a power supply wiring diagram drawing method and device, equipment, a medium and a program product. The method comprises the following steps: identifying to-be-processed data to determine a power supply component; the power supply component comprises an outer frame and a category; determining a port of the power supply component based on the intersection line of the outer frame; based on the ports of the power supply component and the intersection line, determining a connection relationship between the ports; and drawing a power supply wiring diagram based on the power supply components and the connection relationship. According to the method, the power supply components related to the power supply wiring diagram, the associated characters of the power supply components, the port connection relation and other elements are determined, so that high efficiency and high accuracy of power supply wiring diagram drawing are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of power wiring diagram drawing, and in particular to a power wiring diagram drawing method, device, equipment, medium and program product. Background Art

[0002] The power wiring diagram can clearly show the connection relationship between the components inside the electrical device, as well as the connection relationship between the devices. The power wiring diagram helps the staff to quickly and comprehensively understand the electrical structure of the system, guide the staff to accurately install and wire the devices and components, and help maintenance personnel accurately determine the cause of the power failure and quickly locate the power failure, and take corresponding maintenance measures. The current power wiring diagram is mainly completed by manual drawing, which is labor-intensive and has low drawing accuracy. With the increasing complexity and diversification of the power grid topology, as well as the differences in the interaction of graphic data between platforms, the existing manual drawing method can no longer accurately and quickly draw the power wiring diagram. Summary of the invention

[0003] The present invention provides a method, device, equipment, medium and program product for drawing a power wiring diagram, which are used to solve the defects of low drawing efficiency and accuracy in the existing power wiring diagram drawing technology, and improve the power wiring diagram drawing efficiency and accuracy.

[0004] The invention provides a method for drawing a power wiring diagram, comprising the following steps.

[0005] Identify the data to be processed and determine the power supply components; the power supply components include an outer frame and a category; Determining the port of the power component based on the intersection line of the outer frame; Determining a connection relationship between the ports based on the ports of the power supply component and the intersection line; Based on the power supply components and the connection relationship, a power supply wiring diagram is drawn.

[0006] According to a method for drawing a power wiring diagram provided by the present invention, the step of identifying and determining power components of the data to be processed includes: A component recognition model is obtained based on component category data training; Determining an inference service based on the component identification model; When the data to be processed directed to the inference service is received, the data to be processed is input into the component recognition model to obtain a power component including an outer frame and a category.

[0007] According to a method for drawing a power wiring diagram provided by the present invention, the data to be processed includes an image to be processed; and determining the port of the power component based on the intersection line of the outer frame includes: Performing edge detection on the image to be processed to obtain an edge image and a straight line mask; Extracting straight line features from input data; the input data includes the image to be processed, the edge image and the straight line mask; Performing straight line detection on the image to be processed based on the straight line features to determine the intersection lines of the outer frames; Determine the intersection point of the intersection line and the outer frame; the intersection point is the port of the power component.

[0008] According to a method for drawing a power wiring diagram provided by the present invention, the determining of the connection relationship between the ports based on the ports of the power components and the intersection lines comprises: Determine a connection relationship between the port and the intersection line based on the coordinates of the point on the intersection line and the coordinates of the port; Determine the intersection type of any two intersecting lines based on the coordinates of the ports connected by any two intersecting lines; Based on the connection relationship between the ports and the intersection lines and the intersection type of the arbitrary two intersection lines, the connection relationship between the ports is determined.

[0009] According to a method for drawing a power wiring diagram provided by the present invention, the method for drawing a power wiring diagram further includes: Identify the data to be processed to obtain a text detection frame; When any two text detection frames satisfy a merging rule, merging the any two text detection frames to obtain a target text frame; the merging rule is determined based on coordinate information of each of the text detection frames; Based on the distance between the outer frame and the target text box, the associated text of the power component is determined.

[0010] According to a method for drawing a power wiring diagram provided by the present invention, the components include elements and devices; and drawing a power wiring diagram based on the power components and the connection relationship includes: Determining the affiliation between the power supply component and the device based on the associated text and coordinate position of the power supply component; Constructing a power supply topology diagram based on the connection relationship and the affiliation relationship; A power wiring diagram is drawn based on the power topology diagram and the power diagram layout rules; the power diagram layout rules include component distance, port connection cross exclusion attribute and port connection inflection point.

[0011] The present invention also provides a power wiring diagram drawing device, comprising the following modules: A power component determination module, used to identify and determine the power component of the data to be processed; the power component includes an outer frame and a category; A component port determination module, used to determine the port of the power component based on the intersection line of the outer frame; A port connection relationship determination module, used to determine the connection relationship between the ports based on the ports of the power supply components and the intersection lines; A power wiring diagram drawing module is used to draw a power wiring diagram based on the power components and the connection relationship.

[0012] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned methods for drawing a power wiring diagram is implemented.

[0013] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the method for drawing a power wiring diagram as described in any one of the above is implemented.

[0014] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for drawing a power wiring diagram as described above is implemented.

[0015] The power wiring diagram drawing method, device, equipment, medium and program product provided by the present invention, by identifying the power components including the outer frame and category in the data, determining the port of the power component through the intersection line of the outer frame of the power component, and then determining the connection relationship between the ports through the intersection line of the port of the power component and the outer frame. Finally, based on the power components, associated text and connection relationship, the power wiring diagram is automatically drawn. By determining the power components related to the power wiring diagram, the associated text of the power components and the port connection relationship, etc., the power wiring diagram is drawn with high efficiency and high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0017] Figure 1 It is one of the flow diagrams of the method for drawing a power wiring diagram provided by the present invention.

[0018] Figure 2 This is the second flow chart of the method for drawing a power wiring diagram provided by the present invention.

[0019] Figure 3 It is a schematic diagram of power supply wiring in the power supply wiring diagram drawing method provided by the present invention.

[0020] Figure 4 The present invention is a schematic diagram of the structure of the power wiring diagram drawing device provided by the present invention.

[0021] Figure 5 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0023] Combine the following Figure 1-Figure 5 The invention describes a method, device, equipment, medium and program product for drawing a power wiring diagram.

[0024] Figure 1 It is one of the flow charts of the method for drawing a power wiring diagram provided by the present invention, such as Figure 1 As shown, the method includes the following: Step 100, identifying the data to be processed to determine the power supply components; the power supply components include an outer frame and a category; The data to be processed can be an image containing power supply information. The types of power supply components can be devices and components, where devices include AC input panels, high-frequency switching power supply panels, and DC output panels; components include switches, fuses, batteries, and various modules. Use Paddle Detection (a tool set for target detection tasks) to identify the types of devices and components, as well as the corresponding outer frames of components.

[0025] Step 200: determining the port of the power component based on the intersection line of the outer frame; The edge detection algorithm and deep learning model are combined to improve the accuracy of straight line detection in the image to be processed, and the edge image and straight line mask of the component are generated. By detecting the connection lines corresponding to the edge of the component, the straight lines that intersect with the outer boundary box of the component are found from multiple connection lines, and the intersection points of these straight lines and the outer boundary box are used as the ports of the component.

[0026] Step 300: determining a connection relationship between the ports based on the ports of the power supply component and the intersection line; The connection relationship between the port and the intersection line is determined by connecting the coordinates of the points on the intersection line and the coordinates of the component port. Then, the intersection type of any two intersection lines is determined by the coordinates of the ports connected by any two intersection lines. Finally, the connection relationship between the ports is determined by the connection relationship between the port and the intersection line and the intersection type of any two intersection lines.

[0027] Step 400: Draw a power wiring diagram based on the power components and the connection relationships.

[0028] Associate text with power components, store the structured information of the power wiring diagram, set the layout rules of the power wiring diagram, and combine the connection crossing penalty items to perform automatic layout, routing and drawing of the power wiring diagram.

[0029] This embodiment identifies the power components including the outer frame and category in the data, determines the ports of the power components through the intersection of the outer frame of the power components, and then determines the connection relationship between the ports through the intersection of the ports of the power components and the outer frame. Finally, based on the power components, associated texts and connection relationships, the power wiring diagram is automatically drawn. By determining the power components related to the power wiring diagram, the associated texts of the power components and the port connection relationship, etc., the power wiring diagram is drawn with high efficiency and accuracy.

[0030] In one embodiment, the method for drawing a power wiring diagram provided in the embodiment of the present application may further include: Step 110: obtaining a component recognition model based on component category data training; Step 120: determining an inference service based on the component identification model; Step 130: When receiving the data to be processed directed to the inference service, input the data to be processed into the component recognition model to obtain the power supply component including the outer frame and the category.

[0031] The specific process of identifying devices and components is as follows: Step 011: Provide training data for the model to guide model learning. The main contents include: making category files and adding category information; using Labelme tool (image data annotation tool) to annotate category images and generate annotation files; dividing training data sets and test data sets; generating data that conforms to the Paddle Detection training format.

[0032] Step 012: Modify the model configuration file, adjust the training hyperparameters, and specify the training data and validation data.

[0033] Step 013: Generate a training model using the training script. Use the model conversion tool to convert the model into an Open Neural Network Exchange (ONNX) runtime inference model file.

[0034] Step 014. Add configuration files to the preprocessing directory, detection, post-processing, and running directories, and specify the input and output names, types, and dimensions. Add inference files to the preprocessing directory, mainly including: thresholds, image width and height, mean, standard deviation, and label categories; in the running directory, add ONNX inference model files; create model files in the preprocessing and post-processing directories to generate inference requests and responses. In the running directory, modify the configuration file parameters according to the actual hardware environment. The configuration file parameters mainly include instance groups (for example, number of instances, CPU, and GPU) and execution accelerators (for example, inference engines and thread parameters).

[0035] Step 015: Create a Docker (application container engine) inference service image file, which contains the required environment dependencies and inference model. Set the shared memory operation parameters and map the network ports of the container and the host, and use the image to start the inference service container. Assign a service port in the service container, point to the inference model path, and start the inference service.

[0036] Step 016: Define service parameters such as IP and port; instantiate GPRC (a high-performance, open source and general RPC framework) inference runtime; pass in the image file; use OpenCV (a cross-platform computer vision and machine learning software library) to convert the file into multi-dimensional matrix data; call GPRC inference runtime and return the response, i.e., category and outer bounding box.

[0037] This embodiment provides support for determining the association between power components by identifying the types and outer frames of devices and components.

[0038] In one embodiment, the method for drawing a power wiring diagram provided in the embodiment of the present application may further include: Step 210: performing edge detection on the image to be processed to obtain an edge image and a straight line mask; Step 220, extracting straight line features from input data; the input data includes the image to be processed, the edge image and the straight line mask; Step 230: performing straight line detection on the image to be processed based on the straight line features to determine the intersection lines of the outer frames; Step 240: determine the intersection point of the intersection line and the outer frame; the intersection point is the port of the power component.

[0039] Specifically, the process of locating component ports is as follows: The traditional OpenCV edge detection algorithm and deep learning model (U-Net) are combined to improve the accuracy of straight line detection in the image to be processed.

[0040] Prepare a dataset containing straight-line power images, and use OpenCV edge detection methods to generate corresponding component edge images and line masks. Integrate the original image, edge image, and line mask into a data loader to ensure that the U-Net model can receive both image and edge information.

[0041] The cross entropy loss function and Adam optimizer are used to iteratively optimize the model parameters so that the U-Net model can accurately extract straight line features from the input data. After the U-Net model is trained, the model parameters are saved and converted to ONNX format, deployed to the inference tool, and the inference application programming interface (API) is provided.

[0042] The OpenCV edge detection process is as follows: image preprocessing is performed through Gaussian filtering function and threshold segmentation function to reduce noise interference; morphological dilation operation is performed to connect broken lines; morphological closing operation is performed to fill small holes; the edges in the image can be extracted using the Canny edge detection algorithm; and the straight line connecting lines corresponding to the edges are detected using Hough transform. For the outer bounding box of the above-mentioned detection target pixel block, find the straight lines that intersect with the outer bounding box of the component from multiple straight lines, and use the intersection points of these straight lines and the outer bounding box as the ports of the component, and record all the port information of each component.

[0043] This embodiment locates the ports of the power component by edge detection and straight line detection, and provides support for connection determination between the ports of the power component.

[0044] Figure 2 This is a second flow chart of the method for drawing a power wiring diagram provided by the present invention. Figure 2 As shown, the method may also include: Step 310: determining a connection relationship between the port and the intersection line based on the coordinates of the point on the intersection line and the coordinates of the port; Step 320: Determine the intersection type of any two intersecting lines based on the coordinates of the ports connected by the any two intersecting lines; Step 330: Determine the connection relationship between the ports based on the connection relationship between the ports and the intersection lines and the intersection type of the arbitrary two intersection lines.

[0045] The specific process of establishing the connection relationship between components is as follows: Step 031: Segment the original image to extract multiple line segments related to recognition. These line segments are target areas, and the target areas are separated from the background.

[0046] Step 032: Convert the segmented target area into single-channel grayscale image data.

[0047] Step 033: Apply the Flood Fill algorithm to the grayscale image. Select an initial seed point as the starting point, and mark all pixels connected to the seed point as the same connected area by flood filling.

[0048] Step 034: Extract all connected areas marked by the Flood Fill algorithm.

[0049] Select a port of a component as a seed point, extract the connected area of ​​the point, obtain the straight line segment where the seed point is located, and all the straight line segments that intersect with the straight line segment. According to the type of segment intersection (such as L-type, T-type, and X-type), determine the relationship between the connecting segments and determine other component ports with connection relationships. Similarly, find other component ports related to other ports of the component. Based on the above logic, further build the association relationship between all component ports. Parallel computing builds the relationship between different ports of a component, as well as the relationship between ports of different components, shortening the calculation time.

[0050] ; (1)

[0051] ; (2)

[0052] The algorithm for determining whether a component is on a line segment is shown in Formula 1, where: are the coordinates of port p; are the coordinates of the line segment point A; are the coordinates of the line segment point B.

[0053] Suppose there are two line segments and ,in, End point is A and B , End point is C and D , the line segment is represented by a parametric equation as shown in Formula 2.

[0054] ; (3)

[0055] ; (4)

[0056] Convert the above equation 2 into standard form and solve for t and s as shown in equations 3 and 4.

[0057] The judgment function for the cross-shaped line segment intersection type is shown in Formula 5; the judgment function for the T-shaped line segment intersection type is shown in Formula 6; and the judgment function for the L-shaped line segment intersection type is shown in Formula 7.

[0058] ; (5)

[0059] ; (6)

[0060] ; (7)

[0061] This embodiment extracts the connected area to obtain the connection relationship between components, thereby providing support for drawing a power wiring diagram.

[0062] In one embodiment, the method for drawing a power wiring diagram provided in the embodiment of the present application may further include: Step 500: Identify the data to be processed to obtain a text detection frame; Step 600: When any two text detection frames satisfy a merging rule, merge the two text detection frames to obtain a target text frame; the merging rule is determined based on coordinate information of each of the text detection frames; Step 700: Determine the associated text of the power component based on the distance between the outer frame and the target text box.

[0063] The specific process of associating text with devices and components is as follows: Step 041: Use Paddle OCR (an open source project related to optical character recognition) and inference deployment technology to identify the content and text detection boxes of device and component text labels. This includes modifying model configuration files, generating models, converting models, deploying inference models, providing inference services, and calling inference services.

[0064] Step 042: Merge multiple text detection boxes.

[0065] If two text boxes meet the merging rules, the text boxes in the same row or across rows are merged. The merging text box judgment rule is shown in Formula 8, where: It is The minimum value of the horizontal coordinate of the text box; It is The maximum value of the horizontal coordinate of the text boxes; It is The vertical coordinate of the center point of the text box; It is The vertical coordinate of the center point of the text box, w and h are two thresholds used for comparison.

[0066] ; (8)

[0067] Step 043: Identify the categories and outer frames of devices and components.

[0068] Step 044, calculating the distance between the outer borders of the device and the component and each text detection frame one by one, and selecting the first multiple text detection frames with the smallest distance as candidate text detection frames.

[0069] The distance between the device and component outer frame and the text detection frame is calculated as shown in Formula 9, where: and are the x- and y-coordinates of the device and component outer frames, respectively; and are the x-coordinate and y-coordinate of the text detection box respectively.

[0070] ; (9)

[0071] Step 045: Use the BERT model (a language representation model) and reasoning deployment technology in Paddle NLP (category intelligent text processing) to identify device and component named entities.

[0072] Step 046: From the multiple candidate text detection frames, select the text detection frame that matches the named entity of the device and component and has the smallest distance, and use the content in the frame as the text information of the device and component.

[0073] This embodiment provides support for drawing text descriptions of components in a power wiring diagram by associating text with components.

[0074] In one embodiment, the method for drawing a power wiring diagram provided in the embodiment of the present application may further include: Step 410: Determine the affiliation between the component and the device based on the associated text and coordinate position of the power component; Step 420: construct a power supply topology diagram based on the connection relationship and the affiliation relationship; Step 430: Draw a power wiring diagram based on the power topology diagram and power diagram layout rules; the power diagram layout rules include component distance, port connection cross exclusion attribute and port connection inflection point.

[0075] The specific process of storing the structured information of the power wiring diagram is as follows: Use the network framework to build and operate the complex graph structure of the power wiring diagram. First, construct an empty multigraph. Then, by identifying the coordinate position and category information of the text detection box corresponding to the components, and through the coordinate position of different objects, determine the affiliation between the components and the device. Add the node information of the network topology diagram, the node attribute is the device or component, the node category attribute is the above category information, the node name attribute is the associated text information, and the node position attribute is the coordinate of the center point of the object detection box. Finally, use the connection relationship between the components constructed above. These connection relationships are the edges of the topology diagram, and the distance attribute of each edge is randomly assigned to [1, canvas width]. Generate a local network topology diagram of the power wiring diagram as shown Figure 3 shown.

[0076] The specific process of automatic layout between components is as follows: In the power wiring diagram, each device has a rectangular footprint of fixed size and a relatively fixed port position. The devices need to maintain an appropriate distance. The distance between the devices cannot be too close to avoid overlap or wiring difficulties; the distance between the devices cannot be too far to ensure the compactness of the overall layout. The constraints for defining the layout of the power wiring diagram are as follows: the connection lines between the ports of the devices cannot appear inside other devices; there should be appropriate space between the devices to accommodate the connection lines, avoid overlapping and not too scattered; the ports between the devices with a connection relationship should be aligned horizontally or vertically as much as possible; avoid crossing the connection lines between the ports of the devices; the distance between the devices is proportional to the size of each space.

[0077] Uses physics-based layout algorithms by calculating spring forces between nodes and repulsion to simulate the movement of nodes. The repulsive force between nodes makes the nodes move away from each other to avoid overlapping. The attractive force between nodes makes the nodes move closer to each other, thus forming a compact and orderly power structure. This ensures that the connected components maintain an appropriate distance. and , the specific calculation is shown in formulas 10 and 11.

[0078] ; (10)

[0079] ; (11)

[0080] (12)

[0081] ; (13)

[0082] in, Is a node and The distance between Nodes with connection relationships are given higher weights, k is the original length of the spring, is the elastic coefficient, is a constant, and Node and Layout area.

[0083] In order to reduce the number of intersections between ports, a penalty term for line crossing is introduced to make the crossed edges repel each other. Additional cross repulsion is applied to the two line segments. , the specific calculation is shown in formula 12. Among them, is a constant, when When they intersect, =1, otherwise =0 . Calculate the three resultant forces at each node, as shown in Formula 13.

[0084] The new position of each node is calculated based on the node's combined force. The node continuously adjusts the moving distance during multiple iterations. ,when (threshold), the nodes are in a relatively stable state, the layout process is terminated, and the layout of the power wiring diagram is completed. According to the requirements of the power wiring diagram and the actual effect of manually drawing the wiring diagram, the relationship between the inherent size of each component and the type and quantity of the component is analyzed, and the influence of different device combination types on the overall layout style of the device is compared. The algorithm for generating the wiring diagram is called, and the relevant parameters of the algorithm are continuously adjusted to ensure that the generated power wiring diagram is close to the manually drawn power wiring diagram.

[0085] The specific process of executing automatic wiring drawing between components is as follows: After the layout between devices is completed, it is necessary to realize the wiring between devices, and use horizontal and vertical line segments to connect the component ports with associated relationships. When planning the wiring between devices, call the network topology diagram formed above to find a valid path between two component ports. The valid path must strictly follow the horizontal or vertical direction and must not cross the rectangular area of ​​any device. At the same time, in order to optimize the power wiring effect, try to make the path length as short as possible and the number of inflection points as few as possible to form an efficient and neat connection line between the two ports.

[0086] The interface canvas is converted to a grid map, and the coordinates of the devices and components are aligned with the grid. They are numbered one by one from top to bottom and from left to right. Based on the grid numbering, an undirected network topology is constructed according to the four-neighborhood (up, down, left, and right) relationship. The grid numbers corresponding to the rectangular areas of other devices relative to the pair of ports are the obstacle points. Using a multi-objective genetic algorithm, an optimal and effective path between ports is planned in the power network topology. Let a path edge be , any edge The two end nodes for and , the path corresponding weight is , avoiding several obstacles , the shortest path with the least inflection points, the mathematical description of the multi-objective optimization problem with constraints is as follows, including the objective function shown in Formula 14. The constraints are .

[0087] ; (14)

[0088] in, For the Path, For the The first path Edge. For the above defined function, determine The edge and Whether the edge intersection type is L-type. For the above defined function, determine The edge and Whether the edge intersection type is cross type.

[0089] In this genetic algorithm, a chromosome is encoded as a set representation of the three-digit decimal number (with 0 automatically added on the left) of the grid number corresponding to the two nodes on each edge of the path; in the selection operation, the genetic algorithm is used to select individuals in the population; in the mutation operation, several mutation points are randomly selected and one of its neighboring nodes is selected; in the crossover operation, the crossover point is randomly selected and then part of the chromosome is exchanged. Genetic operators such as selection, crossover and mutation are applied to the population to generate a new generation of population. The best fitness value of the individuals in the new generation of population is better than the best fitness value of the previous generations. The algorithm continues until the population iteration is terminated when the best fitness value has not been significantly improved. The NSGA2 algorithm (non-dominated sorting genetic algorithm 2) is used to coordinate the relationship between the various objective functions and find the optimal solution set that makes each objective function reach a relatively small function value as much as possible. According to the actual effect of manually drawing the wiring diagram, multiple parameters of the wiring algorithm are continuously adjusted to ensure the rationality of the device wiring strategy.

[0090] This embodiment uses the power diagram layout rules determined by component distance, port connection cross-exclusion attributes and port connection inflection points, and draws the power wiring diagram through the power topology diagram and the power diagram layout rules, thereby achieving high efficiency and high accuracy in drawing the power wiring diagram.

[0091] The power wiring diagram drawing device provided by the present invention is described below. The power wiring diagram drawing device described below and the power wiring diagram drawing method described above can be referred to each other.

[0092] Please refer to Figure 4 The present invention also provides a power wiring diagram drawing device, comprising: A power component determination module 401 is used to identify and determine the power component of the data to be processed; the power component includes an outer frame and a category; A component port determination module 402, configured to determine the port of the power component based on the intersection line of the outer frame; A port connection relationship determination module 403, configured to determine a connection relationship between the ports based on the ports of the power supply component and the intersection line; The power wiring diagram drawing module 404 is used to draw a power wiring diagram based on the power components and the connection relationship.

[0093] Optionally, the power component determination module includes: A component identification model determination unit, used for obtaining a component identification model based on component category data training; An inference service determination unit, configured to determine an inference service based on the component identification model; The power component determination unit is used to input the data to be processed into the component identification model to obtain the power component including the outer frame and the category when receiving the data to be processed directed to the inference service.

[0094] Optionally, the data to be processed includes an image to be processed; and the component port determination module includes: An edge detection unit, used for performing edge detection on the image to be processed to obtain an edge image and a straight line mask; A straight line feature extraction unit, used to extract straight line features from input data; the input data includes the image to be processed, the edge image and the straight line mask; An intersection line determination unit, configured to perform straight line detection on the image to be processed based on the straight line features, and determine the intersection line of the outer frame; The intersection determination unit is used to determine the intersection of the intersection line and the outer frame; the intersection is the port of the power component.

[0095] Optionally, the port connection relationship determining module includes: A connection relationship determining unit, configured to determine a connection relationship between a port and an intersection line based on the coordinates of a point on the intersection line and the coordinates of the port; An intersection type determination unit, used to determine the intersection type of any two intersecting lines based on the coordinates of the ports connected by the any two intersecting lines; The port connection relationship determining unit is used to determine the connection relationship between the ports based on the connection relationship between the ports and the intersection lines and the intersection type of the arbitrary two intersection lines.

[0096] Optionally, the power wiring diagram drawing device further includes: A text detection frame determination module is used to identify the data to be processed and obtain a text detection frame; A text detection frame merging module, used for merging any two text detection frames to obtain a target text frame when any two text detection frames satisfy a merging rule; the merging rule is determined based on the coordinate information of each of the text detection frames; The associated text determination module is used to determine the associated text of the power component based on the distance between the outer frame and the target text box.

[0097] Optionally, the components include elements and devices; the power wiring diagram drawing module includes: A subordinate relationship determination unit, used to determine the subordinate relationship between the component and the device based on the associated text and coordinate position of the power supply component; A power topology diagram construction unit, configured to construct a power topology diagram based on the connection relationship and the affiliation relationship; A power wiring diagram drawing unit is used to draw a power wiring diagram based on the power topology diagram and power diagram layout rules; the power diagram layout rules include component distance, port connection cross exclusion attribute and port connection inflection point.

[0098] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530 and a communication bus 540, wherein the processor 510, the communication interface 520 and the memory 530 communicate with each other through the communication bus 540. The processor 510 may call the logic instructions in the memory 530 to execute the power wiring diagram drawing method, which includes: identifying the data to be processed to determine the power components; the power components include an outer frame and a category; based on the intersection of the outer frame, determining the port of the power component; based on the port of the power component and the intersection, determining the connection relationship between the ports; based on the power components and the connection relationship, drawing the power wiring diagram.

[0099] In addition, the logic instructions in the above-mentioned memory 530 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0100] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the power wiring diagram drawing method provided by the above methods, which includes: identifying the power components to be processed; the power components include an outer border and a category; based on the intersection lines of the outer border, determining the ports of the power components; based on the ports of the power components and the intersection lines, determining the connection relationship between each of the ports; based on the power components and the connection relationship, drawing a power wiring diagram.

[0101] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, it is implemented to execute the power wiring diagram drawing method provided by the above-mentioned methods, the method comprising: identifying the data to be processed to determine the power supply components; the power supply components include an outer border and a category; based on the intersection lines of the outer border, determining the ports of the power supply components; based on the ports of the power supply components and the intersection lines, determining the connection relationship between each of the ports; based on the power supply components and the connection relationship, drawing a power wiring diagram.

[0102] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for drawing a power wiring diagram, characterized in that: include: Identify the data to be processed and determine the power supply components; The power supply components include an outer frame and a category; Determining the port of the power component based on the intersection line of the outer frame; Determining a connection relationship between the ports based on the ports of the power supply component and the intersection line; Based on the power supply components and the connection relationship, a power supply wiring diagram is drawn.

2. The method for drawing a power wiring diagram according to claim 1, characterized in that: The method of identifying and determining the power supply components of the data to be processed includes: A component recognition model is obtained based on component category data training; Determining an inference service based on the component identification model; When the data to be processed directed to the inference service is received, the data to be processed is input into the component recognition model to obtain a power component including an outer frame and a category.

3. The method for drawing a power wiring diagram according to claim 1, characterized in that: The data to be processed includes an image to be processed; and determining the port of the power component based on the intersection line of the outer frame includes: Performing edge detection on the image to be processed to obtain an edge image and a straight line mask; Extracting straight line features from input data; the input data includes the image to be processed, the edge image and the straight line mask; Performing straight line detection on the image to be processed based on the straight line features to determine the intersection lines of the outer frames; Determine the intersection point of the intersection line and the outer frame; the intersection point is the port of the power component.

4. The method for drawing a power wiring diagram according to claim 1, characterized in that: The determining of the connection relationship between the ports based on the ports of the power supply component and the intersection line includes: Determine a connection relationship between the port and the intersection line based on the coordinates of the point on the intersection line and the coordinates of the port; Determine the intersection type of any two intersecting lines based on the coordinates of the ports connected by any two intersecting lines; Based on the connection relationship between the ports and the intersection lines and the intersection type of the any two intersection lines, the connection relationship between the ports is determined.

5. The method for drawing a power wiring diagram according to claim 1, characterized in that: The power wiring diagram drawing method further includes: Identify the data to be processed to obtain a text detection frame; When any two text detection frames satisfy a merging rule, merging the any two text detection frames to obtain a target text frame; the merging rule is determined based on coordinate information of each of the text detection frames; Based on the distance between the outer frame and the target text box, the associated text of the power component is determined.

6. The method for drawing a power wiring diagram according to claim 1, characterized in that: The components include elements and devices; and drawing a power wiring diagram based on the power components and the connection relationship includes: Determining the affiliation between the power supply component and the device based on the associated text and coordinate position of the power supply component; Constructing a power supply topology diagram based on the connection relationship and the affiliation relationship; A power wiring diagram is drawn based on the power topology diagram and the power diagram layout rules; the power diagram layout rules include component distance, port connection cross exclusion attribute and port connection inflection point.

7. A power wiring diagram drawing device, characterized in that: include: A power supply component determination module, used to identify and determine power supply components from the data to be processed; The power supply components include an outer frame and a category; A component port determination module, used to determine the port of the power component based on the intersection line of the outer frame; A port connection relationship determination module, used to determine the connection relationship between the ports based on the ports of the power supply components and the intersection lines; A power wiring diagram drawing module is used to draw a power wiring diagram based on the power components and the connection relationship.

8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the power wiring diagram drawing method according to any one of claims 1 to 6 is implemented.

9. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method for drawing a power wiring diagram according to any one of claims 1 to 6 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method for drawing a power wiring diagram according to any one of claims 1 to 6 is implemented.