CN-122028266-A - Dynamic control method and system for luminous effect of key cap
Abstract
The invention relates to the technical field of computer peripherals and discloses a key cap luminous effect dynamic control method and a key cap luminous effect dynamic control system, wherein the method comprises the steps of maintaining the current output state of a first luminous effect mode when a switching instruction is received, and extracting the last frame output data of the first luminous effect mode at the switching moment; according to the physical attenuation characteristic of the light-emitting unit in the key cap, calculating a simulated afterglow energy curve based on the output data of the last frame, superposing the afterglow energy curve with the initial output sequence of the second light-emitting effect mode frame by frame to obtain a target transition output sequence, and driving the light-emitting unit to display according to the target transition output sequence so as to enable the physical light-emitting intensity of the light-emitting unit in the switching process to be matched with a synthetic energy target corresponding to the target transition output sequence. The invention generates the compensation curve through simulating the physical attenuation of the light-emitting unit and superimposes the compensation curve with the new light effect sequence, thereby realizing smooth visual transition of mode switching.
Inventors
- HU SHIJIN
- WU MIN
Assignees
- 广东欧希德精密智造科技有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20260416
Claims (10)
- 1. A dynamic control method for the luminous effect of a keycap is characterized by comprising the following steps: When an instruction for switching from a preset first luminous effect mode to a preset second luminous effect mode is received, maintaining the current output state of the first luminous effect mode, and extracting the last frame output data of the first luminous effect mode at the switching moment; Calculating an analog afterglow energy curve based on the last frame of output data according to the physical attenuation characteristic of a preset light-emitting unit in the key cap, and taking the afterglow energy curve as compensation information, wherein the physical attenuation characteristic comprises response delay of the light-emitting unit and brightness residual after last output; The compensation information and an initial output sequence of the second luminous effect mode are overlapped frame by frame to obtain a target transition output sequence, wherein the initial output sequence refers to a set of at least one frame of output data which is generated according to preset luminous effect logic and starts from an initial moment after the second luminous effect mode is activated; and driving the light-emitting unit to display according to the target transition output sequence, so that the physical light-emitting intensity of the light-emitting unit in the switching process is matched with the synthetic energy target corresponding to the target transition output sequence.
- 2. The method according to claim 1, wherein before the step of calculating the simulated afterglow energy curve based on the last frame output data according to the physical attenuation characteristics of the preset light emitting units in the key cap, the method further comprises: monitoring the average output load of the light-emitting unit in a preset time in real time; Determining a thermal state affecting parameter of the light emitting unit according to the average output load; And dynamically correcting the physical attenuation characteristic based on the thermal state influence parameter.
- 3. The method according to claim 1, wherein the step of calculating a simulated afterglow energy curve based on the last frame output data according to the physical attenuation characteristics of the preset light emitting units in the key cap, and using the afterglow energy curve as compensation information comprises: Acquiring physical attenuation characteristics of the light-emitting unit, wherein the physical attenuation characteristics are used for representing the brightness attenuation rate of the light-emitting unit after power failure or duty cycle adjustment; according to the output data of the last frame and the physical attenuation characteristics, constructing an energy attenuation function which shows an attenuation trend along with the time; And performing discretization sampling on the energy attenuation function according to the refresh frequency of the second luminous effect mode to obtain the afterglow energy curve formed by the compensation values of a plurality of continuous frames, and taking the afterglow energy curve as compensation information.
- 4. A key cap lighting effect dynamic control method according to claim 3, wherein the last frame of output data comprises pulse width modulation PWM duty cycle data of the first lighting effect mode output to the lighting unit at a switching time; The energy attenuation function is an exponential attenuation function with the last frame output data as an initial value, time as an independent variable and the physical attenuation characteristic as a base.
- 5. The method for dynamically controlling the lighting effect of a key cap according to claim 1, wherein the step of superimposing the compensation information and the initial output sequence of the second lighting effect mode frame by frame to obtain the target transitional output sequence comprises: algebraic addition is carried out on the compensation value of the nth frame in the compensation information and the original output value of the nth frame in the initial output sequence to obtain a synthesized intermediate value of the nth frame, wherein n is an integer greater than or equal to 1; Judging whether the synthesized intermediate value exceeds a preset hardware output extremum or not; If the synthesized intermediate value does not exceed the hardware output extremum, determining the synthesized intermediate value as an output value of an nth frame in the target transition output sequence; And if the synthesized intermediate value exceeds the hardware output extremum, determining the hardware output extremum as an output value of an nth frame in the target transition output sequence.
- 6. The method for dynamically controlling the lighting effect of a key cap according to claim 1, further comprising: Monitoring whether a key trigger signal generated by key interaction exists in real time in an output period of the target transition output sequence; if the key trigger signal is monitored, acquiring the trigger intensity and the key feedback sequence corresponding to the key trigger signal; And setting the output priority of the key feedback sequence as a first priority, and setting the output priority of the compensation information and the initial output sequence of the second luminous effect mode as a second priority lower than the first priority.
- 7. The method for dynamically controlling the lighting effect of a keycap according to claim 6, wherein the step of superimposing the compensation information and the initial output sequence of the second lighting effect mode frame by frame to obtain the target transitional output sequence comprises: determining an energy extrusion coefficient according to the trigger intensity; performing equal-proportion compression on the compensation information and the initial output sequence by using the energy extrusion coefficient, and then performing frame-by-frame superposition synthesis to obtain a background energy sequence; And carrying out weighted fusion on the background energy sequence and the key feedback sequence to obtain the target transition output sequence, so that the physical position corresponding to the key trigger signal has a preset brightness expression space in the target transition output sequence.
- 8. The method for dynamically controlling the lighting effect of a key cap according to claim 1, wherein the step of driving the lighting unit to display according to the target transitional output sequence comprises: Converting the target transition output sequence into a corresponding driving signal, and sending the driving signal to a keyboard control circuit according to a preset frame rate so as to drive the light-emitting unit; acquiring actual luminous intensity feedback data of the luminous unit in a driving process; Real-time comparing the actual luminous intensity feedback data with a synthetic energy target corresponding to the target transition output sequence; and shielding a deviation correcting instruction or a degradation instruction of the linear consistency checking mechanism to the light-emitting unit when the deviation value of the actual light-emitting intensity feedback data and the synthesized energy target is within a preset consistency tolerance range.
- 9. The method for dynamically controlling the lighting effect of a keycap according to claim 8, wherein the step of masking the deviation correcting instruction or the degradation instruction of the lighting unit by the online consistency check mechanism is further performed by: Accumulating deviation trends of the actual luminous intensity feedback data and the synthesized energy target in a plurality of output periods; Judging whether the deviation trend accords with a preset hardware aging characteristic model or not; And if the hardware aging characteristic model is met, performing incremental compensation on the physical attenuation characteristic according to the reverse variation of the deviation trend so as to realize the self-adaptive updating of the physical attenuation characteristic of the light-emitting unit.
- 10. A key cap lighting effect dynamic control system for performing the method of any one of claims 1 to 9, comprising: the latch intercepting module is used for maintaining the current output state of the first luminous effect mode and extracting the last frame output data of the first luminous effect mode at the switching moment when receiving an instruction for switching from the first luminous effect mode to the second luminous effect mode; The sequence generation module is used for calculating a simulated afterglow energy curve based on the last frame of output data according to the physical attenuation characteristic of a preset light-emitting unit in the key cap, and taking the afterglow energy curve as compensation information, wherein the physical attenuation characteristic comprises response delay of the light-emitting unit and brightness residues after last output; the superposition synthesis module is used for superposing the compensation information and the initial output sequence of the second luminous effect mode frame by frame to obtain a target transition output sequence, wherein the initial output sequence refers to a set of at least one frame of output data which is generated according to preset luminous effect logic and starts from an initial moment after the second luminous effect mode is activated; and the display driving module is used for driving the light-emitting unit to display according to the target transition output sequence so that the physical light-emitting intensity of the light-emitting unit in the switching process is matched with the synthesized energy target corresponding to the target transition output sequence.
Description
Dynamic control method and system for luminous effect of key cap Technical Field The invention relates to the technical field of computer peripherals, in particular to a key cap luminous effect dynamic control method and a system. Background In the use scenario of personal computer peripherals, keyboards with dynamic lighting function have become mainstream. The user desires to be able to freely switch between a plurality of lighting effect modes according to different application scenes or personal preference, and requires a smooth and continuous process of light and shadow variation. For example, the user switches the keyboard from a highlighted "breathing" mode to a "static dim" mode for night office work after ending the game. However, existing control methods typically employ a hard logic to immediately terminate the instruction output of the previous lighting effect and to execute a new lighting effect from zero when handling such a switch. The processing mode completely ignores the physical characteristics of the light emitting unit, such as the LED lamp beads. The luminance of the light-emitting unit does not return to zero instantaneously after power failure, but rather there is a short, physical decay of the luminance, i.e. a visual "afterglow". In the prior art, the method of directly cutting off and starting the new mode causes the initial brightness of the new mode and the physical afterglow of the old mode to generate conflict and fault visually, so that a user can perceive an obvious brightness jump or flicker, and the immersion and continuity of the light effect experience are destroyed. Disclosure of Invention In order to solve the defects of the prior art, the invention discloses a key cap luminous effect dynamic control method and a key cap luminous effect dynamic control system, and aims to solve the technical problem that in the prior art, the luminous effect is discontinuous and visual jump occurs due to switching of a luminous effect mode. The technical scheme of the invention is as follows: in a first aspect, the invention discloses a key cap luminous effect dynamic control method, which comprises the following steps: when an instruction for switching from a preset first luminous effect mode to a preset second luminous effect mode is received, maintaining the current output state of the first luminous effect mode, and extracting the last frame output data of the first luminous effect mode at the switching moment; Calculating an analog afterglow energy curve based on the output data of the last frame according to the physical attenuation characteristic of a preset light-emitting unit in the key cap, and taking the afterglow energy curve as compensation information, wherein the physical attenuation characteristic comprises response delay of the light-emitting unit and brightness residual after last output; the compensation information and an initial output sequence of the second luminous effect mode are overlapped frame by frame to obtain a target transition output sequence, wherein the initial output sequence refers to a set of at least one frame of output data which is generated according to preset luminous effect logic of the second luminous effect mode after the second luminous effect mode is activated and starts from an initial moment; And driving the light-emitting unit to display according to the target transition output sequence, so that the physical light-emitting intensity of the light-emitting unit in the switching process is matched with the synthetic energy target corresponding to the target transition output sequence. According to the technical scheme, when the luminous effect is switched, the final state of the old effect is captured, the physical attenuation process is simulated, and the attenuation process is fused with the initial state of the new effect, so that a smooth transition stage is created. The method effectively fills the visual gap between the two effects, eliminates the abrupt change of brightness or color caused by direct switching, ensures that the whole light effect change process is visually natural and continuous, and greatly improves the user experience. Further, before the step of calculating the simulated afterglow energy curve based on the last frame output data according to the physical attenuation characteristics of the preset light emitting units in the key cap, the method further comprises: Monitoring the average output load of the light-emitting unit in a preset time in real time; Determining a thermal state influence parameter of the light emitting unit according to the average output load; the physical attenuation characteristic is dynamically modified based on the thermal state affecting parameter. Further, the step of calculating the simulated afterglow energy curve based on the last frame output data according to the physical attenuation characteristic of the preset light emitting unit in the key cap, and taking the afterglow energy cur