Generation method of distribution box label and related device thereof

By identifying the target room and distribution box, determining the type and direction of the lead wires, and generating automated distribution box labels, the problem of low efficiency in traditional methods is solved, and the labeling is automated and the layout is reasonable.

CN120470730BActive Publication Date: 2025-10-17HEFEI LIANGZHEN CONSTR TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510978879.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-16
Publication Date
2025-10-17
Estimated Expiration
2045-07-16

AI Technical Summary

Technical Problem

Traditional methods of labeling electrical distribution boxes rely on manual operation, resulting in low labeling efficiency, inability to automate the process, and inability to quickly adjust when design drawings change, leading to overlapping or disordered labeling.

Method used

A method for generating labels for electrical distribution boxes is provided. By identifying the target room and the electrical distribution box, determining the type and direction of the lead wires, and generating appropriate labeling methods, including orthogonal and non-orthogonal lead wire types, the method automatically generates labels for the electrical distribution boxes using the target coordinate system and view scale.

Benefits of technology

It improves the efficiency and aesthetics of electrical box labeling, allowing for the selection of appropriate labeling methods based on the number of electrical boxes in a room, ensuring a reasonable labeling layout, and accommodating rapid adjustments during design changes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120470730B_ABST
    Figure CN120470730B_ABST
Patent Text Reader

Abstract

The application relates to a power distribution box label generation method and a related device thereof, which comprises the following steps: identifying a target room and a power distribution box in a target drawing, wherein the target room comprises at least one power distribution box; determining lead information of a lead of the power distribution box based on a target quantity of the power distribution box in the target room, a target point of the power distribution box and a preset lead type, wherein the lead type comprises an orthogonal lead type and a non-orthogonal lead type; and generating a label of the power distribution box in the target drawing according to the lead information of the lead, wherein the label comprises a number parameter of the power distribution box, and the lead is used for connecting the target point and the label. According to the scheme provided by the application, a suitable labeling mode can be selected according to the quantity of the power distribution boxes in the room, the labeling efficiency can be improved, and the labeling layout is more beautiful and reasonable.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of electrical equipment, in particular to a method for generating distribution box labeling and a related device thereof. BACKGROUND

[0002] In electrical drawing design, distribution box labeling is an important link in construction drawings, and its accuracy directly affects the construction quality and the efficiency of later maintenance. The traditional distribution box labeling method mainly relies on manual operation, and the designer needs to identify the distribution box position one by one, manually draw the lead line and input the labeling information. Generally, when dealing with large-scale construction projects, a lot of mechanical operations need to be repeated.

[0003] In related technologies, although there are related auxiliary labeling tools, these tools still need manual intervention to select the labeling position and style, and cannot realize true automation processing, and often appear labeling overlapping or arrangement confusion. When the design drawing changes, the designer needs to re-label and adjust, resulting in low labeling efficiency of the distribution box. SUMMARY

[0004] To solve or partially solve the problems in related technologies, the present application provides a method for generating distribution box labeling and a related device thereof, which can select the appropriate labeling method according to the number of distribution boxes in the room, improve the labeling efficiency, and make the labeling layout more beautiful and reasonable.

[0005] The first aspect of the present application provides a method for generating distribution box labeling, comprising: identifying a target room and a distribution box in a target drawing, the target room comprising at least one distribution box; determining lead line information of a lead line of the distribution box based on a target number of the distribution box in the target room, a target point of the distribution box and a preset lead line type, the lead line type comprising an orthogonal lead line type and a non-orthogonal lead line type, wherein when the target number of the distribution box in the target room is not greater than a first threshold value; generating a target coordinate system according to position information of the target point of the distribution box; determining a first direction and a third direction of the lead line of the distribution box on the target coordinate system according to the lead line type; determining a first length of the lead line of the distribution box on the target coordinate system according to a view scale of the target drawing, wherein the view scale is proportional to the first length; and generating a label of the distribution box in the target drawing according to the lead line information of the lead line, the label comprising a number parameter of the distribution box, and the lead line being used to connect the target point and the label.

[0006] With reference to the first aspect, in a possible implementation manner of the first aspect, after the target room and the distribution box in the target drawing are identified, the method further includes: obtaining a target parameter of the distribution box; determining whether the target parameter of the distribution box includes a number parameter of the distribution box; and if the target parameter does not include the number parameter, receiving target input information and generating the number parameter of the distribution box according to the target input information.

[0007] With reference to the first aspect, in a possible implementation manner of the first aspect, the determining, according to the lead type, of the first direction and the third direction of the lead of the distribution box in the target coordinate system includes: when the lead type is a non-orthogonal lead type, determining that an angle between the third direction of the lead and an X axis of the target coordinate system is a preset angle; and when the lead type is an orthogonal lead type, determining that the first direction of the lead is consistent with a Y axis direction of the target coordinate system.

