Lamp anti-interference test method, system and device and storage medium

In the electromagnetic compatibility test of lamps, the error range comparison method of the grayscale value of the video picture is solved, and the accuracy problem caused by human eye observation is achieved is achieved efficient electromagnetic interference fault detection.

CN120352800APending Publication Date: 2025-07-22ZHEJIANG LEAPMOTOR TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510604080.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-07-22

AI Technical Summary

Technical Problem

The existing test methods for electromagnetic compatibility and anti-disturbance projects of lamps rely on human eye observation, resulting in low test accuracy and prone to fatigue and misjudgment, making it difficult to meet the monitoring needs in various working modes.

Method used

By obtaining the grayscale value of the video screen of the lamp without electromagnetic interference, determining the allowable error range, and comparing the grayscale value of the video screen with electromagnetic interference with the allowable error range periodically, outputting the curve of the grayscale value and time to detect electromagnetic interference faults.

Benefits of technology

It improves the accuracy of lamp anti-interference testing, reduces artificial misjudgment, and improves detection efficiency and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120352800A_ABST
    Figure CN120352800A_ABST
Patent Text Reader

Abstract

The invention discloses a lamp anti-interference testing method, system and device and a storage medium, and relates to the technical field of testing. The lamp anti-interference test method comprises the following steps: acquiring a first video picture of a to-be-tested lamp in each preset phase in a preset period under a first preset condition; determining a target error range of the to-be-detected lamp according to each first video picture; obtaining a second video picture of each preset phase of the to-be-tested lamp in each work period under a second preset condition, and determining a first gray value of each second video picture; if the first gray value exceeds the target error range, marking a fault time node corresponding to the first gray value exceeding the target error range, and determining a target curve according to each first gray value and the fault time node; the target curve is used for representing an anti-interference test result of the to-be-tested lamp. According to the invention, whether the lamp has an electromagnetic interference fault can be tested, and the curve of the gray value and the time is output, so that the anti-interference test result of the lamp is output, and the test accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of testing technologies, and particularly to a method, system, device, and storage medium for anti-interference testing of lamps. Background Art

[0002] With the progress of technology, the functions of lamps have become increasingly rich. However, the expansion of lamp functions has increased the difficulty of monitoring in electromagnetic compatibility (EMC) anti-interference project tests. The existing monitoring methods mainly rely on a combination of humans and machines for monitoring. However, the test time for anti-interference projects is usually relatively long, and testers need to rely on visual observation by the human eye for a long time, which inevitably leads to fatigue and distraction. At the same time, the subjective initiative of human eye observation is relatively large, resulting in low test accuracy. Summary of the Invention

[0003] Object of the Invention: Embodiments of this application provide a method, system, device, and storage medium for anti-interference testing of lamps to improve the accuracy of anti-interference testing of lamps.

[0004] Technical Solution: A method for anti-interference testing of lamps according to an embodiment of this application includes:

[0005] Obtaining first video frames of a lamp under test at each preset phase in a preset period under a first preset condition;

[0006] Determining a target error range of the lamp under test according to each of the first video frames;

[0007] Obtaining second video frames of the lamp under test at each preset phase in each working period under a second preset condition, and determining a first grayscale value of each of the second video frames;

[0008] If the first grayscale value exceeds the target error range, marking a fault time node corresponding to the first grayscale value that exceeds the target error range, and determining a target curve according to each of the first grayscale values and the fault time node; the target curve is used to characterize the anti-interference test result of the lamp under test.

[0009] In some embodiments, the method for determining the target error range includes:

[0010] Determining a second grayscale value of a first video frame of a target phase in the preset period according to each of the first video frames;

[0011] Determining the target error range of the lamp under test according to the second grayscale value.

[0012] In some embodiments, the preset period includes a preset number of working periods;

[0013] Determining the second gray value of the first video frame for the target phase in the preset period according to each of the first video frames includes:

[0014] Determining the second gray value of each of the first video frames;

[0015] Performing period division on each of the second gray values according to the working period of the lamp under test to obtain a first division curve; wherein, the first division curve is used to characterize the corresponding relationship between each of the second gray values and the working period of the lamp under test;

[0016] Determining the second gray value of the same target phase in each of the working periods according to the first division curve.

[0017] In some embodiments, determining the target error range of the lamp under test according to the second gray value includes:

[0018] Determining a first boundary value according to the maximum value among each of the second gray values, and determining a second boundary value according to the minimum value among each of the second gray values;

[0019] Determining the target error range according to the first boundary value and the second boundary value.

[0020] In some embodiments, marking the fault time nodes corresponding to the first gray values exceeding the target error range, and determining a target curve according to each of the first gray values and the fault time nodes includes:

