Building space electrical cable automatic path-finding method based on depth-first search algorithm

By applying the depth-first search algorithm in architectural electrical design software, building the topology diagram of electrical equipment and paths and optimizing the path scheme, the problem of designers needing to manually judge cable layout specifications is solved, and design intelligence and efficiency are improved.

CN119272449APending Publication Date: 2025-01-07CHINA RAILWAY SIYUAN SURVEY & DESIGN GRP CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411201122.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

When selecting cables in traditional architectural electrical design software, designers need to manually determine whether the cable layout complies with the specifications, which leads to time-consuming and labor-intensive.

Method used

Using the method based on the depth-first search algorithm, a topological diagram of the spatial relationship between electrical equipment and electrical paths in complex building spaces is constructed, and a set of path schemes from the starting point of the electrical cable to the end point is determined, and optimized according to the cable laying conditions to obtain the optimal Path scheme to determine cable selection.

Benefits of technology

Automatic pathfinding and selection of electrical paths has been realized, the intelligence of building electrical design software has been improved, and the workload of designers has been reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119272449A_ABST
    Figure CN119272449A_ABST
Patent Text Reader

Abstract

The invention discloses a building space electrical cable automatic path-finding method based on a depth-first search algorithm, and relates to the technical field of building electrical design, and the method comprises the steps: constructing a spatial relation topological graph between electrical equipment and an electrical path in a complex building space; based on a depth-first search algorithm, determining a path scheme set from an electrical cable starting point to an electrical cable ending point in the spatial relation topological graph; based on an electrical cable laying condition set, optimizing the path scheme set to obtain an optimal path scheme; and according to the optimal path scheme and the electrical calculation characteristics, determining the type selection of all cables under the optimal path scheme. According to the invention, automatic path finding and model selection of the electrical path based on specifications and rules are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of building electrical design, and in particular to an automatic routing method for electrical cables in building spaces based on a depth-first search algorithm. Background Art

[0002] Traditional building electrical design software mainly focuses on developing tool functions, requiring designers to personally arrange points and connect lines on the floor plan to show the layout of electrical lines. Using the software tools, designers can calculate and select appropriate cable models. However, this process requires designers to manually determine whether the cable layout meets the specifications, which is not only time-consuming but also increases the workload.

[0003] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0004] The main purpose of this application is to provide an automatic routing for electrical cables in building spaces based on a depth-first search algorithm, aiming to solve the technical problem that when using traditional building electrical design software for cable selection, designers need to manually determine whether the cable layout complies with the specifications, which is time-consuming and laborious.

[0005] To achieve the above objectives, the present application proposes a method for automatically finding a path for electrical cables in a building space based on a depth-first search algorithm. The method for automatically finding a path for electrical cables in a building space based on a depth-first search algorithm includes:

[0006] Construct a topological diagram of the spatial relationship between electrical equipment and electrical pathways in complex building spaces;

[0007] Determine a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topology graph based on a depth-first search algorithm;

[0008] Based on the set of electrical cable laying conditions, the set of path solutions is optimized to obtain an optimal path solution;

[0009] According to the optimal path solution and electrical calculation characteristics, all cable selections under the optimal path solution are determined.

[0010] In one embodiment, the step of constructing a spatial relationship topology diagram between electrical equipment and electrical pathways in a complex building space includes:

[0011] Based on the three-dimensional modeling software, the distribution box and the substation placed on the architectural drawing are configured as the starting point or the end point of the electrical cable of the electrical equipment;

[0012] A spatial relationship topology diagram is constructed based on the electrical cable start point, the electrical cable end point, and the electrical pathway.

[0013] In one embodiment, the step of constructing a spatial relationship topology map based on the electrical cable start point, the electrical cable end point, and the electrical path comprises:

[0014] A spatial relationship topology diagram is constructed based on the starting point of the electrical cable, the end point of the electrical cable, the horizontal passage and the vertical passage, wherein the horizontal passage is the plane baseline drawn on the architectural drawing, and the vertical passage is the lead-in point and the lead-out point placed on the architectural drawing.

[0015] In one embodiment, the step of constructing a spatial relationship topology map based on the electrical cable starting point, the electrical cable end point, the horizontal path, and the vertical path includes:

[0016] The node n(s,x,y) is used to record the starting point, end point, lead-in point and lead-out point of the electrical cable, where s represents the node number, x and y are the horizontal and vertical coordinates on the architectural drawing respectively, and the set of all nodes is Node, Node={n1,n2,...,n n};