[0008] With reference to the first aspect, in a possible implementation manner of the first aspect, the determining, based on the target quantity of the distribution boxes in the target room, the target point of the distribution box, and the preset lead type, of the lead information of the lead of the distribution box includes: when the target quantity of the distribution boxes in the target room is greater than a second threshold; generating a minimum circumscribed circle of the target room and a minimum circumscribed rectangle of the minimum circumscribed circle according to edge information of the target room; dividing the minimum circumscribed rectangle into a first target region and a second target region according to a diagonal line of the minimum circumscribed rectangle; and determining a second direction and a second length of the lead according to a positional relationship between the target point of the distribution box and the first target region and the second target region and the lead type.

[0009] With reference to the first aspect, in a possible implementation manner of the first aspect, the lead type is a non-orthogonal lead type, and the determining, according to the positional relationship between the target point of the distribution box and the first target region and the second target region and the lead type, of the second direction and the second length of the lead includes: when the target point is located in the first target region, taking an extension direction of a line connecting a center of the minimum circumscribed circle and the target point as the second direction of the lead; obtaining a first intersection point of the target point and an edge of the minimum circumscribed rectangle in the second direction, and taking a distance between the target point and the first intersection point as the second length of the lead; and / or when the target point is located in the second target region, taking an extension direction of a line connecting the center of the minimum circumscribed circle and the target point as the second direction of the lead; obtaining a second intersection point of the target point and the minimum circumscribed circle in the second direction, and taking a distance between the target point and the second intersection point as the second length of the lead.

[0010] With reference to the first aspect, in a possible implementation form of the first aspect, the lead type is a perpendicular lead type, and the determining the second direction and the second length of the lead according to the positional relationship between the target point of the distribution box and the first target region and the second target region and the lead type comprises: when the target point is located in the first target region, determining that the second direction of the lead is a horizontal direction, and determining an extension direction of the lead in the second direction according to position information of the target point; obtaining a third intersection point where the extension direction of the target point in the second direction intersects with a side line of the minimum circumscribed rectangle, and taking a distance between the target point and the third intersection point as the second length of the lead; and / or when the target point is located in the second target region, determining that the second direction of the lead is a vertical direction, and determining an extension direction of the lead in the second direction according to position information of the target point; obtaining a fourth intersection point where the extension direction of the target point in the second direction intersects with the minimum circumscribed circle, and taking a distance between the target point and the fourth intersection point as the second length of the lead.

[0011] The second aspect of the present application provides a distribution box label generation device. The distribution box label generation device executes the method described above, and comprises: a recognition module configured to recognize a target room and a distribution box in a target drawing, the target room comprising at least one distribution box; a determination module configured to determine lead information of a lead of the distribution box based on a target number of the distribution box in the target room, a target point of the distribution box, and a preset lead type, the lead type comprising a perpendicular lead type and a non-perpendicular lead type, wherein when the target number of the distribution box in the target room is not greater than a first threshold value; a target coordinate system is generated according to position information of the target point of the distribution box; a first direction and a third direction of the lead of the distribution box in the target coordinate system are determined according to the lead type; a first length of the lead of the distribution box in the target coordinate system is determined according to a view scale of the target drawing, wherein the view scale is proportional to the first length; and a generation module configured to generate a label of the distribution box in the target drawing according to the lead information of the lead, the label comprising a number parameter of the distribution box, and the lead being used to connect the target point and the label.

[0012] With reference to the second aspect, in a possible implementation form of the second aspect, the recognition module is further configured to obtain a target parameter of the distribution box; determine whether the target parameter of the distribution box comprises the number parameter of the distribution box; if the target parameter does not comprise the number parameter, receive target input information, and generate the number parameter of the distribution box according to the target input information.

[0013] With reference to the second aspect, in a possible implementation manner of the second aspect, the determining module is further configured to: when the lead type is a non-orthogonal lead type, determine that an angle between the third direction of the lead and an X axis of the target coordinate system is a preset angle; and when the lead type is an orthogonal lead type, determine that the first direction of the lead is consistent with a Y axis direction of the target coordinate system.

[0014] With reference to the second aspect, in a possible implementation manner of the second aspect, the determining module is further configured to: when the target number of the power distribution boxes in the target room is greater than a second threshold; generate a minimum circumscribed circle of the target room and a minimum circumscribed rectangle of the minimum circumscribed circle according to the side line information of the target room; divide the minimum circumscribed rectangle into a first target region and a second target region according to a diagonal line of the minimum circumscribed rectangle; and determine the second direction and the second length of the lead according to a positional relationship between the target point of the power distribution box and the first target region and the second target region and the lead type.

[0015] With reference to the second aspect, in a possible implementation manner of the second aspect, the determining module is further configured to: when the target point is located in the first target region, take an extension direction of a line connecting the center of the minimum circumscribed circle and the target point as the second direction of the lead; obtain a first intersection point of the target point and a side line of the minimum circumscribed rectangle in the second direction, and take a distance between the target point and the first intersection point as the second length of the lead; and / or, when the target point is located in the second target region, take an extension direction of a line connecting the center of the minimum circumscribed circle and the target point as the second direction of the lead; obtain a second intersection point of the target point and the minimum circumscribed circle in the second direction, and take a distance between the target point and the second intersection point as the second length of the lead.

