A method, system, device and storage medium for controlling lighting components.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-05-29
- Publication Date
- 2026-08-14
AI Technical Summary
[0004]本申请提供一种照明组件控制方法、系统、设备及存储介质,设备端可根据客户端的照明组件色彩需求控制照明组件上各个灯珠显示对应的颜色,实现用户对照明组件的自由配色,丰富照明组件的灯光显示模式,解决了现有技术中晾晒机照明组件无法满足用户对阳台灯光氛围的多样化和个性化需求的问题
[0010]In this application, a virtual model of the lighting component is displayed on the client's lighting component operation interface. Users can set the display color of each LED in the lighting component through the virtual model to trigger user operations. The client generates a display service instruction based on the user operation and sends the display service instruction to the device. Upon receiving the display service instruction, the device determines the horizontal and vertical coordinates of each LED and the target color parameter to be set according to the display service instruction. Based on the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number, the device converts the horizontal and vertical coordinates of each LED and the target color parameter into a control signal sequence. The device then controls each LED to light up and display the corresponding color according to the control signal sequence. Through the aforementioned technical means, users can configure the display color parameters of each LED in the lighting component via a visual operation interface provided by the client. Then, the client sends a display service command carrying the horizontal and vertical coordinates of the LED and the display color parameters to the device. The device accurately identifies the control number of the LED based on the horizontal and vertical coordinates and the preset mapping relationship, and then lights up the LED and displays the corresponding color according to the control number and the display color parameters in the control cycle of the LED. This allows users to freely match colors in the lighting component, enriches the lighting display modes of the lighting component, and solves the problem that the existing technology of drying rack lighting components cannot meet users' diverse and personalized needs for balcony lighting atmosphere.
Smart Images

