Light source control method, device, electronic device and computer readable storage medium

By controlling the light source's fill light and data sending instructions in preset timings, the problem of signal crosstalk during light source execution is solved and more stable signal transmission is achieved.

CN114500861BActive Publication Date: 2024-10-01SHENZHEN LUMIUNITED TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011166914.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-27
Publication Date
2024-10-01
Estimated Expiration
2040-10-27

AI Technical Summary

Technical Problem

The light source is prone to signal crosstalk when executing fill light and data transmission instructions, resulting in unstable signal transmission.

Method used

By receiving the data sending instructions and the light filling instructions and executing them according to the preset timing, it ensures that the filling light instructions and the data sending instructions do not conflict, and the timing control method is used to distribute the instructions to avoid signal crosstalk.

Benefits of technology

It effectively solves the problem of signal crosstalk when the light source performs fill light and data transmission, and improves the stability of signal transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114500861B_ABST
    Figure CN114500861B_ABST
Patent Text Reader

Abstract

The embodiments of the present application relate to the field of communication technology, and disclose a method, device, electronic device and computer-readable storage medium for controlling a light source. The method first needs to receive a data sending instruction and a fill light instruction, and then execute the data sending instruction and the fill light instruction according to a preset timing, so that the fill light instruction and the data sending instruction do not conflict. The light source control method provided in the embodiments of the present application is used to control the light source to execute the fill light instruction and the data sending instruction, which can solve the problem of signal crosstalk.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technology, and in particular to a method and device for controlling a light source and electronic equipment. Background Art

[0002] Optical communication is a communication that uses light waves as the transmission medium. It can be divided into visible light communication and invisible light communication based on whether it is visible to the human eye / the length of the wavelength. It can be further divided into wired optical communication and wireless optical communication (atmospheric optical communication) based on the transmission medium. At present, wireless optical communication is favored by manufacturers and the market in the communication field because it does not require laying lines, has lighter equipment, is easy to maneuver, has good confidentiality, and can transmit a large amount of information. Wireless optical communication technology is also constantly developing and improving.

[0003] Among them, visible light wireless communication, also known as "light fidelity technology", is a wireless transmission technology that uses visible light spectrum (such as light emitted by light bulbs) for data transmission. It has the advantages of high energy conversion rate and high safety, but it also has disadvantages such as difficulty in penetrating walls. Therefore, it is usually used in open places with fewer obstacles.

[0004] Invisible light wireless communication is mainly infrared communication, which uses infrared rays (wavelength 300-0.76 microns) to transmit information. It can transmit language, text, data, images and other information. It has the advantages of large communication capacity, strong confidentiality, and good anti-electromagnetic interference performance. However, it also has disadvantages such as being easily affected by climate when transmitted in atmospheric channels. Therefore, it is usually used in outdoor short-distance transmission.

[0005] In the process of implementing the embodiments of the present application, the inventors found that there are at least the following problems in the above-mentioned related technologies: At present, due to the development of optical communication technology, light sources have the functions of both fill light and data transmission. However, in actual use, usually only one of the functions of the light source is used to produce electronic equipment. This is because when both functions are realized at the same time, crosstalk is easily generated between the switching signal of the light source and the transmitted data signal, resulting in unstable signal transmission. Summary of the invention

[0006] In view of the above-mentioned defects of the prior art, the purpose of the embodiments of the present application is to provide a method, device and electronic device for controlling a light source, which can solve the problem of signal crosstalk.

[0007] The purpose of the embodiment of the present application is achieved through the following technical solutions:

[0008] In order to solve the above technical problems, in a first aspect, an embodiment of the present application provides a method for controlling a light source, the method comprising:

[0009] Receive data sending instructions and fill light instructions;

[0010] The data sending instruction and the fill light instruction are executed according to a preset timing.

[0011] In order to solve the above technical problems, in a second aspect, an embodiment of the present application provides a control device for a light source, the device comprising:

[0012] A receiving unit, used for receiving data sending instructions and fill light instructions;

[0013] An execution unit is used to execute the data sending instruction and the fill light instruction according to a preset timing.

[0014] In order to solve the above technical problems, in a third aspect, an embodiment of the present application provides an electronic device, including:

[0015] at least one light source;

[0016] A switch device connected to the light source;

[0017] A controller is connected to the switch device, the controller includes: at least one processor, and a memory connected to the at least one processor, wherein:

[0018] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method described in the first aspect above.

[0019] To solve the above technical problems, in a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method described in the first aspect above.

