Disclosure of Invention
In view of the above, the invention provides a method and a device for intelligently controlling a lamp, and the lamp, which can control the lamp to change according to the sound rhythm, so that the intelligent lamp has a music mode, and the control versatility of the intelligent lamp is further increased, thereby improving the interest in use.
According to one aspect of the invention, an intelligent control method for a lamp is provided.
The intelligent lamp control method is applied to terminal equipment and comprises the following steps: collecting audio data, and then converting the audio data into lamp control signals; and providing the lamp control signal to the lamp so that the lamp adjusts the lamp light according to the lamp control signal.
Optionally, the step of collecting audio data includes one of: acquiring audio data of sound played by terminal equipment; acquiring audio data stored by the terminal equipment; and receiving the audio data of the external sound collected by the terminal equipment from the terminal equipment.
Optionally, the step of converting the audio data into the luminaire control signal comprises: and processing the audio data by adopting a specified information conversion mode so as to convert the audio data into lamp control signals.
Optionally, the information transformation means comprises a fourier transform.
Optionally, the step of providing a luminaire control signal to the luminaire comprises one of: transmitting the lamp control signal to a server so that the server forwards the lamp control signal to the lamp; and sending the lamp control signal to the lamp in a Bluetooth mode.
According to another aspect of the invention, an intelligent lamp control device is provided.
The intelligent lamp control device is arranged on a terminal device and comprises: the acquisition module is used for acquiring audio data; the conversion module is used for converting the audio data into lamp control signals; and the sending module is used for providing a lamp control signal for the lamp so that the lamp can adjust the lamp light according to the lamp control signal.
Optionally, the acquisition module is further configured to one of: acquiring audio data of sound played by terminal equipment; acquiring audio data stored by the terminal equipment; and receiving the audio data of the external sound collected by the terminal equipment from the terminal equipment.
Optionally, the conversion module is further configured to: and processing the audio data by adopting a specified information conversion mode so as to convert the audio data into lamp control signals.
Optionally, the sending module is further configured to one of: transmitting the lamp control signal to a server so that the server forwards the lamp control signal to the lamp; and sending the lamp control signal to the lamp in a Bluetooth mode.
According to yet another aspect of the present invention, a luminaire is provided.
The lamp of the present invention includes: the wireless connection module is used for being connected with external equipment in a wireless mode; the receiving module is used for receiving the lamp control signal provided by the intelligent lamp control device; and the light adjusting module is used for adjusting light according to the lamp control signal.
Optionally, the light adjustment module is further configured to one of: adjusting the brightness of the lamplight, adjusting the color temperature of the lamplight and adjusting the flickering mode of the lamplight.
Detailed Description
In the embodiment of the invention, the lamplight of the lamp is adjusted according to the collected audio data, so that the intelligent lamp is added with a music mode, and the intelligent lamp is specifically described below.
FIG. 1 is a flow chart of a luminaire intelligent control method provided by an embodiment of the invention; the intelligent control method of the lamp is applied to terminal equipment (such as a mobile phone, a tablet personal computer and the like), as shown in figure 1, and comprises the following steps,
step S1: collecting audio data;
step S2: converting the audio data into lamp control signals;
step S3: and providing the lamp control signal to the lamp so that the lamp adjusts the lamp light according to the lamp control signal.
By utilizing the intelligent lamp control method provided by the embodiment of the invention, a music mode can be added in the aspect of intelligent lamp control, the client side converts the collected audio data into the lamp control signal in the music mode, and the lamp control signal enables the lamp to change in brightness, color temperature or flickering mode along with the music rhythm, so that the diversity and interactivity of intelligent lamp control are improved.
In step S1, the manner of collecting audio data includes obtaining audio data of a sound played by the terminal device, that is, obtaining a sound being played by the terminal device, for example, directly obtaining a sound being played by the mobile phone by calling a bottom layer interface of the mobile phone system; or acquiring the audio data stored by the terminal equipment, wherein the part of audio data is data stored in the mobile terminal and can be directly acquired without playing; or receiving the audio data of the external sound collected by the terminal equipment from the terminal equipment, namely collecting the audio data of the current environment (the environment where the lamp is positioned), for example, collecting the external audio data by using a microphone of the mobile phone, and converting the part of the audio data into a lamp control signal.
In step S2, the step of converting the audio data into a lamp control signal includes: and processing the audio data by adopting a specified information conversion mode so as to convert the audio data into lamp control signals. When converting audio data, the collected audio data is processed in a specified information conversion mode, such as Fourier conversion mode, the energy distribution of the sound at each moment in each frequency band is analyzed during processing, the brightness of the lamplight is determined according to the total energy of all the frequency bands, and the color temperature of the lamplight is determined according to the energy proportion of each frequency band, for example, when the high-frequency energy is higher, the lamplight is cold, and when the low-frequency energy is higher, the lamplight is warm.
In step S3, the method for providing the lamp control signal to the lamp includes two methods, one is that the client on the terminal device sends the lamp control signal to the server, then the server forwards the lamp control signal to the router, and finally the router sends the lamp control signal to the lamp, so that the method is suitable for remote operation; the other is that the client on the terminal equipment adopts a Bluetooth or wireless local area network direct connection mode to send the lamp control signal to the lamp, and the mode is suitable for short-distance operation. The two signal transmission modes provide different applicable requirements, wherein the delay is smaller by adopting a Bluetooth or wireless local area network direct connection mode, so that the signal transmission is more stable.
Fig. 2 is a block diagram of a lamp intelligent control device according to an embodiment of the present invention. As shown in fig. 2, the intelligent lamp control device 10 is installed on a terminal device, and comprises an acquisition module 101, a conversion module 102 and a sending module 103, wherein the acquisition module 101 is used for acquiring audio data; the conversion module 102 is used for converting the audio data into lamp control signals; the sending module 103 is configured to provide a lamp control signal to the lamp, so that the lamp adjusts the light according to the lamp control signal.
The acquisition module 101 is further configured to acquire audio data of sound played by the terminal device; if the bottom layer interface of the mobile phone system is called, the sound played by the mobile phone is directly obtained; or the method is also used for acquiring the audio data stored by the terminal equipment; the part of audio data is data stored in the mobile terminal and can be directly acquired without playing; or receiving the audio data of the external sound collected by the terminal equipment from the terminal equipment, namely collecting the audio data of the current environment (the environment where the lamp is positioned), for example, collecting the external audio data by using a microphone of the mobile phone, and converting the partial data into a lamp control signal.
The conversion module 102 is further configured to process the audio data in a specified information conversion manner, so as to convert the audio data into a lamp control signal. When the conversion module 102 operates, the collected audio data is processed in real time by using a specified information change mode, such as fourier transform, so as to analyze the energy distribution of the sound at each moment in each frequency band, determine the brightness of the light according to the total energy of all the frequency bands, and determine the color temperature of the light according to the specific gravity of the energy of each frequency band.
When the sending module 103 sends the lamp control signal, the lamp control signal can be sent to the server, so that the server forwards the lamp control signal to the lamp, and the sending mode is suitable for remote intelligent control of the lamp; or the lamp control signal is sent to the lamp in a Bluetooth mode, and the sending mode is suitable for short-distance intelligent control, wherein the delay is smaller in a Bluetooth or wireless local area network direct connection mode, so that the signal transmission is more stable.
FIG. 3 is a block diagram of a lamp provided by an embodiment of the present invention; as shown in fig. 3, the lamp 20 includes a wireless connection module 201, a receiving module 202, and a light adjusting module 203. The wireless connection module 201 is used for wireless connection with external equipment; the receiving module 202 is configured to receive a lamp control signal provided by the intelligent lamp control device; the light adjusting module 203 is configured to adjust light according to the light control signal, where adjusting light includes but is not limited to adjusting brightness of light, adjusting color temperature of light, and adjusting flickering mode of light.
When the intelligent control of the music mode is carried out on the lamp, firstly, connection is established between the lamp and a terminal device (hereinafter, a mobile phone is taken as an example), specifically, a user sets the lamp to be in a networking state, logs in a mobile phone client, namely, an App, searches the lamp by using the App through Bluetooth or a local wireless local area network, sends the network name and the password of a router to the lamp, the lamp is connected to the router at the moment, then is connected to a server through the router, the server notifies the App after connection is successful, the App binds the lamp to an account of the user, and then the user can remotely control the lamp by using the App through the server.
In addition, the lamp can be directly connected with the mobile phone through Bluetooth, or the lamp and the mobile phone are connected into the same local area network to be interconnected, so that information is not forwarded through a server.
After connection is completed, the lamp can receive lamp control signals sent by the intelligent lamp control device (namely the mobile phone APP), and the lamp light adjusting module in the lamp adjusts the lamp light according to the lamp control signals, so that the brightness, the color temperature, the flickering mode and the like of the lamp light are changed, and the effect that the lamp light changes along with the rhythm of the audio frequency is achieved.
The intelligent lamp has a music mode, so that the multifunction and playability of the intelligent lamp are improved, and the attraction of the intelligent lamp and an App to a user can be improved.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives can occur depending upon design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.