[0021] Performing period division on each of the first gray values according to the working period of the lamp under test to obtain a second division curve; wherein, the second division curve is used to characterize the corresponding relationship between each of the first gray values and the working period of the lamp under test;

[0022] Marking the fault time nodes corresponding to the first gray values exceeding the target error range in the second division curve;

[0023] Determining the target curve according to the second division curve and the fault time nodes.

[0024] In some embodiments, the lamp immunity test method further includes:

[0025] If all the first gray values are within the target error range, determining the target curve according to the first gray values.

[0026] In some embodiments, the first preset condition includes: the lamp under test operates in a dynamic operating mode and there is no electromagnetic interference;

[0027] The second preset condition includes: the lamp under test operates in the dynamic operating mode and there is electromagnetic interference.

[0028] Correspondingly, an embodiment of the present application further provides a lamp anti-interference test system, including:

[0029] A first acquisition module, configured to acquire first video images of the lamp under test at each preset phase in a preset period under a first preset condition;

[0030] A first determination module, configured to determine a target error range of the lamp under test according to each of the first video images;

[0031] A second acquisition module, configured to acquire second video images of the lamp under test at each preset phase in each operating period under a second preset condition;

[0032] A second determination module, configured to determine a first gray value of each of the second video images;

[0033] A third determination module, configured to, if the first gray value is not within the target error range, mark a fault time node corresponding to the first gray value that is not within the target error range, and determine a target curve according to each of the first gray values and the fault time node; the target curve is used to characterize the anti-interference test result of the lamp under test.

[0034] Correspondingly, an embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the computer program, the lamp anti-interference test method as described above is implemented.

[0035] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the lamp anti-interference test method as described above is implemented.

[0036] Beneficial effects: Compared with the prior art, the lamp immunity test method, system, device, and storage medium according to the embodiments of the present application. The lamp immunity test method includes: obtaining first video frames of a lamp under test at each preset phase in a preset cycle under a first preset condition; determining a target error range of the lamp under test according to each first video frame; obtaining second video frames of the lamp under test at each preset phase in each working cycle under a second preset condition, and determining a first grayscale value of each second video frame; if the first grayscale value exceeds the target error range, marking a fault time node corresponding to the first grayscale value that exceeds the target error range, and determining a target curve according to each first grayscale value and the fault time node; the target curve is used to characterize the immunity test result of the lamp under test. The lamp immunity test method provided by the present application determines an allowable error range by testing and based on the grayscale values of the video frames of the lamp without electromagnetic interference, and compares the grayscale values of the video frames of the lamp with electromagnetic interference with the allowable error range cycle by cycle to test whether there is an electromagnetic interference fault in the lamp, and outputs a curve of grayscale value versus time, which is convenient for accurately outputting the immunity test result of the lamp, thereby improving the accuracy of the test. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0038] Figure 1 is a flowchart of a lamp immunity test method provided in an embodiment of the present application;

[0039] Figure 2 is a schematic diagram of a lamp immunity test monitoring network provided in an embodiment of the present application;

[0040] Figure 3 is a schematic diagram of a first division curve provided in an embodiment of the present application;

[0041] Figure 4 is a schematic diagram for extracting second grayscale values of the same target phase provided in an embodiment of the present application;

[0042] Figure 5 is a schematic diagram of a target error range provided in an embodiment of the present application;

[0043] Figure 6 is a schematic diagram of phase correction provided in an embodiment of the present application;

[0044] Figure 7 is a schematic diagram of a target curve provided in an embodiment of the present application;

[0045] Figure 8 It is a schematic diagram of the overall process of a method for testing the immunity of a lighting fixture provided in an embodiment of the present application;

[0046] Figure 9 It is a schematic structural diagram of an immunity test monitoring system provided in an embodiment of the present application;

[0047] Figure 10 It is a schematic block diagram of the principle structure of a lighting fixture immunity test system provided in an embodiment of the present application;

[0048] Figure 11 It is a structural diagram of an electronic device provided in an embodiment of the present application.

[0049] Reference numerals:

[0050] 101 - First acquisition module; 102 - First determination module; 103 - Second acquisition module; 104 - Second determination module; 105 - Third determination module; 100 - Lighting fixture immunity test system. Detailed implementation manners

[0051] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without making creative efforts belong to the scope of protection of the present application.

[0052] It should be understood that although terms such as first and second may be used herein to describe various components, these components should not be limited by these terms. These terms are used to distinguish one component from another. Therefore, the first component described below may be referred to as the second component without departing from the teachings of the concept of the present application. As used herein, the term "and / or" includes any one of the associated listed items and all combinations of one or more of them.

[0053] Those skilled in the art can understand that the drawings are only schematic diagrams of exemplary embodiments and may not be to scale. The modules or processes in the drawings are not necessarily essential for implementing the present application and thus cannot be used to limit the protection scope of the present application.