Figure CN122579417A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet of Things (IoT) technology, and in particular to a method, system, device, and storage medium for controlling lighting components. Background Technology
[0002] Smart clothes drying racks, as a common smart home device in modern households, are widely used in residential balconies, sunrooms, and other settings. They not only possess core functions such as clothes drying and height adjustment, but also integrate a lighting module to provide illumination for the balcony area when natural light is insufficient. With users' increasing demands for home decoration and personalization, lighting components have become an important part of enhancing the competitiveness of smart clothes drying racks.
[0003] Currently, most clothes drying racks with lighting functions on the market only support single brightness adjustment of the lighting components or switching of manufacturer-preset lighting modes. The lighting display modes are relatively simple and cannot meet users' diverse and personalized needs for balcony lighting atmosphere. Summary of the Invention
[0004] This application provides a lighting component control method, system, device, and storage medium. The device can control the display of each LED on the lighting component to the corresponding color according to the client's lighting component color requirements, so as to realize the user's free color matching of the lighting component, enrich the lighting display mode of the lighting component, and solve the problem that the existing drying rack lighting components cannot meet the user's diverse and personalized needs for balcony lighting atmosphere.
[0005] In a first aspect, this application provides a lighting component control method applied to a device, wherein the device is equipped with a lighting component, the lighting component comprising a plurality of LEDs, each LED corresponding to its own horizontal and vertical coordinates, the method comprising: Upon receiving a display service instruction, the horizontal and vertical coordinates and target color parameters of each LED bead are determined according to the display service instruction. A control signal sequence is generated based on a preset mapping relationship and the horizontal and vertical coordinates of each LED bead and the target color parameter. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED bead and the control sequence number. The control signal sequence controls each LED to light up and display the corresponding color.
[0006] Secondly, this application provides a lighting component control method applied to a client, wherein the client is connected to a device, the device being equipped with a lighting component, the lighting component comprising multiple LEDs, each LED corresponding to its own horizontal and vertical coordinates, and the method comprising: A virtual model of the lighting component is displayed on the lighting component operation interface, and the virtual model of the lighting component includes multiple virtual LED beads; In response to a lamp selection operation triggered by the virtual model of the lighting component, the selected virtual lamp is marked in the virtual model of the lighting component and a color selector pops up; In response to a color selection operation triggered by the color selector, the selected color parameters are associated with the horizontal and vertical coordinates of the selected virtual LED. Upon receiving a color adjustment request, a corresponding color setting service instruction is generated based on the associated horizontal and vertical coordinates and color parameters. The color setting service command is sent to the device, which determines the horizontal and vertical coordinates and target color parameters of each LED according to the color setting service command. Based on the preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED, the device generates a control signal sequence and controls each LED to light up and display the corresponding color according to the control signal sequence. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number.
[0007] Thirdly, this application provides a lighting component control system, including a device terminal, an Internet of Things (IoT) platform, and a client terminal. The device terminal is equipped with a lighting component, which includes multiple LEDs, each LED corresponding to its own horizontal and vertical coordinates, wherein: The client is used to generate display service instructions based on user operations and send the display service instructions to the Internet of Things platform; The IoT platform is used to send the display service instruction to the device. The device is configured to determine the horizontal and vertical coordinates and target color parameters of each LED bead according to the display service instruction, generate a control signal sequence according to a preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED bead, and control each LED bead to light up and display the corresponding color according to the control signal sequence; the preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED bead and the control sequence number.
[0008] Fourthly, this application provides a lighting component control device, comprising: One or more processors; A memory that stores one or more programs that, when executed by one or more processors, cause the one or more processors to implement the lighting component control method as described in the first or second aspect.
[0009] Fifthly, this application provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to perform the lighting component control method as described in the first or second aspect.
[0010] In this application, a virtual model of the lighting component is displayed on the client's lighting component operation interface. Users can set the display color of each LED in the lighting component through the virtual model to trigger user operations. The client generates a display service instruction based on the user operation and sends the display service instruction to the device. Upon receiving the display service instruction, the device determines the horizontal and vertical coordinates of each LED and the target color parameter to be set according to the display service instruction. Based on the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number, the device converts the horizontal and vertical coordinates of each LED and the target color parameter into a control signal sequence. The device then controls each LED to light up and display the corresponding color according to the control signal sequence. Through the aforementioned technical means, users can configure the display color parameters of each LED in the lighting component via a visual operation interface provided by the client. Then, the client sends a display service command carrying the horizontal and vertical coordinates of the LED and the display color parameters to the device. The device accurately identifies the control number of the LED based on the horizontal and vertical coordinates and the preset mapping relationship, and then lights up the LED and displays the corresponding color according to the control number and the display color parameters in the control cycle of the LED. This allows users to freely match colors in the lighting component, enriches the lighting display modes of the lighting component, and solves the problem that the existing technology of drying rack lighting components cannot meet users' diverse and personalized needs for balcony lighting atmosphere. Attached Figure Description
[0011] Figure 1 This is a flowchart illustrating a lighting component control method applied to a client, as provided in an embodiment of this application. Figure 2 This is one of the schematic diagrams of the operation interface of the lighting component provided in the embodiments of this application; Figure 3 This is a second schematic diagram of the operation interface of the lighting component provided in the embodiments of this application; Figure 4 This is a flowchart of a lighting component control method applied to a device, as provided in an embodiment of this application; Figure 5 This is a schematic diagram of the generation of control signal sequences provided in an embodiment of this application; Figure 6 This is a schematic diagram of the rectangular array and lighting components provided in an embodiment of this application; Figure 7 This is a flowchart of controlling each LED bead based on a control signal sequence, provided in an embodiment of this application. Figure 8 This is a schematic diagram of the lighting process of the lighting component provided in the embodiments of this application; Figure 9 This is a schematic diagram of the communication process of the lighting component control system provided in the embodiments of this application; Figure 10This is a schematic diagram of the structure of a lighting component control device provided in an embodiment of this application. Detailed Implementation
[0012] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. A process can be terminated when its operation is completed, but it may also have additional steps not included in the drawings. A process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0013] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0014] In common existing implementations, the control logic of the lighting components in clothes drying racks is relatively mature. The core is that the main control module of the clothes drying rack sends a sequence of control signals to the driver chip of the lighting components. Using the control signals arranged in a time sequence, the brightness ratio of the red, green, and blue colors of each RGB LED is controlled sequentially, thus achieving different lighting effects. At the IoT control level, the clothes drying rack is integrated into a smart home system. Control commands for the lighting components are defined through a physical model, enabling remote control via an app or voice control. Currently, the control commands configured in the physical model mainly focus on basic operations, including turning the lighting components on and off, and switching between manufacturer-preset lighting modes (such as white light mode, colored ambient mode, etc.). There are no dedicated physical model attributes and services designed for the refined color control of the lighting components. Furthermore, the app only provides an interface for switching preset lighting modes, lacking a visual interface for customizing colors, preventing users from personalizing the light colors of the lighting components. It is evident that the lighting component hardware already possesses sequence-level control capabilities, enabling precise lighting control at the pixel or cell level. However, the existing model only supports basic on / off switching and preset mode switching, lacking refined RGB color control services for individual LEDs. This renders the precise sequence-level control capabilities of the lighting component hardware idle, failing to realize its full technical value. Furthermore, the existing model lacks attributes and services related to refined control. The app cannot send LED-level color control commands to the main control module, limiting the app to a selection interface for manufacturer-preset lighting modes without any visual color customization functionality. Finally, users cannot customize the colors of individual areas or LEDs within the lighting component according to their preferences, nor can they customize lighting effects such as marquees or gradients. They are forced to passively select manufacturer-preset modes, failing to meet users' diverse and personalized needs for balcony lighting atmosphere, resulting in a poor user experience.
[0015] To address the aforementioned issues, this embodiment provides a lighting component control method. The method aims to control the display of each LED on the lighting component according to the client's color requirements, thereby enabling users to freely match colors for the lighting component and enriching the lighting display modes of the lighting component.
[0016] The lighting component control method provided in this embodiment can be executed by a lighting component control device. This device can be implemented through software and / or hardware, and can consist of two or more physical entities, or a single physical entity. For example, the lighting component control device can be a device terminal equipped with lighting components, such as a smart clothes dryer, smart electric curtains, smart shoe cabinet, smart balcony cabinet, smart ceiling light, or other smart home products. The lighting component control device can also be a client connected to the device terminal, such as a mobile phone or a central control device. Furthermore, the lighting component control device can also be a lighting component control system composed of a device terminal and a client terminal, or a smart home system to which the device terminal and client terminal belong.
[0017] The lighting component control device is equipped with at least one operating system, including but not limited to Android, Linux, and Windows. The lighting component control device can install at least one application based on the operating system; this application can be a built-in application of the operating system or an application downloaded from a third-party device or server. In this embodiment, the lighting component control device has at least one application capable of executing lighting component control methods.
[0018] It should be noted that the lighting component control methods executed by the device and the client are different in this embodiment. For ease of understanding, this embodiment describes the specific process of the client and the device executing the lighting component control methods in turn.
[0019] In one embodiment, Figure 1 A flowchart of a lighting component control method applied to a client side, according to an embodiment of this application, is provided. (Reference) Figure 1 The lighting component control method applied to the client specifically includes: S110. Display a virtual model of the lighting component on the lighting component operation interface. The virtual model of the lighting component includes multiple virtual LED beads.
[0020] The lighting component operation interface is a client-side interface provided to users to set the lighting display mode of the lighting component. The lighting component virtual model is a control for receiving user-defined color settings for the lighting component. Users can select one or more virtual LEDs in the lighting component virtual model to set corresponding colors, thereby controlling the LEDs on the device to synchronously display the same color, thus achieving visual and free color matching of the lighting component. For example, when a user clicks the lighting component editing control displayed on the client screen, the client screen jumps to the lighting component operation interface, which displays the lighting component virtual model. Alternatively, the client screen displays a non-editable lighting component virtual model in real time, where the display color of each virtual LED matches the actual color of each LED in the lighting component. When the user double-clicks the lighting component virtual model on the client screen, they are redirected to the lighting component operation interface, which displays an editable lighting component virtual model.
[0021] Furthermore, the display color of each virtual LED in the virtual model of the lighting component can be consistent with the real color of each LED in the lighting component, so that users can refer to the display color of the virtual LED to select the virtual LED to be adjusted for color adjustment.
[0022] S120, In response to the lamp selection operation triggered by the virtual model of the lighting component, mark the selected virtual lamp in the virtual model of the lighting component and pop up the color selector.
[0023] The lamp selection operation refers to the user's input to select one or more virtual lamps in the virtual model of the lighting component. This selection can be achieved by clicking on a single virtual lamp in the lighting component's virtual model, selecting multiple virtual lamps through double-clicking and then triggering the operation via the color editing control, or by sliding to select a specific area of virtual lamps in the lighting component's virtual model.
[0024] The color picker is a control used to set virtual LED beads. After an LED bead selection is triggered, the lighting component's interface can mark the selected virtual LED bead in the lighting component's virtual model, and simultaneously display the color picker. For example, Figure 2 This is one of the schematic diagrams of the operation interface of the lighting component provided in the embodiments of this application. For example... Figure 2 As shown, the lighting component operation interface 10 displays a virtual model 11 of the lighting component, and the cells in the virtual model 11 are virtual LED beads 12. When the user clicks on a virtual LED bead 12 in the virtual model 11 of the lighting component to trigger the LED bead selection operation, the clicked virtual LED bead 12 is highlighted. Figure 2 The cells marked in yellow are the virtual LEDs that are highlighted, and a color selector 13 is displayed on one side of the virtual LED 12.
[0025] It's important to note that the structure of the virtual model of the lighting component is consistent with the structure of the lighting component itself. That is, when the lighting component consists of LEDs arranged in a rectangular array, the corresponding virtual model will also present a rectangular array. However, this doesn't mean the lighting component must always be a rectangular array; it can also be a circular array, a triangular array, an equilateral hexagonal array, or other regular arrays, or even some irregular, non-standard arrays. Regardless of the array type, each LED in the lighting component corresponds to its own horizontal and vertical coordinates. These coordinates specify the row and column positions of the LEDs within a rectangular array. In other words, the lighting component is considered a local region composed of all or part of the elements within a rectangular array. In other words, the LEDs in the lighting component can be understood as pixels in an image, with pixel coordinates equivalent to the horizontal and vertical coordinates of the LEDs. Multiple pixels can form different shapes, and similarly, multiple LEDs can form lighting components of different shapes.
[0026] S130, In response to a color selection operation triggered by the color selector, associate the selected color parameter with the horizontal and vertical coordinates of the selected virtual LED.
[0027] The color selection operation involves the user inputting an option to select a specific color from the color picker. (See reference.) Figure 2 Users can click on the green color in the color selector 13 to trigger the color selection operation, thereby associating the RGB color parameters corresponding to the green color with the horizontal and vertical coordinates of the selected virtual LED.
[0028] S140. Upon receiving a color adjustment operation, generate a corresponding color setting service instruction based on the associated horizontal and vertical coordinates and color parameters.
[0029] The color adjustment operation is a user-input confirmation that adjusts the LEDs in the lighting component to the newly configured color. The color setting service command is an instruction used to instruct the device to adjust the LED color of the lighting component to the latest set color parameters.
[0030] refer to Figure 2 The lighting component operation interface 10 displays a completion setting control 14. After the user selects the color parameters of the LED beads, they can click the completion setting control 14 to trigger the color adjustment operation. The client then generates a color setting service instruction based on the horizontal and vertical coordinates and color parameters associated with the color selection operation. This allows the device to adjust the color of the LED beads at the corresponding position to the corresponding color parameters based on the horizontal and vertical coordinates in the color setting service instruction.
[0031] S150. The color setting service command is sent to the device. The device determines the horizontal and vertical coordinates and target color parameters of each LED according to the color setting service command. It generates a control signal sequence according to the preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED. The device controls each LED to light up and display the corresponding color according to the control signal sequence. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number.
[0032] For example, after generating a color setting service command, the client can send the command to the device via local Bluetooth or the same local area network. The device then adjusts the light color of the lighting component according to the command. Understandably, the subsequent operations performed by the device involve executing the corresponding lighting component control method, which will be described in detail in subsequent embodiments of the device executing the lighting component control method; these will be omitted here.
[0033] In another embodiment, when the client remotely controls the device, the command can be forwarded through an IoT platform. Specifically, the client connects to the IoT platform, and the IoT platform connects to the device. After the client generates a color setting service command, it can send the command to the IoT platform, which then forwards it to the device. The device determines the horizontal and vertical coordinates and target color parameters of each LED based on the command. It then generates a control signal sequence based on a preset mapping relationship and the coordinates and target color parameters of each LED. The device controls each LED to light up and display the corresponding color according to the control signal sequence. The preset mapping relationship is the mapping between the horizontal and vertical coordinates of the LEDs and the control sequence number.
[0034] For example, the IoT platform designs a device model for controlling lighting components. This device model defines three core elements for the lighting components: attributes, services, and events, and is deployed on the IoT platform. Clients and devices generate attribute information, service instructions, and event information in a standard format according to the device model, ensuring normal interaction between them. The client can generate a color setting service instruction in standard JSON format based on the device model. The instruction type field in the color setting service instruction is consistent with the identifier of that color setting service in the device model. For example, if the identifier for the color setting service is defined as `set_cell_color` in the device model, then the instruction type field in the color setting service instruction will also be `set_cell_color`. Furthermore, if the input parameters for the color setting service in the device model include `x` (column number), `y` (row number), and `color` (hexadecimal RGB), then the corresponding parameter fields in the color setting service instruction will also include "x", "y", and "color". After receiving a color setting service command, the IoT platform can repackage the command into an MQTT (Message Queuing Telemetry Transport) message that the device can directly parse. The MQTT message is then sent to the device, which uses the JSON data carried in the MQTT message to determine the service type to be executed and the coordinates and color of the LED to be adjusted. This embodiment utilizes the IoT platform to forward the color setting service command uploaded by the client to the device, enabling remote control of the lighting components on the device through the IoT platform, thus enriching the application scenarios of the lighting components.
[0035] In one embodiment, after the lighting component's LED colors are adjusted, the user can trigger a mode save operation to set the current lighting component's color to a new lighting mode. This allows the user to easily adjust the lighting component to its current color using this new lighting mode, thereby improving the ease of control. Specifically, upon receiving a mode save operation, the system obtains the corresponding input mode name and the current attribute information of the lighting component; generates a mode save service instruction from the mode name and current attribute information; and sends the mode save service instruction to the device. The device then retrieves the mode name and current attribute information from the mode save service instruction and saves the current attribute information as the first attribute information associated with the mode name. The mode name input operation is the user's input to save the current lighting component's color as a lighting mode. The current attribute information of the lighting component records the horizontal and vertical coordinates and corresponding color parameters of each LED in the current lighting component. This information can be synchronized from the device to the client after setting the colors of each LED, or it can be generated by the client based on the color parameters of each virtual LED in the current lighting component's virtual model.
[0036] For example, Figure 3This is a second schematic diagram of the operation interface of the lighting component provided in the embodiments of this application. For example... Figure 3 As shown, the lighting component operation interface 10 displays a pattern storage control 15. When the user clicks the pattern storage control 15, the lighting component operation interface 10 pops up a window 16 for customizing the pattern name. The user then enters the pattern name in the name box 17 of window 16 and clicks the confirmation control 18 of window 16 to trigger the pattern save operation. The client responds to the triggered pattern save operation by retrieving the pattern name entered in the name box 17 and retrieving the current attribute information of the lighting component stored locally. The client generates a standard JSON format pattern save service instruction based on the object model, using the pattern name and current attribute information. If the identifier for the pattern save service is defined as `save_custom_mode` in the object model, then the instruction type field in the pattern save service instruction is also `save_custom_mode`. Furthermore, if the input parameters for the pattern save service in the object model include `mode_name` (pattern name) and `matrix_config` (current attribute information of the lighting component), then the pattern save service instruction includes parameter fields for `mode_name` and `matrix_config`.
[0037] After generating the pattern save service command, the client can send it to the device via local Bluetooth or the same local area network. Alternatively, the client can send the pattern save service command to the IoT platform, which will then repackage it into an MQTT message that the device can directly parse before sending it to the device. Upon receiving the pattern save service command, the device identifies it as a pattern save service command based on the command type field `save_custom_mode`, and saves the current configuration information from that command as the first attribute information associated with the corresponding pattern name.
[0038] This embodiment utilizes a mode saving service to configure the current color of the lighting component as a lighting mode, so that the lighting component can be adjusted to the corresponding color with one click using this lighting mode, without the need for the user to readjust the color of each LED, thus improving the control convenience of the lighting component.
[0039] Furthermore, when a user wants to adjust the color of a lighting component to a specific mode, they can select the mode name through the lighting component's interface to trigger a mode invocation operation. The client responds to this mode invocation operation by obtaining the corresponding mode name and generating a standard JSON-formatted mode invocation service instruction based on the object model. For example, if the identifier for the mode invocation service is defined as `call_custom_mode` in the object model, then the instruction type field in the mode invocation service instruction will also be `call_custom_mode`. If the input parameters for the mode invocation service in the object model include `mode_name`, then the mode invocation service instruction will include the parameter field of `mode_name`. Afterward, the client directly or through the IoT platform sends the mode invocation service instruction to the device. The device identifies the instruction as a mode invocation service instruction based on `call_custom_mode`, then retrieves the locally associated first configuration information based on the mode name in the instruction, and adjusts each LED of the lighting component to the corresponding color according to the first configuration information.
[0040] Based on the above embodiments, Figure 4 This is a flowchart illustrating a lighting component control method applied to a device, as provided in an embodiment of this application. (Reference) Figure 4 The lighting component control method applied to the device specifically includes: S210. Upon receiving a display service instruction, determine the horizontal and vertical coordinates and target color parameters of each LED bead according to the display service instruction.
[0041] The display service instruction is a command used by the client to instruct the device to display the LEDs in the lighting component in the corresponding target color. For example, the color setting service instruction mentioned in the above embodiment is one type of display service instruction. After receiving the display service instruction, the device can obtain the horizontal and vertical coordinates and target color parameters of one or more LEDs from the display service instruction, and determine the horizontal and vertical coordinates and target color parameters of each LED in combination with the current attribute information of the lighting component.
[0042] When the display service instruction is a color setting service instruction, it can be one of a global setting service instruction, a regional setting service instruction, or a single bead setting service instruction. A global setting service instruction is used to adjust all the beads in the lighting component to a uniform color. A regional setting service instruction is used to adjust the beads in a specific area of the lighting component to a uniform color. A bead setting service instruction is used to adjust the color of each bead in the lighting component on a one-to-one basis. Based on the color setting service instruction generation process in the above embodiments, when the user slides to select all virtual beads in the lighting component's virtual model and selects a specific color, a global setting service instruction is generated based on the selected color parameter. The global setting service instruction includes an instruction type field and a color parameter field. Furthermore, when the user slides to select virtual beads in a local area of the lighting component's virtual model and selects a specific color, a local setting service instruction is generated based on the top-left and bottom-right coordinates of the local area and the selected color parameter. The local setting service instruction includes an instruction type field, start and end horizontal and vertical coordinate fields, and a color parameter field. Furthermore, after a user selects virtual LEDs in the virtual model of the lighting component once or multiple times and sets their respective colors, an LED setting service instruction is generated based on the horizontal and vertical coordinates and color parameters of each selected virtual LED. The LED setting service instruction contains an instruction type field, a horizontal and vertical coordinate field, and a color parameter field. The horizontal and vertical coordinate fields and the color parameter field of the same virtual LED are stored in the same field group.
[0043] Furthermore, upon receiving a display service instruction, the device can identify whether the instruction is a global setting service instruction, a regional setting service instruction, or an LED setting service instruction based on the instruction type field in the instruction.
[0044] When the display service command is a global setting service command, the color parameters in the global setting service command are used to determine the horizontal and vertical coordinates and target color parameters of each LED. For example, the color parameters are read from the color parameter field of the global device service command and set as the target color parameters for all LEDs.
[0045] When the display service instruction is a regional setting service instruction, determine the horizontal and vertical coordinates of the regional beads and the horizontal and vertical coordinates of the non-regional beads according to the start and end horizontal and vertical coordinates in the regional setting service instruction, determine the target color parameter of the regional beads as the color parameter in the display service instruction, and determine the target color parameter of the non-regional beads according to the current attribute information of the lighting component. The current attribute information records the horizontal and vertical coordinates and the current color parameter of each bead on the lighting component. Among them, the start and end horizontal and vertical coordinates include the start horizontal coordinate, the end horizontal coordinate, the start vertical coordinate, and the end vertical coordinate of the local area. The start horizontal coordinate is the horizontal coordinate of the upper left bead of the local area, the end horizontal coordinate is the horizontal coordinate of the lower right bead of the local area, the start vertical coordinate is the vertical coordinate of the upper left bead of the local area, and the end vertical coordinate is the vertical coordinate of the lower right bead of the local area. The regional beads are the beads within the local area, and the non-regional beads are the beads outside the local area. The start and end horizontal and vertical coordinates and the color parameter can be read in the start and end horizontal and vertical coordinate fields and the color parameter field of the regional setting service instruction. Determine the horizontal and vertical coordinates of each bead in the local area according to the start and end horizontal and vertical coordinates, and then set the color parameter as the target color parameter of each bead in the local area. For example, the regional setting service instruction includes {"startX":X1,"startY":Y1,"endX":X2,"endY":Y2}", where startX, startY, endX, and endY are the start horizontal coordinate field, the end horizontal coordinate field, the start vertical coordinate field, and the end vertical coordinate field in sequence. The start horizontal coordinate, the end horizontal coordinate, the start vertical coordinate, and the end vertical coordinate can be extracted from the regional setting service instruction as X1, Y1, X2, and Y2 in sequence, so that the bead Q(X,Y) where X1<X<X2 and Y1<Y<Y2 is determined as the regional bead, and the bead Q(X,Y) where X1<X, X>X2, Y2<Y or Y<Y1 is determined as the non-regional bead. For non-regional beads, the current color can be maintained. Therefore, the device obtains the current attribute information of the lighting component, and obtains the color parameter of the bead at the corresponding position in the current attribute information according to the horizontal and vertical coordinates of the non-regional bead, so as to set the obtained color parameter as the target color parameter of the non-regional bead.
[0046] When the display service instruction is a lamp bead setting service instruction, the x and y coordinates and color parameters of at least one lamp bead in the lamp bead setting service instruction are determined as the x and y coordinates and target color parameters of the corresponding lamp bead, and the x and y coordinates and target color parameters of the remaining lamp beads are determined based on the current attribute information of the lighting component. For example, the x and y coordinates and color parameters of the same field group are read from the lamp bead setting service instruction, and the color parameter is set as the target color parameter of the lamp bead corresponding to that x and y coordinate. For example, the lamp bead setting service instruction includes {"x":1,"y":1,"color":"#FFFFFF"}, {"x":5,"y":2,"color":"#FF0000"}, {"x":30,"y":5,"color":"#00FF00"}. The x and y coordinates of the first field group with (1,1) and the color parameter FFFFFF can be read from the lamp bead setting service instruction, thereby setting the target color parameter of the lamp bead with x and y coordinates (1,1) to FFFFFF. The process of determining the x and y coordinates and target color parameters of the lamp beads corresponding to other field groups is similar. After determining the horizontal and vertical coordinates and target color parameters of the LEDs corresponding to each field group, the current color of the remaining LEDs can be maintained. Therefore, the device obtains the current attribute information of the lighting component, retrieves the color parameters of the corresponding LEDs in the current attribute information based on the horizontal and vertical coordinates of the remaining LEDs, and sets the obtained color parameters as the target color parameters of the remaining LEDs.
[0047] This embodiment can accurately identify the corresponding instruction type based on the field information carried by the three color setting service instructions, and then accurately configure the horizontal and vertical coordinates and target color parameters of each lamp bead according to the instruction type, ensuring the control accuracy of the lighting components while being compatible with multiple color setting services.
[0048] In another embodiment, the display service instruction can also be a mode call service instruction. The device can quickly obtain the horizontal and vertical coordinates and color parameters of each LED in the corresponding mode through the mode call service instruction. Specifically, when the display service instruction is a mode call service instruction, the mode name is obtained from the display service instruction; the associated and saved first attribute information is obtained according to the mode name, and the first attribute information records the horizontal and vertical coordinates and color parameters of each LED; the horizontal and vertical coordinates and target color parameters of each LED are determined according to the first attribute information. For example, after receiving the mode call service instruction sent by the client, the device can extract call_custom_mode from the instruction type field of the mode call service instruction, thereby determining that the instruction is a mode call service instruction. The mode name is also extracted from the mode_name field of the mode call service instruction, and the device can query the locally saved first attribute information associated with the mode name according to the mode name, and determine the horizontal and vertical coordinates and color parameters of each LED recorded in the first attribute information as the horizontal and vertical coordinates and target color parameters of each LED.
[0049] This embodiment can obtain the first attribute information of the corresponding pre-cached mode based on the mode call service command, and set the horizontal and vertical coordinates and target color parameters of the lamp beads with one click according to the first attribute information, so as to realize the reuse of historical lighting modes. Users do not need to set the color of the lamp beads one by one, which improves the ease of use of the lighting components.
[0050] As can be seen from the above client-side control process of the lighting components, before invoking the first attribute information corresponding to the mode, the client sends a mode save service instruction to the device. The device then associates and saves the mode name with the first attribute information according to the mode save service instruction. That is, before receiving the display service instruction, the device receives the mode save service instruction; it retrieves the mode name and first attribute information from the mode save service instruction; and it associates and saves the retrieved mode type with the first attribute information. For example, after receiving the mode save service instruction sent by the client, the device can extract `save_custom_mode` from the instruction type field of the mode save service instruction, thus identifying the currently received instruction as a mode save service instruction. It also extracts the mode name from the `mode_name` field and the first attribute information from the `matrix_config` field of the mode save service instruction, and then associates and saves the mode name with the first attribute information locally. Afterwards, if the device receives a mode call service instruction and extracts the mode name, it can retrieve the associated first attribute information locally, and thus quickly adjust the color of the lighting components according to the first attribute information under the corresponding mode.
[0051] It should be noted that the display service command received by the device can be sent from the client to the device. For example, the client can send the display service command to the device via local Bluetooth, and the device can receive the display service command sent by the client via local Bluetooth. Alternatively, the display service command can be forwarded from the client to the device by the IoT platform. For example, the client can send the display service command to the IoT platform via a 5G network, the IoT platform can repackage the display service command into an MQTT message, publish the MQTT message to the topic subscribed to by the device via the MQTT protocol, and the device can receive the MQTT message from the topic and parse the JSON format display service command from the MQTT message. This embodiment supports near-field communication between the client and the device directly, as well as remote communication between the client and the device through the IoT platform, improving the applicability of the lighting components.
[0052] S220. Generate a control signal sequence based on the preset mapping relationship and the horizontal and vertical coordinates of each LED and the target color parameters. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number.
[0053] The control signal sequence is a sequence of signals used by the device to control the display of the target color by each LED in the lighting component. For example, after determining the horizontal and vertical coordinates and target color parameters of each LED, the device can determine the serial number of the LED based on a preset mapping relationship and the horizontal and vertical coordinates of each LED, and generate a control signal sequence to be sent to the driver chip based on the target color parameters and serial number of the LED.
[0054] In one embodiment, Figure 5 This is a schematic diagram of the generation of control signal sequences provided in an embodiment of this application. For example... Figure 5 As shown, the steps for generating the control signal sequence specifically include S2201-S2203: S2201. Determine the control sequence number of the LED bead based on its horizontal and vertical coordinates and the preset mapping relationship.
[0055] As described above, the lighting component is equivalent to a global or local area within a rectangular array. Therefore, the horizontal and vertical coordinates of each LED in the lighting component correspond to its row and column positions within the rectangular array. In one embodiment, the preset mapping relationship is determined by the number of columns M and rows N of the rectangular array. The preset mapping relationship is: control sequence number k = (y-1) × M + x, where y is the vertical coordinate of the LED (i.e., its row number in the rectangular array), and x is the horizontal coordinate of the LED (i.e., its column number in the rectangular array). For example, Figure 6 This is a schematic diagram of the rectangular array and lighting components provided in an embodiment of this application. Figure 6As shown, the rectangular array consists of 13 columns and 10 rows of cells, and the lighting components are the cells marked in bold in the rectangular array. One LED in the lighting component has a horizontal and vertical coordinate of (x, y) = (5, 3). Therefore, the control sequence number k for this LED is (3-1) × 13 + 5 = 21. This means that the LED is the 21st cell from left to right and top to bottom in the rectangular array, and 21 is the control sequence number of the LED.
[0056] S2202. Generate control signals for the LEDs based on the target color parameters of the LEDs.
[0057] For example, an LED bead is a light-emitting element that encapsulates red, blue, and green LED chips together. Multiple colors can be mixed by adjusting the brightness values of the three color LED chips. The target color parameters of the LED bead include the brightness values of the R, G, and B color channels. The duty cycle data of the PWM signal for the corresponding color LED chip is determined based on the brightness value of each color channel. The duty cycle data corresponding to the three color channels are then combined into an array as the control signal for the LED bead.
[0058] S2203. Sort the control signals of each LED bead according to the size order of the control sequence number to obtain the control signal sequence.
[0059] For example, the control signals of each LED are concatenated in ascending order of the LED's control sequence number to obtain a control signal sequence.
[0060] It should be noted that when the lighting component is a local area within a rectangular array, the control sequence numbers of some LEDs in the lighting component will not be consecutive, such as... Figure 6 The control sequence numbers of the LED with x and y coordinates (x, y) = (7, 3) and (4, 4) are not consecutive, but there are no other LEDs between their control sequence numbers. Therefore, even though the control sequence numbers of the LEDs in the lighting assembly are not consecutive, when sorted by control sequence number from smallest to largest, the LEDs can still be controlled in a left-to-right and top-to-bottom control order, ensuring the accuracy of LED control.
[0061] This embodiment uses a preset mapping relationship and the row and column numbers of the LEDs in the rectangular array to accurately calculate the serial number of the LED in all cells of the rectangular array. This serial number is used as the control serial number of the LED, so that when the control signals of the LEDs are spliced in the order of the control serial number from smallest to largest, the control signals of the LEDs can be accurately spliced at the corresponding control sequence position, ensuring accurate control of the LED color.
[0062] S230: Control each LED to light up and display the corresponding color according to the control signal sequence.
[0063] For example, the device can generate PWM signals sequentially to the first LED, the second LED, ..., the last LED according to the control signals ordered in the control signal sequence, and adjust the LEDs to the color pointed to by the target color parameter in sequence through the PWM signals.
[0064] Optionally, the device includes a wireless communication module, a main control module, and a driver chip. One end of the wireless communication module connects to the main control module via a UART interface, and the other end establishes communication with the IoT platform. The main control module connects to the driver chip via a serial interface, and the driver chip connects to the lighting components. After receiving an MQTT message from the IoT platform, the wireless communication module parses the display service command and transmits it to the main control module via UART. The main control module determines the horizontal and vertical coordinates and target color parameters of each LED based on the display service command, and then converts these coordinates and parameters into a control signal sequence.
[0065] Then, the main control module transmits the control signals in the control signal sequence to the driver chip sequentially via the serial interface. The driver chip then generates PWM signals to drive the corresponding LEDs to light up and display the corresponding colors based on the control signals. For example, Figure 7 This is a flowchart illustrating the control of individual LEDs based on a sequence of control signals, provided in an embodiment of this application. For example... Figure 7 As shown, the steps for controlling each LED based on the control signal sequence specifically include S2301-S2302: S2301 is a driver chip that transmits control signal sequences to the device via a serial interface.
[0066] For example, the main control module can transmit the control signal of the LED to the driver chip in a short time through the serial interface, and the driver chip can obtain the duty cycle of the PWM signal of the three color channels of the LED.
[0067] It should be noted that the order of the control signals received by the driver chip is the preset control order of the LEDs in the lighting assembly, for example... Figure 6 The LED in the 3rd row and 5th column is the first one in the lighting assembly, and its control signal is also the first in the control signal sequence. Therefore, the driver chip will first obtain the control signal of the first LED. Similarly, the driver chip will sequentially obtain the control signals of the second, third, ..., and last LEDs in the lighting assembly.
[0068] S2302: The driver chip generates PWM signals for each color channel of the corresponding LED bead in sequence based on the control signals ordered in the control signal sequence, and adjusts the brightness value of the corresponding color channel of the LED bead by means of the PWM signals.
[0069] For example, the driver chip reads the duty cycles of the PWM signals for the three color channels from the first acquired control signal. Based on these duty cycles, it modulates the PWM signals for each of the three color channels and sends these signals to the three LEDs of the LED bead, adjusting the brightness of each LED to the corresponding brightness value in the target color parameters of the LED bead. Ultimately, the three LEDs blend to display the virtual LED bead color set by the client user. Next, the driver chip acquires a second control signal, reads the duty cycles of the PWM signals for the three color channels from this second control signal, and generates PWM signals for the three LEDs of the second LED bead, sending them to the corresponding LEDs. This process continues until the PWM signal generated by the last control signal is sent to the last LED of the LED bead.
[0070] For example, Figure 8 This is a schematic diagram illustrating the lighting process of the lighting component provided in an embodiment of this application. For example... Figure 8 As shown, the lighting components are as follows Figure 6 As shown in the black cells, the first, second, third, and fourth LEDs are located in the 3rd row, 5th column, 3rd row, 6th column, 3rd row, 7th column, and 4th row, 4th column cells, respectively. In the control signal sequence, the control signals for the first, second, third, and fourth LEDs are located in the first, second, third, and fourth positions, respectively. When the main control module sends the control signal sequence to the driver chip, the driver chip first receives the duty cycle data of the three color channels of the LED in the 3rd row, 5th column. Based on the duty cycle data, it generates PWM signals for the three color channels and sends these PWM signals to the corresponding LEDs of the three colors. The three LEDs display the corresponding brightness values, and the LED in the 3rd row, 5th column displays the corresponding color. For example, if the target color of the LED in the 3rd row, 5th column is red, then after being controlled by the M signal from the PWM driver chip, the LED in the 3rd row, 5th column will display red. Figure 8 As shown in (a). Then, the driver chip receives the duty cycle data of the three color channels of the LED in the 3rd row and 6th column, thereby controlling the LED in the 3rd row and 6th column to display orange, as shown. Figure 8 As shown in (b). Afterwards, the driver chip receives the duty cycle data of the three color channels of the LED in the 3rd row and 7th column, thereby controlling the LED in the 3rd row and 7th column to display green, as shown... Figure 8 As shown in (c). Then, the driver chip receives the duty cycle data of the three color channels of the LED in the 4th row and 4th column, thereby controlling the LED in the 4th row and 4th column to display blue, as shown... Figure 8 As shown in (d).
[0071] Therefore, even though the LEDs in the 4th row and 4th column have non-continuous serial numbers in the rectangular array compared to the LEDs in the 3rd row and 7th column, their control signals are continuous in the control signal sequence. This allows the driver chip to accurately control the LEDs in the 4th row and 4th column to display the corresponding colors compared to the LEDs in the 3rd row and 7th column, ensuring the accuracy of color control for the lighting components.
[0072] In this embodiment, the control signals of each LED in the control signal sequence are sent to the driver chip sequentially through a serial interface. This ensures that the driver chip generates PWM signals for each LED in the order they are controlled in the lighting assembly, so that the LEDs can correctly display the corresponding colors under the action of the PWM signals, thus ensuring the accuracy of color control in the lighting assembly.
[0073] In one embodiment, after adjusting the color of the lighting components, the device can synchronize the current attribute information of the lighting components to the client. This allows the client to control the virtual model of the lighting components to display the corresponding color synchronously, enabling the user to confirm the true color of the lighting components through the client. Specifically, after controlling each LED to light up and display the corresponding color according to the control signal sequence, the device updates the locally stored current attribute information based on the horizontal and vertical coordinates of each LED and the target color parameters. It then generates an attribute update event based on the current attribute information and sends the attribute update event to the client. The client then controls the virtual model of the lighting components to synchronously display the corresponding lighting state based on the attribute update event.
[0074] For example, the device saves the horizontal and vertical coordinates of each LED and the target color parameters as current attribute information. The device obtains the identifier of the attribute update event, 'config_updated,' through a predefined object model. It determines that the input parameters of the attribute update event in the object model include 'matrix_config' and 'update_time' (update time). Therefore, it adds 'config_updated' to the event type field of the attribute update event, fills the parameter field of 'matrix_config' with the current attribute information, and fills the parameter field of 'update_time' with the update event of the current attribute information, resulting in a JSON-formatted attribute update event. The device directly feeds back the attribute update event to the client via local Bluetooth, or it sends the attribute update event to the IoT platform via the network, and the IoT platform then sends the attribute update event to the client. Upon receiving the attribute update event, the client can confirm that the lighting component has completed color adjustment. Simultaneously, it can adjust the colors of the lighting component's virtual model using the horizontal and vertical coordinates and target color parameters of each LED in the attribute update event, ensuring color consistency between the virtual model and the lighting component. The user can then confirm the current display color of the lighting component through the virtual model.
[0075] For the device side, the main control module generates attribute update events based on the current attribute information of the lighting components. The main control module transmits the attribute update events to the wireless communication module through the UART interface, and the wireless communication module sends the attribute update events to the client or IoT platform.
[0076] In this embodiment, the device sends attribute update events back to the client so that the client can confirm that the lighting component color adjustment is successful and simultaneously update the display color of the local lighting component virtual model, ensuring color synchronization between the two ends.
[0077] In summary, the lighting component control method provided in this application displays a virtual model of the lighting component on the client's lighting component operation interface. Users can set the display color of each LED in the lighting component through the virtual model to trigger user operations. The client generates a display service instruction based on the user operation and sends the display service instruction to the device. Upon receiving the display service instruction, the device determines the horizontal and vertical coordinates of each LED and the target color parameter to be set according to the display service instruction. Based on the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number, the device converts the horizontal and vertical coordinates of each LED and the target color parameter into a control signal sequence. The device then controls each LED to light up and display the corresponding color according to the control signal sequence. Through the aforementioned technical means, users can configure the display color parameters of each LED in the lighting component via a visual operation interface provided by the client. Then, the client sends a display service command carrying the horizontal and vertical coordinates of the LED and the display color parameters to the device. The device accurately identifies the control number of the LED based on the horizontal and vertical coordinates and the preset mapping relationship, and then lights up the LED and displays the corresponding color according to the control number and the display color parameters in the control cycle of the LED. This allows users to freely match colors in the lighting component, enriches the lighting display modes of the lighting component, and solves the problem that the existing technology of drying rack lighting components cannot meet users' diverse and personalized needs for balcony lighting atmosphere.
[0078] Based on the above embodiments, this application also provides a lighting component control system. The lighting component control system includes a device, an IoT platform, and a client. The device is equipped with a lighting component, which includes multiple LEDs, each LED corresponding to its own horizontal and vertical coordinates. The client is used to generate display service instructions based on user operations and send these instructions to the IoT platform. The IoT platform is used to send the display service instructions to the device. The device is used to determine the horizontal and vertical coordinates and target color parameters of each LED based on the display service instructions, generate a control signal sequence based on a preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED, and control each LED to light up and display its corresponding color based on the control signal sequence. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LEDs and the control sequence number.
[0079] For example, Figure 9 This is a schematic diagram of the communication process of the lighting component control system provided in an embodiment of this application. Figure 9 As shown, after generating a display service command based on user input, the client sends the command to the IoT platform. The IoT platform then forwards the command to the device. The device processes the command to generate a control signal sequence, which in turn generates a PWM signal to be sent to the lighting components. The LEDs in the lighting components illuminate and display the corresponding colors under the influence of the PWM signal. After adjusting the colors of all LEDs, the device generates an attribute update event and sends it to the IoT platform. The IoT platform then sends the event to the client, which updates the current attribute information of the lighting components in the update event to the currently stored attribute information.
[0080] The lighting component control system provided in this application embodiment can be used to execute the lighting component control method provided in the above embodiment, and has corresponding functions and beneficial effects.
[0081] Figure 10 This is a schematic diagram of the structure of a lighting component control device provided in an embodiment of this application, with reference to... Figure 10 The lighting component control device includes a processor 31, a memory 32, a communication device 33, an input device 34, and an output device 35. The number of processors 31 and the number of memories 32 in the lighting component control device can be one or more. The processor 31, memory 32, communication device 33, input device 34, and output device 35 of the lighting component control device can be connected via a bus or other means.
[0082] The memory 32, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the lighting component control method in any embodiment of this application. The memory 32 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, the memory 32 may include high-speed random access memory and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0083] The communication device 33 is used for data transmission.
[0084] The processor 31 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 32, thereby realizing the above-mentioned lighting component control method.
[0085] Input device 34 can be used to receive input digital or character information, and to generate key signal inputs related to user settings and function control of the device. Output device 35 may include display devices such as a display screen.
[0086] The lighting component control device provided above can be used to execute the lighting component control method provided in the above embodiments, and has corresponding functions and beneficial effects.
[0087] This application also provides a storage medium containing computer-executable instructions. When executed by a computer processor, the computer-executable instructions are used to execute a lighting component control method applied to a device. The lighting component control method includes: upon receiving a display service instruction, determining the horizontal and vertical coordinates and target color parameters of each LED according to the display service instruction; generating a control signal sequence according to a preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED, wherein the preset mapping relationship is a mapping relationship between the horizontal and vertical coordinates of the LEDs and the control sequence number; and controlling each LED to light up and display the corresponding color according to the control signal sequence.
[0088] Furthermore, the computer-executable instructions, when executed by a computer processor, are used to perform a lighting component control method applied to a client. This lighting component control method includes: displaying a virtual model of the lighting component on a lighting component operation interface, the virtual model including multiple virtual LEDs; in response to an LED selection operation triggered by the virtual model, marking the selected virtual LED in the virtual model and popping up a color selector; in response to a color selection operation triggered by the color selector, associating the selected color parameter with the horizontal and vertical coordinates of the selected virtual LED; upon receiving a color adjustment operation, generating a corresponding color setting service instruction based on the associated horizontal and vertical coordinates and color parameters; sending the color setting service instruction to the device, whereby the device determines the horizontal and vertical coordinates and target color parameters of each LED based on the color setting service instruction, generates a control signal sequence based on a preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED, and controls each LED to light up and display the corresponding color based on the control signal sequence; the preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number.
[0089] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.
[0090] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the lighting component control method described above, but can also execute related operations in the lighting component control method provided in any embodiment of this application.
[0091] The lighting component control device, storage medium, and lighting component control equipment provided in the above embodiments can execute the lighting component control method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the lighting component control method provided in any embodiment of this application.
[0092] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of this application. The scope of this application is determined by the scope of the claims.
Claims
1. A method for controlling a lighting component, characterized in that, Applied to a device, the device is equipped with a lighting component, the lighting component including multiple LEDs, each LED corresponding to its own horizontal and vertical coordinates, the method including: Upon receiving a display service instruction, the horizontal and vertical coordinates and target color parameters of each LED bead are determined according to the display service instruction. A control signal sequence is generated based on a preset mapping relationship and the horizontal and vertical coordinates of each LED bead and the target color parameter. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED bead and the control sequence number. The control signal sequence controls each LED to light up and display the corresponding color.
2. The lighting component control method according to claim 1, characterized in that, The step of generating a control signal sequence based on a preset mapping relationship and the horizontal and vertical coordinates of each LED and the target color parameters includes: The control sequence number of the LED is determined based on the horizontal and vertical coordinates of the LED and a preset mapping relationship; The control signal for the LED is generated based on the target color parameters of the LED; The control signals of each LED are sorted according to the size of the control sequence number to obtain the control signal sequence.
3. The lighting component control method according to claim 1, characterized in that, The step of controlling each LED to light up and display a corresponding color according to the control signal sequence includes: The control signal sequence is transmitted to the driver chip at the device end via a serial interface; The driver chip generates PWM signals for each color channel of the corresponding LED bead based on the control signals ordered in the control signal sequence, and adjusts the brightness value of the corresponding color channel of the LED bead by means of the PWM signals.
4. The lighting component control method according to claim 1, characterized in that, The types of display service instructions include at least one of global setting service instructions, regional setting service instructions, and LED setting service instructions; Accordingly, determining the horizontal and vertical coordinates and target color parameters of each LED bead according to the display service instruction includes: When the display service instruction is a global setting service instruction, the color parameters in the global setting service instruction are used to determine the horizontal and vertical coordinates and target color parameters of each LED; and / or, When the display service instruction is a zonal setting service instruction, the x and y coordinates of the zonal LEDs and the non-zonal LEDs are determined according to the start and end x and y coordinates in the zonal setting service instruction. The color parameters in the display service instruction are determined as the target color parameters of the zonal LEDs. The target color parameters of the non-zonal LEDs are determined according to the current attribute information of the lighting component. The current attribute information records the x and y coordinates and current color parameters of each LED on the lighting component; and / or, When the display service instruction is a lamp bead setting service instruction, the horizontal and vertical coordinates and color parameters of at least one lamp bead in the lamp bead setting service instruction are determined as the horizontal and vertical coordinates and target color parameters of the corresponding lamp bead, and the horizontal and vertical coordinates and target color parameters of the remaining lamp beads are determined according to the current attribute information of the lighting component.
5. The lighting component control method according to claim 1, characterized in that, The types of display service instructions include mode call service instructions; Accordingly, determining the horizontal and vertical coordinates and target color parameters of each LED bead according to the display service instruction includes: If the display service instruction is a mode call service instruction, the mode name is obtained from the display service instruction; The first attribute information associated with the mode name is obtained, and the first attribute information records the horizontal and vertical coordinates and color parameters of each LED. The horizontal and vertical coordinates and target color parameters of each LED bead are determined based on the first attribute information.
6. The lighting component control method according to claim 5, characterized in that, Before receiving the display service instruction, the method also includes: Receive mode save service instructions; The mode name and first attribute information are obtained from the mode saving service instruction; The obtained pattern type and first attribute information are associated and saved.
7. The lighting component control method according to claim 1, characterized in that, The display service instruction is sent from the client to the device; or, the display service instruction is forwarded from the client to the device by the IoT platform.
8. The lighting component control method according to claim 1, characterized in that, After controlling each LED to light up and display its corresponding color according to the control signal sequence, the method further includes: Update the currently stored attribute information locally based on the horizontal and vertical coordinates of each LED and the target color parameters; An attribute update event is generated based on the current attribute information, and the attribute update event is sent to the client. The client then controls the virtual model of the lighting component to synchronously display the corresponding lighting status based on the attribute update event.
9. A method for controlling a lighting component, characterized in that, Applied to a client-side device, the client-side device is equipped with a lighting component, the lighting component comprising multiple LEDs, each LED corresponding to its own horizontal and vertical coordinates, the method comprising: A virtual model of the lighting component is displayed on the lighting component operation interface, and the virtual model of the lighting component includes multiple virtual LED beads; In response to a lamp selection operation triggered by the virtual model of the lighting component, the selected virtual lamp is marked in the virtual model of the lighting component and a color selector pops up; In response to a color selection operation triggered by the color selector, the selected color parameters are associated with the horizontal and vertical coordinates of the selected virtual LED. Upon receiving a color adjustment request, a corresponding color setting service instruction is generated based on the associated horizontal and vertical coordinates and color parameters. The color setting service command is sent to the device, which determines the horizontal and vertical coordinates and target color parameters of each LED according to the color setting service command. Based on the preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED, the device generates a control signal sequence and controls each LED to light up and display the corresponding color according to the control signal sequence. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number.
10. The lighting component control method according to claim 9, characterized in that, The method further includes: Upon receiving a mode save operation, obtain the corresponding input mode name and the current attribute information of the lighting component; Generate a mode saving service instruction using the mode name and the current attribute information; The mode saving service instruction is sent to the device, and the device obtains the mode name and the current attribute information from the mode saving service instruction, and saves the current attribute information as the first attribute information associated with the mode name.
11. The lighting component control method according to claim 9, characterized in that, The client connects to the IoT platform, and the IoT platform connects to the device; the method further includes: The color setting service instruction is sent to the IoT platform, which then forwards it to the device. The device determines the horizontal and vertical coordinates and target color parameters of each LED based on the color setting service instruction. It then generates a control signal sequence based on a preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED. The device controls each LED to light up and display the corresponding color according to the control signal sequence. The preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED and the control sequence number.
12. A lighting component control system, characterized in that, The system includes a device, an IoT platform, and a client. The device is equipped with a lighting component, which comprises multiple LEDs, each corresponding to a specific horizontal and vertical coordinate. The client is used to generate display service instructions based on user operations and send the display service instructions to the Internet of Things platform; The IoT platform is used to send the display service instruction to the device. The device is configured to determine the horizontal and vertical coordinates and target color parameters of each LED bead according to the display service instruction, generate a control signal sequence according to a preset mapping relationship and the horizontal and vertical coordinates and target color parameters of each LED bead, and control each LED bead to light up and display the corresponding color according to the control signal sequence; the preset mapping relationship is the mapping relationship between the horizontal and vertical coordinates of the LED bead and the control sequence number.
13. A lighting component control device, characterized in that, include: One or more processors; A memory that stores one or more programs that, when executed by one or more processors, cause the one or more processors to implement the lighting component control method as described in any one of claims 1-11.
14. A storage medium containing computer-executable instructions, characterized in that, The computer-executable instructions, when executed by a computer processor, are used to perform the lighting component control method as described in any one of claims 1-11.