[0016] With reference to the second aspect, in a possible implementation manner of the second aspect, the determining module is further configured to: when the target point is located in the first target region, determine that the second direction of the lead is a horizontal direction, and determine an extension direction of the lead in the second direction according to the position information of the target point; obtain a third intersection point of the extension direction of the target point in the second direction and a side line of the minimum circumscribed rectangle, and take a distance between the target point and the third intersection point as the second length of the lead; and / or, when the target point is located in the second target region, determine that the second direction of the lead is a vertical direction, and determine an extension direction of the lead in the second direction according to the position information of the target point; obtain a fourth intersection point of the extension direction of the target point in the second direction and the minimum circumscribed circle, and take a distance between the target point and the fourth intersection point as the second length of the lead.

[0017] The third aspect of the present application provides an electronic device, comprising:

[0018] a processor; and

[0019] a memory having stored thereon executable code that, when executed by the processor, causes the processor to perform the method described above.

[0020] The fourth aspect of the present application provides a computer-readable storage medium having stored thereon executable code that, when executed by a processor of an electronic device, causes the processor to perform the method described above.

[0021] The technical solutions provided by the present application can include the following beneficial effects:

[0022] The method for generating distribution box labeling and the related device provided by the present application include the following steps: recognizing a target room and a distribution box in a target drawing, the target room including at least one distribution box; determining lead information of a lead of the distribution box based on a target number of the distribution boxes in the target room, a target point of the distribution box, and a preset lead type, the lead type including an orthogonal lead type and a non-orthogonal lead type, wherein, when the target number of the distribution boxes in the target room is not greater than a first threshold value; generating a target coordinate system according to position information of the target point of the distribution box; determining a first direction and a third direction of the lead of the distribution box on the target coordinate system according to the lead type; determining a first length of the lead of the distribution box on the target coordinate system according to a view scale of the target drawing, wherein the view scale is proportional to the first length; and generating labeling of the distribution box in the target drawing according to the lead information of the lead, the labeling including a number parameter of the distribution box, and the lead being used to connect the target point and the labeling. The labeling method can select a suitable labeling method according to the number of the distribution boxes in the room, and can improve the labeling efficiency and make the labeling layout more beautiful and reasonable.

[0023] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present application. BRIEF DESCRIPTION OF DRAWINGS

[0024] The above and other objects, features and advantages of the present application will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings, in which like reference characters refer to like parts throughout the figures, and wherein:

[0025] Figure 1 is a flow diagram of the method for generating distribution box labeling shown in the embodiments of the present application;

[0026] Figure 2 is a structural diagram of the device for generating distribution box labeling shown in the embodiments of the present application;

[0027] Figure 3 is a structural schematic diagram of an electronic device shown by an embodiment of the present application;

[0028] Figure 4 is a labeling structural schematic diagram of a single distribution box of a non-orthogonal lead type shown by an embodiment of the present application;

[0029] Figure 5 is a labeling structural schematic diagram of a single distribution box of an orthogonal lead type shown by an embodiment of the present application;

[0030] Figure 6 is a labeling structural schematic diagram of a multiple distribution box of a non-orthogonal lead type shown by an embodiment of the present application;

[0031] Figure 7 is a labeling structural schematic diagram of a multiple distribution box of an orthogonal lead type shown by an embodiment of the present application. DETAILED DESCRIPTION

[0032] Embodiments of the present application will be described in more detail by referring to the drawings. Although embodiments of the present application are shown in the drawings, it should be understood that the present application can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided so that the present application will be thorough and complete, and will fully convey the scope of the present application to those skilled in the art.

[0033] The terminology used in the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the present application. As used in the present application and the appended claims, the singular forms "a," "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0034] It should be understood that although the terms "first," "second," "third," etc. can be employed in this application to describe various information, such information should not be limited by these terms. These terms are only used to distinguish one piece of information from another. For example, a first information can also be termed a second information, and, similarly, a second information can also be termed a first information, without departing from the scope of the present application. Therefore, the features defined with "first," "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.

[0035] In design drawing, the labeling of the distribution box is to clearly and accurately convey the information of the distribution box, such as the specification, model, installation method and electrical parameters. The core purpose is to ensure that the construction party and the operation and maintenance personnel can accurately identify the physical characteristics and electrical performance of the distribution box, and ensure the normative installation of the equipment and the traceability of the subsequent operation and maintenance.

[0036] In the related art, the labeling of the distribution box currently mainly relies on manual labeling of each distribution box. Although it can replace part of the manual intervention, when a large number of distribution boxes need to be labeled, there is a lack of global labeling method, and batch labeling cannot be realized. The whole process still depends on manual work, and the labeling efficiency is low. When design changes occur, automatic updating cannot be realized, and the adjustment adaptability is poor.

[0037] To solve the above problems, the embodiment of the present application provides a distribution box labeling generation method and related device, which can select a suitable labeling method according to the number of distribution boxes in the room, improve the labeling efficiency, and make the labeling layout more beautiful and reasonable.

[0038] The technical solutions of the embodiments of the present application are described in detail below with reference to the drawings.