[0054] The applicant has found that with the advancement of technology, lamps that only meet lighting needs are far from meeting people's needs for a higher standard of living. Taking vehicle-mounted lamps as an example, they need to meet a variety of different working modes such as steering, running water, charging, and welcoming guests. The brightness changes produced by these smart lamps may be periodic or non-periodic. However, the expansion of lamp functions has increased the difficulty of monitoring them in electromagnetic compatibility and anti-interference project tests, making it difficult for previous monitoring methods to meet current needs due to their own defects.

[0055] For example, in the related technology, a camera is arranged in a shielded room for monitoring, and the camera is connected to an external display. The tester observes the video screen on the display outside the shielded room to identify whether the test phenomenon is abnormal. However, in EMC anti-interference test items such as large current injection and radiation immunity, the test time is usually long, and the tester needs to observe with the human eye for a long time, which will inevitably cause fatigue and distraction. At the same time, human eye observation is subjective, and different testers have different sensitivity to light, resulting in large differences in test results and misjudgment.

[0056] For example, in the related art, a light intensity meter is used to monitor the brightness change of the light, and judge whether the light is abnormal based on the change of light intensity. However, the light intensity meter cannot identify the slight change of light brightness, resulting in the inability to accurately identify the slight change of light brightness.

[0057] In view of this, the embodiments of the present application provide a method, system, device and storage medium for testing the immunity of lamps. The present application determines the allowable error range based on the grayscale value of the video screen of the lamp in the absence of electromagnetic interference through testing, and compares the grayscale value of the video screen of the lamp in the presence of electromagnetic interference with the allowable error range cycle by cycle to test whether the lamp has an electromagnetic interference fault, and outputs a curve of the grayscale value and time, which is convenient for accurately outputting the immunity test results of the lamp, thereby improving the accuracy of the test.

[0058] Figure 1 This is a flow chart of a lamp immunity test method provided in an embodiment of the present application. The method can be applied to a vehicle test platform to accurately test the immunity of lamps. The method can be executed by a lamp immunity test system, which can be implemented by software and / or hardware, and the system can be configured in a processor or controller of a vehicle test platform. Figure 1 , the method comprises the following steps:

[0059] Step 110: Obtain first video images of the lamp to be tested at each preset phase in a preset cycle under a first preset condition.

[0060] Among them, the lamps to be tested include vehicle lamps (such as, automotive hazard warning flashers, turn signals, etc.), household intelligent lamps, warning lamps, etc., which can be specifically set according to the actual situation and are not specifically limited here.

[0061] Among them, the first preset condition includes: the lamps to be tested work in a dynamic working mode and there is no electromagnetic interference.

[0062] Among them, the dynamic working mode is a mode in which the lamps work normally. For example, the working cycle of an automotive turn signal is 800 ms, with a 400-ms on and a 400-ms off periodic cyclic operation. In addition, the dynamic working mode can also be other working modes of the lamps, which can be specifically set according to the actual situation and are not specifically limited here.

[0063] Among them, the preset cycle includes a preset number of working cycles. Among them, the preset number of working cycles are consecutive working cycles. Among them, the preset number is a value such as 10, which can be specifically set according to the actual situation and is not specifically limited here. Exemplarily, in the technical solution of the embodiments of the present application, taking the preset number as 10, that is, 10 consecutive working cycles as an example for illustration, the same will not be elaborated hereinafter.

[0064] Among them, the working cycle refers to the working cycle of the lamps to be tested, and the specific value of the working cycle can be set according to the actual situation and is not specifically limited here. Among them, the preset phase refers to each phase of the lamp in each working cycle. Among them, the number of phases included in each working cycle is the same as the number of frame pictures included in each working cycle. The number of frame pictures in each working cycle is related to the frame rate of the video. Therefore, the specific number of preset phases in each working cycle is related to the frame rate. Usually, the number of preset phases in each working cycle is the same.

[0065] Exemplarily, taking the preset cycle as 10 consecutive working cycles as an example, the first video pictures of each preset phase under the preset cycle refer to: the first video pictures of each preset phase in each of the 10 consecutive working cycles. Among them, the number of preset phases included in each working cycle is the same as the number of first video pictures.

[0066] Figure 2 It is a schematic diagram of a lamp anti-interference test monitoring network provided in the embodiments of the present application. Exemplarily, please refer to Figure 2, an embodiment of the present application provides a monitoring network for testing and monitoring a device under test (DUT) lamp, and the monitoring network includes a dark room and a monitoring room. Among them, the dark room includes interference equipment, a device under test (DUT), the light-emitting surface of the device under test (i.e., the DUT lamp), and a camera. Among them, the interference equipment provides electromagnetic interference, and the camera is used to collect video images of the DUT lamp tested under the first preset condition and the second preset condition. Among them, the monitoring room includes a computer and a display. The computer is used to calculate the gray value of the video image, etc., and the display is used to display the test results of the DUT lamp, etc.