[0017] Using path l(n s ,n e ,length) records the path relationship between each node, where ns represents the path starting point node number, n e represents the node number of the end point of the path, length represents the length of the path, and the set of all paths is Line, Line = {l1,l2,...,l m};

[0018] According to the node set and the path set, a spatial topological relationship graph G={Node, Line} is constructed.

[0019] In one embodiment, the step of optimizing the path solution set based on the set of electrical cable laying conditions to obtain the optimal path solution includes:

[0020] Determine the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition according to the set of electrical cable laying conditions, wherein the first Boolean judgment condition is that the cables within the preset voltage range are not in the same bridge, the second Boolean judgment condition is that the two-circuit power supply cables supplying power to the same load are not in the same bridge, the third Boolean judgment condition is that the cables for emergency lighting and other lighting are not in the same bridge, the fourth Boolean judgment condition is that the ratio of the total cross-sectional area of ​​the cables in the bridge to the cross-sectional area in the tray is not greater than a preset ratio, the fifth Boolean judgment condition is that the number of cables laid in the same bridge does not exceed a preset number, and the optimal judgment condition is that the distance from the starting point of the electrical cable to the end point of the electrical cable is the shortest;

[0021] Based on the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition, the path plan set is optimized to obtain an optimal path plan.

[0022] In one embodiment, the step of optimizing the path solution set based on the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition to obtain the optimal path solution includes:

[0023] Determine a target path solution from the path solution set that satisfies the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, and the fifth judgment condition at the same time;

[0024] An optimal path plan is determined from the target path plans according to the optimal judgment condition.

[0025] In one embodiment, the step of determining all cable selections under the optimal path solution according to the optimal path solution and the electrical calculation characteristics includes:

[0026] Establish a cable knowledge base and build a cable selection service based on cable voltage drop thermal stability;

[0027] Determining the cable path length and terminal load power of the optimal path solution;

[0028] Under the cable selection service, all cable selections are determined from the cable knowledge base according to the cable path length and the terminal load power.

[0029] In addition, to achieve the above purpose, the present application also proposes an automatic path-finding device for electrical cables in a building space based on a depth-first search algorithm, and the automatic path-finding device for electrical cables in a building space based on a depth-first search algorithm comprises:

[0030] A construction module for constructing a topological diagram of the spatial relationship between electrical equipment and electrical pathways in a complex building space;

[0031] A determination module, configured to determine a set of path solutions from a starting point of the electrical cable to an end point of the electrical cable in the spatial relationship topology graph based on a depth-first search algorithm;

[0032] An optimization module, used for optimizing the set of path solutions based on the set of electrical cable laying conditions to obtain an optimal path solution;

[0033] The determination module is used to determine all cable selections under the optimal path solution according to the optimal path solution and electrical calculation characteristics.

[0034] In addition, to achieve the above-mentioned objectives, the present application also proposes an automatic routing device for electrical cables in building spaces based on a depth-first search algorithm, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the automatic routing method for electrical cables in building spaces based on a depth-first search algorithm as described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the automatic routing method for electrical cables in the building space based on the depth-first search algorithm as described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the automatic routing method for electrical cables in building spaces based on the depth-first search algorithm as described above.

[0037] One or more technical solutions proposed in this application have at least the following technical effects:

[0038] The present application proposes an automatic path finding method for building space electrical cables based on a depth-first search algorithm, which constructs a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space; determines a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topological map based on a depth-first search algorithm; optimizes the set of path solutions based on a set of electrical cable laying conditions to obtain an optimal path solution; determines all cable selections under the optimal path solution according to the optimal path solution and electrical calculation characteristics, thereby solving the time-consuming and laborious technical problem that when selecting cables in traditional building electrical design software, designers need to manually determine whether the cable layout complies with the specifications. Compared with the prior art, the present application establishes a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space, then uses a depth-first search algorithm to construct a set of path solutions, and then establishes a set of electrical cable laying conditions in accordance with the specifications to screen and optimize the set of path solutions, and after extracting the optimal path solution, determines the cable selection under the optimal path solution, thereby realizing automatic path finding and selection of electrical pathways based on specification rules, improving the intelligence of building electrical design software, and effectively reducing the workload of designers. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0040] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0041] Figure 1 A flowchart diagram of a first embodiment of a method for automatic path finding of electrical cables in a building space based on a depth-first search algorithm of the present application;