[0020] To solve the above technical problems, in the fifth aspect, an embodiment of the present application further provides a computer program product, wherein the computer program product includes a computer program stored on a computer-readable storage medium, wherein the computer program includes program instructions, and when the program instructions are executed by a computer, the computer executes the method described in the first aspect above.

[0021] Compared with the prior art, the beneficial effects of the present application are: different from the prior art, the embodiments of the present application provide a method, device, electronic device and computer-readable storage medium for controlling a light source. The method first needs to receive a data sending instruction and a fill light instruction, and then execute the data sending instruction and the fill light instruction according to a preset timing, so that the fill light instruction and the data sending instruction do not conflict. The light source control method provided in the embodiments of the present application controls the light source to execute the fill light instruction and the data sending instruction, which can solve the problem of signal crosstalk. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements / modules and steps with the same reference numerals in the drawings are represented as similar elements / modules and steps. Unless otherwise specified, the figures in the drawings do not constitute proportional limitations.

[0023] Figure 1 This is one of the application environments of the light source control method provided in the embodiment of the present application;

[0024] Figure 2 yes Figure 1 A hardware structure diagram of the monitoring camera 10 in the application environment;

[0025] Figure 3 is a flow chart of a method for controlling a light source provided in Example 1 of the present application;

[0026] Figure 4 is a flow chart of another light source control method provided in Example 1 of the present application;

[0027] Figure 5 yes Figure 3 A sub-flow chart of step 120 in the method shown;

[0028] Figure 6 This is a control circuit diagram of the first infrared lamp provided in Example 1 of the present application;

[0029] Figure 7 yes Figure 3 Another sub-flow chart of step 120 in the method shown;

[0030] Figure 8 is a control circuit diagram of the second infrared lamp provided in Example 1 of the present application;

[0031] Fig. 9 yes Figure 3 Another sub-flow chart of step 120 in the method shown;

[0032] Fig.10This is a control circuit diagram of the third infrared lamp provided in Example 1 of the present application;

[0033] Fig.11 is a flow chart of another light source control method provided in Example 1 of the present application;

[0034] Fig.12 It is a structural schematic diagram of a light source control device provided in Example 2 of the present application;

[0035] Fig.13 is a schematic structural diagram of another light source control device provided in Embodiment 2 of the present application;

[0036] Fig.14 It is a schematic diagram of the hardware structure of an electronic device provided in Embodiment 3 of the present application;

[0037] Fig.15 It is a schematic diagram of the hardware structure of another electronic device provided in Example 3 of the present application. DETAILED DESCRIPTION

[0038] The present application is described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present application, but do not limit the present application in any form. It should be noted that, for those of ordinary skill in the art, several variations and improvements can also be made without departing from the concept of the present application. These all belong to the protection scope of the present application.

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] It should be noted that, if there is no conflict, the various features in the embodiments of the present application can be combined with each other, all within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order than the module division in the device or the order in the flow chart.

[0041] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used in this specification and in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "and / or" used in this specification includes any and all combinations of one or more of the related listed items.

[0042] In addition, the technical features involved in each embodiment of the present application described below can be combined with each other as long as they do not conflict with each other.

[0043] In order to solve the problem that the existing light source control is prone to signal crosstalk and signal instability during the execution of fill light instructions and data transmission instructions, the embodiment of the present application provides a light source control method, which allocates fill light instructions and data transmission instructions to the light source by means of timing control to solve the above-mentioned signal crosstalk and instability problems. Since there are many types of optical communications classified according to wavelength, light source, transmission medium, etc., in order to specifically illustrate the control method provided by the embodiment of the present application, the embodiment of the present application further elaborates on infrared communication as an example. Specifically, an infrared lamp is used as a light source, and the fill light and data transmission of an electronic device are realized by controlling the infrared lamp. Please refer to Figure 1 and Figure 2 , shows one application environment of the light source control method provided in the embodiment of the present application, Figure 2 for Figure 1 The hardware structure diagram of the monitoring camera 10. The application environment includes: a monitoring camera 10 and a terminal device 20, and the monitoring camera 10 and the terminal device 20 are in communication connection.

[0044] The monitoring camera 10 is a semiconductor imaging device with the advantages of high sensitivity, strong light resistance, small distortion, small size, long life, and vibration resistance, and generally has the functions of video recording and communication. In the embodiment of the present application, the monitoring camera 10 is provided with an infrared lamp 11, a switch device 12, a controller 13, and a brightness detector 14. The monitoring camera 10 sends the data to be sent to the terminal device 20 through the infrared lamp 11, thereby realizing infrared communication with the terminal device 20.

