Disclosure of Invention
The first purpose of the invention is to provide an air conditioner lamp control method capable of controlling air conditioner light according to indoor environment factors.
The second purpose of the invention is to provide a computer device which can control the lighting of the air conditioner according to the indoor environment factors.
It is a third object of the present invention to provide a computer-readable storage medium for controlling lighting of an air conditioner according to indoor environmental factors.
In order to achieve the first object, the present invention provides an air conditioner lamp control method comprising: acquiring the current working state of the air conditioner; when the current working state is the preset working state, the current environment control instruction corresponding to the preset working state is obtained, air conditioner light control parameters are generated according to the current environment control instruction, the air conditioner light control parameters are controlled, and the air conditioner light control parameters at least comprise one of color control parameters, brightness control parameters and rhythm control parameters.
According to the scheme, when the air conditioner enters the preset working state, the air conditioner lamp control method obtains the corresponding current environment control instruction and generates the air conditioner light control parameters, so that the air conditioner lamp can adjust the air conditioner light according to indoor environment factors, and the user experience degree is improved.
In a further scheme, generating air conditioner light control parameters according to the current environment control instruction, and controlling the air conditioner light comprises the following steps: the current environment control instruction is a voice control instruction; and generating air conditioner light control parameters according to the voice control instruction.
Therefore, the current environment control instruction can be a voice control instruction, and the user can conveniently control the air conditioner lamp by acquiring the voice control instruction of the user.
In a further scheme, generating air conditioner light control parameters according to the current environment control instruction, and controlling the air conditioner light comprises the following steps: the current environment control instruction is an environment light control instruction; and generating air conditioner light control parameters according to the ambient light control command.
Therefore, the current environment control instruction can be an environment light control instruction, and the air conditioner can be regulated and controlled in real time according to the light of the environment where the air conditioner is located, so that the air conditioner lamp is correspondingly matched with the environment light, and the comfort level of a user is improved.
In a further scheme, the step of generating the air conditioner light control parameter according to the ambient light control command comprises the following steps: and controlling the brightness of the air conditioner lamp according to the ambient illumination intensity.
Therefore, the air conditioner light control parameters are generated according to the ambient light control command, and the brightness of the air conditioner lamp can be adjusted according to the brightness of the environment, so that the brightness of the air conditioner lamp is adaptive to the brightness of the light of the current environment.
In a further scheme, the step of generating the air conditioner light control parameter according to the ambient light control command comprises the following steps: and controlling the color of the air conditioner lamp according to the ambient illumination color control brightness.
Therefore, the air conditioner light control parameters are generated according to the ambient light control command, and the air conditioner light can be adjusted according to the illumination color of the environment, so that the color of the air conditioner light is adaptive to the illumination color of the current environment.
In a further scheme, generating air conditioner light control parameters according to the current environment control instruction, and controlling the air conditioner light comprises the following steps: the current environment control instruction is a music control instruction; and generating air conditioner light control parameters according to the music control instruction.
Therefore, the current environment control instruction can be a music control instruction, and the air conditioner can be regulated and controlled in real time according to the music control instruction, so that the air conditioner lamp is matched with music, and the experience degree of a user is improved.
In a further scheme, the step of generating the air conditioner light control parameter according to the music control instruction comprises the following steps: and generating air conditioner light control parameters according to the music data currently played by the air conditioner.
In a further scheme, the step of generating the air conditioner light control parameter according to the music control instruction comprises the following steps: and generating air conditioner light control parameters according to the music data acquired by the audio input module.
Therefore, the music control instruction can be music data played by the air conditioner at present and can also be music data collected by the audio input module, and the user experience is improved.
In order to achieve the second object of the present invention, the present invention provides a computer device comprising a processor and a memory, wherein the memory stores a computer program, and the computer program is executed by the processor to implement the steps of the air conditioner control method.
In order to achieve the third object of the present invention, the present invention provides a computer readable storage medium having a computer program stored thereon, the computer program, when executed by a controller, implementing the steps of the air conditioner lamp control method described above.
Detailed Description
The air conditioner lamp control method is an application program applied to an air conditioner indoor unit and used for controlling air conditioner light according to indoor environmental factors. As shown in fig. 1, the air-conditioning indoor unit includes a main control circuit 1, an air-conditioning lamp 2, an audio input module 3, an illumination detection unit 4, and a speaker 5, the air-conditioning lamp 2, the audio input module 3, the illumination detection unit 4, and the speaker 5 are all electrically connected to the main control circuit 1, and the air-conditioning lamp 2, the audio input module 3, the illumination detection unit 4, and the speaker 5 all employ known circuit modules, which are not described herein again. Preferably, the air conditioner lamp 2 can change color, brightness and/or rhythm according to the air conditioner light control parameters of the main control circuit 1, the audio input module 3 can acquire the audio signal of the external environment, the illumination detection unit 4 can acquire the illumination intensity and the illumination tone of the external environment, and the speaker 5 can play music.
The invention also provides a computer device which comprises a controller, wherein the controller is used for realizing the steps of the air conditioner lamp control method when executing the computer program stored in the memory. The present invention also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a controller, implements the steps of the air conditioner lamp control method described above.
The embodiment of the air conditioner lamp control method comprises the following steps:
the air conditioner lamp control method is an application program applied to an air conditioner indoor unit and is used for controlling air conditioner light according to indoor environmental factors.
As shown in fig. 2, when the air conditioner light control method of the present invention is in operation, step S1 is first executed to obtain the current operating state of the air conditioner. When the air conditioner works, corresponding operation parameter data can be produced, and the current working state of the air conditioner can be obtained by reading the operation parameter data.
After the current operating state of the air conditioner is obtained, step S2 is executed to determine whether the current operating state is the preset operating state. The working states of the air conditioner lamps are different when the air conditioner is in different working states, for example, the air conditioner lamps are controlled in a breathing lamp mode when the air conditioner is in a standby state; when the air conditioner runs, the air conditioner lamp is controlled in a horse race lamp mode. Moreover, not all operating states of the air conditioner need to be controlled according to environmental factors, and therefore, before controlling the air conditioner, it is necessary to determine whether the air conditioner is in a preset operating state.
And if the current working state is judged not to be the preset working state, continuously acquiring the current working state of the air conditioner for judgment. If the current working state is the preset working state, executing step S3, obtaining a current environment control instruction corresponding to the preset working state, generating an air conditioner light control parameter according to the current environment control instruction, and controlling the air conditioner light, wherein the air conditioner light control parameter at least includes one of a color control parameter, a brightness control parameter, and a rhythm control parameter. The air conditioner lamp adjusts color, brightness, display rhythm and the like according to the generated control parameters. The current environment control instruction refers to a control instruction generated by obtaining environmental factors where the air conditioner is located. The air conditioner can control the air conditioner lamp in different instructions under different working states, for example, when the air conditioner is in a sleep mode, a user is in a sleep state, and the instruction for controlling the air conditioner lamp can be obtained by detecting indoor light intensity or by a voice recognition mode; when the air conditioner plays music, the instruction for controlling the air conditioner lamp can be obtained through the rhythm of the music.
In this embodiment, generate air conditioner light control parameter according to current environmental control instruction, the step of controlling the air conditioner lamp includes: the current environment control instruction is a voice control instruction; and generating air conditioner light control parameters according to the voice control instruction. When acquiring the voice control instruction, the voice information may be acquired through the audio input module 3, and the control instruction of the voice information is recognized through the voice recognition function, for example, the control instruction includes: turning on light, lightening a point, brightness of 100, blue light, purple light and the like. This is well known to those skilled in the art and will not be described further herein. After the voice control instruction is obtained, air conditioner light control parameters are generated according to the recognized voice control instruction, and the on-off, color, brightness and the like of the light are controlled, for example, the on-off control parameters, the color RGB parameters, the brightness parameters and the like of the air conditioner light are generated. And the air conditioner controls the air conditioner lamp according to the air conditioner light control parameter.
Generating air conditioner light control parameters according to the current environment control instruction, and controlling the air conditioner light, wherein the step of controlling the air conditioner light further comprises the following steps: the current environment control instruction is an environment light control instruction; and generating air conditioner light control parameters according to the ambient light control command. When the ambient light control command is obtained, the ambient light control command can be generated by obtaining the light of the external environment through the light detection unit 4. In this embodiment, the step of generating the air conditioner lighting control parameter according to the ambient light control command includes: controlling the brightness of the air conditioner lamp according to the ambient illumination intensity; and controlling the color of the air conditioner lamp according to the ambient illumination color control brightness. The brightness of the air conditioner lamp can be adjusted according to the brightness of the environment, so that the brightness of the air conditioner lamp is adaptive to the light brightness of the current environment, the light of the air conditioner lamp can be adjusted according to the illumination color of the environment, and the color of the air conditioner lamp is adaptive to the illumination color of the current environment. For example, when the detected light brightness is 100, the brightness parameter of the air conditioner light is set to be 100, and when the ambient light intensity gradually becomes bright, the brightness parameter of the air conditioner light also gradually changes, so that the air conditioner light synchronously becomes bright; when the ambient light color changes, the air conditioner automatically adjusts the color of the air conditioner light according to the detected light color, for example, if the ambient light is a warm color, the color RGB parameter with the color RGB parameter being the warm color is generated, the air conditioner light is controlled to be the warm color, and if the ambient light is white light or sunlight, the color RGB parameter with the color RGB parameter being white light or sunlight is generated, and the air conditioner light is controlled to be white light or sunlight.
Generating air conditioner light control parameters according to the current environment control instruction, and controlling the air conditioner light, wherein the step of controlling the air conditioner light further comprises the following steps: the current environment control instruction is a music control instruction; and generating air conditioner light control parameters according to the music control instruction. In this embodiment, the step of generating the air conditioner light control parameter according to the music control instruction includes: generating an air conditioner light control parameter according to the music data currently played by the air conditioner; or generating air conditioner light control parameters according to the music data collected by the audio input module. The music control instruction can be music data played by the air conditioner at present or music data collected by the audio input module. The generation of the control signal by the music data is well known to those skilled in the art and will not be described herein. In this embodiment, air conditioner light control parameters such as corresponding light brightness and color change frequency are generated through the music data, so that the air conditioner light is matched with the music, for example, the light brightness and the color change frequency are controlled according to the rhythm or the frequency of the music data.
Of course, the air conditioner light control parameters are generated according to the current environment control instruction, and when the air conditioner light is controlled, various environment control instructions can be obtained to be controlled in a combined mode. For example, when the current environment control instruction is the environment light control instruction, the air conditioner light control parameter is generated according to the environment light control instruction to control the air conditioner light, and at this time, the voice control instruction is acquired, and a new air conditioner light control parameter can be generated on the basis of the air conditioner light control parameter generated by the environment light control instruction. In addition, air conditioner light control parameters are generated according to the current environment control instruction, and when the air conditioner light is controlled, the priority levels of various environment control instructions can be set, for example, the priority level of a voice control instruction is the largest, the priority level of a music control instruction is the next highest, and the priority level of an environment light control instruction is the lowest.
The embodiment of the computer device comprises:
the computer device of the embodiment comprises a controller, and the steps of the air conditioner lamp control method embodiment are realized when the controller executes a computer program.
For example, a computer program may be partitioned into one or more modules, which are stored in a memory and executed by a controller to implement the present invention. One or more of the modules may be a sequence of computer program instruction segments for describing the execution of a computer program in a computer device that is capable of performing certain functions.
The computer device may include, but is not limited to, a controller, a memory. Those skilled in the art will appreciate that the computer apparatus may include more or fewer components, or combine certain components, or different components, e.g., the computer apparatus may also include input-output devices, network access devices, buses, etc.
For example, the controller may be a Central Processing Unit (CPU), other general purpose controller, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic, discrete hardware components, and so on. The general controller may be a microcontroller or the controller may be any conventional controller or the like. The controller is the control center of the computer device and connects the various parts of the entire computer device using various interfaces and lines.
The memory may be used to store computer programs and/or modules, and the controller may implement various functions of the computer apparatus by executing or otherwise executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. For example, the memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (e.g., a sound receiving function, a sound-to-text function, etc.), and the like; the storage data area may store data (e.g., audio data, text data, etc.) created according to the use of the cellular phone, etc. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a flash memory Card (FlashCard), at least one magnetic disk storage device, a flash memory device, or other volatile solid state storage device.
Computer-readable storage medium embodiments:
the modules integrated by the computer apparatus of the above embodiments, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable storage medium. Based on such understanding, all or part of the flow of the air conditioner light control method embodiment may also be implemented by instructing related hardware through a computer program, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a controller, the steps of the air conditioner light control method embodiment may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The storage medium may include: any entity or device capable of carrying computer program code, recording medium, U-disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), random-access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution media, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, in accordance with legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunications signals.
According to the air conditioner lamp control method, when the air conditioner enters the preset working state, the corresponding current environment control instruction is obtained, and the air conditioner light control parameter is generated, so that the air conditioner lamp can adjust the air conditioner light according to indoor environment factors, and the user experience degree is improved.
It should be noted that the above is only a preferred embodiment of the present invention, but the design concept of the present invention is not limited thereto, and any insubstantial modifications made by using the design concept also fall within the protection scope of the present invention.