CN113779661A - Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus - Google Patents

Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus Download PDF

Info

Publication number
CN113779661A
CN113779661A CN202110845624.3A CN202110845624A CN113779661A CN 113779661 A CN113779661 A CN 113779661A CN 202110845624 A CN202110845624 A CN 202110845624A CN 113779661 A CN113779661 A CN 113779661A
Authority
CN
China
Prior art keywords
switch
lamp
switches
house
wiring
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110845624.3A
Other languages
Chinese (zh)
Inventor
李磊磊
马海山
杜超
何蒲
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Fangjianghu Technology Co Ltd
Original Assignee
Beijing Fangjianghu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Fangjianghu Technology Co Ltd filed Critical Beijing Fangjianghu Technology Co Ltd
Priority to CN202110845624.3A priority Critical patent/CN113779661A/en
Publication of CN113779661A publication Critical patent/CN113779661A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/13Architectural design, e.g. computer-aided architectural design [CAAD] related to design of buildings, bridges, landscapes, production plants or roads
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F21LIGHTING
    • F21VFUNCTIONAL FEATURES OR DETAILS OF LIGHTING DEVICES OR SYSTEMS THEREOF; STRUCTURAL COMBINATIONS OF LIGHTING DEVICES WITH OTHER ARTICLES, NOT OTHERWISE PROVIDED FOR
    • F21V23/00Arrangement of electric circuit elements in or on lighting devices
    • F21V23/001Arrangement of electric circuit elements in or on lighting devices the elements being electrical wires or cables
    • FMECHANICAL ENGINEERING; LIGHTING; HEATING; WEAPONS; BLASTING
    • F21LIGHTING
    • F21VFUNCTIONAL FEATURES OR DETAILS OF LIGHTING DEVICES OR SYSTEMS THEREOF; STRUCTURAL COMBINATIONS OF LIGHTING DEVICES WITH OTHER ARTICLES, NOT OTHERWISE PROVIDED FOR
    • F21V23/00Arrangement of electric circuit elements in or on lighting devices
    • F21V23/04Arrangement of electric circuit elements in or on lighting devices the elements being switches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/10Geometric CAD
    • G06F30/18Network design, e.g. design based on topological or interconnect aspects of utility systems, piping, heating ventilation air conditioning [HVAC] or cabling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/04Forecasting or optimisation specially adapted for administrative or management purposes, e.g. linear programming or "cutting stock problem"
    • G06Q10/047Optimisation of routes or paths, e.g. travelling salesman problem
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Systems or methods specially adapted for specific business sectors, e.g. utilities or tourism
    • G06Q50/08Construction
    • HELECTRICITY
    • H05ELECTRIC TECHNIQUES NOT OTHERWISE PROVIDED FOR
    • H05BELECTRIC HEATING; ELECTRIC LIGHT SOURCES NOT OTHERWISE PROVIDED FOR; CIRCUIT ARRANGEMENTS FOR ELECTRIC LIGHT SOURCES, IN GENERAL
    • H05B47/00Circuit arrangements for operating light sources in general, i.e. where the type of light source is not relevant
    • H05B47/10Controlling the light source

Abstract

The invention provides an automatic wiring method of an illumination circuit, electronic equipment, a storage medium and a device, wherein the method comprises the following steps: acquiring house type data of a house, wherein the house type data comprises original house type data, switch data, lamp data and a control relation between a switch and a lamp; obtaining a lamp switch pair formed by a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; sequencing switches in the house according to the original house type data and the switch data and traversing the switches in sequence; marking whether the switch participates in networking and/or is a power inlet of the affiliated lamp switch pair in the traversal process; based on the marking result, wiring of the lighting circuit is generated. The automatic wiring method, the electronic equipment, the storage medium and the device for the lighting circuit, provided by the invention, realize the automatic and orderly generation of the lighting circuit, and improve the generation efficiency and reliability of the lighting circuit.