[0045] In the process of realizing the camera function, the monitoring camera 10 usually uses an infrared lamp 11 (night vision monitoring infrared lamp) to turn on at night for supplementary light to cooperate with the monitoring camera 10 to realize image acquisition at night. At the same time, it can also interact with the terminal device 20 to send infrared data when necessary. The light emitted by one or more infrared lamps 11 connected in series and / or in parallel has a wavelength of mainly 850nm and 940nm, both of which are invisible light, and have the characteristics of concealment and energy saving. It has been widely used in the field of security monitoring in the past 10 years.

[0046] The switching device 12 is connected to the infrared lamp 11, and is used to receive the signal sent by the controller 13 to control the switching status of the infrared lamp 11. Preferably, in the embodiment of the present application, the switching device 12 uses a MOS tube or a DC-DC converter (Direct current-Direct current converter) to drive the 940 / 850nm infrared lamp 11 to enable it to work normally.

[0047] The controller 13 is connected to the switch device 12. The controller 13 also has an analog-to-digital conversion function, which can convert the control instructions for executing data sending instructions and fill light instructions into digital signals, and send infrared light switch signals and infrared data signals, and control the switching status of the switch device 12 in a timing manner, so that the infrared lamp 11 can both achieve lighting and transmit data. By means of timing control, it is possible to avoid image flickering in the video output by the surveillance camera 10 when the surveillance camera 10 sends infrared data in night mode (when fill light is required). Specifically, a variety of mechanisms for controlling infrared lamps can also be used, such as different control circuits, to solve different application scenarios.

[0048] The brightness detector 14 is connected to the controller 13 and is used to detect the measurement flux in the environment to determine the brightness of the environment where the surveillance camera 10 is currently located. The brightness detector 14 can send the real-time detected brightness information to the controller 13. Preferably, in the embodiment of the present application, the brightness detector 14 is an infrared sensor, and the controller 13 controls the switch device 12 to turn on the infrared lamp 11 for supplementary light when the brightness is lower than a preset threshold (when it is detected at night).

[0049] It should be noted that the light source control method provided in the embodiment of the present application is generally executed by the above-mentioned surveillance camera 10, and accordingly, the light source control device is generally provided in the surveillance camera 10. In some other embodiments, the execution subject that executes the control method or the execution subject provided with the control device may also be other electronic devices, not limited to the above-mentioned surveillance camera 10, and may be specifically configured according to actual needs, which will not be described in detail here.

[0050] The terminal device 20 can be any electronic device that is at least equipped with an infrared data receiving function, such as a gateway, a mobile phone, a tablet, etc. The terminal device 20 can perform infrared wireless communication with the surveillance camera 10, and receive and read the infrared data when the infrared light 11 sends infrared data. Furthermore, the terminal device 20 can also send control instructions to the surveillance camera 10 to control the surveillance camera 10 to perform tasks. At this time, the surveillance camera 10 can also be equipped with an infrared receiving function, so that the terminal device 20 can perform infrared communication with the surveillance camera 10, or the terminal device 20 and the surveillance camera 10 can also be equipped with other types of communication connection methods, such as network connection, Bluetooth connection, etc.

[0051] Specifically, the embodiments of the present application are further described below in conjunction with the accompanying drawings.

[0052] Embodiment 1

[0053] The present application provides a method for controlling a light source. Figure 3 , which shows the process of a light source control method provided by an embodiment of the present application, the method includes but is not limited to the following steps:

[0054] Step 110: receiving a data transmission instruction and a fill light instruction;

[0055] The light source control method provided in the embodiment of the present application can be applied to the surveillance camera 10 as described in the above application scenario, or other electronic devices that require fill light to work normally in a specific scenario, and can be set according to actual needs. Before executing the control method provided in the embodiment of the present application to control the power supply, first, it is necessary to obtain a data sending instruction and a fill light instruction.

[0056] Among them, the data sending instruction may be a data sending task pre-set by an execution subject such as the surveillance camera 10, and the light source is controlled to execute the corresponding data sending instruction according to the data sending task, so that the light source sends the data information stored in the surveillance camera 10, or the data sending instruction may also be a data sending instruction obtained after the execution subject such as the surveillance camera 10 communicates with other devices, such as the terminal device 20 described in the above application scenario.

[0057] The fill light instruction refers to an instruction sent to the light source when the system determines that the electronic device in the system, such as the surveillance camera 10 in the above application scenario, needs to be filled with light by the light source in the current environment, so that the light source performs the corresponding fill light task according to the fill light instruction.

[0058] Step 120: Execute the data sending instruction and the fill light instruction according to a preset timing.

[0059] After receiving the data sending instruction and the fill light instruction, it is necessary to allocate timing for the fill light instruction and the data sending instruction to avoid the phenomenon of signal crosstalk caused by executing the two instructions at the same time, so that the fill light instruction and the data sending instruction do not conflict. After the timing is allocated, the allocated timing is sent to the light source as a preset timing or stored in the light source, so that the light source can execute the data sending instruction and the fill light instruction according to the preset timing.

[0060] The preset timing specifically refers to the control of the time of starting to send each instruction, the content and duration of sending, and the time of ending sending each instruction in the process of sending the data sending instruction and the fill light instruction, that is, the execution process of the data sending instruction and the fill light instruction is carried out in time sequence, and each instruction can be completed by a micro-operation sequence, and the computer or controller can read the micro-operation sequence through the micro-operation control signal to realize the execution of the data sending instruction and the fill light instruction. The preset timing can be pre-stored in the computer or controller, or obtained by the computer or controller through the communication module.

[0061] For example, the controller 13 in the surveillance camera 10 described in the above application scenario pre-stores the fill light instruction, the data sending instruction and the preset timing, or obtains the fill light instruction, the data sending instruction and the preset timing through a communication module, and controls the switching state of the switching device 12 through the preset timing according to the instruction execution time set by the preset timing, or through other activation methods, such as activation when the brightness is higher than a certain threshold, so as to control the light source to execute the fill light instruction and the data sending instruction.

[0062] It should be noted that there may be only one light source. In this case, in order to prevent the fill light instruction and the data sending instruction from conflicting with each other, the light source can only execute one instruction at the same time. Furthermore, there may be at least two light sources. In this case, the light sources may be set according to actual needs and the instructions executed by each light source may be allocated. Specifically, the preset timing may be set according to the number of light sources in actual situations, and the data sending task and the fill light task may be allocated in time sequence to execute the data sending instruction and the fill light instruction. For example, as described below Figure 4 , Figure 7 and Fig. 9 The method and its embodiments shown perform instruction allocation, but do not need to be limited to the limitations of the embodiments of the present application, and can be specifically configured according to actual needs.

[0063] A method for controlling a light source is provided in an embodiment of the present application. The method first needs to receive a data sending instruction and a fill light instruction, and then execute the data sending instruction and the fill light instruction according to a preset timing, so that the fill light instruction and the data sending instruction do not conflict. The light source control method provided in the embodiment of the present application is used to control the light source to execute the fill light instruction and the data sending instruction, which can solve the problem of signal crosstalk.

[0064] In some embodiments, see Figure 4 , which shows the process of another light source control method provided by an embodiment of the present application, based on Figure 3 The control method of the light source further comprises the following steps:

[0065] Step 130 : Determine whether the data sending instruction and the fill light instruction need to be executed simultaneously; if so, jump to step 120 .

[0066] Furthermore, since the simultaneous execution of the fill light instruction and the data sending instruction will affect the stability of signal transmission, that is, crosstalk will occur, therefore, before executing the data sending instruction and the fill light instruction, it is necessary to further detect and determine whether the light source is currently required to execute the fill light instruction and the data sending instruction at the same time. If so, it means that the execution of the data sending instruction and the fill light instruction needs to be controlled by the set preset timing; if not, there is no need to perform the timing control process. If the current system only needs to execute the fill light instruction, then only the fill light instruction is executed. If the current system only needs to execute the data sending instruction, then the data sending instruction is executed. If the current system does not need to execute the data sending instruction or the fill light instruction, then the data sending instruction and the fill light instruction are suspend.

[0067] In some embodiments, the number of the light source is one, please refer to Figure 5 and Figure 6 ,in, Figure 5 A sub-process of the above step 120 is shown. Figure 6 The control circuit diagram of the first infrared lamp provided in the embodiment of the present application is shown, and the step 120 further includes:

[0068] Step 121a: first send the data to be sent according to the data sending instruction;

[0069] Step 122a: After the data to be sent is completed, execute the fill light instruction.