[0067] Specifically, the specific acquisition method of the first video image is as follows: Exemplarily, place the DUT lamp at the Figure 2 shown DUT position, and make the DUT lamp work in a dynamic working mode, such as a typical turn signal working mode (for example, the working cycle is 800 ms, it lights for 400 ms and then darkens for 400 ms in a periodic cycle). And, turn off the interference equipment so that the DUT lamp works in a dynamic working mode without electromagnetic interference (i.e., the first preset condition), and at the same time turn on the camera to capture the first video image of the DUT lamp under the first preset condition. The first video images of the DUT lamp at each preset phase in the preset cycle are acquired through the camera.

[0068] Step 120: Determine the target error range of the DUT lamp according to each first video image.

[0069] Among them, the target error range is used to subsequently determine whether there are fault points in the DUT lamp, which is beneficial to accurately detecting the DUT lamp.

[0070] In some embodiments, the method for determining the target error range includes the following steps:

[0071] Step 1: Determine the second gray value of the first video image of the target phase in the preset cycle according to each first video image.

[0072] Among them, the target phase refers to the preset phase corresponding to a specific time point (or moment) marked in the preset cycle. Taking the preset cycle as 10 consecutive working cycles as an example, a target phase is set in each working cycle. For example, the preset phases corresponding to the moments with equal time intervals from the start moment of each working cycle (for example, the time interval is half or a quarter of each working cycle, which can be specifically set according to the actual situation and is not specifically limited here) are marked as the target phases of each working cycle.

[0073] Among them, the second gray value of the first video frame corresponding to each preset phase within each working cycle is arbitrary (within the range of 0 - 255). Theoretically, the target phase in each working cycle of the preset cycle is the same preset phase. Correspondingly, the gray values corresponding to the target phase should theoretically be the same. However, in actual situations, due to various error reasons, the second gray values of the first video frames corresponding to each target phase may vary. Therefore, calculating the second gray values of the first video frames for each target phase facilitates subsequent determination of the target error range based on these second gray values, and further helps improve the detection accuracy of the lighting fixture under test.

[0074] In some embodiments, the preset cycle includes a preset number of working cycles; determining the second gray value of the first video frame of the target phase in the preset cycle based on each first video frame includes: determining the second gray value of each first video frame; dividing each second gray value according to the working cycle of the lighting fixture under test to obtain a first division curve; where the first division curve is used to represent the corresponding relationship between each second gray value and the working cycle of the lighting fixture under test; determining the second gray value of the same target phase in each working cycle according to the first division curve.

[0075] Among them, the calculation methods of the second gray values of each first video frame are the same, and can be calculated using the following gray value calculation formula. The gray value calculation formula is:

[0076] Gray = 0.299×R + 0.587×G + 0.114×B;

[0077] Among them, R, G, and B respectively represent the values of the red, green, and blue channels of the pixel points of the video frame, and the value range is generally 0 - 255°. Among them, Gray represents the calculated gray value of the video frame.

[0078] Figure 3 is a schematic diagram of the first division curve provided in the embodiments of the present application. Specifically, after calculating the second gray values of each first video frame, each second gray value is divided according to the working cycle of the lighting fixture under test to obtain Figure 3 the first division curve shown. The first division curve includes 10 consecutive working cycles such as the first working cycle T1 and the second working cycle T2. Among them, the first division curve is used to represent the corresponding relationship between each second gray value and the working cycle of the lighting fixture under test.

[0079] Figure 4 is a schematic diagram for extracting the second gray value of the same target phase provided in the embodiments of the present application. Exemplarily, refer to Figure 4, taking the first consecutive working cycle and the second working cycle as examples, the second gray value of the first video frame corresponding to the target phase at time t0 in the first working cycle T1 is gray1, and the second gray value of the first video frame corresponding to the target phase at time t0' in the second working cycle T2 is gray2. Thus, according to the first division curve, the second gray values of the same target phase in each working cycle can be obtained.

[0080] Step 2: Determine the target error range of the lamp under test according to the second gray value.

[0081] Specifically, obtain the first video frames of the lamp under test at each preset phase in a preset cycle under the first preset condition. Then, calculate the second gray values of each first video frame according to the gray value calculation formula. Secondly, divide the second gray values based on the working cycle of the lamp under test to obtain the first division curve. And according to the first division curve, the second gray values corresponding to the first video frames of the same target phase in each working cycle can be determined. Since the second gray values may vary, determining the target error range of the lamp under test according to these second gray values facilitates subsequent determination of the target error range based on these second gray values, and thus is conducive to improving the detection accuracy of the lamp under test in the future.