[0042] Figure 2 The spatial relationship topology diagram provided for the first embodiment of the method for automatic path finding of electrical cables in building space based on the depth-first search algorithm of the present application;

[0043] Figure 3 A schematic diagram of a set of path solutions provided in Example 1 of the method for automatic path finding of electrical cables in a building space based on a depth-first search algorithm of the present application;

[0044] Figure 4 A flow chart of the second embodiment of the method for automatic path finding of electrical cables in building spaces based on a depth-first search algorithm of the present application;

[0045] Figure 5 This is a schematic diagram of the module structure of the automatic path-finding device for electrical cables in a building space based on a depth-first search algorithm according to an embodiment of the present application;

[0046] Figure 6 This is a schematic diagram of the equipment structure of the hardware operating environment involved in the automatic routing method for electrical cables in a building space based on a depth-first search algorithm in an embodiment of the present application.

[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0050] The main solution of the embodiment of the present application is to construct a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space; based on a depth-first search algorithm, determine a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topological map; based on a set of electrical cable laying conditions, optimize the set of path solutions to obtain an optimal path solution; based on the optimal path solution and electrical calculation characteristics, determine the selection of all cables under the optimal path solution.

[0051] In this embodiment, for ease of description, the following description is made by taking the identification of an automatic path-finding device for electrical cables in a building space based on a depth-first search algorithm as the execution subject.

[0052] Because existing technology uses traditional building electrical design software to select cables, designers need to manually determine whether the cable layout meets the specifications, which is time-consuming and laborious.

[0053] The present application constructs a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space; determines a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topological map based on a depth-first search algorithm; optimizes the set of path solutions based on a set of electrical cable laying conditions to obtain an optimal path solution; determines all cable selections under the optimal path solution based on the optimal path solution and electrical calculation characteristics, thereby solving the time-consuming and laborious technical problem that when selecting cables using traditional building electrical design software, designers need to manually determine whether the cable layout complies with the specifications. Compared with the prior art, the present application establishes a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space, then uses a depth-first search algorithm to construct a set of path solutions, and establishes a set of electrical cable laying conditions in accordance with the specifications, then screens and optimizes the set of path solutions, and determines the cable selection under the optimal path solution after extracting the optimal path solution, thereby realizing automatic path finding and selection of electrical pathways based on specification rules, improving the intelligence of building electrical design software, and effectively reducing the workload of designers.

[0054] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, an automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm, etc. The following takes an automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm as an example to illustrate this embodiment and the following embodiments.

[0055] Based on this, the embodiment of the present application provides a method for automatically finding the path of electrical cables in a building space based on a depth-first search algorithm. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the automatic routing method for electrical cables in a building space based on a depth-first search algorithm of the present application.

[0056] In this embodiment, the automatic path finding method for building space electrical cables based on the depth-first search algorithm includes steps S10 to S40:

[0057] Step S10, constructing a spatial relationship topology diagram between electrical equipment and electrical pathways in a complex building space;

[0058] In a feasible implementation, the step of constructing a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space includes: based on three-dimensional modeling software, configuring the distribution box and substation placed on the architectural drawing as the electrical cable starting point or electrical cable end point of the electrical equipment; based on the electrical cable starting point, the electrical cable end point and the electrical pathway, constructing a spatial relationship topological map.

[0059] It should be noted that the three-dimensional modeling software refers to CAD software; when performing electrical cable routing, an electrical cable starting point can be manually determined from the electrical equipment, and then multiple electrical cable end points can be determined from the electrical equipment.

[0060] In a feasible implementation manner, the step of constructing a spatial relationship topology map based on the starting point of the electrical cable, the end point of the electrical cable and the electrical pathway includes: constructing a spatial relationship topology map based on the starting point of the electrical cable, the end point of the electrical cable, the horizontal pathway and the vertical pathway, wherein the horizontal pathway is the plane baseline drawn on the architectural drawing, and the vertical pathway is the lead-in point and the lead-out point placed on the architectural drawing.

[0061] It should be noted that the plane baseline drawn on the architectural drawings can be used as a horizontal path for laying electrical cables; the lead-in points and lead-out points placed on the architectural drawings can also be used as vertical paths for laying electrical cables across building floors.

[0062] In a feasible implementation manner, the step of constructing a spatial relationship topology map based on the electrical cable starting point, the electrical cable end point, the horizontal path, and the vertical path includes:

[0063] The node n(s,x,y) is used to record the starting point, end point, lead-in point and lead-out point of the electrical cable, where s represents the node number, x and y are the horizontal and vertical coordinates on the architectural drawing respectively, and the set of all nodes is Node, Node={n1,n2,...,n n};

[0064] Using path l(n s ,n e ,length) records the path relationship between each node, where ns represents the path starting point node number, n e represents the node number of the end point of the path, length represents the length of the path, and the set of all paths is Line, Line = {l1,l2,...,l m};

[0065] According to the node set and the path set, a spatial topological relationship graph G={Node, Line} is constructed.

[0066] In the specific implementation, Figure 2The spatial relationship topology diagram shown in the figure can use node n(s,x,y) to record the starting point of the electrical cable, the end point of the electrical cable, the baseline turning point, the lead-in and lead-out nodes (i.e., the lead-in point and the lead-out point), where s represents the node number, x and y are the horizontal and vertical coordinates in the CAD graphic space, respectively, and the set of all nodes is Node, Node={n1,n2,...,n n}; Using path l(n s ,n e ,length) records the path relationship between each node, where n s Indicates the path starting point node number, n e represents the node number of the end point of the path, length represents the length of the path, and the set of all nodes is Line, Line = {l1,l2,...,l m}; Based on the established node and path relationships, a topological relationship graph G = {Node, Line} is constructed.

[0067] Step S20, determining a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topology graph based on a depth-first search algorithm;

[0068] It should be noted that the depth-first search algorithm is an algorithm for traversing or searching a graph or a tree. The depth-first search algorithm searches for nodes as deeply as possible along the branches of the tree or graph, and then backtracks to find other branches to continue searching.

[0069] In the specific implementation, Figure 3 The path scheme set diagram shown in the figure is as follows: 1. Specify the starting point s of the electrical cable start , Electrical cable terminals end ; 2 Use the depth-first search algorithm to establish the starting point s of the electrical cable start Point to the end point of the electrical cable end The path scheme set is:

[0070] Paths(s start ,s end )

[0071]

[0072] In the formula, N(s start ) is the starting point s start The set of all neighboring nodes; 3. Finally, find the starting point s of the electrical cable start Point to the end point of the electrical cable end All solution collection Paths all =Paths(s start ,s end ).

[0073] Step S30, optimizing the path plan set based on the set of electrical cable laying conditions to obtain an optimal path plan;

[0074] It should be noted that the electrical cable laying condition set can be constructed according to specifications and manuals. Specifically, according to the specifications and manuals, the electrical cable laying condition set C is extracted, the objective function is defined, the path plan set is optimized, and finally the optimal path plan is obtained.

[0075] Step S40, determining all cable selections under the optimal path solution according to the optimal path solution and electrical calculation characteristics.

[0076] It should be noted that the specific steps for determining the selection of all cables under the optimal path are as follows: 1. Batch solving the starting point and end point of the electrical cable. For example, given the starting point substation s of the electrical cable, the given end point of the electrical cable is all the distribution boxes T{t1,t2,t3,...,t n}; 2. Continuously determine the set of path solutions from the starting point substation s of the electrical cable to different distribution boxes powered by the substation, and solve the optimal path solution Path from the starting point of the electrical cable to the end point of the electrical cable according to the set of path solutions opt , until all the optimal path solutions from the starting point substation s of the electrical cable to the end point of each electrical cable (that is, the distribution box powered by the substation) are determined; 3. According to the optimal path solution Path(s,t i ), combined with the electrical calculation characteristics, calculate all cable selections from the starting point of the electrical cable to the end point of the electrical cable.

[0077] In a feasible implementation, the step of determining all cable selections under the optimal path plan based on the optimal path plan and electrical calculation characteristics includes: establishing a cable knowledge base, and building a cable selection service for cable voltage drop thermal stability; determining the cable path length and end point compliance power of the optimal path plan; under the cable selection service, determining all cable selections from the cable knowledge base based on the cable path length and end point compliance power.

[0078] It should be noted that a cable knowledge base is established, and a cable selection service is built based on cable voltage drop and thermal stability. The path length and load power of each cable are input to select electrical cables based on the path length and terminal load power, and the cable cross-section and model are determined.