[0070] In the embodiments of the present application, Figure 6 As shown, when the infrared light used for fill light and sending data is the same, the controller 13 as shown in the above application scenario outputs the following from the port IO1: Figure 6The pulse signal shown in is used to control the conduction of the switch device K1 to control the infrared lamp D1 to execute the fill light instruction and the data sending instruction. Specifically, Figure 6 As shown, port IO1 is first pulled to a low level to suspend the fill light instruction and stop the fill light; then, a pulse signal is output from port IO1 to send the data to be sent to execute the data sending instruction, wherein the pulse signal carries the data to be sent through its waveform characteristics, such as amplitude, frequency, phase, etc.; after sending the data to be sent, port IO1 is pulled to a high level to re-execute the fill light instruction.

[0071] It should be noted that the light source that executes the above-mentioned control method, that is, the number of infrared lamps can be greater than one, and a plurality of infrared lamps connected in series that can output the same wavelength can be set. Specifically, the number, wavelength and model of the infrared lamps can be set according to actual needs without being restricted to the limitations of the embodiments of the present application.

[0072] like Figure 6 The structure that uses only one infrared lamp to execute the fill light instruction and the data sending instruction has the advantages of simple structure, low cost, and easy timing allocation. However, since the infrared lamp has the characteristic that the light-emitting angle and the radiation distance (the communication distance that can be carried out) are inversely proportional, the infrared lamp cannot have both a large light-emitting angle and a long radiation distance (longer communication distance) at the same time. That is to say, in the above-mentioned application scenario, if the viewing angle of the surveillance camera 10 is large, in order to make the field of view of the surveillance camera 10 reach the maximum visual range that its hardware can collect when shooting images at night, the light-emitting angle of the infrared lamp also needs to be large enough to match the viewing angle of the surveillance camera 10. On this basis, if the infrared lamp is also required to have a longer communication distance, for example, ten meters, that is, the terminal device 20 can still receive the data to be sent by the infrared lamp 11 in the surveillance camera 10 when it is about ten meters away from the surveillance camera 10, then the infrared lamp needs to have a longer radiation distance. Therefore, based on the above requirements, the embodiment of the present application also provides another control method as follows:

[0073] In some embodiments, the number of the light sources is at least two, wherein one of the light sources is used to execute the fill light instruction, and one of the light sources is used to execute the data sending instruction. Figure 7 and Figure 8 ,in, Figure 7 Another sub-process of the above step 120 is shown, Figure 8 The control circuit diagram of the second infrared lamp provided in the embodiment of the present application is shown, and the step 120 further includes:

[0074] Step 121b: first control the light source used to execute the fill light instruction to be turned off;

[0075] Step 122b: controlling the light source for executing the data sending instruction to send the data to be sent;

[0076] Step 123b: After the to-be-sent data is sent, the light source for executing the fill light instruction is controlled to be turned on again.

[0077] In the embodiments of the present application, Figure 8 As shown, two infrared lamps can be set up to solve the above-mentioned problem of having a larger light-emitting angle and a longer radiation distance. Specifically, assuming that the infrared lamp D1 is used for lighting, the infrared lamp D1 can use an infrared lamp with a larger light-emitting angle (shorter radiation distance). Preferably, the light-emitting angle of the infrared lamp D1 is greater than the viewing angle of the monitoring camera 10; the infrared lamp D2 is used to send data, and the infrared lamp D2 can use an infrared lamp with a longer radiation distance (smaller light-emitting angle). Preferably, the radiation distance of the infrared lamp D2 is set according to the farthest receiving distance required by the terminal device 20 during actual use. Among them, the light-emitting angle and radiation distance of the infrared lamp are related to the processing technology of the infrared lamp, such as the amount of scattering agent. Specifically, the infrared lamp model with the corresponding required light-emitting angle and radiation distance can be selected according to actual needs, which will not be described in detail here.

[0078] Specifically, the controller 13 outputs the following from the port IO1 and the port IO2: Figure 7 The pulse signal shown in controls the conduction of the switch device K1 and the switch device K2 to control the infrared lamp D1 and the infrared lamp D2 to execute the fill light instruction and the data transmission instruction respectively. Among them, the port IO1 first continuously outputs a high level to allow the infrared lamp D1 to execute the fill light instruction, and the port IO2 outputs a low level to prevent the infrared lamp D2 from emitting light; when receiving the data transmission instruction, the port IO1 outputs a low level to suspend the fill light instruction, and the infrared lamp D1 stops the fill light. At the same time, the port IO2 outputs an output pulse signal to enable the infrared lamp D2 to send the data to be sent, wherein the pulse signal carries the data to be sent through its waveform characteristics, such as amplitude, frequency, phase, etc.; after sending the data to be sent, the port IO1 is pulled to a high level, so that the infrared lamp D1 re-executes the fill light instruction, and the port IO2 re-outputs a low level.

