CN111669881A - Lamplight control method and device based on illuminance clustering and support vector machine - Google Patents

Lamplight control method and device based on illuminance clustering and support vector machine Download PDF

Info

Publication number
CN111669881A
CN111669881A CN202010564265.XA CN202010564265A CN111669881A CN 111669881 A CN111669881 A CN 111669881A CN 202010564265 A CN202010564265 A CN 202010564265A CN 111669881 A CN111669881 A CN 111669881A
Authority
CN
China
Prior art keywords
illuminance
support vector
vector machine
clustering
dimensional space
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
CN202010564265.XA
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.)
Chongqing Shenshu Technology Co ltd
Original Assignee
Chongqing Shenshu 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 Chongqing Shenshu Technology Co ltd filed Critical Chongqing Shenshu Technology Co ltd
Priority to CN202010564265.XA priority Critical patent/CN111669881A/en
Publication of CN111669881A publication Critical patent/CN111669881A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • 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
    • H05B47/105Controlling the light source in response to determined parameters
    • H05B47/11Controlling the light source in response to determined parameters by determining the brightness or colour temperature of ambient light
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning
    • G06N20/10Machine learning using kernel methods, e.g. support vector machines [SVM]
    • 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
    • H05B47/105Controlling the light source in response to determined parameters
    • H05B47/115Controlling the light source in response to determined parameters by determining the presence or movement of objects or living beings
    • H05B47/12Controlling the light source in response to determined parameters by determining the presence or movement of objects or living beings by detecting audible sound
    • 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
    • H05B47/105Controlling the light source in response to determined parameters
    • H05B47/115Controlling the light source in response to determined parameters by determining the presence or movement of objects or living beings
    • H05B47/13Controlling the light source in response to determined parameters by determining the presence or movement of objects or living beings by using passive infrared detectors
    • 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
    • H05B47/16Controlling the light source by timing means
    • 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
    • H05B47/165Controlling the light source following a pre-assigned programmed sequence; Logic control [LC]
    • 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
    • H05B47/175Controlling the light source by remote control
    • H05B47/18Controlling the light source by remote control via data-bus transmission
    • 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
    • H05B47/175Controlling the light source by remote control
    • H05B47/19Controlling the light source by remote control via wireless transmission
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02BCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO BUILDINGS, e.g. HOUSING, HOUSE APPLIANCES OR RELATED END-USER APPLICATIONS
    • Y02B20/00Energy efficient lighting technologies, e.g. halogen lamps or gas discharge lamps
    • Y02B20/40Control techniques providing energy savings, e.g. smart controller or presence detection

Abstract

The embodiment of the invention provides a light control method and device based on illuminance clustering and a support vector machine. The method comprises the following steps: acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector; and taking the high-dimensional space feature vector as input, and training the model by using a sequence minimum optimization algorithm (SMO) in the support vector machine to obtain an effective support vector machine model. And predicting the high-dimensional spatial data acquired in real time by adopting an effective support vector machine model, and sending an opening or closing instruction to the lamp group according to a prediction result. The invention can ensure that the light is turned on or off in proper occasions and time without manual inspection on the turning on or off of the light, thereby saving the economic cost and having wider application range.

Description