[0079] This embodiment constructs a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space; determines a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topological map based on a depth-first search algorithm; optimizes the set of path solutions based on a set of electrical cable laying conditions to obtain an optimal path solution; determines all cable selections under the optimal path solution based on the optimal path solution and electrical calculation characteristics, thereby solving the time-consuming and laborious technical problem that when selecting cables using traditional building electrical design software, designers need to manually determine whether the cable layout complies with the specifications. Compared with the prior art, this application establishes a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space, then uses a depth-first search algorithm to construct a set of path solutions, and then establishes a set of electrical cable laying conditions in accordance with the specifications to screen and optimize the set of path solutions. After extracting the optimal path solution, the cable selection under the optimal path solution is determined, thereby realizing automatic path finding and selection of electrical pathways based on specification rules, improving the intelligence of building electrical design software, and effectively reducing the workload of designers.

[0080] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 4 , step S30 includes steps S301 to S302:

[0081] Step S301, determining a first Boolean judgment condition, a second Boolean judgment condition, a third Boolean judgment condition, a fourth Boolean judgment condition, a fifth Boolean judgment condition and an optimal judgment condition according to the set of electrical cable laying conditions, wherein the first Boolean judgment condition is that cables within a preset voltage range are not in the same bridge, the second Boolean judgment condition is that two-circuit power cables supplying power to the same load are not in the same bridge, the third Boolean judgment condition is that cables for emergency lighting and other lighting are not in the same bridge, the fourth Boolean judgment condition is that the ratio of the total cross-sectional area of ​​the cables in the bridge to the cross-sectional area in the tray is not greater than a preset ratio, the fifth Boolean judgment condition is that the number of cables laid in the same bridge does not exceed a preset number, and the optimal judgment condition is that the distance from the starting point of the electrical cable to the end point of the electrical cable is the shortest;

[0082] It should be noted that the preset ratio can be set to 40%, and the preset number can be set to 30.

[0083] In the specific implementation, the set of electrical cable laying conditions established according to the specifications and manuals is shown in Table 1 below:

[0084]

[0085] Table 1

[0086] S302, based on the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition, optimize the path plan set to obtain an optimal path plan.

[0087] In a feasible implementation manner, the path plan set is optimized based on the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition, and the step of obtaining the optimal path plan includes: determining a target path plan from the path plan set that simultaneously satisfies the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition and the fifth judgment condition; and determining the optimal path plan from the target path plan according to the optimal judgment condition.

[0088] In a specific implementation, the target path solution in the path solution set can be initially screened out in combination with the Boolean judgment condition in the installation condition set C:

[0089] Paths filter = {p∈Paths all |C1∧C2∧C3∧C4∧C5}

[0090] In the formula, C1 represents the first Boolean judgment condition, C2 represents the second Boolean judgment condition, C3 represents the third Boolean judgment condition, C4 represents the fourth Boolean judgment condition, C5 represents the fifth Boolean judgment condition, Pathsfilter represents the target path solution, and Pathsall represents the path solution set.

[0091] In the specific implementation, the optimal path solution is found from the target path solution by combining the optimal judgment conditions:

[0092]

[0093] Where f(p) represents the evaluation function, that is, the distance from the starting point to the end point of the electrical cable in the target path plan, Paths ropt Represents the optimal path solution.

[0094] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the automatic routing method for electrical cables in building spaces based on a depth-first search algorithm of the present application. More simple transformations based on this technical concept are all within the scope of protection of the present application.

[0095] This application also provides a building space electrical cable automatic path finding device based on a depth-first search algorithm, please refer to Figure 5 The automatic path-finding device for building space electrical cables based on a depth-first search algorithm comprises:

[0096] A construction module 10 is used to construct a spatial relationship topology diagram between electrical equipment and electrical pathways in a complex building space;

[0097] A determination module 20, for determining a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topology graph based on a depth-first search algorithm;

[0098] An optimization module 30, configured to optimize the set of path solutions based on the set of electrical cable laying conditions to obtain an optimal path solution;

[0099] The determination module 20 is used to determine all cable selections under the optimal path solution according to the optimal path solution and electrical calculation characteristics.

[0100] The automatic routing device for electrical cables in building spaces based on a depth-first search algorithm provided by the present application adopts the automatic routing method for electrical cables in building spaces based on a depth-first search algorithm in the above-mentioned embodiment, which can solve the technical problem that when selecting cables using traditional building electrical design software, designers need to manually determine whether the cable layout complies with the specifications, which is time-consuming and laborious. Compared with the prior art, the beneficial effects of the automatic routing device for electrical cables in building spaces based on a depth-first search algorithm provided by the present application are the same as the beneficial effects of the automatic routing method for electrical cables in building spaces based on a depth-first search algorithm provided by the above-mentioned embodiment, and the other technical features of the automatic routing device for electrical cables in building spaces based on a depth-first search algorithm are the same as the features disclosed in the above-mentioned embodiment method, which will not be repeated here.