[0079] It should be noted that the number of the infrared lamps D1 used for lighting and / or the infrared lamps D2 used to send data can be greater than one, and can be multiple infrared lamps connected in series and can output the same wavelength and / or the same model. Specifically, the number, wavelength and model of the infrared lamps D1 and / or the infrared lamps D2 can be set according to actual needs without being restricted to the limitations of the embodiments of the present application.

[0080] In the embodiment of the present application, when the above-mentioned Figure 7 The method shown and Figure 8 In the engineering of executing the data sending instruction by the structure shown in the figure, the surveillance camera 10 described in the above application scenario is in a situation where it cannot obtain fill light and therefore cannot collect images, and as described above Figure 7 The method shown and Figure 8 The structure shown is compared Figure 5 The method shown and Figure 6 The structure shown in the figure has a relatively complex design of the control sequence. Therefore, in order to solve the above problems, the embodiment of the present application also provides another control method as follows:

[0081] In some embodiments, the number of the light sources is at least two, and the wavelengths of all the light sources are the same. Fig. 9 and Fig.10 ,in, Fig. 9 Another sub-process of the above step 120 is shown, Fig.10 The control circuit diagram of the third and fourth infrared lamps provided in the embodiment of the present application is shown, and the step 120 further includes:

[0082] Step 121c: first control the light source used to execute the fill light instruction to be turned off;

[0083] Step 142c: controlling all the light sources to execute the data sending instruction to send the data to be sent;

[0084] Step 143c: After the to-be-sent data is sent, the light source for executing the fill light instruction is controlled to be turned on again.

[0085] In the embodiment of the present application, since the switching speed of the switching device can reach a very high rate when the light source switch is controlled by timing, usually multiple switches can be performed within a few milliseconds. Therefore, if fill light is performed at the same time, the collected image appears to the human eye as a continuous image, but fill light performed at the same time may cause crosstalk problems. In order to alleviate this problem, the infrared lamp D1 and the infrared lamp D2 in the embodiment of the present application need to work with the same timing when executing data sending instructions, and the infrared lamp D1 and the infrared lamp D2 need to use infrared lamps that output the same wavelength, preferably, they can also be infrared lamps of the same model.

[0086] Specifically, in Fig. 9 In the example, the infrared lamp D1 uses an infrared lamp with a larger luminous angle for lighting, and the infrared lamp D2 uses an infrared lamp with a longer radiation distance for sending data. The controller 13 outputs the following from the port IO1 and the port IO2: Fig. 9The pulse signal shown in controls the conduction of the switch device K1, the switch device K2 and the switch device K3 to control the infrared lamp D1 and the infrared lamp D2 to respectively execute the fill light instruction and the data transmission instruction. Among them, the port IO1 first continuously outputs a high level to allow the infrared lamp D1 to execute the fill light instruction, and the port IO2 outputs a low level so that the infrared lamp D2 does not emit light; when receiving the data transmission instruction, the port IO1 and the port IO2 simultaneously output the same pulse signal to send the data to be sent, at this time, the infrared lamp D1 continuously flashes and lights up according to the timing to realize the fill light, and the infrared lamp D2 sends the data to be sent according to the timing, wherein the pulse signal carries the data to be sent through its waveform characteristics, such as amplitude, frequency, phase, etc.; after sending the data to be sent, the port IO1 is pulled to a high level, so that the infrared lamp D1 re-executes the fill light instruction, and the port IO2 re-outputs a low level.

[0087] In some embodiments, see Fig.11 , which shows another method for controlling a light source provided in an embodiment of the present application, Figures 3 to 10 The method and its embodiment shown, the light source control method further includes:

[0088] Step 141: Get the current environment brightness;

[0089] Step 142: Determine whether the current environment brightness is lower than a preset brightness threshold; if so, jump to step 143; if not, jump to step 154;

[0090] Step 143: executing the fill light instruction, where the fill light instruction is used to turn on the light source;

[0091] Step 144: Turn off the light source.

[0092] Furthermore, the embodiment of the present application also provides a method for determining whether it is necessary to execute a fill light instruction. Specifically, since it is usually necessary to turn on the light source for fill light in night scenes, a brightness detector or a device capable of detecting brightness, such as a photosensitive device, can be used to detect the current ambient brightness to determine whether the current ambient brightness detected is lower than a preset brightness threshold. If so, it means that the current environment requires fill light, and the light source is controlled to execute the fill light instruction to turn on the light source to perform fill light on the environment where the current execution subject, such as the surveillance camera 10 described in the above application scenario, is located, so that the surveillance camera 10 can work normally and collect images.

[0093] The preset brightness threshold can be determined according to the minimum brightness required for the image that can be captured by the monitoring camera 10. For example, the preset brightness threshold can be set to 200 nits (the lowest brightness that the human eye can see, and the human brain determines it as black if it is lower than this brightness). Specifically, it can be determined according to the actual shooting performance of the monitoring camera 10. In addition, in addition to brightness, other parameters such as illumination that can be expressed or determined in numerical form to determine the amount of light in the environment where the current monitoring camera 10 is located can be used as a standard for determining whether to execute the fill light instruction. Specifically, it can be set according to the actual detection environment.

[0094] Embodiment 2

[0095] The present application provides a control device for a light source. Fig.12 , which shows a light source control device provided in an embodiment of the present application, the device 200 includes:

[0096] The receiving unit 210 is used to receive a data transmission instruction and a fill light instruction;

[0097] The execution unit 220 is used to execute the data sending instruction and the fill light instruction according to a preset timing.

[0098] In some embodiments, see Fig.13 , which shows another light source control device provided in an embodiment of the present application, the device 200 further includes:

[0099] The determination unit 230 is used to determine whether it is necessary to execute the data sending instruction and the fill light instruction simultaneously.

[0100] In some embodiments, the number of the light source is one;

[0101] The execution unit 220 is further configured to first send the data to be sent according to the data sending instruction; and then execute the fill light instruction after the sending of the data to be sent is completed.

[0102] In some embodiments, the number of the light sources is at least two, wherein there is one light source for executing the fill light instruction, and there is one light source for executing the data sending instruction;

[0103] The execution unit 220 is also used to first control the light source used to execute the fill light instruction to turn off; then control the light source used to execute the data sending instruction to send the data to be sent; after the sending of the data to be sent is completed, control the light source used to execute the fill light instruction to turn on again.

[0104] In some embodiments, the number of the light sources is at least two, and the wavelengths of all the light sources are the same;

[0105] The execution unit 220 is also used to first control the light source used to execute the fill light instruction to turn off; then control all the light sources to execute the data sending instruction to send the data to be sent; after the sending of the data to be sent is completed, control the light source used to execute the fill light instruction to turn on again.

[0106] In some embodiments, see Fig.13 , the device 200 further includes:

[0107] The judgment unit 240 is used to obtain the current environment brightness; judge whether the current environment brightness is lower than a preset brightness threshold; if so, execute the fill light instruction, the fill light instruction is used to turn on the light source; if not, turn off the light source.

[0108] Embodiment 3

[0109] The present application also provides an electronic device. Fig.14 , which shows that it is possible to execute Figures 3 to 11 The hardware structure of the electronic device of the light source control method. The electronic device 10 may be Figure 1 The surveillance camera 10 shown may also be other electronic devices that need to fill light and send data in specific scenarios. The electronic device 10 includes: at least one light source 11; a switch device 12 connected to the light source 11; and a controller 13 connected to the switch device 12. The controller 13 can control the switch device 12 in a time sequence so that the at least one light source 11 can execute the fill light instruction and the data sending instruction. For further information, please refer to Fig.15 , which shows the hardware structure of another electronic device, the electronic device 10 may also include: a brightness detector 14, which is connected to the controller 13 and is used to obtain the current environment brightness.

[0110] The controller 13 includes: at least one processor 13a; and a memory 13b connected to the at least one processor 13a in communication. Fig.14 and Fig.15 The memory 13b stores instructions that can be executed by the at least one processor 13a, and the instructions are executed by the at least one processor 13a, so that the at least one processor 13a can execute the above Figures 3 to 11 The processor 13a and the memory 13b may be connected via a bus or other means. Fig.14 and Fig.15 The example of connecting through bus is taken in the following.

[0111] The memory 13b is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the light source control method in the embodiment of the present application, for example, Figure 12 to Figure 13 The processor 13a executes various functional applications and data processing of the electronic device by running the non-volatile software programs, instructions and modules stored in the memory 13b, that is, realizes the control method of the light source of the above method embodiment.

