Keyboard light display method and device
By loading or importing dynamic models and using ray intersections to obtain color information, the existing keyboard light display problem is solved, and diversified and cool lighting dynamic effects are achieved.
Patent Information
- Application Number
- CN202510305147.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-06-27
AI Technical Summary
The existing keyboard lighting display method has fixed and single effects, which cannot meet the diverse visual needs of users.
By obtaining keyboard equal-scale models and user instructions, loading or importing preset or user-defined dynamic models, determining the light color of each key in three-dimensional space, and using ray intersections to obtain color information.
It realizes the dynamic effects of keyboard lighting display and can be personalized according to user's instructions and dynamic models.
Smart Images

Figure CN120224525A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and particularly to a keyboard lighting display method and device. Background Art
[0002] A keyboard is a common computer input device that allows users to input data and instructions into a computer by pressing keys. A standard keyboard usually includes: an alphanumeric keypad, a function key area, a control key area, an arrow key area, and a numeric keypad area; in addition, with the development of technology, there are now various types of keyboards, such as wireless keyboards, mechanical keyboards, membrane keyboards, etc. There are many keyboard designs on the market that aim to enhance the user experience and visual effects, providing keyboards with backlighting or RGB lighting effects. In the existing keyboard lighting display method, light beads are arranged at the bottom of the keyboard, and the chip stores a preset fixed flashing algorithm. The chip controls the light beads to flash to achieve the flashing of the keyboard lighting. However, the above method also has the following technical problems: the achieved keyboard lighting effects are relatively fixed and single, and cannot meet the visual requirements of users. Summary of the Invention
[0003] In view of the above technical problems, the technical solution adopted by the present invention is as follows:
[0004] A keyboard lighting display method, the method comprising the following steps:
[0005] S100, obtaining a keyboard isometric model and constructing a keyboard plane based on the keyboard isometric model, the keyboard isometric model including at least one model corresponding to a keyboard;
[0006] S200, obtaining a user instruction, the user instruction being a music rhythm mode instruction or a user-defined imported dynamic model instruction;
[0007] S300, when the user instruction is a music rhythm mode instruction, loading a preset dynamic model on a dynamic effect plane in a three-dimensional space;
[0008] When the user instruction is a user-defined imported dynamic model instruction, importing a dynamic model uploaded by the user on a dynamic effect plane in a three-dimensional space; wherein, the dynamic effect plane is parallel to the keyboard plane;
[0009] S400, determining the lighting color of each key of the keyboard according to the dynamic model displayed on the dynamic effect plane;
[0010] Among them, a ray is emitted from the center point position of each key on the keyboard in the keyboard plane, intersects with the dynamic effect plane, and the color at the first intersection point that intersects with the preset dynamic model or the dynamic model uploaded by the user is selected as the lighting color of the keyboard. If there is no intersection point with the preset dynamic model and the dynamic model uploaded by the user, the keyboard lighting is displayed as off. The ray is perpendicular to the keyboard plane.
[0011] The present invention also provides a keyboard lighting display device, and the device includes:
[0012] A keyboard plane acquisition module, configured to acquire a keyboard proportional model and construct a keyboard plane based on the keyboard proportional model, where the keyboard proportional model includes at least a model corresponding to one keyboard;
[0013] A user instruction acquisition module, configured to acquire a user instruction, where the user instruction is a music rhythm mode instruction or a user-defined imported dynamic model instruction;
[0014] A dynamic model acquisition module, configured to load a preset dynamic model on the dynamic effect plane in the three-dimensional space when the user instruction is a music rhythm mode instruction; when the user instruction is a user-defined imported dynamic model instruction, import the dynamic model uploaded by the user on the dynamic effect plane in the three-dimensional space; wherein, the dynamic effect plane is parallel to the keyboard plane;
[0015] A lighting color acquisition module, configured to determine the lighting color of each key of the keyboard according to the dynamic model displayed on the dynamic effect plane; among them, a ray is emitted from the center point position of each key on the keyboard in the keyboard plane, intersects with the dynamic effect plane, and the color at the first intersection point of the intersection is selected as the lighting color of the keyboard. If there is no intersection point, the keyboard lighting is displayed as off. The ray is perpendicular to the keyboard plane.
[0016] The present invention has at least the following beneficial effects:
[0017] In summary, acquire a keyboard proportional model and construct a keyboard plane based on the keyboard proportional model, acquire a user instruction. When the user instruction is a music rhythm mode instruction, load a preset dynamic model on the dynamic effect plane in the three-dimensional space; when the user instruction is a user-defined imported dynamic model instruction, import the dynamic model uploaded by the user on the dynamic effect plane in the three-dimensional space; determine the lighting color of each key of the keyboard according to the dynamic model displayed on the dynamic effect plane. A ray is emitted from the center point position of each key on the keyboard in the keyboard plane, intersects with the dynamic effect plane, and the color at the first intersection point of the intersection is selected as the lighting color of the keyboard. If there is no intersection point, the keyboard lighting is displayed as off. The present invention obtains the lighting color corresponding to the keyboard by means of a ray, and calculates the lighting color of the keyboard by means of computer graphics, so that the dynamic effect of the keyboard lighting is more, and the effect is more cool. Brief Description of the Drawings
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0019] Figure 1 It is a flowchart of a keyboard lighting display method provided in Embodiment 1 of the present invention;
[0020] Figure 2 It is a schematic structural diagram of a keyboard lighting display device provided in Embodiment 2 of the present invention. Detailed Embodiments
[0021] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the drawings in the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, rather than all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts fall within the protection scope of the present invention.
[0022] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar tasks, and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments of the present invention described here can be implemented in an order other than those illustrated or described here. In addition, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units does not necessarily have to be limited to those clearly listed steps or units, but may include other steps or units not clearly listed or inherent to these processes, methods, products, or devices.
[0023] Embodiment 1 of the present invention provides a keyboard lighting display method, as Figure 1 shown, the method includes the following steps:
[0024] S100, obtain a keyboard proportional model and construct a keyboard plane based on the keyboard proportional model, where the keyboard proportional model includes at least one model corresponding to a keyboard.
[0025] Specifically, obtain a plurality of target information of each key of the keyboard, and construct a keyboard proportional model based on the target information, where the target information includes at least size, position, and color.
[0026] Further, obtain the overall dimension information, key layout information, and key dimension information of the keyboard, and construct a proportional model of the keyboard based on the size, position, and color of each key of the keyboard, as well as the overall dimension information, key layout information, and key dimension information of the keyboard. The overall dimension information includes the length and width of the entire keyboard, and the key dimension information includes the shape, length, and width of the key.
[0027] Further, when the proportional model of the keyboard includes models corresponding to more than one keyboard, the user customizes the placement shape of the keyboard on the keyboard plane.
[0028] In another embodiment of the present invention, splicing is performed based on the overall dimension information of the keyboard. For example, the keyboard is spliced into a rectangle or a square in a preset manner to form a target overall keyboard, and the plane where the target overall keyboard is located is used as the keyboard plane.
[0029] S200, obtain a user instruction, where the user instruction is a music rhythm mode instruction or a user-defined imported dynamic model instruction.
[0030] S300, when the user instruction is a music rhythm mode instruction, load a preset dynamic model on the dynamic effect plane in three-dimensional space; when the user instruction is a user-defined imported dynamic model instruction, import the dynamic model uploaded by the user on the dynamic effect plane in three-dimensional space; wherein, the dynamic effect plane is parallel to the keyboard plane.
[0031] S400, determine the lighting color of each key of the keyboard according to the dynamic model displayed on the dynamic effect plane.
[0032] Among them, a ray is emitted from the center point position of each key of the keyboard in the keyboard plane, intersects with the dynamic effect plane, and the color at the first intersection point intersecting with the preset dynamic model or the dynamic model uploaded by the user is selected as the lighting color of the keyboard. If there is no intersection point with the preset dynamic model and the dynamic model uploaded by the user, the keyboard lighting is displayed as off, and the ray is perpendicular to the keyboard plane.
[0033] Specifically, it can be understood that when the user instruction is a music rhythm mode instruction, the color at the first intersection point intersecting with the preset dynamic model is selected as the lighting color of the keyboard; if there is no intersection point with the preset dynamic model, the keyboard lighting is displayed as off; when the user instruction is a user-defined imported dynamic model instruction, the color at the first intersection point intersecting with the dynamic model uploaded by the user is selected as the lighting color of the keyboard. If there is no intersection point with the dynamic model uploaded by the user, the keyboard lighting is displayed as off.
[0034] In summary, obtain a keyboard isometric model and construct a keyboard plane based on the keyboard isometric model, obtain a user instruction, when the user instruction is a music rhythm mode instruction, load a preset dynamic model on the dynamic effect plane in the three-dimensional space; when the user instruction is a user-defined import dynamic model instruction, import the dynamic model uploaded by the user on the dynamic effect plane in the three-dimensional space; determine the lighting color of each key of the keyboard according to the dynamic model displayed on the dynamic effect plane. A ray is emitted from the center point position of each key of the keyboard in the keyboard plane, intersects with the dynamic effect plane, and the color at the first intersection point is selected as the lighting color of the keyboard. If there is no intersection point, the keyboard light is displayed as off. The present invention obtains the corresponding lighting color of the keyboard by means of a ray, and calculates the lighting color of the keyboard through computer graphics, so that the dynamic effect of the keyboard lighting is more, and the effect is more cool.
[0035] Further, in S400, it further includes: obtaining the operation instruction of the user and adjusting the dynamic model on the dynamic effect plane through the operation instruction, and determining the lighting color of each key of the keyboard according to the adjusted dynamic model.
[0036] Specifically, the operation instruction includes: a zoom instruction and a move instruction.
[0037] Further, the user operation instruction further includes: a rotation operation instruction.
[0038] It can be understood that when the dynamic model rotates, zooms or moves, the first intersection point of the ray and the target pattern may not be the same each time, and the lighting color of the corresponding key of the keyboard will also change, making the lighting color of the key more cool.
[0039] Specifically, those skilled in the art know that any method of scaling, translating, and rotating a target pattern in three-dimensional space in the prior art belongs to the protection scope of the present invention. For example, the method of selecting and dragging by the user using a mouse, and for example, the method of translating and rotating by inputting text through the interface.
[0040] Specifically, in S300, it further includes: obtaining the audio played by the user, dynamically displaying a preset pattern style specified by the user based on the audio played by the user, and obtaining the dynamic model of the preset pattern style. Specifically, obtain the key points based on the audio played by the user to dynamically display the target pattern, and the key points include drum beats. The dynamic display includes: scaling according to a preset ratio. For example, the preset pattern style is a triangle, a square, etc., and the present invention does not limit this.
[0041] Further, the key points further include the stress points. Those skilled in the art know that any method of identifying key points in the prior art belongs to the protection scope of the present invention, and will not be elaborated here.
[0042] The dynamic display further includes: rotating at a preset angle, translating at a preset distance, etc.
[0043] Specifically, those skilled in the art know that one key point can correspond to multiple dynamic displays.
[0044] For example, obtain drum beats through the user's audio, and add corresponding dynamic effects of scaling at a preset ratio, and / or rotating at a preset angle, and / or translating at a preset distance at the drum beats, so that during use, when the drum beats of the user's audio are recognized, the corresponding dynamic effects are played. Thus, based on music rhythm, including music rhythm / intensity / spectrum analysis and other methods, the music is visually presented on the keyboard.
[0045] In an embodiment of the present invention, the user instruction further includes: a pattern selection instruction from the user pattern library.
[0046] Specifically, when the user instruction is a pattern selection instruction from the user pattern library, the following steps are implemented:
[0047] Obtain a pattern library, where the pattern library contains several initial pattern combinations and display information corresponding to the initial pattern combinations. The display information includes the length, width, position, scaling ratio, display order, and display duration of each initial pattern; the initial pattern combination includes at least one initial pattern, and the initial pattern is a 2D pattern or a 3D pattern.
[0048] In an embodiment of the present invention, the initial pattern combination and the display information corresponding to the initial pattern combination are uploaded by historical users. Specifically, it can be understood that the user customizes a 2D pattern or a 3D pattern as the initial pattern, and the historical user can customize one or more initial patterns as an initial pattern combination, upload it to the pattern library, and use it to increase the diversity of the initial pattern combination.
[0049] Furthermore, the display information further includes the rotation direction and rotation speed of each initial pattern.
[0050] Based on the user instruction, obtain a target pattern combination in the pattern library. The target pattern combination is an initial pattern combination in the pattern library; the target pattern combination includes at least one target pattern.
[0051] Specifically, obtaining the target pattern combination based on the pattern library can be understood as selecting an initial pattern combination from the pattern library as the target pattern combination; optionally, the selection method is random selection, and preferably, the selection method is to obtain the user's selection instruction.
[0052] Determine the lighting color of each key on the keyboard based on the target pattern combination and the display information corresponding to the target pattern combination; it can be understood that based on the target pattern combination, according to information such as the display order, display duration, scaling ratio, position, length, and width of the target pattern, the target pattern is sequentially displayed.
[0053] Among them, determining the lighting color of each key on the keyboard based on the target pattern combination and the display information corresponding to the target pattern combination further includes:
[0054] When the target pattern is a 2D pattern, construct a target pattern plane, vertically map the target pattern on the target pattern plane to the keyboard plane, and obtain the RGB value corresponding to each key on the keyboard plane where the target pattern is mapped, as the lighting color of the corresponding key on the keyboard. The target pattern plane is parallel to the keyboard plane. It can be understood that the target pattern plane is parallel to the keyboard plane, vertically map the target pattern on the target pattern plane to the keyboard plane, and obtain the RGB value corresponding to each key on the keyboard plane. That is, if the origin positions of the target pattern plane and the keyboard plane correspond, construct the coordinate systems of the target pattern plane and the keyboard plane, and the directions of the X-axis, Y-axis, and Z-axis of the two coordinate systems are the same. Then, use the RGB value of the point on the target pattern plane with the same coordinate point as the key as the lighting color of the key.
[0055] Specifically, obtaining the RGB value corresponding to each key on the keyboard plane as the lighting color of the corresponding key on the keyboard further includes:
[0056] Obtain the RGB value corresponding to the center point of each key on the keyboard plane as the lighting color of the corresponding key on the keyboard.
[0057] In another embodiment of the present invention, obtain the RGB values of all points of a key on the keyboard plane, and based on the RGB values of all points, obtain an RGB value as the lighting color of the keyboard; specifically, calculate the average value of the values of the RGB values of all points on the R, G, and B channels respectively to obtain an RGB value.
[0058] When the target pattern is a 3D pattern, emit a ray vertically from the center point of each key in the keyboard plane, and obtain the RGB value of the first intersection point of the ray and the target pattern as the lighting color of the corresponding key on the keyboard. Specifically, the 3D pattern can be drawn by the user through 3D software, such as 3ds Max, blender software, etc. Support users to customize 3D patterns, giving users greater freedom.
[0059] Embodiment 2 of the present invention provides a keyboard lighting display device, as Figure 2 shown, the device includes:
[0060] The keyboard plane acquisition module 10 is used to acquire an isometric model of the keyboard and construct a keyboard plane based on the isometric model of the keyboard. The isometric model of the keyboard includes at least one model corresponding to a keyboard.
[0061] The user instruction acquisition module 20 is used to acquire user instructions, and the user instructions are music rhythm mode instructions or user-defined imported dynamic model instructions.
[0062] The dynamic model acquisition module 30 is used to load a preset dynamic model on the dynamic effect plane in the three-dimensional space when the user instruction is a music rhythm mode instruction; when the user instruction is a user-defined imported dynamic model instruction, import the dynamic model uploaded by the user on the dynamic effect plane in the three-dimensional space; wherein, the dynamic effect plane is parallel to the keyboard plane.
[0063] The lighting color acquisition module 40 is used to determine the lighting color of each key of the keyboard according to the dynamic model displayed on the dynamic effect plane; wherein, a ray is emitted from the center point position of each key of the keyboard in the keyboard plane, intersects with the dynamic effect plane, and the color at the first intersection point intersecting with the preset dynamic model or the dynamic model uploaded by the user is selected as the lighting color of the keyboard. If there is no intersection point with the preset dynamic model and the dynamic model uploaded by the user, the keyboard lighting is displayed as off, and the ray is perpendicular to the keyboard plane.
[0064] Specifically, the device further includes: a dynamic adjustment module, which is used to acquire the operation instruction of the user and adjust the dynamic model on the dynamic effect plane through the operation instruction, and determine the lighting color of each key of the keyboard according to the adjusted dynamic model. Specifically, the operation instruction includes: a zoom instruction and a move instruction. Further, the user operation instruction further includes: a rotation operation instruction.
[0065] Among them, the keyboard plane acquisition module further includes: the device further includes: a customization module, which is used to customize the placement shape of the keyboard on the keyboard plane when the isometric model of the keyboard includes more than one model corresponding to a keyboard.
[0066] Specifically, the device further includes: an audio module, which is used to acquire the audio played by the user, dynamically display a preset pattern style based on the audio played by the user, and acquire the dynamic model of the preset pattern style. Specifically, the key points further include the stress points. Those skilled in the art know that any method of identifying key points in the prior art belongs to the protection scope of the present invention and will not be elaborated here.
[0067] The preset processing further includes: rotating at a preset angle, translating at a preset distance, etc.
[0068] Specifically, those skilled in the art know that one key point can correspond to multiple preset processes.
[0069] Specifically, the device further includes:
[0070] A pattern library acquisition module, configured to acquire a pattern library, where the pattern library contains a number of initial pattern combinations and display information corresponding to the initial pattern combinations. The display information includes the length, width, position, scaling ratio, display order, and display duration of each initial pattern; the initial pattern combination includes at least one initial pattern, and the initial pattern is a 2D pattern or a 3D pattern.
[0071] A target pattern combination acquisition module, configured to acquire a target pattern combination from the pattern library, where the target pattern combination is an initial pattern combination in the pattern library; the target pattern combination includes at least one target pattern.
[0072] A display acquisition module, configured to determine the lighting color of each key on the keyboard based on the target pattern combination and the display information corresponding to the target pattern combination.
[0073] Wherein, the display acquisition module includes:
[0074] A 2D pattern sub-module, configured to, when the target pattern is a 2D pattern, construct a target pattern plane, vertically map the target pattern on the target pattern plane to the keyboard plane, and acquire the RGB value corresponding to each key on the keyboard plane where the target pattern is mapped as the lighting color of the corresponding key on the keyboard. The target pattern plane is parallel to the keyboard plane.
[0075] A 3D pattern sub-module, configured to, when the target pattern is a 3D pattern, emit a ray vertically from the center point of each key on the keyboard plane, and acquire the RGB value of the first intersection point of the ray and the target pattern as the lighting color of the corresponding key on the keyboard.
[0076] Although some specific embodiments of the present invention have been described in detail by way of examples, those skilled in the art should understand that the above examples are only for the purpose of illustration and not for the purpose of limiting the scope of the present invention. Those skilled in the art should also understand that various modifications can be made to the embodiments without departing from the scope and spirit of the present invention.
Claims
1. A keyboard light display method, characterized in that: The method comprises the following steps: S100, obtaining a keyboard proportional model and constructing a keyboard plane based on the keyboard proportional model, wherein the keyboard proportional model includes at least one model corresponding to the keyboard; S200, obtaining a user instruction, wherein the user instruction is a music rhythm mode instruction or a user-defined dynamic model import instruction; S300, when the user instruction is a music rhythm mode instruction, loading a preset dynamic model in a dynamic effect plane in the three-dimensional space; When the user instruction is a user-defined instruction for importing a dynamic model, the dynamic model uploaded by the user is imported into the dynamic effect plane of the three-dimensional space; wherein the dynamic effect plane is parallel to the keyboard plane; S400, determining the light color of each key of the keyboard according to the dynamic model displayed by the dynamic effect plane; Among them, a ray is emitted from the center point of each key of the keyboard in the keyboard plane, intersecting with the dynamic effect plane, and the color of the first intersection with the preset dynamic model or the dynamic model uploaded by the user is selected as the keyboard light color. If there is no intersection with the preset dynamic model and the dynamic model uploaded by the user, the keyboard light is displayed as off, and the ray is perpendicular to the keyboard plane.
2. The keyboard light display method according to claim 1, characterized in that: S400 also includes: obtaining an operation instruction from a user and adjusting the dynamic model of the dynamic effect plane according to the operation instruction, and determining the light color of each key of the keyboard according to the adjusted dynamic model.
3. The keyboard light display method according to claim 2, characterized in that: The operation instructions include: zoom instructions and move instructions.
4. The keyboard light display method according to claim 1, characterized in that: S300 also includes: acquiring audio played by a user, dynamically displaying a preset pattern style based on the audio played by the user, and acquiring a dynamic model of the preset pattern style.
5. The keyboard light display method according to claim 1, characterized in that: A plurality of target information of each key of the keyboard is obtained, and a proportional model of the keyboard is constructed based on the target information, wherein the target information at least includes size, position and color.
6. The keyboard light display method according to claim 1, characterized in that: When the keyboard proportional model includes models corresponding to more than one keyboard, the user customizes the placement shape of the keyboard on the keyboard plane.
7. A keyboard light display device, characterized in that: The device comprises: A keyboard plane acquisition module, used to acquire a keyboard proportional model and construct a keyboard plane based on the keyboard proportional model, wherein the keyboard proportional model includes at least one model corresponding to the keyboard; A user instruction acquisition module, used to acquire user instructions, wherein the user instructions are music rhythm mode instructions or user-defined dynamic model import instructions; The dynamic model acquisition module is used to load a preset dynamic model on the dynamic effect plane of the three-dimensional space when the user instruction is a music rhythm mode instruction; when the user instruction is a user-defined dynamic model import instruction, import the dynamic model uploaded by the user on the dynamic effect plane of the three-dimensional space; wherein the dynamic effect plane is parallel to the keyboard plane; The light color acquisition module is used to determine the light color of each key of the keyboard according to the dynamic model displayed by the dynamic effect plane; wherein, a ray is emitted from the center point of each key of the keyboard in the keyboard plane, intersecting with the dynamic effect plane, and the color of the first intersection with the preset dynamic model or the dynamic model uploaded by the user is selected as the light color of the keyboard. If there is no intersection with the preset dynamic model and the dynamic model uploaded by the user, the keyboard light is displayed as off, and the ray is perpendicular to the keyboard plane.
8. The keyboard light display device according to claim 7, characterized in that: The device also includes: an operation instruction acquisition module, which is used to acquire the user's operation instruction and adjust the dynamic model of the dynamic effect plane according to the operation instruction, and determine the light color of each key of the keyboard according to the adjusted dynamic model.
9. The keyboard light display device according to claim 7, characterized in that: The device also includes: an audio module, which is used to obtain the audio played by the user, and dynamically display the preset pattern style based on the audio played by the user, so as to obtain the preset dynamic model.
10. The keyboard light display device according to claim 7, characterized in that: The device further comprises: a custom module, which is used for allowing a user to customize the placement shape of the keyboard on the keyboard plane when the keyboard proportional model comprises models corresponding to more than one keyboard.