Tone processing method, device and equipment of illuminating lamp and storage medium
By acquiring music information from the intelligent lighting system, determining and dividing frequency bands, and generating target color tone control commands, the problem of insufficient synchronization between music and light in existing technologies is solved, achieving precise matching and low-latency synchronization between light and music.
Patent Information
- Application Number
- CN202511347761.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-19
- Publication Date
- 2025-11-14
AI Technical Summary
Existing intelligent lighting control technologies are less flexible and precise in terms of music and light synchronization, making it difficult to achieve a high degree of music and light synchronization.
By obtaining information about the music to be played, it is determined whether tone control logic exists in the database. If it does not exist, the music is divided into multiple frequency bands through segmentation, and tone control instructions are generated at the target music frame and sent to the lighting.
It achieves precise matching of lighting and music, improves user experience and system adaptability, reduces latency issues, and eliminates reliance on fixed preset modes.
Smart Images

Figure CN120957280A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of lighting technology, and in particular to a method, apparatus, device and storage medium for color processing of lighting lamps. Background Technology
[0002] With the continuous development of smart home and smart lighting technologies, lighting equipment is no longer limited to providing basic light source functions. More and more application scenarios are beginning to closely integrate lighting with entertainment, art, atmosphere and other factors. In this context, smart lighting is gradually evolving into a system that can adjust the color tone according to the environment, activities or user needs. Especially in applications combined with music, the synchronization of music and light has become an important direction for improving the user experience. By changing the color tone of the light, in conjunction with the playback of music with different rhythms and melodies, the entertainment atmosphere can be significantly enhanced and the visual and auditory sensory experience can be improved.
[0003] Current intelligent lighting control technologies mostly rely on simple preset modes or manually set color tone control. These methods can achieve simple synchronization with music to some extent, but their flexibility and precision are poor, making it difficult to achieve a high degree of music-light synchronization. Summary of the Invention
[0004] This application provides a method, apparatus, device, and storage medium for color processing of lighting fixtures, in order to solve the problems mentioned in the background art.
[0005] In a first aspect, this application provides a method for color tone processing of lighting fixtures, comprising: In response to a music playback command, the system obtains the music information of the music to be played and determines whether the color tone control logic corresponding to the music to be played exists in the database based on the music information. If it does not exist, the music to be played is segmented to obtain multiple music frequency bands corresponding to the music to be played. For each of the aforementioned music frequency bands, a target music frame corresponding to the generation time of the tone control instruction for that music frequency band is determined; the target music frame is played before the music frequency band. During the playback of the music to be played, when the target music frame is played, a target hue control command for the music frequency band corresponding to the target music frame is generated and the target hue control command is sent to the lighting lamp.
[0006] In one possible implementation, the step of determining whether the color tone control logic corresponding to the music to be played exists in the database based on the music information includes: A decryption password is generated based on the music information; The encrypted information in the database is decrypted based on the decryption password. If all encrypted information fails to be decrypted, it is determined that the color control logic corresponding to the music to be played does not exist in the database. If a certain encrypted message is successfully decrypted, it is confirmed that the color tone control logic corresponding to the music to be played exists in the database.
[0007] In one possible implementation, the music information includes the performance style and the music title, and the step of generating a decryption password based on the music information includes: Retrieve the image matrix corresponding to the performance method from the database; The music's creation time information is determined based on its title; the creation time information includes the year, month, and date. Add the numbers corresponding to the year to get the first value, add the numbers corresponding to the month to get the second value, and add the numbers corresponding to the date to get the third value; Add the first value to the second value to obtain the first target value, and add the first value to the third value to obtain the second target value; An initial image is determined in the image matrix; the value corresponding to the row of the initial image in the image matrix is the first target value, and the value corresponding to the column of the initial image is the second target value. For each initial pixel of the initial image, obtain the first color value corresponding to the red channel of the initial pixel, obtain the second color value corresponding to the blue channel of the initial pixel, and obtain the third color value corresponding to the green channel of the initial pixel; For each initial pixel of the initial image, a target pixel corresponding to the initial pixel is generated based on the first color value, the second color value, and the third color value corresponding to the initial pixel; wherein, the red channel of the target pixel corresponds to the second color value, the blue channel of the target pixel corresponds to the third color value, and the green channel of the target pixel corresponds to the first color value. The target pixels corresponding to each initial pixel constitute the target image, and the target image is the decryption password.
[0008] In one possible implementation, determining the target music frame corresponding to the generation time of the hue control instruction for the music frequency band includes: The target duration required to generate the tone control instruction is determined based on the duration corresponding to the music frequency band, and the number of music frames n corresponding to the target duration is determined. The target music frame is obtained by tracing back n+m music frames from the starting frame of the music frequency band; where m is the number of delay frames for the hue control command to be updated to the lighting.
[0009] In one possible implementation, the target hue control instruction for generating the music frequency band corresponding to the target music frame includes: The dominant hue of the music frequency band is determined based on the performance style of the music to be played; Loudness features are extracted from the music frequency band to obtain loudness change information corresponding to the music frequency band, and brightness change information corresponding to the music frequency band is generated based on the loudness change information. Emotional features are extracted from the music frequency band to obtain emotional state change information corresponding to the music frequency band, and initial hue change information corresponding to the music frequency band is generated based on the emotional state change information. The initial hue change information is optimized based on the primary hue to obtain intermediate hue change information; The brightness of the intermediate tone change information is adjusted based on the brightness change information to obtain the target tone control command.
[0010] In one possible implementation, the step of extracting loudness features from the music frequency band to obtain loudness change information corresponding to the music frequency band, and generating brightness change information corresponding to the music frequency band based on the loudness change information, includes: Loudness analysis is performed sequentially on each music frame of the music frequency band to obtain the loudness sequence corresponding to the music frequency band; the loudness sequence is the loudness change information. Based on a preset brightness matching algorithm, brightness values are matched sequentially to each loudness in the loudness sequence to obtain the brightness change information.
[0011] In one possible implementation, the step of extracting emotional features from the music frequency band to obtain emotional state change information corresponding to the music frequency band, and generating initial tone change information corresponding to the music frequency band based on the emotional state change information, includes: The music frequency band is played to a preset virtual robot, and the emotional state of the virtual robot is analyzed in real time based on a preset emotional state analysis algorithm during the playback of the music frequency band, so as to obtain the emotional state sequence corresponding to the music frequency band and the duration of each emotional state in the emotional state sequence. Based on the emotional state sequence and the duration corresponding to each emotional state in the emotional state sequence, the start music frame and end music frame corresponding to each emotional state in the music frequency band are determined, so as to divide the music frequency band into multiple music sub-frequency bands. For each of the aforementioned music sub-frequency bands, the initial hue corresponding to the music sub-frequency band is determined based on the emotional state corresponding to the music sub-frequency band, and the initial hue change information is obtained.
[0012] Secondly, this application provides a color processing device for a lighting lamp, comprising: The judgment module is used to respond to music playback commands, obtain music information of the music to be played, and determine whether the color control logic corresponding to the music to be played exists in the database based on the music information. The processing module is used to perform segmentation processing on the music to be played if there is no hue control logic corresponding to the music to be played, so as to obtain multiple music frequency bands corresponding to the music to be played. The determining module is used to determine, for each of the music frequency bands, the target music frame corresponding to the generation time of the tone control instruction for that music frequency band; the target music frame is played before the music frequency band. The generation module is used to generate a target hue control command for the music frequency band corresponding to the target music frame when the target music frame is played during the playback of the music to be played, and to send the target hue control command to the lighting lamp.
[0013] Thirdly, this application provides a terminal device, the terminal device including a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the color tone processing method for lighting as described in any of the preceding claims.
[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the hue processing method for lighting as described in any of the preceding claims.
[0015] This application provides a method, apparatus, device, and storage medium for color tone processing of lighting fixtures. The method includes: responding to a music playback command, acquiring music information of music to be played, and determining, based on the music information, whether color tone control logic corresponding to the music to be played exists in a database; if not, performing segmentation processing on the music to be played to obtain multiple music frequency bands corresponding to the music to be played; for each music frequency band, determining a target music frame corresponding to the generation time of the color tone control instruction for that music frequency band; the target music frame being played before the music frequency band; during the playback of the music to be played, when the target music frame is played, generating a target color tone control instruction for the music frequency band corresponding to the target music frame, and sending the target color tone control instruction to the lighting fixture. This method, on the one hand, pre-determines whether the database contains color control logic corresponding to the music to be played. If such logic exists, it can be directly used, reducing redundant calculations, improving system response efficiency, and avoiding latency issues caused by real-time analysis. On the other hand, it uses segmentation technology to divide the music into multiple frequency bands, enabling the lighting control to more precisely match the structural changes in the music, thereby enhancing the emotional fit between the lighting and the music and strengthening the user's immersive experience. Furthermore, by pre-determining the target music frames corresponding to each music frequency band and generating the target color control command for that music frequency band when the target music frame is played, and sending the target color control command to the lighting, it achieves accurate prediction and low-latency execution of lighting changes, effectively solving the problem of lighting lagging behind music playback in traditional solutions. In summary, this method, by dynamically generating color control commands that match the characteristics of the music, eliminates the dependence on fixed preset modes, allowing the lighting to adapt to different styles of music more flexibly and intelligently, significantly improving the system's adaptability and user experience. Attached Figure Description
[0016] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 A schematic flowchart illustrating the color tone processing method for a lighting lamp provided in an embodiment of this application; Figure 2 A schematic block diagram of the structure of the color processing device for a lighting lamp provided in an embodiment of this application; Figure 3 A schematic block diagram of the structure of a terminal device provided in an embodiment of this application. Detailed Implementation
[0018] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0019] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it require execution in the described order. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0020] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.
[0021] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the relevant listed items and all possible combinations, and includes such combinations.
[0022] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0023] Please see Figure 1 , Figure 1 This is a flowchart illustrating the color tone processing method for lighting provided in the embodiments of this application, as shown below. Figure 1 As shown, the lighting color processing method provided in this application embodiment includes steps S1 to S4.
[0024] Step S1: Respond to the music playback command, obtain the music information of the music to be played, and determine whether the color control logic corresponding to the music to be played exists in the database based on the music information.
[0025] Step S2: If it does not exist, perform segmentation processing on the music to be played to obtain multiple music frequency bands corresponding to the music to be played.
[0026] Step S3: For each music frequency band, determine the target music frame corresponding to the generation time of the tone control instruction of the music frequency band; the target music frame is played before the music frequency band.
[0027] Step S4: During the playback of the music to be played, when the target music frame is played, a target hue control command for the music frequency band corresponding to the target music frame is generated, and the target hue control command is sent to the lighting lamp.
[0028] It should be noted that the execution subject of this embodiment can be a server, or a color processing device for lighting lamps or a terminal device.
[0029] This embodiment specifically includes: As described in step S1 above, in response to a music playback command, music information of the music to be played is obtained, and the presence of tone control logic corresponding to the music to be played in the database is determined based on the music information. Specifically, step S1 includes: upon receiving a playback command for the music to be played, obtaining the music information of the music to be played; generating a decryption password based on the music information; decrypting each encrypted message in the database based on the decryption password; if decryption of each encrypted message fails, determining that tone control logic corresponding to the music to be played does not exist in the database; if decryption of a certain encrypted message is successful, determining that tone control logic corresponding to the music to be played exists in the database. It can be understood that the successfully decrypted encrypted message contains tone control logic corresponding to the music to be played.
[0030] As described in step S2 above, if there is no tone control logic corresponding to the music to be played, the music to be played is segmented to obtain multiple music frequency bands corresponding to the music to be played.
[0031] As described in step S3 above, for each music frequency band, a target music frame corresponding to the generation time of the tone control instruction for that music frequency band is determined; the target music frame is played before the music frequency band. Specifically, step S3 includes: for each music frequency band, determining the target duration required to generate the tone control instruction based on the duration corresponding to the music frequency band, and determining the number of music frames n corresponding to the target duration; tracing back n+m music frames from the starting frame of the music frequency band to obtain the target music frame; where m is the delay frame number for updating the tone control instruction to the lighting lamp.
[0032] As described in step S4 above, during the playback of the music to be played, when the target music frame is reached, a target hue control instruction for the music frequency band corresponding to the target music frame is generated, and the target hue control instruction is sent to the lighting. Specifically, step S4 includes: during the playback of the music to be played, when the target music frame is reached, determining the dominant hue of the music frequency band based on the performance style of the music to be played; extracting loudness features from the music frequency band corresponding to the target music frame to obtain loudness change information corresponding to the music frequency band, and generating brightness change information corresponding to the music frequency band based on the loudness change information; extracting emotional features from the music frequency band corresponding to the target music frame to obtain emotional state change information corresponding to the music frequency band, and generating initial hue change information corresponding to the music frequency band based on the emotional state change information; optimizing the initial hue change information based on the dominant hue to obtain intermediate hue change information; and adjusting the brightness of the intermediate hue change information based on the brightness change information to obtain the target hue control instruction.
[0033] The method provided in this embodiment, on the one hand, pre-determines whether there is a color control logic corresponding to the music to be played in the database. If such a logic exists, it can be directly used, reducing redundant calculations and improving system response efficiency. It also avoids latency issues caused by real-time analysis. On the other hand, it uses segmentation technology to divide the music into multiple frequency bands, enabling the lighting control to more precisely match the structural changes in the music, thereby improving the emotional fit between the lighting and the music and enhancing the user's immersive experience. Furthermore, by pre-determining the target music frames corresponding to each music frequency band and generating a target color control command for that music frequency band when the target music frame is played, and sending this command to the lighting, it achieves accurate prediction and low-latency execution of lighting changes, effectively solving the problem of lighting lagging behind music playback in traditional solutions. In summary, this method dynamically generates color control commands that match music characteristics, eliminating the dependence on fixed preset modes and enabling the lighting to adapt more flexibly and intelligently to different styles of music, significantly improving the system's adaptability and user experience.
[0034] In some embodiments, determining whether the color tone control logic corresponding to the music to be played exists in the database based on the music information includes the following steps: A decryption password is generated based on the music information; The encrypted information in the database is decrypted based on the decryption password. If all encrypted information fails to be decrypted, it is determined that the color control logic corresponding to the music to be played does not exist in the database. If a certain encrypted message is successfully decrypted, it is confirmed that the color tone control logic corresponding to the music to be played exists in the database.
[0035] The method provided in this embodiment generates a dynamic decryption password through music information and performs matching verification in conjunction with an encrypted database. This effectively ensures the security of the tone control logic, prevents unauthorized access or tampering, and enhances the system's data protection capabilities.
[0036] In some embodiments, the music information includes the performance style and music title, and the step of generating a decryption password based on the music information includes the following steps: Retrieve the image matrix corresponding to the performance method from the database; wherein, the performance method is any one of piano performance, prelude performance, symphony performance, etc. The music's creation time information is determined based on its title; the creation time information includes the year, month, and date. Add the numbers corresponding to the year to get the first value, add the numbers corresponding to the month to get the second value, and add the numbers corresponding to the date to get the third value; Add the first value to the second value to obtain the first target value, and add the first value to the third value to obtain the second target value; An initial image is determined in the image matrix; the value corresponding to the row of the initial image in the image matrix is the first target value, and the value corresponding to the column of the initial image is the second target value. For each initial pixel of the initial image, obtain the first color value corresponding to the red channel of the initial pixel, obtain the second color value corresponding to the blue channel of the initial pixel, and obtain the third color value corresponding to the green channel of the initial pixel; For each initial pixel of the initial image, a target pixel corresponding to the initial pixel is generated based on the first color value, the second color value, and the third color value corresponding to the initial pixel; wherein, the red channel of the target pixel corresponds to the second color value, the blue channel of the target pixel corresponds to the third color value, and the green channel of the target pixel corresponds to the first color value. The target pixels corresponding to each initial pixel constitute the target image, and the target image is the decryption password.
[0037] The method provided in this embodiment, on the one hand, constructs a multi-dimensional password generation mechanism by fusing the dual features of the image matrix corresponding to the performance mode and the music creation time information, thereby improving the complexity and anti-cracking capability of the encryption system and effectively preventing data leakage. On the other hand, by generating the target pixel corresponding to each initial pixel of the initial image based on the first color value, second color value and third color value corresponding to the initial pixel to generate the decryption password, it not only increases the unpredictability of the decryption password, but also maintains the verifiability of the decryption password, achieving a balance between security and operability.
[0038] In some embodiments, determining the target music frame corresponding to the generation time of the hue control instruction for the music frequency band includes the following steps: The target duration required to generate the tone control instruction is determined based on the duration corresponding to the music frequency band, and the number of music frames n corresponding to the target duration is determined; specifically, the target duration is calculated based on the functional relationship between the preset music frequency band duration and the calculation duration. It can be understood that the number of music frames n refers to the number of music frames that can be played within the target duration. The target music frame is obtained by tracing back n+m music frames from the starting frame of the music frequency band; where m is the number of delay frames for the hue control command to be updated to the lighting lamp; specifically, the frame sequence corresponding to the target music frame in the music to be played is obtained by subtracting n+m from the frame sequence corresponding to the starting frame of the music frequency band in the music to be played.
[0039] The method provided in this embodiment, on the one hand, determines the target duration required to generate the hue control instruction based on the duration corresponding to the music frequency band, and determines the number of music frames n corresponding to the target duration, so that the system can adapt to music segments with different rhythmic characteristics and ensure the timeliness of the light control instruction generation. On the other hand, by introducing a hue control instruction update delay frame number m, the problem of light lag caused by system delay in traditional solutions is effectively solved. Furthermore, by adopting a positioning method that traces back n+m frames from the starting frame, it ensures that the control instruction has sufficient time to complete the calculation and that the instruction can take effect on time before the music frequency band begins.
[0040] In some embodiments, generating the target hue control instruction for the music frequency band corresponding to the target music frame includes the following steps: The dominant hue of the music frequency band is determined based on the performance style of the music to be played; Loudness features are extracted from the music frequency band to obtain loudness change information corresponding to the music frequency band, and brightness change information corresponding to the music frequency band is generated based on the loudness change information. Emotional features are extracted from the music frequency band to obtain emotional state change information corresponding to the music frequency band, and initial hue change information corresponding to the music frequency band is generated based on the emotional state change information. The initial hue change information is optimized based on the primary hue to obtain intermediate hue change information; specifically, the primary hue is sequentially merged with each initial hue in the initial hue change information to obtain the intermediate hue change information. The brightness of the intermediate tone change information is adjusted based on the brightness change information to obtain the target tone control command.
[0041] The method provided in this embodiment, on the one hand, determines the main color tone of the music frequency band based on the performance method, ensuring the matching of the lighting color tone style with the characteristics of the instrument. On the other hand, by extracting the loudness features of the music frequency band, the loudness change information corresponding to the music frequency band is obtained, and the brightness change information corresponding to the music frequency band is generated based on the loudness change information, so that the changes in light brightness and the fluctuations in music intensity form a perfect mapping, realizing the synchronization of the physical dimension of "volume-brightness". Furthermore, by extracting the emotional features of the music frequency band, the emotional state change information corresponding to the music frequency band is obtained, and the initial color tone change information corresponding to the music frequency band is generated based on the emotional state change information, so that the lighting color tone can accurately express the emotional changes in the music, realizing the synchronization of the psychological dimension of "emotion-color tone". Finally, through the dual processing of main color tone optimization and brightness adjustment, the style consistency of lighting changes is maintained, and the natural transition of visual effects is ensured, which helps to improve the user experience.
[0042] In some embodiments, the step of extracting loudness features from the music frequency band to obtain loudness change information corresponding to the music frequency band, and generating brightness change information corresponding to the music frequency band based on the loudness change information, includes the following steps: Loudness analysis is performed sequentially on each music frame of the music frequency band to obtain the loudness sequence corresponding to the music frequency band; the loudness sequence is the loudness change information. Based on a preset brightness matching algorithm, brightness values are matched sequentially to each loudness in the loudness sequence to obtain the brightness change information.
[0043] The method provided in this embodiment constructs high-precision loudness change information by analyzing the loudness of each music frame in the music frequency band, which can completely capture the details of the intensity fluctuations in the music and provide an accurate data basis for brightness control.
[0044] In some embodiments, the step of extracting emotional features from the music frequency band to obtain emotional state change information corresponding to the music frequency band, and generating initial hue change information corresponding to the music frequency band based on the emotional state change information, includes the following steps: The music frequency band is played to a preset virtual robot, and the emotional state of the virtual robot is analyzed in real time based on a preset emotional state analysis algorithm during the playback of the music frequency band, so as to obtain the emotional state sequence corresponding to the music frequency band and the duration of each emotional state in the emotional state sequence. Based on the emotional state sequence and the duration corresponding to each emotional state in the emotional state sequence, the start music frame and end music frame corresponding to each emotional state in the music frequency band are determined, so as to divide the music frequency band into multiple music sub-frequency bands. For each of the aforementioned music sub-frequency bands, the initial hue corresponding to the music sub-frequency band is determined based on the emotional state corresponding to the music sub-frequency band, and the initial hue change information is obtained.
[0045] The method provided in this embodiment, on the one hand, transforms the emotional characteristics of music into a quantifiable emotional state sequence by playing music to a preset virtual robot and analyzing its emotional state in real time, thus breaking through the limitations of traditional audio feature analysis and enabling more accurate capture of the complex emotional changes contained in the music. On the other hand, it divides the music into sub-frequency bands based on the emotional state sequence and its duration, so that each music sub-frequency band has a clear emotional attribute, providing a precise emotional segmentation basis for subsequent tone matching. Furthermore, it intelligently matches the corresponding initial tone for music sub-frequency bands with different emotional states, realizing a precise mapping of "emotion-tone", so that changes in lighting can intuitively convey the emotional connotation of the music.
[0046] Please see Figure 2 , Figure 2 A schematic block diagram of the structure of the lighting tone processing device 100 provided in the embodiments of this application is shown below. Figure 2 As shown, the lighting tone processing device 100 provided in this application embodiment includes: The judgment module 110 is used to respond to music playback instructions, obtain music information of the music to be played, and determine whether the color control logic corresponding to the music to be played exists in the database based on the music information.
[0047] The processing module 120 is used to perform segmentation processing on the music to be played if there is no hue control logic corresponding to the music to be played, so as to obtain multiple music frequency bands corresponding to the music to be played.
[0048] The determining module 130 is used to determine the target music frame corresponding to the generation time of the tone control instruction of each music frequency band; the target music frame is played before the music frequency band.
[0049] The generation module 140 is used to generate a target hue control instruction for the music frequency band corresponding to the target music frame when the target music frame is played during the playback of the music to be played, and send the target hue control instruction to the lighting lamp.
[0050] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the system and each module described above can be referred to the process in the aforementioned embodiment of the lighting color processing method, and will not be repeated here.
[0051] The color tone processing device 100 for lighting provided in the above embodiments can be implemented as a computer program, which can, for example, Figure 3 The terminal device 200 shown is running on it.
[0052] Please see Figure 3 , Figure 3 The following is a schematic block diagram of the structure of a terminal device 200 provided in an embodiment of this application. The terminal device 200 includes a processor 201 and a memory 202, which are connected through a system bus 203. The memory 202 may include a non-volatile storage medium and internal memory.
[0053] The non-volatile storage medium can store a computer program. The computer program includes program instructions that, when executed by the processor 201, cause the processor 201 to perform any of the above-described lighting tone processing methods.
[0054] The processor 201 provides computing and control capabilities to support the operation of the entire terminal device 200.
[0055] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor 201, the processor 201 can perform any of the above-mentioned lighting color processing methods.
[0056] Those skilled in the art will understand that Figure 3 The structure shown in the figure is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the terminal device 200 involved in the present application. The specific terminal device 200 may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0057] It should be understood that processor 201 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, the general-purpose processor can be a microprocessor or any conventional processor.
[0058] In some embodiments, the processor 201 is configured to run a computer program stored in memory to perform the following steps: In response to a music playback command, the system obtains the music information of the music to be played and determines whether the color tone control logic corresponding to the music to be played exists in the database based on the music information. If it does not exist, the music to be played is segmented to obtain multiple music frequency bands corresponding to the music to be played. For each of the aforementioned music frequency bands, a target music frame corresponding to the generation time of the tone control instruction for that music frequency band is determined; the target music frame is played before the music frequency band. During the playback of the music to be played, when the target music frame is played, a target hue control command for the music frequency band corresponding to the target music frame is generated and the target hue control command is sent to the lighting lamp.
[0059] It should be noted that those skilled in the art will understand that, for the sake of convenience and brevity, the specific working process of the terminal device 200 described above can be referred to the corresponding process of the aforementioned color tone processing method for lighting lamps, and will not be repeated here.
[0060] This application also provides a computer-readable storage medium storing a computer program that, when executed by one or more processors, causes the one or more processors to implement the lighting tone processing method provided in this application.
[0061] The computer-readable storage medium can be an internal storage unit of the terminal device 200 in the aforementioned embodiments, such as a hard disk or memory of the terminal device 200. The computer-readable storage medium can also be an external storage device of the terminal device 200, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided with the terminal device 200.
[0062] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for color tone processing of lighting fixtures, characterized in that, include: In response to a music playback command, the system obtains the music information of the music to be played and determines whether the color tone control logic corresponding to the music to be played exists in the database based on the music information. If it does not exist, the music to be played is segmented to obtain multiple music frequency bands corresponding to the music to be played. For each of the aforementioned music frequency bands, determine the target music frame corresponding to the generation time of the tone control instruction for that music frequency band; The target music frame is played before the music frequency band; During the playback of the music to be played, when the target music frame is played, a target hue control command for the music frequency band corresponding to the target music frame is generated and the target hue control command is sent to the lighting lamp.
2. The color tone processing method for lighting lamps according to claim 1, characterized in that, The logic for determining whether the color tone control corresponding to the music to be played exists in the database based on the music information includes: A decryption password is generated based on the music information; The encrypted information in the database is decrypted based on the decryption password. If all encrypted information fails to be decrypted, it is determined that the color control logic corresponding to the music to be played does not exist in the database. If a certain encrypted information is successfully decrypted, it is confirmed that the color tone control logic corresponding to the music to be played exists in the database.
3. The color tone processing method for lighting lamps according to claim 2, characterized in that, The music information includes the performance style and music title, and the generation of the decryption password based on the music information includes: Retrieve the image matrix corresponding to the performance method from the database; The music's creation time information is determined based on its title; the creation time information includes the year, month, and date. Add the numbers corresponding to the year to get the first value, add the numbers corresponding to the month to get the second value, and add the numbers corresponding to the date to get the third value; Add the first value to the second value to obtain the first target value, and add the first value to the third value to obtain the second target value; An initial image is determined in the image matrix; the value corresponding to the row of the initial image in the image matrix is the first target value, and the value corresponding to the column of the initial image is the second target value. For each initial pixel of the initial image, obtain the first color value corresponding to the red channel of the initial pixel, obtain the second color value corresponding to the blue channel of the initial pixel, and obtain the third color value corresponding to the green channel of the initial pixel; For each initial pixel of the initial image, a target pixel corresponding to the initial pixel is generated based on the first color value, the second color value, and the third color value corresponding to the initial pixel; wherein, the red channel of the target pixel corresponds to the second color value, the blue channel of the target pixel corresponds to the third color value, and the green channel of the target pixel corresponds to the first color value. The target pixels corresponding to each initial pixel constitute the target image, and the target image is the decryption password.
4. The color tone processing method for lighting lamps according to claim 1, characterized in that, The determination of the target music frame corresponding to the generation time of the hue control instruction for the music frequency band includes: The target duration required to generate the tone control instruction is determined based on the duration corresponding to the music frequency band, and the number of music frames n corresponding to the target duration is determined. The target music frame is obtained by tracing back n+m music frames from the starting frame of the music frequency band; where m is the number of delay frames for the hue control command to be updated to the lighting.
5. The color tone processing method for lighting lamps according to claim 1, characterized in that, The target hue control instruction for generating the music frequency band corresponding to the target music frame includes: The dominant hue of the music frequency band is determined based on the performance style of the music to be played; Loudness features are extracted from the music frequency band to obtain loudness change information corresponding to the music frequency band, and brightness change information corresponding to the music frequency band is generated based on the loudness change information. Emotional features are extracted from the music frequency band to obtain emotional state change information corresponding to the music frequency band, and initial hue change information corresponding to the music frequency band is generated based on the emotional state change information. The initial hue change information is optimized based on the primary hue to obtain intermediate hue change information; The brightness of the intermediate tone change information is adjusted based on the brightness change information to obtain the target tone control command.
6. The color tone processing method for lighting lamps according to claim 5, characterized in that, The step of extracting loudness features from the music frequency band to obtain loudness change information corresponding to the music frequency band, and generating brightness change information corresponding to the music frequency band based on the loudness change information, includes: Loudness analysis is performed sequentially on each music frame of the music frequency band to obtain the loudness sequence corresponding to the music frequency band; the loudness sequence is the loudness change information. Based on a preset brightness matching algorithm, brightness values are matched sequentially to each loudness in the loudness sequence to obtain the brightness change information.
7. The color tone processing method for lighting lamps according to claim 5, characterized in that, The step of extracting emotional features from the music frequency band to obtain emotional state change information corresponding to the music frequency band, and generating initial tone change information corresponding to the music frequency band based on the emotional state change information, includes: The music frequency band is played to a preset virtual robot, and the emotional state of the virtual robot is analyzed in real time based on a preset emotional state analysis algorithm during the playback of the music frequency band, so as to obtain the emotional state sequence corresponding to the music frequency band and the duration of each emotional state in the emotional state sequence. Based on the emotional state sequence and the duration corresponding to each emotional state in the emotional state sequence, the start music frame and end music frame corresponding to each emotional state in the music frequency band are determined, so as to divide the music frequency band into multiple music sub-frequency bands. For each of the aforementioned music sub-frequency bands, the initial hue corresponding to the music sub-frequency band is determined based on the emotional state corresponding to the music sub-frequency band, and the initial hue change information is obtained.
8. A color tone processing device for a lighting lamp, characterized in that, include: The judgment module is used to respond to music playback commands, obtain music information of the music to be played, and determine whether the color control logic corresponding to the music to be played exists in the database based on the music information. The processing module is used to perform segmentation processing on the music to be played if there is no hue control logic corresponding to the music to be played, so as to obtain multiple music frequency bands corresponding to the music to be played. The determining module is used to determine the target music frame corresponding to the generation time of the tone control instruction of each music frequency band. The target music frame is played before the music frequency band; The generation module is used to generate a target hue control command for the music frequency band corresponding to the target music frame when the target music frame is played during the playback process, and send the target hue control command to the lighting lamp.
9. A terminal device, characterized in that, The terminal device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the color processing method for the lighting lamp as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, it implements the hue processing method for a lighting lamp as described in any one of claims 1 to 7.