Lamplight control method and device based on illuminance clustering and support vector machine
Technical Field
The embodiment of the invention relates to the technical field of lighting lamp control, in particular to a lighting control method and lighting control equipment based on illuminance clustering and a support vector machine.
Background
The power consumption for indoor lighting is one of the important reasons for power consumption. In order to save energy and improve convenience, auto-induction lights have been commonly used in modern buildings.
Wherein, old-fashioned auto-induction light adopts sound transducer and illumination sensor more, and when the user went home evening, sound transducer detected people's footstep sound then opened the light in corridor. However, this method has a disadvantage in that the switching threshold of the acoustic sensor is difficult to control. If the threshold value of the sound is adjusted to be low, the light can be turned on by the sound accidentally made by a next building, the sound of a child in a cell, the barking of a dog and the like, and the electric energy is wasted; conversely, if the threshold for the sound is adjusted to be large, it is possible that the person has gone into the hallway, but the footstep sound is not large enough to trigger the light to turn on. Many people experience "stomping" to turn on the porch lights at night. In addition, some buildings adopt an illuminance sensor and a human body infrared module to control light. The advantage is that the body can be detected without the person 'stomping' and is quieter than acoustic sensing methods.
The above two methods can realize automatic opening and closing, but are basically only used for corridors and corridors. Mainly because the sound sensor and the infrared sensor cannot accurately identify whether a person stays in one place all the time. For example, the sound produced by people when reading books, cooking dishes in a kitchen and watching television is subtle, and the movement of the human body is not obvious. The sound sensor can only judge whether a person is present or not through a sound threshold value, the infrared sensor can only find the person through detecting temperature change, and if the person is still, the sound sensor and the infrared sensor cannot detect the person. Therefore, a light control method based on illuminance clustering and a support vector machine is developed, which can effectively overcome the defects in the related art.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a light control method and device based on illuminance clustering and a support vector machine.
In a first aspect, an embodiment of the present invention provides a light control method and device based on illuminance clustering and a support vector machine. The method comprises the following steps: acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector; and taking the high-dimensional space feature vector as input, and training the model by using a sequence minimum optimization algorithm (SMO) in the support vector machine to obtain an effective support vector machine model. And predicting the high-dimensional spatial data acquired in real time by adopting an effective support vector machine model, and sending an opening or closing instruction to the lamp group according to a prediction result.
On the basis of the content of the embodiment of the method, the light control method based on illuminance clustering and a support vector machine provided by the embodiment of the invention adopts a K-means algorithm to cluster the illuminance, and comprises the following steps: counting all the illuminance, finding out the first k data with the most median, and initializing the data into the initial mass center of the cluster; traversing all the data, calculating the distances from other illumination intensities to k initial centroids, and dividing each illumination intensity into a cluster in which the initial centroid with the closest distance is located; and taking the middle values of all the illuminance in each cluster as a new centroid of the cluster, repeatedly traversing all the illuminance, calculating the distance from each illuminance to each new centroid, dividing each illuminance into new clusters according to the nearest distance, taking the middle values of all the illuminance in each new cluster as the new centroid of each cluster, and repeating the calculation until the new centroids are not changed any more.
On the basis of the content of the embodiment of the method, in the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention, the classification decision function corresponding to the gaussian kernel function is:
Figure BDA0002547226240000031
wherein z is the kernel function center; sigma is a width parameter of the function, and controls the radial action range of the function.
On the basis of the content of the above method embodiment, the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention includes the following steps:
Figure BDA0002547226240000032
wherein, ciIs the centroid of the ith cluster; x is a single illuminance value; e is the sum of the distances; ciA set of cluster points for the ith cluster.
On the basis of the content of the above method embodiment, the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention, where the median of all illuminances in each cluster is used as the new centroid of each cluster, includes:
Figure BDA0002547226240000033
where m is the number of light intensities in each cluster.
On the basis of the content of the embodiment of the method, the method for controlling the light based on the illuminance clustering and the support vector machine, provided by the embodiment of the invention, for training the support vector machine model by adopting the high-dimensional space feature vector and sequence minimum optimization algorithm, comprises the following steps: and taking the high-dimensional space characteristic vector as input, training a model through a sequence minimum optimization algorithm to obtain a prediction model based on the high-dimensional space characteristic vector, and determining the expected output of a support vector machine model as the parameter of the optimal prediction model if the model meets a shutdown condition within a preset precision range.
On the basis of the content of the embodiment of the method, the light control method based on the illuminance clustering and the support vector machine provided by the embodiment of the invention comprises the following steps:
inputting: training data set T { (x)1,y1),(x2,y2),...,(xN,yN) }; wherein x isi∈Rn,yi∈ { -1, +1}, i ═ 1,2, …, N, precision;
and (3) outputting: approximate solution
Figure BDA0002547226240000041
(1) Taking an initial value of α(0)0, making k 0;
(2) selecting optimized variables
Figure BDA0002547226240000042
Resolving and solving the optimization problem of two variables to obtain the optimal solution
Figure BDA0002547226240000043
Update α to
Figure BDA0002547226240000044
(3) If the stop condition is met within the precision range;
Figure BDA0002547226240000045
0≤αi≤C,i=1,2,...,N
Figure BDA0002547226240000046
Figure BDA0002547226240000047
turning to (4); otherwise, making k equal to k +1, and turning to (2);
(4) get
Figure BDA0002547226240000048
In a second aspect, an embodiment of the present invention provides a light control device based on illuminance clustering and a support vector machine, including:
the model training module is used for acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, mapping the time, the sound intensity, the infrared signals and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector, and training a support vector machine model by adopting the high-dimensional space feature vector and a sequence minimum optimization algorithm to obtain an effective support vector machine model;
the high-dimensional space data module is used for acquiring the illumination intensity, the time, the sound intensity and the infrared signal in real time, clustering the illumination intensity acquired in real time by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signal and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain high-dimensional space data;
and the prediction module is used for identifying the high-dimensional space data acquired in real time by adopting the effective support vector machine model and sending a light opening or closing instruction to the lamp group according to an identification result.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions executable by the processor, and the processor calls the program instructions to execute the light intensity clustering and support vector machine-based light control method provided by any one of the various possible implementations of the first aspect.
In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the light illumination clustering and support vector machine-based light control method provided in any one of the various possible implementations of the first aspect.
According to the light control method and device based on illuminance clustering and the support vector machine, illuminance, time, sound intensity and infrared signals are obtained, the illuminance is clustered by adopting a K-means algorithm, and the time, the sound intensity and the infrared signals are mapped to a high-dimensional space by adopting a Gaussian kernel function, so that a high-dimensional space feature vector is obtained; and taking the high-dimensional space feature vector as input, and training the model by using a sequence minimum optimization algorithm (SMO) in the support vector machine to obtain an effective support vector machine model. And predicting the high-dimensional spatial data acquired in real time by adopting an effective support vector machine model, and sending an opening or closing instruction to the lamp group according to a prediction result. The invention can ensure that the light is turned on or off in proper occasions and time without manual inspection on the turning on or off of the light, thereby saving the economic cost and having wider application range.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief description will be given below of the drawings which are required to be used in the description of the embodiments or the prior art. It is obvious that the drawings in the following description are some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a flowchart of a light control method based on illuminance clustering and a support vector machine according to an embodiment of the present invention;
fig. 1a is a detailed flowchart of a light control method based on illuminance clustering and a support vector machine according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a system for controlling light based on illuminance clustering and a support vector machine according to an embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating the effect of controlling the energy consumption of a lamp set by different methods according to an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a lighting control device based on illuminance clustering and a support vector machine according to an embodiment of the present invention;
fig. 5 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, 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. In addition, technical features of various embodiments or individual embodiments provided by the present invention may be arbitrarily combined with each other to form a feasible technical solution, and such combination is not limited by the sequence of steps and/or the structural composition mode, but must be realized by a person skilled in the art, and when the technical solution combination is contradictory or cannot be realized, such a technical solution combination should not be considered to exist and is not within the protection scope of the present invention.
The embodiment of the invention provides a light control method based on illuminance clustering and a support vector machine, and with reference to fig. 1, the method comprises the following steps:
101. acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector; taking the high-dimensional space feature vector as input, and training the model by using a sequence minimum optimization algorithm (SMO) in a support vector machine to obtain an effective support vector machine model;
specifically, referring to fig. 1a, illuminance (collected by a sensor) is an important factor affecting indoor lamps, and is used as a main characteristic input (usually 0-100000 Lux), after K-means clustering, illuminance grades are divided, then the grades are used as characteristic vectors together with sound, infrared, time (H) and time (M), parameters are set by using gaussian kernel function mapping, then an SVM is trained as a sample set to determine whether the parameters reach the optimum, finally an SVM model is used for SVM prediction, and a result is analyzed. Among them, time is one of factors affecting the light switch. The sun rises from east and falls from west each day, presenting some regularity, so this document uses only XX moments in XX times in each day as characteristic inputs. The change in sound can also directly or indirectly reflect whether a person is present. In the case of continuous steady sound, it is necessary to turn on the light even when the machine is operating. While the processing of the sound data requires the ability to discern distracting data such as dog barking outside the building, car horns, etc. Infrared detection is the most direct means of detecting whether a person is moving and therefore also requires that this data be collected. The gaussian kernel function belongs to a mature technical means in the prior art, and reference may be made to the description of the prior art, which is not described herein again.
102. Acquiring illuminance, time, sound intensity and infrared signals in real time, clustering the illuminance acquired in real time by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illuminance to a high-dimensional space by adopting a Gaussian kernel function to obtain high-dimensional space data;
103. and predicting the high-dimensional spatial data acquired in real time by adopting the effective support vector machine model, and sending an opening or closing instruction to the lamp group according to a prediction result.
Based on the content of the foregoing method embodiment, as an optional embodiment, the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention, where the clustering of illuminance by using a K-means algorithm includes: counting all the illuminance, finding out the first k data with the most median, and initializing the data into the initial mass center of the cluster; traversing all the data, calculating the distances from other illumination intensities to k initial centroids, and dividing each illumination intensity into a cluster in which the initial centroid with the closest distance is located; and taking the middle values of all the illuminance in each cluster as a new centroid of the cluster, repeatedly traversing all the illuminance, calculating the distance from each illuminance to each new centroid, dividing each illuminance into new clusters according to the nearest distance, taking the middle values of all the illuminance in each new cluster as the new centroid of each cluster, and repeating the calculation until the new centroids are not changed any more.
Specifically, the step of clustering all the illuminance by using K-means is as follows:
s1: counting all the illuminance data, finding out the first k data with the most median, and initializing the data into the initial mass center of the cluster;
s2: traversing all the data, calculating the distance from all other illuminances to each centroid by using a formula (2), and dividing each illuminance into a cluster in which the centroid closest to the illuminance is located according to the distance;
s3: recalculating the centroids of the k clusters, wherein the centers of all object values in the clusters are the centroids, and the calculation formula is shown as a formula (3);
s4: and repeating the operations of S2 and S3, and finally dividing the data objects into k clusters until the centroid is not changed any more through multiple iterative computations and repeated adjustment.
Based on the content of the foregoing method embodiment, as an optional embodiment, in the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention, the classification decision function corresponding to the gaussian kernel function is:
Figure BDA0002547226240000081
based on the content of the foregoing method embodiment, as an optional embodiment, the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention, where the calculating a distance between each illuminance and each initial centroid among k initial centroids includes:
Figure BDA0002547226240000091
wherein, ciIs the centroid of the ith cluster; x is a single illuminance value; e is a distanceThe sum of the distances; ciA set of cluster points for the ith cluster.
Based on the content of the foregoing method embodiment, as an optional embodiment, the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention, where the taking of the median value of all illuminances in each cluster as the new centroid of each cluster includes:
Figure BDA0002547226240000092
where m is the number of light intensities in each cluster.
Based on the content of the foregoing method embodiment, as an optional embodiment, the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention trains a model by using a sequence minimum optimization algorithm SMO in the support vector machine, including: and taking the high-dimensional space characteristic vector as input, training a model through a sequence minimum optimization algorithm to obtain a prediction model based on the high-dimensional space characteristic vector, and determining the expected output of a support vector machine model as the parameter of the optimal prediction model if the model meets a shutdown condition within a preset precision range.
Specifically, an algorithm for sequential minimal optimization SMO is employed that decomposes a large optimization problem into multiple small optimization problems. These small optimization problems tend to be easy to solve, and the results of sequentially solving the small optimization problems are completely consistent with the results of solving all the small optimization problems as a whole, while the solution time is shorter.
Inputting: training data set T { (x)1,y1),(x2,y2),...,(xN,yN) }; wherein x isi∈Rn,yi∈ { -1, +1}, i ═ 1,2, …, N, with a predetermined precision;
and (3) outputting: approximate solution
Figure BDA0002547226240000101
The high-dimensional space feature vector is used asIs initialized to zero, i.e. α{0}0, selecting optimized variable α1 {k},α2 {k}K is an integer, the optimization problem of two variables is solved through analysis, and the optimal solution α is obtained1 {k+1},α2 {k+1}Update α is α1 {k+1},α2 {k+1}
If the shutdown conditions (4) and (5) are met within the preset precision, taking
Figure BDA0002547226240000102
Otherwise, choose optimization variables α from1 {k},α2 {k}And k is an integer.
Based on the content of the foregoing method embodiment, as an optional embodiment, in the light control method based on illuminance clustering and a support vector machine provided in the embodiment of the present invention, the stop condition includes:
Figure BDA0002547226240000103
Figure BDA0002547226240000104
according to the light control method based on illuminance clustering and the support vector machine, the illuminance is clustered, the clustered illuminance, time, sound intensity and infrared signals are used as the training set to train the support vector machine model, the trained support vector machine model is used for predicting and identifying the illuminance, the time, the sound intensity and the infrared signals acquired in real time and outputting results, and the lamp group is controlled to be turned on or turned off according to the identification results, so that the light can be turned off or turned on in proper occasions and time without manual inspection on the turning on or off of the light, the economic cost is saved, and the applicable occasions are wide.
The whole system for light control based on illumination clustering and support vector machine can be seen in fig. 2. The timer, the illuminance sensor, the sound sensor and the infrared sensor continuously detect environmental data, a time value, the intensity of sunlight, the decibel of sound and the change of the environmental temperature generated by the movement of a human body are obtained, the four kinds of obtained data are transmitted to the central control through small wireless networks such as Zigbee and Lora, and then the central control packages the data and uploads the data to the cloud server through the 4G mobile network in a TCP/IP format. The cloud server firstly maps the four data into a high-dimensional space by adopting a Gaussian kernel function after receiving the four data, then carries out prediction and identification on the data in the four high-dimensional spaces by a support vector machine model trained in advance, calculates a control instruction according to a prediction result, then sends the control instruction to a central control in a TCP/IP (transmission control protocol/Internet protocol) packet format, and then sends a central control conversion control command to a specified light module, such as a household toilet lamp, a household kitchen lamp and a household hall lamp, by using a Zigbee or Lora protocol; corporate porch lights, office lights, and shop lights. Thereby realizing the control of the on or off of various lights. As shown in fig. 3, compared with the power consumption of the lamp group controlled by the conventional time switch a and the conventional photoswitch B, in the area a, the area B, or the area C, the energy consumption of the lamp group controlled by the time switch a is the highest, the energy consumption of the lamp group controlled by the photoswitch B is the middle, and the energy consumption of the lamp group controlled by the SVM algorithm C (i.e., the method provided by each embodiment of the present invention) is the lowest. Therefore, the light control method based on the illuminance clustering and the support vector machine provided by the embodiments of the invention has a remarkable energy-saving effect.
By using the light control method based on the illuminance clustering and the support vector machine provided by the embodiment of the invention, the condition of 'forgetting to turn off the light' can be effectively avoided. The energy-saving lighting device can provide more effective energy-saving lighting means for scenes such as families, offices, factory workshops and the like. In addition, the problems that the threshold value of the traditional sound switch is inaccurate and the identification angle of the infrared induction switch is small can be solved. These problems may result in the person not yet leaving the lighted area, but the switch "judge person has left" and turn off the light. If it is night that the pedestrian goes up and down the stairs, the 'switch misjudges that the pedestrian leaves and turns off the light' may occur, and the sudden blackout may cause a safety hazard. Meanwhile, the method can provide more convenient and comfortable home life for younger people. The lamp is not needed to be turned on or off when the user goes home or leaves home; where the person goes, where the light shines; after going out, the user does not need to go back to check whether the lamp is turned off or not. Further, the conventional light control method relying on sound and infrared detection cannot accurately identify whether a human body stays in one place for a long time due to technical problems, and therefore, the method can only be applied to places where the human body continuously moves and stays for a short time, such as corridors and passageways. However, the scheme collects and uniformly processes the sound and infrared detection signals of the building factory, and adds the prediction (work and rest rule) based on time, so that the accuracy of judging whether people exist is greatly improved. Specifically, the lighting time and the lighting law are different in different scenes, such as offices, workshops, living rooms, kitchens, and the like. And the machine learning model can learn according to different scenes, and the accuracy of turning on and turning off the light is pertinently improved. Finally, in the scenes of office buildings, factories, schools and the like, staff do not need to go to patrol to turn off the lamp, and the labor cost is reduced.
The implementation basis of the various embodiments of the present invention is realized by programmed processing performed by a device having a processor function. Therefore, in engineering practice, the technical solutions and functions thereof of the embodiments of the present invention can be packaged into various modules. Based on this reality, on the basis of the above embodiments, embodiments of the present invention provide a light control apparatus based on illuminance clustering and a support vector machine, which is used to execute the light control method based on illuminance clustering and a support vector machine in the above method embodiments. Referring to fig. 4, the apparatus includes:
the model training module 401 is configured to acquire illuminance, time, sound intensity, and an infrared signal, cluster the illuminance by using a K-means algorithm, and map the time, the sound intensity, the infrared signal, and the clustered illuminance to a high-dimensional space by using a gaussian kernel function to obtain a high-dimensional space feature vector; taking the high-dimensional space feature vector as input, and training the model by using a sequence minimum optimization algorithm (SMO) in a support vector machine to obtain an effective support vector machine model;
a high-dimensional space data module 402, configured to obtain illuminance, time, sound intensity, and infrared signal in real time, cluster the illuminance obtained in real time by using a K-means algorithm, and map the time, the sound intensity, the infrared signal, and the clustered illuminance to a high-dimensional space by using a gaussian kernel function, so as to obtain high-dimensional space data;
and the prediction identification module 403 is configured to predict the high-dimensional spatial data acquired in real time by using the effective support vector machine model, and send an on or off instruction to the lamp group according to a prediction result.
The light control device based on illuminance clustering and the support vector machine provided by the embodiment of the invention adopts the model training module, the high-dimensional spatial data module and the mode recognition module, clusters the illuminance, trains the support vector machine model by using the clustered illuminance, time, sound intensity and infrared signals as a training set, predicts the illuminance, time, sound intensity and infrared signals acquired in real time by using the trained support vector machine model and outputs a result, and controls the turning on or off of the lamp group according to the prediction result, so that the light can be ensured to be turned off or turned on in proper occasions and time, manual inspection for the turning on or off of the light is not needed, the economic cost is saved, and the applicable occasions are wide.
It should be noted that, the apparatus in the apparatus embodiment provided by the present invention may be used for implementing methods in other method embodiments provided by the present invention, except that corresponding function modules are provided, and the principle of the apparatus embodiment provided by the present invention is basically the same as that of the apparatus embodiment provided by the present invention, so long as a person skilled in the art obtains corresponding technical means by combining technical features on the basis of the apparatus embodiment described above, and obtains a technical solution formed by these technical means, on the premise of ensuring that the technical solution has practicability, the apparatus in the apparatus embodiment described above may be modified, so as to obtain a corresponding apparatus class embodiment, which is used for implementing methods in other method class embodiments. For example:
based on the content of the above device embodiment, as an optional embodiment, the light control device based on illuminance clustering and a support vector machine provided in the embodiment of the present invention further includes: the K-means algorithm clusters the illuminance, and comprises the following steps: counting all the illuminance, finding out the first k data with the most median, and initializing the data into the initial mass center of the cluster; traversing all the data, calculating the distances from other illumination intensities to k initial centroids, and dividing each illumination intensity into a cluster in which the initial centroid with the closest distance is located; taking the median of all the illuminances in each cluster as the new centroid of the cluster; and repeatedly traversing all the illuminances, calculating the distance between each illuminance and each new centroid, dividing each illuminance into new clusters according to the nearest distance, taking the intermediate values of all the illuminances in each new cluster as the new centroid of each cluster, and repeating the calculation until the new centroid does not change any more.
The method of the embodiment of the invention is realized by depending on the electronic equipment, so that the related electronic equipment is necessarily introduced. To this end, an embodiment of the present invention provides an electronic apparatus, as shown in fig. 5, including: at least one processor (processor)501, a communication Interface (Communications Interface)504, at least one memory 502, and a communication bus 503. The at least one processor 501, the communication interface 504, and the at least one memory 502 are configured to communicate with each other via a communication bus 503. The at least one processor 501 may call logic instructions in the at least one memory 502 to perform the following method: acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, mapping the time, the sound intensity, the infrared signals and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector, and training a support vector machine model by adopting the high-dimensional space feature vector and a sequence minimum optimization algorithm to obtain an effective support vector machine model; acquiring illuminance, time, sound intensity and infrared signals in real time, clustering the illuminance acquired in real time by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illuminance to a high-dimensional space by adopting a Gaussian kernel function to obtain high-dimensional space data; and predicting the high-dimensional spatial data acquired in real time by adopting the effective support vector machine model, and sending a light turn-on or turn-off instruction to the lamp group according to a prediction result.
Furthermore, the logic instructions in the at least one memory 502 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product. 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. Examples include: acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, mapping the time, the sound intensity, the infrared signals and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector, and training a support vector machine model by adopting the high-dimensional space feature vector and a sequence minimum optimization algorithm to obtain an effective support vector machine model; acquiring illuminance, time, sound intensity and infrared signals in real time, clustering the illuminance acquired in real time by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illuminance to a high-dimensional space by adopting a Gaussian kernel function to obtain high-dimensional space data; and predicting the high-dimensional spatial data acquired in real time by adopting the effective support vector machine model, and sending a light turn-on or turn-off instruction to the lamp group according to a prediction result. 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.
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.
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. Based on this recognition, each block in the flowchart or block diagrams may represent a module, a program segment, or a portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In this patent, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
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 (8)