[0101] The present application provides an automatic path-finding device for electrical cables in a building space based on a depth-first search algorithm. The automatic path-finding device for electrical cables in a building space based on a depth-first search algorithm includes: 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, and the instructions are executed by the at least one processor so that the at least one processor can execute the automatic path-finding method for electrical cables in a building space based on the depth-first search algorithm in the above-mentioned embodiment one.

[0102] Reference below Figure 6, which shows a schematic diagram of the structure of an automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm suitable for implementing an embodiment of the present application. The automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm in an embodiment of the present application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The automatic path-finding device for electrical cables in a building space based on a depth-first search algorithm is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0103] like Figure 6 As shown, the automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm may include a processing device 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: ReadOnly Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: RandomAccess Memory) 1004. Various programs and data required for the operation of the automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm are also stored in RAM1004. The processing device 1001, ROM1002, and RAM1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm to communicate wirelessly or wired with other devices to exchange data. Although the figure shows the automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.

[0104] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0105] The automatic routing device for electrical cables in building spaces based on a depth-first search algorithm provided by the present application adopts the automatic routing method for electrical cables in building spaces based on a depth-first search algorithm in the above-mentioned embodiment, which can solve the technical problem that when selecting cables using traditional building electrical design software, designers need to manually determine whether the cable layout complies with the specifications, which is time-consuming and laborious. Compared with the prior art, the beneficial effects of the automatic routing device for electrical cables in building spaces based on a depth-first search algorithm provided by the present application are the same as the beneficial effects of the automatic routing method for electrical cables in building spaces based on a depth-first search algorithm provided by the above-mentioned embodiment, and the other technical features of the automatic routing device for electrical cables in building spaces based on a depth-first search algorithm are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0106] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0107] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0108] The present application provides a computer-readable storage medium having computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the automatic routing method for electrical cables in a building space based on a depth-first search algorithm in the above-mentioned embodiment.

[0109] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0110] The above-mentioned computer-readable storage medium can be included in the automatic path-finding device for electrical cables in building spaces based on the depth-first search algorithm; or it can exist independently without being assembled into the automatic path-finding device for electrical cables in building spaces based on the depth-first search algorithm.

[0111] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the automatic path-finding device for electrical cables in building spaces based on the depth-first search algorithm, the automatic path-finding device for electrical cables in building spaces based on the depth-first search algorithm enables the following: constructing a spatial relationship topological map between electrical equipment and electrical pathways in a complex building space; based on the depth-first search algorithm, determining a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topological map; optimizing the set of path solutions based on the set of electrical cable laying conditions to obtain an optimal path solution; and determining all cable selections under the optimal path solution based on the optimal path solution and electrical calculation characteristics.

[0112] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0113] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0114] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0115] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned automatic routing method for electrical cables in building spaces based on a depth-first search algorithm, and can solve the technical problem that when selecting cables using traditional building electrical design software, designers need to manually determine whether the cable layout complies with the specifications, which is time-consuming and laborious. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the automatic routing method for electrical cables in building spaces based on a depth-first search algorithm provided by the above-mentioned embodiments, and will not be elaborated on here.

[0116] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the automatic routing method for electrical cables in a building space based on a depth-first search algorithm as described above.

[0117] The computer program product provided by the present application can solve the technical problem that when selecting cables using traditional building electrical design software, designers need to manually determine whether the cable layout meets the specifications, which is time-consuming and laborious. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the automatic pathfinding method for building space electrical cables based on the depth-first search algorithm provided by the above-mentioned embodiment, and will not be elaborated here.

[0118] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A method for automatic path finding of electrical cables in building space based on depth-first search algorithm, characterized in that: The method comprises: Construct a topological diagram of the spatial relationship between electrical equipment and electrical pathways in complex building spaces; Determine a set of path solutions from the starting point of the electrical cable to the end point of the electrical cable in the spatial relationship topology graph based on a depth-first search algorithm; Based on the set of electrical cable laying conditions, the set of path solutions is optimized to obtain an optimal path solution; According to the optimal path solution and electrical calculation characteristics, all cable selections under the optimal path solution are determined.