[0039] Figure 1 is a flowchart of the distribution box labeling generation method shown in the embodiment of the present application.

[0040] Referring to Figure 1 A distribution box labeling generation method comprises the following steps:

[0041] S110: identifying a target room and a distribution box in a target drawing, the target room comprising at least one distribution box.

[0042] Specifically, the target room refers to a building functional area containing at least one distribution box, which can be realized by the component recognition function of the three-dimensional modeling software. There can be multiple target rooms in the target drawing, and the distribution box can also be obtained by recognizing the component recognition function of the three-dimensional modeling software.

[0043] In a possible implementation, after identifying the target room and the distribution box in the target drawing, the method comprises: obtaining a target parameter of the distribution box; determining whether the target parameter of the distribution box comprises a number parameter of the distribution box; if the target parameter does not contain the number parameter, receiving target input information, and generating the number parameter of the distribution box according to the target input information.

[0044] Specifically, the target parameter can be a set of electrical property data of the distribution box. When setting the distribution box in the target drawing, the target parameter of the distribution box can be set. The target parameter of the distribution box can include a number parameter of the distribution box. The number parameter can be a character sequence for uniquely identifying the distribution box, for example, it can be a "cabinet number" field in the project parameter, which is added to the electrical equipment category instance attribute in the form of a shared parameter. Before labeling the distribution box, it can be verified whether the distribution box has a number parameter. When the distribution box does not have a number parameter, the identification data of the distribution box can be manually input, and the number parameter of the distribution box is set. For example, the software can receive the character string entered by the user through an interactive dialog box, and assign the character string to the number parameter attribute of the distribution box instance.

[0045] Specifically, after the target room and the distribution box are identified, the distribution box instance attribute set is first traversed to detect whether the "cabinet number" field and its valid value exist. If it is detected that the parameter exists and contains a valid string, the subsequent labeling process is directly entered. If it is detected that the parameter is missing or the value is empty, a human-computer interaction interface can be triggered to guide the operator to input the number information conforming to the specification. After the input is completed, the character sequence manually input is written to the "cabinet number" attribute of the distribution box instance. After the parameter is supplemented, the automatic labeling operation is continued to ensure that each distribution box has complete labeling basic data.

[0046] Specifically, after the "cabinet number" attribute of the distribution box instance is written by manually inputting the character sequence, the user can manually label the distribution box. The labeling method can be orthogonal lead type or non-orthogonal lead type labeling. The specific lead information can be set according to the user's needs, and then the labeling of the distribution box is generated.

[0047] S120: based on the target quantity of the distribution box in the target room, the target point of the distribution box, and the preset lead type, determine the lead information of the lead of the distribution box. The lead type includes an orthogonal lead type and a non-orthogonal lead type. When the target quantity of the distribution box in the target room is not greater than a first threshold value; generate a target coordinate system according to the position information of the target point of the distribution box; according to the lead type, determine a first direction and a third direction of the lead of the distribution box in the target coordinate system; according to the view scale of the target drawing, determine a first length of the lead of the distribution box in the target coordinate system, wherein the view scale is proportional to the first length.

[0048] Specifically, the target number of distribution boxes in the target room can be obtained by traversing the electrical equipment category instances within the room boundary range, and the target number can be 1, 2, etc., which is not limited here. The target point can be the spatial coordinates of the distribution box in the drawing, and the insertion point coordinates of the equipment family instance can be used as the reference position. The insertion point of the distribution box is taken as the target point. In the drawing, the position of the distribution box can be moved by moving the target point. The preset lead type can include orthogonal and non-orthogonal modes. The orthogonal lead type can use horizontal or vertical direction path generation algorithm, and the non-orthogonal lead type can use angle calculation module to realize oblique lead drawing. Finally, the lead information of the lead of the distribution box is determined, and the lead can take the target point of the distribution box as the lead starting point.

[0049] Specifically, the first threshold refers to the critical value for triggering single distribution box labeling logic, which can be 1, for example, and is not limited here. The lead information of the lead of the distribution box can be generated by the single distribution box labeling rule. The target coordinate system is a local coordinate system established with the target point of the distribution box as the center. Specifically, the instance coordinate axis of the distribution box family can be used as the coordinate system reference. The lead type includes orthogonal and non-orthogonal types, which can be selected by a preset parameter. The orthogonal lead is only allowed to extend horizontally or vertically, and the non-orthogonal lead is allowed to extend at a specific angle. The view scale refers to the conversion coefficient of the drawing display scale and the actual size, which can be automatically obtained according to the properties of the target drawing, and is used to dynamically adjust the proportional relationship between the lead length and the labeling position.

[0050] Specifically, when a single distribution box is detected in the room, a local coordinate system is first established with the target point coordinates of the distribution box as the origin, and according to different lead types, the first direction of the lead of the distribution box in the target coordinate system is determined. Then, the view scale is used to dynamically adjust the lead length to ensure the layout rationality of the lead length under different scaling ratios, so that the label generated by the lead is easy to read and beautiful.