Description

Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus
Technical Field
The invention relates to the technical field of computers, in particular to an automatic wiring method of an illumination circuit, electronic equipment, a storage medium and a device.
Background
The decoration BIM (Building Information Modeling) is a digital model which is based on various relevant Information data of decoration project and provides service for the whole life cycle design, construction and operation of the decoration project. The designer uses the BIM software to design a finishing plan for the customer. Because the designer does not understand the rule of electric power wiring, can't design electric power circuit diagram manually, even understand, it is also troublesome to design, and designer and customer expect that BIM software possesses the ability of intelligent wiring, can draw the electric power wiring that accords with the construction requirement automatically, reduce the design mistake when saving designer's work load.
Compared with automatic wiring of common socket points, the lighting circuit has more complex business rules, for example, one switch can control the lamp, and one lamp can be controlled by a plurality of switches, so that the realization difficulty is higher. For a long time, BIM software does not have the automatic wiring capability of an illumination circuit, designers have to manually wire, and as no professional background exists, a circuit diagram which is drawn reluctantly is difficult to reach the construction standard, and the manual wiring efficiency is low, so that errors are easy to occur.
Disclosure of Invention
The invention provides an automatic wiring method of a lighting circuit, electronic equipment, a storage medium and a device, aiming at the problems in the prior art.
The invention provides an automatic wiring method of a lighting circuit, which comprises the following steps: acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp; obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group; sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, marking whether the switch participates in networking and/or is a power inlet switch of the lamp switch pair to which the switch belongs to obtain a marking result; and generating wiring of the lighting circuit according to the marking result.
According to the automatic wiring method for the lighting circuit provided by the invention, the sequencing of the switches in the house specifically comprises the following steps: sequencing the switches in the house according to the original house type data and the switch data; generating the wiring of the lighting circuit according to the marking result specifically includes: according to the marking result, the switch participating in networking is extracted, and wiring between the switch participating in networking and a distribution box is generated; then, generating the wiring in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair to which the wiring belongs.
According to the automatic wiring method for the lighting circuit provided by the invention, in the traversal process, the marking of whether the switch participates in networking and/or is the power inlet switch of the lamp switch pair specifically comprises the following steps: when traversing to a current switch, if a first light switch pair to which the current switch belongs is not marked with an electric power entrance switch, marking the current switch as the electric power entrance switch of the first light switch pair, and marking the current switch as participating in networking; if the first light switch pair has at least one other switch, and the second light switch pair to which the other switch belongs does not mark the power entrance switch, marking the other switch as the power entrance switch of the second light switch pair, and marking the other switch as not participating in networking.
According to the automatic wiring method of the lighting circuit provided by the invention, the extraction of the switch participating in networking and the generation of the wiring between the switch participating in networking and the distribution box specifically comprise the following steps: and acquiring a sequencing result of the switches participating in networking according to the sequencing result of the switches in the house, and respectively connecting the distribution box and the switches participating in networking according to the sequencing result of the switches participating in networking to generate wiring between the switches participating in networking and the distribution box.
According to the automatic wiring method for the lighting circuit provided by the invention, the generating of the routing in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair to which the routing belongs specifically comprises the following steps: for the light switch pair, if a non-power inlet switch exists, connecting the non-power inlet switch through the power inlet switch, and connecting the light group through one non-power inlet switch; if only the power inlet switch is present, the lamp set is connected using the power inlet switch.
According to the automatic wiring method for the lighting circuit provided by the invention, the sequencing of the switches in the house according to the original house type data and the switch data specifically comprises the following steps: calculating the optimal path from the initial room of the house to other rooms of the house according to the original house type data; wherein the starting room is a room in which the distribution box is located; the optimal path is the path with the least number of door openings which are crossed from the starting room to the other rooms; traversing the switches on all the wall surfaces in a preset direction from the distribution box; in the traversing process, judging whether the traversing path meets a door opening or not; if the door opening is met, judging whether the door opening and two rooms connected with the door opening are in the optimal path, if so, penetrating through the door opening, and continuously traversing the switches on the wall surfaces of the next rooms; if not, the door does not pass through the door opening, and other switches on the current wall surface are traversed forwards; and after the traversal of the switches of the house is finished, obtaining a sequencing result of the switches of the house according to the traversal result of the switches.
According to the invention, the automatic wiring method of the lighting circuit is provided, and the method further comprises the following steps: adding the wiring between the switches participating in networking and the distribution box and the wiring in the lamp switch pair to the house type data to obtain processed house type data; and pushing the processed house type data to a terminal for rendering by the terminal to obtain a house type graph with the lighting lines distributed.
According to the automatic wiring method for the lighting circuit provided by the invention, before the lamp switch pair composed of the lamp group and the switch group is obtained according to the switch data, the lamp data and the control relation between the switch and the lamp, the method further comprises the following steps: and processing the house type data to obtain intermediate state data in a preset format.
The present invention also provides an automatic wiring device for an illumination circuit, comprising: a house type data acquisition module for: acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp; a light switch pair acquisition module to: obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group; a marking module to: sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, marking whether the switch participates in networking and/or is a power inlet switch of the lamp switch pair to which the switch belongs to obtain a marking result; a wiring module for: and generating wiring of the lighting circuit according to the marking result.
The invention also provides an electronic device, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor executes the program to realize the steps of the automatic wiring method of the lighting circuit.
The present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the method for automatic wiring of a lighting circuit as described in any one of the above.
The present invention also provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the method for automatically wiring a lighting circuit as described in any one of the above.
According to the automatic wiring method, the electronic equipment, the storage medium and the device for the lighting circuit, the lamp switch pairs formed by the lamp groups and the switch groups are obtained, switches in a house are sequentially traversed according to the sequencing result, whether the switches participate in networking and/or are power inlet switches of the lamp switch pairs or not is marked in the traversing process, and the wiring of the lighting circuit is generated according to the marking result, so that the automatic and ordered generation of the lighting circuit is realized, and the generation efficiency and the reliability of the lighting circuit are improved.
Drawings
In order to more clearly illustrate the technical solutions of the present invention or the prior art, the drawings needed for the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a schematic flow chart of an automatic wiring method for a lighting circuit according to the present invention;
FIG. 2 is a schematic diagram of a process for obtaining a pair of light switches in the automatic wiring method for a lighting circuit according to the present invention;
FIG. 3 is a schematic diagram of house wiring generated according to the automatic wiring method for lighting circuits provided by the present invention;
FIG. 4 is a second schematic flow chart of the automatic wiring method for lighting circuit according to the present invention;
FIG. 5 is a schematic structural diagram of an automatic wiring device for lighting circuit provided by the present invention;
fig. 6 is a schematic structural diagram of an electronic device provided in the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The lighting circuit automatic wiring method, electronic device, storage medium, and apparatus of the present invention are described below with reference to fig. 1 to 6.
Fig. 1 is a schematic flow chart of an automatic wiring method for a lighting circuit according to the present invention. As shown in fig. 1, the method includes:
step 101, acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp.
The house type graph of the room can be edited and established at the client side to obtain original house type data. The original house type data comprises original room, wall surface, door and window and other information. And adding switch data and lamp data in the original house type data, and setting a control relation between a switch and a lamp, thereby obtaining the house type data of the house. And the client sends the house type data to the automatic wiring service of the server for subsequent processing. The switch data comprises a switch and position information of the switch, and the lamp data comprises position information of a lamp and a lamp.
After receiving the house type data, the server can calculate the mapping relationship between the data of the room and the door, the data of the room and the point (including a switch and a lamp), the data of the wall surface and the door and the like through geometric calculation for the use of the subsequent steps, and the adopted calculation method is conventional geometric knowledge, such as: vector calculations, point-to-line distance calculations, coordinate calculations of point translations on a line, etc.
102, obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group.
And obtaining a lamp switch pair consisting of the lamp group and the switch group according to the switch data, the lamp data and the control relation between the switch and the lamp, namely, the point position of the structured processing lighting circuit.
Fig. 2 is a schematic diagram of the acquisition process of the lamp switch pair in the automatic wiring method of the lighting circuit provided by the invention. As shown in fig. 2:
a switch may have multiple connections (i.e., multiple buttons) that control multiple lights. If switch a has 2 pairs, lamp 1 and lamp 2 are controlled separately. One lamp can be controlled by one switch, which is called single control; the two switches may also be used to control the on/off of the lamp, which is called dual control, and it is understood that more switches may also be used to control the on/off of the lamp, which is not limited herein. For example, the lamp 2, the switch A and the switch B form a double-control circuit. A group of lamps (group of lamps) and a group of switches (group of switches) controlling them are called a pair of lamp switches.
The switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group. The method comprises the steps of firstly analyzing the point positions of all switches and lamps, then analyzing the control relation between the switches and the lamps, and finally finding the switches for controlling the group of lamps by taking a group of lamps (controlled by the same switch and simultaneously turned on and off) as a reference, preferably finding all the switches for controlling the group of lamps. This results in a logical model corresponding to the left physical model in fig. 2, which in fig. 2 shows the case of a lamp switch pair. Wherein, banks 1 includes lamp 1, banks 2 includes lamp 2, and banks 3 includes lamp 3 and lamp 3'.
103, sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; and in the traversing process, marking whether the switch participates in networking and/or is the electric power inlet switch of the lamp switch pair to obtain a marking result.
After sequencing the switches in the house, traversing the switches in the house in sequence according to the sequencing result of the switches, and marking whether the switches participate in networking and/or whether the switches are the power inlet switches of the affiliated lamp switch pairs in the traversing process to obtain a marking result. Wherein, participating in the network deployment indicates that it needs to be connected with the distribution box. The power inlet is the inlet where power is introduced from the outside, and there is only one power inlet switch for each lamp switch pair. It will be appreciated that the participation in networking is necessarily a power entry switch, but the power entry switches of the light switch pairs do not necessarily participate in networking.
And 104, generating wiring of the lighting circuit according to the marking result.
Whether the switch participates in networking and/or is the marking result of the power inlet switch of the affiliated lamp switch pair can represent the function or position of each switch in the lighting circuit, and wiring of the lighting circuit can be generated according to the marking result of whether the switch participates in networking and/or is the power inlet switch of the affiliated lamp switch pair and the wiring specification of the circuit.
According to the automatic wiring method of the lighting circuit, the lamp switch pairs formed by the lamp groups and the switch groups are obtained, switches in a house are sequentially traversed according to the sequencing result, whether the switches participate in networking and/or whether the switches are power inlets of the lamp switch pairs or not is marked in the traversing process, and the wiring of the lighting circuit is generated according to the marking result, so that the automatic and ordered generation of the lighting circuit is realized, and the generation efficiency and the reliability of the lighting circuit are improved.
According to the automatic wiring method for the lighting circuit provided by the invention, the sequencing of the switches in the house specifically comprises the following steps: sequencing the switches in the house according to the original house type data and the switch data; generating the wiring of the lighting circuit according to the marking result specifically includes: according to the marking result, the switch participating in networking is extracted, and wiring between the switch participating in networking and a distribution box is generated; then, generating the wiring in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair to which the wiring belongs.
As shown in fig. 3, fig. 3 is a schematic diagram of house wiring generated by the method for automatically wiring a lighting circuit according to the present invention, in the method provided by the embodiment of the present application, in fig. 3, a switch S1 is one of the switches marked to participate in networking, the distribution box is connected to the switch S1, and then the switch S1 is used to connect to the other switch or the lamp group in the corresponding lamp switch pair, where the switch S1 is both a power inlet switch of the corresponding lamp switch pair and a participating networking switch.
When sorting the switches in the house, for example, the switches may be sorted according to the house routing direction based on the original house type data and the switch data. Sequencing the switches according to the house winding direction can be performed according to the clockwise direction or the anticlockwise direction of the house wall layout.
And when generating the wiring of the lighting circuit according to the marking result, designing the automatic wiring of the lighting circuit into a two-step flow based on the designed lamp switch pair structure: step 1, calculating a switch to be networked with a distribution box, and sequentially connecting the switch with the distribution box; and step 2, sequentially processing the wiring inside each lamp switch pair. And extracting the switches participating in networking according to the marking result of the switches, and firstly generating wiring between the switches participating in networking and the distribution box. Then, the wiring in the lamp switch pair is generated according to the marking result of whether the switch in the lamp switch pair is the power inlet. There is one and only one power inlet switch inside each light switch pair. According to the automatic wiring method of the lighting circuit, the switches in the house are sequenced according to the original house type data and the switch data, the switches participating in networking are extracted according to the marking result, the wiring between the switches participating in networking and the distribution box is generated, the wiring in the lamp switch pair is generated according to the marking result of the power inlet switch of the lamp switch pair, and the efficiency and the orderliness of switch sequencing and automatic wiring are improved.
According to the automatic wiring method for the lighting circuit provided by the invention, in the traversal process, the marking of whether the switch participates in networking and/or is the power inlet switch of the lamp switch pair specifically comprises the following steps: when traversing to a current switch, if a first light switch pair to which the current switch belongs is not marked with an electric power entrance switch, marking the current switch as the electric power entrance switch of the first light switch pair, and marking the current switch as participating in networking; if the first light switch pair has at least one other switch, and the second light switch pair to which the other switch belongs does not mark the power entrance switch, marking the other switch as the power entrance switch of the second light switch pair, and marking the other switch as not participating in networking.
The switch that needs to be networked with the distribution box needs to be calculated, all lamp switch pairs can be communicated, and each lamp switch pair can be internally provided with only one power inlet switch. And traversing all the switches in sequence and marking. The marking logic is that if the lamp switch pair where the switch is located does not mark the power inlet switch, the switch is marked as the power inlet switch of the lamp switch pair and is marked to participate in networking; then, if the lamp switch pair where the switch is located has other switches, and the other switches also belong to other lamp switch pairs, and the other lamp switch pairs to which the other switches belong do not mark the power entry switch, the other switches are marked as power entry switches of the other lamp switch pairs, but are marked as not participating in networking. If the light switch pair in which the switch is located has been marked with a power entry switch, the switch is marked as a non-power entry switch of the light switch pair in which it is located, or no marking is made. Where no reference is made, it may also be used to indicate that the corresponding switch is a non-power inlet switch.
For example, if the lamp switch pair where the switch is located is not marked with the power inlet switch, the switch is marked as the power inlet switch of the lamp switch pair and is marked to participate in networking; then, if the light switch pair in which this switch is located is of the double control type and the other light switch pair in which the other switch is located has not marked a power entry switch, the other switch is marked as the power entry switch of the corresponding light switch pair, but is marked as not being networked. If the light switch pair in which this switch is located has been marked with a power entry switch, then the light switch pair is marked as a non-power entry switch of the corresponding light switch pair, or not marked at all.
In the automatic wiring method of the lighting circuit, whether the switch participates in networking and/or is the power inlet of the lamp switch pair or not is marked, if the first lamp switch pair to which the switch belongs does not have a power inlet switch, the switch is marked as the power inlet switch of the first lamp switch pair and is marked as participating in networking, if the first lamp switch pair also has at least one other switch and the second lamp switch pair to which the other switch belongs does not have a power inlet switch, the other switches are marked as the power inlet switches of the second lamp switch pair and are marked as not participating in networking, and reliable and ordered marking of the switch types is achieved.
According to the automatic wiring method of the lighting circuit provided by the invention, the extraction of the switch participating in networking and the generation of the wiring between the switch participating in networking and the distribution box specifically comprise the following steps: and acquiring a sequencing result of the switches participating in networking according to the sequencing result of the switches in the house, and respectively connecting the distribution box and the switches participating in networking according to the sequencing result of the switches participating in networking to generate wiring between the switches participating in networking and the distribution box.
The networking switch obtained in the previous process and the distribution box are regarded as a complete power loop, and the form of the power loop is consistent with that of a common socket loop. When the switches participating in networking are extracted and wiring between the switches participating in networking and the distribution box is generated, the sequencing results of the switches participating in networking are obtained according to the sequencing results of the switches in the house, the distribution box and the switches participating in networking are respectively connected in a wiring mode according to the sequencing results of the switches participating in networking, for example, the switches participating in networking are sequentially connected with the distribution box in a power connection mode according to the sequencing results of the switches participating in networking, and wiring between the switches participating in networking and the distribution box is generated. The switch participating in networking can be called a networking switch, and the networking switch is characterized by belonging to a power inlet switch and being marked as a networking participation switch.
According to the automatic wiring method of the lighting circuit, the sequencing result of the switches participating in networking is obtained according to the sequencing result of the switches in the house, the distribution box and the switches participating in networking are respectively connected according to the sequencing result of the switches participating in networking, wiring between the switches participating in networking and the distribution box is generated, and reliable access of electric power of each lamp switch pair is guaranteed.
According to the automatic wiring method for the lighting circuit provided by the invention, the generating of the routing in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair to which the routing belongs specifically comprises the following steps: for the light switch pair, if a non-power inlet switch exists, connecting the non-power inlet switch through the power inlet switch, and connecting the light group through one non-power inlet switch; if only the power inlet switch is present, the lamp set is connected using the power inlet switch.
For the lamp switch pair, if the lamp switch pair has a non-power inlet switch, the power inlet switch of the lamp switch pair is connected with the non-power inlet switch of the lamp switch pair, and the lamp group of the lamp switch pair is connected with one non-power inlet switch; if the lamp switch pair only has the power inlet switch, namely, the non-power inlet switch does not exist, the power inlet switch of the lamp switch pair is used for connecting the lamp group of the lamp switch pair.
If a group of lamps is controlled by two switches simultaneously (i.e. a double control circuit), the circuit needs to be branched from the switch of the power inlet to the other switch and then connected from the other switch to the lamps. For example, starting from the power inlet switch of each lamp switch pair, if there is another switch, the other switch is connected. When the connection line of the switch and the lamp is generated, if the connection line is a single-control lighting circuit, the connection line does not need to be selected, and the power inlet switch is directly used for connecting the lamp group. If the lighting circuit is double-control, the non-power inlet switch is selected to be connected with the lamp group.
According to the automatic wiring method of the lighting circuit, provided by the invention, aiming at the lamp switch pair, if the non-power inlet switch exists, the non-power inlet switch is connected through the power inlet switch, and the lamp group is connected through the non-power inlet switch, and if only the power inlet switch exists, the power inlet switch is used for connecting the lamp group, so that the reliable wiring inside the lamp switch pair is realized.
The following illustrates the scheme of the embodiment of the present invention:
for example, the control relationship between the lamp and the switch is obtained as follows: the lamp 1 is controlled by the switch A, the lamp 2 is controlled by the switch A, the lamp 3 is controlled by the switch B, the switch C, the lamp 4 is controlled by the switch C, the lamp 5 is controlled by the switch D, and the lamps 6 and 6' are controlled by the switch E.
The relationship of the lamp switch pairs formed by the lamp groups and the switch groups is obtained as shown in table 1:
table 1: lamp group and lamp switch pair relation formed by switch group
Number pair of lamp switches Lamp number Switch numbering
1 1 A
2 2 AC
3 3 BC
4 4 C
5 5 DE
6 6,6' E
Sequencing switches in the house according to the original house type data and the switch data to obtain a switch sequence of switch A-switch B-switch C-switch D-switch E, traversing the switches according to the sequence, wherein the process comprises the following steps:
a switch A: the lamp switch pair comprises a lamp switch pair 1 and a lamp switch pair 2, and the lamp switch pair 1 and the lamp switch pair 2 are both free of power inlet switches, so that the switch A is a power inlet switch of the lamp switch pair 1 and is marked as participating in networking, and meanwhile, the switch A is also a power inlet switch of the lamp switch pair 2 and is marked as participating in networking; further, the lamp switch pair 2 further includes a switch C, and if the lamp switch pair 3 to which the switch C belongs does not yet have a power entrance switch, the switch C is marked as the power entrance switch of the lamp switch pair 3 and does not participate in networking, and if the lamp switch pair 4 to which the switch C belongs also does not yet have a power entrance switch, the switch C is marked as the power entrance switch of the lamp switch pair 4 and does not participate in networking.
A switch B: the lamp switch pair comprises a lamp switch pair 3, and a switch C in the lamp switch pair 3 is used as a power inlet switch, so that a switch B is not the power inlet switch of the lamp switch pair 3 and does not participate in networking.
A switch C: the lamp switch pairs comprise lamp switch pairs 2, 3 and 4, wherein switches in the lamp switch pairs 3 and 4 are marked, and a power inlet switch is arranged in the lamp switch pair 2, so that the switch C is marked as a non-power inlet switch in the lamp switch pair 2 and does not participate in networking.
A switch D: the lamp switch pair is the lamp switch pair 5, and no power inlet switch exists in the lamp switch pair 5, then the marker switch D is the power inlet switch of the lamp switch pair 5 and participates in the networking, further, the lamp switch pair 5 also includes a switch E, the switch E also belongs to the lamp switch pair 6, and no power inlet switch exists in the lamp switch pair 6, then the marker switch E is the power inlet switch of the lamp switch pair 6 and does not participate in the networking.
A switch E: the lamp switch pair includes lamp switch pairs 5 and 6, the lamp switch pair 6 is marked, the lamp switch pair 5 has a power switch entrance, therefore, the switch E is marked as a non-power entrance switch in the lamp switch pair 5 and does not participate in networking.
So far, all switches have been traversed, and the collected traversed mark information is shown in table 2:
table 2: marking information after switch traversal
Figure BDA0003180691210000131
And extracting switches participating in networking into a switch A and a switch D, and respectively establishing electrical connection between the switch A and the switch D and the distribution box according to the obtained switch sequence. The non-power inlet switches are not present in the lamp switch pairs 1, 4, 6, and the power inlet switches in the lamp switch pairs 1, 4, 6 are directly connected to the corresponding lamp groups. In the lamp switch pair 2, the power inlet switch A is connected with the non-power inlet switch C, and the non-power inlet switch C is connected with the corresponding lamp group, namely the lamp 2; the lamp switch pair 3 is connected with a non-electric power inlet switch B through an electric power inlet switch C, and is connected with a corresponding lamp group, namely a lamp 3, through the non-electric power inlet switch B; the lamp switch pair 5 is connected with a non-power inlet switch E by a power inlet switch D, and connected with the corresponding lamp groups, namely lamps 6 and 6' by the non-power inlet switch E.
Through the steps, wiring between the distribution box and the networking switch, between the power inlet switch and the non-power inlet switch and between the lamp sets is completed, and therefore wiring of the lighting circuit is obtained.
According to the automatic wiring method for the lighting circuit provided by the invention, the sequencing of the switches in the house according to the original house type data and the switch data specifically comprises the following steps:
calculating the optimal path from the initial room of the house to other rooms of the house according to the original house type data; wherein the starting room is a room in which the distribution box is located; the optimal path is the path with the least number of door openings which are crossed from the starting room to the other rooms; traversing the switches on all the wall surfaces in a preset direction from the distribution box; in the traversing process, judging whether the traversing path meets a door opening or not; if the door opening is met, judging whether the door opening and two rooms connected with the door opening are in the optimal path, if so, penetrating through the door opening, and continuously traversing the switches on the wall surfaces of the next rooms; if not, the door does not pass through the door opening, and other switches on the current wall surface are traversed forwards; and after the traversal of the switches of the house is finished, obtaining a sequencing result of the switches of the house according to the traversal result of the switches.
The sequencing of the switches may be processed on the basis of the acquired house layout data. First, an optimal path is calculated from the starting room of the house to the other rooms of the house. Wherein the starting room is the room in which the distribution box is located. Because the circuit is usually routed through the door opening while traveling to the ground, the optimal path is the path with the least number of door openings from the starting room to the other rooms to save wiring loss.
Switches that traverse all walls in a preset direction (e.g., clockwise or counterclockwise) may be started from the switchbox. Judging whether the door opening is met or not in the traversing process; if the door opening is met, judging whether the door opening and two rooms connected with the door opening are in the optimal path. The optimal path includes at least an originating room, a target room, and a door opening between the two rooms. Therefore, it can be appreciated that the entry door must not be in the optimal path.
And if the door opening and the two rooms connected with the door opening are in the optimal path, which indicates that the door opening is the door opening for wiring, the door opening is penetrated, and the switch on the wall surface of the next room is continuously traversed. The traversing process of the switch of the wall surface is always carried out according to the preset direction of the wall surface. And if the door opening and the two rooms connected with the door opening are not in the optimal path, the door opening is not penetrated, and other switches on the current wall surface are continuously traversed forwards. And if the switch of the current wall surface is completely traversed in the traversing process of the switch of the wall surface, searching the adjacent wall surface of the current room according to the preset direction, and continuously traversing the switch on the adjacent wall surface. And after all the switches of the house are traversed, obtaining the sequencing results of all the switches of the house according to the traversing results of the switches.
According to the automatic wiring method for the lighting circuit, provided by the invention, all wall switches are traversed in the preset direction from the distribution box, and in the traversing process, the switches pass through the door opening or do not pass through the door opening according to whether the door opening is in the optimal path from the starting room to other rooms of the house, so that the traversing is finally completed and the switch sequencing result is obtained, the automatic optimization sequencing for the switches is realized, the optimal path for wiring is favorably obtained, and the wiring efficiency is improved.
According to the invention, the automatic wiring method of the lighting circuit is provided, and the method further comprises the following steps: adding the wiring between the switches participating in networking and the distribution box and the wiring in the lamp switch pair to the house type data to obtain processed house type data; and pushing the processed house type data to a terminal for rendering by the terminal to obtain a house type graph with the lighting lines distributed.
The wiring between the switches participating in networking and the distribution box and the wiring in the lamp switch pair can form a wiring loop of the lighting circuit. And after the wiring loop of the lighting circuit is obtained, adding the wiring loop of the lighting circuit into the house type data to obtain processed house type data, and pushing the processed house type data to the terminal for rendering by the terminal to obtain a house type graph with the lighting circuit. The terminal may be a client or a WebGL terminal, for example.
According to the automatic wiring method for the lighting circuit, the wiring between the switches and the distribution box participating in networking and the wiring in the lamp switch pair are added into the house type data to obtain the processed house type data, the processed house type data are pushed to the terminal, the terminal renders the house type data to obtain the house type graph with the distributed lighting circuit, and the automatic wiring display in the house type graph is achieved.
According to the automatic wiring method for the lighting circuit provided by the invention, before the lamp switch pair composed of the lamp group and the switch group is obtained according to the switch data, the lamp data and the control relation between the switch and the lamp, the method further comprises the following steps: and processing the house type data to obtain intermediate state data in a preset format.
After the house type data is obtained, the intermediate state data in the preset format that can be utilized by the algorithm can be obtained by processing the house type data (for example, converting the data structure) for subsequent processing.
According to the automatic wiring method for the lighting circuit, the intermediate state data in the preset format is obtained by processing the house type data, and the subsequent processing process is simplified.
Fig. 4 is a second schematic flow chart of the automatic wiring method for the lighting circuit according to the present invention. The automatic wiring method of the lighting circuit provided by the invention is mainly operated at a server side and can be matched with a BIM client side. The BIM client is responsible for designing the house, arranging the water and electricity point locations and rendering the generated wiring. The server is responsible for calculation and logic generation of wiring, and provides service capability to the outside through a REST (Representational State Transfer) interface. As shown in fig. 4, the method for automatically wiring the lighting circuit provided by the invention comprises the following steps:
1. designing a house type at a BIM client, and placing a switch and a lamp of each room;
2. setting the control relation between the switch and the corresponding lamp;
3. pushing the stored house type data to an automatic wiring service of a server;
4. the server analyzes and processes the user type data to assemble intermediate state data available for an algorithm;
5. analyzing and identifying lighting circuits contained in the house type data;
6. and generating wiring data of the lighting circuit. The method comprises the steps of structurally processing lighting point positions, generating distribution box and partial switch wiring, and generating internal wiring of each lamp switch;
7. adding the generated routing data into the house type data (assembling the routing data), and then returning the processed house type data to the client;
8. and rendering a wiring effect at the client to obtain a house type graph with the well-laid lighting circuit.
The invention can realize the automatic wiring of the whole house lighting circuit and improve the intelligent design capability of the BIM software.
The following describes the automatic wiring device for lighting circuit provided by the present invention, and the automatic wiring device for lighting circuit described below and the automatic wiring method for lighting circuit described above can be referred to correspondingly.
Fig. 5 is a schematic structural diagram of the automatic wiring device of the lighting circuit provided by the invention. As shown in fig. 5, the apparatus includes a house type data acquisition module 10, a light switch pair acquisition module 20, a marking module 30, and a wiring module 40, wherein: the house type data acquisition module 10 is configured to: acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp; the lamp switch pair acquisition module 20 is configured to: obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group; the marking module 30 is configured to: sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, marking whether the switch participates in networking and/or is a power inlet switch of the lamp switch pair to which the switch belongs to obtain a marking result; the wiring module 40 is used for: and generating wiring of the lighting circuit according to the marking result.
According to the automatic wiring device for the lighting circuit, the lamp switch pairs consisting of the lamp groups and the switch groups are obtained, switches in a house are sequentially traversed according to the sequencing result, whether the switches participate in networking and/or whether the switches are power inlets of the lamp switch pairs or not is marked in the traversing process, and the wiring of the lighting circuit is generated according to the marking result, so that the automatic and ordered generation of the lighting circuit is realized, and the generation efficiency and the reliability of the lighting circuit are improved.
According to the automatic wiring device for the lighting circuit provided by the invention, when the marking module 30 is used for sequencing the switches in the house, the marking module is specifically used for: sequencing the switches in the house according to the original house type data and the switch data; the wiring module 40 is specifically configured to: according to the marking result, the switch participating in networking is extracted, and wiring between the switch participating in networking and a distribution box is generated; then, generating the wiring in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair to which the wiring belongs.
According to the automatic wiring device for the lighting circuit, the switches in the house are sequenced according to the original house type data and the switch data, the switches participating in networking are extracted according to the marking result, the wiring between the switches participating in networking and the distribution box is generated, the wiring in the lamp switch pair is generated according to the marking result of the power inlet switch of the lamp switch pair, and the efficiency and the orderliness of switch sequencing and automatic wiring are improved.
According to the automatic wiring device for the lighting circuit provided by the invention, when the marking module 30 is used for marking whether the switch participates in networking and/or is the power inlet switch of the lamp switch pair in the traversal process, the marking module is specifically used for: when traversing to a current switch, if a first light switch pair to which the current switch belongs is not marked with an electric power entrance switch, marking the current switch as the electric power entrance switch of the first light switch pair, and marking the current switch as participating in networking; if the first light switch pair has at least one other switch, and the second light switch pair to which the other switch belongs does not mark the power entrance switch, marking the other switch as the power entrance switch of the second light switch pair, and marking the other switch as not participating in networking.
According to the automatic wiring device for the lighting circuit, provided by the invention, in the process of marking whether the switch participates in networking and/or is a power inlet of the affiliated lamp switch pair, if the first lamp switch pair to which the switch belongs does not have a power inlet switch, the switch is marked as the power inlet switch of the first lamp switch pair and is marked as participating in networking, and if the first lamp switch pair also has at least one other switch and the second lamp switch pair to which the other switch belongs does not have a power inlet switch, the other switch is marked as the power inlet switch of the second lamp switch pair and is marked as not participating in networking, so that the reliable and orderly marking of the switch type is realized.
According to the automatic wiring device for the lighting circuit provided by the invention, when the wiring module 40 is used for extracting the switch participating in networking and generating the wiring between the switch participating in networking and the distribution box, the wiring module is specifically used for: and acquiring a sequencing result of the switches participating in networking according to the sequencing result of the switches in the house, and respectively connecting the distribution box and the switches participating in networking according to the sequencing result of the switches participating in networking to generate wiring between the switches participating in networking and the distribution box.
According to the automatic wiring device for the lighting circuit, the sequencing result of the switches participating in networking is obtained according to the sequencing result of the switches in the house, the distribution box and the switches participating in networking are respectively connected according to the sequencing result of the switches participating in networking, wiring between the switches participating in networking and the distribution box is generated, and reliable access of electric power of each lamp switch pair is guaranteed.
According to the automatic wiring device for the lighting circuit provided by the invention, when the wiring module 40 is used for generating the wiring in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair, the wiring module is specifically used for: for the light switch pair, if a non-power inlet switch exists, connecting the non-power inlet switch through the power inlet switch, and connecting the light group through one non-power inlet switch; if only the power inlet switch is present, the lamp set is connected using the power inlet switch.
According to the automatic wiring device for the lighting circuit, provided by the invention, aiming at the lamp switch pair, if the non-power inlet switch exists, the non-power inlet switch is connected through the power inlet switch, and the lamp group is connected through the non-power inlet switch, and if only the power inlet switch exists, the power inlet switch is used for connecting the lamp group, so that the reliable wiring inside the lamp switch pair is realized.
According to the automatic wiring device for the lighting circuit provided by the invention, when the marking module 30 is used for sequencing the switches in the house according to the original house type data and the switch data, the marking module is specifically used for: calculating the optimal path from the initial room of the house to other rooms of the house according to the original house type data; wherein the starting room is a room in which the distribution box is located; the optimal path is the path with the least number of door openings which are crossed from the starting room to the other rooms; traversing the switches on all the wall surfaces in a preset direction from the distribution box; in the traversing process, judging whether the traversing path meets a door opening or not; if the door opening is met, judging whether the door opening and two rooms connected with the door opening are in the optimal path, if so, penetrating through the door opening, and continuously traversing the switches on the wall surfaces of the next rooms; if not, the door does not pass through the door opening, and other switches on the current wall surface are traversed forwards; and after the traversal of the switches of the house is finished, obtaining a sequencing result of the switches of the house according to the traversal result of the switches.
According to the automatic wiring device for the lighting circuit, provided by the invention, all switches on the wall surface are traversed in the preset direction from the distribution box, and in the traversing process, the switches pass through the door opening or do not pass through the door opening according to whether the door opening is in the optimal path from the initial room to other rooms of the house, so that the traversing is finally completed and the switch sequencing result is obtained, the automatic optimization sequencing of the switches is realized, the optimal path for wiring is favorably obtained, and the wiring efficiency is improved.
According to the automatic wiring device for the lighting circuit, the device further comprises a post-processing module, wherein the post-processing module is used for: adding the wiring between the switches participating in networking and the distribution box and the wiring in the lamp switch pair to the house type data to obtain processed house type data; and pushing the processed house type data to a terminal for rendering by the terminal to obtain a house type graph with the lighting lines distributed.
According to the automatic wiring device for the lighting circuit, wiring between switches and distribution boxes participating in networking and wiring in lamp switch alignment are written back to the house type data to obtain the processed house type data, the processed house type data are pushed to the terminal, the terminal renders the house type data to obtain the house type drawing with the lighting circuit, and automatic wiring display in the house type drawing is achieved.
According to the automatic wiring device of the lighting circuit, the device further comprises a preprocessing module, wherein the preprocessing module is used for processing the house type data to obtain intermediate state data in a preset format before the lamp switch pair obtaining module 20 obtains the lamp switch pair formed by the lamp group and the switch group according to the switch data, the lamp data and the control relation between the switch and the lamp.
According to the automatic wiring device for the lighting circuit, the intermediate state data in the preset format is obtained by processing the house type data, and the subsequent processing process is simplified.
Fig. 6 is a schematic structural diagram of an electronic device provided in the present invention, and as shown in fig. 6, the electronic device may include: a processor (processor)510, a communication Interface (Communications Interface)520, a memory (memory)530 and a communication bus 540, wherein the processor 510, the communication Interface 520 and the memory 530 communicate with each other via the communication bus 540. The processor 510 may invoke logic instructions in the memory 530 to perform a method of lighting circuit auto-wiring, the method comprising: acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp; obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group; sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, whether the switch participates in networking and/or whether the switch is a power inlet switch of the lamp switch pair to which the switch belongs is marked to obtain a marking result; and generating wiring of the lighting circuit according to the marking result.
Furthermore, the logic instructions in the memory 530 may be implemented in the form of software functional units and stored in a computer readable storage medium when the software functional units are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
In another aspect, the present invention also provides a computer program product comprising a computer program stored on a non-transitory computer-readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method for automatically wiring a lighting circuit provided by the above methods, the method comprising: acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp; obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group; sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, marking whether the switch participates in networking and/or is a power inlet switch of the lamp switch pair to which the switch belongs to obtain a marking result; and generating wiring of the lighting circuit according to the marking result.
In yet another aspect, the present invention also provides a non-transitory computer readable storage medium having stored thereon a computer program, which when executed by a processor, is implemented to perform the above-provided illumination circuit automatic wiring method, the method comprising: acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp; obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises at least one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group; sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, marking whether the switch participates in networking and/or is a power inlet switch of the lamp switch pair to which the switch belongs to obtain a marking result; and generating wiring of the lighting circuit according to the marking result.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. An automatic wiring method for a lighting circuit, comprising:
acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp;
obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group;
sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, marking whether the switch participates in networking and/or is a power inlet switch of the lamp switch pair to which the switch belongs to obtain a marking result;
and generating wiring of the lighting circuit according to the marking result.
2. The method for automatically wiring a lighting circuit according to claim 1, wherein the sorting of the switches in the house specifically comprises: sequencing the switches in the house according to the original house type data and the switch data;
generating the wiring of the lighting circuit according to the marking result specifically includes: according to the marking result, the switch participating in networking is extracted, and wiring between the switch participating in networking and a distribution box is generated; then, generating the wiring in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair to which the wiring belongs.
3. The method for automatically wiring a lighting circuit according to claim 1, wherein the marking of whether the switch participates in networking and/or is a power inlet switch of the light switch pair during the traversal process specifically comprises:
when traversing to a current switch, if a first light switch pair to which the current switch belongs is not marked with an electric power entrance switch, marking the current switch as the electric power entrance switch of the first light switch pair, and marking the current switch as participating in networking; if the first light switch pair has at least one other switch, and the second light switch pair to which the other switch belongs does not mark the power entrance switch, marking the other switch as the power entrance switch of the second light switch pair, and marking the other switch as not participating in networking.
4. The automatic wiring method of claim 2, wherein the extracting the switch participating in networking and generating the wiring between the switch participating in networking and the distribution box specifically comprise:
and acquiring a sequencing result of the switches participating in networking according to the sequencing result of the switches in the house, and respectively connecting the distribution box and the switches participating in networking according to the sequencing result of the switches participating in networking to generate wiring between the switches participating in networking and the distribution box.
5. The method according to claim 3, wherein the generating the trace in the lamp switch pair according to the marking result of the power inlet switch of the lamp switch pair according to whether the trace is the power inlet switch of the lamp switch pair includes:
for the light switch pair, if a non-power inlet switch exists, connecting the non-power inlet switch through the power inlet switch, and connecting the light group through one non-power inlet switch; if only the power inlet switch is present, the lamp set is connected using the power inlet switch.
6. The method according to claim 2, wherein the sorting of the switches in the house according to the original house type data and the switch data comprises:
calculating the optimal path from the initial room of the house to other rooms of the house according to the original house type data; wherein the starting room is a room in which the distribution box is located; the optimal path is the path with the least number of door openings which are crossed from the starting room to the other rooms;
traversing the switches on all the wall surfaces in a preset direction from the distribution box; in the traversing process, judging whether the traversing path meets a door opening or not; if the door opening is met, judging whether the door opening and two rooms connected with the door opening are in the optimal path, if so, penetrating through the door opening, and continuously traversing the switches on the wall surfaces of the next rooms; if not, the door does not pass through the door opening, and other switches on the current wall surface are traversed forwards; and after the traversal of the switches of the house is finished, obtaining a sequencing result of the switches of the house according to the traversal result of the switches.
7. The method of claim 1, further comprising:
adding the wiring between the switches participating in networking and the distribution box and the wiring in the lamp switch pair to the house type data to obtain processed house type data;
and pushing the processed house type data to a terminal for rendering by the terminal to obtain a house type graph with the lighting lines distributed.
8. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the steps of the method for automatically wiring a lighting circuit according to any one of claims 1 to 7 are implemented when the program is executed by the processor.
9. A non-transitory computer readable storage medium, on which a computer program is stored, wherein the computer program, when executed by a processor, implements the steps of the method for automatically wiring a lighting circuit according to any one of claims 1 to 7.
10. An automatic wiring device for a lighting circuit, comprising:
a house type data acquisition module for: acquiring house type data of a house; the house type data comprises original house type data, switch data, lamp data and control relation between a switch and a lamp;
a light switch pair acquisition module to: obtaining a lamp switch pair consisting of a lamp group and a switch group according to the switch data, the lamp data and the control relation between the switch and the lamp; the switch group in the lamp switch pair comprises at least one switch, the lamp group comprises one lamp or a plurality of lamps which are on and off simultaneously, and the switch in the switch group is used for controlling the on and off of the lamps in the lamp group;
a marking module to: sequencing the switches in the house, and traversing the switches in the house in sequence according to a sequencing result; in the traversing process, marking whether the switch participates in networking and/or is the power inlet of the lamp switch pair to which the switch belongs to obtain a marking result;
a wiring module for: and generating wiring of the lighting circuit according to the marking result.
CN202110845624.3A 2021-07-26 2021-07-26 Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus Pending CN113779661A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110845624.3A CN113779661A (en) 2021-07-26 2021-07-26 Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110845624.3A CN113779661A (en) 2021-07-26 2021-07-26 Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus

Publications (1)

Publication Number Publication Date
CN113779661A true CN113779661A (en) 2021-12-10

Family

ID=78836125

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110845624.3A Pending CN113779661A (en) 2021-07-26 2021-07-26 Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus

Country Status (1)

Country Link
CN (1) CN113779661A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06295325A (en) * 1992-08-20 1994-10-21 Tokyo Electric Power Co Inc:The Method and device for automatically setting up setting positions of light equipment and its lighting switch in house
CN109522604A (en) * 2018-10-18 2019-03-26 广东三维家信息科技有限公司 Automatic routing system and method based on house type and water power end in a kind of decorations software
CN111968247A (en) * 2020-07-10 2020-11-20 北京城市网邻信息技术有限公司 Method and device for constructing three-dimensional house space, electronic equipment and storage medium
WO2021031336A1 (en) * 2019-08-16 2021-02-25 清华大学 Method for automated construction progress resource optimization employing building information model
CN113111424A (en) * 2021-04-22 2021-07-13 北京房江湖科技有限公司 Automatic wiring method and device, storage medium, and electronic device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH06295325A (en) * 1992-08-20 1994-10-21 Tokyo Electric Power Co Inc:The Method and device for automatically setting up setting positions of light equipment and its lighting switch in house
CN109522604A (en) * 2018-10-18 2019-03-26 广东三维家信息科技有限公司 Automatic routing system and method based on house type and water power end in a kind of decorations software
WO2021031336A1 (en) * 2019-08-16 2021-02-25 清华大学 Method for automated construction progress resource optimization employing building information model
CN111968247A (en) * 2020-07-10 2020-11-20 北京城市网邻信息技术有限公司 Method and device for constructing three-dimensional house space, electronic equipment and storage medium
CN113111424A (en) * 2021-04-22 2021-07-13 北京房江湖科技有限公司 Automatic wiring method and device, storage medium, and electronic device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张观山;宋月鹏;刘全程;侯加林;: "电工电子类课程虚拟仿真实验教学平台的开发", 中国多媒体与网络教学学报(上旬刊), no. 02, 1 February 2020 (2020-02-01), pages 24 - 25 *
张陆陆;: "基于BIM的照明设计研究与实践", 城市住宅, no. 11, 15 November 2015 (2015-11-15), pages 24 - 28 *
林飞: "电气设计与CAD应用", 电气时代, no. 08, 31 December 2001 (2001-12-31), pages 27 - 28 *