1. A light control method based on illuminance clustering and a support vector machine is characterized by comprising the following steps:
acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector; taking the high-dimensional space feature vector as input, and training the model by using a sequence minimum optimization algorithm (SMO) in a support vector machine to obtain an effective support vector machine model;
acquiring illuminance, time, sound intensity and infrared signals in real time, clustering the illuminance acquired in real time by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signals and the clustered illuminance to a high-dimensional space by adopting a Gaussian kernel function to obtain high-dimensional space data;
and predicting the high-dimensional spatial data acquired in real time by adopting the effective support vector machine model, and sending an opening or closing instruction to the lamp group according to a prediction result.
2. A light control method based on illuminance clustering and support vector machine as claimed in claim 1, wherein the clustering of illuminance using K-means algorithm comprises: counting all the illuminance, finding out the first k data with the most median, and initializing the data into the initial mass center of the cluster; traversing all the data, calculating the distances from other illumination intensities to k initial centroids, and dividing each illumination intensity into a cluster in which the initial centroid with the closest distance is located; and taking the middle values of all the illuminance in each cluster as a new centroid of the cluster, repeatedly traversing all the illuminance, calculating the distance from each illuminance to each new centroid, dividing each illuminance into new clusters according to the nearest distance, taking the middle values of all the illuminance in each new cluster as the new centroid of each cluster, and repeating the calculation until the new centroids are not changed any more.
3. A light control method based on illuminance clustering and a support vector machine according to claim 2, wherein the calculating of the distance of each illuminance from each of k initial centroids comprises:
Figure FDA0002547226230000011
wherein, ciIs the centroid of the ith cluster; x is a single illuminance value; e is the sum of the distances; ciA set of cluster points for the ith cluster.
4. A light control method based on illuminance clustering and support vector machine according to claim 3, wherein the taking the median of all illuminance in each cluster as the new centroid of each cluster comprises:
Figure FDA0002547226230000021
where m is the number of light intensities in each cluster.
5. A light control method based on illuminance clustering and support vector machine as claimed in claim 1, wherein the training of the model using the SMO algorithm in the support vector machine comprises: and taking the high-dimensional space characteristic vector as input, training a model through a sequence minimum optimization algorithm to obtain a prediction model based on the high-dimensional space characteristic vector, and determining the expected output of a support vector machine model as the parameter of the optimal prediction model if the model meets a shutdown condition within a preset precision range.
6. A light control device based on illuminance clustering and a support vector machine is characterized by comprising:
the model training module is used for acquiring illumination intensity, time, sound intensity and infrared signals, clustering the illumination intensity by adopting a K-means algorithm, and mapping the time, the sound intensity and the infrared signals to a high-dimensional space by adopting a Gaussian kernel function to obtain a high-dimensional space feature vector; taking the high-dimensional space feature vector as input, and training the model by using a sequence minimum optimization algorithm (SMO) in a support vector machine to obtain an effective support vector machine model;
the high-dimensional space data module is used for acquiring the illumination intensity, the time, the sound intensity and the infrared signal in real time, clustering the illumination intensity acquired in real time by adopting a K-means algorithm, and mapping the time, the sound intensity, the infrared signal and the clustered illumination intensity to a high-dimensional space by adopting a Gaussian kernel function to obtain high-dimensional space data;
and the prediction module is used for predicting the high-dimensional spatial data acquired in real time by adopting the effective support vector machine model and sending an opening or closing instruction to the lamp group according to a prediction result.
7. An electronic device, comprising:
at least one processor, at least one memory, and a communication interface; wherein the content of the first and second substances,
the processor, the memory and the communication interface are communicated with each other;
the memory stores program instructions executable by the processor, the processor invoking the program instructions to perform the method of any of claims 1 to 5.
8. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 5.
CN202010564265.XA 2020-06-19 2020-06-19 Lamplight control method and device based on illuminance clustering and support vector machine Pending CN111669881A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010564265.XA CN111669881A (en) 2020-06-19 2020-06-19 Lamplight control method and device based on illuminance clustering and support vector machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010564265.XA CN111669881A (en) 2020-06-19 2020-06-19 Lamplight control method and device based on illuminance clustering and support vector machine

Publications (1)

Publication Number Publication Date
CN111669881A true CN111669881A (en) 2020-09-15

Family

ID=72388944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010564265.XA Pending CN111669881A (en) 2020-06-19 2020-06-19 Lamplight control method and device based on illuminance clustering and support vector machine

Country Status (1)

Country Link
CN (1) CN111669881A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347753A (en) * 2021-08-06 2021-09-03 深圳特朗达照明股份有限公司 LED self-adaptive control method, system and readable storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108012389A (en) * 2017-10-27 2018-05-08 深圳和而泰智能控制股份有限公司 Light adjusting method, terminal device and computer-readable recording medium
CN108364629A (en) * 2018-03-12 2018-08-03 南京工程学院 It is a kind of intelligently to adjust electronic organ, its control system and its control method
CN108644705A (en) * 2018-03-20 2018-10-12 安徽赛福贝特信息技术有限公司 A kind of intelligent road lamp system based on technology of Internet of things
EP3508935A1 (en) * 2018-01-05 2019-07-10 iRobot Corporation System for spot cleaning by a mobile robot
CN110049604A (en) * 2019-04-03 2019-07-23 苏州科技大学 A kind of street lighting power-economizing method and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108012389A (en) * 2017-10-27 2018-05-08 深圳和而泰智能控制股份有限公司 Light adjusting method, terminal device and computer-readable recording medium
EP3508935A1 (en) * 2018-01-05 2019-07-10 iRobot Corporation System for spot cleaning by a mobile robot
CN108364629A (en) * 2018-03-12 2018-08-03 南京工程学院 It is a kind of intelligently to adjust electronic organ, its control system and its control method
CN108644705A (en) * 2018-03-20 2018-10-12 安徽赛福贝特信息技术有限公司 A kind of intelligent road lamp system based on technology of Internet of things
CN110049604A (en) * 2019-04-03 2019-07-23 苏州科技大学 A kind of street lighting power-economizing method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
万园: "支持向量机在路灯节能控制策略中的应用研究", 《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》, 15 September 2019 (2019-09-15) *
文俊浩: "光照度聚类和支持向量机在路灯节能控制策略中的应用", 《计算机科学》, 31 July 2019 (2019-07-31), pages 327 - 332 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347753A (en) * 2021-08-06 2021-09-03 深圳特朗达照明股份有限公司 LED self-adaptive control method, system and readable storage medium
CN113347753B (en) * 2021-08-06 2021-11-09 深圳特朗达照明股份有限公司 LED self-adaptive control method, system and readable storage medium

Similar Documents

Publication Publication Date Title
US10165650B1 (en) Occupant tracking
CN109874209A (en) Commercial hotel guest room scene lighting system based on scene automatic identification
KR20180072468A (en) Intelligence Cooling and Heating Service Method of User Using Big Data
CN109799726B (en) Smart home system combined with living environment detection
CN111669881A (en) Lamplight control method and device based on illuminance clustering and support vector machine
CN112020184B (en) Building lighting system and method based on Internet of things
KR102011264B1 (en) Apparatus for dissimilar type communication system based smart lighting control and method by using the same
CN112558524A (en) Electric appliance system control method and device, electronic equipment and storage medium
CN108401316A (en) A kind of Office lighting systems based on sensing technology
CN117354986B (en) Intelligent control method and system for multifunctional LED lamp beads
CN116582981B (en) Smart home illumination control method and device and related equipment
KR101659435B1 (en) System and method for providing natural space service platform with smart convergence
Abdurohman et al. An improvement of led lighting system accuracy with voltage control system
CN113873735B (en) Lamplight control method and device for lamplight door, intelligent terminal and storage medium
WO2019049640A1 (en) Lighting control system, lighting control method, and program
US20210251065A1 (en) Room type determinations with motion sensors
CN112383989B (en) Corridor lamp control method, device, system and storage medium
KR20150088005A (en) Energy-saving inner lighting apparatus
JP7206748B2 (en) lighting equipment
KR101846495B1 (en) Method for controlling and operating LED lighting for saving energy based on wireless network
KR101739847B1 (en) Self-learning engine system and its method through pattern analysis of informal input data
Islam et al. An Energy-efficient Microcontroller-based Smart Light Controlling System
KR20160131739A (en) Apparatus and Method for controlling Lighting
CN111182671A (en) Energy control method for intelligent park
CN111503762A (en) Control method and device for air purification fan lamp

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20200915

RJ01 Rejection of invention patent application after publication