[0051] Referring to Figures 4-5 In one possible implementation, when the lead type is a non-orthogonal lead type, the angle between the third direction of the lead and the X-axis of the target coordinate system is determined to be a preset angle; when the lead type is an orthogonal lead type, the first direction of the lead is determined to be consistent with the direction of the Y-axis of the target coordinate system.

[0052] Specifically, the non-orthogonal lead type refers to a connection line type in which the lead direction is not perpendicular or parallel to the coordinate axis, and the orthogonal lead type refers to a connection line type in which the lead direction strictly follows the direction of the coordinate axis, and can be specifically implemented by forcibly aligning the Y-axis direction. When the lead type is the non-orthogonal lead type, a lead direction forming a fixed included angle with the X-axis is generated according to a preset angle, for example, a 45-degree diagonal line is used to connect the label point and the distribution box target point, and the angle can also be a typical angle value of 30 degrees, 60 degrees, etc., which is not limited here, and the first length of the lead can be 10 millimeters divided by the view scale value to obtain the actual display length; if the lead type is the orthogonal lead type, the vertical direction consistent with the Y-axis is directly used as the lead path, and the first length of the lead can be 7.2 millimeters divided by the view scale value to obtain the actual display length.

[0053] In a possible implementation, when the target number of distribution boxes in the target room is greater than a second threshold value; according to the side line information of the target room, a minimum circumscribed circle of the target room and a minimum circumscribed rectangle of the minimum circumscribed circle are generated; according to the diagonal of the minimum circumscribed rectangle, the minimum circumscribed rectangle is divided into a first target area and a second target area; according to the positional relationship between the target point of the distribution box and the first target area, the second target area, and the lead type, the second direction and the second length of the lead are determined.

[0054] Specifically, the second threshold value refers to the critical value of the multi-distribution box scene requiring special processing when the number of distribution boxes in the target room reaches, for example, 2 or more distribution boxes, and when the number of distribution boxes in the target room reaches the second threshold value, the multi-distribution box labeling mode can be triggered. The minimum circumscribed circle refers to the smallest circular boundary that can completely surround the room contour, and the center and radius can be determined by calculating the extreme point coordinates of each boundary of the room. The minimum circumscribed rectangle refers to a rectangle with the same center as the minimum circumscribed circle and the edges aligned with the coordinate axes, which can be generated by calculating the boundary points extending in the diameter direction of the circle. After generating the minimum circumscribed circle and the minimum circumscribed rectangle, the minimum circumscribed rectangle can be divided into four triangular areas, which are used as the first target area and the second target area. For example, the triangular areas on the left and right sides of the minimum circumscribed rectangle can be used as the first target area, and the triangular areas on the upper and lower sides of the minimum circumscribed rectangle can be used as the second target area. According to the target point of the distribution box located in the first target area or the second target area and the lead type, the second direction and the second length of the lead can be obtained.

[0055] Referring to Figure 6 In a possible implementation, when the lead type is the non-orthogonal lead type, and the target point is located in the first target area, the extension direction of the line connecting the center of the minimum circumscribed circle and the target point is used as the second direction of the lead, the first intersection point of the target point intersecting the side line of the minimum circumscribed rectangle in the second direction is obtained, and the distance between the target point and the first intersection point is used as the second length of the lead.

[0056] Specifically, the power distribution box in the first target region on the left side or the right side, i.e., the target point of the power distribution box is in the first target region on the left side or the right side, can be taken as the first target region, and the direction of the line connecting the center of the circle to the target point is taken as the extension path of the lead line until the direction intersects with the edge line of the minimum circumscribed rectangle, and the straight line segment between the two points is taken as the lead line. For example, when the power distribution box is located in the left half of the room, the lead line extends along the direction of the line connecting the center of the circle to the power distribution box to the left edge line of the room, forming an oblique lead line.

[0057] In a possible implementation, when the lead line type is a non-orthogonal lead line type, when the target point is in the second target region, the extension direction of the line connecting the center of the minimum circumscribed circle to the target point is taken as the second direction of the lead line; a second intersection point at which the target point intersects with the minimum circumscribed circle in the second direction is obtained, and the distance between the target point and the second intersection point is taken as the second length of the lead line.

[0058] Specifically, the power distribution box in the second target region on the upper side or the lower side, i.e., the target point of the power distribution box is in the second target region on the upper side or the lower side, can be taken as the second target region, and the direction of the line connecting the center of the circle to the target point is taken as the extension path of the lead line, then the line segment between the two points, i.e., the point at which the extension direction intersects with the minimum circumscribed circle and the center of the circle, is taken as the length of the lead line.

[0059] Referring to Figure 7 In a possible implementation, when the lead line type is an orthogonal lead line type, when the target point is in the first target region, the second direction of the lead line is determined as the horizontal direction, and the extension direction of the lead line in the second direction is determined according to the position information of the target point; a third intersection point at which the extension direction of the target point in the second direction intersects with the edge line of the minimum circumscribed rectangle is obtained, and the distance between the target point and the third intersection point is taken as the second length of the lead line.