Similar Documents

Publication Publication Date Title
CN110059358B (en) Automatic generation method and automatic generation device for building electrical design drawing
CN102403718B (en) Generating method for power grid topological relationship based on Arcgis
CN103020335A (en) Method for automatically converting distribution network geographic wiring diagram into region orthogonal diagram
CN104331562B (en) Geographical wiring diagram along cloth method and device in a kind of electric network information system
CN104133943A (en) Distribution network pattern automatic generating method based on target guide
CN111027746A (en) Intelligent distribution network system ring network diagram automatic generation method and device
CN109766337A (en) Storage method, electronic equipment, storage medium and the system of tree structure data
CN114202027A (en) Execution configuration information generation method, model training method and device
CN113779661A (en) Automatic wiring method for lighting circuit, electronic device, storage medium and apparatus
CN112632648A (en) Automatic lamp placing method and device based on space understanding
CN107798192B (en) Design method of cable model
CN109887049B (en) Furniture scene generation method based on hierarchical dependency
CN114024258A (en) Automatic indoor wire arrangement method and device
CN113779660A (en) Socket point position ordering method and socket wiring method
US20130179141A1 (en) Network simulation structure and the simulation method thereof
CN115618542B (en) GIS single line diagram-based power distribution network ring network diagram generation method and system
CN116976057B (en) Automatic arrangement method for device layout
CN116029069A (en) Substation secondary circuit design method based on equipment function area and template matching
CN113971708B (en) Automatic matching and orthogonal connection line plotting method for graph component relation of CAD residential strong-current power distribution trunk system
CN116091679B (en) Three-dimensional clothing template modeling method and system based on side texture mapping
CN117744553B (en) Method, device, equipment and storage medium for modeling field programmable gate array
CN111967115B (en) Drawing method of power supply schematic diagram and computer equipment
CN116644538B (en) Photovoltaic subarray cable confluence path calculation method, computer equipment and storage medium
CN107992704A (en) A kind of switchgear secondary connection method extended out based on contour line
CN113626907B (en) Automatic building drawing identification method based on boundary scanning algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination