Lighting line wiring method and electronic device
By acquiring 3D apartment layout information and using a preset algorithm to generate the shortest path, the high-cost wiring problem caused by reliance on experience in existing technologies is solved, enabling fast and low-cost indoor lighting wiring.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIKE TECH CO LTD
- Filing Date
- 2022-08-03
- Publication Date
- 2026-05-26
Smart Images

Figure CN115455895B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of home renovation, and more particularly to a lighting circuit wiring method and electronic equipment. Background Technology
[0002] With the booming real estate industry, the interior decoration industry is also thriving. Quickly designing interior lighting wiring diagrams can not only improve the efficiency of interior design, but also reduce customer waiting time and increase customer satisfaction.
[0003] In related technologies, the wiring points are usually designed first, and then a wiring diagram connecting the wiring points is designed based on experience. However, this wiring method is highly dependent on personal experience, and the designed wiring diagram is usually not the lowest cost wiring diagram, leading to increased circuit installation costs. Summary of the Invention
[0004] The purpose of this application is to provide a lighting circuit wiring method and electronic device for automatic wiring of indoor house lighting circuits, thereby reducing the wiring and installation costs of lighting circuits during indoor decoration or renovation.
[0005] This application provides a lighting circuit wiring method, including:
[0006] Obtain the 3D floor plan information of the house to be wired; the 3D floor plan information includes: the location information of the wiring points in the house to be wired, and the 3D structural information of the house to be wired; the types of the wiring points include: distribution box points, switch points, and lighting fixture points; the distribution box point is a lighting circuit; based on the 3D floor plan information and a preset wiring algorithm, generate a first path between different lighting circuits, a second path between different types of points in the same lighting circuit, and a third path between points of the same type in the same lighting circuit; according to the first path, the second path, and the third path, generate a target path that connects all the points to be wired and has the shortest path, and perform wiring according to the target path.
[0007] Optionally, generating a first path between different lighting circuits, a second path between different types of points within the same lighting circuit, and a third path between points of the same type within the same lighting circuit based on the three-dimensional apartment information and a preset wiring algorithm includes: determining the wiring method between two points according to construction process rules; the wiring method includes: straight wiring method, diagonal wiring method, and S-shaped wiring method; the diagonal wiring method is a wiring method based on the shortest path between two points; and calculating the wiring path between the two points according to the wiring method between the two points.
[0008] Optionally, determining the wiring method between the two points according to the construction process rules includes: when both the first point and the second point are wall points, the wiring method between the two points is a straight-line wiring method.
[0009] Alternatively, if the first point is a wall point and the second point is a ceiling point, and if the wiring conduit between the first and second points is an existing conduit and the wiring cable is an existing cable, then the wiring method between the two points is a diagonal wiring method; if the wiring cable between the first and second points is a new cable and the corresponding room has a suspended ceiling, then the wiring method between the two points is a straight wiring method; if the wiring cable between the first and second points is a new cable and the corresponding room has no suspended ceiling or only a partial suspended ceiling, then the wiring method between the two points is an S-shaped wiring method; and in the case of the first... If both point 1 and point 2 are top-facing points, and the wiring conduit between point 1 and point 2 is an existing conduit and the wiring cable is an existing cable, then the wiring method between the two points is a diagonal wiring method; if the wiring conduit between point 1 and point 2 is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has a suspended ceiling, then the wiring method between the two points is a straight wiring method; if the wiring conduit between point 1 and point 2 is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has no suspended ceiling or a partial suspended ceiling, then the wiring method between the two points is an S-shaped wiring method.
[0010] Optionally, the preset wiring algorithm includes: obtaining a first set of points and a second set of points; performing the following calculation steps on the first set of points and the second set of points until the second set of points is empty: calculating the wiring path between every two points based on the three-dimensional apartment information to obtain a path set containing multiple wiring paths; the starting point of each path in the path set is a location in the first set of points; the ending point of each path in the path set is a point in the second set of points; moving points in the second set with the same identification information as the target point to the first set of points; wherein, the target point is the ending point of the shortest wiring path in the path set; points in the second set of points for the same lighting circuit have the same identification information.
[0011] Optionally, generating a first path between different lighting circuits based on the three-dimensional apartment layout information and a preset wiring algorithm includes: creating a first set of locations based on the distribution box locations, and creating a second set of locations based on the locations to be wired excluding the distribution box locations; inputting the first set of locations, the second set of locations, and the three-dimensional apartment layout information into the preset wiring algorithm to generate the first path between different lighting circuits.
[0012] Optionally, generating a second path between different types of points in the same lighting circuit based on the three-dimensional apartment layout information and a preset wiring algorithm includes: creating a first point set based on any switch point in each lighting circuit, and creating a second point set based on other points in each lighting circuit besides the switch point; if the second point set includes switch points, modifying the identification information of each switch point in the second point set so that the identification information of any switch point in the second point set is different from the identification information of other points in the second point set; inputting the first point set, the second point set, and the three-dimensional apartment layout information into the preset wiring algorithm to generate a second path between different lighting circuits.
[0013] Optionally, generating a third path between points of the same type in the same lighting circuit based on the three-dimensional apartment layout information and a preset wiring algorithm includes: creating a first point set based on any lamp point in each lighting circuit, and creating a second point set based on other lamp points in each lighting circuit except for switch points and a target switch point; modifying the identification information of all points in the second point set so that the identification information of each point in the second point set is different and also different from the identification information of the points in the first point set; inputting the first point set, the second point set, and the three-dimensional apartment layout information into the preset wiring algorithm to generate a third path between different lighting circuits.
[0014] This application also provides a lighting circuit wiring device, including:
[0015] The acquisition module is used to acquire the three-dimensional floor plan information of the house to be wired; the three-dimensional floor plan information includes: the location information of the points to be wired in the house to be wired, and the three-dimensional structural information of the house to be wired; the types of the points to be wired include: distribution box points, switch points, and lighting fixture points; the distribution box point is a lighting circuit; the generation module is used to generate a first path between different lighting circuits, a second path between different types of points in the same lighting circuit, and a third path between points of the same type in the same lighting circuit based on the three-dimensional floor plan information and a preset wiring algorithm; the generation module is also used to generate a target path that connects all the points to be wired and has the shortest path according to the first path, the second path, and the third path, and to perform wiring according to the target path.
[0016] Optionally, the device further includes: a determining module; the determining module is used to determine the wiring method between two points according to the construction process rules; the wiring method includes: straight wiring method, diagonal wiring method and S-shaped wiring method; the diagonal wiring method is a wiring method based on the shortest path between two points; the generating module is specifically used to calculate the wiring path between the two points according to the wiring method between the two points.
[0017] Optionally, the determining module is specifically configured to, when both the first and second points are wall points, use a straight-line wiring method between the two points; the determining module is further configured to, when the first point is a wall point and the second point is a ceiling point, use a diagonal wiring method between the two points if the wiring conduit between the first and second points is an existing conduit and the wiring cable is an existing cable; use a straight-line wiring method if the wiring cable between the first and second points is a new cable and there is a suspended ceiling in the corresponding room; and use a straight-line wiring method if the wiring cable between the first and second points is a new cable and there is no suspended ceiling or only a partial suspended ceiling in the corresponding room. If there is a suspended ceiling, the wiring method between the two points is an S-shaped wiring method; the determining module is further used to determine the wiring method between the two points as follows: if the wiring conduit between the first point and the second point is an original conduit and the wiring cable is an original cable, then the wiring method between the two points is a diagonal wiring method; if the wiring conduit between the first point and the second point is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has a suspended ceiling, then the wiring method between the two points is a straight wiring method; if the wiring conduit between the first point and the second point is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has no suspended ceiling or a partial suspended ceiling, then the wiring method between the two points is an S-shaped wiring method.
[0018] Optionally, the acquisition module is further configured to acquire a first set of points and a second set of points; the generation module is specifically configured to perform the following calculation steps on the first set of points and the second set of points until the second set of points is empty: calculate the wiring path between every two points based on the three-dimensional apartment information to obtain a path set containing multiple wiring paths; the starting point of each path in the path set is a location in the first set of points; the ending point of each path in the path set is a point in the second set of points; move the points in the second set that have the same identification information as the target point to the first set of points; wherein, the target point is the ending point of the shortest wiring path in the path set; the points in the second set of points that are in the same lighting circuit have the same identification information.
[0019] Optionally, the device further includes: a creation module; the creation module is used to create a first set of locations based on the distribution box locations, and to create a second set of locations based on the locations to be wired excluding the distribution box locations; the generation module is specifically used to input the first set of locations, the second set of locations, and the three-dimensional apartment layout information into the preset wiring algorithm to generate a first path between different lighting circuits.
[0020] Optionally, the device further includes: a modification module; a creation module, further configured to create a first set of points based on any switch point in each lighting circuit, and to create a second set of points based on other points in each lighting circuit besides the aforementioned switch point; the modification module is configured to modify the identification information of each switch point in the second set of points, such that the identification information of any switch point in the second set of points is different from the identification information of other points in the second set of points, when the second set of points of points includes switch points; the generation module is specifically configured to input the first set of points of points, the second set of points of points, and the three-dimensional apartment layout information into the preset wiring algorithm to generate a second path between different lighting circuits.
[0021] Optionally, the creation module is further configured to create the first set of points based on any luminaire point in each lighting circuit, and to create the second set of points based on other luminaire points in each lighting circuit except for switch points and the target switch point; the modification module is further configured to modify the identification information of all points in the second set of points, so that the identification information of each point in the second set of points is different, and is also different from the identification information of the points in the first set of points; the generation module is specifically configured to input the first set of points, the second set of points, and the three-dimensional apartment layout information into the preset wiring algorithm to generate a third path between different lighting circuits.
[0022] This application also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of any of the above-described lighting circuit wiring methods.
[0023] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the above-described lighting circuit wiring methods.
[0024] This application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described lighting circuit wiring methods.
[0025] The lighting wiring method and electronic device provided in this application first obtain the three-dimensional floor plan information of the house to be wired; the three-dimensional floor plan information includes: the point information of the wiring points in the house to be wired, and the three-dimensional structural information of the house to be wired. Then, based on the three-dimensional floor plan information and a preset wiring algorithm, a first path between different lighting circuits, a second path between different types of points in the same lighting circuit, and a third path between points of the same type in the same lighting circuit are generated. Finally, based on the first path, the second path, and the third path, a target path is generated that connects all the points to be wired and has the shortest path, and wiring is performed according to the target path. This allows for the rapid design of the indoor wiring layout when the indoor three-dimensional floor plan information is known, thereby reducing the cost of electrical wiring and installation during indoor decoration or renovation. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in 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 some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is one of the flowcharts illustrating the lighting circuit wiring method provided in this application;
[0028] Figure 2 This is the second flowchart illustrating the lighting circuit wiring method provided in this application;
[0029] Figure 3 This is the third flowchart illustrating the lighting circuit wiring method provided in this application;
[0030] Figure 4 This is a structural schematic diagram of the lighting circuit wiring device provided in this application;
[0031] Figure 5 This is a schematic diagram of the structure of the electronic device provided in this application. Detailed Implementation
[0032] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0033] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0034] In related technologies, lighting circuit wiring in interior decoration is typically done based on experience. This method is inefficient and, due to varying experience levels among wiring personnel, cannot control wiring costs. Therefore, this application proposes a lighting circuit wiring method based on multi-level recursion to achieve automated lighting circuit wiring.
[0035] Compared to traditional wiring methods, the automatic wiring method provided in this application embodiment can automatically generate wiring paths for lighting circuits according to different levels when the three-dimensional floor plan information of the house is known. This not only improves the wiring efficiency of lighting circuits, but also minimizes the cost of wiring according to this path.
[0036] The lighting circuit wiring method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0037] like Figure 1 As shown in the embodiment of this application, a lighting circuit wiring method is provided, which may include the following steps 101 to 103:
[0038] Step 101: Obtain the 3D floor plan information of the house to be wired.
[0039] The three-dimensional apartment information includes: the location information of the wiring points in the apartment to be wired, and the three-dimensional structural information of the apartment to be wired.
[0040] For example, the aforementioned three-dimensional floor plan information includes the three-dimensional structural information of the house to be wired and the location information of the wiring points. The aforementioned three-dimensional structural information is used to constrain the wiring path of the lighting circuit; the aforementioned location information includes the location information of the distribution box and related elements of the lighting circuit.
[0041] For example, the relevant elements of the above-mentioned lighting circuit include: luminaires and switches. The lighting circuit in the house to be wired includes at least one lighting circuit; the lighting circuit can be composed of switches and luminaires with a lighting control relationship. That is, the lighting circuit in the embodiments of this application can be composed of one or more luminaires and one or more switches capable of controlling the luminaires.
[0042] For example, the above lighting control relationship is a control relationship between a lighting fixture and a switch. It can be that one switch controls one lighting fixture, one switch controls multiple lighting fixtures, multiple switches control multiple lighting fixtures, or even multiple switches control one lighting fixture.
[0043] For example, the location information of each of the aforementioned wiring points may also include identification information for that location, which indicates the lighting circuit to which the location belongs. For ease of calculation, the distribution box in this embodiment can be considered as a lighting circuit.
[0044] It is understandable that the identification information of the distribution box is different from that of the points in other lighting circuits. Therefore, the distribution box can be regarded as a lighting circuit when calculating the path.
[0045] Step 102: Based on the three-dimensional apartment information and the preset wiring algorithm, generate a first path between different lighting circuits, a second path between different types of points in the same lighting circuit, and a third path between points of the same type in the same lighting circuit.
[0046] The types of wiring points include: distribution box points, switch points, and lighting fixture points. The distribution box point serves as a lighting circuit.
[0047] For example, after obtaining the above three-dimensional apartment information, the wiring path of each level can be calculated according to the preset wiring algorithm.
[0048] For example, the embodiments of this application may include three levels: the first path is the wiring path calculated by the first level, the second path is the wiring path calculated by the second level, and the third path is the wiring path calculated by the third level.
[0049] For example, the first-level wiring path is the wiring path between the distribution box and each lighting circuit (the distribution box is considered as a lighting circuit), i.e., the first path; the second-level wiring path is the wiring path between the switch and the lamp in the lighting circuit, i.e., the second path; and the third-level wiring path is the wiring path between each lamp point in the same lighting circuit, i.e., the third path. Once the third path is determined, a lighting circuit can be formed.
[0050] It should be noted that when calculating the wiring path at the first level, each lighting circuit needs to be treated as a whole, and the shortest path between different lighting circuits needs to be calculated; when calculating the wiring path at the second level, each switch point in each lighting circuit needs to be treated as a whole, and all luminaire points in each lighting circuit need to be treated as a whole, and the shortest path between different wholes needs to be calculated; when calculating the wiring path at the third level, each luminaire point needs to be treated as a separate whole, and the shortest path between different luminaire points needs to be calculated.
[0051] It should be noted that when calculating the wiring path for the second level mentioned above, if a switch location contains multiple adjacent switches, it can be treated as a single switch location for wiring. Similarly, when calculating the wiring path for the second level, if a lighting location contains multiple adjacent lighting fixtures, it can be treated as a single lighting fixture location for wiring.
[0052] For example, such as Figure 2 As shown, the preset wiring algorithm provided in this application embodiment can sequentially calculate the wiring path of the first level, the wiring path of the second level, and the wiring path of the third level, and finally obtain the target path connecting all points, thereby completing the wiring of the lighting circuit.
[0053] Step 103: Based on the first path, the second path, and the third path, generate a target path that connects all the points to be wired and has the shortest path, and perform wiring according to the target path.
[0054] For example, after obtaining the first path, the second path and the third path, the paths are spliced together to obtain the final wiring path, i.e. the target path.
[0055] It should be noted that the shortest routing path involved in the embodiments of this application can be the actual shortest routing path or the shortest routing path that can be calculated. Specifically, theoretically, the shortest routing path calculated is a local optimal solution implemented by a greedy algorithm, which is infinitely close to the optimal solution, but is not the optimal solution.
[0056] Optionally, in this embodiment of the application, it is necessary to determine the wiring method between the two points according to the construction process rules, and calculate the wiring path between the two points, thereby determining the shortest path.
[0057] For example, when calculating the wiring path between two points, the wiring method needs to be determined according to the construction process rules. Different wiring methods will result in different wiring path lengths between the two points.
[0058] Specifically, the wiring path between two points can be calculated based on the following steps, wherein step 102 above may include steps 102a1 and 102a2:
[0059] Step 102a1: Determine the wiring method between the two points according to the construction process rules.
[0060] The wiring methods include: straight wiring, diagonal wiring, and S-shaped wiring; the diagonal wiring method is a wiring method based on the shortest path between two points.
[0061] Step 102a2: Calculate the wiring path between the two points according to the wiring method between the two points.
[0062] It should be noted that the path between the aforementioned lighting circuits is the path between any point in one lighting circuit and any point in another lighting circuit. In essence, it is also a wiring path between two points, namely the first path mentioned above.
[0063] Understandably, for the straight-line wiring method described above, the lines between the two points need to be perfectly straight, without any bends or curves. For the S-shaped wiring method described above, considering that the direction of the groove during wiring cannot be parallel to the direction of the wall reinforcement, an S-shaped wiring method is required.
[0064] For example, if both the first and second points are wall points, step 102a1 above may include the following step A1:
[0065] A1. If both the first and second points are wall-mounted points, the wiring method between the two points is a straight-line wiring method.
[0066] For example, when the first point is a wall point and the second point is a ceiling point, step 102a1 above may include step A2, or A3, or step A4:
[0067] A2. If the wiring conduit between the first point and the second point is the original conduit and the wiring cable is the original cable, then the wiring method between the two points is the diagonal wiring method.
[0068] A3. If the wiring between the first point and the second point is a newly added cable and there is a suspended ceiling in the corresponding room, then the wiring method between the two points is a straight-line wiring method.
[0069] A4. If the wiring between the first point and the second point is a newly added cable, and the corresponding room has no suspended ceiling or only a partial suspended ceiling, then the wiring method between the two points is an S-shaped wiring method.
[0070] For example, when both the first point and the second point are top surface points, step 102a1 above may include the following steps: A5, A6, or A7:
[0071] A5. If the wiring conduit between the first point and the second point is the original conduit and the wiring cable is the original cable, then the wiring method between the two points is the diagonal wiring method.
[0072] A6. If the wiring conduit between the first point and the second point is a newly added conduit, the wiring cable is a newly added cable, and the corresponding house has a suspended ceiling, then the wiring method between the two points is a straight-line wiring method.
[0073] A7. If the wiring conduit between the first point and the second point is a newly added conduit, the wiring cable is a newly added cable, and the corresponding house has no suspended ceiling or has a partial suspended ceiling, then the wiring method between the two points is an S-shaped wiring method.
[0074] Specifically, you can refer to Table 1 below to determine the wiring method between the two points:
[0075]
[0076] Table 1
[0077] For example, when determining the wiring method between two points, Table 1 above can be used as a reference; different wiring methods have different wiring lengths. After determining the wiring method between two points, the wiring path and wiring distance between the two points can be calculated. Specifically, in the case of a diagonal wiring method, the line connecting the two points can be directly used as the wiring path between the two points, and the length of the wiring path can be obtained. In the case of a straight wiring method or an S-shaped wiring method, the wiring path between the two points can be obtained using the A* algorithm, and the length of the wiring path can be obtained.
[0078] Furthermore, since different wiring methods result in different wiring costs, after calculating the target path, the wiring cost can also be determined based on the wiring method of each sub-path within the target path.
[0079] Optionally, in this embodiment of the application, the wiring paths of the first, second, and third levels can be calculated sequentially using the preset wiring algorithm provided in this embodiment of the application.
[0080] It should be noted that the calculation of the above-mentioned multi-level wiring path is generated by the calculation process of the preset wiring algorithm provided in the embodiment of this application. Since a single calculation process cannot calculate the wiring path between all points, it is necessary to use the preset wiring algorithm to perform multiple calculations.
[0081] For example, such as Figure 3 As shown, the routing algorithm provided in this application embodiment may include the following steps 104 and 105:
[0082] Step 104: Obtain the first set of points and the second set of points.
[0083] Step 105: Perform the following calculation steps on the first set of points and the second set of points until the second set of points is empty:
[0084] A8. Calculate the wiring path between every two points based on the three-dimensional apartment information to obtain a path set containing multiple wiring paths.
[0085] Wherein, the starting point of each path in the path set is a location in the first point set; the ending point of each path in the path set is a location in the second point set.
[0086] A9. Move the points in the second set of points that have the same identification information as the target point to the first set of points.
[0087] The target point is the endpoint of the shortest wiring path in the path set; the points in the same lighting circuit in the second point set have the same identification information.
[0088] For example, the wiring algorithm provided in this application requires two point sets as input, namely the first point set and the second point set.
[0089] Understandably, the aforementioned pre-defined routing algorithm uses any point in the first set of points as the starting point and any point in the second set of points as the ending point, calculates the routing path between the two points, and obtains a path set containing multiple routing paths. Then, the paths in this path set are sorted, the shortest routing path is determined, and all points in the second set with the same identifier as the ending point of this shortest routing path are moved to the first set of points. This process is repeated until the second set of points is empty.
[0090] For example, based on the above-mentioned preset wiring algorithm, the wiring paths of the above three levels can be calculated by creating different sets of first points and sets of second points.
[0091] For example, in order to calculate the first path between different lighting circuits, step 102 above may include steps 102b1 and 102b2:
[0092] Step 102b1: Create the first set of locations based on the distribution box locations, and create the second set of locations based on the locations to be wired, excluding the distribution box locations.
[0093] Step 102b2: Input the first set of points, the second set of points, and the three-dimensional apartment information into the preset wiring algorithm to generate the first path between different lighting circuits.
[0094] For example, in calculating the wiring path of the first level, the first set of points only includes the distribution box points, and the second set of points includes all other points in the points to be wired except for the distribution box points. According to the preset wiring algorithm, it is necessary to calculate the wiring path between the distribution box points and all other points in the second set of points, select the wiring path with the shortest path, and move the points in the second set of points with the same identification information as the end point of the wiring path to the first set of points.
[0095] like Figure 2 As shown, triangles represent distribution box locations, circles represent lighting fixture locations, squares represent switch locations, and two connected squares represent multi-control switch locations. This multi-control switch can control two lighting circuits, namely lighting circuit 1 and lighting circuit 2. Each location can be marked with a different identity document (ID). In the first level, the shortest wiring path between the distribution box location and other locations is 0-1. Since lighting circuit 1 and lighting circuit 2 are controlled by the same switch location, they can be considered as a single unit based on the location identification information. Therefore, after determining the shortest wiring path 0-1, all locations with IDs 1 and 2 can be moved from the second location set to the first location set. This process is repeated until the second location set is empty.
[0096] For example, after steps 102b1 and 102b2 described above, the following can be obtained: Figure 2 The first level of wiring path shown is the first path mentioned above.
[0097] For example, in order to calculate a second path between points of different types in the same lighting circuit, step 102 above may include steps 102c1 to 102c3:
[0098] Step 102c1: Create a first set of points based on any switch point in each lighting circuit, and create a second set of points based on other points in each lighting circuit besides the switch point.
[0099] Step 102c2: If the second point set includes switch points, modify the identification information of each switch point in the second point set so that the identification information of any switch point in the second point set is different from the identification information of other points in the second point set.
[0100] Step 102c3: Input the first set of points, the second set of points, and the three-dimensional apartment information into the preset wiring algorithm to generate a second path between different lighting circuits.
[0101] For example, for a lighting circuit containing multiple different switches at different switch locations, any switch location in the lighting circuit can be added to a first set of locations (as the starting location), and the other switch locations and luminaire locations in the lighting circuit can be added to a second set of locations. The identifier information of the switch locations in the second set can be modified, for example, by adding a suffix "-lampi", where i indicates the nth switch location, to distinguish it from other modified locations. Then, the second-level wiring path is calculated using the aforementioned preset wiring algorithm.
[0102] It should be noted that when using the preset routing algorithm to calculate routing paths at different levels, the first point set and the second point set need to be recreated. That is, the first point set and the second point set are different each time the preset routing algorithm is used to calculate the routing path.
[0103] For example, in order to calculate a third path between points of the same type in the same lighting circuit, step 102 above may include steps 102d1 to 102d3:
[0104] Step 102d1: Create the first set of points based on any lamp point in each lighting circuit, and create the second set of points based on other lamp points in each lighting circuit except for the switch points and the target switch point.
[0105] Step 102d2: Modify the identification information of all points in the second point set so that the identification information of each point in the second point set is different and also different from the identification information of the points in the first point set.
[0106] Step 102d3: Input the first set of points, the second set of points, and the three-dimensional apartment information into the preset wiring algorithm to generate a third path between different lighting circuits.
[0107] For example, when calculating the wiring path at the third level, for each lighting circuit, any luminaire point in the lighting circuit needs to be added to the first point set, and the other luminaire points in the lighting circuit need to be added to the second point set. Then, since the identification information of each luminaire point in the same lighting circuit is the same, the identification information of each luminaire point in the second point set needs to be modified. Similar to the modification method in step 102c2 above, the identification information can also be modified by adding the suffix "-lampi".
[0108] For example, after modifying the identification information of each lamp point in the second point set, the third path connecting each lamp point in each lighting circuit can be obtained through the preset wiring algorithm.
[0109] For example, after obtaining the first path, the second path, and the third path, the target path passing through all points can be obtained by splicing them together. Then, the lighting circuit can be wired according to the target path.
[0110] The lighting wiring method provided in this application first obtains the three-dimensional floor plan information of the house to be wired. This information includes the location information of the wiring points within the house and the three-dimensional structural information of the house. Then, based on the three-dimensional floor plan information and a preset wiring algorithm, a first path is generated between different lighting circuits, a second path is generated between different types of points within the same lighting circuit, and a third path is generated between points of the same type within the same lighting circuit. Finally, based on the first, second, and third paths, a target path is generated that connects all the wiring points with the shortest path, and wiring is performed according to the target path. This allows for the rapid design of the indoor wiring layout when the indoor three-dimensional floor plan information is known, thereby reducing the cost of electrical wiring and installation during interior decoration or renovation.
[0111] It should be noted that the lighting circuit wiring method provided in this application embodiment can be executed by a lighting circuit wiring device or a control module within that device for executing the lighting circuit wiring method. This application embodiment uses a lighting circuit wiring device executing the lighting circuit wiring method as an example to illustrate the lighting circuit wiring device provided in this application embodiment.
[0112] It should be noted that, in the embodiments of this application, the lighting circuit wiring methods shown in the accompanying drawings are all illustrated by way of example with reference to one of the accompanying drawings in the embodiments of this application. In specific implementation, the lighting circuit wiring methods shown in the accompanying drawings of the above methods can also be implemented in conjunction with any other accompanying drawings that can be combined with those shown in the above embodiments, which will not be elaborated here.
[0113] The lighting circuit wiring device provided in this application is described below, and the lighting circuit wiring method described below can be referred to in correspondence with the lighting circuit wiring method described above.
[0114] Figure 4 This is a schematic diagram of the structure of a lighting circuit wiring device provided in an embodiment of this application, as shown below. Figure 4 As shown, it specifically includes:
[0115] The acquisition module 401 is used to acquire the three-dimensional floor plan information of the house to be wired; the three-dimensional floor plan information includes: the point information of the points to be wired in the house to be wired, and the three-dimensional structural information of the house to be wired; the generation module 402 is used to generate a first path between different lighting circuits, a second path between different types of points in the same lighting circuit, and a third path between points of the same type in the same lighting circuit based on the three-dimensional floor plan information and a preset wiring algorithm; the generation module 402 is also used to generate a target path that connects all the points to be wired and has the shortest path according to the first path, the second path, and the third path, and to perform wiring according to the target path; wherein, the types of the points to be wired include: distribution box points, switch points, and lamp points; the distribution box point is a lighting circuit.
[0116] Optionally, the device further includes: a determining module; the determining module is used to determine the wiring method between two points according to the construction process rules; the wiring method includes: straight wiring method, diagonal wiring method and S-shaped wiring method; the diagonal wiring method is a wiring method based on the shortest path between two points; the generating module 402 is specifically used to calculate the wiring path between the two points according to the wiring method between the two points.
[0117] Optionally, the determining module is specifically configured to, when both the first and second points are wall points, use a straight-line wiring method between the two points; the determining module is further configured to, when the first point is a wall point and the second point is a ceiling point, use a diagonal wiring method between the two points if the wiring conduit between the first and second points is an existing conduit and the wiring cable is an existing cable; use a straight-line wiring method if the wiring cable between the first and second points is a new cable and there is a suspended ceiling in the corresponding room; and use a straight-line wiring method if the wiring cable between the first and second points is a new cable and there is no suspended ceiling or only a partial suspended ceiling in the corresponding room. If there is a suspended ceiling, the wiring method between the two points is an S-shaped wiring method; the determining module is further used to determine the wiring method between the two points as follows: if the wiring conduit between the first point and the second point is an original conduit and the wiring cable is an original cable, then the wiring method between the two points is a diagonal wiring method; if the wiring conduit between the first point and the second point is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has a suspended ceiling, then the wiring method between the two points is a straight wiring method; if the wiring conduit between the first point and the second point is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has no suspended ceiling or a partial suspended ceiling, then the wiring method between the two points is an S-shaped wiring method.
[0118] Optionally, the acquisition module 401 is further configured to acquire a first set of points and a second set of points; the generation module 402 is specifically configured to perform the following calculation steps on the first set of points and the second set of points until the second set of points is empty: calculate the wiring path between every two points based on the three-dimensional apartment information to obtain a path set containing multiple wiring paths; the starting point of each path in the path set is a location in the first set of points; the ending point of each path in the path set is a point in the second set of points; move the points in the second set of points with the same identification information as the target point to the first set of points; wherein, the target point is the ending point of the shortest wiring path in the path set; the points in the second set of points for the same lighting circuit have the same identification information.
[0119] Optionally, the device further includes: a creation module; the creation module is used to create a first set of points based on the distribution box points, and to create a second set of points based on the points to be wired excluding the distribution box points; the generation module 402 is specifically used to input the first set of points, the second set of points, and the three-dimensional apartment information into the preset wiring algorithm to generate a first path between different lighting circuits.
[0120] Optionally, the device further includes: a modification module; a creation module, further configured to create a first set of points based on any switch point in each lighting circuit, and to create a second set of points based on other points in each lighting circuit besides the switch point; the modification module is configured to modify the identification information of each switch point in the second set of points when the second set of points includes switch points, so that the identification information of any switch point in the second set of points is different from the identification information of other points in the second set of points; the generation module 402 is specifically configured to input the first set of points, the second set of points, and the three-dimensional apartment layout information into the preset wiring algorithm to generate a second path between different lighting circuits.
[0121] Optionally, the creation module is further configured to create the first set of points based on any lamp point in each lighting circuit, and to create the second set of points based on other lamp points in each lighting circuit except for switch points and the target switch point; the modification module is further configured to modify the identification information of all points in the second set of points, so that the identification information of each point in the second set of points is different, and is also different from the identification information of the points in the first set of points; the generation module 402 is specifically configured to input the first set of points, the second set of points, and the three-dimensional apartment information into the preset wiring algorithm to generate a third path between different lighting circuits.
[0122] The lighting wiring device provided in this application first acquires the three-dimensional floor plan information of the house to be wired. This information includes the location information of the wiring points and the three-dimensional structural information of the house. Then, based on the three-dimensional floor plan information and a preset wiring algorithm, it generates a first path between different lighting circuits, a second path between different types of points within the same lighting circuit, and a third path between points of the same type within the same lighting circuit. Finally, based on the first, second, and third paths, it generates a target path that connects all the wiring points with the shortest path, and then performs wiring according to the target path. This allows for the rapid design of the indoor wiring layout when the indoor three-dimensional floor plan information is known, thereby reducing the cost of electrical wiring and installation during interior decoration or renovation.
[0123] Figure 5 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 5 As shown, the electronic device may include: a processor 510, a communication interface 520, a memory 530, and a communication bus 540, wherein the processor 510, the communication interface 520, and the memory 530 communicate with each other through the communication bus 540. The processor 510 can call logic instructions in the memory 530 to execute a lighting circuit wiring method. This method includes: acquiring three-dimensional floor plan information of the house to be wired; the three-dimensional floor plan information includes: point information of the points to be wired in the house, and three-dimensional structural information of the house; based on the three-dimensional floor plan information and a preset wiring algorithm, generating a first path between different lighting circuits, a second path between points of different types within the same lighting circuit, and a third path between points of the same type within the same lighting circuit; generating a target path that connects all the points to be wired and has the shortest path according to the first path, the second path, and the third path, and performing wiring according to the target path; wherein the types of the points to be wired include: distribution box points, switch points, and lamp points; the distribution box point is considered as a lighting circuit.
[0124] Furthermore, the logical instructions in the aforementioned memory 530 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0125] On the other hand, this application also provides a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, and when the program instructions are executed by a computer, the computer can execute the lighting circuit wiring method provided by the above methods. The method includes: obtaining three-dimensional floor plan information of the house to be wired; the three-dimensional floor plan information includes: point information of the points to be wired in the house to be wired, and three-dimensional structural information of the house to be wired; generating a first path between different lighting circuits, a second path between different types of points in the same lighting circuit, and a third path between points of the same type in the same lighting circuit based on the three-dimensional floor plan information and a preset wiring algorithm; generating a target path that connects all the points to be wired and has the shortest path according to the first path, the second path, and the third path, and wiring according to the target path; wherein, the types of the points to be wired include: distribution box points, switch points, and lamp points; the distribution box point is a lighting circuit.
[0126] In another aspect, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the lighting circuit wiring methods provided above. The method includes: acquiring three-dimensional floor plan information of a house to be wired; the three-dimensional floor plan information includes: point information of the points to be wired in the house to be wired, and three-dimensional structural information of the house to be wired; generating a first path between different lighting circuits, a second path between points of different types in the same lighting circuit, and a third path between points of the same type in the same lighting circuit, based on the three-dimensional floor plan information and a preset wiring algorithm; generating a target path that connects all the points to be wired and has the shortest path according to the first path, the second path, and the third path, and performing wiring according to the target path; wherein the types of the points to be wired include: distribution box points, switch points, and lamp points; the distribution box point is considered as a lighting circuit.
[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A lighting wiring method, characterized by, include: Obtain the 3D floor plan information of the house to be wired; The three-dimensional floor plan information includes: the location information of the wiring points in the house to be wired, and the three-dimensional structural information of the house to be wired; the types of the wiring points include: distribution box points, switch points, and lighting fixture points; the distribution box point is a lighting circuit. Based on the three-dimensional apartment layout information and the preset wiring algorithm, a first path between different lighting circuits, a second path between different types of points in the same lighting circuit, and a third path between points of the same type in the same lighting circuit are generated. Based on the first path, the second path, and the third path, generate a target path that connects all the points to be wired and has the shortest path, and perform wiring according to the target path; The wiring methods between any two points in the first path, the second path, and the third path include: straight wiring, diagonal wiring, and S-shaped wiring; the preset wiring algorithm includes: when the wiring method is diagonal wiring, the line connecting the two points is used as the wiring path between the two points; when the wiring method is straight wiring or S-shaped wiring, the wiring path between the two points is obtained by A* algorithm.
2. The method of claim 1, wherein, The process of generating a first path between different lighting circuits, a second path between different types of points within the same lighting circuit, and a third path between points of the same type within the same lighting circuit, based on the three-dimensional apartment layout information and a preset wiring algorithm, includes: According to the construction process rules, determine the wiring method between the two points; Calculate the wiring path between the two points based on the wiring method between them.
3. The method of claim 2, wherein, The step of determining the wiring method between two points according to construction process rules includes: If both the first and second points are wall-mounted points, the wiring method between the two points is a straight-line wiring method. When the first point is a wall point and the second point is a ceiling point, if the wiring conduit between the first point and the second point is an existing conduit and the wiring cable is an existing cable, then the wiring method between the two points is a diagonal wiring method; if the wiring cable between the first point and the second point is a new cable and there is a suspended ceiling in the corresponding room, then the wiring method between the two points is a straight wiring method; if the wiring cable between the first point and the second point is a new cable and there is no suspended ceiling or a partial suspended ceiling in the corresponding room, then the wiring method between the two points is an S-shaped wiring method. Furthermore, if both the first and second points are top-level points, and the wiring conduit between the first and second points is an existing conduit and the wiring cable is an existing cable, then the wiring method between the two points is a diagonal wiring method; if the wiring conduit between the first and second points is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has a suspended ceiling, then the wiring method between the two points is a straight wiring method; if the wiring conduit between the first and second points is a newly added conduit and the wiring cable is a newly added cable, and the corresponding room has no suspended ceiling or a partial suspended ceiling, then the wiring method between the two points is an S-shaped wiring method.
4. The method according to any one of claims 1 to 3, characterized in that, The preset routing algorithm includes: Obtain the first set of points and the second set of points; Perform the following calculation steps on the first set of points and the second set of points until the second set of points is empty: Based on the three-dimensional apartment layout information, the wiring path between every two points is calculated to obtain a path set containing multiple wiring paths; the starting point of each path in the path set is a location in the first point set; the ending point of each path in the path set is a point in the second point set. Move the points in the second set of points that have the same identification information as the target point to the first set of points; The target point is the endpoint of the shortest wiring path in the path set; the points in the same lighting circuit in the second point set have the same identification information.
5. The method of claim 4, wherein, The step of generating a first path between different lighting circuits based on the three-dimensional apartment layout information and a preset wiring algorithm includes: A first set of locations is created based on the locations of the distribution boxes, and a second set of locations is created based on the locations to be wired, excluding the locations of the distribution boxes. The first set of points, the second set of points, and the three-dimensional apartment layout information are input into the preset wiring algorithm to generate a first path between different lighting circuits.
6. The method of claim 4, wherein, The step of generating a second path between different types of points in the same lighting circuit based on the three-dimensional apartment layout information and a preset wiring algorithm includes: The first set of points is created based on any switch point in each lighting circuit, and the second set of points is created based on the other points in each lighting circuit besides the switch point. If the second set of points includes switch points, modify the identification information of each switch point in the second set of points so that the identification information of any switch point in the second set of points is different from the identification information of other points in the second set of points. The first set of points, the second set of points, and the three-dimensional apartment layout information are input into the preset wiring algorithm to generate a second path between different lighting circuits.
7. The method of claim 4, wherein, The step of generating a third path between points of the same type in the same lighting circuit based on the three-dimensional apartment layout information and a preset wiring algorithm includes: The first set of points is created based on any luminaire point in each lighting circuit, and the second set of points is created based on other luminaire points in each lighting circuit except for switch points and the target switch point; Modify the identification information of all points in the second point set so that the identification information of each point in the second point set is different and also different from the identification information of the points in the first point set. The first set of points, the second set of points, and the three-dimensional apartment layout information are input into the preset wiring algorithm to generate a third path between different lighting circuits.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the lighting circuit wiring method as described in any one of claims 1 to 7.
9. A computer readable storage medium having stored thereon a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the lighting circuit wiring method as described in any one of claims 1 to 7.
10. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the lighting circuit wiring method according to any one of claims 1 to 7.