[0082] In some embodiments, determining the target error range of the lamp under test according to the second gray value includes: determining the first boundary value according to the maximum value among the second gray values, and determining the second boundary value according to the minimum value among the second gray values; determining the target error range according to the first boundary value and the second boundary value.

[0083] Among them, the first boundary value is the upper limit value of the target error range, and the second boundary value is the lower limit value of the target error range.

[0084] Figure 5 is a schematic diagram of the target error range provided in the embodiments of the present application. Specifically, the specific construction process of the target error range is: after obtaining the second gray values corresponding to each target phase, compare the second gray values, and extract the maximum value and the minimum value among the second gray values. Take the maximum value among the second gray values as the first boundary value, and take the minimum value among the second gray values as the second boundary value. Based on the envelope formed by the maximum value and the minimum value at different times within a working cycle T, construct the target error range as shown in Figure 5 shown. Thus, the target error range can be obtained according to the first boundary value and the second boundary value.

[0085] It should be noted that due to the finiteness of the sampling data, the interval of the target error range can be appropriately increased according to actual needs. For example, set the target error range interval with a 15% up and down floating as the standard interval.

[0086] It should be noted that, in order to prevent the phase cumulative deviation caused by the working mode of the lamp to be tested from affecting the test accuracy, a phase correction algorithm is used to correct the cumulative deviation of each target phase before comparing each second gray value.

[0087] Figure 6 is a schematic diagram of phase correction provided in an embodiment of the present application. For example, please refer to Figure 6 The specific implementation process of correcting the target phase is as follows: Let the gray value threshold be G0, and assume that the time interval between the first appearance of G0 in a certain working cycle T3 and the first appearance of G0 in the previous working cycle T2 is Assume that the phase deviation threshold is set to when Greater than , it is considered that the phase offset of the working cycle T3 is too large. At this time, the period division will be redone starting from time t2 (the period division here means changing the starting point of the period, but the period interval T remains unchanged) to perform phase correction. If no correction is performed, the grayscale value at time t1 corresponds to the grayscale value at time t1+T. However, the correspondence between the grayscale value at time t1 and the grayscale value at time t1+T is only a theoretical correspondence, and in fact, the grayscale value that should have appeared at time t1+T actually appeared at time t2. If the phase correction is not performed, the subsequent target error range will be inaccurate, which will lead to inaccurate subsequent tests. Therefore, it is necessary to correct the target phase to avoid the impact of the cumulative phase deviation.

[0088] Among them, the value at time t2 is:

[0089]

[0090] in, is the phase deviation of the working cycle T3.

[0091] Step 130: Obtain second video images of the lamp under test at each preset phase in each working cycle under a second preset condition, and determine a first grayscale value of each second video image.

[0092] The second preset condition includes that the lamp to be tested is working in a dynamic working mode and has electromagnetic interference. Specifically, the specific method of obtaining the second video image is as follows: illustratively, place the lamp to be tested in Figure 2At the DUT shown, and make the lamp under test work in a dynamic working mode, such as a typical turn signal working mode (for example, the working cycle is 800 ms, it is on for 400 ms and off for 400 ms in a periodic cycle). And, turn on the interference device so that the lamp under test works in a dynamic working mode under electromagnetic interference (i.e., the second preset condition), and at the same time turn on the camera to capture the second video image of the lamp under test under the second preset condition. The second video images of the lamp under test at each preset phase in each working cycle are acquired through the camera.

[0093] Among them, obtaining the second video images of the lamp under test at each preset phase in each working cycle under the second preset condition is for subsequent fault detection of the video images of the lamp under test at each preset phase under the second preset condition.

[0094] Among them, the calculation of the first gray value of each second video image is also obtained according to the gray value calculation formula provided above in the embodiments of the present application.

[0095] Step 140: If the first gray value exceeds the target error range, mark the fault time node corresponding to the first gray value that exceeds the target error range, and determine the target curve according to each first gray value and the fault time node; the target curve is used to characterize the anti-interference test result of the lamp under test.

[0096] Among them, the first gray value exceeding the target error range includes the situation that the first gray value is less than the second boundary value of the target error range or greater than the first boundary value.

[0097] Among them, the fault time node refers to the moment or time node when the first gray value exceeds the target error range.