[0060] Specifically, the orthogonal lead line type refers to the direction of the lead line being limited to the horizontal or vertical direction, which can be aligned with the axes of the coordinate system. The power distribution box in the first target region on the left side or the right side, i.e., the target point of the power distribution box is in the first target region on the left side or the right side, can be taken as the first target region, and the target point of the power distribution box is taken as the starting point of the lead line. The target point in the first target region on the left side determines that the direction of the lead line is to extend horizontally to the left, and the target point in the first target region on the right side determines that the direction of the lead line is to extend horizontally to the right. The intersection point at which the target point intersects with the edge line of the minimum circumscribed rectangle in the horizontal direction is obtained respectively, and the distance between the target point and the intersection point is taken as the length of the lead line.

[0061] In a possible implementation, when the lead type is the orthogonal lead type, when the target point is located in the second target area, the second direction of the lead is determined as the vertical direction, and the extension direction of the lead in the second direction is determined according to the position information of the target point; a fourth intersection point where the extension direction of the target point in the second direction intersects with the minimum circumscribed circle is obtained, and the distance between the target point and the fourth intersection point is taken as the second length of the lead.

[0062] Specifically, the target point located in the first target area on the upper side is determined to extend vertically upward, the target point located on the lower side is determined to extend vertically downward, and the intersection point where the target point intersects with the edge line of the minimum circumscribed rectangle in the vertical direction is obtained respectively, and the distance between the target point and the intersection point is taken as the length of the lead.

[0063] S130: generating the label of the distribution box in the target drawing according to the lead information of the lead, the label including the number parameter of the distribution box, and the lead being used to connect the target point and the label.

[0064] Specifically, the lead information can be the lead start point information of the lead, the direction information of the lead, for example, the angle of the lead, the length information of the lead, and the like. The lead and the label can be generated on the distribution box according to the lead information of the lead. The lead is used to connect the distribution box and the label. The label can include a horizontal line segment. One end of the lead can be connected to the nearest end point of the horizontal line segment in the label. The number parameter of the distribution box can be filled above or below the horizontal line.

[0065] The application further provides a generation method of a distribution box label, which comprises the following steps: identifying a target room and a distribution box in a target drawing, the target room including at least one distribution box; determining lead information of a lead of the distribution box based on a target quantity of the distribution box in the target room, a target point of the distribution box, and a preset lead type, the lead type including an orthogonal lead type and a non-orthogonal lead type, wherein when the target quantity of the distribution box in the target room is not greater than a first threshold value; generating a target coordinate system according to position information of the target point of the distribution box; determining a first direction and a third direction of the lead of the distribution box in the target coordinate system according to the lead type; determining a first length of the lead of the distribution box in the target coordinate system according to a view scale of the target drawing, wherein the view scale is proportional to the first length; and generating a label of the distribution box in the target drawing according to the lead information of the lead, the label including a number parameter of the distribution box, and the lead being used to connect the target point and the label. The number of distribution boxes in a room can be used to select a suitable labeling method, which can improve the labeling efficiency and make the labeling layout more beautiful and reasonable.

[0066] Corresponding to the foregoing application function implementation method embodiments, the application further provides a generation device of a distribution box label, an electronic device, and corresponding embodiments.

[0067] Figure 2 is a structural schematic diagram of a power distribution box label generation device shown in an embodiment of the present application.

[0068] Referring to Figure 2 A power distribution box label generation device 200 includes:

[0069] The identification module 210 is configured to identify a target room and a power distribution box in a target drawing, and the target room includes at least one power distribution box.

[0070] In a possible implementation, the identification module 210 is further configured to acquire a target parameter of the power distribution box; determine whether the target parameter of the power distribution box includes a number parameter of the power distribution box; if the target parameter does not include the number parameter, receive target input information, and generate the number parameter of the power distribution box according to the target input information.

[0071] The determination module 220 is configured to determine lead information of a lead of the power distribution box based on a target number of the power distribution boxes in the target room, a target point of the power distribution box, and a preset lead type, the lead type including an orthogonal lead type and a non-orthogonal lead type, wherein when the target number of the power distribution boxes in the target room is not greater than a first threshold value; generate a target coordinate system according to position information of the target point of the power distribution box; determine a first direction and a third direction of the lead of the power distribution box on the target coordinate system according to the lead type; and determine a first length of the lead of the power distribution box on the target coordinate system according to a view scale of the target drawing, wherein the view scale is proportional to the first length.

[0072] In a possible implementation, the determination module 220 is further configured to, when the lead type is the non-orthogonal lead type, determine that an angle between the third direction of the lead and an X-axis of the target coordinate system is a preset angle; and when the lead type is the orthogonal lead type, determine that the first direction of the lead is consistent with a Y-axis direction of the target coordinate system.

[0073] In a possible implementation, the determination module 220 is further configured to, when the target number of the power distribution boxes in the target room is greater than a second threshold value; generate a minimum circumscribed circle of the target room and a minimum circumscribed rectangle of the minimum circumscribed circle according to edge information of the target room; divide the minimum circumscribed rectangle into a first target area and a second target area according to a diagonal line of the minimum circumscribed rectangle; and determine a second direction and a second length of the lead according to a position relationship between the target point of the power distribution box and the first target area and the second target area and the lead type.

