Light control method and device, electronic equipment, storage medium and computer program product
By generating and sorting control instructions, each lamp bead in the lighting device is controlled using the sequence set and bitmap, the problem of reducing the refresh rate caused by the increase in the number of lamp beads is solved, and efficient lighting effects and pattern switching is achieved.
Patent Information
- Application Number
- CN202411340492.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-11-15
AI Technical Summary
In a lighting device, as the number of lamp beads increases, the refresh rate when switching lighting effects or patterns decreases, and the prior art is difficult to effectively solve this problem.
By generating control instructions, each lamp bead in the lighting device is instructed to correspond to a pixel point in the display image, and the light emission of the lamp bead is controlled using the sequence set and bitmap. The sequence set is sorted in the number of occurrences of the color value or the order of the value. Improve the switching speed of lighting effects or patterns.
In the scene of a large number of lamp beads, the refresh rate of lighting effects or patterns is improved, and the switching speed and stability of visual effects are improved.
Smart Images

Figure CN118973054A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of lighting control, and in particular to a lighting control method, device, electronic device, storage medium and computer program product. Background Art
[0002] With the development of technology, in addition to meeting lighting needs, lighting devices can also make multiple lamp beads in the lighting device display different colors to form a specific lighting effect or a set pattern. However, in the related art, the lamp beads in the lighting device are individually controlled in a point-to-point manner. When the number of lamp beads increases, the refresh rate when switching the lighting effect or pattern will decrease accordingly. Summary of the invention
[0003] To solve the related technical problems, the embodiments of the present application provide a lighting control method, device, electronic device, storage medium and computer program product.
[0004] The technical solution of the embodiment of the present application is implemented as follows:
[0005] The embodiment of the present application provides a lighting control method, which is applied to an electronic device, wherein the electronic device establishes a communication connection with a lighting device, and the lighting device includes one or more rows of lamp beads;
[0006] The method comprises:
[0007] Based on the first image, a control instruction is generated; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of which corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value;
[0008] The control instruction is sent to the lighting device so that each lamp bead in the lighting device emits light based on the control instruction.
[0009] In the above solution, the step of generating a control instruction based on the first image includes:
[0010] Parsing each pixel of the first image to obtain the one or more sequence sets;
[0011] sorting the one or more sequence sets in a set manner;
[0012] Based on the sorted one or more sequence sets, the control instruction is generated to enable the lighting device to light up lamp beads of corresponding color values in sequence based on the sorting of the one or more sequence sets.
[0013] In the above solution, the step of sorting the one or more sequence sets in a set manner includes:
[0014] Based on the number of occurrences of each color value in the first image, the one or more sequence sets are sorted from large to small according to the number of occurrences.
[0015] In the above solution, the step of sorting the one or more sequence sets in a set manner further includes:
[0016] The one or more sequence sets are sorted based on the value of each color value in the first image.
[0017] In the above solution, the electronic device establishes a communication connection with each lamp bead in the lighting device; correspondingly,
[0018] The sending the control instruction to the lighting device includes:
[0019] The control instruction is sent to each lamp bead in the lighting device respectively.
[0020] In the above solution, the lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; sending the control instruction to the lighting device includes:
[0021] The control instruction is sent to each of the one or more control nodes respectively, so that each control node sends the control instruction to the lamp bead with which the communication connection is established.
[0022] The embodiment of the present application also provides a lighting control method, which is applied to a lighting device, wherein the lighting device includes one or more rows of lamp beads, and the lighting device is in communication with an electronic device;
[0023] The method comprises:
[0024] Receive a control instruction sent by the electronic device; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of the sequence sets corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value;
[0025] Based on the control instruction, each lamp bead in the lighting device is controlled to emit light.
[0026] In the above solution, the one or more sequence sets are arranged in the control instruction in a set manner; and the step of controlling each lamp bead in the lighting device to emit light based on the control instruction includes:
[0027] Based on the order of the one or more sequence sets in the control instruction, the lamp beads of corresponding color values are lit in sequence; wherein,
[0028] The setting method includes: sorting the one or more sequence sets in descending order based on the number of occurrences of each color value in the first image; or sorting the one or more sequence sets based on the value of each color value in the first image.
[0029] In the above solution, the lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; the receiving of the control instruction sent by the electronic device includes:
[0030] Each of the one or more control nodes receives the control instruction sent by the electronic device respectively;
[0031] The step of controlling each lamp bead in the lighting device to emit light based on the control instruction includes:
[0032] Each control node sends the control instruction to the lamp beads with which the communication connection is established, so that each lamp bead in the lighting device emits light.
[0033] In the above solution, each control node sends the control instruction to the lamp bead with which the communication connection is established, including:
[0034] Each control node processes the control instruction;
[0035] Each control node sends the processed control instructions to the lamp beads with which the communication connection is established; wherein,
[0036] The processing includes:
[0037] In the control instruction, the first bit in the bitmap included in the one or more sequence sets is deleted; the first bit represents a bit that is not associated with the lamp bead that has established a communication connection with the corresponding control node.
[0038] The embodiment of the present application further provides a lighting control device, which is applied to an electronic device, wherein the electronic device establishes a communication connection with the lighting device, and the lighting device includes one or more rows of lamp beads;
[0039] The device comprises:
[0040] A generating unit, configured to generate a control instruction based on the first image; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of which corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value;
[0041] The sending unit is used to send the control instruction to the lighting device, so that each lamp bead in the lighting device emits light based on the control instruction.
[0042] The embodiment of the present application further provides a lighting control device, which is applied to a lighting device, wherein the lighting device includes one or more rows of lamp beads, and the lighting device is in communication connection with an electronic device;
[0043] The device comprises:
[0044] A receiving unit, configured to receive a control instruction sent by the electronic device; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of which corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value;
[0045] A control unit is used to control each lamp bead in the lighting device to emit light based on the control instruction.
[0046] An embodiment of the present application further provides a device, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and the processor is used to execute any of the lighting control methods described above.
[0047] An embodiment of the present application further provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.
[0048] An embodiment of the present application further provides a computer program product, including a computer program, which implements the steps of any of the above methods when executed by a processor.
[0049] In the lighting control method, device, electronic device, storage medium and computer program product provided in the embodiments of the present application, a communication connection is established between the electronic device and the lighting device, and the lighting device includes one or more rows of lamp beads. Specifically, the electronic device generates a control instruction based on the first image, and then sends the control instruction to the lighting device, and each lamp bead of the lighting device emits light based on the control instruction. The control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead produces light of the corresponding color value. Through the above scheme, the refresh rate when switching lighting effects or patterns can be improved in the lighting control scenario of a large number of lamp beads. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A schematic diagram of a lighting control method according to an embodiment of the present application;
[0051] Figure 2 This is a flow chart of another lighting control method according to an embodiment of the present application;
[0052] Figure 3 This is a structural schematic diagram of a lighting control device according to an embodiment of the present application;
[0053] Figure 4 This is a schematic diagram of the structure of another lighting control device according to an embodiment of the present application;
[0054] Figure 5 This is a schematic diagram of a device according to an embodiment of the present application. DETAILED DESCRIPTION
[0055] In the field of lighting control technology, the control of a single lamp bead has gradually developed into the linkage control of multiple lamp beads, and the control of lamp beads is not limited to the control of brightness, but also includes the control of color. Since multiple lamp beads in a lighting device can be controlled in multiple colors, the multiple colors displayed by multiple lamp beads can form a specific lighting effect or a set pattern, such as controlling electronic tags, ink screen products, and LED lights. When controlling a lighting device wirelessly, the lamp beads in the lighting device can be individually controlled in a point-to-point manner. The point-to-point control method refers to the electronic device and each lamp bead in the lighting device establishing an independent communication channel. The electronic device transmits a specific control signal to a specific lamp bead in the lighting device without passing through other nodes in the middle. The control signals received by different lamp beads are different. Therefore, for each additional lamp bead, one or more messages including the device address of the lamp bead need to be transmitted. When the number of lamp beads is large, the communication channel will be congested, resulting in a reduced refresh rate when switching lighting effects or patterns.
[0056] Based on this, in the lighting control method, device, electronic device, storage medium and computer program product provided in the embodiments of the present application, a communication connection is established between the electronic device and the lighting device, and the lighting device includes one or more rows of lamp beads. Specifically, the electronic device generates a control instruction based on the first image, and then sends the control instruction to the lighting device, and each lamp bead of the lighting device emits light based on the control instruction. The control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of which corresponds to a color value and includes a bitmap, and each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of the corresponding color value. Through the above scheme, the refresh rate of lighting effects or pattern switching can be improved in a lighting control scenario with a large number of lamp beads.
[0057] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0058] The present application embodiment provides a lighting control method applied to electronic equipment, referring to Figure 1 The lighting control method includes: step 101 and step 102.
[0059] The electronic device has a communication connection with the lighting device, and the lighting device includes one or more rows of lamp beads. In actual application, the lighting device can be a lighting control array device formed by electronic tags, which have one or more LEDs indicating the status and are placed regularly along the shelves, so as to easily form a regular physical lighting array, and the formed lighting array includes strip lights and matrix lighting arrays. The lighting device can also be a device system formed by regular lighting devices with the same specifications, including but not limited to stage lighting systems and roadside ribbon lighting systems.
[0060] Step 101 and step 102 are described in detail below.
[0061] Step 101: The electronic device generates a control instruction based on a first image.
[0062] Among them, the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead produces light of the corresponding color value.
[0063] In the embodiment of the present application, the electronic device needs to generate a control instruction based on the first image, wherein the first image may be an image stored in the electronic device itself, or an image obtained before the control instruction is generated, or an image obtained and processed before the control instruction is generated. The reason why the image needs to be processed is that each lamp bead in the lighting device corresponds to displaying a pixel in the first image, that is, the number of pixels in the first image is the same as the number of lamp beads in the lighting device, so when the number of pixels in the acquired original image is too many or too few, the original image needs to be processed to obtain the first image. There are many ways to process the original image. For example, when the number of pixels in the original image is greater than the number of lamp beads in the lighting device, the original image needs to be scaled, that is, the pixels of the original image are reduced proportionally, so that each lamp bead in the lighting device corresponds to displaying a pixel in the first image; when the number of pixels in the original image is less than the number of lamp beads in the lighting device, the original image needs to be expanded, that is, the pixels of the original image are expanded proportionally, so that each lamp bead in the lighting device corresponds to displaying a pixel in the first image. Exemplarily, the scaling method for the pixels of the original image includes an equal-interval sampling method and a local mean method; the expansion method for the pixels of the original image includes an edge- or region-based interpolation algorithm.
[0064] In the embodiment of the present application, each lamp bead in the lighting device corresponds to displaying a pixel point in the first image. The corresponding relationship can be that the number, position and arrangement of each pixel point in the first image correspond to the number, position and arrangement of each lamp bead in the lighting device, so each lamp bead corresponds to displaying a pixel point in the first image. Therefore, when the lighting device is arranged by extending the lamp beads in one direction, that is, the lighting device is composed of a row of lamp beads, the first image is a one-dimensional image; when the lighting device is composed of multiple rows of lamp beads, the first image is a two-dimensional image.
[0065] In an embodiment of the present application, the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, wherein the color value refers to a value obtained based on a pixel in the first image. The color value can be obtained in the following manner: each lamp bead in the lighting device corresponds to displaying a pixel in the first image, that is, the color displayed by each lamp bead corresponds to the color of each pixel, and each light color displayed is obtained by the change of the three colors of red (R), green (G), and blue (B) and their superposition with each other, wherein the value of each color channel (red channel, green channel, blue channel) can be represented by 0 to 255, or by 8-bit binary. The color value can be a value obtained by merging the values of the three color channels into a value, and the combined and converted value can be a decimal value or a 24-bit binary value.
[0066] Exemplarily, when the values of the three color channels are combined and converted into one color value, the decimal R value corresponding to one pixel is 35, the G value is 78, and the B value is 120. Among them, 35 is represented by 8-bit binary as "00100011", 78 is represented by 8-bit binary as "01001110", and 120 is represented by 8-bit binary as "01111000". The 8-bit value of the R value is shifted left by 16 bits, the 8-bit value of the G value is shifted left by 8 bits, and the 8-bit value of the B value remains unchanged, that is, "001000110100111001111000" is obtained, and the binary value is combined and converted into a decimal value to obtain "2313848". In this way, the values of the RGB three channels can be combined and converted into a color value to represent the color of a pixel, that is, "2313848" is used to represent the RGB color of a pixel. In another example, instead of converting to binary, only using decimal, the R value, G value and B value can be directly combined and converted by multiplying with the power of 2, that is, RGB 24位 =(35<<16)|(78<<8)|120=(35×2 16 )+(78×2 8)+120=2293760+19968+120=2313848, where << represents a left shift operation corresponding to binary. In addition, when converting the values of the three color channels into one color value, the 8-bit value of the B value may be shifted left by 16 bits, the 8-bit value of the G value may be shifted left by 8 bits, and the 8-bit value of the R value may remain unchanged. Alternatively, the 8-bit value of the G value may be shifted left by 16 bits, the 8-bit value of the R value may be shifted left by 8 bits, and the 8-bit value of the B value may remain unchanged.
[0067] In the embodiment of the present application, when the values of the three color channels are combined and converted into one color value, the formula is expressed as C i =P(R i ,G i ,B i ), where C i Represents the color value of the i-th pixel, R i represents the R value of the i-th pixel, G i represents the G value of the i-th pixel, B i represents the B value of the i-th pixel, and P represents the merging conversion of the above numerical values for the pixel. For example, C=P(35,78,120)=2313848.
[0068] In the embodiment of the present application, the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, wherein each bit in the bitmap is associated with a lamp bead of the lighting device, and each lamp bead in the lighting device corresponds to displaying a pixel in the first image, so the number of bits in the bitmap is equal to the number of lamp beads in the lighting device, and also equal to the number of pixels in the first image. Exemplarily, the lighting device has 30 rows of lamp beads, each row has 40 lamp beads, then the number of lamp beads is 1200, correspondingly, the first image has 1200 pixels, and the number of bits in the bitmap is 1200.
[0069] In the embodiment of the present application, each bit in the bitmap is not only associated with a lamp bead of the lighting device, but also each sequence set corresponds to a color value and includes a bitmap, that is, the color value and the bitmap also have a corresponding relationship, that is, the bit value corresponding to the bit in the bitmap is used to indicate whether the associated lamp bead produces light of the corresponding color value. Exemplarily, a bitmap contains multiple bits, each bit has a bit value, and the bit value of "1" is used to indicate that the associated lamp bead produces light of the corresponding color value, and the bit value of "0" is used to indicate that the associated lamp bead does not produce light of the corresponding color value; or, the bit value of "0" is used to indicate that the associated lamp bead produces light of the corresponding color value, and the bit value of "1" is used to indicate that the associated lamp bead does not produce light of the corresponding color value. Therefore, after the control instruction is sent to the lighting device, each lamp bead can determine whether to produce light of the color value corresponding to the bitmap according to the associated bit value in the bitmap.
[0070] Step 102: The electronic device sends the control instruction to the lighting device, so that each lamp bead in the lighting device emits light based on the control instruction.
[0071] In an embodiment of the present application, after generating a control instruction, the electronic device sends the control instruction to the lighting device, and the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead produces light of the corresponding color value.
[0072] In the embodiment of the present application, the color value in the sequence set can be represented by a 24-bit binary value in addition to being represented by a decimal value, so the color value represented by the binary value can be added to the front or back of the bitmap, that is, each sequence set includes a bitmap and a 24-bit color value, and the electronic device sends the control instruction to the lighting device, and the control instruction includes one or more of the sequence sets.
[0073] In an embodiment of the present application, the color value in the sequence set sent by the electronic device may be a default value, but the electronic device and the lighting device need to negotiate the sequence set order and the color value size. Exemplarily, the lamp beads in the lighting device can emit 100 different color values, and the lighting device has 80 lamp beads corresponding to 80 bits of the bitmap, which also correspond to 80 pixels of the first image. Although the number of different color values corresponding to the 80 pixels does not exceed 80, 100 sequence sets can be sent in order from small to large according to the 100 different color values. There is no color value in each sequence set, only the bitmap corresponding to the color value. Since the electronic device and the lighting device can negotiate the sequence set order and the color value size in advance, the lighting device can parse that the first sequence set received corresponds to the smallest color value, and the last sequence set received corresponds to the largest color value.
[0074] In the embodiment of the present application, the electronic device may send control instructions to the lighting device by wireless broadcasting. The premise of adopting the wireless broadcasting is that a wireless communication connection is established between the electronic device and the lighting device, and the wireless communication connection methods include but are not limited to: wireless local area network (Wi-Fi) connection, Bluetooth connection, ZigBee connection, wireless broadcast connection, infrared connection and near field communication (NFC) connection. When sending control instructions by wireless broadcasting, the device information of the lamp beads may not be carried. Instead, each lamp bead determines whether the associated lamp bead generates light of the corresponding color value by looking up the bit value corresponding to the bit position in each sequence set.
[0075] In one embodiment, generating a control instruction based on the first image includes:
[0076] Parsing each pixel of the first image to obtain one or more sequence sets;
[0077] Sort one or more sequence sets in a set manner;
[0078] Based on the sorted one or more sequence sets, a control instruction is generated to enable the lighting device to light up lamp beads of corresponding color values in sequence based on the sorting of the one or more sequence sets.
[0079] In the embodiment of the present application, the values of the three channels of red (R), green (G), and blue (B) of each pixel of the first image are parsed to obtain a color value, wherein the method of obtaining the color value is as described in the embodiment of the above step 101. Therefore, each pixel can be parsed to obtain a color value. When the number of pixels of the first image exceeds a certain number, a phenomenon of multiple pixels having the same color value will occur. In the embodiment of the present application, in order to minimize the number of sequence sets, each sequence set corresponds to a color value, and the color value in each sequence set is different from the color values of other sequence sets.
[0080] In the embodiment of the present application, after parsing each pixel of the first image and obtaining the color value of each pixel, it is also necessary to parse each pixel of the first image to obtain a bitmap corresponding to each color value. Since each pixel has a color value, it is also possible to obtain which pixels have the same color value and where these pixels with the same color value are in the first image by searching in a specified order, so as to generate a bitmap. A bitmap contains multiple bits, each bit has a bit value, the number of bits is the same as the number of pixels in the first image, and each bit corresponds to a pixel. Exemplarily, the first image has 1 row and 5 columns of pixels, and the parsed color value of each pixel is [100 200 300 400 200], where only the first pixel has a color value of 100, and the second and fifth pixels have a color value of 200. If the bit value "1" is used to indicate that the bit corresponds to the color, and the bit value "0" indicates that the bit does not correspond to the color, then the bitmap corresponding to the color value 100 is "10000", and the bitmap corresponding to the color value 200 is "01001"; if the bit value "0" is used to indicate that the bit corresponds to the color, and the bit value "1" indicates that the bit does not correspond to the color, then the bitmap corresponding to the color value 100 is "01111", and the bitmap corresponding to the color value 200 is "10110".
[0081] In the embodiment of the present application, each pixel of the first image is parsed to obtain one or more color values and a corresponding bitmap, so that one or more sequence sets can be obtained, each sequence set corresponding to a color value and including a bitmap. Exemplarily, the first image has 1 row and 5 columns of pixels, and the color value of each pixel parsed is [100 200 300400 200]. If the bit value "1" is used to indicate that the bit corresponds to the color, and the bit value "0" indicates that the bit does not correspond to the color, the obtained sequence sets are: color value 100, bitmap "10000"; color value 200, bitmap "01001"; color value 300, bitmap "00100"; color value 400, bitmap "00010".
[0082] In an embodiment of the present application, after obtaining one or more sequence sets, a control instruction is generated, and the control instruction includes the one or more sequence sets. Since each bit in the bitmap is associated with a lamp bead of the lighting device, the lighting device can light up the lamp bead of the corresponding color value based on the control instruction.
[0083] In one embodiment, one or more sequence sets are sorted in a set manner, including:
[0084] Based on the number of occurrences of each color value in the first image, the one or more sequence sets are sorted from large to small according to the number of occurrences.
[0085] In the embodiment of the present application, based on the first image, a control instruction can be generated, the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, before the electronic device sends the control instruction to the lighting device, the one or more sequence sets can be sorted from large to small based on the number of occurrences of each color value, and the control instruction is generated based on the sorted one or more sequence sets. Exemplarily, the pixels of the first image are 1 row and 6 columns of pixels, and the color value of each pixel parsed is [100 200 300 100 200 200], if the bit value "1" is used to indicate that the bit corresponds to the color, and the bit value "0" is used to indicate that the bit does not correspond to the color, the resulting sequence sets are: color value 100, bitmap "100100"; color value 200, bitmap "010011"; color value 300, bitmap "001000", where the color value 100 appears 2 times, the color value 200 appears 3 times, and the color value 300 appears 1 time. The one or more sequence sets are sorted from large to small according to the number of occurrences, that is, sequence set 1 is obtained: color value 200, bitmap "010011"; sequence set 2: color value 100, bitmap "100100"; color value 300, bitmap "001000".
[0086] In the embodiment of the present application, by sorting the one or more sequence sets from large to small according to the number of occurrences of each color value in the first image, the lighting device can light up the lamp beads of the corresponding color values in sequence based on the sorting of the one or more sequence sets, and the corresponding lamp beads with more color values can be lit first, and the sequence sets with fewer color values can be parsed last to supplement the remaining details of the lighting effect or pattern. In the above manner, the lighting device can switch the visual effect faster when switching the lighting effect or pattern.
[0087] In one embodiment, sorting one or more sequence sets according to a set method further includes:
[0088] The one or more sequence sets are sorted based on the value of each color value in the first image.
[0089] In the embodiment of the present application, a control instruction may be generated based on the first image, the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, and before the electronic device sends the control instruction to the lighting device, the one or more sequence sets may be sorted based on the value of each color value in the first image. Wherein, based on the value of each color value in the first image, the one or more sequence sets may be sorted from large to small, or from small to large, or in other ways. Exemplarily, the pixels of the first image are 1 row and 4 columns of pixels, and the parsed color value of each pixel is [600 200 300 200]. If the bit value "1" is used to indicate that the bit corresponds to the color, and the bit value "0" indicates that the bit does not correspond to the color, the one or more sequence sets are sorted from small to large according to the value of each color value, that is, in the order of 200, 300, and 600, and the resulting sequence sets are: sequence set 1: color value 200, bitmap "0101"; sequence set 2: color value 300, bitmap "0010"; sequence set 3: color value 600, bitmap "1000".
[0090] In the embodiment of the present application, by sorting the one or more sequence sets based on the value of each color value in the first image, the lighting device can light up the lamp beads of corresponding color values in sequence based on the sorting of the one or more sequence sets. Therefore, when switching lighting effects or patterns, the color transition is smoother and softer, which is conducive to adding richer visual effects on the basis of improving the refresh rate.
[0091] In one embodiment, the electronic device establishes a communication connection with each lamp bead in the lighting device; correspondingly,
[0092] Send control commands to lighting devices, including:
[0093] The control instruction is sent to each lamp bead in the lighting device respectively.
[0094] In the embodiment of the present application, since the electronic device has established a communication connection with each lamp bead in the lighting device, the electronic device does not need to send different control instructions to each lamp bead separately, but can send the same control instruction to each lamp bead in the lighting device by wireless broadcasting, that is, the control instruction received by each lamp bead is the same control instruction. Each lamp bead determines whether the lamp bead associated with the bit generates light of the corresponding color value by looking up the bit value corresponding to the bit in each sequence set in the control instruction.
[0095] In the embodiment of the present application, a communication connection is established between the electronic device and each lamp bead in the lighting device. By sending control instructions to each lamp bead in the lighting device, wherein the control instructions received by each lamp bead are the same control instructions, each lamp bead can operate independently without affecting each other on the basis of improving the refresh rate, thereby improving the stability of the lighting device.
[0096] In one embodiment, the lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; sending the control instruction to the lighting device includes:
[0097] The control instruction is sent to each of the one or more control nodes respectively, so that each control node sends the control instruction to the lamp bead with which the communication connection is established.
[0098] In the embodiment of the present application, each control node can establish a communication connection with each lamp bead in a row of lamp beads, or can establish a communication connection with each lamp bead in a column of lamp beads, or can establish a communication connection with each lamp bead in a selected set. Exemplarily, there are 30 rows of lamp beads in the lighting device, each row has 40 lamp beads, and there are 30 control nodes, wherein each control node establishes a communication connection with each lamp bead in a row; there are 40 columns of lamp beads in the lighting device, each column has 20 lamp beads, and there are 40 control nodes, wherein each control node establishes a communication connection with each lamp bead in a column; there are 40 columns of lamp beads in the lighting device, each column has 50 lamp beads, and there are 10 control nodes, wherein each control node establishes a communication connection with each lamp bead in 4 columns.
[0099] In the embodiment of the present application, after receiving the control instruction, each control node sends the control instruction to the lamp bead with which the communication connection is established, so that the lamp bead emits light based on the control instruction. The control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, and each bit in the bitmap is associated with a lamp bead of the lighting device. After receiving the control instruction, the lamp bead determines whether to generate light of the corresponding color based on the bit value of the associated bit in each sequence set.
[0100] In the embodiment of the present application, the electronic device can send the control instruction to each control node by wireless communication connection or wired communication connection, so that each control node sends the control instruction to the lamp bead with established communication connection by wireless or wired method. Among them, the wireless communication connection method includes but is not limited to: wireless local area network (Wi-Fi) connection, Bluetooth connection, ZigBee connection, wireless broadcast connection, infrared connection and near field communication (NFC) connection. The wired communication connection method includes but is not limited to: twisted pair connection, coaxial cable connection, optical fiber connection and Ethernet connection.
[0101] In an embodiment of the present application, the lighting device also includes one or more control nodes, each control node establishes a communication connection with each lamp bead in a row of lamp beads, and the control instruction is sent to each control node in the one or more control nodes respectively, so that each control node sends the control instruction to the lamp bead with which the communication connection is established, thereby expanding the sending method of the control instruction and creating conditions for the control node to further process the control instruction.
[0102] The present application embodiment provides a lighting control method, which is applied to a lighting device. Figure 1 The lighting control method includes: step 201 and step 202.
[0103] The electronic device establishes a communication connection with a lighting device, and the lighting device includes one or more rows of lamp beads.
[0104] Step 201 and step 202 are described in detail below.
[0105] Step 201: The lighting device receives a control instruction sent by an electronic device.
[0106] Among them, the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead produces light of the corresponding color value.
[0107] In the embodiment of the present application, each lamp bead in the lighting device corresponds to displaying a pixel point in the first image. The corresponding relationship can be that the number, position and arrangement of each pixel point in the first image correspond to the number, position and arrangement of each lamp bead in the lighting device, so each lamp bead corresponds to displaying a pixel point in the first image. Therefore, when the lighting device is arranged by extending the lamp beads in one direction, that is, the lighting device is composed of a row of lamp beads, the first image is a one-dimensional image; when the lighting device is composed of multiple rows of lamp beads, the first image is a two-dimensional image.
[0108] In an embodiment of the present application, a lighting device receives a control instruction sent by an electronic device, the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, wherein the color value refers to a value obtained based on a pixel in a first image. The electronic device can obtain the color value in the following manner: each lamp bead in the lighting device corresponds to displaying a pixel in the first image, that is, the color displayed by each lamp bead corresponds to the color of each pixel, and each light color displayed is obtained by the change of the three colors of red (R), green (G), and blue (B) and their superposition, wherein the value of each color channel (red channel, green channel, blue channel) can be represented by 0 to 255, or by 8-bit binary. The color value received by the lighting device can be the value of the three color channels combined and converted into one value, and the combined and converted value can be a decimal value or a 24-bit binary value.
[0109] In the embodiment of the present application, after receiving the color value, the lighting device can parse the color value into R value, G value and B value. Exemplarily, on the lighting device side, when the values of the three color channels are combined and converted into one color value, the 8-bit value of the binary R value is shifted left by 16 bits, the 8-bit value of the binary G value is shifted left by 8 bits, and the 8-bit value of the binary B value remains unchanged; on the lighting device side, the received color value is "2313848", which is converted into binary as "001000110100111001111000", where the first 8 bits are the binary representation of the R value, which is "00100011", which is 35 when converted to decimal, where the middle 8 bits are the binary representation of the G value, which is "01001110", which is 78 when converted to decimal, where the last 8 bits are the binary representation of the B value, which is "01111000", which is 120 when converted to decimal, so the color value received by the lighting device is "2313848", and the parsing result can be that the R value is 35, the G value is 78, and the B value is 120, so that the lamp beads of the lighting device are controlled to emit lights of corresponding color values.
[0110] In the embodiment of the present application, the control instruction received by the lighting device includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, wherein each bit in the bitmap is associated with a lamp bead of the lighting device, and each lamp bead in the lighting device corresponds to a pixel in the first image, so the number of bits in the bitmap is equal to the number of lamp beads in the lighting device, and also equal to the number of pixels in the first image. Exemplarily, the lighting device has 30 rows of lamp beads, each row has 40 lamp beads, then the number of lamp beads is 1200, correspondingly, the first image has 1200 pixels, and the number of bits in the bitmap is 1200.
[0111] In the embodiment of the present application, each bit in the bitmap is not only associated with a lamp bead of the lighting device, but also each sequence set corresponds to a color value and includes a bitmap, that is, the color value and the bitmap also have a corresponding relationship, that is, the bit value corresponding to the bit in the bitmap is used to indicate whether the associated lamp bead produces light of the corresponding color value. Exemplarily, a bitmap contains multiple bits, each bit has a bit value, and the bit value of "1" is used to indicate that the associated lamp bead produces light of the corresponding color value, and the bit value of "0" is used to indicate that the associated lamp bead does not produce light of the corresponding color value; or, the bit value of "0" is used to indicate that the associated lamp bead produces light of the corresponding color value, and the bit value of "1" is used to indicate that the associated lamp bead does not produce light of the corresponding color value. Therefore, after the lighting device receives the control instruction, each lamp bead can determine whether to produce light of the color value corresponding to the bitmap according to the associated bit value in the bitmap.
[0112] In the embodiment of the present application, the color value in the sequence set can be represented by a 24-bit binary value in addition to being represented by a decimal value, so the color value represented by the binary value can be added to the front end or the end of the bitmap, that is, each sequence set includes a bitmap and a 24-bit color value. The lighting device receives the control instruction, which includes one or more sequence sets, and can parse out the 24-bit color value at the front end or the end of the bitmap, so that the lamp beads in the lighting device produce light of the corresponding color value.
[0113] In the embodiment of the present application, the color value in the sequence set received by the lighting device may be a default value, but the electronic device and the lighting device need to negotiate the sequence set order and the color value size. For example, the lamp beads in the lighting device can emit 100 different color values. The lighting device has 80 lamp beads corresponding to 80 bits of the bitmap, which also correspond to 80 pixels of the first image. Although the number of different color values corresponding to the 80 pixels does not exceed 80, 100 sequence sets can be sent in order from small to large according to the 100 different color values. There is no color value in each sequence set, only the bitmap corresponding to the color value. Since the electronic device and the lighting device can negotiate the sequence set order and the color value size in advance, the lighting device can parse that the first sequence set received corresponds to the smallest color value, and the last sequence set received corresponds to the largest color value.
[0114] Step 202: The lighting device controls each lamp bead in the lighting device to emit light based on the control instruction.
[0115] In an embodiment of the present application, a lighting device receives a control instruction, which includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and based on the bit value corresponding to the bit, each lamp bead in the lighting device is controlled to emit light of the corresponding color value.
[0116] In one embodiment, one or more sequence sets are arranged in a set manner in a control instruction; and based on the control instruction, each lamp bead in the lighting device is controlled to emit light, including:
[0117] Based on the order of one or more sequence sets in the control instruction, the lamp beads of corresponding color values are lit in sequence; wherein,
[0118] The setting method includes: sorting one or more sequence sets in descending order based on the number of occurrences of each color value in the first image; or sorting one or more sequence sets based on the value of each color value in the first image.
[0119] In an embodiment of the present application, one or more sequence sets are sorted in a control instruction according to a set method, and the set method includes two methods. Method 1: Sort one or more sequence sets in descending order based on the number of occurrences of each color value in the first image. For example, the pixels of the first image are pixels in 1 row and 6 columns, and the color value of each pixel obtained is [100 200 300 100 200 200], if the bit value "1" is used to indicate that the bit corresponds to the color, and the bit value "0" is used to indicate that the bit does not correspond to the color, the resulting sequence sets are: color value 100, bitmap "100100"; color value 200, bitmap "010011"; color value 300, bitmap "001000", where the color value 100 is taken twice, the color value 200 is taken three times, and the color value 300 is taken once. The one or more sequence sets are sorted from large to small according to the number of occurrences, and sequence set 1 is obtained: color value 200, bitmap "010011"; sequence set 2: color value 100, bitmap "100100"; color value 300, bitmap "001000". Method 2: Sort one or more sequence sets based on the value of each color value in the first image, wherein, based on the value of each color value in the first image, the one or more sequence sets can be sorted from large to small, or from small to large, or in other ways. Exemplarily, the pixels of the first image are 1 row and 4 columns of pixels, and the color value of each pixel obtained is [600200 300 200]. If the bit value "1" is used to indicate that the bit corresponds to the color, and the bit value "0" indicates that the bit does not correspond to the color, the one or more sequence sets are sorted from small to large according to the value of each color value, that is, in the order of 200, 300, and 600, and the resulting sequence sets are: sequence set 1: color value 200, bitmap "0101"; sequence set 2: color value 300, bitmap "0010"; sequence set 3: color value 600, bitmap "1000".
[0120] In the embodiment of the present application, the lighting device sequentially lights up the lamp beads of corresponding color values based on the order of one or more sequence sets in the control instruction, and when switching lighting effects or patterns, not only the refresh rate can be improved, but also multiple visual effects can be added. For example, when one or more sequence sets are sorted in descending order based on the number of occurrences of each color value in the first image, the lighting device can switch the visual effect faster when switching lighting effects or patterns; when one or more sequence sets are sorted based on the value of each color value in the first image, the color transition can be smoother and softer.
[0121] In one embodiment, the lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; receiving a control instruction sent by the electronic device includes:
[0122] Each of the one or more control nodes receives the control instruction sent by the electronic device respectively;
[0123] Based on the control instruction, controlling each lamp bead in the lighting device to emit light includes:
[0124] Each control node sends the control instruction to the lamp beads with which the communication connection is established, so that each lamp bead in the lighting device emits light.
[0125] In an embodiment of the present application, the lighting device further includes one or more control nodes, wherein each control node can establish a communication connection with each lamp bead in a row of lamp beads, can also establish a communication connection with each lamp bead in a column of lamp beads, or can also establish a communication connection with each lamp bead in a selected set. Exemplarily, there are 30 rows of lamp beads in the lighting device, each row has 40 lamp beads, and there are 30 control nodes, wherein each control node establishes a communication connection with each lamp bead in a row; there are 40 columns of lamp beads in the lighting device, each column has 20 lamp beads, and there are 40 control nodes, wherein each control node establishes a communication connection with each lamp bead in a column; there are 40 columns of lamp beads in the lighting device, each column has 50 lamp beads, and there are 10 control nodes, wherein each control node establishes a communication connection with each lamp bead in 4 columns.
[0126] In the embodiment of the present application, the lighting device receives a control instruction sent by an electronic device, specifically, each of one or more control nodes receives the control instruction sent by the electronic device, and then each control node sends the control instruction to a lamp bead with a communication connection established, so as to make each lamp bead in the lighting device emit light. The control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and after the lamp bead receives the control instruction, it determines whether to generate light of the corresponding color based on the bit value of the associated bit in each sequence set.
[0127] In one embodiment, each control node sends the control instruction to the lamp bead with which the communication connection is established, including:
[0128] Each control node processes the control instruction;
[0129] Each control node sends the processed control instructions to the lamp beads with established communication connection;
[0130] This processing includes:
[0131] In the control instruction, the first bit in the bitmap included in one or more sequence sets is deleted; the first bit represents a bit that is not associated with the lamp bead that has established a communication connection with the corresponding control node.
[0132] In an embodiment of the present application, after each control node receives the control instruction sent by the electronic device, it can process the control instruction and then send the processed control instruction to the lamp bead with which a communication connection is established. The processing method can be to delete the first bit in the bitmap included in one or more sequence sets, wherein the first bit represents a bit that is not associated with the lamp bead with which a communication connection is established with the corresponding control node. Since the lamp bead determines whether to generate light of the corresponding color based on the bit value of the associated bit in each sequence set after receiving the control instruction sent by the control node, each control node can only retain the bit associated with the lamp bead with which a communication connection is established with the control node.
[0133] In the embodiment of the present application, exemplarily, the lighting device has 3 rows of lamp beads, each row has 4 lamp beads, each row of lamp beads has 1 control node, there are 3 control nodes in total, and each control node establishes a communication connection with each lamp bead in a row of lamp beads. Since each bit in the bitmap is associated with a lamp bead of the lighting device, the bitmap of each sequence set in the control instruction has 3×4=12 bits. Among them, there are 4 bits associated with the lamp beads that have established a communication connection with each control node, that is, the 4 lamp beads in the row corresponding to the control node; there are 8 bits that are not associated with the lamp beads that have established a communication connection with each control node, that is, the 8 lamp beads in other rows corresponding to the control node. The 8 bits that are not associated with the lamp beads that have established a communication connection with each control node are called the first bits, and each control node deletes the first bit in the bitmap in the above sequence set, that is, in the control instruction processed by each control node, there are only 4 bits left in the bitmap of the sequence set, which are associated with the lamp beads that have established a communication connection with each control node. Therefore, each control node sends the processed control instructions to the lamp beads with which the communication connection is established, which can also make each lamp bead in the lighting device emit light based on the processed control instructions.
[0134] In the embodiment of the present application, each control node processes the control instruction, and each control node sends the processed control instruction to the lamp bead with which the communication connection is established, wherein the processing includes: in the control instruction, deleting the first bit in the bitmap included in one or more sequence sets, wherein the first bit represents the bit that is not associated with the lamp bead with which the communication connection is established with the corresponding control node. In the above manner, the lamp bead can receive control instructions with fewer bits, thereby saving communication costs.
[0135] The present application is further described in detail below in conjunction with application examples.
[0136] Step 1: The electronic device is connected to the lighting device for communication.
[0137] Step 2: The electronic device obtains the original image and scales the original image to obtain the first image. Each lamp bead in the lighting device is used to display a pixel in the first image. The first image is 3×3 pixels, and correspondingly, the lighting device is 3 rows and 3 columns of lamp beads.
[0138] Step 3: The electronic device processes each pixel of the first image to obtain the color value in the control instruction. Specifically, the color of each pixel is composed of three colors: red (R), green (G), and blue (B). Formula C in step 101 of the present application is used. i =P(R i ,G i ,B i ), the values of the three color channels of each pixel are combined and converted into a color value. Since the first image is a 3×3 pixel, the matrix of the obtained color value is also a 3×3 matrix, exemplarily:
[0139]
[0140] After reducing the dimension of the above matrix, we get:
[0141] [C 11 C 12 C 13 C 21 C 22 C 23 C 31 C 32 C 33 ]=[246524245]
[0142] Step 4: The electronic device processes each pixel of the first image to obtain a bitmap in the control instruction. In the example of step 3, color value 2 appears 3 times, color value 4 appears 3 times, color value 5 appears 2 times, and color value 6 appears 1 time. It is necessary not only to count the number of times each color value appears, but also to find the position of each color value in the first pixel to generate a bitmap. Assuming that the bit value "1" indicates that the color value is at this position, and the bit value "0" indicates that the color value is not at this position, then the bitmap corresponding to color value 6 is "001000000"; the bitmap corresponding to color value 5 is "000100001"; the bitmap corresponding to color value 4 is "010001010"; and the bitmap corresponding to color value 2 is "100010100".
[0143] Step 5: The electronic device processes each pixel of the first image to obtain a control instruction, which includes 4 sequence sets, each of which corresponds to a color value and includes a bitmap. Based on the color value from large to small, the 4 sequence sets are sorted to obtain:
[0144] Sequence set 1: color value 6, bitmap "001000000";
[0145] Sequence set 2: color value 5, bitmap "000100001";
[0146] Sequence set 3: color value 4, bitmap "010001010";
[0147] Sequence set 4: Color value 2, bitmap "100010100".
[0148] Step 6: The electronic device sends a control instruction to each lamp bead of the lighting device, so that each lamp bead determines whether to generate light of a corresponding color value according to the bit value corresponding to the bit position in the bitmap.
[0149] It can be seen from the above application embodiments that when the number of lamp beads is large, the control instructions received by each lamp bead are the same. It is only necessary to parse the color value and bitmap to know whether the light of the corresponding color value needs to be lit. No other device address information does not need to be carried in the control instruction, so the communication link cost can be effectively reduced, and the throughput of effective data can be increased, thereby improving the refresh rate when switching lighting effects or patterns.
[0150] In order to implement the lighting control method of the embodiment of the present application applied to the electronic device, the embodiment of the present application also provides a lighting control device, such as Figure 3 Said device comprises:
[0151] A generating unit 301, configured to generate a control instruction based on the first image;
[0152] The control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value;
[0153] The sending unit 302 is used to send the control instruction to the lighting device, so that each lamp bead in the lighting device emits light based on the control instruction.
[0154] In one embodiment, the device further comprises:
[0155] A parsing unit, configured to parse each pixel of the first image to obtain one or more sequence sets;
[0156] A sorting unit, used to sort one or more sequence sets in a set manner;
[0157] The generating unit 301 is further configured to generate a control instruction based on the sorted one or more sequence sets, so that the lighting device sequentially lights up lamp beads of corresponding color values based on the sorting of the one or more sequence sets.
[0158] In one embodiment, the device further comprises:
[0159] The sorting unit is further used to sort the one or more sequence sets from large to small according to the number of occurrences of each color value in the first image; or, it is also used to sort the one or more sequence sets based on the value of each color value in the first image.
[0160] In one embodiment, the electronic device establishes a communication connection with each lamp bead in the lighting device, and the device further includes:
[0161] The sending unit 302 is further used to send the control instruction to each lamp bead in the lighting device respectively.
[0162] In one embodiment, the lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads, and the device further includes:
[0163] The sending unit 302 is further used to send the control instruction to each of the one or more control nodes respectively, so that each control node sends the control instruction to the lamp bead with which the communication connection is established.
[0164] In order to implement the lighting control method applied to a lighting device in the embodiment of the present application, the embodiment of the present application also provides a lighting control device, such as Figure 4 Said device comprises:
[0165] The receiving unit 401 is used to receive a control instruction sent by an electronic device;
[0166] Among them, the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead produces light of the corresponding color value.
[0167] The control unit 402 is used to control each lamp bead in the lighting device to emit light based on the control instruction.
[0168] In one embodiment, one or more sequence sets are sorted in a set manner in the control instruction, and the device further includes:
[0169] The control unit 402 is further used to sequentially light up the lamp beads of corresponding color values based on the order of one or more sequence sets in the control instruction; wherein,
[0170] The setting method includes: sorting one or more sequence sets in descending order based on the number of occurrences of each color value in the first image; or sorting one or more sequence sets based on the value of each color value in the first image.
[0171] In one embodiment, the lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; the device further includes:
[0172] The receiving unit 401 is further configured for each of the one or more control nodes to receive the control instruction sent by the electronic device respectively;
[0173] The control unit 402 is also used for each control node to send the control instruction to the lamp beads with which the communication connection is established, so that each lamp bead in the lighting device emits light.
[0174] In one embodiment, the device further comprises:
[0175] The control unit 402 is also used for each control node to process the control instruction; each control node sends the processed control instruction to the lamp bead with which the communication connection is established; wherein,
[0176] This processing includes:
[0177] In the control instruction, the first bit in the bitmap included in one or more sequence sets is deleted; the first bit represents a bit that is not associated with the lamp bead that has established a communication connection with the corresponding control node.
[0178] Based on the hardware implementation of the above program modules, and in order to implement a lighting control method applied to an electronic device or a lighting device, the embodiment of the present application further provides a device, such as Figure 5 As shown, the device 500 includes:
[0179] Communication interface 501, capable of exchanging information with other network nodes;
[0180] The processor 502 is connected to the communication interface 501 to implement information exchange with other network nodes, and is used to execute the method provided by one or more technical solutions when running a computer program. The computer program is stored in the memory 503.
[0181] When the processor 502 runs the computer program to execute the above one or more lighting control methods, specifically:
[0182] When applied to an electronic device, the processor 502 is used to:
[0183] The electronic device generates a control instruction based on the first image.
[0184] Among them, the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead produces light of the corresponding color value.
[0185] The electronic device sends the control instruction to the lighting device, so that each lamp bead in the lighting device emits light based on the control instruction.
[0186] In one embodiment, the processor 502 is further configured to:
[0187] Based on the first image, a control instruction is generated, including:
[0188] Parsing each pixel of the first image to obtain one or more sequence sets;
[0189] Sort one or more sequence sets in a set manner;
[0190] Based on the sorted one or more sequence sets, a control instruction is generated to enable the lighting device to light up lamp beads of corresponding color values in sequence based on the sorting of the one or more sequence sets.
[0191] In one embodiment, the processor 502 is further configured to:
[0192] Sort one or more sequence sets in a specified way, including:
[0193] Based on the number of occurrences of each color value in the first image, the one or more sequence sets are sorted from large to small according to the number of occurrences.
[0194] In one embodiment, the processor 502 is further configured to:
[0195] Sort one or more sequence sets in a specified way, including:
[0196] The one or more sequence sets are sorted based on the value of each color value in the first image.
[0197] In one embodiment, the processor 502 is further configured to:
[0198] The electronic device establishes a communication connection with each lamp bead in the lighting device; correspondingly,
[0199] Send control commands to lighting devices, including:
[0200] The control instruction is sent to each lamp bead in the lighting device respectively.
[0201] In one embodiment, the lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; the processor 502 is further configured to:
[0202] Sending the control instruction to the lighting device includes:
[0203] The control instruction is sent to each of the one or more control nodes respectively, so that each control node sends the control instruction to the lamp bead with which the communication connection is established.
[0204] When applied to a lighting device, the processor 502 is used to:
[0205] Receiving control instructions sent by electronic equipment;
[0206] The control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each sequence set corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value;
[0207] Based on the control instruction, each lamp bead in the lighting device is controlled to emit light.
[0208] In one embodiment, the processor 502 is further configured to:
[0209] One or more sequence sets are arranged in a set manner in the control instruction; based on the control instruction, each lamp bead in the lighting device is controlled to emit light, including:
[0210] Based on the order of one or more sequence sets in the control instruction, the lamp beads of corresponding color values are lit in sequence; wherein,
[0211] The setting method includes: sorting one or more sequence sets in descending order based on the number of occurrences of each color value in the first image; or sorting one or more sequence sets based on the value of each color value in the first image.
[0212] In one embodiment, the processor 502 is further configured to:
[0213] The lighting device also includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; receiving a control instruction sent by the electronic device, including:
[0214] Each of the one or more control nodes receives the control instruction sent by the electronic device respectively;
[0215] Based on the control instruction, controlling each lamp bead in the lighting device to emit light includes:
[0216] Each control node sends the control instruction to the lamp beads with which the communication connection is established, so that each lamp bead in the lighting device emits light.
[0217] In one embodiment, the processor 502 is further configured to:
[0218] Each control node sends the control command to the lamp beads with established communication connection, including:
[0219] Each control node processes the control instruction;
[0220] Each control node sends the processed control instructions to the lamp beads with established communication connection;
[0221] This processing includes:
[0222] In the control instruction, the first bit in the bitmap included in one or more sequence sets is deleted; the first bit represents a bit that is not associated with the lamp bead that has established a communication connection with the corresponding control node.
[0223] It should be noted that the specific processing process of the processor 502 and the communication interface 501 can be understood by referring to the above method.
[0224] Of course, in actual application, the various components in the device 500 are coupled together through the bus system 504. It can be understood that the bus system 504 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 504 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 504 .
[0225] The memory 503 in the embodiment of the present application is used to store various types of data to support the operation of the device 500. Examples of such data include: any computer program used to operate on the device 500.
[0226] The method disclosed in the above embodiment of the present application can be applied to the processor 502, or implemented by the processor 502. The processor 502 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 502. The above processor 502 may be a general processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 502 can implement or execute the various methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 503, and the processor 502 reads the information in the memory 503 and completes the steps of the above method in combination with its hardware.
[0227] In an exemplary embodiment, the device 500 can be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned method.
[0228] It can be understood that the memory 503 of the embodiment of the present application can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM, SyncLink Dynamic Random Access Memory), and direct RAMbus random access memory (DRRAM, Direct Rambus Random Access Memory).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.
[0229] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, specifically a computer-readable storage medium, for example, including a memory 503 storing a computer program, and the computer program can be executed by a processor 502 of a device 500 to complete the steps of the method on the electronic device side or the lighting device side. The computer-readable storage medium can be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface storage, optical disk, or CD-ROM.
[0230] Illustratively, an embodiment of the present application further provides a computer program product, including a computer program, which can be executed by the processor 502 of the device 500 to complete the steps of the method on the electronic device side or the lighting device side.
[0231] In the embodiment of the present application, the control node may also be referred to as a network function, a network element, an entity, a network device, a network side device, etc.
[0232] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0233] The term "one or more" herein refers to any combination of at least two of any one or more of a plurality, for example, including at least one of A, B, and C may refer to any one or more elements selected from the set consisting of A, B, and C. The term "one or more" herein refers to any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, and C may refer to any one or more elements selected from the set consisting of A, B, and C.
[0234] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0235] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A lighting control method, characterized in that: Applied to electronic equipment, the electronic equipment establishes a communication connection with a lighting device, and the lighting device includes one or more rows of lamp beads; The method comprises: Based on the first image, a control instruction is generated; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of which corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value; The control instruction is sent to the lighting device so that each lamp bead in the lighting device emits light based on the control instruction.
2. The method according to claim 1, characterized in that The step of generating a control instruction based on the first image includes: Parsing each pixel of the first image to obtain the one or more sequence sets; sorting the one or more sequence sets in a set manner; Based on the sorted one or more sequence sets, the control instruction is generated to enable the lighting device to light up lamp beads of corresponding color values in sequence based on the sorting of the one or more sequence sets.
3. The method according to claim 2, characterized in that The step of sorting the one or more sequence sets in a set manner includes: Based on the number of occurrences of each color value in the first image, the one or more sequence sets are sorted from large to small according to the number of occurrences.
4. The method according to claim 2, characterized in that: The step of sorting the one or more sequence sets in a set manner includes: The one or more sequence sets are sorted based on the value of each color value in the first image.
5. The method according to claim 1, characterized in that The electronic device establishes a communication connection with each lamp bead in the lighting device; correspondingly, The sending the control instruction to the lighting device includes: The control instruction is sent to each lamp bead in the lighting device respectively.
6. The method according to claim 1, characterized in that The lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; sending the control instruction to the lighting device includes: The control instruction is sent to each of the one or more control nodes respectively, so that each control node sends the control instruction to the lamp bead with which the communication connection is established.
7. A lighting control method, characterized in that: Applicable to a lighting device, the lighting device comprises one or more rows of lamp beads, and the lighting device is in communication connection with an electronic device; The method comprises: Receive a control instruction sent by the electronic device; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of the sequence sets corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value; Based on the control instruction, each lamp bead in the lighting device is controlled to emit light.
8. The method according to claim 7, characterized in that The one or more sequence sets are arranged in a set manner in the control instruction; and the controlling each lamp bead in the lighting device to emit light based on the control instruction includes: Based on the order of the one or more sequence sets in the control instruction, the lamp beads of corresponding color values are lit in sequence; wherein, The setting method includes: sorting the one or more sequence sets in descending order based on the number of occurrences of each color value in the first image; or sorting the one or more sequence sets based on the value of each color value in the first image.
9. The method according to claim 7, characterized in that: The lighting device further includes one or more control nodes, wherein each control node establishes a communication connection with each lamp bead in a row of lamp beads; the receiving of the control instruction sent by the electronic device includes: Each of the one or more control nodes receives the control instruction sent by the electronic device respectively; The step of controlling each lamp bead in the lighting device to emit light based on the control instruction includes: Each control node sends the control instruction to the lamp beads with which the communication connection is established, so that each lamp bead in the lighting device emits light.
10. The method according to claim 9, characterized in that Each control node sends the control instruction to the lamp bead with which the communication connection is established, including: Each control node processes the control instruction; Each control node sends the processed control instructions to the lamp beads with which the communication connection is established; wherein, The processing includes: In the control instruction, the first bit in the bitmap included in the one or more sequence sets is deleted; the first bit represents a bit that is not associated with the lamp bead that has established a communication connection with the corresponding control node.
11. A lighting control device, characterized in that: Applied to electronic equipment, the electronic equipment establishes a communication connection with a lighting device, and the lighting device includes one or more rows of lamp beads; The device comprises: A generating unit, configured to generate a control instruction based on the first image; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of which corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value; The sending unit is used to send the control instruction to the lighting device, so that each lamp bead in the lighting device emits light based on the control instruction.
12. A lighting control device, characterized in that: Applicable to a lighting device, the lighting device comprises one or more rows of lamp beads, and the lighting device is in communication connection with an electronic device; The device comprises: A receiving unit, configured to receive a control instruction sent by the electronic device; the control instruction is used to control each lamp bead in the lighting device to display a pixel point in the first image; the control instruction includes one or more sequence sets, each of which corresponds to a color value and includes a bitmap, each bit in the bitmap is associated with a lamp bead of the lighting device, and the bit value corresponding to the bit is used to indicate whether the associated lamp bead generates light of a corresponding color value; The control unit is used to control each lamp bead in the lighting device to emit light based on the control instruction.
13. A device, characterized in that The invention comprises a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and the processor is used to execute the lighting control method according to any one of claims 1 to 6, or to execute the lighting control method according to any one of claims 7 to 10.
14. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6, or is used to execute the steps of the method according to any one of claims 7 to 10.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 6, or implements the steps of the method according to any one of claims 7 to 10.
Citation Information
Cited By
Equipment control method and device
CN117914355A