[0098] Specifically, obtain the first video frames of the lamp under test at each preset phase within a preset period under the first preset condition. Then, calculate the second grayscale values of each of the first video frames according to the grayscale value calculation formula. Next, divide the second grayscale values based on the working period of the lamp under test to obtain a first division curve. And according to the first division curve, the second grayscale values corresponding to the first video frames at the same target phase in each working period can be determined. Since the second grayscale values may vary, the target error range of the lamp under test is determined based on each of the second grayscale values. Then, the first grayscale values of each preset phase in each working period of the lamp under test are compared with the target error range using the per-cycle comparison method (i.e., comparing each first grayscale value within each working period with the target error range one by one) to perform fault detection on the working mode of the lamp under test. The specific process is as follows: Obtain the second video frames of the lamp under test at each preset phase in each working period under the second preset condition. Then, calculate the first grayscale values of each of the second video frames according to the grayscale value calculation formula. Finally, determine whether each of the first grayscale values exceeds the target error range, and mark the time nodes corresponding to the first grayscale values that exceed the target error range as fault time nodes. Finally, obtain a target curve based on each of the first grayscale values and the marked fault time nodes. Through the target curve, the anti-interference test result of the lamp under test can be visually obtained, which is convenient for the detection personnel to observe and process, and improves the detection efficiency. Moreover, in the embodiment of the present application, the allowable error range is determined by testing and based on the grayscale values of the video frames of the lamp without electromagnetic interference, and the grayscale values of the video frames of the lamp with electromagnetic interference are compared with the allowable error range on a per-cycle basis to test whether there are electromagnetic interference faults in the lamp, and a curve of grayscale value versus time is output, which is convenient for accurately outputting the anti-interference test result of the lamp, thereby improving the test accuracy.

[0099] In some embodiments, marking the fault time nodes corresponding to the first grayscale values that exceed the target error range and determining the target curve based on each of the first grayscale values and the fault time nodes includes: dividing each of the first grayscale values according to the working period of the lamp under test to obtain a second division curve; wherein, the second division curve is used to represent the corresponding relationship between each of the first grayscale values and the working period of the lamp under test; marking the fault time nodes corresponding to the first grayscale values that exceed the target error range in the second division curve; and determining the target curve based on the second division curve and the fault time nodes.

[0100] Figure 7It is a schematic diagram of the target curve provided in the embodiment of the present application. Specifically, second video frames of the to-be-tested lamp at each working cycle and each preset phase under the second preset condition are obtained. Then, the first gray value of each second video frame is calculated according to the gray value calculation formula. Secondly, each first gray value is divided into periods based on the working cycle of the to-be-tested lamp (the division principle is the same as that of the second gray value and will not be elaborated here), obtaining a second division curve. Finally, when comparing each first gray value with the target error range, the fault time nodes corresponding to the first gray value exceeding the target error range are marked in the second division curve (for example, Figure 7 the first gray value corresponding to the time period between t3 and t4 in Figure 7 exceeds the target error range), and thus, according to each actual fault node and the second division curve, the curve showing the relationship between the gray value and time as shown in

[0101] can be output (i.e., the target curve), which is conducive to intuitively reflecting the detection result of the to-be-tested lamp, improving the detection efficiency, and facilitating the detection personnel to view and handle faults.

[0102] It should be noted that, in order to avoid the influence of the phase cumulative deviation caused by the working mode of the to-be-tested lamp itself on the test accuracy, before comparing each first gray value with the target error range, the phase correction algorithm provided in the above embodiment of the present application is used to correct the cumulative deviation of each target phase. The specific correction principle is the same as that of the second gray value and will not be elaborated here.

[0103] It can be understood that the lamp immunity test method provided in the present application determines the allowable error range by testing and based on the gray value of the video frame of the lamp without electromagnetic interference, and compares the gray value of the video frame of the lamp with electromagnetic interference with the allowable error range cycle by cycle to test whether there is an electromagnetic interference fault in the lamp, and outputs a curve showing the relationship between the gray value and time, which is convenient for accurately outputting the immunity test result of the lamp, thereby improving the accuracy of the test.

[0104] In some embodiments, the lamp immunity test method further includes: if all the first gray values are within the target error range, the target curve is determined according to the first gray values.

[0105] Specifically, obtain the second video frames of the lamp under test at each preset phase in each working cycle under the second preset condition. Then, calculate the first gray value of each second video frame according to the gray value calculation formula. Finally, determine whether each first gray value exceeds the target error range. If a first gray value is not within the target error range, mark the time node corresponding to the first gray value that exceeds the target error range as the fault time node, and obtain the target curve based on each first gray value and the marked fault time node. If all the first gray values are within the target error range, it indicates that there is no problem with the working cycle of the lamp under test. Thus, the anti-interference test result of the lamp under test can be intuitively obtained through the target curve, which is convenient for the detection personnel to observe and process, improving the detection efficiency and reducing the waste of test resources and test costs.

[0106] Figure 8 is an overall flowchart of a lamp anti-interference test method provided in an embodiment of the present application. Exemplarily, refer to Figure 8 , the overall working process of the lamp anti-interference test method includes: First, the lamp product (i.e., the lamp under test) operates in a dynamic working mode. Then, collect the gray value of the light video frame without electromagnetic interference (i.e., the second gray value of the first video frame). Next, set the target error range of the gray value. Then, collect the gray value of the light video frame with electromagnetic interference (i.e., the first gray value of the second video frame). Finally, determine whether the gray value of the light video frame with electromagnetic interference is within the target error range. If so, output the gray value-time curve graph (i.e., the target curve). If not, output the gray value-time curve graph (i.e., the target curve), and output the error reporting time node (i.e., the fault time node) for relevant personnel to perform further evaluation and intervention on the problem.

[0107] Figure 9 is a schematic structural diagram of an anti-interference test monitoring system provided in an embodiment of the present application. Exemplarily, please refer to Figure 9 , an embodiment of the present application provides an anti-interference test monitoring system, which includes: a video monitoring and data acquisition module, a data transmission module, a data processing module, and an image display and error reporting module. Among them, the video monitoring and data acquisition module is used to collect video data through video monitoring. The data transmission module is used to realize the transmission of video data to a computer. The data processing module is used to process and compare and analyze the collected signals. Among them, the data processing module includes three sub-modules, namely a video gray value calculation module, a gray value period division and phase correction module, and a gray value and threshold (i.e., the target error range) comparison and analysis processing module. The image display and error reporting module is used to display the time-varying curve graph of the real-time image gray value of the video frame and the time node exceeding the gray value threshold.

[0108] Figure 10 This is a schematic structural diagram of the principle of a lamp immunity test system provided in an embodiment of the present application. Correspondingly, an embodiment of the present application also provides a lamp immunity test system. Please refer to Figure 10 , the lamp immunity test system 100 includes: a first acquisition module 101, configured to acquire first video images of a to-be-tested lamp at each preset phase in a preset period under a first preset condition; a first determination module 102, configured to determine a target error range of the to-be-tested lamp according to each first video image; a second acquisition module 103, configured to acquire second video images of the to-be-tested lamp at each preset phase in each working period under a second preset condition; a second determination module 104, configured to determine a first gray value of each second video image; a third determination module 105, configured to, if the first gray value is not within the target error range, mark a fault time node corresponding to the first gray value that is not within the target error range, and determine a target curve according to each first gray value and the fault time node; the target curve is used to represent the lamp immunity test result of the to-be-tested lamp.

[0109] The technical solution of the embodiment of the present application provides a lamp immunity test system, including: a first acquisition module, configured to acquire first video images of a to-be-tested lamp at each preset phase in a preset period under a first preset condition; a first determination module, configured to determine a target error range of the to-be-tested lamp according to each first video image; a second acquisition module, configured to acquire second video images of the to-be-tested lamp at each preset phase in each working period under a second preset condition; a second determination module, configured to determine a first gray value of each second video image; a third determination module, configured to, if the first gray value is not within the target error range, mark a fault time node corresponding to the first gray value that is not within the target error range, and determine a target curve according to each first gray value and the fault time node; the target curve is used to represent the lamp immunity test result of the to-be-tested lamp. The lamp immunity test system provided by the present application determines an allowable error range by testing and according to the gray value of the video image of the lamp without electromagnetic interference, and compares the gray value of the video image of the lamp with electromagnetic interference with the allowable error range for each period one by one to test whether there is an electromagnetic interference fault in the lamp, and outputs a curve of the gray value and time, which is convenient for accurately outputting the lamp immunity test result, thereby improving the accuracy of the test.

[0110] In some embodiments, the first determination module 102 is further configured to: determine a second gray value of the first video image of the target phase in the preset period according to each first video image; and determine the target error range of the to-be-tested lamp according to the second gray value.

[0111] In some embodiments, the preset period includes a preset number of working cycles; the first determination module 102 is further configured to: determine the second grayscale value of each first video frame; divide each second grayscale value according to the working cycle of the to-be-tested lamp to obtain a first division curve; wherein, the first division curve is used to represent the corresponding relationship between each second grayscale value and the working cycle of the to-be-tested lamp; determine the second grayscale value of the same target phase in each working cycle according to the first division curve.

[0112] In some embodiments, the first determination module 102 is further configured to: determine a first boundary value according to the maximum value among each second grayscale value, and determine a second boundary value according to the minimum value among each second grayscale value; determine a target error range according to the first boundary value and the second boundary value.

[0113] In some embodiments, the third determination module 105 is further configured to: divide each first grayscale value according to the working cycle of the to-be-tested lamp to obtain a second division curve; wherein, the second division curve is used to represent the corresponding relationship between each first grayscale value and the working cycle of the to-be-tested lamp; mark the fault time nodes corresponding to the first grayscale values exceeding the target error range in the second division curve; determine a target curve according to the second division curve and the fault time nodes.

