Lighting control method and device for lighting equipment, electronic equipment, and medium

By obtaining and parsing the configuration files of smart lighting devices to generate control instructions, the problem of unified control of smart lights from different manufacturers is solved, efficient and accurate lighting adjustment is achieved, and the user experience is improved.

CN120343789BActive Publication Date: 2025-09-05GREE ELECTRIC APPLIANCE INC OF ZHUHAI +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510812964.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-18
Publication Date
2025-09-05
Estimated Expiration
2045-06-18

AI Technical Summary

Technical Problem

Existing smart light control systems make it difficult to achieve unified, efficient, and precise control of smart lights from different manufacturers, resulting in cumbersome user operations and poor lighting quality and visual experience.

Method used

By obtaining preset format configuration files of smart lighting devices from multiple different manufacturers, parsing the configuration information, generating control instructions and sending them to the target lighting devices for lighting adjustment, it supports unified lighting control of multiple manufacturers.

Benefits of technology

It achieves unified, efficient and precise lighting control of smart lamps from different manufacturers, simplifies user operations, and improves lighting quality and visual experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120343789B_ABST
    Figure CN120343789B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention provides a lighting control method and apparatus, electronic device, and medium for a lighting device. The method includes: responding to a startup operation of an application for performing lighting control on a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining a configuration file of a preset format for the plurality of candidate lighting devices; parsing the configuration file to obtain configuration information for each candidate lighting device; responding to a target adjustment operation for performing lighting adjustment on one or more target lighting devices among the plurality of candidate lighting devices, generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information; and sending the control instructions to the corresponding target lighting device to control the target lighting device to perform lighting adjustment. Through the embodiment of the present invention, unified, efficient, and accurate lighting control for lighting devices from different manufacturers is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of device control, and in particular to a lighting control method and device for a lighting device, an electronic device, and a storage medium. Background Art

[0002] In today's era of rapid development of smart lighting, consumers are increasingly demanding personalized and diverse lighting environments. Different scenarios, such as living rooms, bedrooms, and study rooms in homes, as well as showrooms, restaurants, and conference rooms in commercial spaces, all require flexible and precise adjustments to lighting color temperature, brightness, and color. Different scenarios and needs require different lighting. For example, in an office environment, higher color temperature lighting helps improve work efficiency, while lower color temperature lighting can create a comfortable and relaxing atmosphere in rest areas.

[0003] However, there are numerous smart light brands on the market, and each manufacturer's smart lights vary significantly in their control methods, protocols, and color temperature, brightness, and color adjustment standards. This makes unified, efficient lighting control challenging in scenarios requiring the integration of multiple smart lights, making centralized, precise control of smart lights from different manufacturers difficult. Users often need to set up and debug each manufacturer's smart light separately, a cumbersome and inefficient process. Improper debugging can also impact overall lighting quality and visual experience. Summary of the Invention

[0004] In view of the above problems, a lighting control method and device for a lighting device, an electronic device, and a storage medium are proposed to overcome or at least partially solve the above problems, including:

[0005] A lighting control method for a lighting device, the method comprising:

[0006] In response to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining configuration files of the plurality of candidate lighting devices in a preset format;

[0007] Parsing the configuration file to obtain configuration information of each candidate lighting device;

[0008] In response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information;

[0009] The control instruction is sent to the corresponding target lighting device to control the target lighting device to adjust the light.

[0010] Optionally, the responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information, includes:

[0011] In response to a target adjustment operation for performing light adjustment on one or more target lamp devices among the plurality of candidate lamp devices, determining an adjustment target value corresponding to each target lamp device according to the target adjustment operation and the configuration information;

[0012] A control instruction corresponding to the target lighting device is generated based on the adjustment target value and the configuration information.

[0013] Optionally, responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and determining an adjustment target value corresponding to each target lighting device according to the target adjustment operation and the configuration information, includes:

[0014] In response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, determining a light adjustment type and an adjustment percentage corresponding to the target adjustment operation;

[0015] Determine the adjustment range and adjustment method corresponding to the configuration information according to the lighting adjustment type;

[0016] Determining an initial adjustment value according to the adjustment percentage and the adjustment range;

[0017] An adjustment target value is determined according to the adjustment initial value and the adjustment method.

[0018] Optionally, the generating a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information includes:

[0019] Determining a communication protocol type corresponding to the target lighting device based on the configuration information;

[0020] The adjustment target value is encapsulated into an instruction according to the communication protocol type to generate a control instruction corresponding to the target lighting device.

[0021] Optionally, the method further includes:

[0022] In response to an update operation for updating the configuration file, the configuration file is updated.

