Method for controlling light emitting device and related device
By receiving and matching broadcast signals and light-lit videos of the luminous equipment, and automatically identifying and controlling the equipment, the problem of low control efficiency of multiple devices is solved and the user experience is improved.
Patent Information
- Application Number
- CN202110921071.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-11
- Publication Date
- 2025-01-07
- Estimated Expiration
- 2041-08-11
AI Technical Summary
In smart home environments, it is difficult for users to accurately identify and control multiple light emitting devices, resulting in low control efficiency and poor user experience.
Automatic control is achieved by receiving broadcast signals from the light emitting device and collecting light-lit videos, identifying the device status, matching indication information to determine the device network address.
It simplifies user operations, improves the control efficiency of the luminescent device, and realizes visual control of the device in the physical environment through video recognition.
Smart Images

Figure CN115914097B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of smart home technology, and more specifically, to a method for controlling a light-emitting device and related devices. Background Art
[0002] In the related art, a smart terminal (such as a smart phone) can control a light-emitting device. However, when the smart terminal is connected to multiple light-emitting devices at the same time, the user cannot accurately identify which light-emitting device a certain identifier in the device list corresponds to. In this case, when the user needs to control a certain light-emitting device, he can only test one by one to find out the identifier in the device list that corresponds to a certain light-emitting device. This method has many steps and is cumbersome to operate. Especially when there are a large number of lamps, the lamp control efficiency is low and the user experience is poor. Summary of the invention
[0003] In view of the above problems, the embodiments of the present application propose a method for controlling a light-emitting device and related devices to solve the problem of low control efficiency of the light-emitting device in the prior art.
[0004] According to one aspect of an embodiment of the present application, a method for controlling a light-emitting device is provided, which is applied to a terminal device, and the method includes: receiving a broadcast signal broadcast by at least one light-emitting device, the broadcast signal being used to indicate first light-on switching indication information based on which the corresponding light-emitting device switches a light-on state; the first light-on switching indication information is determined according to a device identification of the light-emitting device; the light-emitting device is provided with a network module, and the light-emitting device broadcasts the broadcast signal through the network module; obtaining a light-on video collected during the period when the at least one light-emitting device switches a light-on state according to the corresponding first light-on switching indication information; performing light-on state identification according to the light-on video, and determining second light-on switching indication information for switching a light-on state of each light-emitting device in the light-on video; matching the first light-on switching indication information indicated by the broadcast signal with the second light-on switching indication information corresponding to each light-emitting device in the light-on video, and determining a broadcast signal corresponding to each light-emitting device in the light-on video; determining a network address of each light-emitting device in the light-on video according to the determined broadcast signal corresponding to each light-emitting device in the light-on video; and controlling the corresponding light-emitting device according to the network address of each light-emitting device in the light-on video.
[0005] According to one aspect of an embodiment of the present application, a light-emitting device is provided, wherein the light-emitting device is provided with a network module, and the light-emitting device broadcasts a broadcast signal through the network module so that a terminal device that receives the broadcast signal controls the light-emitting device according to the method described above.
[0006] According to one aspect of an embodiment of the present application, there is provided a device for controlling a light-emitting device, which is applied to a terminal device, and the device comprises: a receiving module, which is used to receive a broadcast signal broadcast by at least one light-emitting device, wherein the broadcast signal is used to indicate first light-on switching indication information based on which the corresponding light-emitting device switches a light-on state; the first light-on switching indication information is determined according to a device identification of the light-emitting device; the light-emitting device is provided with a network module, and the light-emitting device broadcasts the broadcast signal through the network module; an acquisition module, which is used to acquire a light-on video collected during a period when the at least one light-emitting device switches a light-on state according to the corresponding first light-on switching indication information; and an identification module, which is used to A matching module is used to identify the lighting status according to the lighting video, and determine the second lighting switching indication information for switching the lighting status of each light-emitting device in the lighting video; a matching module is used to match the first lighting switching indication information indicated by the broadcast signal with the second lighting switching indication information corresponding to each light-emitting device in the lighting video, and determine the broadcast signal corresponding to each light-emitting device in the lighting video; a network address determination module is used to determine the network address of each light-emitting device in the lighting video according to the determined broadcast signal corresponding to each light-emitting device in the lighting video; a control module is used to control the corresponding light-emitting device in the lighting video according to the network address of each light-emitting device in the lighting video.
[0007] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: a processor; a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the method for controlling a light-emitting device as described above is implemented.
[0008] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions are executed by a processor, the method for controlling a light-emitting device as described above is implemented.
[0009] In the scheme of the present application, after receiving the broadcast signal broadcast by the light-emitting device and identifying the lighting state according to the lighting video of the light-emitting device, and determining the second lighting switching indication information for each light-emitting device in the lighting video to switch the lighting state, the first lighting switching indication information indicated by the broadcast signal broadcast by the light-emitting device is matched with the second lighting switching indication information of the light-emitting device in the lighting video, so that the light-emitting device in the lighting video corresponds to the light-emitting device from which the received broadcast signal comes, and then the broadcast signal from each light-emitting video in the lighting video is determined, and the network address of each light-emitting device in the lighting video is correspondingly determined, and the light-emitting device included in the lighting video is controlled based on the network address of each light-emitting device in the determined lighting video. It can be seen that in this scheme, the user does not need to test each light-emitting device one by one, and the network address of the light-emitting device can be automatically obtained without the user operating the light-emitting device. Compared with the prior art, manual operation is reduced, the operation is simple, and the control efficiency of the light-emitting device is improved.
[0010] Moreover, since the lighting video indicates the position of the light-emitting device in the actual physical environment, it is convenient for users to perform visual control of the light-emitting device based on the acquired lighting video and the network address of each light-emitting device in the determined lighting video. That is, the user can determine the position of the controlled light-emitting device in the actual physical environment according to the lighting video, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0011] The drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present application, and together with the specification are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0012] Figure 1 It is a schematic diagram of an application scenario shown according to an embodiment of the present application.
[0013] Figure 2 The flowchart of a method for controlling a light emitting device according to an embodiment of the present application is shown.
[0014] Figure 3 is a flowchart of step 240 according to an embodiment of the present application.
[0015] Figure 4 It is a schematic diagram of a closed-loop lighting state sequence according to a specific embodiment of the present application.
[0016] Figure 5 It is a flowchart of step 230 according to an embodiment of the present application.
[0017] Figure 6 It is a flowchart of step 520 according to an embodiment of the present application.
[0018] Figure 7 is a flow chart of a method for controlling a light emitting device according to another embodiment of the present application.
[0019] Figure 8 It is a schematic diagram of an icon corresponding to a light-emitting device in a display interface according to a specific embodiment of the present application.
[0020] Fig. 9 It is a flowchart of step 260 according to an embodiment of the present application.
[0021] Fig.10 It is a flow chart showing a control method of a light-emitting device implemented on the terminal device side according to a specific embodiment of the present application.
[0022] Fig.11 It is a flow chart showing a control method of a light emitting device implemented on the light emitting device side according to a specific embodiment of the present application.
[0023] Fig.12 It is a block diagram of an apparatus for controlling a light-emitting device according to an embodiment of the present application.
[0024] Fig.13 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0025] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0026] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0027] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0028] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0029] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0030] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0031] Figure 1 FIG. 1 is a schematic diagram of an application scenario according to an embodiment of the present application. Figure 1 As shown, the application scenario may include at least one terminal device 110, at least one light emitting device 120 ( Figure 1 Two light-emitting devices are shown by way of example in FIG.
[0032] The terminal device 110 may be a smart phone, a tablet computer, a laptop computer, a desktop computer, a wearable device, etc., which is not specifically limited here. The light-emitting device 120 may be various lamps such as an ambient lighting lamp, an incandescent lamp, a halogen tungsten lamp, a fluorescent lamp, a high-pressure mercury lamp, or a device with integrated light-emitting and lighting functions, such as a smart phone with a flashlight.
[0033] In the solution of the present application, a network module is provided in the light-emitting device 120, so that the light-emitting device 120 can broadcast signals through the network module and establish a communication connection with the terminal device 110 through the network module. The network module can be a Bluetooth module, a WIFI module, a Zigbee module, etc., which are not limited here. Correspondingly, a corresponding network module is also provided in the terminal device 110, so that according to the network module in the terminal device 110 and the network module in the light-emitting device 120, the terminal device 110 can establish a communication connection with the light-emitting device 120.
[0034] On the basis of establishing a communication connection between the light-emitting device 120 and the terminal device 110, the terminal device 110 can control the light-emitting device 120 according to the network address of each light-emitting device 120. For example, the user controls the terminal device 110 and sends a control instruction according to the network address of the light-emitting device 120, so that the light-emitting device 120 switches the lighting state according to the control instruction.
[0035] The lighting state of the light emitting device 120 may include a lighting state (i.e., a state of being lit) and a lighting state (i.e., a state of being extinguished). Furthermore, if the light color of the light emitting device 120 can be adjusted, the lighting state may further include a lighting state corresponding to each lighting color. For example, if the light color of the light emitting device 120 includes red, green, yellow, and purple, the lighting state may include a red light state, a green light state, a yellow light state, and a purple light state. Of course, the light colors that can be emitted by different light emitting devices 120 may differ, and may be set according to actual needs.
[0036] Furthermore, if the brightness of the light emitting device 120 can be adjusted, the light-on state can further include a light-on state corresponding to each brightness level. For example, if the brightness level of the light emitting device 120 includes three brightness levels of level I, level II, and level III, the light-on state can include a light-on state of level I, a light-on state of level II, and a light-on state of level III. Of course, the number of brightness levels of the light emitting device 120 can be set according to actual needs. The brightness levels listed above are only illustrative examples and cannot be considered as limiting the scope of use of this application.
[0037] It can be understood that if the light emitting color and the brightness level of the light emitting device 120 can be adjusted, the light-on state further includes the light-on state of each light emitting color combined with each brightness level.
[0038] In some embodiments of the present application, the terminal device 110 is further provided with a video acquisition device, such as a camera, so that the terminal device 110 can acquire a lighting video of the light-emitting device 120 switching the lighting state. In some implementations of the present application, the lighting video can also be acquired with the aid of an external video acquisition device, and then the lighting video is sent to the terminal device 110, and the terminal device 110 controls the light-emitting device 120 according to the lighting video and the broadcast signal received from at least one light-emitting device 120 according to the method provided in the present application.
[0039] Figure 2 1 is a flow chart of a method for controlling a light emitting device according to an embodiment of the present application, and the method can be executed by a terminal device with processing capability. Figure 2As shown, the method at least includes steps 210 to 240, which are described in detail as follows:
[0040] Step 210, receiving a broadcast signal broadcasted by at least one light-emitting device, wherein the broadcast signal is used to indicate the first lighting switching indication information based on which the corresponding light-emitting device switches the lighting state; the first lighting switching indication information is determined based on the device identification of the light-emitting device; the light-emitting device is provided with a network module, and the light-emitting device broadcasts the broadcast signal through the network module.
[0041] As described above, the network module can be a Bluetooth module, a WIFI module, a Zigbee module, etc., which is not specifically limited here. Correspondingly, a network module with the same communication protocol as that in the light-emitting device is provided in the terminal device, so that the terminal device can receive the broadcast signal broadcast by the light-emitting device through its own network module. In some embodiments of the present application, the broadcast signal can be in the form of a low-power Bluetooth (BLE) broadcast data packet. The Bluetooth BLE broadcast is based on the GAP (Generic Access Profile) protocol for data broadcasting. GAP defines how devices discover each other, establish connections, and how to achieve binding. It also describes how devices become broadcasters and observers and achieve transmission without connection; at the same time, GAP defines how to use different types of addresses to achieve privacy and resolvability.
[0042] The device identification of the light-emitting device is used to uniquely identify the light-emitting device, which can be the device serial number of the light-emitting device, the network address of the network module in the light-emitting device, etc. Since the first light switching indication information corresponding to the light-emitting device is generated based on the device identification of the light-emitting device, it can be ensured that the first light switching indication information corresponding to different light-emitting devices is also different.
[0043] The network address of the light-emitting device can be a MAC address (Media Access Control Address). The MAC address is burned into the EPROM when the network device manufacturer produces it. The MAC address is expressed in binary and is 48 bits long, usually expressed as 12 hexadecimal numbers.
[0044] In some embodiments of the present application, a mapping relationship between a hexadecimal number and a light-on state can be preset, wherein a hexadecimal number uniquely corresponds to a light-on state. Then, based on the mapping relationship between the hexadecimal number and the light-on state, a light-on state sequence formed by combining the light-on states corresponding to the 12 hexadecimal numbers in the MAC address is used as the first light-on switching indication information. For example, the MAC address can be directly used as the first light-on switching indication information.
[0045] Similarly, if the device identification of the light-emitting device is the device serial number of the light-emitting device, since the device serial number includes multiple digits, the mapping relationship between the digits and the lighting status can be pre-set in a similar way, with one digit uniquely corresponding to one lighting status. Then, the lighting status sequence formed by the combination of the lighting status corresponding to each digit in the device serial number of the light-emitting device is used as the first lighting switching indication information.
[0046] The first lighting switching indication information includes at least one lighting state. In the scenario where the first lighting switching indication information includes at least two lighting states, it can be understood that the first lighting switching indication information includes a lighting state switching sequence. Based on the lighting state included in the first lighting switching indication information, the light emitting device can switch the lighting state according to the lighting state included in the first lighting switching indication information.
[0047] In some embodiments of the present application, in a scenario where the first lighting switching indication information includes at least two lighting states, the light emitting device may periodically switch the lighting state according to the first lighting switching indication information, that is, cyclically switch according to at least two lighting states included in the first lighting switching indication information. In an application scenario where the lighting state may include a lighting color, the first lighting switching indication information may be a lighting color sequence formed by at least two lighting colors.
[0048] Step 220: Obtain a lighting video collected during a period in which at least one light-emitting device switches a lighting state according to the corresponding first lighting switching indication information.
[0049] The light-on video may be collected by a camera on the terminal device, or may be collected by a camera on another device and then sent to the terminal device.
[0050] In some embodiments of the present application, before step 210, the method further includes: the terminal device sends a positioning instruction, so that the light-emitting device that receives the positioning instruction switches the lighting state according to its own first lighting switching indication information according to the positioning instruction, and broadcasts a broadcast signal; according to the positioning instruction, video capture is started to capture the lighting video of at least one light-emitting device during the lighting state switching.
[0051] The terminal device may broadcast the positioning instruction through its own network module, so that the light-emitting device receiving the positioning instruction responds to the positioning instruction and switches the lighting state according to the first lighting switching instruction information of the light-emitting device itself. Moreover, the video acquisition device in the terminal device starts to capture the lighting video in response to the positioning instruction.
[0052] In some embodiments of the present application, the positioning instruction may also indicate a time interval for switching the lighting state, so that the light-emitting device switches the lighting state according to the time interval indicated by the positioning instruction. Of course, in other embodiments, the pre-set time interval for switching the lighting state may also be stored in the light-emitting device itself, so that after receiving the positioning instruction, the light-emitting device switches the lighting state according to the stored time interval.
[0053] In some embodiments of the present application, after starting the video capture, the user can trigger the end of the video capture according to actual needs. In some embodiments of the present application, the video duration range of the light-on video can also be pre-set, so that after starting the video capture, when the video capture duration is within the video duration range, the video capture is automatically stopped to obtain the light-on video.
[0054] In some embodiments of the present application, the minimum duration of the light-on video can also be preset. If during the process of video capture, the duration of the captured video has not reached the minimum duration, and a trigger operation triggered by the user to end video capture is detected, the user is prompted that the video capture duration is short and needs to be re-captured, and the re-captured video with a duration not less than the minimum duration is used as the light-on video.
[0055] In some embodiments of the present application, the light-emitting device in the captured light-on video switches the light-on state at least once. It is understandable that the number of times each light-emitting device in the light-on video switches the light-on state needs to reach a set number, otherwise, the first light-on state switching indication information and the second light-on state switching indication information may not match correctly because the second light-on switching indication information includes fewer light-on states. The set number may be the number of light-on states included in the first light-on switching indication information.
[0056] In some embodiments of the present application, in order to ensure the accuracy of matching the first light switching indication information with the second light switching indication information in the subsequent process, if the light state sequence in the light state sequence indicated by the first light switching indication information is regarded as a switching cycle, the light-on video collected includes the data of the light-emitting device completing a switching cycle according to the first light switching indication information corresponding to itself. For example, if the light state sequence corresponding to the first light switching indication information is red light-green light-blue light-yellow light-purple light, the light-emitting device can perform a round of "red light, green light, blue light, yellow light, purple light" according to the light state sequence, and it is regarded that the light-emitting device has performed a light state switching of a switching cycle.
[0057] In some embodiments of the present application, since the start time of the light-emitting device switching the light state may not be completely synchronized with the start time of the video acquisition for starting the video acquisition, in this case, the duration of the light-emitting video is not less than the target cycle duration, which refers to the duration of the light-emitting device completing the light-emitting state switching in a switching cycle corresponding to the first light-emitting switching indication information. Therefore, in the subsequent processing process, it is convenient to extract the video frame corresponding to each light-emitting state included in the first light-emitting switching indication information from the light-emitting video, and ensure the accuracy of the subsequent matching.
[0058] Step 230: Identify the lighting state according to the lighting video, and determine second lighting switching indication information for switching the lighting state of each light-emitting device in the lighting video.
[0059] Since the lighting video is collected when the light-emitting device is switching its lighting state, there are at least two video frames with different lighting states in the lighting video. Therefore, video frames can be extracted from the lighting video, and the lighting state of each light-emitting device in the video frames can be identified based on the video frames.
[0060] In some embodiments of the present application, each light-emitting device can switch the lighting state for one switching cycle according to the first lighting switching indication information, or can periodically switch the lighting state for multiple switching cycles according to the first lighting switching indication information, which can be set according to actual needs.
[0061] In a specific embodiment, during the process of switching the lighting state of the light emitting device, the time intervals between any two lighting state switches may be the same or different. In a specific embodiment, the time interval for the light emitting device to switch between the two lighting states may also be preset, so that the light emitting device switches between the at least two lighting states indicated by the first lighting switching indication information according to the set time interval.
[0062] It is understandable that the different lighting states of a light-emitting device are directly reflected in the different pixels on the video frame extracted from the lighting video. For example, there are differences in pixels between the on state and the off state, the lighting states of different lighting colors, and the lighting states of different brightness levels. Therefore, the lighting state of each light-emitting device can be identified based on the pixel information of the pixel area where each light-emitting device is located in the video frame, and then the lighting states identified for the same light-emitting device are combined in chronological order to obtain a lighting state sequence, which can be regarded as the second lighting state switching indication information. Like the first lighting state switching indication information, the second lighting state switching indication information includes at least one lighting state. Among them, the number of lighting states included in the second lighting state switching indication information can be the same as or different from the number of lighting states included in the first lighting state switching indication information, which is specifically related to the duration of the lighting video.
[0063] Step 240, matching the first lighting switching indication information indicated by the broadcast signal with the second lighting switching indication information corresponding to each light-emitting device in the lighting video, to determine the broadcast signal corresponding to each light-emitting device in the lighting video.
[0064] In step 240, the first light switching indication information indicated by each broadcast signal may be matched with the second light state switching indication information corresponding to each light-emitting device in the light-on video. In some embodiments, in the matching process, after determining that a first light switching indication information matches a second light switching indication information, the remaining second light switching indication information may be matched with each remaining first light switching indication information, and the process may be repeated until the first light switching indication information matching each second light switching indication information is determined. Specifically, the first light switching indication information may be temporarily stored in the first set, and the second light switching indication information may be temporarily stored in the second set. After determining that a first light switching indication information (assuming that it is the first light switching indication information L1) in the first set matches a second light switching indication information (assuming that it is the second light switching indication information L2) in the second set, the first light switching indication information L1 is removed from the first set, and the second light switching indication information L2 is removed from the second set, and then a first light switching indication information is selected from the first set to match each remaining second light switching indication information in the second set. In this embodiment, since the first light-on switching indication information or the second light-on switching indication information that has been determined to be matched does not participate in the subsequent matching process, the amount of matching calculation is reduced, which can effectively save processing resources.
[0065] In some embodiments of the present application, Figure 3As shown, step 240 includes: step 310, matching the second light-on switching indication information of each light-emitting device in the light-on video with the first light-on switching indication information indicated by each broadcast signal, and determining the first light-on switching indication information matching the second light-on switching indication information. Step 320, determining the broadcast signal corresponding to the first light-on switching indication information matching the second light-on switching indication information as the broadcast signal of the light-emitting device corresponding to the second light-on switching indication information.
[0066] As described above, the number of lighting states included in the second lighting switching indication information may exceed the number of lighting states within a switching cycle. Thus, if a lighting state sequence corresponding to a second lighting switching indication information includes a lighting state sequence corresponding to a first lighting switching indication information, it can be determined that the second lighting switching indication information matches the first lighting switching indication information.
[0067] For example, if the light state sequence corresponding to the second light switching indication information (light state sequence I) is: red light → yellow light → green light → blue light → purple light → red light → yellow light → green light → blue light → purple light → red light; if the light state sequence corresponding to the first light switching indication information (light state sequence II) is: red light → yellow light → green light → blue light → purple light, it can be seen that the light state sequence I includes the light state sequence II, and it can be determined that the second light switching indication information from which the light state sequence I comes from matches the first light switching indication information from which the light state sequence II comes from.
[0068] In some embodiments of the present application, if the number of light states in the light state sequence corresponding to the second light switching indication information exceeds the number of light states in a light switching cycle, the light state sequence corresponding to a light switching cycle can be further extracted from the light state sequence corresponding to the second light switching indication information, and the extracted light state sequence corresponding to a light switching cycle is called a reference light state sequence. If a reference light state sequence is the same as a light state sequence corresponding to a first light switching indication information, it is determined that the second light switching indication information from which the reference light state sequence is derived matches the first light switching indication information.
[0069] In a specific embodiment, in the process of periodically switching the lighting state according to a lighting state sequence, since any lighting state in the lighting state sequence can be used as the starting lighting state, correspondingly, for the lighting state switching process including at least two lighting switching cycles, if the starting lighting states are different, the determined final lighting states are also different. For example, in the lighting state sequence I mentioned above, if the red light is used as the starting lighting state in a lighting switching cycle, the lighting sequence corresponding to one lighting switching cycle is: red light → yellow light → green light → blue light → purple light; if the green light is used as the starting lighting state in a lighting switching cycle, the lighting state sequence corresponding to one lighting switching cycle is: green light → blue light → purple light → red light → yellow light.
[0070] In this case, the first lighting state in the lighting state sequence in the first lighting switching indication information can be used as the starting lighting state. Thus, in the second lighting switching indication information, the lighting state sequence corresponding to a lighting switching cycle is determined starting from the starting lighting state. Then, the extracted lighting state sequence corresponding to a lighting switching cycle is matched with the lighting state sequence corresponding to the first lighting switching indication information.
[0071] Continuing with the above example of light state sequences I and II, the first light state in light state sequence II is red light, and taking "red light" as the starting light state, the light state sequence corresponding to a light switching cycle extracted from light state sequence I is: red light → yellow light → green light → blue light → purple light, and the extracted light state sequence corresponding to a light switching cycle is used as the reference light state sequence. It can be seen that the reference light state sequence is the same as the light state sequence II, and therefore, the second light switching indication information from which the reference light state sequence is derived matches the first light switching indication information from which the light state sequence II is derived.
[0072] In some other embodiments of the present application, if each light-emitting device in the lighting video periodically switches the lighting state according to the first lighting switching indication information corresponding to itself, the lighting state sequence corresponding to the first lighting switching indication information can also form a closed-loop lighting state sequence (assuming it is a target closed-loop sequence). In the matching process, any lighting state is selected from the lighting state sequence corresponding to the first lighting switching indication information as the starting lighting state. Then, starting from the starting lighting state, the lighting sequence corresponding to one lighting switching cycle is determined in the target closed-loop sequence as the target lighting sequence. Then, according to the starting lighting state, the lighting state sequence corresponding to one lighting switching cycle is extracted from the lighting state sequence corresponding to the second lighting switching indication information. If the extracted lighting state sequence corresponding to one lighting switching cycle is the same as the target lighting sequence, it is determined that the first lighting switching indication information matches the second lighting switching indication information.
[0073] Continuing with the example of the lighting state sequence I and II in the above text, the lighting state sequence formed by the closed loop of the lighting state sequence I is as follows: Figure 4 As shown in the figure, if you select "green light" as the starting light state, then follow Figure 4 The lighting status shown switches direction from Figure 4 The target lighting sequence determined in the closed-loop lighting state sequence shown is: green light → blue light → purple light → red light → yellow light. In lighting state sequence II, with "green light" as the starting lighting state, the lighting state sequence corresponding to a lighting switching cycle extracted is: green light → blue light → purple light → red light → yellow light. Obviously, the lighting state sequence corresponding to a lighting switching cycle extracted from lighting state sequence II is the same as the target lighting sequence determined from lighting state sequence I.
[0074] In some embodiments of the present application, in the process of matching the first light switching indication information with the second light switching indication information, it is also possible to determine whether the first light switching indication information matches the second light switching indication information according to the target matching degree. If the target matching degree is not lower than the matching degree threshold, it is determined that the first light switching indication information matches the second light switching indication information. In a specific embodiment, the matching degree threshold can be set according to actual needs, such as 90%, 95%, 100%, etc., which is not specifically limited here. Among them, the target matching degree can be equal to the ratio of S1 to S2, wherein S2 is equal to the number of light states in the light state sequence corresponding to the first light switching indication information; S1 is equal to the number of light states in the same light state sequence, wherein the same light state sequence refers to the same light sequence segment in the first light state sequence and the second light state sequence, the first light state sequence refers to the light state sequence corresponding to the first light switching indication information, and the second light state sequence refers to the light state sequence corresponding to the second light switching indication information.
[0075] In a specific embodiment, if the number of lighting states included in the second lighting switching indication information is less than the number of lighting states included in the first lighting switching indication information, it can be determined whether a second lighting switching indication information matches a first lighting switching indication information according to the above-mentioned embodiment based on the target matching degree.
[0076] In step 240, by matching the first light switching indication information with the second light switching indication information, the light fixture in the light-on video is made to correspond to the light fixture from which the received broadcast signal originates, that is, if a second light switching indication information (assuming that it is the second light switching indication information T1) matches a first light switching indication information (assuming that it is the first light switching indication information T2), it can be determined that the light-emitting device corresponding to the second light switching indication information T1 in the light-on video and the light-emitting device from which the broadcast signal corresponding to the first light switching indication information T2 originates are the same light-emitting device, thereby making the light-emitting device in the light-on video correspond to the light-emitting device from which the broadcast signal originates. The light-on video indicates the deployment position of the light-emitting device in the actual physical environment, so that it is convenient for subsequent users to visually control the light-emitting devices in the actual physical environment according to the light-on video, that is, the user can clearly know which light-emitting device in the actual physical environment the light-emitting device currently triggered corresponds to, or when the user determines that a light-emitting device in the actual physical environment needs to be controlled, the object to be triggered can be determined according to the light-on video.
[0077] By matching the first light switching indication information with the second light switching indication information, the broadcast signals originating from each light-emitting device in the light-emitting video are identified. That is, if it is determined that the light-emitting device corresponding to the second light switching indication information T1 in the light-emitting video and the light-emitting device from which the broadcast signal corresponding to the first light switching indication information T2 originates are the same light-emitting device, then it can be determined that the broadcast signal corresponding to the first light switching indication information T2 originates from the light-emitting device corresponding to the second light switching indication information T1 in the light-emitting video.
[0078] In some embodiments of the present application, due to the limited video capture angle of the video capture device, the number of light-emitting devices in the light-on video may be different from the number of received broadcast signals. In a specific embodiment, multiple light-emitting devices may be placed together, so that during the video capture process, the light-on video captured includes video data of multiple light-emitting devices at the network location to be determined.
[0079] Please continue reading Figure 2 , step 250, determining the network address of each light-emitting device in the light-emitting video according to the broadcast signal corresponding to each light-emitting device in the determined light-emitting video.
[0080] In some embodiments of the present application, the broadcast signal may carry the network address of the corresponding light-emitting device. Therefore, after determining the broadcast signal corresponding to each light-emitting device in the lighting video, the network address carried by the broadcast signal is used as the network address of the corresponding light-emitting device in the lighting video.
[0081] In some implementations of the present application, when the device identification of the light-emitting device is the network address of the network module in the light-emitting device, since the first lighting switching indication information broadcast by the light-emitting device is determined based on the device identification (i.e., the network address) of the light-emitting device, after determining the broadcast signal corresponding to each light-emitting device in the lighting video, reverse analysis is performed based on the broadcast signal to obtain the network address of each light-emitting device in the lighting video.
[0082] For example, if the first light switching indication information is generated according to the MAC address of the Bluetooth module in the light-emitting device, then based on the mapping relationship between the number in the MAC address and the light state, according to the light state sequence indicated by the first light switching indication information, the MAC address corresponding to the light state sequence indicated by the first light switching indication information is reversely determined.
[0083] Step 260, controlling the corresponding light-emitting device according to the network address of each light-emitting device in the lighting video.
[0084] After determining the network address of each light-emitting device in the lighting video, the user can trigger the corresponding light-emitting device so that the terminal device sends a control instruction to the corresponding light-emitting device according to the network address of the triggered light-emitting device, so that the light-emitting device switches its own lighting state according to the control instruction.
[0085] In the scheme of the present application, after receiving the broadcast signal broadcast by the light-emitting device and identifying the lighting state according to the lighting video of the light-emitting device, and determining the second lighting switching indication information for switching the lighting state of each light-emitting device in the lighting video, the first lighting switching indication information is matched with the second lighting switching indication information, so that the light-emitting device in the lighting video corresponds to the light-emitting device from which the received broadcast signal comes, and then the broadcast signal from each light-emitting device in the lighting video is determined, and the network address of each light-emitting device in the lighting video is correspondingly determined, and the light-emitting device included in the lighting video is controlled based on the determined network address of each light-emitting device in the lighting video. In this scheme, the user does not need to test each light-emitting device one by one, and the network address of the light-emitting device can be automatically obtained without the user operating the light-emitting device. Compared with the scheme in the prior art, manual operation is reduced, the operation is simple, and the control efficiency of the light-emitting device is improved.
[0086] Moreover, since the lighting video indicates the position of the light-emitting device in the actual physical environment, it is convenient for users to perform visual control of the light-emitting device based on the acquired lighting video and the network address of each light-emitting device in the determined lighting video. That is, the user can determine the position of the light-emitting device to be controlled in the actual physical environment according to the lighting video, thereby improving the user experience.
[0087] In some embodiments of the present application, Figure 5 As shown, step 230 includes:
[0088] Step 510: extract video frames from the light-on video to obtain a video frame sequence, where the video frame sequence includes at least two video frames.
[0089] In some embodiments of the present application, video frames may be extracted from the lighting video at a set first time interval, and the extracted video frames may be arranged in chronological order to obtain a video frame sequence.
[0090] In some implementations of the present application, video frames can be extracted from the lighting video at a preset frame rate to obtain a video frame sequence; the preset frame rate is determined according to the time interval for switching the lighting state of the light-emitting device.
[0091] The frame rate refers to the number of video frames played per second. Specifically, in this solution, the frame rate refers to the number of video frames extracted from the light-on video per second. The preset frame rate refers to the preset number of video frames extracted from the light-on video per second. It can be seen that the reciprocal of the preset frame rate is equal to the time interval between the two video frames extracted from the video frame, that is, the difference between the time corresponding to one of the two extracted video frames in the light-on video and the time corresponding to the other video frame in the light-on video.
[0092] On the basis that the light-emitting device switches the lighting state according to the set time interval, correspondingly, in the lighting video, the light-emitting device also switches the lighting state according to the set time interval. In this case, in order to save processing resources and avoid invalid lighting state recognition, the set time interval is used as the time interval for extracting two video frames. That is to say, in this embodiment, the reciprocal of the preset frame rate is equal to the time interval for the light-emitting device to switch the lighting state, and the time interval for extracting two video frames from the lighting video is kept equal to the time interval between two adjacent switching of the lighting state of the light-emitting device in the lighting video.
[0093] Step 520: Perform lighting status recognition on each of the at least two video frames to determine the lighting status of each light emitting device in each video frame.
[0094] In some embodiments of the present application, a deep learning method may be used to identify the lighting status. Figure 6 As shown, step 520 includes: step 610, performing target detection on each video frame of at least two video frames to determine the target pixel area where each light-emitting device in each video frame is located; step 620, performing color feature extraction on the target pixel area to obtain the color feature of the target pixel area; step 630, identifying the lighting state of the light-emitting device corresponding to the target pixel area according to the color feature of the target pixel area.
[0095] The target pixel area refers to the pixel area where the light-emitting device is located in the video frame. Target detection on the video frame refers to detecting and determining the pixel area where the light-emitting device is located in the video frame. By performing target detection on the video frame, the pixels in the video frame are classified, thereby determining the target pixel area corresponding to each light-emitting device in the video frame, and determining the position information of each target pixel area in the video frame.
[0096] In some embodiments of the present application, the object detection can be performed on the video frame by the trained object detection model. The object detection model can be a model constructed by a convolutional neural network (CNN), such as Region CNN (regional convolutional neural network), SPPNet (Spatial PyramidPooling in Deep Convolutional Networks, convolutional network based on pyramid fusion), based on the YOLO algorithm (You Only Look Once), etc., which is not specifically limited here.
[0097] In some embodiments of the present application, color features include HSV features; the lighting state includes the lighting color; in the present embodiment, step 620 includes: transforming the target pixel area to the HSV color space to obtain the HSV features of the target pixel area; step 630 includes: performing color classification according to the HSV features of the target pixel area through a color classifier to obtain a color classification result, and the color classification result is used to indicate the lighting color of the light-emitting device indicated by the target pixel area.
[0098] The HSV (Hue, Saturation, Value) color space refers to a color space model created based on the intuitive characteristics of color, also known as the hexagonal cone model. In this model, the color parameters are hue (H), saturation (S) and value (V). Among them, hue H is measured in angles, with a value range of 0° to 360°, starting from red and calculated in a counterclockwise direction, with red being 0°, green being 120°, and blue being 240°. Saturation S indicates the degree to which a color is close to a spectral color. A color can be regarded as the result of a mixture of a spectral color and white. The saturation ranges from 0 to 100%. The larger the value, the more saturated the color. Value V indicates the brightness of a color, and its value range is from 0% (black) to 100% (white).
[0099] In this embodiment, converting the target pixel region to HSV color means representing the color information of each pixel in the target pixel region by three values: hue, saturation and brightness. Thus, the extracted HSV features include the hue, saturation and brightness of each pixel in the target pixel region.
[0100] The color classifier can be a classifier constructed based on a KNN (K-Nearest Neighbors) algorithm, or a classifier constructed based on a SVN (Support Vector Machine) algorithm. In some embodiments of the present application, color classification can also be performed using an SSD model (Single Shot MultiBox Detector).
[0101] Step 530, combining the lighting states of the same light emitting device in each video frame according to the sequence of video frames in the video frame sequence, and obtaining second lighting switching indication information corresponding to the lighting state switching of each light emitting device in the lighting video.
[0102] For each video frame in the video frame sequence, the lighting status of each light-emitting device in the video frame can be identified and determined accordingly. Thus, according to the order of the video frames in the video frame sequence, the lighting status corresponding to the same light-emitting device in each video frame is combined to obtain a lighting status sequence of each light-emitting device in the lighting video. The obtained lighting status sequence of each light-emitting device in the lighting video is the second lighting status switching indication information of the corresponding light-emitting device.
[0103] In some embodiments of the present application, Figure 7 As shown, the method for controlling the light emitting device further includes:
[0104] Step 710: Determine the image position of the light emitting device indicated by the target pixel region according to the position information of the target pixel region in each video frame.
[0105] As described above, after performing target detection to determine the target pixel area where each light-emitting device is located in the video frame, the position information of the target pixel area in the video frame is correspondingly determined. On this basis, the image position of the light-emitting device can be determined according to the position information of the target pixel area corresponding to the same light-emitting device in the video frame.
[0106] Since the size of each video frame in the light-on video is the same, and generally speaking, the position of the light-emitting device in the actual physical environment remains unchanged, therefore, if the acquisition angle remains unchanged during the light-on video acquisition, the position of the target pixel area where each light-emitting device is located in the light-on video is basically the same in each video frame. On this basis, the position of the union area of multiple target pixel areas for the same light-emitting device can be used as the image position of the corresponding light-emitting device. In other embodiments, the position of the intersection area of multiple target pixel areas for the same light-emitting device can also be used as the image position of the corresponding light-emitting device. Furthermore, based on the determined union area or intersection area, the union area (or intersection area) can be enlarged according to a set magnification factor, and the position of the enlarged area is used as the image position of the corresponding light-emitting device.
[0107] Step 720 , deploying the display position of each light-emitting device in the display interface according to the image position of the light-emitting device indicated by the target pixel area.
[0108] The display interface may be an interface of an application for controlling a light-emitting device. In the display interface, a corresponding icon may be displayed for each light-emitting device. The display position of the light-emitting device in the display interface may be understood as the position of the icon representing the light-emitting device in the display interface.
[0109] In some embodiments of the present application, the display position of the light-emitting device in the display interface can be deployed according to the relative position relationship between the light-emitting devices in the lighting video. Therefore, the relative position of the icon representing the light-emitting device in the display interface directly reflects the relative position relationship of the light-emitting device in the actual environment, so that it is convenient for the user to associate the icon displayed in the display interface with the position of the light-emitting device in the actual environment, that is, the user can quickly determine the position of the light-emitting device represented by the icon in the actual environment directly according to the display position of the icon in the display interface, and the visualization of the light-emitting device in the display interface can be realized.
[0110] Figure 8 FIG. 1 is a schematic diagram showing the display of an icon of a light-emitting device in a display interface according to a specific embodiment of the present application. Figure 8 As shown, six icons representing light-emitting devices are exemplarily shown in the display interface 800, each icon representing a light-emitting device, namely the first icon 810, the second icon 820, the third icon 830, the fourth icon 840, the fifth icon 850, and the sixth icon 860. The relative position relationship between the icons is the same as the relative position relationship of the light-emitting devices represented by the icons in the actual environment, so that the user can directly locate the position of the light-emitting devices represented by each icon in the actual environment according to the icons in the display interface. In this technology, it is convenient for the user to perform visual control of the light-emitting devices based on the icons in the display interface.
[0111] In some embodiments of the present application, a two-dimensional or three-dimensional model of each light-emitting device in the display interface can also be established based on the light-emitting device shown in the video frame in the lighting video. In the display interface, the position of the model corresponding to the light-emitting device is the display position of the light-emitting device indicated by the model in the display interface.
[0112] In some embodiments of the present application, Fig. 9 As shown, step 260 includes:
[0113] Step 910: Determine a trigger area according to a trigger operation triggered in the display interface. The trigger area is the area triggered by the trigger operation.
[0114] Step 920, determining the target light emitting device selected for the trigger operation according to the display position of each light emitting device in the trigger area and the lighting video in the display interface.
[0115] Based on the position information of the trigger area in the display interface and the display position of each light-emitting device in the display interface, it can be determined whether the trigger area belongs to the display area corresponding to a certain light-emitting device in the display interface. If the trigger area belongs to the display area in the display interface under a certain light-emitting device, the light-emitting device corresponding to the display area to which it belongs is the target light-emitting device selected for the trigger operation.
[0116] Step 930, obtaining the network address of the target light-emitting device according to the network address of each light-emitting device in the lighting video.
[0117] After determining the target light-emitting device selected for the trigger operation, the network address of the target light-emitting device can be determined from the network addresses of the light-emitting devices in the determined lighting video.
[0118] Step 940: Send a control instruction to the target light-emitting device according to the network address of the target light-emitting device, so that the target light-emitting device changes the lighting state according to the control instruction.
[0119] The control instruction may be an instruction to instruct the corresponding light-emitting device to switch the lighting state. The control instruction may indicate the lighting state to which the corresponding light-emitting device is to be switched, such as off, red light, green light, brightness level II, etc., which is not specifically limited here.
[0120] In some embodiments of the present application, a video frame can also be selected from the lighting video as the target image, and then the target image can be embedded and displayed in the display interface. In some embodiments of the present application, the target image can be further edited, such as cropped, so that the cropped image is embedded and displayed in the display interface, wherein the cropped image includes the target pixel area of each light-emitting device. In this case, when it is detected that the user triggers a light-emitting device (target light-emitting device) in the selected target image, the network address of the selected target light-emitting device can be determined based on the mapping relationship between the image position of the light-emitting device and the network address of the light-emitting device, and then the control instruction is sent to the target light-emitting device according to the network address of the target light-emitting device.
[0121] Fig.10 FIG. 1 is a flow chart showing a control method of a light emitting device implemented in a terminal device according to a specific embodiment of the present application. Fig.10 As shown, specifically including:
[0122] Step 1010: Send a positioning instruction.
[0123] Step 1020, receiving a broadcast signal, that is, receiving a broadcast signal from a light-emitting device, the broadcast information is used to instruct the corresponding light-emitting device to switch the light-on state according to the first light-on switching instruction information.
[0124] Step 1030, turn on the camera to collect the light-on video. The terminal device is provided with a camera, and the terminal device responds to the issued positioning instruction by turning on the camera to collect the video of the light-emitting device switching the light state according to the first light-on switching indication information corresponding to the light-emitting device, and obtains the light-on video.
[0125] Step 1040, whether the match is successful. In some embodiments, if the second light switching indication information and the first light switching indication information do not have matching first bright spot switching indication information and second light switching indication information, it is determined that the match fails. Conversely, if there are matching first bright spot switching indication information and second light switching indication information, it is determined that the match is successful.
[0126] If the match is successful, the positioning is determined to be successful, that is, the light-emitting device in the light-on video is determined to be associated with the network address of the light-emitting device in the physical environment, and then step 1050 is executed to control the light-emitting device, that is, to send a control instruction to the corresponding light-emitting device according to the network address of the light-emitting device. If the match fails, return to step 1010 and restart the positioning so that the terminal device re-issues the positioning instruction and re-collects the light-on video.
[0127] Fig.11FIG. 1 is a flow chart showing a control method of a light emitting device implemented on the light emitting device side according to a specific embodiment of the present application. Fig.11 As shown, specifically including:
[0128] Step 1110: Receive a positioning instruction. The positioning instruction is the positioning quality broadcasted by the terminal device.
[0129] Step 1120: Generate first light switch indication information according to the MAC address. The light emitting device is provided with a Bluetooth module, and the MAC address is the MAC address of the Bluetooth module. The process of generating the first light switch indication information according to the MAC address is described above and will not be repeated here.
[0130] Step 1130, switch the lighting state. The light emitting device switches the lighting state according to the lighting state sequence in the generated first lighting switching indication information, so that after the terminal device starts the camera, it can collect the lighting video of the light emitting device during the lighting state switching according to the first lighting switching indication information.
[0131] Step 1140: broadcast a broadcast signal. The light emitting device broadcasts a broadcast signal carrying its own first light-on switching instruction information.
[0132] After that, wait for the positioning result of the terminal device, that is, the terminal device follows Fig. 9 And the process in the above embodiment determines the network address of each light-emitting device in the lighting video according to the first lighting switching indication information and the lighting video, thereby facilitating the terminal device to control the light-emitting device according to the network address of the light-emitting device.
[0133] The following describes an apparatus embodiment of the present application, which can be used to execute the method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned method embodiment of the present application.
[0134] Fig.12 is a block diagram of an apparatus for controlling a light emitting device according to an embodiment of the present application. Fig.12As shown, the device for controlling the light-emitting device includes: a receiving module 1210, which is used to receive a broadcast signal broadcast by at least one light-emitting device, where the broadcast signal is used to indicate the first light-on switching indication information based on which the corresponding light-emitting device switches the light-on state; the first light-on switching indication information is determined according to the device identification of the light-emitting device; the light-emitting device is provided with a network module, and the light-emitting device broadcasts the broadcast signal through the network module; an acquisition module 1220, which is used to acquire a light-on video collected during the period when at least one light-emitting device switches the light-on state according to the corresponding first light-on switching indication information; and an identification module 1230, which is used to identify the light-on state according to the light-on video. A matching module 1240 is used to match the first lighting switching indication information indicated by the broadcast signal with the second lighting switching indication information corresponding to each light-emitting device in the lighting video, and determine the broadcast signal corresponding to each light-emitting device in the lighting video; a network address determination module 1250 is used to determine the network address of each light-emitting device in the lighting video according to the determined broadcast signal corresponding to each light-emitting device in the lighting video; a control module 1260 is used to control the corresponding light-emitting device in the lighting video according to the network address of each light-emitting device in the lighting video.
[0135] In some embodiments of the present application, the matching module 1240 includes: a matching unit, which is used to match the second lighting switching indication information of each light-emitting device in the lighting video with the first lighting switching indication information indicated by each broadcast signal, and determine the first lighting switching indication information that matches the second lighting switching indication information; a broadcast signal determination unit, which is used to determine the broadcast signal corresponding to the first lighting switching indication information that matches the second lighting switching indication information as the broadcast signal of the light-emitting device corresponding to the second lighting switching indication information.
[0136] In some embodiments of the present application, the identification module 1230 includes: a video frame extraction unit, which is used to extract video frames in the lighting video to obtain a video frame sequence, and the video frame sequence includes at least two video frames; a lighting state identification unit, which is used to identify the lighting state of each video frame in the at least two video frames, and determine the lighting state of each light-emitting device in each video frame; a combination unit, which is used to combine the lighting states belonging to the same light-emitting device in each video frame according to the order of the video frames in the video frame sequence, and obtain second lighting switching indication information corresponding to the lighting state switching of each light-emitting device in the lighting video.
[0137] In some embodiments of the present application, the video frame extraction unit is further configured to: extract video frames from the lighting video at a preset frame rate to obtain a video frame sequence; the preset frame rate is determined according to the time interval for switching the lighting state of the light-emitting device.
[0138] In some embodiments of the present application, a lighting status recognition unit includes: a target detection unit, which is used to perform target detection on each video frame of at least two video frames, and determine the target pixel area where each light-emitting device in each video frame is located; a color feature extraction unit, which is used to extract color features of the target pixel area and obtain the color features of the target pixel area; and an identification unit, which is used to identify the lighting status of the light-emitting device corresponding to the target pixel area according to the color features of the target pixel area.
[0139] In some embodiments of the present application, the color feature includes an HSV feature; the lighting state includes a lighting color; and the color feature extraction unit is further configured to: transform the target pixel area into the HSV color space to obtain the HSV feature of the target pixel area. In this embodiment, the recognition unit is further configured to: perform color classification according to the HSV feature of the target pixel area by a color classifier to obtain a color classification result, and the color classification result is used to indicate the lighting color of the light-emitting device indicated by the target pixel area.
[0140] In some embodiments of the present application, the device for controlling the light-emitting device also includes: an image position determination module, which is used to determine the image position of the light-emitting device indicated by the target pixel area in each video frame according to the position information of the target pixel area in the video frame; and a display position determination module, which is used to deploy the display position of each light-emitting device in the display interface according to the image position of the light-emitting device indicated by the target pixel area.
[0141] In some embodiments of the present application, the control module 1260 includes: a trigger area determination unit, which is used to determine the trigger area according to the trigger operation triggered in the display interface; a target light-emitting device determination unit, which is used to determine the target light-emitting device selected by the trigger operation according to the trigger area and the display position of each light-emitting device in the lighting video in the display interface; a network address determination unit, which is used to obtain the network address of the target light-emitting device according to the network address of each light-emitting device in the lighting video; and a control instruction sending unit, which is used to send a control instruction to the target light-emitting device according to the network address of the target light-emitting device, so that the target light-emitting device changes the lighting state according to the control instruction.
[0142] In some embodiments of the present application, the device for controlling the light-emitting device also includes: a positioning instruction issuing module, which is used to issue a positioning instruction so that the light-emitting device that receives the positioning instruction switches the lighting state according to its own first lighting switching indication information according to the positioning instruction, and broadcasts a broadcast signal; a video capture starting module, which is used to start video capture according to the positioning instruction, so as to capture a lighting video of at least one light-emitting device during the lighting state switching.
[0143] In some embodiments of the present application, the network module is a Bluetooth module; and the device identifier is a MAC address of the Bluetooth module in the light-emitting device.
[0144] The present application also provides a light-emitting device, which is provided with a network module. The light-emitting device broadcasts a broadcast signal through the network module, so that a terminal device that receives the broadcast signal controls the light-emitting device according to the method provided in the above embodiment.
[0145] Fig.13 The structure diagram of the computer system suitable for implementing the electronic device of the embodiment of the present application is shown. It should be noted that: Fig.13 The computer system 1300 of the electronic device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0146] like Fig.13 As shown, the computer system 1300 includes a central processing unit (CPU) 1301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 1302 or the program loaded from the storage part 1308 to the random access memory (RAM) 1303, such as executing the method in the above embodiment. In RAM 1303, various programs and data required for system operation are also stored. CPU 1301, ROM 1302 and RAM 1303 are connected to each other through bus 1304. Input / output (I / O) interface 1305 is also connected to bus 1304.
[0147] The following components are connected to the I / O interface 1305: an input section 1306 including a keyboard, a mouse, etc.; an output section 1307 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1308 including a hard disk, etc.; and a communication section 1309 including a network interface card such as a LAN (Local Area Network) card, a modem, etc. The communication section 1309 performs communication processing via a network such as the Internet. A drive 1310 is also connected to the I / O interface 1305 as needed. A removable medium 1311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1310 as needed so that a computer program read therefrom is installed into the storage section 1308 as needed.
[0148] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication section 1309, and / or installed from a removable medium 1311. When the computer program is executed by a central processing unit (CPU) 1301, various functions defined in the system of the present application are executed.
[0149] It should be noted that the computer-readable medium shown in the embodiment of the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, - but not limited to - an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, device or device or used in combination with it. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, wherein a computer-readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate, or transmit programs for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0150] The flowchart and block diagram in the accompanying drawings illustrate the possible architecture, functions and operations of the system, method and computer program product according to various embodiments of the present application. Wherein, each box in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and the above-mentioned module, program segment, or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0151] The units involved in the embodiments described in this application may be implemented by software or hardware, and the units described may also be set in a processor. The names of these units do not, in some cases, constitute limitations on the units themselves.
[0152] As another aspect, the present application further provides a computer-readable storage medium, which may be included in the electronic device described in the above embodiments; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries computer-readable instructions, and when the computer-readable storage instructions are executed by a processor, the method in any of the above embodiments is implemented.
[0153] According to one aspect of the present application, an electronic device is also provided, which includes: a processor; a memory, wherein computer-readable instructions are stored in the memory, and when the computer-readable instructions are executed by the processor, the method in any of the above embodiments is implemented.
[0154] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method in any of the above embodiments.
[0155] It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
[0156] Through the description of the above implementation methods, it is easy for those skilled in the art to understand that the example implementation methods described here can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the implementation methods of the present application can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a touch terminal, or a network device, etc.) to execute the method according to the implementation methods of the present application.
[0157] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
[0158] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for controlling a light emitting device, characterized in that: Applied to a terminal device, the method comprises: Receive a broadcast signal broadcasted by at least one light-emitting device, wherein the broadcast signal is used to indicate first light-on switching indication information according to which the corresponding light-emitting device switches a light-on state; the first light-on switching indication information is determined according to a device identification of the light-emitting device; the light-emitting device is provided with a network module, and the light-emitting device broadcasts the broadcast signal through the network module; Acquire a lighting video collected during a period in which the at least one light-emitting device switches a lighting state according to the corresponding first lighting switching indication information; Identify the lighting state according to the lighting video, and determine second lighting switching indication information for switching the lighting state of each light-emitting device in the lighting video; Determine the broadcast signal corresponding to each light-emitting device in the light-emitting video by matching the first light-on switching indication information indicated by the broadcast signal with the second light-on switching indication information corresponding to each light-emitting device in the light-emitting video; Determine the network address of each light-emitting device in the light-emitting video according to the determined broadcast signal corresponding to each light-emitting device in the light-emitting video; According to the network address of each light-emitting device in the lighting video, the corresponding light-emitting device is controlled.
2. The method according to claim 1, characterized in that: The matching of the first lighting switching indication information indicated by the broadcast signal with the second lighting switching indication information corresponding to each light-emitting device in the lighting video to determine the broadcast signal corresponding to each light-emitting device in the lighting video includes: Matching the second lighting switching indication information of each light-emitting device in the lighting video with the first lighting switching indication information indicated by each broadcast signal, and determining the first lighting switching indication information matching the second lighting switching indication information; The broadcast signal corresponding to the first light-on switching indication information matching the second light-on switching indication information is determined as the broadcast signal of the light-emitting device corresponding to the second light-on switching indication information.
3. The method according to claim 1, characterized in that The step of identifying the lighting state according to the lighting video and determining second lighting switching indication information for switching the lighting state of each light-emitting device in the lighting video includes: Extracting video frames from the light-on video to obtain a video frame sequence, wherein the video frame sequence includes at least two video frames; Performing lighting status recognition on each video frame of the at least two video frames to determine the lighting status of each light-emitting device in each video frame; According to the sequence of video frames in the video frame sequence, the lighting states of the same light-emitting device in each video frame are combined to obtain second lighting switching indication information corresponding to the lighting state switching of each light-emitting device in the lighting video.
4. The method according to claim 3, characterized in that Extracting video frames from the light-on video to obtain a video frame sequence includes: Video frames are extracted from the lighting video according to a preset frame rate to obtain a video frame sequence; the preset frame rate is determined according to the time interval for switching the lighting state of the light-emitting device.
5. The method according to claim 3, characterized in that: The step of identifying the lighting state of each video frame in the at least two video frames and determining the lighting state of each light-emitting device in each video frame includes: Performing target detection on each of the at least two video frames to determine a target pixel area where each light-emitting device in each video frame is located; Extracting color features of the target pixel area to obtain color features of the target pixel area; The lighting state of the light emitting device corresponding to the target pixel area is identified according to the color feature of the target pixel area.
6. The method according to claim 5, characterized in that The color features include HSV features; The lighting state includes the lighting color; The step of extracting color features from the target pixel region to obtain color features of the target pixel region includes: Transforming the target pixel area into the HSV color space to obtain the HSV features of the target pixel area; The step of identifying the lighting state of the light-emitting device corresponding to the target pixel area according to the color feature of the target pixel area includes: A color classification result is obtained by performing color classification according to the HSV feature of the target pixel area through a color classifier, and the color classification result is used to indicate the light color of the light-emitting device indicated by the target pixel area.
7. The method according to claim 5, characterized in that The method further comprises: Determine the image position of the light-emitting device indicated by the target pixel area according to the position information of the target pixel area in each video frame; The display position of each light-emitting device in the display interface is arranged according to the image position of the light-emitting device indicated by the target pixel area.
8. The method according to claim 7, characterized in that The controlling of the corresponding light emitting device according to the network address of each light emitting device in the light-on video includes: Determining a trigger area according to a trigger operation triggered in the display interface; Determine the target light emitting device selected by the trigger operation according to the trigger area and the display position of each light emitting device in the light-on video in the display interface; According to the network addresses of each light-emitting device in the light-on video, the network address of the target light-emitting device is obtained; According to the network address of the target light-emitting device, a control instruction is sent to the target light-emitting device, so that the target light-emitting device changes the lighting state according to the control instruction.
9. The method according to claim 1, characterized in that: Before receiving a broadcast signal broadcasted by at least one light-emitting device, the method further includes: issuing a positioning instruction, so that the light-emitting device that receives the positioning instruction switches the lighting state according to the positioning instruction and the first lighting switching instruction information thereof, and broadcasts the broadcast signal; According to the positioning instruction, video acquisition is started to acquire the lighting video of the at least one light-emitting device during the switching of the lighting state.
10. The method according to claim 1, characterized in that The network module is a Bluetooth module; the device identifier is the MAC address of the Bluetooth module in the light-emitting device.
11. A device for controlling a light emitting device, characterized in that: The device comprises: A receiving module, used for receiving a broadcast signal broadcasted by at least one light-emitting device, wherein the broadcast signal is used for indicating first light-on switching indication information according to which the corresponding light-emitting device switches the light-on state; the first light-on switching indication information is determined according to the device identification of the light-emitting device; the light-emitting device is provided with a network module, and the light-emitting device broadcasts the broadcast signal through the network module; An acquisition module, used for acquiring a lighting video collected during a period in which the at least one light-emitting device switches a lighting state according to the corresponding first lighting switching indication information; An identification module, configured to identify a lighting state according to the lighting video, and determine second lighting switching indication information for switching the lighting state of each light-emitting device in the lighting video; a matching module, configured to match the first light-on switching indication information indicated by the broadcast signal with the second light-on switching indication information corresponding to each light-emitting device in the light-on video, and determine the broadcast signal corresponding to each light-emitting device in the light-on video; A network address determination module, used to determine the network address of each light-emitting device in the light-emitting video according to the broadcast signal corresponding to each light-emitting device in the light-emitting video; The control module is used to control the corresponding light-emitting device according to the network address of each light-emitting device in the light-on video.
12. An electronic device, characterized in that: include: processor; A memory having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by the processor, the method according to any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 10 is implemented.
Citation Information
Patent Citations
Wireless light brightness control device and method supporting network remote control
CN103052233A
Lighting control method and system based on LoRa wireless communication and terminal
CN111556608A