[0074] In a possible implementation, the determining module 220 is further configured to, when the target point is located in the first target region, determine an extension direction of the lead line in the second direction according to the position information of the target point, acquire a third intersection point where the extension direction of the lead line in the second direction intersects with the side line of the minimum circumscribed rectangle, and determine the second length of the lead line as a distance between the target point and the third intersection point; and / or, when the target point is located in the second target region, determine the second direction of the lead line as a vertical direction, determine the extension direction of the lead line in the second direction according to the position information of the target point, acquire a fourth intersection point where the extension direction of the lead line in the second direction intersects with the minimum circumscribed circle, and determine the second length of the lead line as a distance between the target point and the fourth intersection point.

[0075] In a possible implementation, the determining module 220 is further configured to, when the target point is located in the first target region, determine the second direction of the lead line as a horizontal direction, determine the extension direction of the lead line in the second direction according to the position information of the target point, acquire a third intersection point where the extension direction of the lead line in the second direction intersects with the side line of the minimum circumscribed rectangle, and determine the second length of the lead line as a distance between the target point and the third intersection point; and / or, when the target point is located in the second target region, determine the second direction of the lead line as a vertical direction, determine the extension direction of the lead line in the second direction according to the position information of the target point, acquire a fourth intersection point where the extension direction of the lead line in the second direction intersects with the minimum circumscribed circle, and determine the second length of the lead line as a distance between the target point and the fourth intersection point.

[0076] The generating module 230 is configured to generate, according to the lead line information of the lead line, a label of the distribution box in the target drawing, the label including a number parameter of the distribution box, and the lead line being used to connect the target point and the label.

[0077] The application provides a label generation device of a distribution box.

[0078] With reference to the device in the above embodiments, specific manners in which various modules perform operations have been described in detail in the embodiments of the method, and will not be described here in detail.

[0079] The application also provides an electronic device. Figure 3Fig. 1 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application. The electronic device includes a memory 320 and at least one processor 310. The memory 320 is electrically connected to the at least one processor 310. The memory 320 stores instructions. The at least one processor 310 invokes the instructions in the memory 320, so that the electronic device performs a method for generating a power distribution box label according to any one of the preceding embodiments of the present application.

[0080] In particular, the processor 310 can include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement one or more embodiments of the present application.

[0081] The memory 320 can include a mass storage that stores data or instructions. For example, but not limited to, the memory 320 can include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. Where appropriate, the memory 320 can include removable or non-removable (or fixed) media. Where appropriate, the memory 320 can be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 320 is a non-volatile solid-state memory. In a particular embodiment, the memory 320 includes read-only memory (ROM). Where appropriate, the ROM can be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory, or a combination of two or more of these.

[0082] In one example, the control device can also include a communication interface 330 and a bus 340. The processor 310, the memory 320, and the communication interface 330 are connected through the bus 340 and complete communication with each other.

[0083] The communication interface 330 is mainly used to realize the communication between the modules, devices, units, and / or equipment in the embodiments of the present application.

[0084] Bus 340 includes hardware, software, or both, to couple components of the online data traffic metering device to each other and to other components. While the application is not limited to particular bus structures, in this application, bus could be, for example, an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front-side bus (FSB), a HyperTransport (HT) interconnect, an industry standard architecture (ISA) bus, an infiniband interconnect, a low pin count (LPC) bus, a microchannel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standards board (VLB) bus, or another suitable bus or a combination of two or more of these. Where suitable, bus 340 can include one or more buses. Although this application describes and shows a particular bus, this application contemplates any suitable bus or interconnect.

[0085] In addition, in combination with the generation method of the distribution box label in the above embodiments, the embodiments of the present application can provide a computer readable storage medium to implement. The computer readable storage medium has executable code stored thereon, and the executable code is executed by a processor to implement any of the generation methods of the distribution box label in the above embodiments.

[0086] The application is not limited to the particular configurations and processes described above and shown in the drawings. For the sake of brevity, detailed descriptions of known methods are omitted. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order of the steps, after understanding the spirit of the present application.

[0087] The functional blocks shown in the above structural block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, etc. When implemented in software, the elements of the present application are program or code segments used to perform the required tasks. The program or code segments can be stored in a machine readable medium or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. The "machine readable medium" can include any medium capable of storing or transmitting information. Examples of machine readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. The code segments can be downloaded via a computer network such as the Internet, an intranet, etc.

[0088] It should also be noted that the example embodiments mentioned in the present application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiments, or in an order different from the embodiments, or several steps are performed simultaneously.

[0089] The above is only a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the system, module and unit described above can refer to the corresponding process in the foregoing method embodiments, which will not be described here. It should be understood that the protection scope of the present application is not limited thereto, and any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements shall be covered within the protection scope of the present application.

Claims