[0023] Optionally, before responding to the start-up operation of the application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, the method further includes:

[0024] The multiple candidate lighting devices are networked.

[0025] Optionally, determining the initial adjustment value according to the adjustment percentage and the adjustment range includes:

[0026] Determine the difference between the maximum value and the minimum value according to the adjustment range;

[0027] A product obtained by multiplying the difference and the adjustment percentage is determined, and the product is added to the minimum value to obtain an initial adjustment value.

[0028] Optionally, determining the adjustment target value according to the adjustment initial value and the adjustment method includes:

[0029] Determine the current lighting parameters of each candidate lighting device;

[0030] An adjustment target value is determined based on the current lighting parameter, the initial adjustment value, and the adjustment method.

[0031] Optionally, determining the adjustment target value based on the current lighting parameter, the initial adjustment value, and the adjustment method includes:

[0032] When the adjustment method corresponding to the light adjustment type is adjustment according to a preset adjustment step, the adjustment is performed up or down according to the preset adjustment step based on the current light parameters and the size of the initial adjustment value to determine the adjustment target value closest to the initial adjustment value.

[0033] A lighting control device for a lighting device, the device comprising:

[0034] a configuration file acquisition module, configured to respond to a startup operation of an application program for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, and acquire configuration files of the plurality of candidate lighting devices in a preset format;

[0035] A configuration information determination module, configured to parse the configuration file to obtain configuration information of each candidate lighting device;

[0036] a control instruction generating module, configured to respond to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and generate control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information;

[0037] The light adjustment module is used to send the control instruction to the corresponding target lighting device to control the target lighting device to perform light adjustment.

[0038] An electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program implements the lighting control method of the lighting device described above when executed by the processor.

[0039] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the light control method of the lighting device described above is implemented.

[0040] The embodiments of the present invention have the following advantages:

[0041] The embodiment of the present invention obtains configuration files of a preset format for multiple candidate lighting devices by responding to the startup operation of an application for performing lighting control on multiple candidate lighting devices produced by multiple different manufacturers; parses the configuration file to obtain configuration information of each candidate lighting device; responds to a target adjustment operation for performing lighting adjustment on one or more target lighting devices among the multiple candidate lighting devices, and generates control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information; sends the control instructions to the corresponding target lighting devices to control the target lighting devices to perform lighting adjustment, thereby realizing unified, efficient and accurate lighting control for lighting devices from different manufacturers by generating control instructions through pre-set configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the description of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0043] Figure 1 This is a flowchart of the steps of a lighting control method for a lighting device provided by one embodiment of the present invention;

[0044] Figure 2 This is a flowchart of the steps of another lighting control method for a lighting device provided by one embodiment of the present invention;

[0045] Figure 3 This is a flowchart of the steps of another lighting control method for a lighting device provided by an embodiment of the present invention;

[0046] Figure 4 This is a flowchart of a lighting configuration and control method provided by one embodiment of the present invention;

[0047] Figure 5 It is a structural diagram of a lighting control device for a lighting device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.

[0049] Reference Figure 1 , shows a flowchart of a lighting control method for a lighting device provided by an embodiment of the present invention, which may specifically include the following steps:

[0050] Step S101, in response to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining configuration files of a preset format for the plurality of candidate lighting devices;

[0051] The lighting devices in the embodiments of the present invention can be lighting devices used in various scenarios. The multiple candidate lighting devices can be multiple lighting devices associated with the same scenario, such as multiple lighting devices used in a living room. The multiple candidate lighting devices in the embodiments of the present invention can be controlled by the same application and can be produced by different manufacturers. The lighting devices can communicate based on the same or different communication protocols, such as ZigBee, Wi-Fi, Bluetooth, etc.

[0052] In an embodiment of the present invention, the configuration information of each candidate lighting device may be pre-stored in a configuration file in a preset format, wherein the preset format may be JSON format. The configuration information may include, but is not limited to, any of the following: manufacturer name, device model, device name, device model, manufacturer, communication protocol type, color temperature adjustment range, color temperature adjustment step, brightness range, color adjustment range, etc. In actual applications, the configuration file may use the manufacturer name and device model as the key, and the content may include the device name, device model, manufacturer, communication protocol type, color temperature adjustment range, color temperature adjustment step, brightness range, color adjustment range, etc.

[0053] For example, for smart light 1 from manufacturer A and smart light 2 from manufacturer B, using color temperature as an example, the configuration in the configuration file is:

[0054] "Manufacturer A + Smart Light 1": {

[0055] “Communication protocol type”: “WiFi”,

[0056] “Color temperature adjustment range”: {“max”: 6500, “min”: 2700},

[0057] "Color temperature adjustment step": 200,

[0058] },

