Cabling position planning method and apparatus, electronic device, and storage medium
Patent Information
- Application Number
- PCT/CN2026/078914
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2025-02-26
- Filing Date
- 2026-02-12
- Publication Date
- 2026-09-03
Smart Images

Figure CN2026078914_03092026_PF_FP_ABST
Abstract
Description
Cabling location planning methods, devices, electronic equipment and storage media
[0001] Cross-reference of related applications
[0002] This application claims priority to Chinese Patent Application No. 202510220735.3, filed on February 26, 2025, with the State Intellectual Property Office of the People's Republic of China, entitled "A Wiring Location Planning Method, Apparatus and Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0003] This application relates to the field of artificial intelligence technology, and in particular to a wiring location planning method, apparatus, electronic device, and storage medium. Background Technology
[0004] Cabling is a modular and highly flexible information transmission channel within or between buildings. Information is transmitted by connecting various devices through cabling.
[0005] Traditional wiring design mostly relies on manual labor, with wiring schemes manually marked on drawings or software based on experience and subjective analysis of the apartment layout. Summary of the Invention
[0006] Exemplary embodiments of this application provide a wiring location planning method, apparatus, electronic device, and storage medium.
[0007] In a first aspect, embodiments of this application provide a wiring location planning method, including:
[0008] In response to an operation triggering the generation of wiring locations for a target scenario, the installation locations of cable trays in the target scenario are determined based on the structural data of the target scenario; the target scenario includes multiple devices; and
[0009] Based on the connectivity between the first device and other devices among the plurality of devices, a reference device corresponding to the first device is selected from the plurality of devices, and a target cabling path is determined between the first device and the reference device corresponding to the first device; the target cabling path passes through the installation location of the cable tray; wherein, the first device is one of the plurality of devices.
[0010] By responding to operations that trigger the generation of cabling locations for a target scenario and analyzing the structural data of the target scenario, the installation location of the cable tray can be determined in at least one area within the target scenario. Compared to the traditional method of manually determining the installation location of the cable tray, this application takes less time and can determine the installation location of the cable tray more conveniently and efficiently. Furthermore, since the target scenario includes multiple devices, this application's embodiments, by determining a reference device corresponding to each device and by determining the target cabling path between each device and its corresponding reference device, can more specifically determine the optimal path between each device and its corresponding reference device, thereby improving the overall cabling planning quality.
[0011] In one possible implementation, the structural data of the target scene includes the size and location of at least one region contained in the target scene.
[0012] This application embodiment can automatically determine the wiring location in the target scene using only basic information of the target scene, such as the size and location of at least one area contained in the target scene, reducing the amount of data input by the user, making it more convenient for the user and improving the user experience.
[0013] One possible implementation involves determining the installation location of the cable tray in at least one area within the target scene based on the structural data of the target scene, including:
[0014] Based on the structural data of the target scene, the functional attributes of each region within at least one region of the target scene and the target region are determined; the target region is determined based on the functional attributes of each region; and
[0015] Based on the location of the target area and the preset cable tray location setting rules, the installation position of the cable tray is determined.
[0016] This application embodiment determines the functional attributes of each region within at least one area in the target scene, and determines the target region based on the functional attributes of each region. Therefore, the installation position of the cable tray can be determined based on the location of the target region and preset cable tray position setting rules. This reduces computational load and allows for rapid determination of the cable tray installation position.
[0017] One possible implementation is that the structural data of the target scene is a floor plan of the target scene; determining the functional attributes of each area in the at least one area based on the structural data of the target scene includes:
[0018] The functional attributes of each area contained in the floor plan are determined using a trained recognition model.
[0019] The embodiments of this application can quickly determine the functional attributes of each area contained in the floor plan through the trained recognition model, and ensure a high accuracy rate.
[0020] In one possible implementation, the functional attributes include at least one of corridor, living room, room and wall, with different functional attributes having different priorities; the functional attributes of the target area have the highest priority.
[0021] The embodiments of this application compare the priority of the functional attributes of each region, which can quickly determine the target region.
[0022] One possible implementation involves determining the installation position of the cable tray based on the location of the target area and preset cable tray position setting rules, including:
[0023] Based on the location of the target area, determine the reference centerline corresponding to the target area; and
[0024] The installation position of the cable tray is determined on the reference centerline; the installation position of the cable tray includes the position in the target area located on the reference centerline.
[0025] This application embodiment determines the position of a reference centerline corresponding to the target area within the target area; and based on the position of the reference centerline, determines the installation position of the cable tray. This enables the determined installation position of the cable tray to be more adaptable to different scenarios.
[0026] One possible implementation, determining the installation position of the cable tray based on the position of the reference centerline, includes:
[0027] Two reference positions in the target scene are determined along the reference centerline; the reference positions in the target scene refer to the points where the reference centerline coincides with the contour surrounding the target region in the target scene.
[0028] The target endpoints corresponding to the two reference positions are determined on the reference centerline respectively; the distance between the target endpoint corresponding to each reference position and the reference position is a first threshold, and the target endpoint is located inside the contour surrounding the target area; and the position on the line segment between the two target endpoints is taken as the installation position of the cable tray.
[0029] This application embodiment determines two reference positions in the target scene along a reference centerline; and determines the target endpoints corresponding to each of the two reference positions along the reference centerline; the position on the line segment between the two target endpoints is taken as the installation position of the cable tray. This allows the method for determining the installation position of the cable tray provided by this application embodiment to be applied to target scenes with different structures.
[0030] One possible implementation includes selecting a reference device corresponding to the first device from the plurality of devices based on the connectivity between the first device and other devices among the plurality of devices, and the location of the plurality of devices, comprising:
[0031] Based on the connectivity between the first device and other devices among the plurality of devices, at least one connectable device corresponding to the first device is identified among the other devices; and
[0032] Based on the distance between the first device and each of the at least one connectable devices, and the preset priority of each connectable device, a reference device corresponding to the first device is selected from the at least one connectable device.
[0033] The embodiments of this application can determine the better reference device corresponding to the device by using the distance between the device and each connectable device, and the preset priority of each connectable device.
[0034] In one possible implementation, after determining the installation location of the cable tray in the target scenario, the method further includes:
[0035] Based on the installation location of the cable tray, the structural data of the target scene, and the locations of multiple devices included in the target scene, a first wiring diagram is generated;
[0036] Determining the target wiring path between the first device and the reference device corresponding to the first device includes:
[0037] Determine the target wiring path between the first device and the reference device corresponding to the first device in the first wiring diagram.
[0038] In one possible implementation, after generating the first wiring diagram, the method further includes:
[0039] The first wiring diagram is reduced to generate a second wiring diagram, the resolution of the second wiring diagram being smaller than that of the first wiring diagram;
[0040] Determining the target wiring path between the first device and the reference device corresponding to the first device includes:
[0041] Determine the reference wiring path between the first device and the reference device corresponding to the first device in the second wiring diagram;
[0042] By performing resolution restoration processing on the reference wiring path, the target wiring path between the first device and the reference device corresponding to the first device is obtained.
[0043] This application embodiment generates a second wiring diagram by reducing the resolution of the first wiring diagram. The resolution of the second wiring diagram is lower than that of the first wiring diagram, resulting in the second wiring diagram containing fewer pixels. Therefore, when determining the reference wiring path between devices and their corresponding reference devices in the second wiring diagram, fewer pixels can be traversed, thereby reducing the amount of computation and achieving better real-time performance.
[0044] One possible implementation, wherein reducing the first wiring diagram to obtain the second wiring diagram, includes:
[0045] Based on a preset target resolution, the position coordinates of the first positions of the multiple devices in the first wiring diagram, the first installation position of the cable tray, and the first area position of at least one area included in the target scene are transformed to obtain a second wiring diagram at the target resolution; or
[0046] Based on the first locations of multiple devices and the first wall location in the first wiring diagram, following the direction from the periphery of the first wiring diagram inwards, and according to the edge of the wall, the peripheral area of the first wiring diagram that does not contain devices is removed to obtain an adjusted first wiring diagram; based on a preset target resolution, the first locations of multiple devices, the first installation locations of cable trays, and the first location of at least one area in the adjusted first wiring diagram are transformed by position coordinates to obtain a second wiring diagram at the target resolution; or
[0047] Based on a preset target resolution, position coordinate transformation is performed on the first positions of the multiple devices, the first installation position of the cable tray, and the first area position of the at least one area in the first wiring diagram to obtain an adjusted first wiring diagram; based on the first positions of the multiple devices and the first wall position of the wall in the adjusted first wiring diagram, the outer area of the adjusted first wiring diagram that does not contain the devices is removed according to the edge of the wall in the direction from the outer perimeter of the adjusted first wiring diagram to the inner perimeter to obtain a second wiring diagram at the target resolution.
[0048] This application embodiment achieves resolution reduction processing by performing position coordinate transformation on the first positions of multiple devices, the first installation position of the cable tray, and the first area position of at least one area in the first wiring diagram, and reduces the amount of computation during traversal by removing the peripheral areas that do not contain devices.
[0049] One possible implementation includes determining the reference wiring path between the first device and the reference device corresponding to the first device in the second wiring diagram, comprising:
[0050] Based on the second location of the first device, the second location of the reference device corresponding to the first device, the second installation location of the cable tray, and the second location of the wall in the second wiring diagram, an initial wiring path is determined between the first device and the reference device corresponding to the first device; the initial wiring path passes through the second installation location of the cable tray; and
[0051] The initial wiring path is divided into multiple path segments, and path optimization processing is performed on each of the multiple path segments to obtain a reference wiring path between the first device and the reference device corresponding to the first device; the path optimization processing is performed based on the shortest path principle and the minimum bend principle.
[0052] This application embodiment further improves the optimization results of each path segment by dividing the initial wiring path into multiple path segments and performing path optimization processing on each of these multiple path segments.
[0053] One possible implementation includes dividing the initial wiring path into multiple path segments, including:
[0054] Based on the overlapping area between the initial wiring path and the second installation position of the cable tray, the initial wiring path is divided into the front section of the first cable tray, the middle section of the first cable tray, and the rear section of the first cable tray.
[0055] The initial wiring path overlaps with the second installation position of the cable tray at both ends, including a front end position and a rear end position; the front section of the first cable tray is the path segment between the device and the front end position, the middle section of the first cable tray is the path segment between the front end position and the rear end position, and the rear section of the first cable tray is the path segment between the reference device corresponding to the device and the rear end position.
[0056] This application embodiment divides the initial cabling path into the front section, middle section, and rear section of the cable tray, thereby achieving targeted optimization of the front section, middle section, and rear section of the cable tray to ensure the efficiency and accuracy of path planning.
[0057] In one possible implementation, after determining the target wiring path between the first device and the reference device corresponding to the first device, the method further includes:
[0058] Verify whether the target wiring path between the first device and its corresponding reference device connects the first device and its corresponding reference device; and
[0059] If the target wiring path is not connected to the first device or the reference device corresponding to the first device, then the target wiring path is corrected.
[0060] Since the target wiring path is obtained through resolution restoration processing in this embodiment, the position of the target wiring path may be deviated when determining its location. Therefore, by determining whether the target wiring path connects to the device and the corresponding reference device, it is determined whether the target wiring path needs to be corrected, thereby improving the accuracy of the target wiring path.
[0061] In one possible implementation, the target cabling path includes a second front section of the cable tray and a second rear section of the cable tray; the second front section of the cable tray refers to the path segment between the first device and the installation position of the cable tray, and the second rear section of the cable tray refers to the path segment between the reference device corresponding to the first device and the installation position of the cable tray;
[0062] The correction process for the target wiring path includes:
[0063] If the target cabling path is not connected to the first device, then the correction method for the front section of the second cable tray is determined according to the path position pattern of the front section of the second cable tray, and the cabling position of the front section of the second cable tray is adjusted based on the correction method of the front section of the second cable tray and the position of the first device; the path position pattern of the front section of the second cable tray is determined according to the cabling position of the front section of the second cable tray in the target cabling path; and
[0064] If the target cabling path is not connected to the reference device corresponding to the first device, then the correction method of the second cable tray is determined according to the path position pattern of the second cable tray, and the cabling position of the second cable tray is adjusted based on the correction method of the second cable tray and the position of the reference device corresponding to the first device; the path position pattern of the second cable tray is determined according to the cabling position of the second cable tray in the target cabling path.
[0065] In this embodiment of the application, when correcting the target wiring path, the correction method for each path segment is determined based on the path position pattern, and the wiring position of the path is adjusted according to the position of the device or the position of the reference device corresponding to the device, thereby achieving precise adjustment.
[0066] One possible implementation is that the path position rules include horizontal placement rules, vertical placement rules, and inclined placement rules, and the correction methods include horizontal correction methods, vertical correction methods, and inclined correction methods.
[0067] The adjustment of the wiring position of the front section of the second cable tray based on the correction method of the front section of the second cable tray and the position of the first device includes:
[0068] If the path position pattern of the front section of the second cable tray is the horizontal placement pattern, then the wiring position of the front section of the second cable tray is adjusted according to the position of the first device by means of the horizontal correction method.
[0069] If the path position pattern of the front section of the second cable tray is the vertical placement pattern, then the wiring position of the front section of the second cable tray is adjusted according to the position of the first device by the vertical correction method.
[0070] If the path position pattern of the front section of the second cable tray is the inclined placement pattern, then according to the position of the first device and the path slope of the front section of the second cable tray, the wiring position of the front section of the second cable tray is adjusted by an inclined correction method; the path slope of the front section of the second cable tray is determined according to the wiring position of the front section of the second cable tray.
[0071] This application's embodiments address horizontal placement by adjusting the wiring position at the front of the cable tray using a horizontal correction method based on the device's location. For vertical placement, the wiring position is adjusted using a vertical correction method based on the device's location. For inclined placement, the wiring position is adjusted using an inclined correction method based on the device's location and the slope of the path at the front of the cable tray. By applying a correction method corresponding to each path position pattern to adjust the wiring position, precise wiring position correction is achieved.
[0072] One possible implementation is that the path position rules include horizontal placement rules, vertical placement rules, and inclined placement rules, and the correction methods include horizontal correction methods, vertical correction methods, and inclined correction methods.
[0073] The adjustment of the wiring position of the rear section of the second cable tray based on the correction method of the rear section of the second cable tray and the position of the reference device corresponding to the first device includes:
[0074] If the path position pattern of the rear section of the second cable tray is the horizontal placement pattern, then the wiring position of the rear section of the second cable tray is adjusted according to the position of the reference device by the horizontal correction method.
[0075] If the path position pattern of the rear section of the second cable tray follows the vertical placement pattern, then based on the position of the reference device, the wiring position of the rear section of the second cable tray is adjusted using the vertical correction method; and
[0076] If the path position pattern of the rear section of the second cable tray is the tilted placement pattern, then according to the position of the reference device and the path slope of the rear section of the second cable tray, the wiring position of the rear section of the second cable tray is adjusted by tilt correction; the path slope of the rear section of the second cable tray is determined according to the wiring position of the rear section of the second cable tray.
[0077] This application's embodiments address horizontal placement by adjusting the wiring position at the rear of the cable tray using a horizontal correction method based on the device's location. For vertical placement, the wiring position is adjusted using a vertical correction method based on the device's location. For inclined placement, the wiring position is adjusted using an inclined correction method based on the device's location and the slope of the cable tray's path. By applying a correction method corresponding to each path position pattern to adjust the wiring position, precise wiring position correction is achieved.
[0078] In one possible implementation, the method further includes:
[0079] Based on the obtained multiple target cabling paths and the installation location of the cable tray, a floor plan containing the cabling paths is generated; the cabling paths are used to characterize the cabling locations in the target scenario.
[0080] The embodiments of this application, based on the optimal wiring path between each device and its corresponding reference device, ensure that the determined wiring location has high planning quality.
[0081] Secondly, a wiring location planning device includes:
[0082] The cable tray determination module is used to respond to the operation of generating wiring positions triggered for a target scene, and to determine the installation position of the cable tray in the target scene based on the structural data of the target scene; the target scene includes multiple devices;
[0083] The path determination module is used to select a reference device corresponding to the first device from the plurality of devices based on the connectivity relationship between the first device and other devices among the plurality of devices, and to determine a target cabling path between the first device and the reference device corresponding to the first device; the target cabling path passes through the installation position of the cable tray; wherein, the first device is one of the plurality of devices.
[0084] Thirdly, embodiments of this application also provide a computer-readable storage medium, including,
[0085] memory,
[0086] The memory is used to store a computer program that, when executed by a processor, causes the apparatus including the computer-readable storage medium to perform the method described in the first aspect and any possible implementation.
[0087] Fourthly, embodiments of this application provide an electronic device, including:
[0088] Memory, used to store computer programs;
[0089] When a processor executes a computer program stored in the memory, it implements the method described in the first aspect and any possible implementation.
[0090] Fifthly, embodiments of this application provide a computer program product comprising a computer program stored in a computer-readable storage medium; when a processor of an electronic device reads the computer program from the computer-readable storage medium, the processor executes the computer program, causing the electronic device to perform the steps of any of the methods described in the first aspect.
[0091] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing the application. The purposes and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description, claims, and drawings. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not intended to limit this disclosure. Attached Figure Description
[0092] To more clearly illustrate the technical solutions in the embodiments of this application 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 only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0093] Figure 1 is a flowchart of a wiring location planning method provided in an embodiment of this application;
[0094] Figure 2 is a flowchart illustrating the determination of the installation position of a cable tray according to an embodiment of this application;
[0095] Figure 3A is a schematic diagram of a first wiring diagram provided in an embodiment of this application;
[0096] Figure 3B is a schematic diagram of a first wiring diagram provided in an embodiment of this application;
[0097] Figure 4 is a schematic diagram of an adjusted first wiring diagram provided in an embodiment of this application;
[0098] Figure 5 is a flowchart of determining a reference device according to an embodiment of this application;
[0099] Figure 6A is a schematic diagram of a floor plan including wiring paths provided in an embodiment of this application;
[0100] Figure 6B is a schematic diagram of a floor plan including wiring paths provided in an embodiment of this application;
[0101] Figure 7 is an overall flowchart provided in an embodiment of this application;
[0102] Figure 8 is a schematic diagram of a model training device provided in an embodiment of this application;
[0103] Figure 9 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application;
[0104] Figure 10 is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0105] Current manual cabling methods are not only inefficient but also fail to guarantee the rationality and standardization of cabling. Therefore, an efficient method for determining cabling locations is urgently needed. This application provides an operation that generates cabling locations in response to a target scenario. Based on the structural data of the target scenario, the installation location of the cable tray is determined in at least one area within the target scenario. Furthermore, based on the connectivity between multiple devices and their locations, a target cabling path is determined between each device and its corresponding reference device, thereby efficiently determining the cabling location within the target scenario.
[0106] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. The described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0107] Furthermore, in the description of the embodiments of this application, unless otherwise stated, "and" means "or", for example, A / B can mean A or B; "and / or" in the text is merely a description of the relationship between related objects, indicating that there can be three relationships, for example, A and / or B can mean: A exists alone, A and B exist simultaneously, and B exists alone.
[0108] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the stated features. In the description of this application, "a plurality of" means two or more, unless otherwise explicitly specified.
[0109] In the description of this application, it should be noted that, unless otherwise expressly specified and limited, the term "connection" should be interpreted broadly. For example, it can refer to a direct connection, an indirect connection through an intermediate medium, or a connection within two devices. Those skilled in the art can understand the specific meaning of the above term in this application based on the specific circumstances.
[0110] To facilitate understanding of the wiring location planning method, apparatus, and storage medium provided in the embodiments of this application, some terms used in the embodiments of this application will be explained below so that those skilled in the art can understand them.
[0111] The A* search algorithm, commonly known as the A* algorithm, is a type of heuristic search algorithm. It is an algorithm that finds the optimal path for a path with two nodes on a graph plane.
[0112] To make the objectives, technical solutions, and beneficial effects of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0113] The wiring location planning method in this application can be applied to electronic devices, such as personal computers, mobile phones, tablets, laptops, smart voice interaction devices, smart home devices, and other terminal devices with certain computing capabilities, or servers. This application does not impose any limitations on this.
[0114] In one alternative implementation, if the wiring location planning method is applied to a terminal device, after the user triggers the operation of generating wiring locations for a target scenario on the terminal device, the terminal device determines the wiring location in the target scenario through the wiring location planning method and displays the determined wiring location to the user.
[0115] In another optional implementation, if the cabling location planning method is applied to a server, after the user triggers the operation of generating cabling locations for a target scene on the terminal device, the terminal device sends an operation instruction to the server. This operation instruction instructs the server to generate cabling locations. Upon receiving the operation instruction, the server obtains the scene data carried in the operation instruction, determines the cabling locations in the target scene using the cabling location planning method, and sends the determined cabling locations to the user's terminal device so that the terminal device can display the determined cabling locations to the user.
[0116] It should be noted that the cabling location planning in this application embodiment can be applied to the design of automated cabling solutions such as network cabling planning, power cabling planning, low-voltage cabling planning, and fiber optic cabling planning.
[0117] The multiple devices included in the target scenario of this application's embodiments may include electronic devices and electrical devices. For example, electrical devices may also be sockets. The electronic devices may be network devices, intelligent voice interaction devices, smart home devices, etc., and this application does not impose any limitations on them.
[0118] For example, if cabling location planning is applied to network cabling planning, the multiple devices included in the target scenario can be network devices.
[0119] As shown in Figure 1, a flowchart of a wiring location planning method according to an embodiment of this application is presented, and the specific steps are as follows:
[0120] Step S101: In response to the operation of generating wiring positions triggered for the target scene, determine the installation position of the cable tray in the target scene based on the structural data of the target scene.
[0121] The target scenario in this application embodiment includes multiple devices.
[0122] Optionally, the target scene in this application embodiment includes at least one region, and the structural data of the target scene is used to describe the structure of the region included in the target scene. The structural data of the target scene may include the size and position of at least one region included in the target scene.
[0123] Wherein, dimensions can be the side length of each region, and / or the area of each region. Positions can be the relative positions between each region, and / or the absolute positions of each region in the same coordinate system. Dimensions and positions are used to describe the structure of at least one region contained in the target scene; the embodiments of this application do not limit the specific description method.
[0124] As shown in Figure 2, an embodiment of this application illustrates a flowchart for determining the installation position of a cable tray. The specific steps are as follows:
[0125] Step S201: Based on the structural data of the target scene, determine the functional attributes of each region and the target region in at least one region contained in the target scene.
[0126] It should be noted that the functional attribute is used to characterize the function of each area, referring to the purpose of each area.
[0127] For example, functional attributes include at least one of attributes such as corridor, living room, room, and wall. Functional attributes may also include at least one of attributes such as living room / dining room, dining room, bedroom, study, game room, and bathroom, etc., which are not limited in this application.
[0128] In one optional implementation, if the structural data of the target scene is a floor plan of the target scene, then this embodiment of the application uses a trained recognition model to determine the functional attributes of each area contained in the floor plan.
[0129] The trained recognition model is obtained by iteratively training the recognition model using a training sample set in this application embodiment.
[0130] Optionally, this application provides a method for training a recognition model, with specific steps described in steps A1-A4:
[0131] Step A1, Data Collection and Labeling.
[0132] In this embodiment of the application, the floor plan and the label of each floor plan are obtained through step A1.
[0133] It should be noted that the embodiments of this application obtain a large number of floor plans, covering different architectural styles and layouts. The labels for each floor plan are generated semantically segmented label data based on the annotation content of the floor plan using annotation tools.
[0134] The annotation content includes functional attributes, such as rooms, corridors, kitchens, and walls. Annotation tools such as LabelMe and CVAT can be used. This application does not impose any restrictions on this.
[0135] Step A2: Select and design the recognition model.
[0136] Optionally, embodiments of this application select a deep learning model suitable for semantic segmentation as the recognition model, such as U-Net, DeepLab, PSPNet, etc. When designing the recognition model, the input and output of the recognition model are designed. For example, the input is a floor plan, and the output is the pixel-level functional attribute recognition result. Here, the pixel-level functional attribute recognition result refers to the functional attribute corresponding to each pixel in the floor plan.
[0137] It should be noted that the functional attribute recognition result refers to the functional attributes of each area in the floor plan. Functional attributes include the area attributes and wall structure of each area. Area attributes include rooms, corridors, kitchens, etc.
[0138] Step A3: Perform multiple rounds of iterative training on the recognition model.
[0139] The obtained labeled data is divided into training set, validation set and test set.
[0140] This application uses a deep learning framework to train a recognition model and optimizes the loss function (such as cross-entropy loss). Data augmentation (such as rotation, scaling, and flipping) is used to improve the model's generalization ability.
[0141] Step A4: Model evaluation and optimization.
[0142] Evaluate the performance of the recognition model using a test set and calculate metrics such as mIoU (mean Intersection over Union) and accuracy. Optimize the recognition model by adjusting hyperparameters, increasing network depth, or introducing attention mechanisms.
[0143] After obtaining the trained recognition model through the above process, the floor plan is input into the trained recognition model (i.e., the trained semantic segmentation model). The trained recognition model outputs the functional attributes of each area within at least one region of the floor plan, identifying room, corridor, and other area attributes, as well as wall structures. After training the semantic segmentation model through data annotation, the recognition model can automatically identify key areas and obstacles (walls), providing structured input for subsequent path planning, replacing traditional manual annotation methods, and improving efficiency and accuracy.
[0144] The target area is determined based on the functional attributes of each area.
[0145] In this embodiment of the application, different functional attributes have different priorities, with the functional attributes of the target area having the highest priority.
[0146] For example, the corridor can be of first priority, the living room of second priority, and the bedroom of third priority. First priority is higher than second priority, and second priority is higher than third priority. This application does not limit the priority level of each functional attribute; the priority level of each functional attribute can be set adaptively according to the circumstances.
[0147] Step S202: Based on the location of the target area and the preset cable tray location setting rules, determine the installation location of the cable tray.
[0148] It should be noted that if the structural data of the target scene is the floor plan of the target scene, then the location of the target area can be the location of the target area in the floor plan.
[0149] Optionally, the preset cable tray position setting rule in this embodiment can be: determining the installation position of the cable tray based on the position of the reference centerline corresponding to the target area. Therefore, this embodiment determines the reference centerline corresponding to the target area based on its position; and then determines the installation position of the cable tray on the reference centerline.
[0150] The installation location of the cable tray includes the position located on the reference centerline within the target area.
[0151] For example, embodiments of this application may provide the following implementation methods for determining the reference centerline:
[0152] In the first implementation method, if the target area is rectangular, the reference centerline intersects the center point of the first side length in the target area and is parallel to the second side length in the target area. The length of the first side length is less than the length of the second side length.
[0153] In the second implementation method, if the target area is irregularly shaped and can be divided into multiple rectangles, then based on the outline of the target area, a minimum reference rectangle enclosing the target area is determined. The reference centerline intersects the center point of the third side of the minimum reference rectangle and is parallel to the fourth side of the minimum reference rectangle, where the length of the third side is less than the length of the fourth side.
[0154] It should be noted that the reference centerline in the embodiments of this application can also be understood as the skeleton line, that is, the main trunk of the cable tray path, or the main trunk line of the area.
[0155] Optionally, in embodiments of this application, a row and column skeleton extraction algorithm can also be used to determine the skeleton lines.
[0156] In this embodiment of the application, after determining the position of the reference centerline, the position of the cable tray located on the reference centerline in the target area can be used as the installation position of the cable tray. Alternatively, the installation position of the cable tray can also be determined through steps B1-B3:
[0157] Step B1: Determine two reference positions in the target scene on the reference centerline.
[0158] The reference position in the target scene refers to the point where the reference centerline coincides with the outline of the target area in the target scene.
[0159] For example, the outline surrounding the target area in the target scene may consist of at least one of walls, windows, and doors.
[0160] Step B2: Determine the target endpoints corresponding to the two reference positions on the reference centerline.
[0161] The distance between the target endpoint corresponding to each reference position and the reference position is the first threshold, and the target endpoint is located inside the contour surrounding the target area.
[0162] If the reference position is the point where the reference centerline coincides with the wall, then the reference position is located on the first surface of the wall, which is the inner wall surface facing the target area. In other words, the first threshold refers to the distance between the target endpoint and the first surface of the wall.
[0163] The embodiments of this application do not limit the specific value of the first threshold. The first threshold can also be 0.
[0164] Step B3: The location on the line segment between the two target endpoints is taken as the installation position of the cable tray.
[0165] By generating skeleton lines within the target area as the basis for the main cable tray path, the search range is reduced, redundant calculations are decreased, and planning efficiency is improved.
[0166] Optionally, after determining the installation location of the cable tray, this embodiment of the application further includes: generating a first wiring diagram based on the installation location of the cable tray, the structural data of the target scene, and the locations of multiple devices included in the target scene.
[0167] Taking network cabling as an example, this application provides an example of a first cabling diagram generated for different apartment floor plans:
[0168] Figure 3A shows a schematic diagram of a first wiring diagram according to an embodiment of this application. In Figure 3A, the target functional attribute of the floor plan is a corridor. Therefore, the installation location of the cable trays is determined based on the corridor location, resulting in the first wiring diagram. The diagonal lines in the first wiring diagram represent the installation areas of the cable trays, with each area indicating its installation location, and icons representing the placed equipment.
[0169] Figure 3B shows a second schematic diagram of a first wiring diagram according to an embodiment of this application. In Figure 3B, the target functional attribute of the floor plan is the living room. Therefore, the installation location of the cable trays is determined based on the location of the living room, resulting in the first wiring diagram. In the first wiring diagram, the diagonal lines represent the installation areas of the cable trays, and the icons indicate the devices to be placed there.
[0170] In this embodiment, the structural data of the target scene can be a floor plan of the target scene. The first wiring diagram is generated based on the installation location of the cable trays, the floor plan of the target scene, and the locations of multiple devices included in the target scene.
[0171] It should be noted that the locations of multiple devices included in the target scene can be determined using any of the following methods:
[0172] Method 1: Automatically determine the location of multiple devices within the target scene based on the floor plan of the target scene.
[0173] In one optional implementation, the structure type of the target scene is determined based on the functional attributes of at least one region in the target scene, and the positions of multiple devices in the target scene are determined based on the structure type of the target scene and the mapping relationship between the preset structure type and the device position setting scheme.
[0174] The structural types include one-bedroom, one-living room, and one-bathroom layouts, and two-bedroom, one-living room, and one-bathroom layouts. The equipment placement plan includes the number of devices and the placement location of each device within at least one area of the target scenario.
[0175] In another alternative implementation, in a network cabling scenario, this embodiment of the application determines the location of each of the multiple devices in the target scenario based on the signal strength of each device in the target scenario.
[0176] The signal strength of each device in the target scene is determined by the structure of at least one region contained in the target scene.
[0177] Method 2: Receive the locations of multiple devices input by the user.
[0178] Optionally, after determining the first wiring diagram, embodiments of this application provide two methods for generating the target wiring path:
[0179] In the first generation method, the first wiring diagram is reduced in size to generate a second wiring diagram, and the target wiring path is generated based on the second wiring diagram. The resolution of the second wiring diagram is smaller than that of the first wiring diagram.
[0180] Optionally, in this embodiment of the application, after generating the second wiring diagram, a reference wiring path is determined between the devices and their corresponding reference devices in the second wiring diagram; by performing resolution restoration processing on the reference wiring path in the second wiring diagram, the target wiring path between the devices and their corresponding reference devices is obtained.
[0181] In the second generation method, the target wiring path between the devices and their corresponding reference devices in the first wiring diagram is determined.
[0182] For generation method one, the embodiments of this application determine the second wiring diagram through any of the following implementation methods:
[0183] In the first implementation method, based on a preset target resolution, the position coordinates of the first positions of multiple devices, the first installation positions of the cable tray, and the first area positions of at least one area in the first wiring diagram are transformed to obtain a second wiring diagram at the target resolution.
[0184] For example, the reduction ratio of the first wiring diagram is determined based on the resolution of the first wiring diagram and the target resolution, and the position coordinate transformation is performed on the first position in the first wiring diagram based on the reduction ratio of the first wiring diagram.
[0185] In the second implementation method, based on the first positions of multiple devices and the first wall position in the first wiring diagram, the outer areas of the first wiring diagram that do not contain devices are removed according to the edge of the wall, in a direction from the periphery of the first wiring diagram inward, to obtain an adjusted first wiring diagram. Based on a preset target resolution, the position coordinates of the first positions of multiple devices, the first installation position of the cable tray, and the first area position of at least one area in the adjusted first wiring diagram are transformed to obtain a second wiring diagram at the target resolution.
[0186] For example, the reduction ratio of the first wiring diagram is determined based on the resolution of the adjusted first wiring diagram and the target resolution, and the position coordinate transformation is performed on the first position in the adjusted first wiring diagram based on the reduction ratio of the first wiring diagram.
[0187] In the third implementation method, based on a preset target resolution, the position coordinates of the first positions of multiple devices, the first installation position of the cable tray, and the first area position of at least one region in the first wiring diagram are transformed to obtain an adjusted first wiring diagram. Based on the first positions of multiple devices and the first wall position of the wall in the adjusted first wiring diagram, the peripheral areas of the adjusted first wiring diagram that do not contain devices are removed according to the edge of the wall, in a direction from the periphery of the adjusted first wiring diagram inward, to obtain a second wiring diagram at the target resolution.
[0188] For example, the reduction ratio of the first wiring diagram is determined based on the resolution of the first wiring diagram and the target resolution, and the position coordinate transformation of the first position in the first wiring diagram is performed based on the reduction ratio of the first wiring diagram to obtain the adjusted first wiring diagram.
[0189] In this application, the target resolution can be 128×128 or 256×256. This application does not limit the specific value of the target resolution.
[0190] It should be noted that, by reducing the resolution, the number of pixels in the second wiring diagram is reduced, so that fewer pixels can be traversed when determining the path, thus reducing the amount of computation.
[0191] Regarding Embodiment 2, this application provides a schematic diagram of the first wiring diagram after removing the peripheral area, as shown in Figure 4. The first wiring diagram includes markers corresponding to the installation positions of the cable trays, markers corresponding to multiple devices, and the structure of multiple areas included in the target scene.
[0192] Step S102: For each of the multiple devices, perform the following operations: Based on the connectivity between the device and other devices in the multiple devices, select a reference device corresponding to the device from the multiple devices, and determine the target wiring path between the device and its corresponding reference device. Taking the first device as an example, if the first device is one of the multiple devices, then based on the connectivity between the first device and other devices in the multiple devices, select a reference device corresponding to the first device from the multiple devices, and determine the target wiring path between the first device and its corresponding reference device. Here, "other devices" refers to devices other than the first device in the multiple devices.
[0193] Optionally, embodiments of this application can determine the reference device corresponding to each device based on the connectivity between devices, using the shortest distance algorithm and topology priority, and construct the network topology by determining the path between each device and its corresponding reference device.
[0194] Topology priority refers to the priority of each device.
[0195] As shown in Figure 5, an embodiment of this application provides a flowchart for determining a reference device. For each of the multiple devices, the following operations are performed:
[0196] Step S501: Based on the connectivity relationship between the device and other devices among the multiple devices, determine at least one connectable device corresponding to the device among the other devices.
[0197] It should be noted that the connectivity representation in this application embodiment supports or does not support the connection between the two.
[0198] Step S502: Based on the distance between the device and each of the at least one connectable devices, and the preset priority of each connectable device, select the reference device corresponding to the device from the at least one connectable device.
[0199] It should be noted that the priority of each connectable device is predetermined based on its hardware configuration, representing the selection order of each connectable device. This selection order refers to the order in which the connectable device is selected from at least one connectable device. The higher the priority of the connectable device, the earlier it is selected in the selection order.
[0200] Regarding step S502, this application provides the following implementation methods to determine the reference device corresponding to the device:
[0201] In Implementation Method 1, at least one candidate device that meets priority criteria is determined from at least one connectable device. Based on the distance between the device and each of the at least one candidate device and the shortest distance principle, a reference device corresponding to the device is determined from the at least one candidate device.
[0202] In the second implementation method, a weighted calculation is performed based on the distance between the device and each of the at least one connectable devices, and the preset priority of each connectable device, to obtain a value corresponding to each of the at least one connectable devices. The connectable device with the largest value among the values corresponding to each of the at least one connectable devices is determined as the reference device corresponding to that device.
[0203] It should be noted that the process of determining the reference device corresponding to the device in this application embodiment can be performed after determining the installation position of the cable tray and before generating the first wiring diagram. In this case, the positions of each device in the floor plan can be used. Alternatively, it can be performed after generating the first wiring diagram or the second wiring diagram. In this case, the positions of each device in the first wiring diagram or the second wiring diagram can be used. This application embodiment does not impose any limitations on this.
[0204] For step S102, the process of determining the target cabling path between each of the multiple devices and its corresponding reference device can be achieved by determining the target cabling path through steps C1-C2:
[0205] Step C1: Determine the reference wiring path between the device and its corresponding reference device in the second wiring diagram.
[0206] Step C2: By performing resolution restoration processing on the reference wiring path in the second wiring diagram, the target wiring path between the devices and the corresponding reference devices is obtained.
[0207] Regarding step C1, this embodiment of the application can determine the reference wiring path between the device and the corresponding reference device through steps D1-D2:
[0208] Step D1: Based on the second position of the device, the second reference position of the corresponding reference device, the second installation position of the cable tray, and the second wall position of the wall in the second wiring diagram, determine the initial wiring path between the device and the corresponding reference device.
[0209] The initial cabling path passes through the second installation location of the cable tray.
[0210] Step D2: Divide the initial cabling path into multiple path segments, and perform path optimization processing on each of the multiple path segments to obtain the reference cabling path between the device and the reference device corresponding to the device.
[0211] Regarding step D1, this embodiment of the application determines the initial wiring path between the device and the corresponding reference device through steps E1-E3:
[0212] Step E1: Based on the second position of the device, the second reference position of the corresponding reference device, and the second installation position of the cable tray in the second wiring diagram, determine multiple first paths connecting the device and the corresponding reference device, and the first paths pass through the second installation position of the cable tray.
[0213] Step E2 involves performing the following operations for each of the identified multiple first paths: Based on the second wall location and the second location of the first path in the second wiring diagram, determine the first path segment and the second path segment within that first path. The first path segment includes the locations within the first path that pass through the wall, and the second path segment includes the locations within the first path that do not pass through the wall. Weighted calculations are then performed on the first path segment and the second path segment to obtain the loss score corresponding to that first path.
[0214] It should be noted that the weight of the first path segment is set based on wall penetration loss and cabling material consumption, while the weight of the second path segment is set based on cabling material consumption.
[0215] Step E3: Based on the loss scores corresponding to each of the multiple first paths, the first path with the lowest loss score is selected as the initial wiring path.
[0216] The network topology is derived from the identified initial wiring paths. This topology helps determine the start and end points of each path, that is, the two devices connected by each path.
[0217] Regarding step D2, dividing the initial cabling path into multiple path segments includes: dividing the initial cabling path into a first cable tray front section, a first cable tray middle section, and a first cable tray rear section based on the overlapping area between the initial cabling path and the second installation position of the cable tray.
[0218] The initial cabling path overlaps with the second installation position of the cable tray at both ends, including the front end and the rear end. The front section of the first cable tray is the path segment between the device and the front end, the middle section of the first cable tray is the path segment between the front end and the rear end, and the rear section of the first cable tray is the path segment between the reference device corresponding to the device and the rear end.
[0219] Traditional path planning methods may only constrain the endpoint and the starting point, and cannot concentrate the route along the cable tray. This application divides the overall path into three independent sub-segments, including the section before, during and after passing through the cable tray, and concentrates the route under the constraints of the cable tray, avoiding path intersections and confusion, reducing the complexity of global planning and improving accuracy.
[0220] The path optimization process in this application embodiment can be performed according to the shortest path principle and the minimum detour principle.
[0221] Optionally, in embodiments of this application, an improved A* algorithm can be used to plan each of the multiple path segments obtained from the division, resulting in an optimized path segment.
[0222] In this application, an improved A* algorithm is obtained by introducing a new heuristic function based on the A* (A Star) algorithm to optimize the path evaluation mechanism. The improved A* algorithm specifically includes multi-objective optimization such as dynamic weights, shortest path, and minimum detour.
[0223] Optionally, the new heuristic function introduced in this application embodiment is: historical path length * [1 / (1 + squared number of bends)] + number of bends * [squared number of bends / (1 + squared number of bends)] * constant C + distance to the destination.
[0224] Where 1 / (1+squared number of bends) is the historical path weight, and squared number of bends / (1+squared number of bends) is the bend weight, which changes dynamically according to the number of bends.
[0225] For example, if the historical path length is 500, the distance to the destination is 300, the number of bends is 6, and the constant is 200, then the heuristic function = 500 / (1+36)+6*36(1+36)*200+300.
[0226] For example, by using the improved A* algorithm to optimize the first cable tray front section, the first cable tray middle section, and the first cable tray rear section respectively, the first cable tray front section, the first cable tray middle section, and the first cable tray rear section are optimized by the improved A* algorithm to obtain the optimized first cable tray front section, the optimized first cable tray middle section, and the optimized first cable tray rear section, so as to ensure the efficiency and accuracy of path planning.
[0227] After performing path optimization on multiple path segments, a reference cabling path is formed between the devices and their corresponding reference devices based on the optimized path segments.
[0228] For example, the optimized first cable tray front section, the optimized first cable tray middle section, and the optimized first cable tray rear section form a reference cabling path between devices and their corresponding reference devices.
[0229] For step C2, after determining multiple reference routing paths in the second routing diagram, multiple target routing paths are obtained by performing resolution restoration processing on the multiple reference routing paths respectively.
[0230] The target cabling path in this embodiment passes through the installation location of the cable tray.
[0231] It should be noted that the resolution restoration processing in this embodiment is used to perform the reduction processing on the first wiring diagram mentioned above. Based on the reduction ratio of the first wiring diagram, the position coordinates of multiple reference wiring paths in the second wiring diagram are transformed to obtain multiple target wiring paths.
[0232] Based on the above process, the process of determining the target wiring path by generating method one is realized.
[0233] Regarding the second generation method, the process of determining the target wiring path between devices and their corresponding reference devices in the first wiring diagram is described in the embodiment of this application. The method principle for determining the reference device corresponding to a device is shown in Figure 5, and will not be elaborated further here.
[0234] Optionally, in this embodiment of the application, an initial wiring path between the device and its corresponding reference device is determined based on the first position of the device in the first wiring diagram, the first reference position of the reference device corresponding to the device, the first installation position of the cable tray, and the first wall position of the wall. The initial wiring path is divided into multiple path segments, and path optimization processing is performed on each of the multiple path segments to obtain reference wiring paths between the device and its corresponding reference device. The determined multiple reference wiring paths are used as target paths.
[0235] It should be noted that the process of determining the reference routing path in the first routing diagram can refer to the method principle of steps D1-D2 described earlier in the embodiments of this application. The process of determining the initial routing path in the first routing diagram can refer to the method principle of steps E1-E3 described earlier in the embodiments of this application, and will not be repeated here.
[0236] Optionally, embodiments of this application may also combine the outer contour of the floor plan to mask the area located outside the outer contour of the floor plan when determining the target wiring path, so as to ensure that the multiple target wiring paths obtained are located within the target scene.
[0237] The outer outline of the floor plan is the outline of the outermost wall of the floor plan.
[0238] For example, embodiments of this application can use a region mask combined with the outer contour of the floor plan to perform an outer contour mask, which can improve the efficiency and accuracy of path search.
[0239] Compared with the traditional A* algorithm, the improved A* algorithm optimizes the path evaluation mechanism by introducing new heuristic functions, including dynamic weights, multi-objective optimization (shortest path + minimum detour), and region masking based on the outer contour of the floor plan, thereby improving the efficiency and accuracy of path search and achieving fast and accurate path planning.
[0240] It should be noted that scaling errors or deviations may occur during path planning, thus requiring path correction. For example, path restoration techniques can be used to restore the scaled path to its original scale and correct any deviations in the path points, ensuring path accuracy.
[0241] For example, after obtaining the target wiring path between the device and the reference device corresponding to the device, the method further includes: detecting whether the target wiring path between the device and the reference device corresponding to the device connects the device and the reference device corresponding to the device; if the target wiring path does not connect the device or the reference device corresponding to the device, then performing a correction process on the target wiring path.
[0242] In this embodiment, the target cabling path includes a second front section and a second rear section of the cable tray. The second front section refers to the path segment between the device and the installation position of the cable tray, and the second rear section refers to the path segment between the reference device corresponding to the device and the installation position of the cable tray.
[0243] Optionally, for each device in the target scenario, embodiments of this application can determine whether the target wiring path connects to the device in the following way: if it passes through the location of the device, then the target wiring path is determined to be connected to the device; if it does not pass through the location of the device, then the target wiring path is determined not to be connected to the device. The same method principle can be used to determine whether the target wiring path connects to the corresponding reference device, which will not be elaborated upon here.
[0244] In one optional implementation, if no device is connected to the target cabling path, the correction method for the front section of the second cable tray is determined based on the path position pattern of the front section, and the cabling position of the front section of the second cable tray is adjusted based on the correction method and the location of the device. The path position pattern of the front section of the second cable tray is determined based on the cabling position of the front section of the second cable tray in the target cabling path.
[0245] In another optional implementation, if the target cabling path does not connect to the reference device corresponding to the device, the correction method for the second cable tray is determined according to the path position pattern of the second cable tray, and the cabling position of the second cable tray is adjusted based on the correction method of the second cable tray and the position of the reference device corresponding to the device. The path position pattern of the second cable tray is determined based on the cabling position of the second cable tray in the target cabling path.
[0246] The path position rules in the embodiments of this application include horizontal placement rules, vertical placement rules, and inclined placement rules.
[0247] The path location rules are determined based on the coordinate axes of the floor plan. For example, the horizontal placement rule means that the overall wiring position of the path segment is parallel to the horizontal axis of the coordinate axis; the vertical placement rule means that the overall wiring position of the path segment is parallel to the vertical axis of the coordinate axis; and the inclined placement rule means that the overall wiring position of the path segment is not parallel to either the horizontal or vertical axis of the coordinate axis.
[0248] For the path segments at the front and / or rear of the second cable tray, the wiring position of these path segments can be adjusted in the following ways. Taking the first device as an example, the adjustment of the front section of the second cable tray is based on the position of the first device, and the adjustment of the rear section of the second cable tray is based on the position of the reference device corresponding to the first device. For ease of description, the following methods will uniformly use the device position as the description:
[0249] If the path segment follows a horizontal placement pattern, the wiring position of the path segment is adjusted using a horizontal correction method based on the device's location. For example, in this case, the vertical axis coordinate value of the path segment is adjusted to match the vertical axis coordinate value of the device's location.
[0250] If the path segment follows a vertical placement pattern, the wiring position of the path segment is adjusted using a vertical correction method based on the device's location. For example, in this case, the horizontal axis coordinate value of the path segment is adjusted to match the horizontal axis coordinate value of the device's location.
[0251] If the path segment follows a tilted placement pattern, the wiring position of the path segment is adjusted using tilt correction methods based on the device's location and the path slope. For example, in this case, the path slope is determined, and the vertical and horizontal coordinates of the path segment are adjusted accordingly.
[0252] The path slope of the front section of the second cable tray is determined based on the wiring location of the front section of the second cable tray. The path slope of the rear section of the second cable tray is determined based on the wiring location of the rear section of the second cable tray.
[0253] It should be noted that the current target wiring path may include redundant points. In this embodiment, a vertex reduction algorithm can be used to merge and delete redundant points in the path based on directional consistency. This reduces the amount of path data and improves subsequent calculation efficiency. By vectorizing redundant discrete path points, the editability of the path and the controllability of the construction process are improved.
[0254] The discrete pixel path points are output and redundant vertices in the planned path are merged and deleted based on directional consistency, reducing the amount of path data. Vectorization improves the editability of subsequent construction drawings and the efficiency of generating equipment control instructions.
[0255] Optionally, after determining the target cabling path between each of the multiple devices included in the target scenario and the corresponding reference device, this embodiment of the application may further include: generating a floor plan containing the cabling paths based on the obtained multiple target cabling paths and the installation location of the cable tray; the cabling paths are used to characterize the cabling locations in the target scenario.
[0256] It should be noted that the cabling locations in the target scenario are determined based on the multiple target cabling paths and the installation locations of the cable trays.
[0257] In this embodiment of the application, the wiring locations in the target scenario include multiple target wiring paths and at least one connection path.
[0258] The installation area corresponding to the installation location of the cable tray may include at least one connection path, and each connection path is used to connect the cabling source point and the target cabling path.
[0259] It should be noted that since cable trays have width, the width of the installation area corresponding to the installation position of the cable tray can be determined based on the width of the cable tray.
[0260] In this embodiment, the target scenario may include at least one cabling source point, each cabling source point being used to manage at least one of network, low-voltage, and high-voltage systems. In this embodiment, the cabling source point may be a pre-set location or the location of a management device. The management device is used to manage devices connected to it. For example, the management device may be a low-voltage wiring shaft.
[0261] In one alternative implementation, if the installation location of the cable tray includes a connection path, then the cabling source point and the identified multiple target cabling paths are connected through the connection path.
[0262] In another alternative implementation, if the installation location of the cable tray includes multiple connection paths, each connection path is used to connect the cabling source point and at least one target cabling path.
[0263] It should be noted that the wiring source point refers to the location where multiple devices in the target scene need to be connected.
[0264] The wiring location includes the coordinates of the wiring location and / or its relative position to at least one area contained in the target scene.
[0265] For example, the coordinates of the wiring location can be coordinates within the target scene or coordinates on a floor plan. The relative position with respect to at least one area contained in the target scene can be the position with respect to walls contained in the target scene. The relative position with respect to at least one area contained in the target scene can be represented by marking the wiring path on the floor plan, where the wiring path characterizes the wiring location.
[0266] As shown in Figure 6A, this application provides a schematic diagram of a floor plan including wiring paths.
[0267] As shown in Figure 6B, this application provides a second schematic diagram of a floor plan including wiring paths.
[0268] The wiring location planning method provided in this application embodiment can receive a floor plan of a target scene and output a floor plan containing wiring paths. The wiring paths represent the wiring locations in the target scene, thereby showing the user the determined wiring locations.
[0269] Optionally, in this embodiment of the application, based on the planned cable tray path and the pre-stored wire data, the total length of the required wires, cable trays and other materials is calculated and summarized according to the Euclidean distance, and a corresponding material list is generated to facilitate construction preparation.
[0270] The bill of materials in this embodiment includes the required material types, the length of each material type, the price of each material type, and the total price.
[0271] As shown in Figure 7, an overall flowchart of an embodiment of this application is presented, and the specific steps are as follows:
[0272] Step S701: Determine the functional attributes of at least one area contained in the floor plan using the trained recognition model.
[0273] In other words, it uses deep learning models to achieve semantic segmentation of floor plans, and to identify the attributes of areas such as rooms and corridors, as well as wall structures.
[0274] Step S702: Based on the functional attributes of each area, automatically plan the cable tray routing and generate a first wiring diagram that includes the installation locations of the cable trays.
[0275] Step S703: Reduce the first wiring diagram to obtain the second wiring diagram.
[0276] Step S704: Based on the second wiring diagram, determine the initial wiring path between each device and the corresponding reference device to obtain multiple initial wiring paths.
[0277] Step S705: For each initial cabling path, divide the initial cabling path into the front section of the cable tray, the middle section of the cable tray, and the rear section of the cable tray.
[0278] Step S706: For each initial cabling path, perform path optimization processing on the front section, middle section, and rear section of the cable tray respectively to obtain the reference cabling path between the devices and the corresponding reference devices.
[0279] Step S707: Eliminate redundant points in each of the multiple reference routing paths using a vertex reduction algorithm.
[0280] Step S708: Perform resolution restoration processing on multiple reference routing paths to obtain multiple target routing paths.
[0281] Step S709: Perform correction processing on the target wiring paths that need to be corrected among the multiple target wiring paths to obtain the final wiring position.
[0282] Step S7010: Calculate consumables based on the wiring location.
[0283] In this embodiment, the final cable tray routing is generated based on network topology and segmented paths, enabling precise path correction and visualization.
[0284] This application has the following advantages:
[0285] 1. Fewer input parameters: Intelligent parameter recognition and configuration complete wall recognition, cable tray planning, and network topology generation, reducing or eliminating manual input, enabling the system to complete pre-cabining operations more efficiently. Users only need to provide the most basic information, and the system can generate a cabling plan that meets the requirements based on this information.
[0286] 2. Real-time performance and computational efficiency: By cropping and scaling the coordinate endpoints to the vertex region and using an outer contour mask, the search range during path planning is effectively reduced, thus lowering the computational load. The improved A* algorithm can calculate path planning schemes more efficiently and provide network topology routing schemes in a shorter time, thereby improving the response speed and real-time performance of routing work.
[0287] 3. High accuracy: This application employs a path segmentation method in path planning, dividing the overall cable tray routing into multiple independent path segments. An improved A* algorithm is used for precise planning of each segment, avoiding path intersections and confusion. This results in a simpler and clearer wiring diagram, avoiding the visual chaos caused by intersecting paths in traditional solutions.
[0288] As shown in Figure 8, a schematic diagram of a model training device according to an embodiment of this application includes:
[0289] The cable tray determination module 801 is used to respond to the operation of generating wiring positions triggered for a target scene, and to determine the installation position of the cable tray in the target scene based on the structural data of the target scene; the target scene includes multiple devices;
[0290] The path determination module 802 is used to select a reference device corresponding to the first device from the plurality of devices based on the connectivity relationship between the first device and other devices among the plurality of devices, and the location of the plurality of devices, and to determine a target wiring path between the first device and the reference device corresponding to the first device; the target wiring path passes through the installation location of the cable tray;
[0291] Optionally, the device may further include:
[0292] The wiring location determination module 803 is used to determine the wiring location in the target scene based on multiple obtained target wiring paths; wherein the wiring location includes the coordinates of the wiring location and / or the relative position between the wiring location and at least one area contained in the target scene.
[0293] Based on the same inventive concept as the above method embodiments, this application also provides an electronic device. The principle of the electronic device in solving the problem is similar to that of the method in the above embodiments. Therefore, the implementation of the electronic device can refer to the implementation of the above method, and the repeated parts will not be described again.
[0294] Referring to Figure 9, the electronic device 90 may include at least a processor 91 and a memory 92. The memory 92 stores program code, which, when executed by the processor 91, causes the processor 91 to perform the steps of the model training method described in the above embodiments of this application.
[0295] The electronic device 100 according to this embodiment of the present application will now be described with reference to FIG9. The electronic device 100 of FIG10 is merely an example and should not be construed as limiting the functionality and scope of the embodiments of the present application.
[0296] As shown in Figure 10, the electronic device 100 is presented in the form of a general electronic device. The components of the electronic device 100 may include, but are not limited to: at least one processing unit 101, at least one storage unit 102, and a bus 103 connecting different system components (including storage unit 102 and processing unit 101).
[0297] Bus 103 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0298] Storage unit 102 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1021 and / or cache memory 1022, and may further include read-only memory (ROM) 1023.
[0299] Storage unit 102 may also include a program / utility 1010 having a set (at least one) program module 1024, such program module 1024 including but not limited to: operating system, one or more application programs, other program modules and program data, each of these examples or some combination of these may include an implementation of a network environment.
[0300] Electronic device 100 can also communicate with one or more external devices 104 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable objects to interact with electronic device 100, and / or with any device that enables electronic device 100 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 105. Furthermore, electronic device 100 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 106. As shown, network adapter 106 communicates with other modules used in electronic device 100 via bus 103. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 100, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0301] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0302] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.
[0303] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.
[0304] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.
[0305] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A wiring location planning method, wherein, The method includes: In response to an operation triggering the generation of wiring locations for a target scenario, the installation locations of cable trays in the target scenario are determined based on the structural data of the target scenario; the target scenario includes multiple devices; and Based on the connectivity between the first device and other devices among the plurality of devices, a reference device corresponding to the first device is selected from the plurality of devices, and a target cabling path is determined between the first device and the reference device corresponding to the first device; the target cabling path passes through the installation location of the cable tray; wherein, the first device is one of the plurality of devices.
2. The method as described in claim 1, wherein, The structural data of the target scene includes the size and location of at least one region contained in the target scene.
3. The method as described in claim 1, wherein, The determination of the cable tray installation location in the target scene based on the structural data of the target scene includes: Based on the structural data of the target scene, the functional attributes of each region within at least one region of the target scene and the target region are determined; the target region is determined based on the functional attributes of each region; and Based on the location of the target area and the preset cable tray location setting rules, the installation position of the cable tray is determined.
4. The method of claim 3, wherein, The structural data of the target scene is the floor plan of the target scene; The determination of the functional attributes of each region within at least one region of the target scene based on the structural data of the target scene includes: The functional attributes of each area contained in the floor plan are determined using a trained recognition model.
5. The method of claim 3, wherein, The functional attributes include at least one of corridor, living room, room and wall, and different functional attributes have different priorities; the functional attributes of the target area have the highest priority.
6. The method of claim 3, wherein, The determination of the installation position of the cable tray based on the location of the target area and the preset cable tray position setting rules includes: Based on the location of the target area, a reference centerline corresponding to the target area is determined; the reference centerline represents the main line of the cable tray; and The installation position of the cable tray is determined on the reference centerline; the installation position of the cable tray includes the position in the target area located on the reference centerline.
7. The method of claim 6, wherein, Determining the installation position of the cable tray on the reference centerline includes: Two reference positions in the target scene are determined along the reference centerline; the reference positions in the target scene refer to the points where the reference centerline coincides with the contour surrounding the target region in the target scene. Target endpoints corresponding to the two reference positions are determined on the reference centerline; the distance between the target endpoint and the reference position is a first threshold, and the target endpoint is located inside the contour surrounding the target region; and The location on the line segment between the two target endpoints will be used as the installation location for the cable tray.
8. The method of claim 1, wherein, The step of selecting a reference device corresponding to the first device from the plurality of devices based on the connectivity relationship between the first device and other devices among the plurality of devices includes: Based on the connectivity between the first device and other devices among the plurality of devices, at least one connectable device corresponding to the first device is identified among the other devices; and Based on the distance between the first device and each of the at least one connectable devices, and the preset priority of each connectable device, a reference device corresponding to the first device is selected from the at least one connectable device.
9. The method of claim 1, wherein, After determining the installation location of the cable tray in the target scenario, the method further includes: Based on the installation location of the cable tray, the structural data of the target scene, and the locations of multiple devices included in the target scene, a first wiring diagram is generated; Determining the target wiring path between the first device and the reference device corresponding to the first device includes: Determine the target wiring path between the first device and the reference device corresponding to the first device in the first wiring diagram.
10. The method of claim 9, wherein, After generating the first wiring diagram, the method further includes: The first wiring diagram is reduced to generate a second wiring diagram, the resolution of the second wiring diagram being smaller than that of the first wiring diagram; Determining the target wiring path between the first device and the reference device corresponding to the first device includes: Determine the reference wiring path between the first device and the reference device corresponding to the first device in the second wiring diagram; By performing resolution restoration processing on the reference wiring path, the target wiring path between the first device and the reference device corresponding to the first device is obtained.
11. The method of claim 10, wherein, The step of reducing the first wiring diagram to obtain the second wiring diagram includes: Based on a preset target resolution, the position coordinates of the first positions of the multiple devices in the first wiring diagram, the first installation position of the cable tray, and the first area position of at least one area included in the target scene are transformed to obtain a second wiring diagram at the target resolution; or Based on the first locations of multiple devices and the first wall location in the first wiring diagram, following the direction from the periphery of the first wiring diagram inwards, and according to the edge of the wall, the peripheral area of the first wiring diagram that does not contain devices is removed to obtain an adjusted first wiring diagram; based on a preset target resolution, the first locations of multiple devices, the first installation locations of cable trays, and the first location of at least one area in the adjusted first wiring diagram are transformed by position coordinates to obtain a second wiring diagram at the target resolution; or Based on a preset target resolution, position coordinate transformation is performed on the first positions of the multiple devices, the first installation position of the cable tray, and the first area position of the at least one area in the first wiring diagram to obtain an adjusted first wiring diagram; based on the first positions of the multiple devices and the first wall position of the wall in the adjusted first wiring diagram, the outer area of the adjusted first wiring diagram that does not contain the devices is removed according to the edge of the wall in the direction from the outer perimeter of the adjusted first wiring diagram to the inner perimeter to obtain a second wiring diagram at the target resolution.
12. The method of claim 10, wherein, Determining the reference wiring path between the first device and the reference device corresponding to the first device in the second wiring diagram includes: Based on the second position of the first device, the second reference position of the reference device corresponding to the first device, the second installation position of the cable tray, and the second wall position of the wall in the second wiring diagram, an initial wiring path is determined between the first device and the reference device corresponding to the first device; the initial wiring path passes through the second installation position of the cable tray; and The initial wiring path is divided into multiple path segments, and path optimization processing is performed on each of the multiple path segments to obtain a reference wiring path between the first device and the reference device corresponding to the first device; the path optimization processing is performed based on the shortest path principle and the minimum bend principle.
13. The method of claim 12, wherein, The step of dividing the initial wiring path into multiple path segments includes: Based on the overlapping area between the initial wiring path and the second installation position of the cable tray, the initial wiring path is divided into the front section of the first cable tray, the middle section of the first cable tray, and the rear section of the first cable tray. The initial wiring path overlaps with the second installation position of the cable tray at both ends, including a front end position and a rear end position; the front section of the first cable tray is the path segment between the device and the front end position, the middle section of the first cable tray is the path segment between the front end position and the rear end position, and the rear section of the first cable tray is the path segment between the reference device corresponding to the device and the rear end position.
14. The method as claimed in any one of claims 1 to 13, wherein, After determining the target wiring path between the first device and the reference device corresponding to the first device, the method further includes: Determine whether the target cabling path between the first device and the reference device corresponding to the first device connects the first device and the reference device corresponding to the first device; and If the target wiring path is not connected to the first device or the reference device corresponding to the first device, then the target wiring path is corrected.
15. The method of claim 14, wherein, The target cabling path includes a second cable tray front section and a second cable tray rear section; the second cable tray front section refers to the path segment between the first device and the installation position of the cable tray, and the second cable tray rear section refers to the path segment between the reference device corresponding to the first device and the installation position of the cable tray; The correction process for the target wiring path includes: If the target cabling path is not connected to the first device, then the correction method of the front section of the second cable tray is determined according to the path position pattern of the front section of the second cable tray, and the cabling position of the front section of the second cable tray is adjusted based on the correction method of the front section of the second cable tray and the position of the first device; the path position pattern of the front section of the second cable tray is determined according to the cabling position of the front section of the second cable tray in the target cabling path; as well as If the target cabling path is not connected to the reference device corresponding to the first device, then the correction method of the second cable tray is determined according to the path position pattern of the second cable tray, and the cabling position of the second cable tray is adjusted based on the correction method of the second cable tray and the position of the reference device corresponding to the first device; the path position pattern of the second cable tray is determined according to the cabling position of the second cable tray in the target cabling path.
16. The method of claim 15, wherein, The path position rules include horizontal placement rules, vertical placement rules, and inclined placement rules, and the correction methods include horizontal correction methods, vertical correction methods, and inclined correction methods. The adjustment of the wiring position of the front section of the second cable tray based on the correction method of the front section of the second cable tray and the position of the first device includes: If the path position pattern of the front section of the second cable tray is the horizontal placement pattern, then the wiring position of the front section of the second cable tray is adjusted according to the position of the first device by means of the horizontal correction method. If the path position pattern of the front section of the second cable tray follows the vertical placement pattern, then based on the position of the first device, the wiring position of the front section of the second cable tray is adjusted using the vertical correction method; and If the path position pattern of the front section of the second cable tray is the inclined placement pattern, then according to the position of the first device and the path slope of the front section of the second cable tray, the wiring position of the front section of the second cable tray is adjusted by an inclined correction method; the path slope of the front section of the second cable tray is determined according to the wiring position of the front section of the second cable tray.
17. The method of claim 15, wherein, The path position rules include horizontal placement rules, vertical placement rules, and inclined placement rules, and the correction methods include horizontal correction methods, vertical correction methods, and inclined correction methods. The adjustment of the wiring position of the rear section of the second cable tray based on the correction method of the rear section of the second cable tray and the position of the reference device corresponding to the first device includes: If the path position pattern of the rear section of the second cable tray is the horizontal placement pattern, then the wiring position of the rear section of the second cable tray is adjusted according to the position of the reference device by the horizontal correction method. If the path position pattern of the rear section of the second cable tray follows the vertical placement pattern, then based on the position of the reference device, the wiring position of the rear section of the second cable tray is adjusted using the vertical correction method; and If the path position pattern of the rear section of the second cable tray is the tilted placement pattern, then according to the position of the reference device and the path slope of the rear section of the second cable tray, the wiring position of the rear section of the second cable tray is adjusted by tilt correction; the path slope of the rear section of the second cable tray is determined according to the wiring position of the rear section of the second cable tray.
18. A wiring location planning device, wherein, The device includes: A cable tray determination module is used to respond to an operation that generates wiring positions triggered for a target scenario, and to determine the installation position of the cable tray in the target scenario based on the structural data of the target scenario; the target scenario includes multiple devices; and The path determination module is used to select a reference device corresponding to the first device from the plurality of devices based on the connectivity relationship between the first device and other devices among the plurality of devices, and to determine a target cabling path between the first device and the reference device corresponding to the first device; the target cabling path passes through the installation position of the cable tray; wherein, the first device is one of the plurality of devices.
19. An electronic device comprising: Memory, used to store computer programs; A processor, when executing a computer program stored in the memory, to implement the method as described in any one of claims 1 to 17.
20. A computer-readable storage medium, characterized in that, include, memory, The memory is used to store a computer program that, when executed by a processor, causes the apparatus including the computer-readable storage medium to perform the method as described in any one of claims 1 to 17.