The content of the invention
For overcome the deficiencies in the prior art, it is an object of the invention to provide a kind of lamp light control method learnt automaticallyAnd device, automatically controlling for Light node is realized by Learning Algorithm.
To solve the above problems, the technical solution adopted in the present invention is as follows:
Scheme one:
A kind of lamp light control method learnt automatically, comprises the following steps:
S1:Being obtained by the sensor of setting influences the current sensor data of certain Light node, by current sensor data withAnd the current configuration data of the Light node is inputted to neutral net as input data;
S2:Output variance value is calculated in present weight data in neutral net, judges that the output variance value isIt is no in the threshold range of setting, if so, step S4 is performed, if it is not, performing step S3;
S3:Formula is adjusted according to default weight to be adjusted present weight data, working as during as next iterationPreceding weighted data, and return to step S1 is iterated;
S4:The expectation configuration data for the Light node that present weight data in neutral net are calculated is madePushed to for control selections request in the client of user.
Preferably, it is further comprising the steps of after step s4:
S5:According to selection result to the corresponding configuration adjustment of Light node progress, and according to selection result and presetWeight adjustment formula present weight data are adjusted, present weight data during as next iteration, and return to stepRapid S1 is iterated.
Preferably, in step s 4, if being provided with the default s election condition for the Light node in the client of user,Then directly perform acquiescence selection.
Preferably, the neutral net is BP neural network.
Scheme two:
A kind of Light Control Unit learnt automatically, including with lower module:
Data input module:The current sensor data of certain Light node are influenceed for being obtained by the sensor of setting, willCurrent sensor data and the current configuration data of the Light node are inputted to neutral net as input data;
Export judge module:Output variance value is calculated for the present weight data in neutral net, judgesWhether the output variance value it is expected to configure pushing module, is changed if it is not, performing first in the threshold range of setting if so, performingFor module;
First iteration module:Present weight data are adjusted for adjusting formula according to default weight, as underPresent weight data during an iteration, and returned data input module is iterated;
It is expected to configure pushing module:For the light section that the present weight data in neutral net are calculatedThe expectation configuration data of point is pushed in the client of user as control selections request.
Preferably, it is expected also to include with lower module after configuring pushing module:
Secondary iteration module:Adjusted for carrying out corresponding configuration to the Light node according to selection result, and according toSelection result and default weight adjustment formula are adjusted to present weight data, present weight during as next iterationData, and returned data input module is iterated.
Preferably, in it is expected to configure pushing module, if being provided with the client of user for the silent of the Light nodeRecognize alternative condition, then directly perform acquiescence selection.
Preferably, the neutral net is BP neural network.
Compared with prior art, the beneficial effects of the present invention are:Realize the light commonly used by neutral net to userConfiguration scene is trained study, and after learning success, the expectation light configuration for learning to obtain is pushed to the client of userCarry out choosing whether to perform or directly perform expectation light configuration, to realize the intelligent automatic control to the Light node.
Embodiment
Below, with reference to accompanying drawing and embodiment, the present invention is described further:
A kind of lamp light control method learnt automatically with reference to figure 1 for the present invention, comprises the following steps:
S1:Being obtained by the sensor of setting influences the current sensor data of certain Light node, by current sensor data withAnd the current configuration data of the Light node is inputted to neutral net as input data;
S2:Output variance value is calculated in present weight data in neutral net, judges that the output variance value isIt is no in the threshold range of setting, if so, step S4 is performed, if it is not, performing step S3;
S3:Formula is adjusted according to default weight to be adjusted present weight data, working as during as next iterationPreceding weighted data, and return to step S1 is iterated;
S4:The expectation configuration data for the Light node that present weight data in neutral net are calculated is madePushed to for control selections request in the client of user;If the acquiescence for the Light node is provided with the client of userAlternative condition, then directly perform acquiescence selection.
S5:According to selection result to the corresponding configuration adjustment of Light node progress, and according to selection result and presetWeight adjustment formula present weight data are adjusted, present weight data during as next iteration, and return to stepRapid S1 is iterated.
This programme preferably uses BP neural network algorithm, and its algorithm complex is relatively low, and descent performance is good as learning algorithm,And it is relatively easy, other neural network algorithms can also be selected to substitute BP neural network algorithm, BP neural network algorithm is applicationWide more ripe neural network algorithm, specific internal algorithm is not that this programme is claimed, in this programmeDo not repeat excessively.
Above method step is described with reference to specific application scenarios example, for example, certain user was once multiple7 points or so can be away from home and go for a trot at night, generally can all be dimmed the light of some Light node when leaving certain brightDegree, based on the scene, when people leaves, pyroelectric sensor can detect low level corresponding to the Light node, now recordThe low level signal of the pyroelectric sensor, the pyroelectric sensor switch to the low level time (i.e. user go out leave whenBetween) and the Light node be currently configured, be currently configured the numbering of present intensity and the Light node including light.WillThe data of above-mentioned record are inputted into the BP neural network of setting as input data, the present weight number in neutral netAccording to carrying out that output variance value is calculated, judge the output variance value whether in the threshold range of setting.As certain day userGone out again within the period, but have forgotten the lamplight brightness for adjusting the Light node, the data now inputted are by BP nervesIf the variance yields obtained after network calculations is in threshold range, then it represents that Data Convergence, it is believed that the light being wherein calculated is matched somebody with somebodyPut data be user expectation light configure, now then using the expectation light configuration data for the Light node being calculated asControl selections request is pushed in the client of user, and control selections include agreeing to and disagreeing;If not in threshold range,Represent that data are not restrained also, it is necessary to which the data and weight currently exported according to BP neural network adjust publicity to present weight dataIt is adjusted, present weight data during as next iteration, waits the data input of next iteration cycle, then useAdjusted present weight data are trained, namely restart to perform step S1.By successive ignition train purpose beMake Data Convergence, even if output variance value is in threshold range, it is preferred that an iterations upper limit is set, works as iterationsThe variance yields exported during the upper limit is reached still not in threshold range, it is believed that data are difficult to restrain, then abandon receiving again on thisThe data input of scene.
In step s 4, it would be desirable to after light configuration data pushes to the client of user as control selections request, ifThe default s election condition for the Light node is provided with the client of user, then directly performs the acquiescence and selects, such as withFamily is defaulted as agreeing to the adjustment, then directly the Light node is adjusted according to the light configuration data of push, without userSelection.
The application scenarios illustrated above are one of which, can also be applied to other light application scenarios, totalFor, as long as the scene for adjusting around light and frequently occurring, by obtaining the data input related to the scene to godThrough being iterated study in network, when obtaining output variance convergence, it is considered as completing automatic learning process, the lamp now obtainedLight configuration is then considered the desired light configuration of user, and light is automatically controlled so as to realize.
The present invention realize user is commonly used by neutral net light configuration scene be trained study, when learn intoAfter work(, the client that the expectation light configuration for learning to obtain is pushed to user carries out choosing whether that execution or directly execution shouldIt is expected that light configures, to realize the intelligent automatic control to the Light node.
The invention also discloses a kind of Light Control Unit learnt automatically, including with lower module:
Data input module:The current sensor data of certain Light node are influenceed for being obtained by the sensor of setting, willCurrent sensor data and the current configuration data of the Light node are inputted to neutral net as input data;
Export judge module:Output variance value is calculated for the present weight data in neutral net, judgesWhether the output variance value it is expected to configure pushing module, is changed if it is not, performing first in the threshold range of setting if so, performingFor module;
First iteration module:Present weight data are adjusted for adjusting formula according to default weight, as underPresent weight data during an iteration, and returned data input module is iterated;
It is expected to configure pushing module:For the light section that the present weight data in neutral net are calculatedThe expectation configuration data of point is pushed in the client of user as control selections request.
Preferably, it is expected also to include with lower module after configuring pushing module:
Secondary iteration module:Adjusted for carrying out corresponding configuration to the Light node according to selection result, and according toSelection result and default weight adjustment formula are adjusted to present weight data, present weight during as next iterationData, and returned data input module is iterated.
Preferably, in it is expected to configure pushing module, if being provided with the client of user for the silent of the Light nodeRecognize alternative condition, then directly perform acquiescence selection.
Preferably, the neutral net is BP neural network.
It will be apparent to those skilled in the art that technical scheme that can be as described above and design, make other variousCorresponding change and deformation, and all these changes and deformation should all belong to the protection domain of the claims in the present inventionWithin.