[0059] "Manufacturer B + Smart Light 2": {

[0060] “Communication protocol type”: “BLE”,

[0061] “Color temperature adjustment range”: {“max”: 6400, “min”: 2700},

[0062] "Color temperature adjustment step": 100,

[0063] }

[0064] In the embodiment of the present invention, when the application is started, configuration files of multiple candidate lighting devices to be controlled may be obtained, so that the user can implement unified lighting control of lighting devices from multiple different manufacturers through the configuration files.

[0065] In an embodiment of the present invention, before responding to the start operation of the application for controlling lighting of multiple candidate lighting devices produced by multiple different manufacturers, the multiple candidate lighting devices may be network-connected.

[0066] Through the distribution network, lighting control of multiple candidate lighting devices is achieved through the application.

[0067] Step S102: Parse the configuration file to obtain configuration information of each candidate lighting device;

[0068] After obtaining the configuration file, you can obtain the parsing algorithm corresponding to the configuration file and parse the configuration file. The parsing algorithm can be specifically set according to the configuration file.

[0069] Step S103, in response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information;

[0070] When a user selects multiple target lighting devices for unified adjustment in the APP, the target adjustment operation can be determined, and then corresponding control instructions can be generated for each target lighting device based on the target adjustment operation and configuration information.

[0071] During this process, even for lighting devices from different manufacturers, each corresponding control instruction can be obtained through the target adjustment operation on the application, so as to perform unified control on the target lighting devices of different manufacturers.

[0072] Step S104 : sending the control instruction to the corresponding target lighting device to control the target lighting device to adjust the light.

[0073] After obtaining the control instructions, each control instruction may be sent to a corresponding target lighting device, so that each target lighting device may implement light adjustment based on the received control instructions.

[0074] In an embodiment of the present invention, by responding to the startup operation of an application for performing lighting control on multiple candidate lighting devices produced by multiple different manufacturers, a configuration file in a preset format of multiple candidate lighting devices is obtained; the configuration file is parsed to obtain configuration information of each candidate lighting device; in response to a target adjustment operation for performing lighting adjustment on one or more target lighting devices among the multiple candidate lighting devices, control instructions corresponding to one or more target lighting devices are generated according to the target adjustment operation and the configuration information; the control instructions are sent to the corresponding target lighting devices to control the target lighting devices to perform lighting adjustment, thereby achieving unified, efficient and accurate lighting control for lighting devices from different manufacturers by generating control instructions through pre-set configuration.

[0075] Reference Figure 2 , shows a flowchart of another lighting control method for a lighting device provided by an embodiment of the present invention, which may specifically include the following steps:

[0076] Step S201, in response to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining configuration files of a preset format for the plurality of candidate lighting devices;

[0077] Step S202: Parse the configuration file to obtain configuration information of each candidate lighting device;

[0078] Step S203, in response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, determining an adjustment target value corresponding to each target lighting device according to the target adjustment operation and the configuration information;

[0079] In actual applications, the application may generate an adjustment target value based on the user's target adjustment operation in combination with the configuration information, wherein the adjustment target value may be a light value that can actually be adjusted according to the user's expectations.

[0080] In the embodiment of the present invention, the adjustment of the light may include, but is not limited to, any one or more of the following: color temperature, brightness.

[0081] In one embodiment of the present invention, step S203 may include the following sub-steps:

[0082] Sub-step S11, in response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, determining a light adjustment type and an adjustment percentage corresponding to the target adjustment operation;

[0083] The adjustment type may be a color temperature adjustment type or a brightness adjustment type. The adjustment percentage may be an adjustment percentage selected by the user during adjustment using an application, and the adjustment percentage is between 0% and 100%.

[0084] Sub-step S12, determining the adjustment range and adjustment method corresponding to the configuration information according to the lighting adjustment type;

[0085] After determining the lighting adjustment type, you can search the configuration information for the corresponding adjustment range and adjustment method based on the lighting adjustment type. The adjustment range includes the maximum and minimum values ​​for the data type. The adjustment method can be set according to the different adjustment types. For example, color temperature can be adjusted in preset adjustment steps, and brightness can be adjusted in percentages (brightness range is 0.1% to 100%).

[0086] Sub-step S13, determining the initial adjustment value according to the adjustment percentage and the adjustment range;

[0087] The initial adjustment value may be a light value that the user desires to adjust.

[0088] Sub-step S14: determining the adjustment target value according to the adjustment initial value and the adjustment method.

[0089] The target adjustment value may be a light value that can be actually adjusted according to user expectations.

[0090] Step S204: Generate a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information.

[0091] After determining the adjustment target value, control instructions corresponding to different target lighting devices can be generated by combining the configuration information.

[0092] In one embodiment of the present invention, a control instruction corresponding to a target lighting device is generated based on an adjustment target value and configuration information, including: determining a communication protocol type corresponding to the target lighting device based on the configuration information; and encapsulating the adjustment target value into an instruction according to the communication protocol type to generate a control instruction corresponding to the target lighting device.

[0093] In step S205 , the control instruction is sent to the corresponding target lighting device to control the target lighting device to adjust the light.

[0094] In one embodiment of the present invention, determining the initial adjustment value based on the adjustment percentage and the adjustment range includes: determining the difference between the maximum value and the minimum value based on the adjustment range; determining the product obtained by multiplying the difference and the adjustment percentage, and adding the product to the minimum value to obtain the initial adjustment value.

[0095] That is, difference = maximum value - minimum value; difference * adjustment percentage + minimum value = initial adjustment value.

[0096] In one embodiment of the present invention, determining the adjustment target value according to the initial adjustment value and the adjustment method includes: determining the current lighting parameters of each candidate lighting device; and determining the adjustment target value based on the current lighting parameters, the initial adjustment value, and the adjustment method.

[0097] When determining the target adjustment value, it can be determined in combination with the current lighting parameters, where the current lighting parameters are real-time data and the initial adjustment value is the expected value. Based on different adjustment methods, adjustments are made to obtain the actual achievable target adjustment value. The target adjustment value is the data that is closest to the initial adjustment value that can be adjusted.

[0098] In one embodiment of the present invention, an adjustment target value is determined based on the current lighting parameters, the initial adjustment value, and the adjustment method, including: when the adjustment method corresponding to the lighting adjustment type is adjustment according to a preset adjustment step, the adjustment is adjusted up or down according to the preset adjustment step according to the current lighting parameters and the size of the initial adjustment value to determine the adjustment target value closest to the initial adjustment value.

[0099] Specifically, when the current lighting parameter is greater than the initial adjustment value, it is determined to be adjusted downward; when the current lighting parameter is less than the initial adjustment value, it is determined to be adjusted downward; when the current lighting parameter is equal to the initial adjustment value, no adjustment is required.

[0100] The following is an explanation based on actual lighting control:

[0101] When controlling smart lights, read the configuration of the smart lights in real time. Taking smart lights 1 from manufacturer A and smart lights 2 from manufacturer B, and taking color temperature as an example, the configuration in the configuration file is:

[0102] "Manufacturer A + Smart Light 1": {

[0103] “Communication protocol type”: “WiFi”,

[0104] “Color temperature adjustment range”: {“max”: 6500, “min”: 2700},

[0105] "Color temperature adjustment step": 200,

[0106] },

[0107] "Manufacturer B + Smart Light 2": {

[0108] “Communication protocol type”: “BLE”,

[0109] “Color temperature adjustment range”: {“max”: 6400, “min”: 2700},

[0110] "Color temperature adjustment step": 100,

[0111] }

[0112] Suppose you're controlling Smart Light 1 and Smart Light 2 simultaneously and adjusting their color temperatures to 60%. Multiply the maximum and minimum values ​​within the color temperature adjustment range by 60% to get the final color temperature value. Then, round up or down to the nearest integer based on the color temperature adjustment step size to obtain the final controlled color temperature value. Because these two lights use different communication protocols, control commands are sent using the corresponding method based on the communication protocol configured in the configuration file to achieve the desired control effect.

[0113] In an embodiment of the present invention, by responding to the startup operation of an application for performing lighting control on multiple candidate lighting devices produced by multiple different manufacturers, a configuration file in a preset format of multiple candidate lighting devices is obtained; the configuration file is parsed to obtain configuration information of each candidate lighting device; in response to a target adjustment operation for performing lighting adjustment on one or more target lighting devices among the multiple candidate lighting devices, control instructions corresponding to one or more target lighting devices are generated according to the target adjustment operation and the configuration information; the control instructions are sent to the corresponding target lighting devices to control the target lighting devices to perform lighting adjustment, thereby achieving unified, efficient and accurate lighting control for lighting devices from different manufacturers by generating control instructions through pre-set configuration.

[0114] Reference Figure 3 , shows a flowchart of a lighting control method for a lighting device provided by an embodiment of the present invention, which may specifically include the following steps:

[0115] Step S301, in response to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining configuration files of a preset format for the plurality of candidate lighting devices;

[0116] Step S302: Parse the configuration file to obtain configuration information of each candidate lighting device;

[0117] Step S303, in response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information;

[0118] Step S304: sending the control instruction to the corresponding target lighting device to control the target lighting device to adjust the light.

[0119] Step S305 , in response to the update operation for updating the configuration file, the configuration file is updated.

[0120] In practice, the app can dynamically update JSON configuration files. This means that when you need to adjust the settings of a smart light, you simply modify the corresponding JSON configuration file to quickly adjust the lighting configuration. After the configuration file is updated, the app will detect the change when you launch it and reconfigure and control the smart light device based on the new configuration.

[0121] In an embodiment of the present invention, a configuration file in a preset format of multiple candidate lighting devices can be obtained by responding to a startup operation of an application for performing lighting control on multiple candidate lighting devices produced by multiple different manufacturers; the configuration file is parsed to obtain configuration information of each candidate lighting device; in response to a target adjustment operation for performing lighting adjustment on one or more target lighting devices among the multiple candidate lighting devices, control instructions corresponding to one or more target lighting devices are generated according to the target adjustment operation and the configuration information; the control instructions are sent to the corresponding target lighting devices to control the target lighting devices to perform lighting adjustment, and the configuration file can be updated in response to an update operation for updating the configuration file, thereby achieving unified, efficient and accurate lighting control for lighting devices of different manufacturers by generating control instructions through pre-set configuration, as well as dynamic adjustment of the configuration file.

[0122] Reference Figure 4 , shows a flowchart of a lighting configuration and control method in an embodiment of the present invention, which may include the following steps:

[0123] (1) Collect information such as model, device name, communication protocol, etc. of smart lighting devices from different manufacturers.

[0124] (2) First, connect the smart lights of the adapted manufacturer to the network through an application APP.

[0125] (3) Different manufacturers have different communication protocols for smart lights, such as ZigBee, Wi-Fi, and Bluetooth. This allows the APP to implement methods for sending control commands using different protocols and methods for querying the status of smart light devices.

[0126] (4) Design the configuration file. In order to facilitate reading, writing and parsing, data in JSON format can be used in actual applications. Enter the data of all models of smart lights of all manufacturers that have been adapted into the configuration file. Among them, the JSON configuration file contains multiple parts, each part corresponds to the control information of a type of smart light. In the JSON configuration file, add configurations for each type of smart light of each adapted manufacturer, using the manufacturer name plus the device model as the key. The content includes the device name, device model, manufacturer, communication protocol type, color temperature adjustment range, color temperature adjustment step, brightness range, color adjustment range, etc. According to the adapted manufacturer name and smart light model, configure the basic information and control information of the adapted smart light model.

[0127] (5) When the app is started, the JSON configuration file is read, the data in the configuration is parsed through the parsing algorithm, and pre-loaded into the cache.

[0128] (6) Determine whether the number of lights to be adjusted is greater than 1. If the number is not greater than 1, it is determined that a single light is currently being adjusted. The configuration of the smart light model in the cache can be read. When adjusting the color temperature of the smart light, the color temperature adjustment step is calculated based on the configured upper and lower limits of the color temperature. For example, the color temperature range of the currently controlled smart light is 2200K to 6500K. The color temperature value in the current state of the smart light is 2200K, which reaches the lowest color temperature value and cannot be adjusted downward. Control the color temperature to increase. According to the color temperature value controlled upward and the current smart light communication protocol type configured, a corresponding color temperature adjustment instruction is generated and a control instruction is sent to achieve the effect of controlling the color temperature of the smart light. When adjusting the brightness of the smart light, assuming that the current smart light is adjusted in thousandths and the brightness range is 0.1% to 100%, a corresponding brightness adjustment instruction is generated based on the adjustment value and the instruction is sent through the corresponding method to achieve the effect of controlling the brightness of the smart light. The color control of the smart light is also handled in a similar way.

[0129] When the number of lights being adjusted is greater than one, the configurations of the n controlled smart lights can be read. When adjusting the color temperature of a smart light, the color temperature parameters of each smart light are obtained and adjusted according to the percentage. For example, if the color temperature range of the currently controlled smart light is 2200K to 6500K, with an adjustable range of 4300K, the corresponding color temperature value is calculated based on the set percentage and the command is issued using the corresponding method. By traversing the n controlled smart lights and sending control commands using the corresponding method based on the configured communication type, the color temperature of the smart lights can be controlled in a group. The same process is applied to the color and brightness of the smart lights.

[0130] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.

[0131] Reference Figure 5 , shows a schematic structural diagram of a lighting control device for a lighting device provided by an embodiment of the present invention, which may specifically include the following modules:

[0132] The configuration file acquisition module 501 is configured to respond to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers and acquire configuration files of the plurality of candidate lighting devices in a preset format;

[0133] A configuration information determination module 502 is configured to parse the configuration file to obtain configuration information of each candidate lighting device;

[0134] a control instruction generating module 503 for responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information;

[0135] The light adjustment module 504 is configured to send the control instruction to the corresponding target lighting device to control the target lighting device to perform light adjustment.

[0136] In one embodiment of the present invention, the control instruction generation module 503 may include:

[0137] an adjustment target value determination submodule, configured to respond to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and determine an adjustment target value corresponding to each target lighting device according to the target adjustment operation and the configuration information;

[0138] The control instruction determination submodule is configured to generate a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information.

[0139] In one embodiment of the present invention, the adjustment target value determination submodule may include:

[0140] an adjustment operation response unit, configured to respond to a target adjustment operation for performing light adjustment on one or more target lamp devices among the plurality of candidate lamp devices, and determine a light adjustment type and an adjustment percentage corresponding to the target adjustment operation;

[0141] a range and mode determining unit, configured to determine an adjustment range and an adjustment mode corresponding to the configuration information according to the light adjustment type;

[0142] an adjustment initial value determining unit, configured to determine an adjustment initial value according to the adjustment percentage and the adjustment range;

[0143] The adjustment target value determining unit is used to determine the adjustment target value according to the adjustment initial value and the adjustment method.

[0144] In one embodiment of the present invention, the control instruction determination submodule may include:

[0145] a communication protocol type determining unit, configured to determine a communication protocol type corresponding to the target lighting device based on the configuration information;

[0146] The control instruction determining unit is configured to perform instruction encapsulation on the adjustment target value according to the communication protocol type, and generate a control instruction corresponding to the target lighting device.

[0147] In one embodiment of the present invention, the apparatus further comprises:

[0148] The configuration file updating module is configured to update the configuration file in response to an updating operation for updating the configuration file.

[0149] In one embodiment of the present invention, the apparatus further comprises:

[0150] The network configuration information module is used to configure the plurality of candidate lighting devices for network configuration.

[0151] In one embodiment of the present invention, the adjustment initial value determining unit may include:

[0152] a difference determination subunit, configured to determine a difference between a maximum value and a minimum value according to the adjustment range;

[0153] The initial adjustment value determination subunit is configured to determine a product obtained by multiplying the difference value and the adjustment percentage, and add the product to the minimum value to obtain an initial adjustment value.

[0154] In one embodiment of the present invention, the adjustment target value determination unit may include the following subunits:

[0155] A current lighting parameter determination subunit, configured to determine the current lighting parameters of each candidate lighting device;

[0156] The adjustment target value determination subunit is used to determine the adjustment target value based on the current lighting parameter, the adjustment initial value and the adjustment method.

[0157] In one embodiment of the present invention, the adjustment target value determination subunit, when used to determine the adjustment target value based on the current lighting parameter, the initial adjustment value, and the adjustment method, specifically includes:

[0158] When the adjustment method corresponding to the light adjustment type is adjustment according to a preset adjustment step, the adjustment is performed up or down according to the preset adjustment step based on the current light parameters and the size of the initial adjustment value to determine the adjustment target value closest to the initial adjustment value.

[0159] The embodiment of the present invention obtains configuration files of a preset format for a plurality of candidate lighting devices produced by a plurality of different manufacturers in response to the startup operation of an application for performing lighting control on the plurality of candidate lighting devices; parses the configuration file to obtain configuration information of each candidate lighting device; responds to a target adjustment operation for performing lighting adjustment on one or more target lighting devices among the plurality of candidate lighting devices, generates control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information; sends the control instructions to the corresponding target lighting devices to control the target lighting devices to perform lighting adjustment, thereby realizing unified, efficient and accurate lighting control for lighting devices of different manufacturers by generating control instructions through pre-set configuration.

[0160] An embodiment of the present invention further provides an electronic device, which may include a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When the computer program is executed by the processor, the following light control method for a lighting device is implemented:

[0161] In response to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining configuration files of the plurality of candidate lighting devices in a preset format;

[0162] Parsing the configuration file to obtain configuration information of each candidate lighting device;

[0163] In response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information;

[0164] The control instruction is sent to the corresponding target lighting device to control the target lighting device to adjust the light.

[0165] Optionally, the responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information, includes:

[0166] In response to a target adjustment operation for performing light adjustment on one or more target lamp devices among the plurality of candidate lamp devices, determining an adjustment target value corresponding to each target lamp device according to the target adjustment operation and the configuration information;

[0167] A control instruction corresponding to the target lighting device is generated based on the adjustment target value and the configuration information.

[0168] Optionally, responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and determining an adjustment target value corresponding to each target lighting device according to the target adjustment operation and the configuration information, includes:

[0169] In response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, determining a light adjustment type and an adjustment percentage corresponding to the target adjustment operation;

[0170] Determine the adjustment range and adjustment method corresponding to the configuration information according to the lighting adjustment type;

[0171] Determining an initial adjustment value according to the adjustment percentage and the adjustment range;

[0172] An adjustment target value is determined according to the adjustment initial value and the adjustment method.

[0173] Optionally, the generating a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information includes:

[0174] Determining a communication protocol type corresponding to the target lighting device based on the configuration information;

[0175] The adjustment target value is encapsulated into an instruction according to the communication protocol type to generate a control instruction corresponding to the target lighting device.

[0176] Optionally, the method further includes:

[0177] In response to an update operation for updating the configuration file, the configuration file is updated.

[0178] Optionally, before responding to the start-up operation of the application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, the method further includes:

[0179] The multiple candidate lighting devices are networked.

[0180] Optionally, determining the initial adjustment value according to the adjustment percentage and the adjustment range includes:

[0181] Determine the difference between the maximum value and the minimum value according to the adjustment range;

[0182] A product obtained by multiplying the difference and the adjustment percentage is determined, and the product is added to the minimum value to obtain an initial adjustment value.

[0183] Optionally, determining the adjustment target value according to the adjustment initial value and the adjustment method includes:

[0184] Determine the current lighting parameters of each candidate lighting device;

[0185] An adjustment target value is determined based on the current lighting parameter, the initial adjustment value, and the adjustment method.

[0186] Optionally, determining the adjustment target value based on the current lighting parameter, the initial adjustment value, and the adjustment method includes:

[0187] When the adjustment method corresponding to the light adjustment type is adjustment according to a preset adjustment step, the adjustment is performed up or down according to the preset adjustment step based on the current light parameters and the size of the initial adjustment value to determine the adjustment target value closest to the initial adjustment value.

[0188] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, the following lighting control method for a lighting device is implemented:

[0189] In response to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining configuration files of the plurality of candidate lighting devices in a preset format;

[0190] Parsing the configuration file to obtain configuration information of each candidate lighting device;

[0191] In response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information;

[0192] The control instruction is sent to the corresponding target lighting device to control the target lighting device to adjust the light.

[0193] Optionally, the responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and generating control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information, includes:

[0194] In response to a target adjustment operation for performing light adjustment on one or more target lamp devices among the plurality of candidate lamp devices, determining an adjustment target value corresponding to each target lamp device according to the target adjustment operation and the configuration information;

[0195] A control instruction corresponding to the target lighting device is generated based on the adjustment target value and the configuration information.

[0196] Optionally, responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and determining an adjustment target value corresponding to each target lighting device according to the target adjustment operation and the configuration information, includes:

[0197] In response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, determining a light adjustment type and an adjustment percentage corresponding to the target adjustment operation;

[0198] Determine the adjustment range and adjustment method corresponding to the configuration information according to the lighting adjustment type;

[0199] Determining an initial adjustment value according to the adjustment percentage and the adjustment range;

[0200] An adjustment target value is determined according to the adjustment initial value and the adjustment method.

[0201] Optionally, the generating a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information includes:

[0202] Determining a communication protocol type corresponding to the target lighting device based on the configuration information;

[0203] The adjustment target value is encapsulated into an instruction according to the communication protocol type to generate a control instruction corresponding to the target lighting device.

[0204] Optionally, the method further includes:

[0205] In response to an update operation for updating the configuration file, the configuration file is updated.

[0206] Optionally, before responding to the start-up operation of the application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, the method further includes:

[0207] The multiple candidate lighting devices are networked.

[0208] Optionally, determining the initial adjustment value according to the adjustment percentage and the adjustment range includes:

[0209] Determine the difference between the maximum value and the minimum value according to the adjustment range;

[0210] A product obtained by multiplying the difference and the adjustment percentage is determined, and the product is added to the minimum value to obtain an initial adjustment value.

[0211] Optionally, determining the adjustment target value according to the adjustment initial value and the adjustment method includes:

[0212] Determine the current lighting parameters of each candidate lighting device;

[0213] An adjustment target value is determined based on the current lighting parameter, the initial adjustment value, and the adjustment method.

[0214] Optionally, determining the adjustment target value based on the current lighting parameter, the initial adjustment value, and the adjustment method includes:

[0215] When the adjustment method corresponding to the light adjustment type is adjustment according to a preset adjustment step, the adjustment is performed up or down according to the preset adjustment step based on the current light parameters and the size of the initial adjustment value to determine the adjustment target value closest to the initial adjustment value.

[0216] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0217] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0218] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatuses, or computer program products. Thus, embodiments of the present invention may take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROMs, optical storage, etc.) containing computer-usable program code.

[0219] The embodiments of the present invention are described with reference to flowcharts and / or block diagrams of methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0220] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0221] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0222] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.

[0223] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprises a..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.

[0224] The above is a detailed introduction to the lighting control method and device, electronic equipment, and medium of a lighting device provided. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A lighting control method for a lighting device, characterized in that: The method comprises: In response to a startup operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, obtaining configuration files of the plurality of candidate lighting devices in a preset format; Parsing the configuration file to obtain configuration information of each candidate lighting device; In response to a target adjustment operation for performing light adjustment on one or more target lamp devices among the plurality of candidate lamp devices, determining an adjustment target value corresponding to each target lamp device according to the target adjustment operation and the configuration information; generating a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information; Sending the control instruction to the corresponding target lighting device to control the target lighting device to adjust the light; The generating a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information includes: Determining a communication protocol type corresponding to the target lighting device based on the configuration information; The adjustment target value is encapsulated into an instruction according to the communication protocol type to generate a control instruction corresponding to the target lighting device.

2. The method according to claim 1, characterized in that The responding to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and determining an adjustment target value corresponding to each target lighting device according to the target adjustment operation and the configuration information, includes: In response to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, determining a light adjustment type and an adjustment percentage corresponding to the target adjustment operation; Determine the adjustment range and adjustment method corresponding to the configuration information according to the lighting adjustment type; Determining an initial adjustment value according to the adjustment percentage and the adjustment range; An adjustment target value is determined according to the adjustment initial value and the adjustment method.

3. The method according to claim 1, characterized in that The method further comprises: In response to an update operation for updating the configuration file, the configuration file is updated.

4. The method according to claim 1, wherein Before responding to a start operation of an application for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, the method further includes: The multiple candidate lighting devices are networked.

5. The method according to claim 2, characterized in that The determining of the initial adjustment value according to the adjustment percentage and the adjustment range includes: Determine the difference between the maximum value and the minimum value according to the adjustment range; A product obtained by multiplying the difference and the adjustment percentage is determined, and the product is added to the minimum value to obtain an initial adjustment value.

6. The method according to claim 2, characterized in that The determining of the adjustment target value according to the adjustment initial value and the adjustment method includes: Determine the current lighting parameters of each candidate lighting device; An adjustment target value is determined based on the current lighting parameter, the initial adjustment value, and the adjustment method.

7. The method according to claim 6, characterized in that The determining of the adjustment target value based on the current lighting parameter, the initial adjustment value, and the adjustment method includes: When the adjustment method corresponding to the light adjustment type is adjustment according to a preset adjustment step, the adjustment is performed up or down according to the preset adjustment step based on the current light parameters and the size of the initial adjustment value to determine the adjustment target value closest to the initial adjustment value.

8. A lighting control device for a lighting device, characterized in that: The device comprises: a configuration file acquisition module, configured to respond to a startup operation of an application program for controlling lighting of a plurality of candidate lighting devices produced by a plurality of different manufacturers, and acquire configuration files of the plurality of candidate lighting devices in a preset format; A configuration information determination module, configured to parse the configuration file to obtain configuration information of each candidate lighting device; a control instruction generating module, configured to respond to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and generate control instructions corresponding to the one or more target lighting devices according to the target adjustment operation and the configuration information; A light adjustment module, configured to send the control instruction to a corresponding target lighting device to control the target lighting device to perform light adjustment; Wherein, the control instruction generation module includes: an adjustment target value determination submodule, configured to respond to a target adjustment operation for performing light adjustment on one or more target lighting devices among the plurality of candidate lighting devices, and determine an adjustment target value corresponding to each target lighting device according to the target adjustment operation and the configuration information; a control instruction determination submodule, configured to generate a control instruction corresponding to the target lighting device based on the adjustment target value and the configuration information; The control instruction determination submodule includes: a communication protocol type determining unit, configured to determine a communication protocol type corresponding to the target lighting device based on the configuration information; The control instruction determination unit is configured to perform instruction encapsulation on the adjustment target value according to the communication protocol type, and generate a control instruction corresponding to the target lighting device.

9. An electronic device, characterized in that: The method comprises a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein when the computer program is executed by the processor, the method for controlling the lighting device according to any one of claims 1 to 7 is implemented.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the light control method of the lighting device according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Intelligent streetlamp illumination compensation dimming system and method

    CN109743821A

  • Digital multi-mode control system of lamplight control platform

    CN203261549U