[0112] The memory 13b may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created according to the use of the control device of the light source, etc. In addition, the memory 13b may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 13b may optionally include a memory remotely arranged relative to the processor 13a, and these remote memories may be connected to the control device of the light source via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0113] The one or more modules are stored in the memory 13b, and when executed by the one or more processors 13a, execute the light source control method in any of the above method embodiments, for example, execute the above described Figures 3 to 11 Steps to achieve Figure 12 to Figure 13 The functions of each module and unit in it.

[0114] The above-mentioned product can execute the method provided in the embodiment of the present application, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not fully described in this embodiment, please refer to the method provided in the embodiment of the present application.

[0115] The present application also provides a non-volatile computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, which are executed by one or more processors, for example, to execute the above-described Figures 3 to 11 Steps to achieve Figure 12 to Figure 13 The functions of each module in.

[0116] The present application also provides a computer program product, including a computer program stored on a non-volatile computer-readable storage medium, wherein the computer program includes program instructions. When the program instructions are executed by a computer, the computer executes the light source control method in any of the above method embodiments, for example, executing the above described Figures 3 to 11Steps to achieve Figure 12 to Figure 13 The functions of each module in.

[0117] In an embodiment of the present application, a method, device, electronic device and computer-readable storage medium for controlling a light source are provided. The method first needs to receive a data sending instruction and a fill light instruction, and then execute the data sending instruction and the fill light instruction according to a preset timing, so that the fill light instruction and the data sending instruction do not conflict. The light source control method provided in an embodiment of the present application is used to control the light source to execute the fill light instruction and the data sending instruction, which can solve the problem of signal crosstalk.

[0118] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0119] Through the description of the above implementation methods, ordinary technicians in this field can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware. Ordinary technicians in this field can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0120] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other changes in different aspects of the present application as described above, which are not provided in detail for the sake of simplicity. Although the present application has been described in detail with reference to the aforementioned embodiments, a person of ordinary skill in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for controlling a light source, characterized in that: The method comprises: Receive data sending instructions and fill light instructions; When it is determined that the data sending instruction and the fill light instruction need to be executed simultaneously, executing the data sending instruction and the fill light instruction according to a preset timing sequence; Wherein, the preset timing is set according to the number of the light sources and / or the wavelength of the light sources.

2. The method according to claim 1, characterized in that The number of the light source is one; The step of executing the data sending instruction and the fill light instruction according to a preset timing further includes: First, the data to be sent is sent according to the data sending instruction; After the waiting data is sent, the fill light instruction is executed.

3. The method according to claim 1, characterized in that The number of the light sources is at least two, wherein one of the light sources is used to execute the fill light instruction, and one of the light sources is used to execute the data sending instruction; The step of executing the data sending instruction and the fill light instruction according to a preset timing further includes: First, the light source used to execute the fill light instruction is controlled to be turned off; Then controlling the light source for executing the data sending instruction to send the data to be sent; After the data to be sent is completed, the light source for executing the fill light instruction is controlled to be turned on again.

4. The method according to claim 1, characterized in that: The number of the light sources is at least two, and the wavelengths of all the light sources are the same; The step of executing the data sending instruction and the fill light instruction according to a preset timing further includes: First, the light source used to execute the fill light instruction is controlled to be turned off; Then controlling all the light sources to execute the data sending instruction to send the data to be sent; After the data to be sent is completed, the light source for executing the fill light instruction is controlled to be turned on again.

5. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Get the current ambient brightness; Determine whether the current environment brightness is lower than a preset brightness threshold; If yes, execute the fill light instruction, where the fill light instruction is used to turn on the light source; If not, turn off the light source.

6. A light source control device, characterized in that: The device comprises: A receiving unit, used for receiving data sending instructions and fill light instructions; An execution unit is used to execute the data sending instruction and the fill light instruction according to a preset timing when it is determined that the data sending instruction and the fill light instruction need to be executed simultaneously; wherein the preset timing is set according to the number of the light sources and / or the wavelength of the light sources.

7. An electronic device, characterized in that: include: at least one light source; A switch device connected to the light source; A controller is connected to the switch device, the controller includes: at least one processor, and a memory connected to the at least one processor, wherein: The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can perform the method according to any one of claims 1 to 5.

8. The electronic device according to claim 7, characterized in that: The electronic device further comprises: A brightness detector is connected to the controller and is used to obtain the current environment brightness.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method according to any one of claims 1 to 5.