CN109803470B - Street lamp control method, street lamp and street lamp control system - Google Patents
Street lamp control method, street lamp and street lamp control system Download PDFInfo
- Publication number
- CN109803470B CN109803470B CN201711138075.6A CN201711138075A CN109803470B CN 109803470 B CN109803470 B CN 109803470B CN 201711138075 A CN201711138075 A CN 201711138075A CN 109803470 B CN109803470 B CN 109803470B
- Authority
- CN
- China
- Prior art keywords
- street lamp
- command information
- street
- broadcast message
- address
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 62
- 230000006855 networking Effects 0.000 claims abstract description 20
- 238000004891 communication Methods 0.000 claims description 11
- 238000013507 mapping Methods 0.000 claims description 6
- 238000012544 monitoring process Methods 0.000 claims description 6
- 238000004590 computer program Methods 0.000 claims description 5
- 230000008859 change Effects 0.000 claims description 2
- 210000004027 cell Anatomy 0.000 claims 1
- 210000003850 cellular structure Anatomy 0.000 claims 1
- 230000001172 regenerating effect Effects 0.000 claims 1
- 230000007613 environmental effect Effects 0.000 description 17
- 230000008569 process Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 230000009471 action Effects 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 230000004075 alteration Effects 0.000 description 1
- 238000005286 illumination Methods 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Landscapes
- Circuit Arrangement For Electric Light Sources In General (AREA)
Abstract
The application provides a street lamp control method, a street lamp and a street lamp control system, wherein the street lamp control method comprises the following steps: the method comprises the steps that a first street lamp obtains a first broadcast message sent by a second street lamp, wherein the first broadcast message comprises an address of the second street lamp and first command information, and the second street lamp is any other street lamp in the same networking with the first street lamp; the first lamp judges whether the number of the acquired first broadcast messages including the first command information is larger than a first threshold value; and if the number of the acquired first broadcast messages including the first command information is larger than a first threshold value, controlling the first lamp to execute an operation matched with the first command information. Therefore, the control of the street lamps in the group network is realized according to the unified decision result of the street lamps in the group network, the structure of a street lamp control system is simplified, the system complexity is reduced, the cost is saved, and the user experience is improved.
Description
Technical Field
The application relates to the technical field of lighting control, in particular to a street lamp control method, a street lamp and a street lamp control system.
Background
The street lamp is used as an important public facility for providing illumination for residents, and has the characteristics of large quantity, wide distribution and the like.
In the prior art, as shown in fig. 1, each street lamp is connected to a unified server through a switch by using a standard networking standard, such as global system for Mobile Communications (GSM), Wireless Fidelity (Wi-Fi), ZigBee protocol, etc., and is controlled by the server.
According to the street lamp control method, each street lamp needs to be connected with the server through the switch, and the server controls each street lamp, so that the street lamp control system is complex in equipment connection, high in cost and poor in user experience.
Disclosure of Invention
The present application is directed to solving, at least to some extent, one of the technical problems in the related art.
Therefore, the street lamp control method is provided, the street lamps in the group network are controlled according to the unified decision result of the street lamps in the group network, the structure of a street lamp control system is simplified, the complexity of the system is reduced, the cost is saved, and the user experience is improved.
The application also provides a street lamp.
The application also provides a street lamp control system.
The present application also provides a computer-readable storage medium.
An embodiment of a first aspect of the present application provides a street lamp control method, including: the method comprises the steps that a first street lamp obtains a first broadcast message sent by a second street lamp, wherein the first broadcast message comprises an address of the second street lamp and first command information, and the second street lamp is any other street lamp in the same networking with the first street lamp; the first lamp judges whether the number of the acquired first broadcast messages including the first command information is larger than a first threshold value; and if the number of the acquired first broadcast messages including the first command information is larger than a first threshold value, controlling the first lamp to execute an operation matched with the first command information.
According to the street lamp control method, after the first street lamp acquires the first broadcast message sent by the second street lamp, the first broadcast message comprises the address of the second street lamp and the first command information, and if the first street lamp determines that the number of the acquired first broadcast messages comprising the first command information is larger than the first threshold value, the first street lamp is controlled to execute the operation matched with the first command information. Therefore, the control of the street lamps in the group network is realized according to the unified decision result of the street lamps in the group network, the structure of a street lamp control system is simplified, the system complexity is reduced, the cost is saved, and the user experience is improved.
An embodiment of a second aspect of the present application provides a street lamp, including: the device comprises a communication module, a memory and a processor;
the communication module is used for realizing communication between the street lamp and other street lamps;
the memory for storing executable program code;
the processor is configured to execute the street lamp control method according to the first aspect by reading the executable program code stored in the memory.
An embodiment of a third aspect of the present application provides a street lamp control system, including: h street lamps according to the first aspect, wherein H is a positive integer greater than or equal to 1.
An embodiment of a fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the street lamp control method according to the first aspect.
Drawings
The foregoing and/or additional aspects and advantages of the present invention will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is an architecture diagram of a conventional street lamp control method;
FIG. 2 is a flow chart of a street light control method according to an embodiment of the present application;
fig. 3 is a flowchart of a street lamp control method according to another embodiment of the present application;
fig. 4 is a flowchart of a street lamp control method according to another embodiment of the present application;
fig. 4A is an exemplary diagram of a street lamp control method according to an embodiment of the present application;
fig. 5 is a flowchart of a street lamp control method according to another embodiment of the present application;
FIG. 6 is a schematic structural diagram of a street light according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a street lamp according to another embodiment of the present application.
Detailed Description
Reference will now be made in detail to embodiments of the present application, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the drawings are exemplary and intended to be used for explaining the present application and should not be construed as limiting the present application.
The embodiment of the application aims at the existing street lamp control method, each street lamp needs to be connected with a server through a switch, and each street lamp is controlled by the server, so that the problems of complex equipment connection, high cost and poor user experience of a street lamp control system are caused.
A street lamp control method, a street lamp, and a street lamp control system according to embodiments of the present application are described below with reference to the drawings.
Fig. 2 is a flowchart of a street lamp control method according to an embodiment of the present application.
As shown in fig. 2, the street lamp control method includes:
The street lamp control method provided by the embodiment of the application can be configured to be executed in the street lamp provided by the embodiment of the invention. The street lamp can be any type of street lamp such as a solar street lamp, a wind-solar hybrid street lamp and the like.
Specifically, if each street lamp of the multiple street lamps can receive the broadcast message sent by the other street lamps, the multiple street lamps can form a network, that is, the multiple street lamps are in the same group of network. Correspondingly, each street lamp can comprise a communication module so as to realize communication among the street lamps in the group network.
It should be noted that when multiple street lamps are included in the networking, multiple street lamps may simultaneously send broadcast messages at the same time, so that multiple messages are confused and damaged. Therefore, in the embodiment of the present application, a Carrier Sense Multiple Access (CSMA) technology, also called Listen Before Talk (LBT) technology, may be adopted, and when it is determined that other streetlamps in the group network do not send a broadcast message through Carrier Sense, each streetlight sends the broadcast message again, thereby preventing each streetlight in the group network from sending the broadcast message at the same time or receiving Multiple broadcast messages at the same time.
The first street lamp is any street lamp in a certain networking; the second street lamp is any other street lamp in the same network group with the first street lamp.
The address of the second street lamp is used to uniquely identify the second street lamp, and may be determined according to a random number generated by a preset rule, a number of the second street lamp, and the like, which is not limited herein.
The first command information is used for instructing each street lamp to execute specific actions such as turning on or turning off the lamp. Specifically, the first command information may include at least one of a command identifier, a check code, an action, an execution time, an execution mode, and the like of the command.
The command identifier is used to uniquely identify the command, and may be arbitrarily set as required, for example, may be set to "a" or "B". The check code is used for checking the integrity and accuracy of the content in the broadcast message. Specifically, the check code may be generated in various ways, for example, after the content of the broadcast message is encoded, the obtained code may be subjected to a certain operation to obtain the check code. The action can be specific operations such as turning on the light, turning off the light and the like. The execution time of the command can be 8 pm, 9 pm, or 8 am, etc. The execution mode can be the brightness of the street lamp, the color of the lighting lamp and the like.
It is understood that the first command information may be determined by the second road lamp according to the current environmental status. Accordingly, a sensor may be included in the street lamp to detect the current environmental state of the street lamp.
During specific implementation, a mapping relation between the environment state and the command can be preset, so that after the second street lamp determines the current environment state according to the output value of the sensor, first command information corresponding to the current environment state can be determined according to the preset mapping relation, and a first broadcast message containing the address of the second street lamp and the first command information is sent.
The first threshold value may be set as required. For example, the number of the street lamps in the group network can be determined. Generally, in order to ensure the accuracy of street lamp control, the first threshold may be set to 50% of the number of street lamps in the group network. For example, if there are 4 streetlamps in the group network, the first threshold may be set to 2; if there are 5 street lamps in the group, the first threshold may be set to 2.5.
It can be understood that, other street lamps except the first street lamp in the networking may determine the first command information corresponding to the current environmental state according to the current environmental state, and when it is determined through carrier monitoring that the other street lamps in the networking do not send the broadcast message, send the first broadcast message including the determined first command information. Therefore, if the first street lamp determines that the number of the first broadcast messages including the first command information sent by the other street lamps acquired by the first street lamp is greater than the first threshold value, the first street lamp indicates that most street lamps in the group network determine the first command information, and therefore the first street lamp can be controlled to execute the operation matched with the first command information. If the first street lamp determines that the number of the first broadcast messages including the first command information sent by the other street lamps acquired by the first street lamp is smaller than or equal to the first threshold value, it indicates that the other street lamps possibly do not send the first broadcast messages including the first command information, so that the first street lamp can continue to receive the broadcast messages sent by the second street lamp.
For example, assume that R1, R2, R3, R4, R55 street lamps are included in the group network, and the first threshold is 2.5. If the first streetlamp R1 acquires the first broadcast messages S2, S3, and S4 including its own address respectively sent by the second streetlamps R2, R3, and R4, and each first broadcast message includes the first command information of "turning on the streetlamp at 8 pm", since the number of the first broadcast messages including the first command information acquired by the R1 is 3, and is greater than the first threshold 2, the streetlamp R1 may be controlled to turn on at 8 pm.
It can be understood that the first street lamp may not send the broadcast message within a period of time, so that other street lamps may misjudge that the first street lamp is not in the network, and for this reason, the first street lamp may also send the broadcast message after determining that the number of the acquired first broadcast messages including the first command information is greater than the first threshold value, so that other street lamps in the network still determine that the first street lamp is in the network. That is, after the number of the acquired first broadcast messages including the first command information is greater than the first threshold, the method may further include:
and the first street lamp sends a second broadcast message, wherein the second broadcast message is used for indicating that the first street lamp is to execute the operation matched with the first command information or has executed the operation matched with the first command information.
The second broadcast message may include an address of the first command, first command information, and the like.
The first street lamp is controlled to send the second broadcast message, so that other street lamps in the networking can determine that the first street lamp is still in the networking, and the other street lamps can execute the operation matched with the first command message according to the second broadcast message sent by the first street lamp, thereby ensuring that all the street lamps in the networking work uniformly.
In addition, referring to fig. 3, in one possible implementation form, the street lamp control method may include:
In step 302, the first light determines whether the number P of the acquired first broadcast messages including the first command information is greater than a first threshold, if so, step 303 is executed, otherwise, step 304 is executed.
And 304, determining the current environment state of the first lamp according to the output value of the sensor of the first lamp.
And 305, determining second command information corresponding to the current environment state according to the mapping relation between the environment state and the command.
Specifically, since the first street lamp may also determine the command information corresponding to the current environmental state according to the current environmental state, if the number P of the first broadcast messages including the first command information sent by the other street lamps acquired by the first street lamp is less than or equal to the first threshold, the first street lamp may determine the current environmental state according to the output value of the sensor thereof, and then determine the second command information corresponding to the current environmental state according to the current environmental state, and determine whether the second command information matches the first command information. If not, continuing to receive the broadcast message. If the first broadcast message is matched with the first command message, the number P of the first broadcast messages including the first command information, which have been acquired by the first broadcast message, may be added by 1, and then it is determined whether the number Q after the addition of 1 is greater than the first threshold. If the first command information is larger than the second command information, the first lamp can be controlled to execute the operation matched with the first command information, and if the first command information is smaller than or equal to the second command information, the broadcast message continues to be received.
For example, assume that the group network includes R1, R2, R3, R4, and R55 street lamps, and the first threshold N0And 2.5, the second command message determined by the first streetlamp R1 is "turn on streetlamp 8 pm". If the R1 acquires the first broadcast messages S2 and S3 including its own address sent by the second street lamps R2 and R3, respectively, and each first broadcast message includes the first command information of "turning on street lamps at 8 pm". Since the number P of the first broadcast messages including the first command information, which have been acquired by R1, is 2, it is equal to N0If the second command information matches the first command information, it can be determined whether Q + P +1 is greater than N0. Since Q2 + 13 is larger than N0=2.5,The street light R1 can be controlled to turn on at 8 pm.
It should be noted that, when determining that the second command information matches the first command information, the first street lamp may further send a broadcast message including the first command information and an address of the first street lamp, so that when determining whether to perform an operation matching the first command information, other street lamps may determine, based on the broadcast message sent by the first street lamp.
It should be noted that the above embodiment is described on the basis that the contents of the first command information in the first broadcast messages sent by the second street lamps acquired by the first street lamp are the same. Accordingly, it may be preset that, after determining the first command information, each second street lamp a retransmits the first broadcast message including the first command information determined by the second street lamp a when determining that the first command information matches the first command information included in the first broadcast message transmitted by the other second street lamps. Therefore, if the first lamp determines that the number of the first broadcast messages which are acquired by the first lamp and comprise the first command information is larger than the first threshold value, the first lamp can be controlled to execute the operation matched with the first command information.
Each street lamp in the group network executes the operation corresponding to the first command information according to the number of the first broadcast messages including the first command information sent by other street lamps, so that when a certain street lamp fails and cannot determine the current environmental state according to a sensor of the street lamp, and further the street lamp is controlled to be turned on or turned off, the street lamp can be controlled according to the command information determined by other street lamps in the group network or the states of other street lamps, and the street lamp can work uniformly along with other street lamps. The system and the method ensure that the individual street lamps in the group network can still work continuously after being damaged.
According to the street lamp control method provided by the embodiment of the application, after the first street lamp acquires the first broadcast message sent by the second street lamp, wherein the first broadcast message comprises the address of the second street lamp and the first command information, if the first street lamp determines that the number of the acquired first broadcast messages comprising the first command information is larger than the first threshold value, the first street lamp is controlled to execute the operation matched with the first command information. Therefore, the control of the street lamps in the group network is realized according to the unified decision result of the street lamps in the group network, the structure of a street lamp control system is simplified, the system complexity is reduced, the cost is saved, and the user experience is improved.
As can be seen from the above analysis, the first lamp may determine whether to perform an operation matching the first command information according to whether the number of the acquired first broadcast messages including the first command information is greater than a first threshold. In a possible implementation form, the first broadcast message may further include a value for indicating the number of street lamps for which the first command information has been determined, so that the first street lamp may determine whether to perform an operation matching the first command information according to the value. The above will be described in detail with reference to fig. 4.
Fig. 4 is a flowchart of a street lamp control method according to another embodiment of the present application.
As shown in fig. 4, the street lamp control method includes:
Where N is M +1, and M is the determined number of first broadcast messages including the first command information by the second street lamp.
Where M may be determined by the second street lamp according to the number of the acquired first broadcast messages including the first command information, and/or according to a first value included in the acquired first broadcast messages of the second street lamp, which is not limited herein. For example, the number of the first broadcast messages including the first command information acquired by the second street lamp a is 3, the first numerical value included in one of the first broadcast messages is 4, and by comparing the sizes of 3 and 4, the street lamp a may determine that it may not acquire the first broadcast message including the first command information sent by another street lamp, and according to the first numerical value 4 included in the acquired first broadcast message, it may be determined that there are actually 4 street lamps other than the street lamp a at present to determine the first command information. And because the street lamp a can also determine the command information corresponding to the environmental status according to the output value of the sensor thereof, the first numerical value N in the first broadcast message sent by the street lamp a is M plus 1.
And a first value N for representing the number of street lamps, which have determined the first command information, including the second street lamp except the first street lamp before the second street lamp transmits the first broadcast message including the first value N. For example, the street lamp R1 receives the first broadcast message including the first numerical value 2 transmitted by the street lamp R2, and indicates that 2 street lamps including R2, in addition to R1, have determined the first command information before the R2 transmits the first broadcast message.
In step 404, the first light determines whether the number of the acquired first broadcast messages including the first command information is greater than a first threshold, if so, step 403 is executed, otherwise, step 405 is executed.
Specifically, after the first street lamp acquires the first broadcast message sent by the second street lamp, it may be determined whether a first value N included in the first broadcast message is greater than a first threshold. If the first command information is larger than the second command information, the first command information is determined by most of the street lamps in the group network, so that the first street lamps can be controlled to execute the operation matched with the first command information. If the first value N is less than or equal to the first threshold, it may be determined whether to perform an operation matching the first command information according to the number of the first broadcast messages including the first command information, which have been acquired by the first street lamp. If the number of the first broadcast messages including the first command information, which have been acquired by the first street lamp, is greater than the first threshold, the first street lamp may be controlled to perform an operation matching the first command information.
And 405, determining the current environment state by the first lamp according to the output value of the sensor.
And 406, determining second command information corresponding to the current environment state by the first lamp according to the mapping relation between the environment state and the command.
And step 408, when it is determined through carrier monitoring that the other street lamps in the network group do not send the broadcast message, sending a third broadcast message.
Wherein the third broadcast message comprises: the first street lamp comprises an address of the first street lamp, the first command information and a second value L, wherein L is N + 1.
Specifically, when the number of the first broadcast messages including the first command information acquired by the first street lamp and the first value N are both less than or equal to the first threshold, the first street lamp may determine, according to the current environmental state, the second command information corresponding to the current environmental state and determine whether the second command information matches the first command information, because the first value represents the number of the street lamps, except for the first street lamp, for which the first command information has been determined. If the first value N is matched, 1 may be added to the first value N to obtain the second value L. Then, the first street lamp may transmit a third broadcast message including the second value L and its own address and the first command information, so that other street lamps may determine whether to perform an operation matching the first command information according to the third broadcast message transmitted by the first street lamp.
It should be noted that, if the first street lamp determines that the second command information does not match the first command information, the first value N is not added by 1, and the third broadcast message including the first value N is not sent.
For example, assume that the group network includes R1, R2, R3, and R44 street lamps, the first threshold is 2, the first street lamp R1 acquires the first broadcast message sent by the second street lamp R2, and the first broadcast message includes an address of R2, a first value 1, and a first command message. Since both the number 1 and the first value 1 of the first broadcast messages including the first command information acquired by R1 are smaller than the first threshold value 2, the street lamp R1 may determine whether the second command information determined by itself matches the first command information. If the street lamps are matched with the first command information, the address of the R1 and the second value 2, the third broadcast message can be sent when it is determined through carrier sensing that no broadcast message is sent by other street lamps in the network where the street lamps are located.
Specifically, when the first street lamp determines that the second command information does not match the first command information, the address of the second street lamp, the first command information and the first numerical value may be recorded, so that after the first broadcast messages including the own address, the first command information and the first numerical value sent by the plurality of second street lamps are obtained, the current actual numerical value may be determined according to the plurality of first broadcast messages.
For example, as shown in fig. 4A, assuming that R1, R2, R3, and R44 street lamps are included in the group network, the commands with the identifiers "a", "B", and "a" are determined at any time from the output values of the respective sensors, R1, R2, R3, and R4, respectively.
After the R1 determines the command with the identifier of "A", a broadcast message is sent out, wherein the broadcast message comprises the identifier of "A", the address of R1 and the value of 1. After acquiring the broadcast message sent by the R1, the R2 determines that the self-determined 'A' is matched with the 'A' in the broadcast message sent by the R1, so that the broadcast message is sent outwards, and the broadcast message comprises the 'A', the address of the R2 and the numerical value of 2. After acquiring the broadcast message transmitted by the R2, the R3 determines that the "B" determined by itself does not match the "a" in the broadcast message transmitted by the R2, and therefore, after recording the "a" transmitted by the R2, the address of the R2, and the value 2, the broadcast message is not transmitted.
Due to signal interference, the R4 does not acquire the broadcast message sent by the R2, so that the R4 sends the broadcast message to the outside after determining that the "a" determined by itself matches with the "a" in the broadcast message sent by the R1, wherein the broadcast message includes the "a", the address of the R4 and the value 2. After the R3 acquires the broadcast message sent by the R4, it is determined that the values in the broadcast messages sent by the R2 and the R4 are equal according to the recorded "a" sent by the R2, the address of the R2, and the value 2. Since the values of the broadcast messages transmitted by R2 and R4 are both 2, and R2 and R4 are broadcast messages transmitted only when it is determined that the own command information matches "a", R3 can determine that the current actual value is 3.
In a possible implementation form, when the first street lamp determines that the second command information matches the first command information, after the first numerical value N is updated to the second numerical value L ═ N +1, it may be further determined whether to control the first street lamp to perform an operation matching the first command information according to whether L is greater than a first threshold. That is, before step 408, it may further include:
judging whether a second value L is larger than a first threshold value, wherein the second value L is equal to N + 1;
and if so, controlling the first road lamp to execute the operation matched with the first command information.
Specifically, if the second value L is greater than the first threshold, the first street lamp may be controlled to execute an operation matching the first command information, and then, when it is monitored through the carrier that no broadcast message is sent by another street lamp, a third broadcast message including the second value, the first command information, and the address of the first street lamp is sent. And if the second value L is less than or equal to the first threshold value, directly sending a third broadcast message comprising the second value, the first command information and the address of the first street lamp when other street lamps are monitored by the carrier wave to not send the broadcast message.
In a possible implementation form, the number P of the first broadcast messages including the first command information, which have been acquired by the first street lamp, may be greater than the first value N, and the determination of whether to execute the first command information according to the second value L may be inaccurate. Then, when the first street lamp determines that the second command information matches the first command information, the first street lamp may further add 1 to P, and then determine whether to control the first street lamp to execute an operation matching the first command information according to whether P +1 is greater than the first threshold. That is, before step 408, it may further include:
judging whether Q is larger than a first threshold value, wherein Q is P + 1;
and if so, controlling the first road lamp to execute the operation matched with the first command information.
It will be appreciated that the address of the first street lamp may also be determined prior to sending the third broadcast message. That is, before step 408, it may further include:
and step 410, determining the address of the first street lamp by negotiating with other street lamps in the network group.
The specific negotiation process will be described in the following embodiments, which are not described herein.
In the street lamp control method provided by the embodiment of the application, after a first street lamp acquires a first broadcast message sent by a second street lamp, if a first value included in the first broadcast message is greater than a first threshold, the first street lamp is controlled to execute an operation matched with first command information, if the first value is less than or equal to the first threshold, whether the number of the first broadcast messages including the first command information acquired by the first street lamp is greater than the first threshold is judged, if yes, the first street lamp is controlled to execute the operation matched with the first command information, if not, the first street lamp determines a current environmental state according to an output value of a sensor of the first street lamp, determines second command information corresponding to the current environmental state according to a mapping relation between the environmental state and the command, and if the second command information is determined to be matched with the first command information, when other street lamps in a group network are determined not to send broadcast messages through carrier monitoring, and sending a third broadcast message, and recording the address of the second street lamp, the first command information and the first numerical value if the second command information is not matched with the first command information. Therefore, the control of the street lamps in the group network is realized according to the unified decision result of the street lamps in the group network, the structure of a street lamp control system is simplified, the system complexity is reduced, the cost is saved, and the user experience is improved.
Through the above analysis, it can be known that the street lamps in the same group of networks can negotiate to determine the address of the first street lamp, and the address determination process of the first street lamp is described in detail below with reference to fig. 5.
Fig. 5 is a flowchart of a street lamp control method according to another embodiment of the present application.
As shown in fig. 5, based on the embodiment shown in fig. 4, step 410 may specifically include:
The preset rule is a rule for generating a random number.
Specifically, the random number may be generated according to various rules. For example, random numbers uniformly distributed in the (0,1) interval may be taken as the random numbers of the embodiment of the present invention, and so on.
The number of digits of the random number may be arbitrarily set as needed, and the random number may include only numbers, or may include numbers, letters, and the like, and is not limited herein.
The preset time period can be set according to needs. For example, 1 minute, 2 minutes, etc. may be set.
It should be noted that the preset time period may be a time period required by a predefined address negotiation process, for example, a time period required for completing address negotiation within 1 minute or 2 minutes is defined.
Specifically, the preset time period may be set to be the time when any street lamp starts to send the first broadcast message when negotiation starts to be performed from each street lamp in the networking. For example, when the address negotiation is finished within 2 minutes and the negotiation of each street lamp in the group network is started, the time when any street lamp starts to send the first broadcast message is 00:00:00, and the preset time period is 2 minutes between 00:00:00 and 00:02: 00.
Specifically, after the first street lamp generates the random number according to the preset rule, since the addresses of the street lamps in the group network cannot be the same, if the random number is not included in the broadcast messages sent by other street lamps acquired by the first street lamp within the preset time period, the random number may be used as the address of the first street lamp. If there is a broadcast message including the random number in the broadcast messages sent by other street lamps acquired within the preset time period, that is, if a certain broadcast message includes the random number, a new random number needs to be regenerated according to a preset rule, and it is continuously determined whether the new random number is included in each broadcast message sent by the other street lamps acquired within the preset time period, if a certain broadcast message still includes the new random number, the random number is regenerated according to the preset rule again until the finally generated random number is not included in any broadcast message sent by the other street lamps acquired within the preset time period, and the random number generated at the last time can be determined as the address of the first street lamp.
For example, assuming that the random number generated by the first street lamp a according to the preset rule is 0.078473, the street lamp a acquires the broadcast message including the random number 0.202159 sent by the street lamp B and the broadcast message including the random number 0.078473 sent by the street lamp C within the preset time period. Since the broadcast message sent by the street lamp C acquired by the street lamp a within the preset time period includes the random number 0.078473 of the street lamp a, the street lamp a may regenerate a new random number according to the preset rule. If the new random number is 0.974225, since the broadcast messages respectively sent by the street lamps B and C acquired by the street lamp a within the preset time period do not include the random number 0.974225, the random number 0.974225 may be used as the address of the street lamp a.
It is understood that, after determining the address of the first street lamp, in order to avoid the address of the other street lamps being the same as the address of the first street lamp, a broadcast message including the address of the first street lamp may be further sent, so that the other street lamps no longer use the address of the first street lamp, that is, after step 504, the method may further include:
and when determining that other street lamps in the network do not send the broadcast message through carrier monitoring, sending a fourth broadcast message, wherein the fourth broadcast message comprises the initial address of the first street lamp and the third command information.
And the third command information is used for indicating each street lamp to determine the address of the street lamp according to the initial address of the first street lamp.
Specifically, a random number generated by the first street lamp according to a preset rule may be used as an initial address of the first street lamp, and if the random number is not included in any broadcast message sent by another street lamp acquired by the first street lamp within a preset time period, the initial address of the first street lamp may be determined as the address of the first street lamp. At this time, the fourth broadcast message sent by the first street lamp includes the initial address of the first street lamp and the third command information.
If the random number generated by the first street lamp according to the preset rule is included in a certain broadcast message sent by other street lamps acquired by the first street lamp within the preset time period, the address of the first street lamp is the random number generated by the first street lamp at the last time. At this time, the fourth broadcast message sent by the first street lamp includes the address of the first street lamp and the third command information.
It should be noted that the first street lamp may determine the number of street lamps in the group network according to the broadcast message, which is sent by other street lamps and acquired within the preset time period, and includes the addresses of the other street lamps. When the number of street lamps in the networking is large, street lamp addresses for storing the preset number can be set according to the requirement in order to save the memory. If the first street lamp does not acquire the broadcast message which is sent by other street lamps and comprises the address of the first street lamp in the preset time period, the fact that the networking where the first street lamp is located only comprises the first street lamp is indicated.
In addition, after networking, in the street lamp application process, the number of street lamps in the networking may change, and therefore the address of the first street lamp can be determined again according to needs.
Accordingly, before step 410, the method may further include:
and determining that the number of street lamps in the group network is changed.
Specifically, the number of street lamps in the group network can be determined to be changed in various ways. For example, each street lamp in the group network can be set to send the broadcast message at a preset time interval, so that the first street lamp can judge whether the number of the street lamps in the group network changes according to whether the number of the obtained broadcast messages changes; or, a newly added street lamp may be set to send a broadcast message after joining the networking, so that other street lamps determine that a new street lamp is added to the networking, and the like. After the number of the street lamps in the network group is determined to be changed, the address of the first street lamp can be determined through negotiation with other street lamps in the network group.
Alternatively, before step 410, the method may further include:
and determining the time interval between the current moment and the moment of determining the address of the first street lamp for the last time, wherein the time interval is greater than or equal to a second threshold value.
Wherein, the second threshold value can be set according to the requirement. For example, 3 days, 5 days, 7 days, etc. may be set.
Specifically, the address of the first street lamp may be re-determined at a time interval of the second threshold, and the time at which the address of the first street lamp is determined each time is recorded, so that if the time interval between the current time and the time at which the address of the first street lamp is determined the last time is greater than or equal to the second threshold, the address of the first street lamp may be determined by negotiation with other street lamps in the network.
For example, assuming that the second threshold is 7 days, the time t1 of the address of the first street lamp is 00:00:00 in 1 month in 10 months in 2017, and if the current time t is 00:00:00 in 8 months in 10 months in 2017, the address of the first street lamp can be determined by negotiating with other street lamps in the group network because the time interval between t and t1 is equal to the second threshold.
According to the street lamp control method provided by the embodiment of the application, after a first street lamp generates a random number according to a preset rule, if each broadcast message sent by other street lamps acquired within a preset time period includes the random number, the random number can be determined as the address of the first street lamp, if any broadcast message sent by other street lamps acquired within the preset time period includes the random number, a new random number is generated again until it is determined that each broadcast message sent by other street lamps does not include the new random number, and the new random number is determined as the address of the first street lamp. Therefore, the address of each street lamp is determined through negotiation of each street lamp in the group network, so that each street lamp in the group network can be uniformly decided, each street lamp is controlled, the structure of a street lamp control system is simplified, the system complexity is reduced, the cost is saved, and the user experience is improved.
Fig. 6 is a schematic structural diagram of a street lamp according to an embodiment of the invention.
As shown in fig. 6, the street lamp includes:
a communication module 61, a memory 62, a processor 63;
the communication module 61 is used for realizing communication between the street lamp and other street lamps;
the memory 62 for storing executable program code;
the processor 63 is configured to execute the street lamp control method according to the foregoing embodiment by reading the executable program code stored in the memory 62.
In a possible implementation form, as shown in fig. 7, on the basis of fig. 6, the street lamp may further include: a sensor 64, a light emitting module 65, a solar cell module 66;
the sensor 64 is used for detecting the current environmental state of the street lamp;
the light emitting assembly 65 for emitting visible light;
the solar cell module 66 is used for converting solar energy into electric energy.
It should be noted that the explanation of the embodiment of the street lamp control method is also applicable to the street lamp of the embodiment, and is not repeated here.
The street lamp provided by the embodiment of the application can be networked with other street lamps, so that after first broadcast messages including the first command information and sent by other street lamps in the networking are acquired, if the number of the acquired first broadcast messages including the first command information is determined to be larger than a first threshold value, the operation matched with the first command information is executed. Therefore, the street lamps are controlled according to the unified decision result of each street lamp in the networking, the structure of a street lamp control system is simplified, the system complexity is reduced, the cost is saved, and the user experience is improved.
The application also provides a street lamp control system, which comprises H street lamps according to the embodiment, wherein H is a positive integer greater than or equal to 1.
The present invention also proposes a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the street light control method as in the preceding embodiments.
The present invention also proposes a computer program product, wherein when the instructions of the computer program product are executed by a processor, the street lamp control method as in the previous embodiment is executed.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and the scope of the preferred embodiments of the present application includes other implementations in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It should be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc. Although embodiments of the present application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present application, and that variations, modifications, substitutions and alterations may be made to the above embodiments by those of ordinary skill in the art within the scope of the present application.
Claims (13)
1. A street lamp control method is characterized by comprising the following steps:
the method comprises the steps that a first street lamp obtains a first broadcast message sent by a second street lamp, wherein the first broadcast message comprises an address of the second street lamp and first command information, and the second street lamp is any other street lamp in the same networking with the first street lamp;
the first lamp judges whether the number of the acquired first broadcast messages including the first command information is larger than a first threshold value;
if the number of the acquired first broadcast messages including the first command information is larger than a first threshold value, controlling the first lamp to execute an operation matched with the first command information;
the first broadcast message comprises a first numerical value N, wherein N is M +1, and M is the determined number of the first broadcast messages comprising the first command information of the second street lamp;
after the first street lamp acquires the first broadcast message sent by the second street lamp, the method further comprises the following steps:
judging whether the first numerical value N is larger than the first threshold value;
and if so, controlling the first road lamp to execute the operation matched with the first command information.
2. The method of claim 1, wherein after the number of the acquired first broadcast messages including the first command information is greater than a first threshold, further comprising:
and the first street lamp sends a second broadcast message, wherein the second broadcast message is used for indicating that the first street lamp is to execute the operation matched with the first command information or has executed the operation matched with the first command information.
3. The method of claim 1, wherein after determining whether the number of acquired first broadcast messages including the first command information is greater than a first threshold, further comprising:
if not, determining the current environment state by the first street lamp according to the output value of the sensor;
determining second command information corresponding to the current environment state according to the mapping relation between the environment state and the command;
judging whether the second command information is matched with the first command information;
if yes, when it is determined through carrier monitoring that other street lamps in the network where the street lamps are located do not send broadcast messages, sending a third broadcast message, wherein the third broadcast message comprises: the first street lamp comprises an address of the first street lamp, the first command information and a second value L, wherein L is N + 1.
4. The method of claim 3, wherein after determining whether the second command information matches the first command information, further comprising:
if not, recording the address of the second street lamp, the first command information and the first numerical value.
5. The method of claim 3, wherein prior to the sending the third broadcast message, further comprising:
and determining the address of the first street lamp by negotiating with other street lamps in the network.
6. The method of claim 5, wherein the determining the address of the first street lamp comprises:
determining an initial address of the first street lamp according to a random number generated by a preset rule;
and if the random number is not included in the broadcast messages sent by other street lamps acquired within a preset time period, determining the random number as the address of the first street lamp.
7. The method of claim 6, wherein after determining the initial address of the first street lamp, further comprising:
and when determining that other street lamps in the network do not send the broadcast message through carrier monitoring, sending a fourth broadcast message, wherein the fourth broadcast message comprises the initial address of the first street lamp and third command information.
8. The method of claim 6, wherein after determining the initial address of the first street lamp, further comprising:
and if any broadcast message sent by other street lamps acquired within a preset time period comprises the random number, regenerating a new random number according to the preset rule until the fact that the acquired broadcast messages sent by other street lamps do not comprise the new random number is determined.
9. The method of any of claims 5-8, wherein prior to determining the address of the first street lamp by negotiating with other street lamps in the mesh, further comprising:
determining the number change of street lamps in the group network; or,
and determining that the time interval between the current moment and the moment of determining the address of the first road lamp for the last time is larger than a second threshold value.
10. A street light, comprising: the device comprises a communication module, a memory and a processor;
the communication module is used for realizing communication between the street lamp and other street lamps;
the memory is used for storing an executable program;
the processor is configured to execute the street lamp control method according to claims 1 to 9 by reading the executable program stored in the memory.
11. The street light of claim 10, further comprising: a sensor, a light emitting component and a solar cell component;
the sensor is used for detecting the current environment state of the street lamp;
the light emitting component is used for emitting visible light;
the solar cell module is used for converting solar energy into electric energy.
12. A street lamp control system, characterized in that it comprises H street lamps according to any one of claims 10 to 11, wherein H is a positive integer greater than or equal to 1.
13. A computer-readable storage medium on which a computer program is stored, the program, when being executed by a processor, implementing a street light control method according to any one of claims 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711138075.6A CN109803470B (en) | 2017-11-16 | 2017-11-16 | Street lamp control method, street lamp and street lamp control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711138075.6A CN109803470B (en) | 2017-11-16 | 2017-11-16 | Street lamp control method, street lamp and street lamp control system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109803470A CN109803470A (en) | 2019-05-24 |
CN109803470B true CN109803470B (en) | 2020-09-15 |
Family
ID=66555529
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711138075.6A Active CN109803470B (en) | 2017-11-16 | 2017-11-16 | Street lamp control method, street lamp and street lamp control system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109803470B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110708848B (en) * | 2019-09-26 | 2022-03-22 | 深圳市飞鹤电子有限公司 | Lamp binding control method |
CN114554665B (en) * | 2020-11-25 | 2023-08-29 | 武汉市奥拓智能科技有限公司 | Street lamp grouping control system and method |
CN115580956B (en) * | 2022-11-10 | 2023-03-14 | 四川九通智路科技有限公司 | Intelligent dimming control system and method for each lighting section in tunnel on vehicle |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102014550A (en) * | 2010-09-16 | 2011-04-13 | 徐大江 | System and method for parallelly controlling intelligent street lamps |
CN102056374A (en) * | 2010-10-15 | 2011-05-11 | 黄富杰 | Distributed illumination node control system and control method thereof |
CN203912257U (en) * | 2014-04-11 | 2014-10-29 | 深圳市中技兴业电子有限公司 | Wireless broadcast LED street lamp system |
CN104429095A (en) * | 2012-07-05 | 2015-03-18 | 松下知识产权经营株式会社 | Apparatus control device, apparatus control system and program |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9179528B2 (en) * | 2008-06-05 | 2015-11-03 | Relume Technologies, Inc. | Networked light control system |
-
2017
- 2017-11-16 CN CN201711138075.6A patent/CN109803470B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102014550A (en) * | 2010-09-16 | 2011-04-13 | 徐大江 | System and method for parallelly controlling intelligent street lamps |
CN102056374A (en) * | 2010-10-15 | 2011-05-11 | 黄富杰 | Distributed illumination node control system and control method thereof |
CN104429095A (en) * | 2012-07-05 | 2015-03-18 | 松下知识产权经营株式会社 | Apparatus control device, apparatus control system and program |
CN203912257U (en) * | 2014-04-11 | 2014-10-29 | 深圳市中技兴业电子有限公司 | Wireless broadcast LED street lamp system |
Also Published As
Publication number | Publication date |
---|---|
CN109803470A (en) | 2019-05-24 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109803470B (en) | Street lamp control method, street lamp and street lamp control system | |
CN108449117B (en) | Internet of things system based on PLC and network access method | |
CN108683636B (en) | Charging pile communication method and system | |
JPH11501491A (en) | Method for initializing a wireless packet hopping network | |
US20210297483A1 (en) | Discovery and configuration of iot devices | |
CN111885579B (en) | Bluetooth device testing method, device, equipment and storage medium | |
CN110244693A (en) | Test macro, method, vehicle and the machine readable media of vehicle arrangement | |
CN110583100B (en) | System and method for facilitating control of lighting devices and computer-readable storage medium | |
EP3422655B1 (en) | Method for managing address of meter device, and acquisition terminal and meter device | |
US20120089731A1 (en) | Terminal apparatus and method of registering the same | |
WO2020102267A1 (en) | Prioritized low power neighboring node discovery in an iot network | |
WO2019015051A1 (en) | Method and apparatus for switching operating modes | |
US10230634B2 (en) | Route optimization using star-mesh hybrid topology in localized dense ad-hoc networks | |
CN110045705A (en) | Using the intelligent home furnishing control method of heterogeneous wireless network, apparatus and system | |
US20230269111A1 (en) | Controller area network transceiver and method for the transceiver | |
US20200099576A1 (en) | Group Association Fallback For Improved Network Resilience | |
US20070297407A1 (en) | Communication Apparatus and Communication System | |
CN110601892B (en) | Main module access method, device and equipment based on object-oriented protocol | |
CN103346832B (en) | A kind of detection method of Fiber connection state and device | |
CN110233909B (en) | Address code allocation method and device for wireless gateway and network equipment | |
CN105554153B (en) | A kind of apparatus control method and the network equipment | |
US20220256678A1 (en) | Control network system | |
CN116634613B (en) | Ad hoc network system, method and equipment of photovoltaic module optimizer | |
CN117979384A (en) | Networking method, networking device, networking network, networking equipment, networking storage medium and networking program product | |
CN114401490A (en) | Information interaction method, device, broadcast type network, electronic device, and storage medium |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |