A cable path extraction method based on reverse order tree
The method of automatically extracting cable paths for photovoltaic power plants by using the reverse tree method solves the problem of high workload caused by frequent and complex changes in cable path design schemes, and achieves fast and accurate cable path extraction, thereby improving design efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- POWERCHINA HEBEI ELECTRIC POWER SURVEY & DESIGN INST CO LTD
- Filing Date
- 2023-11-27
- Publication Date
- 2026-06-26
Smart Images

Figure CN117610100B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cable laying technology in photovoltaic areas, and in particular to a cable path extraction method based on a reverse tree. Background Technology
[0002] With rapid economic development, the demand for energy is becoming increasingly urgent, and solar energy, as a clean and reusable new energy source, is being widely used. As photovoltaic technology continues to mature, large-scale ground-mounted grid-connected photovoltaic power plants are experiencing an unprecedented construction boom.
[0003] In photovoltaic power plant design, CAD is typically used for cable routing design. In CAD drawings, non-closed polylines represent cable route segments, and rectangles represent transformer substations (short for box-type transformers). The starting point of a cable route segment is the substation end, and the ending point is another substation end or a step-up substation end. Due to frequent changes in cable route design schemes and the complexity of cable routes, manually extracting cable route data is labor-intensive and inefficient. Therefore, there is an urgent need for a method that can automatically and quickly extract cable routes. Summary of the Invention
[0004] The technical problem to be solved by the present invention is to provide a cable path extraction method based on a reverse tree, which can automatically and quickly extract cable paths.
[0005] To solve the above-mentioned technical problems, the technical solution adopted by the present invention is as follows:
[0006] A cable path extraction method based on a reverse tree includes the following steps:
[0007] S1. Identify the set of cable path segments D in CAD drawings. L Box-type transformer set B L Text set N L ;
[0008] S2. Identify the start and end points of the cable path segment, determine the cable path segment, and then use the substation end as the root and the transformer box as the node to find the reverse tree of the cable path.
[0009] S3. Establish standardized layer naming rules, classify cable types using the naming rules, and export a detailed cable path table.
[0010] A further improvement to the technical solution of this invention lies in the following steps: In S2, the method for extracting the cable path using the reverse tree method specifically includes the following steps:
[0011] S2.1 Define the cable segment structure S, which includes the following attributes: cable segment multi-segment line P, starting transformer B. S Starting coordinates P STerminal box transformer B E End point coordinates P E and the set B of the two end box transformers T ;
[0012] S2.2, Define the set of cable segment structures S L ;
[0013] S2.3, Traverse the set D of cable path segments L Take the current cable path segment as D, and create an instance I of the cable segment structure S;
[0014] S2.4. Let IP = D, and take the first point where P1 = D and the last point where P2 = D;
[0015] S2.5, Traversing the set of box transformers B L Let the current box be B, and the bounding rectangle of the current box B be R;
[0016] S2.6 Determine if P1 is in R. If so, add [B, P1] to set IB. T ;
[0017] S2.7 Determine if P2 is in R. If so, add [B, P2] to set IB. T ;
[0018] S2.8, loop through S2.6 to S2.7, until set IB. T The number of elements is 2, or the entire set B of the box-change system has been traversed. L ;
[0019] S2.9, When set IB T If the number of elements is greater than 0, then I is added to the cable segment structure set S. L middle;
[0020] S2.10, Repeat steps S2.4 to S2.9 until the set of cable path segments D has been traversed. L ;
[0021] S2.11, Take the cable segment structure assembly S L Set B of transformers at both ends T The set S of cable path segments with a quantity of 1 element L1 This refers to the set of cable path segments at the substation end, which are characterized by having only a starting point associated with the transformer substation.
[0022] S2.12, Take the cable segment structure set S one by one L Let the cable path segment be D, and let DB... S =DB T .B,DP S =DBT .P;
[0023] S2.13, Take set S d = S L and S L1 The difference set, S d That is, a cable path segment without a defined start and end point;
[0024] S2.14, Traversing set S d Let the current path segment be D;
[0025] S2.15, Search DB T Does a transformer substation B exist that meets the following requirement: cable route segment set S L1 The starting box of any cable path segment becomes box-type transformer B;
[0026] S2.16. If transformer B exists, then DB T The box transformer B is not B. o If BB is the starting point of the current cable path segment D, then BB s =B o .B s BP s =B o .P s BB e =BB e BP e =BP e This step distinguishes the start and end points of the cable path segment currently associated with D;
[0027] S2.17, repeat steps S2.13 to S2.16 until S... d The number of cable path segments is 0;
[0028] S2.18 Filter the cable segment structure set S using the numbering grouping method L For repeated cable path segments, the numbering is a concatenated string of the substation numbers at both ends of the cable path segment;
[0029] S2.19, Let the set of cable paths be C. L Each element represents a cable path, and a cable path consists of multiple cable path segments.
[0030] S2.20, Take set S U For S L Mid-terminal box-type transformer B E Empty cable path segments, that is, path segments whose assigned paths have been determined, and cable path segments connected to the substation are among the first batch whose cable paths have been determined.
[0031] S2.21, Take set SO For S L With S U The difference set, i.e., the path segment that has no definite belonging path;
[0032] S2.22, Traversing S U Let the current cable path segment be D;
[0033] S2.23. Let the cable path be C, and let the temporary variable T = D;
[0034] S2.24. Place cable path segment D into cable path C, from S L and S O Remove D from the middle;
[0035] S2.25, take S O The set of all cable path segments S of the starting transformer substation and the intermediate transformer substation are equal to the set of the starting transformer substation and the intermediate transformer substation. X ;
[0036] S2.26, S X Property B of the terminal transformer of all cable path segments in the middle e Leaving it blank indicates that this path segment already has a belonging cable path;
[0037] S2.27, Let T=S X The first cable path segment in the set S, if set S X If T is empty, then T is empty;
[0038] S2.28. Repeat steps S2.24 to S2.26 until T is empty;
[0039] S2.29. Reverse the elements in set C and then put them into the cable path set C. L middle;
[0040] S2.30, Repeat steps S2.20 to S2.29 until set S is reached. U The number of cable path segments is 0;
[0041] S2.31. According to the principle of proximity, in the text set N L Find the transformer substation number in the database; this will give you the start and end numbers of the cable.
[0042] A further improvement of the technical solution of the present invention is that, in S3, the cable path details table includes at least the cable start point number, the end point number, and the cable type information.
[0043] The technological advancements achieved by this invention due to the adoption of the above technical solutions are as follows:
[0044] This invention identifies the cable path segments within a photovoltaic power plant area by recognizing the starting point (transformer end) and ending point (booster station end) of the cable path segment. Then, using the booster station as the root and the transformer as the node, it searches the reverse tree of all cable paths. This enables the rapid extraction of cable path details from a large number of complex cable path design schemes, greatly improving work efficiency and providing strong support for actual engineering design. Attached Figure Description
[0045] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0046] Figure 1 This is a schematic diagram of the cable laying path in an embodiment of the present invention;
[0047] Figure 2 This is a schematic diagram of the starting transformer substation in an embodiment of the present invention;
[0048] Figure 3 This is a schematic diagram of a cable-driven transformer substation with one inlet and one outlet, as described in an embodiment of the present invention.
[0049] Figure 4 This is a schematic diagram of a multi-inlet, one-outlet cable transformer in an embodiment of the present invention;
[0050] Figure 5 This is a schematic diagram of the cable path output results in an embodiment of the present invention;
[0051] Among them, 1. Substation; 2. Cable laying route; 3. Transformer box number; 4. Transformer box. Detailed Implementation
[0052] It should be noted that the terms "comprising" and "having" and any variations thereof in the specification, claims and accompanying drawings of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are explicitly listed, but may include other steps or units that are not explicitly listed or that are inherent to such processes, methods, products or devices.
[0053] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments:
[0054] Explanation of reverse order tree: such as Figure 1-4As shown, the normal current flow is from the photovoltaic panel to transformer substation 4, then from transformer substation 4 to step-up substation 1, and finally the electricity generated by the photovoltaic power plant is connected to the grid. In this forward process, multiple cables enter transformer substation 4 (e.g., Figure 4 As shown in the figure, and the designer only needs to count one cable between the two transformer substations 4, it is difficult to perform forward statistics. Therefore, the inventors of this application have constructed a reverse current logic tree from the substation 1 to each transformer substation 4. The cable path is deduced from the current of the substation 1, and relevant information is extracted. Hence, it is named the reverse current tree.
[0055] like Figure 1 As shown, the photovoltaic power station includes several transformer substations 4, each transformer substation 4 corresponding to its transformer substation number 3 (for clarity, Figure 1 (Not all transformer substation numbers are listed); several cable laying paths 2 are formed between each transformer substation 4 and the step-up substation 1. Transformer substation 4 is further divided into starting transformer substations (such as...) Figure 2 As shown), a cable enters and exits through a transformer substation (such as...). Figure 3 (as shown) and cable multi-inlet / one-outlet transformer (such as...) Figure 4 (as shown in the image) etc.
[0056] like Figure 1-5 As shown, a cable path extraction method based on a reverse tree includes the following steps:
[0057] S1. Identify sets of non-closed polylines (cable path segments) in CAD drawings. L Rectangular (box-type) set B L Text set N L ;
[0058] S2. Identify the starting point (substation end) and ending point (substation end / booster station end) of the cable path segment, determine the cable path segment, and then use the booster station end as the root and the substation end as the node to find the reverse tree of the cable path.
[0059] The method for extracting cable paths using the reverse tree method includes the following steps:
[0060] S2.1 Define the cable segment structure S, which includes the following attributes: cable segment multi-segment line P, starting transformer B. S Starting coordinates P S Terminal box transformer B E End point coordinates P E and the set B of the two end box transformers T ;
[0061] S2.2, Define the set of cable segment structures S L ;
[0062] S2.3, Traverse the set D of cable path segments LTake the current cable path segment as D, and create an instance I of the cable segment structure S;
[0063] S2.4. Let IP = D, and take the first point where P1 = D and the last point where P2 = D;
[0064] S2.5, Traversing the set of box transformers B L Let the current box be B, and the bounding rectangle of the current box B be R;
[0065] S2.6 Determine if P1 is in R. If so, add [B, P1] to set IB. T ;
[0066] S2.7 Determine if P2 is in R. If so, add [B, P2] to set IB. T ;
[0067] S2.8, loop through S2.6 to S2.7, until set IB. T The number of elements is 2, or the entire set B of the box-change system has been traversed. L ;
[0068] S2.9, When set IB T If the number of elements is greater than 0, then I is added to the cable segment structure set S. L middle;
[0069] S2.10, Repeat steps S2.4 to S2.9 until the set of cable path segments D has been traversed. L ;
[0070] S2.11, Take the cable segment structure assembly S L Set B of transformers at both ends T The set S of cable path segments with a quantity of 1 element L1 This refers to the set of cable path segments at the substation end, which are characterized by having only a starting point associated with the transformer substation.
[0071] S2.12, Take the cable segment structure set S one by one L Let the cable path segment be D, and let DB... S =DB T .B,DP S =DB T .P;
[0072] S2.13, Take set S d = S L and S L1 The difference set, S d That is, a cable path segment without a defined start and end point;
[0073] S2.14, Traversing set Sd Let the current path segment be D;
[0074] S2.15, Search DB T Does a transformer substation B exist that meets the following requirement: cable route segment set S L1 The starting box of any cable path segment becomes box-type transformer B;
[0075] S2.16. If transformer B exists, then DB T The box transformer B is not B. o If BB is the starting point of the current cable path segment D, then BB s =B o .B s BP s =B o .P s BB e =BB e BP e =BP e This step distinguishes the start and end points of the cable path segment currently associated with D;
[0076] S2.17, repeat steps S2.13 to S2.16 until S... d The number of cable path segments is 0;
[0077] S2.18 Filter the cable segment structure set S using the numbering grouping method L For repeated cable path segments, the numbering is a concatenated string of the substation numbers at both ends of the cable path segment;
[0078] S2.19, Let the set of cable paths be C. L Each element represents a cable path, and a cable path consists of multiple cable path segments.
[0079] S2.20, Take set S U For S L Mid-terminal box-type transformer B E Empty cable path segments, that is, path segments whose assigned paths have been determined, and cable path segments connected to the substation are among the first batch whose cable paths have been determined.
[0080] S2.21, Take set S O For S L With S U The difference set, i.e., the path segment that has no definite belonging path;
[0081] S2.22, Traversing S U Let the current cable path segment be D;
[0082] S2.23. Let the cable path be C, and let the temporary variable T = D;
[0083] S2.24. Place cable path segment D into cable path C, from S L and S O Remove D from the middle;
[0084] S2.25, take S O The set of all cable path segments S of the starting transformer substation and the intermediate transformer substation are equal to the set of the starting transformer substation and the intermediate transformer substation. X ;
[0085] S2.26, S X Property B of the terminal transformer of all cable path segments in the middle e Leaving it blank indicates that this path segment already has a belonging cable path;
[0086] S2.27, Let T=S X The first cable path segment in the set S, if set S X If T is empty, then T is empty;
[0087] S2.28. Repeat steps S2.24 to S2.26 until T is empty;
[0088] S2.29. Reverse the elements in set C and then put them into the cable path set C. L middle;
[0089] S2.30, Repeat steps S2.20 to S2.29 until set S is reached. U The number of cable path segments is 0;
[0090] S2.31. According to the principle of proximity, in the text set N L Find the transformer substation number in the database; this will give you the start and end numbers of the cable.
[0091] S3. Establish standardized layer naming rules, classify cable types using these rules, and export a detailed cable path table, including cable start-point number, end-point number, cable type, and other information (e.g., ...). Figure 5 (As shown).
[0092] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A cable path extraction method based on a reverse tree, characterized in that, Includes the following steps: S1. Identify the set of cable path segments D in CAD drawings. L Box-type transformer set B L Text set N L ; S2. Identify the start and end points of the cable path segment, determine the cable path segment, and then use the substation end as the root and the transformer box as the node to find the reverse tree of the cable path. The method for extracting cable paths using the reverse tree method includes the following steps: S2.1 Define the cable segment structure S, which includes the following attributes: cable segment multi-segment line P, starting transformer B. S Starting coordinates P S Terminal box transformer B E End point coordinates P E and the set B of the two end box transformers T ; S2.2, Define the set of cable segment structures S L ; S2.3, Traverse the set D of cable path segments L Take the current cable path segment as D, and create an instance I of the cable segment structure S; S2.
4. Let IP = D, and take the first point where P1 = D and the last point where P2 = D; S2.5, Traversing the set of box transformers B L Let the current box be B, and the bounding rectangle of the current box B be R; S2.6 Determine if P1 is in R. If so, add [B, P1] to set IB. T ; S2.7 Determine if P2 is in R. If so, add [B, P2] to set IB. T ; S2.8, loop through S2.6 to S2.7, until set IB. T The number of elements is 2, or the entire set B of the box-change system has been traversed. L ; S2.9, When set IB T If the number of elements is greater than 0, then I is added to the cable segment structure set S. L middle; S2.10, Repeat steps S2.4 to S2.9 until the set of cable path segments D has been traversed. L ; S2.11, Take the cable segment structure assembly S L Set B of transformers at both ends T The set S of cable path segments with a quantity of 1 element L1 This refers to the set of cable path segments at the substation end, which are characterized by having only a starting point associated with the transformer substation. S2.12, Take the cable segment structure set S one by one L Let the cable path segment be D, and let DB... S =DB T .B,DP S =DB T .P; S2.13, Take set S d = S L and S L1 The difference set, S d That is, a cable path segment without a defined start and end point; S2.14, Traversing set S d Let the current path segment be D; S2.15, Search DB T Does a transformer substation B exist that meets the following requirement: cable route segment set S L1 The starting box of any cable path segment becomes box-type transformer B; S2.
16. If transformer B exists, then DB T The box transformer B is not B. o If BB is the starting point of the current cable path segment D, then BB s =B o .B s BP s =B o .P s BB e =BB e BP e =BP e This step distinguishes the start and end points of the cable path segment currently associated with D; S2.17, repeat steps S2.13 to S2.16 until S... d The number of cable path segments is 0; S2.18 Filter the cable segment structure set S using the numbering grouping method L For repeated cable path segments, the numbering is a concatenated string of the substation numbers at both ends of the cable path segment; S2.19, Let the set of cable paths be C. L Each element represents a cable path, and a cable path consists of multiple cable path segments. S2.20, Take set S U For S L Mid-terminal box-type transformer B E Empty cable path segments, that is, path segments whose assigned paths have been determined, and cable path segments connected to the substation are among the first batch whose cable paths have been determined. S2.21, Take set S O For S L With S U The difference set, i.e., the path segment that has no definite belonging path; S2.22, Traversing S U Let the current cable path segment be D; S2.
23. Let the cable path be C, and let the temporary variable T = D; S2.
24. Place cable path segment D into cable path C, from S L and S O Remove D from the middle; S2.25, take S O The set of all cable path segments S of the starting transformer substation and the intermediate transformer substation are equal to the set of the starting transformer substation and the intermediate transformer substation. X ; S2.26, S X Property B of the terminal transformer of all cable path segments in the middle e Leaving it blank indicates that this path segment already has a belonging cable path; S2.27, Let T=S X The first cable path segment in the set S, if set S X If T is empty, then T is empty; S2.
28. Repeat steps S2.24 to S2.26 until T is empty; S2.
29. Reverse the elements in set C and then put them into the cable path set C. L middle; S2.30, Repeat steps S2.20 to S2.29 until set S is reached. U The number of cable path segments is 0; S2.
31. According to the principle of proximity, in the text set N L Find the transformer substation number in the database; this will give you the start and end points of the cable. S3. Establish standardized layer naming rules, classify cable types using the naming rules, and export a detailed cable path table.
2. The cable path extraction method based on a reverse tree according to claim 1, characterized in that: In S3, the cable route details table includes at least the cable start number, end number, and cable type information.