2. The method according to claim 1, characterized in that The step of constructing a spatial relationship topology diagram between electrical equipment and electrical pathways in a complex building space comprises: Based on the three-dimensional modeling software, the distribution box and the substation placed on the architectural drawing are configured as the starting point or the end point of the electrical cable of the electrical equipment; A spatial relationship topology diagram is constructed based on the electrical cable start point, the electrical cable end point, and the electrical pathway.

3. The method according to claim 2, characterized in that The step of constructing a spatial relationship topology diagram based on the electrical cable starting point, the electrical cable end point and the electrical path comprises: A spatial relationship topology diagram is constructed based on the starting point of the electrical cable, the end point of the electrical cable, the horizontal passage and the vertical passage, wherein the horizontal passage is the plane baseline drawn on the architectural drawing, and the vertical passage is the lead-in point and the lead-out point placed on the architectural drawing.

4. The method according to claim 3, characterized in that The step of constructing a spatial relationship topology map based on the electrical cable starting point, the electrical cable end point, the horizontal path and the vertical path comprises: The node n(s,x,y) is used to record the starting point, end point, lead-in point and lead-out point of the electrical cable, where s represents the node number, x and y are the horizontal and vertical coordinates on the architectural drawing respectively, and the set of all nodes is Node, Node={n1,n2,...,n n }; Using path l(n s ,n e ,length) records the path relationship between each node, where n s Indicates the path starting point node number, n e represents the node number of the end point of the path, length represents the length of the path, and the set of all paths is Line, Line = {l1,l2,...,l m }; According to the node set and the path set, a spatial topological relationship graph G={Node, Line} is constructed.

5. The method according to claim 1, characterized in that The step of optimizing the path solution set based on the set of electrical cable laying conditions to obtain the optimal path solution comprises: Determine the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition according to the set of electrical cable laying conditions, wherein the first Boolean judgment condition is that the cables within the preset voltage range are not in the same bridge, the second Boolean judgment condition is that the two-circuit power supply cables supplying power to the same load are not in the same bridge, the third Boolean judgment condition is that the cables for emergency lighting and other lighting are not in the same bridge, the fourth Boolean judgment condition is that the ratio of the total cross-sectional area of ​​the cables in the bridge to the cross-sectional area in the tray is not greater than a preset ratio, the fifth Boolean judgment condition is that the number of cables laid in the same bridge does not exceed a preset number, and the optimal judgment condition is that the distance from the starting point of the electrical cable to the end point of the electrical cable is the shortest; Based on the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition, the path plan set is optimized to obtain an optimal path plan.

6. The method according to claim 5, characterized in that The step of optimizing the path solution set based on the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, the fifth Boolean judgment condition and the optimal judgment condition to obtain the optimal path solution comprises: Determine a target path solution from the path solution set that satisfies the first Boolean judgment condition, the second Boolean judgment condition, the third Boolean judgment condition, the fourth Boolean judgment condition, and the fifth judgment condition at the same time; An optimal path plan is determined from the target path plans according to the optimal judgment condition.

7. The method according to claim 1, characterized in that The step of determining all cable selections under the optimal path solution according to the optimal path solution and the electrical calculation characteristics comprises: Establish a cable knowledge base and build a cable selection service based on cable voltage drop thermal stability; Determining the cable path length and terminal load power of the optimal path solution; Under the cable selection service, all cable selections are determined from the cable knowledge base according to the cable path length and the terminal load power.

8. An automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm, characterized in that: The device comprises: A construction module for constructing a topological diagram of the spatial relationship between electrical equipment and electrical pathways in a complex building space; A determination module, configured to determine a set of path solutions from a starting point of the electrical cable to an end point of the electrical cable in the spatial relationship topology graph based on a depth-first search algorithm; An optimization module, used for optimizing the set of path solutions based on the set of electrical cable laying conditions to obtain an optimal path solution; The determination module is used to determine all cable selections under the optimal path solution according to the optimal path solution and electrical calculation characteristics.

9. An automatic path-finding device for electrical cables in building spaces based on a depth-first search algorithm, characterized in that: The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the automatic routing method for electrical cables in a building space based on a depth-first search algorithm as described in any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the automatic routing method for electrical cables in a building space based on a depth-first search algorithm as described in any one of claims 1 to 7 are implemented.