[0114] In some embodiments, the lamp immunity test system 100 further includes: a fourth determination module, configured to determine a target curve according to the first grayscale value if all the first grayscale values are within the target error range.

[0115] In some embodiments, the first preset condition includes: the to-be-tested lamp operates in a dynamic operating mode and there is no electromagnetic interference; the second preset condition includes: the to-be-tested lamp operates in a dynamic operating mode and there is electromagnetic interference.

[0116] Figure 11 It is a structural diagram of an electronic device provided in an embodiment of the present application. Correspondingly, an embodiment of the present application further provides an electronic device. Please refer to Figure 11 This electronic device includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned lamp immunity test method are implemented. Since the above-mentioned lamp immunity test method has been described in detail, it will not be elaborated here.

[0117] Correspondingly, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned lamp immunity test method are implemented. Since the above-mentioned lamp immunity test method has been described in detail, it will not be elaborated here.

[0118] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0119] The above has introduced in detail the lamp anti-interference test method, system, device, and storage medium provided by the embodiments of the present application, and specific examples have been used to elaborate on the principle and implementation manner of the present application. The description of the above embodiments is only used to help understand the technical solution and its core idea of the present application; those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for anti-interference testing of a lighting fixture, characterized in that, Including: Obtain first video images of a to-be-tested lamp at each preset phase in a preset period under a first preset condition; Determine a target error range of the to-be-tested lamp according to each of the first video images; Obtain second video images of the to-be-tested lamp at each preset phase in each working period under a second preset condition, and determine a first gray value of each of the second video images; If the first gray value exceeds the target error range, mark a fault time node corresponding to the first gray value that exceeds the target error range, and determine a target curve according to each of the first gray values and the fault time node; the target curve is used to characterize the anti-interference test result of the to-be-tested lamp.

2. The lamp immunity test method according to claim 1, characterized in that, A method for determining the target error range includes: Determine a second gray value of a first video image of a target phase in the preset period according to each of the first video images; Determine the target error range of the to-be-tested lamp according to the second gray value.

3. The lamp immunity test method according to claim 2, characterized in that, The preset period includes a preset number of working periods; The determining a second gray value of a first video image of a target phase in the preset period according to each of the first video images includes: Determine a second gray value of each of the first video images; Perform periodic division on each of the second gray values according to the working period of the to-be-tested lamp to obtain a first division curve; wherein, the first division curve is used to characterize the corresponding relationship between each of the second gray values and the working period of the to-be-tested lamp; Determine a second gray value of the same target phase in each of the working periods according to the first division curve.

4. The method for testing the immunity of a lamp according to claim 3, characterized in that, The determining the target error range of the to-be-tested lamp according to the second gray value includes: Determine a first boundary value according to the maximum value among each of the second gray values, and determine a second boundary value according to the minimum value among each of the second gray values; Determine the target error range according to the first boundary value and the second boundary value.

5. The lamp immunity test method according to claim 1, characterized in that, The marking a fault time node corresponding to the first gray value that exceeds the target error range, and determining a target curve according to each of the first gray values and the fault time node includes: Perform periodic division on each of the first gray values according to the working period of the to-be-tested lamp to obtain a second division curve; wherein, the second division curve is used to characterize the corresponding relationship between each of the first gray values and the working period of the to-be-tested lamp; Mark a fault time node corresponding to the first gray value that exceeds the target error range in the second division curve; Determine the target curve according to the second division curve and the fault time node.

6. The method for testing the immunity of a luminaire according to claim 1, characterized in that, It further includes: If the first gray values are all within the target error range, determine the target curve according to the first gray values.

7. The method for testing the immunity of a lighting fixture according to claim 1, characterized in that, The first preset condition includes: the to-be-tested lamp operates in a dynamic operation mode and there is no electromagnetic interference; The second preset condition includes: the to-be-tested lamp operates in the dynamic operation mode and there is electromagnetic interference.

8. A lighting fixture immunity test system, characterized in that, Including: A first obtaining module, configured to obtain first video images of a to-be-tested lamp at each preset phase in a preset period under a first preset condition; A first determination module, configured to determine a target error range of the to-be-tested lamp according to each of the first video images; A second acquisition module, configured to acquire second video images of the to-be-tested lamp at each preset phase in each working cycle under a second preset condition; A second determination module, configured to determine a first gray value of each of the second video images; A third determination module, configured to, if the first gray value is not within the target error range, mark a fault time node corresponding to the first gray value that is not within the target error range, and determine a target curve according to each of the first gray values and the fault time node; the target curve is used to characterize the anti-interference test result of the to-be-tested lamp.

9. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the lamp anti-interference test method described in any one of claims 1-7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, the lamp anti-interference test method described in any one of claims 1-7 is implemented.