Color film key and control method, system, equipment and medium thereof
By detecting the current change rate of color film buttons and adjusting the lighting method according to the preset failure threshold, the problem of color film button failure during the brightness adjustment process is solved, and efficient and reliable adjustment effect is achieved.
Patent Information
- Application Number
- CN202311218653.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-20
- Publication Date
- 2025-03-21
AI Technical Summary
In the prior art, color film buttons fail due to instantaneous changes in current during the brightness adjustment process, which affects the user experience, and limiting the maximum current value leads to slow brightness adjustment and high cost.
By detecting the current change rate of color film buttons during lighting, adjusting the lighting method according to the current change rate and preset failure threshold, including adjusting the time interval and quantity, and using the PID algorithm for calculation.
It effectively overcomes the problem of color film button failure, realizes real-time monitoring and adaptive adjustment, ensures the accuracy and reliability of adjustment, and reduces costs.
Smart Images

Figure CN119675650A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of smart home appliances, and in particular to a color film keypad and a control method, system, device and medium thereof. Background Art
[0002] At present, color film keys have become a common input method. However, due to the large number of color film keys, when adjusting the brightness of these color film keys, some color film keys may fail due to instantaneous changes in current, thereby affecting the user experience.
[0003] At present, the technology to solve the problem of color film key failure includes limiting the maximum current value during the brightness adjustment process of the color film key, equipping each color film key with a fuse, etc. Limiting the maximum current value will lead to slower brightness adjustment and longer adjustment time; and in some application scenarios with a large number of color film keys or long lengths, it is costly to equip each color film key with a fuse. Summary of the invention
[0004] The technical problem to be solved by the present disclosure is to overcome the defects of the prior art in which the method of limiting the maximum current value used in the brightness adjustment process of the color film key has the disadvantages of slow adjustment and long adjustment time, and high cost for equipping each color film key with a fuse, and to provide a color film key and its control method, system, device and medium.
[0005] The present invention solves the above technical problems through the following technical solutions:
[0006] The present disclosure provides a control method for a color film key, the control method comprising:
[0007] In response to the switch signal, controlling the color film key to light up in a preset first mode;
[0008] Wherein, the first mode is to gradually light up the color film keys at a preset time interval and a preset number;
[0009] Obtaining a first current change rate of the color film key during the lighting process;
[0010] Based on the first current change rate and the preset failure threshold of the color film key, the lighting mode of the color film key is adjusted.
[0011] Preferably, the control method further includes:
[0012] Get the number of color film buttons;
[0013] The preset failure threshold is determined based on the number of the color film keys.
[0014] Preferably, the step of adjusting the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key comprises:
[0015] In the process of gradually lighting up the color film key, in response to the first current change rate being greater than the preset failure threshold, the color film key is controlled to light up in a second manner.
[0016] Preferably, the second method is to increase the preset time interval relative to the first method;
[0017] and / or,
[0018] The second method is to reduce the preset number relative to the first method.
[0019] Preferably, the second mode is calculated according to a PID algorithm (Proportion Integral Differential, a control algorithm) based on the first current change rate, the preset failure threshold and the first mode.
[0020] Preferably, after the step of adjusting the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key, the method further comprises:
[0021] Obtaining a second current change rate corresponding to the color film key after being adjusted by the lighting mode;
[0022] In response to the second current change rate being greater than the preset failure threshold, continuing to adjust the lighting mode.
[0023] The present disclosure also provides a control system for a color film key, the control system comprising:
[0024] A switch response module, used for controlling the color film key to light up in a preset first mode in response to a switch signal;
[0025] Wherein, the first mode is to gradually light up the color film keys at a preset time interval and a preset number;
[0026] A change rate acquisition module, used to acquire a first current change rate of the color film key during the lighting process;
[0027] The lighting mode adjustment module is used to adjust the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key.
[0028] Preferably, the control system further comprises:
[0029] A quantity acquisition module, used to acquire the quantity of the color film keys;
[0030] The failure threshold determination module is used to determine the preset failure threshold based on the number of the color film keys.
[0031] Preferably, the lighting mode adjustment module is further used for controlling the color film key to light up in a second mode in response to the first current change rate being greater than the preset failure threshold value during the process of gradually lighting up the color film key.
[0032] Preferably, the second method is to increase the preset time interval relative to the first method;
[0033] and / or,
[0034] The second method is to reduce the preset number relative to the first method.
[0035] Preferably, the second mode is calculated according to a PID algorithm based on the first current change rate, the preset failure threshold and the first mode.
[0036] Preferably, the change rate acquisition module is further used to acquire the second current change rate corresponding to the color film key after the lighting mode is adjusted;
[0037] The lighting mode adjustment module is further configured to continue adjusting the lighting mode in response to the second current change rate being greater than the preset failure threshold.
[0038] The present disclosure also provides a color film key, and the color film key includes the control system of the color film key as described above.
[0039] The present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and used to run on the processor, and when the processor executes the computer program, the control method of the color film key as described above is implemented.
[0040] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the control method of the color film key as described above is implemented.
[0041] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present disclosure.
[0042] The positive and progressive effects of this disclosure are:
[0043] The present invention detects the first current change rate of the color film key during the lighting process, and adjusts the lighting mode of the color film key according to the first current change rate and the preset failure threshold of the color film key, thereby ensuring the normal operation of the color film key and overcoming the failure problem of the color film key during the brightness adjustment process. Real-time monitoring and adaptive adjustment ensure the accuracy of the adjustment, improve the reliability of the color film key, can adapt to different usage scenarios, is easy to implement and promote, and reduces costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 This is a flow chart of a method for controlling a color film key according to Embodiment 1 of the present disclosure.
[0045] Figure 2 This is a flow chart of a method for controlling a color film key according to Embodiment 2 of the present disclosure.
[0046] Figure 3 This is a schematic diagram of the lighting sequence of the color film keys of Example 2 of the present disclosure.
[0047] Figure 4 This is a specific example diagram of the control method of the color film key of Example 2 of the present disclosure.
[0048] Figure 5 This is a module diagram of a control system for a color film key according to Embodiment 3 of the present disclosure.
[0049] Figure 6 This is a module diagram of a control system for a color film key according to Embodiment 4 of the present disclosure.
[0050] Figure 7 This is a schematic diagram of the structure of an electronic device according to Embodiment 5 of the present disclosure. DETAILED DESCRIPTION
[0051] The present disclosure is further described below by way of examples, but the present disclosure is not limited to the scope of the examples.
[0052] Example 1
[0053] This embodiment provides a method for controlling a color film key. Figure 1 As shown, the control method includes:
[0054] S101, in response to a switch signal, controlling the color film key to light up in a preset first mode;
[0055] The first method is to gradually light up the color film keys at a preset time interval and a preset number;
[0056] S102, obtaining a first current change rate of the color film key during the lighting process;
[0057] S103: Adjust the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key.
[0058] Specifically, each color film key includes a light and a touch sensing key. During the lighting process of the color film key, the greater the current, the brighter the light. During the lighting process of the color film key, hardware such as a sensor can be used to detect the current value of the color film key, and the detected current value is transmitted to the processor, and the rate of change of the current is calculated.
[0059] In the specific implementation process, the current value of the color film button at the previous moment is first recorded, and then the current value is obtained at the current moment, and it is subtracted from the current value at the previous moment to obtain the difference between the two. The quotient of the difference and the current value at the previous moment is the current change rate, that is: current change rate = (current value - current value at the previous moment) / current value at the previous moment * 100%.
[0060] In this embodiment, by detecting the first current change rate of the color film key during the lighting process, the lighting mode of the color film key is adjusted according to the first current change rate and the preset failure threshold of the color film key, thereby ensuring the normal operation of the color film key and overcoming the problem of failure of the color film key during the brightness adjustment process. Real-time monitoring and adaptive adjustment are performed to ensure the accuracy of the adjustment, improve the reliability of the color film key, adapt to different usage scenarios, be easy to implement and promote, and reduce costs.
[0061] Example 2
[0062] This embodiment provides a method for controlling a color film key, which is a further improvement on the first embodiment.
[0063] In one feasible solution, Figure 2 As shown, the control method also includes:
[0064] S104, obtaining the number of color film buttons;
[0065] S105: Determine a preset failure threshold based on the number of color film keys.
[0066] Specifically, steps S104 and S105 may be performed before step S103, or before step S101 or step S102.
[0067] The preset failure threshold is different for different numbers of color film keys, for example, the preset failure threshold for 10 color film keys is X1, and the preset failure threshold for 20 color film keys is X2. X1 and X2 are the current change rate values corresponding to the current change amplitude exceeding which the color film keys will fail according to their respective hardware tests, which can be 1%, 5%, etc.
[0068] In this solution, the preset failure threshold is determined according to the number of color film keys, which ensures the accuracy and reliability of the preset failure threshold and the accuracy and reliability of the adjustment of the color film key lighting mode.
[0069] In one feasible solution, step S103 includes:
[0070] S1031. In the process of gradually lighting up the color film key, in response to the first current change rate being greater than a preset failure threshold, controlling the color film key to light up in a second manner.
[0071] Specifically, during the process of the color film key gradually lighting up, if the first current change rate exceeds the preset failure threshold, it indicates that the color film key has a risk of failure, and the current needs to be adjusted by software control to avoid key failure.
[0072] There are many lighting sequences, which can be adjusted according to the layout of the color film buttons. You can start lighting from the upper left corner, such as Figure 3 As shown; it can also be gradually lit up from the middle, from outside to inside, from inside to outside, from top to bottom, etc.
[0073] The first preset method may be to gradually light up according to a preset number and a preset time interval, wherein the preset number may be the same for each step or may be different for each step; Figure 3 As shown, one light is lit in the first step, two lights are lit in the second step, three lights are lit in the third step, etc. That is, the preset number is a gradually increasing number; it can also be gradually lit according to a fixed number and a fixed time interval, for example, two lights are lit in each step, three lights are lit, etc. Similarly, the preset time interval can be the same time interval for each step, or it can be a time interval that gradually decreases for each step.
[0074] If the first current change rate is less than or equal to the preset failure threshold value during the gradual lighting of the color film key, the color film key continues to be controlled to light up in the first manner.
[0075] In this solution, during the process of the color film key gradually lighting up, when the first current change rate exceeds the preset failure threshold, it indicates that the color film key is at risk of failure. The color film key is promptly controlled to light up in the second way, thereby overcoming the problem of color film key failure and improving the reliability of the color film key.
[0076] In an implementable solution, the second method is to increase the preset time interval relative to the first method.
[0077] Specifically, if a time interval of 100 ms causes the first current change rate to exceed a preset failure threshold, then the time interval needs to be increased, for example, increased to 150 ms, that is, the lighting speed of the color film key is slowed down.
[0078] In this solution, the lighting mode of the color film key is adjusted by increasing the preset time interval of the first mode, thereby reducing the current variation amplitude during the lighting process of the color film key, overcoming the problem of color film key failure, and improving the reliability of the color film key.
[0079] In an implementable solution, the second method is to reduce the preset number relative to the first method.
[0080] Specifically, the larger the preset failure threshold, the greater the tolerance to current fluctuations. When the preset failure threshold is large, more color film keys can be lit up at the same time; when the preset failure threshold is small, the lighting speed should be slowed down to reduce the number of color film keys lit up at the same time.
[0081] The time interval and quantity can also be adjusted at the same time, and the brightness of several color film keys can be modified every several ms. That is, when the first current change rate exceeds the preset failure threshold, the number of color film keys lit at the same time is reduced while increasing the time interval of the color film keys being lit.
[0082] In this solution, the lighting mode of the color film key is adjusted by reducing the preset number of the first mode, thereby reducing the current variation amplitude during the lighting process of the color film key, overcoming the problem of color film key failure, and improving the reliability of the color film key.
[0083] In an implementable solution, the second method is calculated according to a PID algorithm based on the first current change rate, a preset failure threshold and the first method.
[0084] In this solution, according to the PID algorithm, the second mode is calculated based on the first current change rate, the preset failure threshold and the first mode, thereby ensuring the accuracy and reliability of the second mode.
[0085] In an implementable solution, after step S103, the method further includes:
[0086] S106, obtaining a second current change rate corresponding to the color film key after the lighting mode is adjusted;
[0087] S107 , in response to the second current change rate being greater than a preset failure threshold, continue adjusting the lighting mode.
[0088] Specifically, after each adjustment of the lighting mode of the color film button, it is necessary to monitor the current and record the current value. If the current has been maintained within a safe range, the adjustment is successful; if the current value is still monitored to exceed the preset failure threshold, it is necessary to change the parameters of the PID algorithm, that is, continue to adjust the lighting mode, and re-adjust the current control. For example, a time interval of 100ms will cause the second current change rate to exceed the preset failure threshold, and the time interval can be increased, such as to 200ms. This process can be repeated until the current stabilizes within a safe range. Continuing to adjust the lighting mode of the color film button can be to reduce the preset number on the basis of the second method, and / or increase the time interval; or other adjustment methods can be used to prevent the second current change rate from exceeding the preset failure threshold.
[0089] In this solution, when it is detected that the second current change rate corresponding to the color film key after the lighting mode is adjusted still exceeds the preset failure threshold, the lighting mode of the color film key continues to be adjusted, thereby ensuring the integrity and reliability of the adjustment of the lighting mode of the color film key.
[0090] The working principle of the control method of the color film key of this embodiment is described below with reference to specific examples:
[0091] like Figure 4 As shown, start lighting up the color film key, detect the current value of the color film key during the lighting process, calculate the first current change rate, and determine whether there is a risk of failure based on the relationship between the first current change rate and a preset failure threshold; if there is no risk of failure, return to the step of detecting the current value of the color film key during the lighting process; if there is a risk of failure, adjust the lighting mode of the color film key, adjust the brightness of the color film key, and then return to the step of detecting the current value of the color film key during the lighting process.
[0092] In this embodiment, by detecting the first current change rate of the color film key during the lighting process, the lighting mode of the color film key is adjusted according to the first current change rate and the preset failure threshold of the color film key, thereby ensuring the normal operation of the color film key and overcoming the problem of failure of the color film key during the brightness adjustment process. Real-time monitoring and adaptive adjustment are performed to ensure the accuracy of the adjustment, improve the reliability of the color film key, adapt to different usage scenarios, be easy to implement and promote, and reduce costs.
[0093] Example 3
[0094] This embodiment provides a control system for a color film keypad, such as Figure 5 As shown, the control system includes:
[0095] A switch response module 1, used for controlling the color film key to light up in a preset first mode in response to a switch signal;
[0096] The first method is to gradually light up the color film keys at a preset time interval and a preset number;
[0097] The change rate acquisition module 2 is used to obtain the first current change rate of the color film key during the lighting process;
[0098] The lighting mode adjustment module 3 is used to adjust the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key.
[0099] The working principle of this embodiment is the same as the working principle of the control method of the color film key corresponding to Embodiment 1, and will not be discussed here.
[0100] In this embodiment, by detecting the first current change rate of the color film key during the lighting process, the lighting mode of the color film key is adjusted according to the first current change rate and the preset failure threshold of the color film key, thereby ensuring the normal operation of the color film key and overcoming the problem of failure of the color film key during the brightness adjustment process. Real-time monitoring and adaptive adjustment are performed to ensure the accuracy of the adjustment, improve the reliability of the color film key, adapt to different usage scenarios, be easy to implement and promote, and reduce costs.
[0101] Example 4
[0102] This embodiment provides a control system for color film keys, which is a further improvement on the third embodiment.
[0103] In one feasible solution, Figure 6 As shown, the control system also includes:
[0104] The quantity acquisition module 4 is used to obtain the quantity of the color film buttons;
[0105] The failure threshold determination module 5 is used to determine a preset failure threshold based on the number of color film keys.
[0106] In an implementable solution, the lighting mode adjustment module 3 is further used to control the color film key to light up in a second mode in response to the first current change rate being greater than a preset failure threshold value during the gradual lighting of the color film key.
[0107] In an implementable solution, the second method is to increase the preset time interval relative to the first method;
[0108] In an implementable solution, the second method is to reduce the preset number relative to the first method.
[0109] In an implementable solution, the second method is calculated according to a PID algorithm based on the first current change rate, a preset failure threshold and the first method.
[0110] In an implementable solution, the change rate acquisition module 2 is further used to acquire the second current change rate corresponding to the adjusted color film key;
[0111] The lighting mode adjustment module 3 is further configured to continue adjusting the lighting mode in response to the second current change rate being greater than a preset failure threshold.
[0112] The working principle of this embodiment is the same as the working principle of the control method of the color film key corresponding to Embodiment 2, and will not be discussed here.
[0113] In this embodiment, by detecting the first current change rate of the color film key during the lighting process, the lighting mode of the color film key is adjusted according to the first current change rate and the preset failure threshold of the color film key, thereby ensuring the normal operation of the color film key and overcoming the problem of failure of the color film key during the brightness adjustment process. Real-time monitoring and adaptive adjustment are performed to ensure the accuracy of the adjustment, improve the reliability of the color film key, adapt to different usage scenarios, be easy to implement and promote, and reduce costs.
[0114] Example 5
[0115] This embodiment provides a color film key, which includes the control system of the color film key as described in Embodiment 3 or 4.
[0116] The color film key in the present embodiment is integrated with the above-mentioned control system, which specifically detects the first current change rate of the color film key during the lighting process, and adjusts the lighting mode of the color film key according to the first current change rate and the preset failure threshold of the color film key, thereby ensuring the normal operation of the color film key and overcoming the failure problem of the color film key during the brightness adjustment process. Real-time monitoring and adaptive adjustment ensure the accuracy of the adjustment, improve the reliability of the color film key, can adapt to different usage scenarios, is easy to implement and promote, and reduces costs.
[0117] Example 6
[0118] like Figure 7 FIG. 1 is a schematic diagram of the structure of an electronic device provided in Embodiment 6 of the present disclosure, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the control method of the color film key in the above embodiment is implemented. Figure 7 The electronic device 90 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0119] The electronic device 90 may be in the form of a general-purpose computing device, for example, it may be a server device. The components of the electronic device 90 may include, but are not limited to: at least one processor 91, at least one memory 92, and a bus 93 connecting different system components (including the memory 92 and the processor 91).
[0120] The bus 93 includes a data bus, an address bus, and a control bus.
[0121] The memory 92 may include a volatile memory, such as a random access memory (RAM) 921 and / or a cache memory 922 , and may further include a read-only memory (ROM) 923 .
[0122] The memory 92 may also include a program / utility 925 having a set (at least one) of program modules 924, such program modules 924 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include an implementation of a network environment.
[0123] The processor 91 executes various functional applications and data processing by running the computer program stored in the memory 92, such as the control method of the color film key in the above embodiment of the present disclosure.
[0124] The electronic device 90 may also communicate with one or more external devices 94 (e.g., keyboards, pointing devices, etc.). Such communication may be performed via an input / output (I / O) interface 95. Furthermore, the model-generated electronic device 90 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 96. As shown, the network adapter 96 communicates with other modules of the model-generated electronic device 90 via a bus 93. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the model-generated electronic device 90, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (disk array) systems, tape drives, and data backup storage systems, etc.
[0125] It should be noted that although several units / modules or sub-units / modules of the electronic device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more units / modules described above can be embodied in one unit / module. Conversely, the features and functions of one unit / module described above can be further divided into multiple units / modules to be embodied.
[0126] Example 7
[0127] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the control method of the color film key in the above embodiment is implemented.
[0128] The readable storage medium may include but is not limited to: a portable disk, a hard disk, a random access memory, a read-only memory, an erasable programmable read-only memory, an optical storage device, a magnetic storage device or any suitable combination of the above.
[0129] In a possible implementation manner, the present disclosure may also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the control method for the color film key in the above embodiment.
[0130] Among them, the program code for executing the present disclosure can be written in any combination of one or more programming languages, and the program code can be executed completely on the user device, partially on the user device, as a separate software package, partially on the user device and partially on a remote device, or completely on the remote device.
[0131] Although the specific embodiments of the present disclosure are described above, those skilled in the art should understand that this is only an example, and the protection scope of the present disclosure is defined by the appended claims. Those skilled in the art may make various changes or modifications to these embodiments without departing from the principles and essence of the present disclosure, but these changes and modifications all fall within the protection scope of the present disclosure.
Claims
1. A method for controlling a color film key, characterized in that: The control method comprises: In response to the switch signal, controlling the color film key to light up in a preset first mode; Wherein, the first mode is to gradually light up the color film keys at a preset time interval and a preset number; Obtaining a first current change rate of the color film key during the lighting process; Based on the first current change rate and the preset failure threshold of the color film key, the lighting mode of the color film key is adjusted.
2. The control method of the color film key as claimed in claim 1, characterized in that: The control method further comprises: Get the number of color film buttons; The preset failure threshold is determined based on the number of the color film keys.
3. The control method of the color film key as claimed in claim 1, characterized in that: The step of adjusting the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key comprises: In the process of gradually lighting up the color film key, in response to the first current change rate being greater than the preset failure threshold, the color film key is controlled to light up in a second manner.
4. The control method of the color film key as claimed in claim 3, characterized in that: The second method is to increase the preset time interval relative to the first method; and / or, The second method is to reduce the preset number relative to the first method.
5. The control method of the color film key as claimed in claim 3 or 4, characterized in that: The second mode is calculated according to a PID algorithm based on the first current change rate, the preset failure threshold and the first mode.
6. The control method of the color film keypad according to claim 1, characterized in that: After the step of adjusting the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key, the method further includes: Obtaining a second current change rate corresponding to the color film key after being adjusted by the lighting mode; In response to the second current change rate being greater than the preset failure threshold, continuing to adjust the lighting mode.
7. A control system for a color film key, characterized in that: The control system comprises: A switch response module, used for controlling the color film key to light up in a preset first mode in response to a switch signal; Wherein, the first mode is to gradually light up the color film keys at a preset time interval and a preset number; A change rate acquisition module, used to acquire a first current change rate of the color film key during the lighting process; The lighting mode adjustment module is used to adjust the lighting mode of the color film key based on the first current change rate and the preset failure threshold of the color film key.
8. A color film key, characterized in that: The color film key comprises the control system of the color film key as claimed in claim 7.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and used to run on the processor, characterized in that: When the processor executes the computer program, the method for controlling the color film key according to any one of claims 1 to 6 is implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the control method of the color film key as described in any one of claims 1 to 6 is implemented.