1. A method for generating a distribution box label, characterized in that: include: Identifying a target room and a distribution box in a target drawing, wherein the target room includes at least one distribution box; Based on the target number of the distribution boxes in the target room, the target point of the distribution box and the preset lead type, determining the lead information of the lead of the distribution box, wherein the lead type includes an orthogonal lead type and a non-orthogonal lead type, wherein when the target number of the distribution boxes in the target room is not greater than a first threshold; generating a target coordinate system according to the position information of the target point of the distribution box; determining the first direction and the third direction of the lead of the distribution box in the target coordinate system according to the lead type; determining the first length of the lead of the distribution box in the target coordinate system according to the view scale of the target drawing, wherein the view scale is proportional to the first length; According to the lead information of the lead, a mark of the distribution box is generated in the target drawing, the mark includes the number parameter of the distribution box, and the lead is used to connect the target point and the mark.

2. The method according to claim 1, characterized in that After identifying the target room and distribution box in the target drawing, including: Obtaining target parameters of the distribution box; Determining whether the target parameters of the distribution box include the number parameter of the distribution box; If the target parameters do not include the numbering parameters, target input information is received, and the numbering parameters of the distribution box are generated according to the target input information.

3. The method according to claim 1, characterized in that The determining, according to the lead type, a first direction and a third direction of the lead of the distribution box in the target coordinate system includes: When the lead type is a non-orthogonal lead type, determining that the angle between the third direction of the lead and the X-axis of the target coordinate system is a preset angle; When the lead type is an orthogonal lead type, it is determined that the first direction of the lead is consistent with the Y-axis direction of the target coordinate system.

4. The method according to claim 1, wherein The determining, based on the target number of the distribution boxes in the target room, the target point of the distribution boxes, and the preset lead type, lead information of the leads of the distribution boxes includes: When the target number of the distribution boxes in the target room is greater than a second threshold; Generating a minimum circumscribed circle of the target room and a minimum circumscribed rectangle of the minimum circumscribed circle according to the edge information of the target room; Dividing the minimum circumscribed rectangle into a first target area and a second target area according to a diagonal line of the minimum circumscribed rectangle; The second direction and the second length of the lead are determined according to the positional relationship between the target point of the distribution box and the first target area, the second target area, and the type of the lead.

5. The method according to claim 4, characterized in that The lead type is a non-orthogonal lead type, and determining the second direction and second length of the lead according to the positional relationship between the target point of the distribution box and the first target area and the second target area and the lead type includes: When the target point is located in the first target area, the extending direction of the line connecting the center of the minimum circumscribed circle and the target point is used as the second direction of the lead; Obtaining a first intersection point where the target point intersects the edge line of the minimum circumscribed rectangle in the second direction, and using the distance between the target point and the first intersection point as the second length of the lead line; and / or, when the target point is located in the second target area, an extension direction of a line connecting the center of the minimum circumscribed circle and the target point is used as the second direction of the lead; A second intersection point where the target point intersects the minimum circumscribed circle in the second direction is obtained, and a distance between the target point and the second intersection point is used as a second length of the lead.

6. The method according to claim 4, characterized in that The lead type is an orthogonal lead type, and determining the second direction and second length of the lead according to the positional relationship between the target point of the distribution box and the first target area and the second target area and the lead type includes: When the target point is located in the first target area, determining that the second direction of the lead is a horizontal direction, and determining an extension direction of the lead in the second direction according to the position information of the target point; Obtaining a third intersection point where the extension direction of the target point in the second direction intersects the edge line of the minimum circumscribed rectangle, and using the distance between the target point and the third intersection point as the second length of the lead line; and / or, when the target point is located in the second target area, determining that the second direction of the lead is a vertical direction, and determining an extension direction of the lead in the second direction according to the position information of the target point; A fourth intersection point where the extension direction of the target point in the second direction intersects the minimum circumscribed circle is obtained, and a distance between the target point and the fourth intersection point is used as the second length of the lead.

7. A device for generating distribution box annotations, characterized in that: The device for generating a distribution box annotation executes the method according to any one of claims 1 to 6, including: an identification module, configured to identify a target room and a distribution box in a target drawing, wherein the target room includes at least one distribution box; a determination module, configured to determine lead information of the leads of the distribution box based on a target number of the distribution boxes in the target room, a target point of the distribution box, and a preset lead type, wherein the lead type includes an orthogonal lead type and a non-orthogonal lead type, wherein when the target number of the distribution boxes in the target room is not greater than a first threshold; generate a target coordinate system according to the position information of the target point of the distribution box; determine a first direction and a third direction of the leads of the distribution box in the target coordinate system according to the lead type; determine a first length of the leads of the distribution box in the target coordinate system according to the view scale of the target drawing, wherein the view scale is proportional to the first length; A generation module is used to generate a mark of the distribution box in the target drawing according to the lead information of the lead, the mark includes the number parameter of the distribution box, and the lead is used to connect the target point and the mark.

8. An electronic device, characterized in that: include: processor; as well as A memory having executable codes stored thereon, which, when executed by the processor, causes the processor to execute the method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that An executable code is stored thereon, and when the executable code is executed by a processor of an electronic device, the processor is caused to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Cabin division view marking method for 10-35kV switch cabinet of power system

    CN105740340A

  • Automatic part size labeling method and device, computer readable medium and equipment

    CN118968153A