Bus detection method, device and equipment and storage medium
By introducing a dual-path collaborative detection mechanism combining semantic and morphological features into electrical wiring diagrams, the problems of high false detection and false negative rates in bus detection are solved, achieving high-precision bus identification and connection relationship parsing, and improving the detection accuracy and reliability of power systems.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-29
- Publication Date
- 2026-03-31
AI Technical Summary
Existing line detection algorithms struggle to distinguish between busbars and ordinary connecting lines in electrical wiring diagrams. They also have weak responses to short busbar segments and are easily drowned out by background noise, resulting in high false detection and false negative rates, failing to meet the accuracy and intelligence requirements of power systems.
A dual-path collaborative detection mechanism driven by semantic features and morphological features is adopted. By extracting multimodal features and deeply fusing electrical semantic and topological information in electrical wiring diagrams, bus detection is performed by combining geometric features, semantic features and morphological features. Feature extraction and recognition are performed using probabilistic Hough transform, terminal detection model and text detection model.
It achieves high-precision positioning and accurate identification of busbars, solves the core ambiguity problem in complex electrical wiring diagrams, significantly improves detection accuracy and system reliability, and can accurately distinguish between busbars and ordinary conductors as well as complex connection relationships.
Smart Images

Figure CN121768032A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to a busbar detection method, apparatus, device, and storage medium. Background Technology
[0002] The design, construction, and operation and maintenance of power engineering increasingly rely on high-precision technical drawings and digital systems. Among these, electrical wiring diagrams, as core technical documents in power systems, not only reflect the connections between equipment but also serve as a fundamental guarantee for the safe and stable operation of the system. In electrical wiring diagrams, busbars, as key nodes for collecting and distributing electrical energy, bear the important function of connecting generators, transformers, transmission and distribution lines, and loads. The accurate representation and effective detection of busbars in electrical wiring diagrams directly affect the reliability and operational efficiency of the entire power system. Especially with the continuous advancement of smart grid and digital substation construction, the structure of power systems is becoming increasingly complex, and the corresponding electrical wiring diagram information exhibits multi-dimensional and high-density characteristics, placing unprecedented demands on the accuracy and intelligence of busbar detection technology.
[0003] However, current automated detection of busbars in electrical wiring diagrams relies on classic line detection algorithms. While traditional line detection algorithms based on low-level geometric features can efficiently identify all lines in a diagram, they struggle to distinguish the electrical semantics of busbars and cannot determine whether a line is a busbar, a regular connecting line, or a frame line. Furthermore, line detection algorithms are typically more sensitive to continuous, prominent, long lines. For shorter busbar segments, the response is weak and easily drowned out by background noise, making effective identification impossible based solely on the geometric features of the busbar. This ultimately leads to high false positive and false negative rates for busbars. Summary of the Invention
[0004] This application provides a busbar detection method, apparatus, device, and storage medium. It integrates multi-dimensional features such as geometry, semantics, and morphology in the electrical wiring to be detected, constructs a feature system that is complementary and comprehensive, and designs a dual-path collaborative detection architecture. This architecture allows two paths, each with different strengths in information processing, to work in parallel and complement each other. The results are optimized through an intelligent decision fusion mechanism, forming a collaborative and enhanced overall intelligent framework. This significantly improves the overall performance of the busbar detection task, achieving a balance between high-precision identification and high-recall positioning. It provides an advanced and reliable core technology for the intelligent analysis and digital management of electrical wiring diagrams.
[0005] In a first aspect, embodiments of this application propose a busbar detection method, including: Obtain the electrical wiring diagram to be tested; Multimodal feature extraction is performed on the electrical wiring diagram. The multimodal features include geometric features, semantic features, and morphological features. The morphological features are features obtained by feature extraction on each terminal in the electrical wiring diagram. The terminal includes the intersection of line segments and the components connected to the end point of the line segment. Based on the semantic features and combined with the geometric features, the first type of bus detection is performed to obtain the corresponding first bus detection result; Based on the morphological features and combined with the geometric features, a second type of busbar detection is performed to obtain the corresponding second busbar detection result; The detection results of the first busbar and the second busbar are merged to generate and output the detection results of the target busbar.
[0006] In some possible embodiments, the geometric features are extracted in the following manner: The electrical wiring diagram is divided into sub-image blocks with overlapping edges according to a preset size; For each sub-image block, probabilistic Hough transform is used to detect line segments, and the coordinates of the points corresponding to the detected line segments are converted into global coordinates; Based on the global coordinates, determine the coordinates of the midpoints of each line segment and calculate the spatial density of each midpoint. If the spatial density meets the preset threshold, the line segment where the corresponding midpoint is located is determined to be a high-density interference line segment. High-density interfering line segments are filtered out from the detected line segments, and the target line segments determined from the remaining features are used as geometric features.
[0007] In some possible embodiments, the target line segment sampling determined from the remaining features is determined in the following manner: Choose any two line segments in the same direction from the remaining line segments; When the coordinate difference between the endpoints of two line segments is within the preset collinearity tolerance range, and the projections of the two line segments on the corresponding coordinate axes overlap or the spacing is less than the preset spacing tolerance, the line segment merging condition is determined to be met. The target line segment is the line segment obtained by merging two line segments that meet the conditions for merging, or the line segment that has not been merged is the target line segment.
[0008] In some possible embodiments, the morphological features are extracted in the following ways: The electronic wiring diagram is input into the pre-trained terminal detection model; Using the terminal detection model, multi-scale feature extraction is performed, and terminal detection is performed by the detection head based on the extracted features at different scales to obtain at least one candidate detection box including the terminal. Based on the size parameters of the candidate detection box, the center point coordinates of the candidate detection box are converted into global coordinates, and the target detection box determined from the candidate detection box is used as the morphological feature.
[0009] In some possible embodiments, the candidate detection box further includes the confidence level of the corresponding terminal, and the target detection box determined from the candidate detection box is determined in the following manner: Calculate the intersection-union ratio (CUC) for any two candidate detection boxes; If the intersection-union ratio is greater than a preset threshold, the two candidate detection boxes are determined as a detection box to be filtered. If the confidence levels of the corresponding terminals of a pair of filtered detection boxes are both greater than the preset threshold, the candidate detection box with the higher confidence level is retained as the target detection box, or the unfiltered candidate detection box is used as the target detection box.
[0010] In some possible embodiments, the semantic features are extracted in the following manner: The electrical wiring diagram is input into the text detection model; Using the text detection model, each text region detected from the electrical wiring diagram is located, and the characters within the text regions are identified. The coordinates of the quadrilateral vertices corresponding to the text region and the identified character content are used as the semantic features and output.
[0011] In some possible embodiments, the first type of bus detection, driven by the semantic features and combined with the geometric features, includes: For each semantic feature, based on the identified character content, target text regions including preset character content related to the busbar are selected; For each target text region, based on the geometric features, the geometric distance between the line segment corresponding to the target geometric feature in the target text region and the target text region is calculated respectively; The line segments whose geometric distances meet the preset conditions are identified as the first type of busbars.
[0012] In some possible embodiments, the second type of busbar detection, driven by the morphological features and combined with the geometric features, includes: For each morphological feature, the terminals in the corresponding target detection box are clustered by spatial location to obtain terminal clusters in different directions; For each terminal cluster, based on the geometric features, the connectivity between the terminals in the terminal cluster is determined, and multiple target terminals with connectivity are identified as a terminal sub-cluster. For each cluster of terminals, the target terminal and the line segment connecting the target terminal are identified as a second type of busbar.
[0013] In some possible embodiments, fusing the first busbar detection result and the second busbar detection result to generate and output the target busbar detection result includes: For each Class I busbar, calculate the intersection-parallel ratio between the Class I busbar and each Class II busbar; When the intersection-to-merge ratio is determined to be greater than a preset threshold, the first type of busbar and the target second type of busbar are determined to be the same busbar, and the first type of busbar and the target second type of busbar are merged to obtain a fused busbar; Based on the fused busbar, the remaining first-class busbar, and the remaining second-class busbar, the target busbar detection result is generated and output.
[0014] Secondly, embodiments of this application also propose a busbar detection device, comprising: The data acquisition module is used to acquire the electrical wiring diagram to be tested; The feature extraction module is used to perform multimodal feature extraction on the electrical wiring diagram. The multimodal features include geometric features, semantic features and morphological features. The morphological features are extracted from each terminal in the electrical wiring diagram. The terminal includes the intersection of line segments and the components connected to the end point of the line segment. The first detection module is used to perform first type bus detection based on the semantic features and combined with the geometric features to obtain the corresponding first bus detection result. The second detection module is used to perform second type busbar detection based on the morphological features and combined with the geometric features, and to obtain the corresponding second busbar detection result. The detection result fusion module is used to fuse the detection results of the first busbar and the second busbar to generate and output the detection results of the target busbar.
[0015] Thirdly, embodiments of this application provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform steps in a busbar detection method as described in any of the first aspects of the above embodiments.
[0016] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions for performing steps in a busbar detection method as described in any of the first aspects of the above embodiments.
[0017] By introducing a dual-path collaborative detection mechanism based on semantic and morphological features, the aforementioned busbar detection method, device, electronic equipment, and computer-readable storage medium not only achieves high-precision busbar positioning but also resolves core ambiguities in complex electrical wiring diagrams from a semantic perspective. Through deep integration of electrical semantics and topological information in the electrical wiring diagram, it can accurately distinguish between busbars and ordinary conductors, as well as complex connection relationships such as crossings and bridging, thereby accurately identifying busbars and achieving comprehensive and accurate analysis of busbars and their connection relationships, significantly improving detection accuracy.
[0018] Other features and advantages of this application will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying 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.
[0020] Figure 1 This is a flowchart of a busbar detection method according to an embodiment of this application; Figure 2 This is a flowchart illustrating the extraction of a geometric feature in an embodiment of this application. Figure 3 This is an electrical wiring diagram with edge detection as shown in an embodiment of this application; Figure 4 This is an electrical wiring diagram after screening high-density interference line segments, as shown in one embodiment of this application. Figure 5 This is an electrical wiring diagram of a line segment merging process according to an embodiment of the present application; Figure 6 This is a flowchart illustrating the extraction of a morphological feature in an embodiment of this application. Figure 7 This is an electrical wiring diagram after morphological feature extraction in one embodiment of this application; Figure 8 This is a flowchart illustrating how to generate and output target bus detection results in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of a busbar detection device according to an embodiment of this application; Figure 10This is a schematic diagram of the structure of an electronic device according to an embodiment of this application. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0022] Before introducing the busbar detection method, apparatus, electronic device, and computer-readable storage medium provided in the embodiments of this application, the technical background of the embodiments of this application will be described in detail below for ease of understanding.
[0023] With the continuous expansion of modern power systems and the rapid improvement of their intelligence level, the design, construction, and operation and maintenance of power engineering increasingly rely on high-precision technical drawings and digital systems. Among these, electrical wiring diagrams, as core technical documents in power systems, not only reflect the connection relationships between equipment but also serve as the fundamental guarantee for the safe and stable operation of the system. In electrical wiring diagrams, busbars, as key nodes for collecting and distributing electrical energy, bear the important function of connecting generators, transformers, transmission and distribution lines, and loads. The accurate representation and effective detection of busbars in electrical wiring diagrams directly affect the reliability and operational efficiency of the entire power system. Especially against the backdrop of the continuous advancement of smart grid and digital substation construction, the structure of power systems is becoming increasingly complex, and the corresponding electrical wiring diagram information exhibits multi-dimensional and high-density characteristics, placing unprecedented demands on the accuracy and intelligence of busbar detection technology.
[0024] The identification and detection of busbars in electrical wiring diagrams is not a simple image recognition problem, but a complex task involving the integration of knowledge from multiple disciplines. In conventional computer vision tasks, the automated detection of busbars in electrical wiring diagrams currently relies on classic straight-line detection algorithms. By recognizing linear structures in images, these algorithms provide the initial graphical basis for subsequent electrical logic analysis. However, busbar identification in electrical wiring diagrams requires not only recognizing their visual morphology but also combining semantic understanding and logical judgment with professional knowledge from the field of electrical engineering. For example, busbars of different voltage levels have strict line type specifications and labeling requirements in diagrams; their connection methods, crossings, insulation spacing, etc., must all comply with national or industry design standards and safety regulations. Ignoring these electrical semantics and relying solely on graphical features for identification often leads to systematic misjudgments and omissions, seriously affecting the quality of drawing review and project implementation.
[0025] The aforementioned traditional line detection algorithms based on low-level geometric features, while efficiently identifying all lines in an image, struggle to distinguish the electrical semantics of busbars and cannot determine whether a line is a busbar, a regular connection line, or a frame line. The core of these algorithms is finding a set of pixels in the image that satisfy a specific direction and continuity. However, electrical wiring diagrams often feature densely packed terminals, and while busbars are geometrically represented as thick solid lines, ordinary power connection lines, cables, and even non-functional borders and annotation lines can exhibit similar straight-line characteristics. Furthermore, electrical wiring diagrams are not purely functional connection diagrams; they include numerous auxiliary and explanatory straight-line elements such as frames, title blocks, dimensioning, and equipment symbol outlines. These elements are geometrically almost indistinguishable from busbars and other electrical connection lines, leading general line detection algorithms to extract them all indiscriminately, generating a massive set of candidate lines. This results in a high false detection rate for traditional line detection algorithms, making it difficult to meet practical engineering requirements for busbar detection.
[0026] Furthermore, in complex wiring diagrams, busbars are not always long straight lines that run the entire length of the diagram. Due to the layout of the wiring diagram and the needs of equipment connections, there are a large number of short-distance busbars. The aforementioned traditional straight-line detection algorithms are usually more sensitive to continuous, significant long straight lines. For shorter busbar segments, the response intensity is weak, and they are easily drowned out by background noise or directly filtered out due to improper length threshold settings. Relying solely on the geometric characteristics of the busbar cannot achieve effective identification, ultimately leading to a high false positive and false negative rate for busbars.
[0027] In view of the serious technical problems of misjudgment and omission in the detection of busbars in electrical wiring diagrams in the traditional line detection algorithm, this application proposes a busbar detection method. By introducing a dual-path collaborative detection mechanism based on semantic feature driving and morphological feature driving, it not only achieves high-precision positioning of busbars, but also solves the core ambiguity problem in complex electrical wiring diagrams from the semantic level. By deeply integrating the electrical semantics and topological structure information in the electrical wiring diagram, it can accurately distinguish the difference between busbars and ordinary conductors, as well as complex connection relationships such as crossing and bridging, thereby accurately identifying busbars.
[0028] Specifically, the busbar detection method described in the above embodiments of this application, such as... Figure 1 As shown, it includes: Step S101: Obtain the electrical wiring diagram to be tested; Step S102: Extract multimodal features from the electrical wiring diagram. The multimodal features include geometric features, semantic features, and morphological features. The morphological features are features obtained by extracting features from each terminal in the electrical wiring diagram. The terminal includes the intersection of line segments and the components connected to the end point of the line segment. Step S103a: Based on the semantic features and combined with the geometric features, perform first type bus detection to obtain the corresponding first bus detection result; Step S103b: Using the morphological features as the driving basis and combining the geometric features, perform the second type of busbar detection to obtain the corresponding second busbar detection result; Step S104: The first bus detection result and the second bus detection result are fused together to generate and output the target bus detection result.
[0029] In this embodiment, by using dual-path collaborative detection of semantic and morphological features, and deeply integrating the electrical semantics and topology information of the drawings, not only can the busbar entity be located with high precision, but also complex connection relationships such as crossovers and bridgings can be resolved. This achieves comprehensive and accurate analysis of the busbar and its connection topology, significantly improving the detection accuracy and system reliability.
[0030] In this embodiment, the geometric features are features extracted from line segments in the electrical wiring diagram. To avoid the problems of high computational load and interference caused by directly performing line detection on complex electrical wiring diagrams with excessively high resolution, the geometric features, such as... Figure 2 As shown, the extraction is performed in the following manner: Step S201: Divide the electrical wiring diagram into sub-image blocks with overlapping edges according to a preset size; Step S202: For each sub-image block, perform probabilistic Hough transform to detect line segments, and convert the coordinates of the points corresponding to the detected line segments into global coordinates; Step S203: Based on the global coordinates, determine the midpoint coordinates of each line segment and calculate the spatial density of each midpoint respectively; Step S204: If the spatial density meets the preset threshold, determine that the line segment where the corresponding midpoint is located is a high-density interference line segment; Step S205: High-density interfering line segments are filtered out from the detected line segments, and the target line segments determined from the remaining features are used as geometric features.
[0031] Optionally, before dividing the electrical wiring diagram into sub-image blocks with overlapping edges, the method further includes performing line segment detection using a probabilistic Hough transform on the entire electrical wiring diagram to obtain geometric features composed of main line segments.
[0032] In this embodiment of the application, whether for the entire electrical wiring diagram or for each sub-image block, the line segment detection using probabilistic Hough transform includes the following steps: Edge extraction is performed on the electrical wiring diagram / sub-image block to obtain the edge point set E, which is then represented using polar coordinates; An accumulator is constructed in the polar coordinate parameter space. For each edge point, the accumulator is used to perform voting accumulation to obtain the accumulation result. Identify the local peak values in the accumulated results that are greater than a preset threshold, and use them as parameters for the corresponding straight line; Based on the parameters of each straight line, consecutive actual edge points are searched along the straight lines from the electrical wiring diagram and connected end to end to form a line segment.
[0033] In some possible embodiments, the accumulator is represented by the following formula 1: (Formula 1) Where E is the set of edge points, This is the Dirac function.
[0034] In this embodiment, if line segment detection is performed on each sub-image block, the method further includes converting the coordinates of the points corresponding to the detected line segments into global coordinates for subsequent processing. The specific method for line segment detection using probabilistic Hough transform is described above; please refer to the specific procedures in the prior art, which will not be repeated here.
[0035] Optionally, steps S203 to S204 above are used to filter dense line segments. In electrical wiring diagrams, text areas (such as equipment labels and parameter descriptions) are filtered after edge detection. Figure 3 As shown, the processed electrical wiring diagram will generate a large number of short and dense line segments, which need to be filtered to avoid interference. Therefore, dense line segments are filtered, text areas are removed, and interference is reduced.
[0036] Specifically, a density-based spatial clustering method is used to calculate the spatial density of each midpoint. For any midpoint M, its... Neighborhood (e.g., radius of) (a circular region of pixels), the spatial density corresponding to the midpoint is its... The number of other midpoints contained within the neighborhood; In some possible embodiments, Euclidean distance is used to calculate the distance between midpoints. Furthermore, a spatial density threshold is set; when the spatial density meets the threshold, the line segment containing the corresponding midpoint is determined to be a high-density interference line segment.
[0037] In some possible embodiments, to avoid accidentally deleting actual busbars or critical conductors passing through the text due to text obscuring the lines, this application embodiment does not delete high-density interfering line segments entirely, but instead performs protective screening, as described above. Figure 3 For example, consider the electrical wiring diagram after screening high-density interference lines, such as... Figure 4 As shown.
[0038] Specifically, the following methods can also be used to identify high-density interference segments: Based on all the line segments identified as high-density interference lines, a cluster is formed; For each cluster, determine the number of line segments included in the cluster, calculate the convex hull of all midpoints in the cluster, and calculate the area of each convex hull; The spatial line density of the cluster is calculated based on the number of line segments and the area of each convex hull. If the spatial line density is higher than a preset threshold, the cluster is determined to be a high-density interference cluster, and the corresponding set of line segments inside it is a high-density interference line segment.
[0039] In some possible embodiments, the spatial line density of the clusters The following formula 2 is used to represent it: (Formula 2) in, The number of line segments, This is the sum of the areas of each convex hull.
[0040] Optionally, protective screening is performed on high-density interference clusters, specifically including: Analyze the orientation angles of all line segments within the cluster, count their directions, and sort them along the direction perpendicular to the stated direction. For example, if the direction of a line segment is horizontal, sort it according to the Y coordinate of the midpoint of the line segment; if the direction of a line segment is vertical, sort it according to the X coordinate. For the sorted line segment sequence, select line segments at the top, middle, and bottom (or left, middle, and right) positions evenly and retain them.
[0041] In some possible embodiments, due to occlusion, noise, block segmentation, etc., the same straight line may be detected as multiple segments, requiring the merging of the straight lines extracted from the entire image and the straight lines detected by block segmentation. Therefore, in step S205 above, the target line segment sampled from the remaining features is determined as follows: Choose any two line segments in the same direction from the remaining line segments; When the coordinate difference between the endpoints of two line segments is within the preset collinearity tolerance range, and the projections of the two line segments on the corresponding coordinate axes overlap or the spacing is less than the preset spacing tolerance, the line segment merging condition is determined to be met. The target line segment is the line segment obtained by merging two line segments that meet the conditions for merging, or the line segment that has not been merged is the target line segment.
[0042] In this embodiment of the application, the straight lines in the above electrical wiring diagram only have two angles: horizontal and vertical. The coordinate difference between the endpoints of the two line segments is determined to be within a preset collinearity tolerance range. Specifically: For line segments in the horizontal direction, calculate whether the absolute value between the difference in the ordinates of the corresponding endpoints of the two line segments is within the preset first collinearity tolerance range. Only when both differences are within the first collinearity tolerance range are the two line segments determined to be collinear. For a line segment in the vertical direction, calculate whether the absolute value between the difference of the horizontal coordinates of the corresponding endpoints of the two line segments is within the preset second collinearity tolerance range. Only when both differences are within the second collinearity tolerance range are the two line segments determined to be collinear.
[0043] In some possible embodiments, the determination that the projections of two line segments on corresponding coordinate axes overlap is made in the following way: Let the range of values for the projection interval A of one line segment onto the corresponding coordinate axis be [min(IA), max(IA)], and the range of values for the projection interval B of the other line segment onto the corresponding coordinate axis be [min(IB), max(IB)]. It can be determined that the two intervals overlap if and only if the larger of the minimum value of interval A and the minimum value of interval B is less than the smaller of the maximum value of interval A and the maximum value of interval B.
[0044] In some possible embodiments, the determination that the distance between two line segments is less than a preset distance tolerance is made in the following way: Calculate the minimum gap distance between two line segments in a specific direction. Taking a line segment in the horizontal direction as an example, calculate the horizontal distance between the right endpoint of line segment A and the left endpoint of line segment B (or vice versa), and take the absolute value as the gap d. When this gap is less than the preset gap tolerance (such as 5 pixels), it is determined that the gap between the two line segments is less than the preset gap tolerance.
[0045] In some possible embodiments, merging two line segments that satisfy the line segment merging condition described above includes: Take the union of the ranges of two line segments that satisfy the line segment merging condition, and use it as the coordinate range of the extension direction of the merged line segment. The lengths of two line segments that meet the conditions for merging are weighted to obtain the vertical coordinates of the merged line segment (Y coordinate of the horizontal line and X coordinate of the vertical line), with the longer one having the dominant weight. Among them, the above Figure 4 For example, the electrical wiring diagram after merging line segments that meet the conditions for line segment merging is as follows: Figure 5 As shown.
[0046] In this embodiment, by combining global detection with local fine-grained block detection, the problem of long line breaks and short line omissions in high-resolution drawings is effectively solved. While ensuring the integrity of the overall structure, the recall rate for dense and weak line segments is significantly improved, providing a more comprehensive and accurate geometric basis for feature fusion.
[0047] To extract key morphological features of busbar topology connections, this application's implementation scheme employs a customized terminal detection process based on YOLOv8. The model is trained using a dedicated dataset of electrical drawings to accurately locate all terminal symbols in the drawings, providing highly reliable structural information for subsequent morphology-driven analysis of busbar connection relationships.
[0048] Specifically, the morphological features are extracted using the following methods, such as... Figure 6 As shown, it includes: Step S601: Input the electronic wiring diagram into the pre-trained terminal detection model; Step S602: Using the terminal detection model, multi-scale feature extraction is performed respectively, and terminal detection is performed through the detection head based on the extracted features at different scales to obtain at least one candidate detection box including the terminal. Step S603: Based on the size parameters of the candidate detection box, convert the center point coordinates of the candidate detection box into global coordinates, and use the target detection box determined from the candidate detection box as the morphological feature; The electrical wiring diagram after morphological feature extraction is as follows: Figure 7 As shown (only a portion of the target detection boxes are displayed).
[0049] In this embodiment, the terminal detection model is trained based on a YOLOv8n pre-trained model. This model achieves a good balance between detection speed and accuracy. Its single-stage detection architecture can efficiently complete end-to-end training and inference, and it has been specifically optimized for terminals that are abundant in complex drawings, making it very suitable for the high-precision positioning requirements in this scenario.
[0050] Optionally, the above terminal detection model is trained using the following steps: S1, Data Preparation and Labeling: Approximately 1300 electrical wiring diagrams containing busbars and terminals were collected as the raw dataset; Use the professional annotation tool LabelImg to annotate all terminals in each electrical wiring diagram in the original dataset with bounding boxes, and save the annotation results in YOLO format; The terminals include the components connected to the intersection and endpoint of line segments, and the markings can be in typical shapes such as circles, squares, and T-shapes.
[0051] S2, Dataset Partitioning and Augmentation: The labeled original dataset was randomly divided into training set, validation set and test set in a ratio of 8:1:1. YOLOv8's built-in strong data augmentation strategy is enabled, and techniques such as Mosaic, random rotation, scaling, color dithering, and cropping are used to enhance the training set to greatly improve the model's robustness to drawing scale, angle, brightness, and partial occlusion.
[0052] S3, Model Training and Monitoring: The YOLOv8 model is trained using the partitioned training set, with the goal of minimizing the detection loss, and the model parameters are dynamically adjusted using the backpropagation algorithm. The adjusted YOLOv8 model is monitored for changes in loss and accuracy using the partitioned validation set. The learning rate is dynamically adjusted to prevent overfitting and ensure model convergence stability.
[0053] S4, Model Evaluation and Selection: The trained YOLOv8 model was tested using the partitioned test set. mAP@0.5 was used as the core evaluation metric, and the model with the highest mAP@0.5 on the validation set was selected as the deployment model to ensure that it has high-precision terminal detection capability and good generalization ability in complex drawings.
[0054] The trained YOLOv8 model described above achieves high-precision and robust detection capabilities for terminals in electrical wiring diagrams. This training process enables the model to effectively adapt to the diverse shapes, scale variations, and dense arrangements of terminals in the drawings, significantly improving the positioning accuracy and recall rate in complex scenarios. This provides a reliable and stable foundation for subsequent analysis of busbar connection relationships based on morphological features.
[0055] In some possible embodiments, the candidate detection box further includes the confidence level of the corresponding terminal. To eliminate redundant detection and determine the final target detection box, the target detection box determined from the candidate detection box in step S303 of the method described in this application embodiment includes: Calculate the intersection-union ratio (CUC) for any two candidate detection boxes; If the intersection-union ratio is greater than a preset threshold, the two candidate detection boxes are determined as a detection box to be filtered. If the confidence levels of the corresponding terminals of a pair of filtered detection boxes are both greater than the preset threshold, the candidate detection box with the higher confidence level is retained as the target detection box, or the unfiltered candidate detection box is used as the target detection box.
[0056] In this embodiment, by combining geometric overlap and confidence level, while suppressing duplicate frames caused by detection noise, the true high-quality detection results are effectively preserved, improving the accuracy of terminal positioning and the clarity of results, and providing a cleaner morphological input for subsequent analysis.
[0057] In some possible embodiments, to extract key semantic features for busbar identification, the implementation scheme of this application employs a customized text extraction process based on OCR (Optical Character Recognition) technology. The model is fine-tuned using a dedicated dataset of electrical drawings to accurately locate and identify all text annotations in the drawings, providing highly reliable structured text information for subsequent semantic-driven busbar detection.
[0058] Specifically, the semantic features are extracted in the following way: The electrical wiring diagram is input into the text detection model; Using the text detection model, each text region detected from the electrical wiring diagram is located, and the characters within the text regions are identified. The coordinates of the quadrilateral vertices corresponding to the text region and the identified character content are used as the semantic features and output.
[0059] In this embodiment, the text detection model is trained based on the PP-OCRv4 pre-trained model. This model performs well in text detection and recognition in natural scenes, providing a good starting point.
[0060] Optionally, the text detection model is trained using the following steps: S1, Dataset Construction: Collect approximately 1500 electrical wiring diagrams as the raw dataset, ensuring that the raw dataset covers electrical wiring diagrams with different design styles, fonts, colors, etc. Use PPOCRLabel or other efficient annotation tools provided by PP-OCRv4 to annotate the text content and quadrilateral vertex coordinates of all text instances in the electrical wiring diagram, and save the annotation results as a text file; The text file records the path of each electrical wiring diagram, the text content of each text instance in the diagram, and the coordinates of the quadrilateral vertices line by line, providing structured, high-quality labeled data for subsequent model training.
[0061] In some possible embodiments, the text instance includes, but is not limited to: the text string itself, such as bus, 10kV, WL1.
[0062] S2, Dataset Partitioning and Augmentation: The original dataset is divided into a training set and a validation set according to a preset ratio; Online data augmentation techniques were used to improve the robustness of the model. The training set was augmented using techniques such as random rotation, brightness and contrast adjustment, Gaussian noise addition, and random scaling to simulate various situations that may occur in electrical wiring diagrams in practical applications.
[0063] S3, Model Training and Monitoring: The training set is input into the PP-OCRv4 model to be trained. The model simultaneously performs text detection (outputs text location) and text recognition (outputs text content). The joint optimization objective is to minimize the geometric error between the predicted bounding box and the labeled bounding box and the content error between the predicted text and the labeled text. The two are weighted and combined into a total loss. Through the backpropagation algorithm, all trainable parameters of the PP-OCRv4 model are updated based on the total loss. By monitoring the changes in detection accuracy (F1 score) and recognition accuracy in real time using the validation set, the learning rate can be dynamically adjusted or an early stopping strategy can be enabled to prevent model overfitting and ensure its generalization performance on electrical drawing text tasks.
[0064] In this embodiment of the application, text annotations (such as voltage level and equipment name) in the image are accurately extracted by OCR, which provides key semantic features for bus identification, directly indicating the attributes and functions of electrical components. This effectively solves the semantic ambiguity that cannot be determined by geometric features alone, and lays a reliable foundation for subsequent detection and multimodal fusion based on semantic features.
[0065] Based on the extracted geometric, semantic, and morphological features, this application further constructs a dual-path collaborative detection mechanism to identify and analyze the busbar from both semantic and morphological dimensions. The aim is to solve the identification ambiguity under a single feature dimension by complementing the advantages of different paths, and finally achieve high-precision busbar detection through decision fusion.
[0066] Specifically, based on the semantic features and combined with the geometric features, the first type of bus detection is performed. By introducing explicit semantic information from text annotations, key prior knowledge and contextual basis are provided for bus recognition.
[0067] Specifically, it includes the following steps: S1, for each semantic feature, based on the identified character content, filter out the target text region including preset character content related to the bus line; In electrical wiring diagrams, there are usually pre-marked text boxes around the busbars, such as 110kVⅡ busbar, 330kV (West) m, etc. Therefore, based on the identified character content, the target text area that includes preset character content related to the busbar is first filtered out.
[0068] Optionally, the filtering criteria are set to require the character content to contain busbar keywords, or to contain voltage level or unit, and not to contain exclusion keywords. The busbar keywords include, but are not limited to, mother, M, m, etc.; the units include, but are not limited to, Kv, KV, kV, Kk, volt, etc.; the voltage levels include, but are not limited to, 10, 35, 110, 220, 330, 75, 66, etc.; and the exclusion keywords include, but are not limited to, YH, PT, KVA, etc.
[0069] S2, for each target text region, based on the geometric features, calculate the geometric distance between the line segment corresponding to the target geometric feature in the target text region and the target text region; For each target text region Line segments corresponding to the target geometric features in the target text region Find the best matching line segment, where the geometric distance is the minimum boundary distance between the target text region and the bounding rectangle of the line segment. .
[0070] Optionally, the It is represented by the following formula 3: (Formula 3) in, For target text region Boundary rectangles and line segments The bounding rectangle.
[0071] S3, identify the line segments whose geometric distances meet the preset conditions as the first type of busbar.
[0072] In some possible embodiments, to reduce computational load, the vertical distance from the center of the target text region to the line segment is also considered before recognition is performed based on the geometric distance. Line segments that are too far from the target text area are filtered out. For candidate line segments whose distance from the target text area meets the preset distance, they are sorted by length, and the top 10 longest line segments are selected to calculate the comprehensive score. The following formula 4 is used for identification: (Formula 4) in, , These are configurable weighting coefficients.
[0073] In this embodiment of the application, the minimum comprehensive score is taken as the matching bus with the target text region.
[0074] In the aforementioned text-driven busbar detection, based on OCR recognition results, target text regions containing keywords are first selected as candidate anchor points. Then, by combining vertical distance and bounding box center distance as dual metrics, adjacent line segments are ranked. Finally, the matching busbar is determined by calculating the sum of scores for each line segment. Semantic rules accurately locate busbar annotations, and geometric distance constraints achieve reliable association between text and graphic entities. Even in drawings with dense graphics and complex intersections, it effectively avoids misidentifying ordinary guide lines or annotation lines as busbars, significantly improving the accuracy and interpretability of busbar detection.
[0075] Simultaneously, based on the aforementioned morphological features and combined with the aforementioned geometric features, a second type of busbar detection is performed. Specifically, it includes the following steps: S1. For each morphological feature, the terminals in the corresponding target detection box are clustered in spatial position to obtain terminal clusters in different directions; For all detected morphological features, location clustering is performed based on their spatial distribution. Neighboring terminals located in the same straight line direction (horizontal or vertical) are aggregated into different terminal clusters to form a preliminary bus candidate set.
[0076] S2, for each terminal cluster, based on the geometric features, determine the connectivity between the terminals in the terminal cluster, and identify multiple target terminals with connectivity as a terminal sub-cluster; Considering that there may be multiple physically disconnected parallel busbars on the same axis, this application further introduces a pixel connectivity subdivision algorithm, wherein for each terminal cluster, it is determined whether they belong to the same continuous busbar by analyzing the actual pixel connectivity between the terminals (i.e. whether there are non-background geometric entities connected).
[0077] Taking a horizontal terminal cluster as an example, the process for determining its connectivity is given: For each horizontal terminal cluster, a horizontal rectangular connection area is defined based on the outer rectangle of its leftmost and rightmost terminals, which serves as the detection range for determining whether adjacent terminals are connected by the same straight line (busbar). A line segment trimming algorithm (such as the Cohen-Sutherland algorithm) is used to determine whether there is a valid line segment passing through the area between adjacent terminals; if there is no connecting line segment between two terminals, it is determined that the two terminals are not connected; if there is a connecting line segment between two terminals, it is determined that the two terminals are connected by the same busbar. Sort the terminals from left to right according to their horizontal coordinates, and check the connectivity of adjacent terminal pairs in turn. If the current terminal pair is connected, continue to check the next pair. If a terminal pair that is not connected is encountered, divide the previously connected terminals into a terminal sub-cluster, corresponding to an independent bus. Then start a new round of connectivity traversal from the right terminal of the currently not connected terminal. Repeat the above traversal process until all terminals are processed, and finally obtain multiple physically connected terminal subclusters, each terminal subcluster corresponding to a real busbar entity.
[0078] S3, for each cluster of terminals, identify the target terminal and the line segment connecting the target terminal as a second type of bus.
[0079] By checking the actual geometric connection relationship between terminals one by one, multiple parallel busbars that exist in the same straight direction due to electrical isolation can be accurately identified, effectively avoiding erroneous merging caused by relying solely on spatial clustering.
[0080] After obtaining preliminary bus detection results through semantic-driven and morphological-driven paths respectively, in order to eliminate duplication, integrate complementary information and form a final unified detection output, the above-mentioned step 105 is used to carry out the dual-path result fusion stage. By performing geometric matching and logical filtering on the two types of results, the detection results are optimized and unified.
[0081] Specifically, the first busbar detection result and the second busbar detection result are fused to generate and output the target busbar detection result, such as... Figure 8 As shown, it includes the following steps: Step S801: For each Class I busbar, calculate the intersection-to-exchange ratio between the Class I busbar and each Class II busbar; The intersection-union ratio can be calculated by using the spatial overlap of existing predicted bounding boxes on the image plane. Only one exemplary method is given here, without any specific limitation.
[0082] Step S802: When the intersection-to-merge ratio is greater than a preset threshold, the first type of busbar and the target second type of busbar are determined to be the same busbar. The first type of busbar and the target second type of busbar are merged to obtain a fused busbar. Optionally, for two candidate boxes A and B that are determined to be on the same busbar, one of the following methods can be used to merge them: Union of sets: Take the smallest bounding rectangle of the two bounding boxes along the coordinate direction as the new bounding box; Weighted average merging: If the bounding box has a confidence score, the corresponding coordinates can be weighted by confidence score.
[0083] Step S803: Based on the fused busbar, the remaining first-class busbar, and the remaining second-class busbar, generate and output the target busbar detection result.
[0084] In some possible embodiments, the method further includes: Further screening is performed on the remaining first-type buses. Only buses with at least one detected terminal in their detection frame are retained to ensure that each bus has a corresponding physical entity. Remaining second-type buses with unique morphological paths are typically retained unconditionally because they are generated based on terminal connectivity and already possess high geometric reliability.
[0085] By employing a dual-drive mechanism of semantic and morphological features, busbar detection is performed by combining geometric features separately, and then the two types of detected busbars are fused together. This significantly improves the accuracy and generalization ability of busbar detection in electrical wiring diagrams under complex scenarios such as noise interference, missing annotations, or varied drawing styles, providing reliable technical support for the intelligent parsing of electrical wiring diagrams.
[0086] This application's busbar detection method integrates multi-dimensional features such as geometry, semantics, and morphology in the electrical wiring to be detected, constructing a feature system that is complementary and comprehensive. Furthermore, by designing a dual-path collaborative detection architecture, two paths, each adept at different information processing, work in parallel, complementing each other's strengths. The results are optimized through an intelligent decision fusion mechanism, forming a collaborative and enhanced overall intelligent framework. This significantly improves the overall performance of the busbar detection task, achieving a balance between high-precision identification and high-recall positioning. It provides an advanced and reliable core technology for the intelligent analysis and digital management of electrical wiring diagrams.
[0087] Based on the same inventive concept, this application also proposes a busbar detection device, such as... Figure 9 As shown, it includes: The acquisition module 901 is used to acquire the electrical wiring diagram to be tested; The feature extraction module 902 is used to perform multimodal feature extraction on the electrical wiring diagram. The multimodal features include geometric features, semantic features and morphological features. The morphological features are extracted from each terminal in the electrical wiring diagram. The terminal includes the intersection of line segments and the components connected to the end point of the line segment. The first detection module 903 is used to perform first type bus detection based on the semantic features and combined with the geometric features to obtain the corresponding first bus detection result; The second detection module 904 is used to perform second type busbar detection based on the morphological features and combined with the geometric features to obtain the corresponding second busbar detection result. The detection result fusion module 905 is used to fuse the detection results of the first busbar and the second busbar to generate and output the detection results of the target busbar.
[0088] The busbar detection device described in this application deeply integrates the textual semantic information of the drawing with the terminal topology, achieving high-precision and unambiguous analysis of the busbar and its connection relationships. This method can not only accurately distinguish between busbars and ordinary conductors, but also effectively identify complex electrical connections such as crossings and bridging, thereby achieving complete and accurate extraction of busbar entities and connection topologies from complex drawings, significantly improving the accuracy and reliability of the detection system.
[0089] Based on the same inventive concept, embodiments of this application propose an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform steps in a busbar detection method as described in any of the first aspects of the above embodiments.
[0090] The following reference Figure 10 This application describes an electronic device 100 according to one embodiment of the present application. Figure 10 The device 100 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0091] like Figure 10 As shown, an electronic device 100 is presented in the form of a general electronic device. The components of an electronic device 100 may include, but are not limited to: at least one processor 101, at least one memory 102, and a bus 103 connecting different system components (including memory 102 and processor 101).
[0092] Bus 103 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0093] The memory 102 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1021 and / or cache memory 1022, and may further include read-only memory (ROM) 1023.
[0094] The memory 102 may also include a program / utility 1025 having a set (at least one) of program modules 1024, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0095] An electronic device 100 can also communicate with one or more external devices 104 (e.g., keyboard, pointing device, etc.), one or more devices that enable a user to interact with a transaction pre-screening device 100, and / or any device that enables the electronic device 100 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via an input / output (I / O) interface 105. Furthermore, an electronic device 100 can also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 106. As shown, the network adapter 106 communicates with other modules used in the electronic device 100 via a bus 103. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with the electronic device 100, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0096] Based on the same inventive concept, the application proposes a computer-readable storage medium storing computer-executable instructions for performing steps in a busbar detection method as described in any of the first aspects of the above embodiments. Since the principle by which the above computer-readable storage medium solves the problem is similar to the access control method for a voucher cabinet, the implementation of the above computer-readable storage medium can be found in the implementation of the method; repeated details will not be elaborated further.
[0097] The busbar detection method, device, electronic device, and storage medium described in this application introduce a dual-path collaborative detection mechanism based on semantic feature-driven and morphological feature-driven approaches. This not only achieves high-precision busbar positioning but also resolves core ambiguities in complex electrical wiring diagrams from a semantic perspective. By deeply integrating electrical semantics and topological information in the electrical wiring diagrams, it can accurately distinguish between busbars and ordinary conductors, as well as complex connection relationships such as crossings and bridging, thereby accurately identifying busbars. This achieves comprehensive and accurate analysis of busbars and their connection relationships, significantly improving detection accuracy.
[0098] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0099] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0100] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0101] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0102] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A bus detection method characterized by, The method comprises the following steps: acquiring an electrical wiring diagram to be detected; performing multi-modal feature extraction on the electrical wiring diagram, wherein the multi-modal features include geometric features, semantic features, and morphological features, the morphological features are features obtained by performing feature extraction on each terminal in the electrical wiring diagram, and the terminals include line segment intersection points and line segment end points connected to components; performing first-type bus detection based on the semantic features as a driving basis and in combination with the geometric features to obtain a corresponding first bus detection result; performing second-type bus detection based on the morphological features as a driving basis and in combination with the geometric features to obtain a corresponding second bus detection result; fusing the first bus detection result and the second bus detection result to generate and output a target bus detection result.
2. The method of claim 1, wherein, The geometric features are extracted in the following manner: dividing the electrical wiring diagram into edge-overlapped sub-image blocks according to a preset size; performing line segment detection on each sub-image block using a probabilistic Hough transform, and converting the point coordinates of the detected line segments into global coordinates; determining the midpoint coordinates of each line segment based on the global coordinates and calculating the spatial density of each midpoint; if the spatial density meets a preset threshold, determining that the line segment on which the corresponding midpoint is located is a high-density interference line segment; filtering out the high-density interference line segments from the detected line segments, and determining target line segments from the remaining features as the geometric features.
3. The method of claim 2, wherein, The target line segments determined from the remaining features are determined in the following manner: selecting any two line segments in the same direction from the remaining line segments; determining that the two line segments meet the line segment merging condition when the difference between the endpoint coordinates of the two line segments is within a preset collinearity tolerance range and the projections of the two line segments on the corresponding directional coordinate axes overlap or the distance between the two line segments is less than a preset distance tolerance; merging the two line segments that meet the line segment merging condition to obtain a target line segment, or taking the line segments that are not merged as target line segments.
4. The method of claim 1, wherein, The morphological features are extracted in the following manner, which comprises: inputting the electrical wiring diagram into a pre-trained terminal detection model; performing multi-scale feature extraction using the terminal detection model, and performing terminal detection based on the extracted features of different scales through a detection head to obtain at least one candidate detection box including a terminal; converting the center point coordinates of the candidate detection box into global coordinates based on the size parameters of the candidate detection box, and determining a target detection box from the candidate detection box as the morphological features.
5. The method of claim 4, wherein, The candidate detection box further includes the confidence of the corresponding terminal, and the target detection box determined from the candidate detection box is determined in the following manner: calculating the intersection-over-union ratio for any two candidate detection boxes; if the intersection-over-union ratio is greater than a preset threshold, determining the two candidate detection boxes as a pair of detection boxes to be filtered; if the confidence of the terminals corresponding to the pair of detection boxes to be filtered is greater than a preset threshold, retaining the candidate detection box with higher confidence as a target detection box, or taking the candidate detection box that is not filtered as a target detection box.
6. The method of claim 1, wherein, The semantic features are extracted in the following manner: inputting the electrical wiring diagram into a text detection model; The text detection model is used to locate each text region detected from the electrical wiring diagram and recognize characters in the text region; The coordinates of the quadrilateral vertex corresponding to the text region and the recognized character content are taken as the semantic feature and output.
7. The method of claim 6, wherein, The first type of bus detection is performed according to the semantic feature as a driving basis combined with the geometric feature, including: For each semantic feature, a target text region including preset bus-related character content is screened out based on the recognized character content; For each target text region, the geometric distance between the line segment corresponding to the target geometric feature in the target text region and the target text region is calculated based on the geometric feature; The line segment corresponding to the geometric distance satisfying the preset condition is recognized as the first type of bus.
8. The method of claim 4, wherein, The second type of bus detection is performed according to the morphological feature as a driving basis combined with the geometric feature, including: For each morphological feature, the terminals in the corresponding target detection frame are spatially clustered to obtain terminal clusters in different directions; For each terminal cluster, the connectivity between terminals in the terminal cluster is judged based on the geometric feature, and multiple target terminals having a connectivity relationship are determined as a terminal sub-cluster; For each terminal sub-cluster, the target terminal and the line segment connecting the target terminal are recognized as a second type of bus.
9. The method of claim 1, wherein, The first bus detection result and the second bus detection result are fused to generate and output a target bus detection result, including: For each first type of bus, the intersection-over-union ratio of the first type of bus and each second type of bus is calculated; When the intersection-over-union ratio is greater than a preset threshold, it is determined that the first type of bus and the target second type of bus are the same bus, the first type of bus and the target second type of bus are merged to obtain a fused bus; Based on the fused bus, the remaining first type of bus and the remaining second type of bus, a target bus detection result is generated and output.
10. A bus detection device, characterized by It includes: A collection module for acquiring an electrical wiring diagram to be detected; A feature extraction module for performing multi-modal feature extraction on the electrical wiring diagram, the multi-modal features including geometric features, semantic features, and morphological features, the morphological features being features extracted from each terminal in the electrical wiring diagram, the terminals including line segment intersection points and line segment end points connected to components; A first detection module for performing first type bus detection according to the semantic feature as a driving basis combined with the geometric feature, obtaining a corresponding first bus detection result; A second detection module for performing second type bus detection according to the morphological feature as a driving basis combined with the geometric feature, obtaining a corresponding second bus detection result; A detection result fusion module for fusing the first bus detection result and the second bus detection result to generate and output a target bus detection result.
11. An electronic device, comprising: It includes: At least one processor; and a memory connected with the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the steps in the bus detection method according to any one of claims 1-9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores computer executable instructions for performing the steps in the bus detection method according to any one of claims 1-9.